md-redline 0.1.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/LICENSE +21 -0
- package/README.md +169 -0
- package/bin/md-redline +255 -0
- package/bin/test-windows.ps1 +70 -0
- package/dist/assets/_baseFor-Ck08IaSF.js +1 -0
- package/dist/assets/arc-DI2g9LXK.js +1 -0
- package/dist/assets/architecture-YZFGNWBL-BDgMfc-b.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-Dg1hcUEa.js +36 -0
- package/dist/assets/array-DOVTz2Mq.js +1 -0
- package/dist/assets/blockDiagram-DXYQGD6D-BAXkTCAk.js +132 -0
- package/dist/assets/c4Diagram-AHTNJAMY-BIkgwQSx.js +10 -0
- package/dist/assets/channel-DPCihw7y.js +1 -0
- package/dist/assets/chunk-2KRD3SAO-Dc_tBGsw.js +1 -0
- package/dist/assets/chunk-336JU56O-Dhi-ID9Y.js +2 -0
- package/dist/assets/chunk-426QAEUC-DnFdrNMW.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-Z63FkGov.js +1 -0
- package/dist/assets/chunk-4TB4RGXK-BAiBlfyy.js +206 -0
- package/dist/assets/chunk-55IACEB6-BXDWXbxy.js +1 -0
- package/dist/assets/chunk-5FUZZQ4R-C72e1c_O.js +62 -0
- package/dist/assets/chunk-5PVQY5BW-BBHW_uCu.js +2 -0
- package/dist/assets/chunk-67CJDMHE-3Cf_D9m6.js +1 -0
- package/dist/assets/chunk-7N4EOEYR-DAXUXJ2c.js +1 -0
- package/dist/assets/chunk-AA7GKIK3-Dr7fOryc.js +1 -0
- package/dist/assets/chunk-BSJP7CBP-BmsSs1Nt.js +1 -0
- package/dist/assets/chunk-CIAEETIT-QDzV-X_Y.js +1 -0
- package/dist/assets/chunk-EDXVE4YY-C25WFHxY.js +1 -0
- package/dist/assets/chunk-ENJZ2VHE-_OzxcZOU.js +10 -0
- package/dist/assets/chunk-FMBD7UC4-CjsTKY4u.js +15 -0
- package/dist/assets/chunk-FOC6F5B3-g-xaH5nc.js +1 -0
- package/dist/assets/chunk-ICPOFSXX-iKiUSjDK.js +121 -0
- package/dist/assets/chunk-K5T4RW27-CKR-lPBN.js +94 -0
- package/dist/assets/chunk-KGLVRYIC-DRccT-B_.js +1 -0
- package/dist/assets/chunk-LIHQZDEY-DTbMwMXj.js +1 -0
- package/dist/assets/chunk-ORNJ4GCN-DlerdcWX.js +1 -0
- package/dist/assets/chunk-OYMX7WX6-Dekv1on2.js +231 -0
- package/dist/assets/chunk-QZHKN3VN-BHu0RdKl.js +1 -0
- package/dist/assets/chunk-U2HBQHQK-BvtlVHAg.js +70 -0
- package/dist/assets/chunk-X2U36JSP-BI_g8mub.js +1 -0
- package/dist/assets/chunk-XPW4576I-B39JkmSE.js +32 -0
- package/dist/assets/chunk-YZCP3GAM-BfPcXRm2.js +1 -0
- package/dist/assets/chunk-ZZ45TVLE-Bg4q68wZ.js +1 -0
- package/dist/assets/classDiagram-6PBFFD2Q-p73p727_.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-C4Ftpivp.js +1 -0
- package/dist/assets/clone-CI9aUwHe.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-7BpAeDh5.js +1 -0
- package/dist/assets/cytoscape.esm-DoTFyJaN.js +321 -0
- package/dist/assets/dagre-CilMRazv.js +1 -0
- package/dist/assets/dagre-KV5264BT-DDMqpjkB.js +4 -0
- package/dist/assets/defaultLocale-Ck2Xxk-C.js +1 -0
- package/dist/assets/diagram-5BDNPKRD-BFeyfnCx.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-DoqT-PtF.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-BPV6KADk.js +43 -0
- package/dist/assets/diagram-TYMM5635-okvcTBtl.js +24 -0
- package/dist/assets/dist-C_eddq6m.js +1 -0
- package/dist/assets/erDiagram-SMLLAGMA-Dl-Ixy8n.js +85 -0
- package/dist/assets/flatten-B8XIuT0x.js +1 -0
- package/dist/assets/flowDiagram-DWJPFMVM-CsqWAx5r.js +162 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-mIt6zVeF.js +292 -0
- package/dist/assets/gitGraph-7Q5UKJZL-COXHGMvj.js +1 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-syVqZJX_.js +106 -0
- package/dist/assets/graphlib-Bpd0q3yO.js +1 -0
- package/dist/assets/index-BoggyWS0.css +2 -0
- package/dist/assets/index-aLvjHQW4.js +104 -0
- package/dist/assets/info-OMHHGYJF-B-0wfxwL.js +1 -0
- package/dist/assets/infoDiagram-42DDH7IO-C0_uqsVa.js +2 -0
- package/dist/assets/init-Bft5Ffpj.js +1 -0
- package/dist/assets/isEmpty-BrFi5AqV.js +1 -0
- package/dist/assets/ishikawaDiagram-UXIWVN3A-CTjFbDBV.js +70 -0
- package/dist/assets/journeyDiagram-VCZTEJTY-BDBcej1q.js +139 -0
- package/dist/assets/kanban-definition-6JOO6SKY-Ylgzakw7.js +89 -0
- package/dist/assets/katex-Uj9wLT16.js +265 -0
- package/dist/assets/line-CRxEwpOv.js +1 -0
- package/dist/assets/linear-PDPfFByd.js +1 -0
- package/dist/assets/mermaid-parser.core-CY-XNOOy.js +4 -0
- package/dist/assets/mermaid.core-BPlTADIX.js +11 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-TefzJnBM.js +96 -0
- package/dist/assets/ordinal-DIg8h6NI.js +1 -0
- package/dist/assets/packet-4T2RLAQJ-BW1T_A-C.js +1 -0
- package/dist/assets/path-DfRbCp9y.js +1 -0
- package/dist/assets/pie-ZZUOXDRM-DkKU-SFu.js +1 -0
- package/dist/assets/pieDiagram-DEJITSTG-BCXuaeEy.js +30 -0
- package/dist/assets/quadrantDiagram-34T5L4WZ-VSBAicWL.js +7 -0
- package/dist/assets/radar-PYXPWWZC-CYvTacKJ.js +1 -0
- package/dist/assets/reduce-CV2X8n1a.js +1 -0
- package/dist/assets/requirementDiagram-MS252O5E-4NeL9Z6J.js +84 -0
- package/dist/assets/rough.esm-Bbn_-PMU.js +1 -0
- package/dist/assets/sankeyDiagram-XADWPNL6-DMBSDnrH.js +10 -0
- package/dist/assets/sequenceDiagram-FGHM5R23-DVpzcZUi.js +157 -0
- package/dist/assets/src-PKe5NtkK.js +1 -0
- package/dist/assets/stateDiagram-FHFEXIEX-BkHTlCjL.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-nMeWu9fP.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-CyLt92nf.js +120 -0
- package/dist/assets/treeView-SZITEDCU-BUgcJ4eR.js +1 -0
- package/dist/assets/treemap-W4RFUUIX-BIWGQ4Pw.js +1 -0
- package/dist/assets/vennDiagram-DHZGUBPP-BCK0xB_m.js +34 -0
- package/dist/assets/wardley-RL74JXVD-DMZZRlby.js +1 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-BisBgfsF.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-D_REDciv.js +7 -0
- package/dist/favicon.svg +15 -0
- package/dist/index.html +14 -0
- package/dist/screenshot.png +0 -0
- package/index.html +13 -0
- package/package.json +105 -0
- package/public/favicon.svg +15 -0
- package/public/screenshot.png +0 -0
- package/server/index.test.ts +814 -0
- package/server/index.ts +736 -0
- package/server/preferences.test.ts +126 -0
- package/server/preferences.ts +76 -0
- package/src/App.tsx +1620 -0
- package/src/components/ActionButton.tsx +41 -0
- package/src/components/CommandPalette.tsx +191 -0
- package/src/components/CommentCard.tsx +556 -0
- package/src/components/CommentForm.tsx +285 -0
- package/src/components/CommentSidebar.tsx +428 -0
- package/src/components/ConfirmDialog.tsx +64 -0
- package/src/components/ContextMenu.tsx +220 -0
- package/src/components/DragHandles.tsx +48 -0
- package/src/components/FileExplorer.tsx +251 -0
- package/src/components/FileOpener.tsx +304 -0
- package/src/components/IconButton.tsx +32 -0
- package/src/components/KeyboardShortcutsPanel.tsx +136 -0
- package/src/components/MarkdownViewer.tsx +682 -0
- package/src/components/RawView.tsx +798 -0
- package/src/components/SearchBar.tsx +129 -0
- package/src/components/Separator.tsx +7 -0
- package/src/components/SettingsPanel.tsx +813 -0
- package/src/components/SplitIconButton.tsx +133 -0
- package/src/components/TabBar.tsx +594 -0
- package/src/components/TableOfContents.tsx +70 -0
- package/src/components/ThemeSelector.tsx +159 -0
- package/src/components/Toast.tsx +99 -0
- package/src/components/Toolbar.tsx +161 -0
- package/src/components/iconButtonVariants.ts +19 -0
- package/src/components/rawView.test.ts +291 -0
- package/src/contexts/SettingsContext.tsx +120 -0
- package/src/hooks/useAuthor.test.ts +58 -0
- package/src/hooks/useAuthor.ts +69 -0
- package/src/hooks/useAutoResize.ts +20 -0
- package/src/hooks/useCommentCardTriggers.ts +20 -0
- package/src/hooks/useComments.test.ts +773 -0
- package/src/hooks/useComments.ts +332 -0
- package/src/hooks/useContextMenu.ts +48 -0
- package/src/hooks/useContextMenuItems.ts +392 -0
- package/src/hooks/useDiffSnapshot.test.ts +130 -0
- package/src/hooks/useDiffSnapshot.ts +67 -0
- package/src/hooks/useDragHandles.ts +417 -0
- package/src/hooks/useFileWatcher.ts +45 -0
- package/src/hooks/useHeadingTracking.ts +84 -0
- package/src/hooks/useMermaidRenderer.ts +75 -0
- package/src/hooks/useModalState.ts +22 -0
- package/src/hooks/usePageVisible.test.ts +69 -0
- package/src/hooks/usePageVisible.ts +19 -0
- package/src/hooks/usePaneLayout.test.ts +108 -0
- package/src/hooks/usePaneLayout.ts +102 -0
- package/src/hooks/useRecentFiles.test.ts +103 -0
- package/src/hooks/useRecentFiles.ts +99 -0
- package/src/hooks/useResizablePanel.test.ts +84 -0
- package/src/hooks/useResizablePanel.ts +118 -0
- package/src/hooks/useSearch.test.ts +72 -0
- package/src/hooks/useSearch.ts +53 -0
- package/src/hooks/useSelection.ts +48 -0
- package/src/hooks/useSessionPersistence.test.ts +59 -0
- package/src/hooks/useSessionPersistence.ts +43 -0
- package/src/hooks/useTabs.test.ts +127 -0
- package/src/hooks/useTabs.ts +561 -0
- package/src/hooks/useThemePersistence.ts +41 -0
- package/src/hooks/useToast.ts +27 -0
- package/src/index.css +1047 -0
- package/src/lib/agent-prompts.test.ts +34 -0
- package/src/lib/agent-prompts.ts +68 -0
- package/src/lib/comment-editor-state.ts +6 -0
- package/src/lib/comment-parser.test.ts +1959 -0
- package/src/lib/comment-parser.ts +1021 -0
- package/src/lib/diff.test.ts +164 -0
- package/src/lib/diff.ts +139 -0
- package/src/lib/heading-slugs.test.ts +85 -0
- package/src/lib/heading-slugs.ts +44 -0
- package/src/lib/http.test.ts +43 -0
- package/src/lib/http.ts +29 -0
- package/src/lib/mermaid-highlights.test.ts +517 -0
- package/src/lib/mermaid-highlights.ts +936 -0
- package/src/lib/mermaid-renderer.test.ts +114 -0
- package/src/lib/mermaid-renderer.ts +89 -0
- package/src/lib/path-utils.test.ts +17 -0
- package/src/lib/path-utils.ts +7 -0
- package/src/lib/platform.test.ts +58 -0
- package/src/lib/platform.ts +14 -0
- package/src/lib/preferences-client.test.ts +177 -0
- package/src/lib/preferences-client.ts +94 -0
- package/src/lib/selection-resolver.test.ts +118 -0
- package/src/lib/selection-resolver.ts +37 -0
- package/src/lib/settings.test.ts +152 -0
- package/src/lib/settings.ts +78 -0
- package/src/lib/shortcut-label.tsx +18 -0
- package/src/lib/themes.ts +21 -0
- package/src/lib/visible-text.test.ts +86 -0
- package/src/lib/visible-text.ts +77 -0
- package/src/main.tsx +22 -0
- package/src/markdown/pipeline.test.ts +82 -0
- package/src/markdown/pipeline.ts +33 -0
- package/src/types.test.ts +43 -0
- package/src/types.ts +46 -0
- package/tsconfig.app.json +28 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +26 -0
- package/vite.config.ts +50 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import{g as e,h as t,p as n}from"./src-PKe5NtkK.js";import{D as r,L as i,a,b as o,c as s,s as c,tt as l,w as u,y as d}from"./chunk-ICPOFSXX-iKiUSjDK.js";import{t as f}from"./channel-DPCihw7y.js";import"./dist-C_eddq6m.js";import{H as p,c as m,h,i as g}from"./chunk-5PVQY5BW-BBHW_uCu.js";import{t as _}from"./line-CRxEwpOv.js";import{n as v}from"./chunk-U2HBQHQK-BvtlVHAg.js";import{t as y}from"./chunk-FMBD7UC4-CjsTKY4u.js";import{n as b,t as x}from"./chunk-BSJP7CBP-BmsSs1Nt.js";import{n as S,t as C}from"./chunk-ZZ45TVLE-Bg4q68wZ.js";import{t as w}from"./graphlib-Bpd0q3yO.js";import{t as T}from"./clone-CI9aUwHe.js";var E=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:t(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:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]);this.$={id:r.generateId(),type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let n=r.edgeStrToEdgeData(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,directions:a[s].directions,arrowTypeEnd:n,arrowTypeStart:`arrow_open`},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]),this.$={id:r.generateId(),type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(h,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},e(d,[2,27]),e(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},e(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.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 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.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 v(){this.yy={}}return t(v,`Parser`),v.prototype=_,_.Parser=v,new v})();E.parser=E;var D=E,O=new Map,k=[],A=new Map,j=`color`,M=`fill`,ee=`bgFill`,te=`,`,ne=o(),N=new Map,P=``,re=t(e=>c.sanitizeText(e,ne),`sanitizeText`),ie=t(function(e,t=``){let n=N.get(e);n||(n={id:e,styles:[],textStyles:[]},N.set(e,n)),t?.split(te).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(j).exec(e)){let e=t.replace(M,ee).replace(j,M);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),ae=t(function(e,t=``){let n=O.get(e);t!=null&&(n.styles=t.split(te))},`addStyle2Node`),oe=t(function(e,t){e.split(`,`).forEach(function(e){let n=O.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},O.set(t,n)}n.classes||=[],n.classes.push(t)})},`setCssClass`),se=t((t,n)=>{let r=t.flat(),i=[],a=r.find(e=>e?.type===`column-setting`)?.columns??-1;for(let t of r){if(typeof a==`number`&&a>0&&t.type!==`column-setting`&&typeof t.widthInColumns==`number`&&t.widthInColumns>a&&e.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${a}`),t.label&&=re(t.label),t.type===`classDef`){ie(t.id,t.css);continue}if(t.type===`applyClass`){oe(t.id,t?.styleClass??``);continue}if(t.type===`applyStyles`){t?.stylesStr&&ae(t.id,t?.stylesStr);continue}if(t.type===`column-setting`)n.columns=t.columns??-1;else if(t.type===`edge`){let e=(A.get(t.id)??0)+1;A.set(t.id,e),t.id=e+`-`+t.id,k.push(t)}else{t.label||(t.type===`composite`?t.label=``:t.label=t.id);let e=O.get(t.id);if(e===void 0?O.set(t.id,t):(t.type!==`na`&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&se(t.children,t),t.type===`space`){let e=t.width??1;for(let n=0;n<e;n++){let e=T(t);e.id=e.id+`-`+n,O.set(e.id,e),i.push(e)}}else e===void 0&&i.push(t)}}n.children=i},`populateBlockDatabase`),ce=[],F={id:`root`,type:`composite`,children:[],columns:-1},le=t(()=>{e.debug(`Clear called`),a(),F={id:`root`,type:`composite`,children:[],columns:-1},O=new Map([[`root`,F]]),ce=[],N=new Map,k=[],A=new Map,P=``},`clear`);function ue(t){switch(e.debug(`typeStr2Type`,t),t){case`[]`:return`square`;case`()`:return e.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`}}t(ue,`typeStr2Type`);function de(t){switch(e.debug(`typeStr2Type`,t),t){case`==`:return`thick`;default:return`normal`}}t(de,`edgeTypeStr2Type`);function fe(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,``)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}t(fe,`edgeStrToEdgeData`);var pe=0,me={getConfig:t(()=>d().block,`getConfig`),typeStr2Type:ue,edgeTypeStr2Type:de,edgeStrToEdgeData:fe,getLogger:t(()=>e,`getLogger`),getBlocksFlat:t(()=>[...O.values()],`getBlocksFlat`),getBlocks:t(()=>ce||[],`getBlocks`),getEdges:t(()=>k,`getEdges`),setHierarchy:t(e=>{F.children=e,se(e,F),ce=F.children},`setHierarchy`),getBlock:t(e=>O.get(e),`getBlock`),setBlock:t(e=>{O.set(e.id,e)},`setBlock`),getColumns:t(e=>{let t=O.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:t(function(){return N},`getClasses`),clear:le,generateId:t(()=>(pe++,`id-`+Math.random().toString(36).substr(2,12)+`-`+pe),`generateId`),setDiagramId:t(e=>{P=e},`setDiagramId`),getDiagramId:t(()=>P,`getDiagramId`)},he=t((e,t)=>{let n=f;return l(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),ge=t(e=>`.label {
|
|
7
|
+
font-family: ${e.fontFamily};
|
|
8
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
9
|
+
}
|
|
10
|
+
.cluster-label text {
|
|
11
|
+
fill: ${e.titleColor};
|
|
12
|
+
}
|
|
13
|
+
.cluster-label span,p {
|
|
14
|
+
color: ${e.titleColor};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
.label text,span,p {
|
|
20
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
21
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.node rect,
|
|
25
|
+
.node circle,
|
|
26
|
+
.node ellipse,
|
|
27
|
+
.node polygon,
|
|
28
|
+
.node path {
|
|
29
|
+
fill: ${e.mainBkg};
|
|
30
|
+
stroke: ${e.nodeBorder};
|
|
31
|
+
stroke-width: 1px;
|
|
32
|
+
}
|
|
33
|
+
.flowchart-label text {
|
|
34
|
+
text-anchor: middle;
|
|
35
|
+
}
|
|
36
|
+
// .flowchart-label .text-outer-tspan {
|
|
37
|
+
// text-anchor: middle;
|
|
38
|
+
// }
|
|
39
|
+
// .flowchart-label .text-inner-tspan {
|
|
40
|
+
// text-anchor: start;
|
|
41
|
+
// }
|
|
42
|
+
|
|
43
|
+
.node .label {
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
.node.clickable {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.arrowheadPath {
|
|
51
|
+
fill: ${e.arrowheadColor};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.edgePath .path {
|
|
55
|
+
stroke: ${e.lineColor};
|
|
56
|
+
stroke-width: 2.0px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.flowchart-link {
|
|
60
|
+
stroke: ${e.lineColor};
|
|
61
|
+
fill: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.edgeLabel {
|
|
65
|
+
background-color: ${e.edgeLabelBackground};
|
|
66
|
+
/*
|
|
67
|
+
* This is for backward compatibility with existing code that didn't
|
|
68
|
+
* add a \`<p>\` around edge labels.
|
|
69
|
+
*
|
|
70
|
+
* TODO: We should probably remove this in a future release.
|
|
71
|
+
*/
|
|
72
|
+
p {
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 0;
|
|
75
|
+
display: inline;
|
|
76
|
+
}
|
|
77
|
+
rect {
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
background-color: ${e.edgeLabelBackground};
|
|
80
|
+
fill: ${e.edgeLabelBackground};
|
|
81
|
+
}
|
|
82
|
+
text-align: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* For html labels only */
|
|
86
|
+
.labelBkg {
|
|
87
|
+
background-color: ${e.edgeLabelBackground};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.node .cluster {
|
|
91
|
+
// fill: ${he(e.mainBkg,.5)};
|
|
92
|
+
fill: ${he(e.clusterBkg,.5)};
|
|
93
|
+
stroke: ${he(e.clusterBorder,.2)};
|
|
94
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
95
|
+
stroke-width: 1px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.cluster text {
|
|
99
|
+
fill: ${e.titleColor};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.cluster span,p {
|
|
103
|
+
color: ${e.titleColor};
|
|
104
|
+
}
|
|
105
|
+
/* .cluster div {
|
|
106
|
+
color: ${e.titleColor};
|
|
107
|
+
} */
|
|
108
|
+
|
|
109
|
+
div.mermaidTooltip {
|
|
110
|
+
position: absolute;
|
|
111
|
+
text-align: center;
|
|
112
|
+
max-width: 200px;
|
|
113
|
+
padding: 2px;
|
|
114
|
+
font-family: ${e.fontFamily};
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
background: ${e.tertiaryColor};
|
|
117
|
+
border: 1px solid ${e.border2};
|
|
118
|
+
border-radius: 2px;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
z-index: 100;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.flowchartTitleText {
|
|
124
|
+
text-anchor: middle;
|
|
125
|
+
font-size: 18px;
|
|
126
|
+
fill: ${e.textColor};
|
|
127
|
+
}
|
|
128
|
+
${y()}
|
|
129
|
+
`,`getStyles`),_e=t((e,t,n,r)=>{t.forEach(t=>{ve[t](e,n,r)})},`insertMarkers`),ve={extension:t((t,n,r)=>{e.trace(`Making markers for `,r),t.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).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+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).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:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).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:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).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:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).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:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).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),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).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:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).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:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).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:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).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:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-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`)},ye=_e,I=o()?.block?.padding??8;function L(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}t(L,`calculateBlockPosition`);var be=t(t=>{let n=0,r=0;for(let i of t.children){let{width:t,height:a,x:o,y:s}=i.size??{width:0,height:0,x:0,y:0};e.debug(`getMaxChildSize abc95 child:`,i.id,`width:`,t,`height:`,a,`x:`,o,`y:`,s,i.type),i.type!==`space`&&(t>n&&(n=t/(i.widthInColumns??1)),a>r&&(r=a))}return{width:n,height:r}},`getMaxChildSize`);function R(t,n,r=0,i=0){e.debug(`setBlockSizes abc95 (start)`,t.id,t?.size?.x,`block width =`,t?.size,`siblingWidth`,r),t?.size?.width||(t.size={width:r,height:i,x:0,y:0});let a=0,o=0;if(t.children?.length>0){for(let e of t.children)R(e,n);let s=be(t);a=s.width,o=s.height,e.debug(`setBlockSizes abc95 maxWidth of`,t.id,`:s children is `,a,o);for(let n of t.children)n.size&&(e.debug(`abc95 Setting size of children of ${t.id} id=${n.id} ${a} ${o} ${JSON.stringify(n.size)}`),n.size.width=a*(n.widthInColumns??1)+I*((n.widthInColumns??1)-1),n.size.height=o,n.size.x=0,n.size.y=0,e.debug(`abc95 updating size of ${t.id} children child:${n.id} maxWidth:${a} maxHeight:${o}`));for(let e of t.children)R(e,n,a,o);let c=t.columns??-1,l=0;for(let e of t.children)l+=e.widthInColumns??1;let u=t.children.length;c>0&&c<l&&(u=c);let d=Math.ceil(l/u),f=u*(a+I)+I,p=d*(o+I)+I;if(f<r){e.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${i} width ${f}`),f=r,p=i;let n=(r-u*I-I)/u,s=(i-d*I-I)/d;e.debug(`Size indata abc88`,t.id,`childWidth`,n,`maxWidth`,a),e.debug(`Size indata abc88`,t.id,`childHeight`,s,`maxHeight`,o),e.debug(`Size indata abc88 xSize`,u,`padding`,I);for(let e of t.children)e.size&&(e.size.width=n,e.size.height=s,e.size.x=0,e.size.y=0)}if(e.debug(`abc95 (finale calc) ${t.id} xSize ${u} ySize ${d} columns ${c}${t.children.length} width=${Math.max(f,t.size?.width||0)}`),f<(t?.size?.width||0)){f=t?.size?.width||0;let n=c>0?Math.min(t.children.length,c):t.children.length;if(n>0){let r=(f-n*I-I)/n;e.debug(`abc95 (growing to fit) width`,t.id,f,t.size?.width,r);for(let e of t.children)e.size&&(e.size.width=r)}}t.size={width:f,height:p,x:0,y:0}}e.debug(`setBlockSizes abc94 (done)`,t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}t(R,`setBlockSizes`);function z(t,n){e.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(e.debug(`layoutBlocks columns abc95`,t.id,`=>`,r,t),t.children&&t.children.length>0){let i=t?.children[0]?.size?.width??0,a=t.children.length*i+(t.children.length-1)*I;e.debug(`widthOfChildren 88`,a,`posX`);let o=new Map;{let e=0;for(let n of t.children){if(!n.size)continue;let{py:t}=L(r,e),i=o.get(t)??0;n.size.height>i&&o.set(t,n.size.height);let a=n?.widthInColumns??1;r>0&&(a=Math.min(a,r-e%r)),e+=a}}let s=new Map;{let e=0,t=[...o.keys()].sort((e,t)=>e-t);for(let n of t)s.set(n,e),e+=(o.get(n)??0)+I}let c=0;e.debug(`abc91 block?.size?.x`,t.id,t?.size?.x);let l=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-I,u=0;for(let i of t.children){let a=t;if(!i.size)continue;let{width:d,height:f}=i.size,{px:p,py:m}=L(r,c);if(m!=u&&(u=m,l=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-I,e.debug(`New row in layout for block`,t.id,` and child `,i.id,u)),e.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${c} (px, py) ${p},${m} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${d}${I}`),a.size){let t=d/2;i.size.x=l+I+t,e.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${l} new startingPosX${i.size.x} ${t} padding=${I} width=${d} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${d*(i?.widthInColumns??1)/2}`),l=i.size.x+t;let n=s.get(m)??0,r=o.get(m)??f;i.size.y=a.size.y-a.size.height/2+n+r/2+I,e.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${l}${I}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${d*(i?.widthInColumns??1)/2}`)}i.children&&z(i,n);let h=i?.widthInColumns??1;r>0&&(h=Math.min(h,r-c%r)),c+=h,e.debug(`abc88 columnsPos`,i,c)}}e.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}t(z,`layoutBlocks`);function B(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2<t&&(t=a-s/2),o-c/2<n&&(n=o-c/2),a+s/2>r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=B(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}t(B,`findBounds`);function xe(t){let n=t.getBlock(`root`);if(!n)return;R(n,t,0,0),z(n,t),e.debug(`getBlocks`,JSON.stringify(n,null,2));let{minX:r,minY:i,maxX:a,maxY:o}=B(n),s=o-i;return{x:r,y:i,width:a-r,height:s}}t(xe,`layout`);var V=t(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=o(),c=u(s);return await v(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),Se=t((e,t,n,r,i)=>{t.arrowTypeStart&&we(e,`start`,t.arrowTypeStart,n,r,i),t.arrowTypeEnd&&we(e,`end`,t.arrowTypeEnd,n,r,i)},`addEdgeMarkers`),Ce={arrow_cross:`cross`,arrow_point:`point`,arrow_barb:`barb`,arrow_circle:`circle`,aggregation:`aggregation`,extension:`extension`,composition:`composition`,dependency:`dependency`,lollipop:`lollipop`},we=t((t,n,r,i,a,o)=>{let s=Ce[r];if(!s){e.warn(`Unknown arrow type: ${r}`);return}let c=n===`start`?`Start`:`End`;t.attr(`marker-${n}`,`url(${i}#${a}_${o}-${s}${c})`)},`addEdgeMarker`),H={},U={},Te=t(async(e,t)=>{let r=o(),i=u(r),a=e.insert(`g`).attr(`class`,`edgeLabel`),s=a.insert(`g`).attr(`class`,`label`),c=t.labelType===`markdown`,l=await v(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:c,isNode:!1,markdown:c,width:c?void 0:1/0},r);s.node().appendChild(l);let d=l.getBBox(),f=d;if(i){let e=l.children[0],t=n(l);d=e.getBoundingClientRect(),f=d,t.attr(`width`,d.width),t.attr(`height`,d.height)}else{let e=n(l).select(`text`).node();e&&typeof e.getBBox==`function`&&(f=e.getBBox())}s.attr(`transform`,x(f,i)),H[t.id]=a,t.width=d.width,t.height=d.height;let p;if(t.startLabelLeft){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),a=r.insert(`g`).attr(`class`,`inner`),o=await V(a,t.startLabelLeft,t.labelStyle);p=o;let s=o.getBBox();if(i){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}a.attr(`transform`,x(s,i)),U[t.id]||(U[t.id]={}),U[t.id].startLeft=r,W(p,t.startLabelLeft)}if(t.startLabelRight){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),a=r.insert(`g`).attr(`class`,`inner`),o=await V(r,t.startLabelRight,t.labelStyle);p=o,a.node().appendChild(o);let s=o.getBBox();if(i){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}a.attr(`transform`,x(s,i)),U[t.id]||(U[t.id]={}),U[t.id].startRight=r,W(p,t.startLabelRight)}if(t.endLabelLeft){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),a=r.insert(`g`).attr(`class`,`inner`),o=await V(a,t.endLabelLeft,t.labelStyle);p=o;let s=o.getBBox();if(i){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}a.attr(`transform`,x(s,i)),r.node().appendChild(o),U[t.id]||(U[t.id]={}),U[t.id].endLeft=r,W(p,t.endLabelLeft)}if(t.endLabelRight){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),a=r.insert(`g`).attr(`class`,`inner`),o=await V(a,t.endLabelRight,t.labelStyle);p=o;let s=o.getBBox();if(i){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}a.attr(`transform`,x(s,i)),r.node().appendChild(o),U[t.id]||(U[t.id]={}),U[t.id].endRight=r,W(p,t.endLabelRight)}return l},`insertEdgeLabel`);function W(e,t){u(o())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}t(W,`setTerminalWidth`);var Ee=t((t,n)=>{e.debug(`Moving label abc88 `,t.id,t.label,H[t.id],n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=S(o());if(t.label){let a=H[t.id],o=t.x,s=t.y;if(r){let i=h.calcLabelPosition(r);e.debug(`Moving label `+t.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(t.startLabelLeft){let e=U[t.id].startLeft,n=t.x,i=t.y;if(r){let e=h.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_left`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.startLabelRight){let e=U[t.id].startRight,n=t.x,i=t.y;if(r){let e=h.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_right`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.endLabelLeft){let e=U[t.id].endLeft,n=t.x,i=t.y;if(r){let e=h.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_left`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.endLabelRight){let e=U[t.id].endRight,n=t.x,i=t.y;if(r){let e=h.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_right`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),De=t((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),Oe=t((t,n,r)=>{e.debug(`intersection calc abc89:
|
|
130
|
+
outsidePoint: ${JSON.stringify(n)}
|
|
131
|
+
insidePoint : ${JSON.stringify(r)}
|
|
132
|
+
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let i=t.x,a=t.y,o=Math.abs(i-r.x),s=t.width/2,c=r.x<n.x?s-o:s+o,l=t.height/2,u=Math.abs(n.y-r.y),d=Math.abs(n.x-r.x);if(Math.abs(a-n.y)*s>Math.abs(i-n.x)*l){let t=r.y<n.y?n.y-l-a:a-l-n.y;c=d*t/u;let i={x:r.x<n.x?r.x+c:r.x-d+c,y:r.y<n.y?r.y+u-t:r.y-u+t};return c===0&&(i.x=n.x,i.y=n.y),d===0&&(i.x=n.x),u===0&&(i.y=n.y),e.debug(`abc89 topp/bott calc, Q ${u}, q ${t}, R ${d}, r ${c}`,i),i}else{c=r.x<n.x?n.x-s-i:i-s-n.x;let t=u*c/d,a=r.x<n.x?r.x+d-c:r.x-d+c,o=r.y<n.y?r.y+t:r.y-t;return e.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`,{_x:a,_y:o}),c===0&&(a=n.x,o=n.y),d===0&&(a=n.x),u===0&&(o=n.y),{x:a,y:o}}},`intersection`),ke=t((t,n)=>{e.debug(`abc88 cutPathAtIntersect`,t,n);let r=[],i=t[0],a=!1;return t.forEach(e=>{if(!De(n,e)&&!a){let t=Oe(n,i,e),o=!1;r.forEach(e=>{o||=e.x===t.x&&e.y===t.y}),r.some(e=>e.x===t.x&&e.y===t.y)||r.push(t),a=!0}else i=e,a||r.push(e)}),r},`cutPathAtIntersect`),Ae=t(function(t,n,i,a,s,c,l){let u=i.points;e.debug(`abc88 InsertEdge: edge=`,i,`e=`,n);let d=!1,f=c.node(n.v);var m=c.node(n.w);m?.intersect&&f?.intersect&&(u=u.slice(1,i.points.length-1),u.unshift(f.intersect(u[0])),u.push(m.intersect(u[u.length-1]))),i.toCluster&&(e.debug(`to cluster abc88`,a[i.toCluster]),u=ke(i.points,a[i.toCluster].node),d=!0),i.fromCluster&&(e.debug(`from cluster abc88`,a[i.fromCluster]),u=ke(u.reverse(),a[i.fromCluster].node).reverse(),d=!0);let h=u.filter(e=>!Number.isNaN(e.y)),g=p;i.curve&&(s===`graph`||s===`flowchart`)&&(g=i.curve);let{x:v,y}=b(i),x=_().x(v).y(y).curve(g),S;switch(i.thickness){case`normal`:S=`edge-thickness-normal`;break;case`thick`:S=`edge-thickness-thick`;break;case`invisible`:S=`edge-thickness-thick`;break;default:S=``}switch(i.pattern){case`solid`:S+=` edge-pattern-solid`;break;case`dotted`:S+=` edge-pattern-dotted`;break;case`dashed`:S+=` edge-pattern-dashed`;break}let C=t.append(`path`).attr(`d`,x(h)).attr(`id`,i.id).attr(`class`,` `+S+(i.classes?` `+i.classes:``)).attr(`style`,i.style),w=``;(o().flowchart.arrowMarkerAbsolute||o().state.arrowMarkerAbsolute)&&(w=r(!0)),Se(C,i,w,l,s);let T={};return d&&(T.updatedPath=u),T.originalPath=i.points,T},`insertEdge`),je=t(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),Me=t((e,t,n)=>{let r=je(e),i=t.height+2*n.padding,a=i/2,o=t.width+2*a+n.padding,s=n.padding/2;return r.has(`right`)&&r.has(`left`)&&r.has(`up`)&&r.has(`down`)?[{x:0,y:0},{x:a,y:0},{x:o/2,y:2*s},{x:o-a,y:0},{x:o,y:0},{x:o,y:-i/3},{x:o+2*s,y:-i/2},{x:o,y:-2*i/3},{x:o,y:-i},{x:o-a,y:-i},{x:o/2,y:-i-2*s},{x:a,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*s,y:-i/2},{x:0,y:-i/3}]:r.has(`right`)&&r.has(`left`)&&r.has(`up`)?[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}]:r.has(`right`)&&r.has(`left`)&&r.has(`down`)?[{x:0,y:0},{x:a,y:-i},{x:o-a,y:-i},{x:o,y:0}]:r.has(`right`)&&r.has(`up`)&&r.has(`down`)?[{x:0,y:0},{x:o,y:-a},{x:o,y:-i+a},{x:0,y:-i}]:r.has(`left`)&&r.has(`up`)&&r.has(`down`)?[{x:o,y:0},{x:0,y:-a},{x:0,y:-i+a},{x:o,y:-i}]:r.has(`right`)&&r.has(`left`)?[{x:a,y:0},{x:a,y:-s},{x:o-a,y:-s},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:o-a,y:-i+s},{x:a,y:-i+s},{x:a,y:-i},{x:0,y:-i/2}]:r.has(`up`)&&r.has(`down`)?[{x:o/2,y:0},{x:0,y:-s},{x:a,y:-s},{x:a,y:-i+s},{x:0,y:-i+s},{x:o/2,y:-i},{x:o,y:-i+s},{x:o-a,y:-i+s},{x:o-a,y:-s},{x:o,y:-s}]:r.has(`right`)&&r.has(`up`)?[{x:0,y:0},{x:o,y:-a},{x:0,y:-i}]:r.has(`right`)&&r.has(`down`)?[{x:0,y:0},{x:o,y:0},{x:0,y:-i}]:r.has(`left`)&&r.has(`up`)?[{x:o,y:0},{x:0,y:-a},{x:o,y:-i}]:r.has(`left`)&&r.has(`down`)?[{x:o,y:0},{x:0,y:0},{x:o,y:-i}]:r.has(`right`)?[{x:a,y:-s},{x:a,y:-s},{x:o-a,y:-s},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:o-a,y:-i+s},{x:a,y:-i+s},{x:a,y:-i+s}]:r.has(`left`)?[{x:a,y:0},{x:a,y:-s},{x:o-a,y:-s},{x:o-a,y:-i+s},{x:a,y:-i+s},{x:a,y:-i},{x:0,y:-i/2}]:r.has(`up`)?[{x:a,y:-s},{x:a,y:-i+s},{x:0,y:-i+s},{x:o/2,y:-i},{x:o,y:-i+s},{x:o-a,y:-i+s},{x:o-a,y:-s}]:r.has(`down`)?[{x:o/2,y:0},{x:0,y:-s},{x:a,y:-s},{x:a,y:-i+s},{x:o-a,y:-i+s},{x:o-a,y:-s},{x:o,y:-s}]:[{x:0,y:0}]},`getArrowPoints`);function Ne(e,t){return e.intersect(t)}t(Ne,`intersectNode`);var Pe=Ne;function Fe(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}t(Fe,`intersectEllipse`);var Ie=Fe;function Le(e,t,n){return Ie(e,t,t,n)}t(Le,`intersectCircle`);var Re=Le;function ze(e,t,n,r){var i=t.y-e.y,a,o=e.x-t.x,s,c=t.x*e.y-e.x*t.y,l,u,d,f=i*n.x+o*n.y+c,p=i*r.x+o*r.y+c,m,h,g,_,v;if(!(f!==0&&p!==0&&G(f,p))&&(a=r.y-n.y,s=n.x-r.x,l=r.x*n.y-n.x*r.y,u=a*e.x+s*e.y+l,d=a*t.x+s*t.y+l,!(u!==0&&d!==0&&G(u,d))&&(m=i*s-a*o,m!==0)))return h=Math.abs(m/2),g=o*l-s*c,_=g<0?(g-h)/m:(g+h)/m,g=a*c-i*l,v=g<0?(g-h)/m:(g+h)/m,{x:_,y:v}}t(ze,`intersectLine`);function G(e,t){return e*t>0}t(G,`sameSign`);var Be=ze,Ve=He;function He(e,t,n){var r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));for(var c=r-e.width/2-o,l=i-e.height/2-s,u=0;u<t.length;u++){var d=t[u],f=t[u<t.length-1?u+1:0],p=Be(e,n,{x:c+d.x,y:l+d.y},{x:c+f.x,y:l+f.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(e,t){var r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}t(He,`intersectPolygon`);var K={node:Pe,circle:Re,ellipse:Ie,polygon:Ve,rect:t((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`)},q=t(async(e,t,r,a)=>{let s=o(),c,l=t.useHtmlLabels||u(s);c=r||`node default`;let d=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId||t.id),f=d.insert(`g`).attr(`class`,`label`).attr(`style`,t.labelStyle),p;p=t.labelText===void 0?``:typeof t.labelText==`string`?t.labelText:t.labelText[0];let m;m=t.labelType===`markdown`?v(f,i(g(p),s),{useHtmlLabels:l,width:t.width||s.flowchart.wrappingWidth,classes:`markdown-node-label`},s):await V(f,i(g(p),s),t.labelStyle,!1,a);let h=m.getBBox(),_=t.padding/2;if(u(s)){let e=m.children[0],t=n(m);await C(e,p),h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}return l?f.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):f.attr(`transform`,`translate(0, `+-h.height/2+`)`),t.centerLabel&&f.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),f.insert(`rect`,`:first-child`),{shapeSvg:d,bbox:h,halfPadding:_,label:f}},`labelHelper`),J=t((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`);function Y(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}t(Y,`insertPolygonShape`);var Ue=t(async(t,n)=>{n.useHtmlLabels||u(o())||(n.centerLabel=!0);let{shapeSvg:r,bbox:i,halfPadding:a}=await q(t,n,`node `+n.classes,!0);e.info(`Classes = `,n.classes);let s=r.insert(`rect`,`:first-child`);return s.attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,-i.width/2-a).attr(`y`,-i.height/2-a).attr(`width`,i.width+n.padding).attr(`height`,i.height+n.padding),J(n,s),n.intersect=function(e){return K.rect(n,e)},r},`note`),We=t(e=>e?` `+e:``,`formatClass`),X=t((e,t)=>`${t||`node default`}${We(e.classes)} ${We(e.class)}`,`getClassesFromNode`),Ge=t(async(t,n)=>{let{shapeSvg:r,bbox:i}=await q(t,n,X(n,void 0),!0),a=i.width+n.padding+(i.height+n.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];e.info(`Question main (Circle)`);let s=Y(r,a,a,o);return s.attr(`style`,n.style),J(n,s),n.intersect=function(t){return e.warn(`Intersect called`),K.polygon(n,o,t)},r},`question`),Ke=t((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id);return n.insert(`polygon`,`:first-child`).attr(`points`,[{x:0,y:28/2},{x:28/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}].map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`state-start`).attr(`r`,7).attr(`width`,28).attr(`height`,28),t.width=28,t.height=28,t.intersect=function(e){return K.circle(t,14,e)},n},`choice`),qe=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.height+t.padding,a=i/4,o=r.width+2*a+t.padding,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],c=Y(n,o,i,s);return c.attr(`style`,t.style),J(t,c),t.intersect=function(e){return K.polygon(t,s,e)},n},`hexagon`),Je=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,void 0,!0),i=r.height+2*t.padding,a=i/2,o=r.width+2*a+t.padding,s=Me(t.directions,r,t),c=Y(n,o,i,s);return c.attr(`style`,t.style),J(t,c),t.intersect=function(e){return K.polygon(t,s,e)},n},`block_arrow`),Ye=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Y(n,i,a,o).attr(`style`,t.style),t.width=i+a,t.height=a,t.intersect=function(e){return K.polygon(t,o,e)},n},`rect_left_inv_arrow`),Xe=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`lean_right`),Ze=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`lean_left`),Qe=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`trapezoid`),$e=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`inv_trapezoid`),et=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`rect_right_inv_arrow`),tt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=i/2,o=a/(2.5+i/50),s=r.height+o+t.padding,c=`M 0,`+o+` a `+a+`,`+o+` 0,0,0 `+i+` 0 a `+a+`,`+o+` 0,0,0 `+-i+` 0 l 0,`+s+` a `+a+`,`+o+` 0,0,0 `+i+` 0 l 0,`+-s;return J(t,n.attr(`label-offset-y`,o).insert(`path`,`:first-child`).attr(`style`,t.style).attr(`d`,c).attr(`transform`,`translate(`+-i/2+`,`+-(s/2+o)+`)`)),t.intersect=function(e){let n=K.rect(t,e),r=n.x-t.x;if(a!=0&&(Math.abs(r)<t.width/2||Math.abs(r)==t.width/2&&Math.abs(n.y-t.y)>t.height/2-o)){let i=o*o*(1-r*r/(a*a));i!=0&&(i=Math.sqrt(i)),i=o-i,e.y-t.y>0&&(i=-i),n.y+=i}return n},n},`cylinder`),nt=t(async(t,n)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(t,n,`node `+n.classes+` `+n.class,!0),o=r.insert(`rect`,`:first-child`),s=n.positioned?n.width:i.width+n.padding,c=n.positioned?n.height:i.height+n.padding,l=n.positioned?-s/2:-i.width/2-a,u=n.positioned?-c/2:-i.height/2-a;if(o.attr(`class`,`basic label-container`).attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),n.props){let t=new Set(Object.keys(n.props));n.props.borders&&(Z(o,n.props.borders,s,c),t.delete(`borders`)),t.forEach(t=>{e.warn(`Unknown node property ${t}`)})}return J(n,o),n.intersect=function(e){return K.rect(n,e)},r},`rect`),rt=t(async(t,n)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(t,n,`node `+n.classes,!0),o=r.insert(`rect`,`:first-child`),s=n.positioned?n.width:i.width+n.padding,c=n.positioned?n.height:i.height+n.padding,l=n.positioned?-s/2:-i.width/2-a,u=n.positioned?-c/2:-i.height/2-a;if(o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),n.props){let t=new Set(Object.keys(n.props));n.props.borders&&(Z(o,n.props.borders,s,c),t.delete(`borders`)),t.forEach(t=>{e.warn(`Unknown node property ${t}`)})}return J(n,o),n.intersect=function(e){return K.rect(n,e)},r},`composite`),it=t(async(t,n)=>{let{shapeSvg:r}=await q(t,n,`label`,!0);e.trace(`Classes = `,n.class);let i=r.insert(`rect`,`:first-child`);if(i.attr(`width`,0).attr(`height`,0),r.attr(`class`,`label edgeLabel`),n.props){let t=new Set(Object.keys(n.props));n.props.borders&&(Z(i,n.props.borders,0,0),t.delete(`borders`)),t.forEach(t=>{e.warn(`Unknown node property ${t}`)})}return J(n,i),n.intersect=function(e){return K.rect(n,e)},r},`labelRect`);function Z(n,r,i,a){let o=[],s=t(e=>{o.push(e,0)},`addBorder`),c=t(e=>{o.push(0,e)},`skipBorder`);r.includes(`t`)?(e.debug(`add top border`),s(i)):c(i),r.includes(`r`)?(e.debug(`add right border`),s(a)):c(a),r.includes(`b`)?(e.debug(`add bottom border`),s(i)):c(i),r.includes(`l`)?(e.debug(`add left border`),s(a)):c(a),n.attr(`stroke-dasharray`,o.join(` `))}t(Z,`applyNodePropertyBorders`);var at=t(async(t,r)=>{let i;i=r.classes?`node `+r.classes:`node default`;let a=t.insert(`g`).attr(`class`,i).attr(`id`,r.domId||r.id),s=a.insert(`rect`,`:first-child`),c=a.insert(`line`),l=a.insert(`g`).attr(`class`,`label`),d=r.labelText.flat?r.labelText.flat():r.labelText,f=``;f=typeof d==`object`?d[0]:d,e.info(`Label text abc79`,f,d,typeof d==`object`);let p=await V(l,f,r.labelStyle,!0,!0),m={width:0,height:0};if(u(o())){let e=p.children[0],t=n(p);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}e.info(`Text 2`,d);let h=d.slice(1,d.length),g=p.getBBox(),_=await V(l,h.join?h.join(`<br/>`):h,r.labelStyle,!0,!0);if(u(o())){let e=_.children[0],t=n(_);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}let v=r.padding/2;return n(_).attr(`transform`,`translate( `+(m.width>g.width?0:(g.width-m.width)/2)+`, `+(g.height+v+5)+`)`),n(p).attr(`transform`,`translate( `+(m.width<g.width?0:-(g.width-m.width)/2)+`, 0)`),m=l.node().getBBox(),l.attr(`transform`,`translate(`+-m.width/2+`, `+(-m.height/2-v+3)+`)`),s.attr(`class`,`outer title-state`).attr(`x`,-m.width/2-v).attr(`y`,-m.height/2-v).attr(`width`,m.width+r.padding).attr(`height`,m.height+r.padding),c.attr(`class`,`divider`).attr(`x1`,-m.width/2-v).attr(`x2`,m.width/2+v).attr(`y1`,-m.height/2-v+g.height+v).attr(`y2`,-m.height/2-v+g.height+v),J(r,s),r.intersect=function(e){return K.rect(r,e)},a},`rectWithTitle`),ot=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.height+t.padding,a=r.width+i/4+t.padding;return J(t,n.insert(`rect`,`:first-child`).attr(`style`,t.style).attr(`rx`,i/2).attr(`ry`,i/2).attr(`x`,-a/2).attr(`y`,-i/2).attr(`width`,a).attr(`height`,i)),t.intersect=function(e){return K.rect(t,e)},n},`stadium`),st=t(async(t,n)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(t,n,X(n,void 0),!0),o=r.insert(`circle`,`:first-child`);return o.attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`r`,i.width/2+a).attr(`width`,i.width+n.padding).attr(`height`,i.height+n.padding),e.info(`Circle main`),J(n,o),n.intersect=function(t){return e.info(`Circle intersect`,n,i.width/2+a,t),K.circle(n,i.width/2+a,t)},r},`circle`),ct=t(async(t,n)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(t,n,X(n,void 0),!0),o=r.insert(`g`,`:first-child`),s=o.insert(`circle`),c=o.insert(`circle`);return o.attr(`class`,n.class),s.attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`r`,i.width/2+a+5).attr(`width`,i.width+n.padding+10).attr(`height`,i.height+n.padding+10),c.attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`r`,i.width/2+a).attr(`width`,i.width+n.padding).attr(`height`,i.height+n.padding),e.info(`DoubleCircle main`),J(n,s),n.intersect=function(t){return e.info(`DoubleCircle intersect`,n,i.width/2+a+5,t),K.circle(n,i.width/2+a+5,t)},r},`doublecircle`),lt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`subroutine`),ut=t((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`);return r.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),J(t,r),t.intersect=function(e){return K.circle(t,7,e)},n},`start`),dt=t((e,t,n)=>{let r=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),i=70,a=10;return n===`LR`&&(i=10,a=70),J(t,r.append(`rect`).attr(`x`,-1*i/2).attr(`y`,-1*a/2).attr(`width`,i).attr(`height`,a).attr(`class`,`fork-join`)),t.height+=t.padding/2,t.width+=t.padding/2,t.intersect=function(e){return K.rect(t,e)},r},`forkJoin`),ft={rhombus:Ge,composite:rt,question:Ge,rect:nt,labelRect:it,rectWithTitle:at,choice:Ke,circle:st,doublecircle:ct,stadium:ot,hexagon:qe,block_arrow:Je,rect_left_inv_arrow:Ye,lean_right:Xe,lean_left:Ze,trapezoid:Qe,inv_trapezoid:$e,rect_right_inv_arrow:et,cylinder:tt,start:ut,end:t((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`),i=n.insert(`circle`,`:first-child`);return i.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),r.attr(`class`,`state-end`).attr(`r`,5).attr(`width`,10).attr(`height`,10),J(t,i),t.intersect=function(e){return K.circle(t,7,e)},n},`end`),note:Ue,subroutine:lt,fork:dt,join:dt,class_box:t(async(e,t)=>{let r=t.padding/2,i;i=t.classes?`node `+t.classes:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=a.insert(`rect`,`:first-child`),c=a.insert(`line`),l=a.insert(`line`),d=0,f=4,p=a.insert(`g`).attr(`class`,`label`),m=0,h=t.classData.annotations?.[0],g=await V(p,t.classData.annotations[0]?`«`+t.classData.annotations[0]+`»`:``,t.labelStyle,!0,!0),_=g.getBBox();if(u(o())){let e=g.children[0],t=n(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}t.classData.annotations[0]&&(f+=_.height+4,d+=_.width);let v=t.classData.label;t.classData.type!==void 0&&t.classData.type!==``&&(u(o())?v+=`<`+t.classData.type+`>`:v+=`<`+t.classData.type+`>`);let y=await V(p,v,t.labelStyle,!0,!0);n(y).attr(`class`,`classTitle`);let b=y.getBBox();if(u(o())){let e=y.children[0],t=n(y);b=e.getBoundingClientRect(),t.attr(`width`,b.width),t.attr(`height`,b.height)}f+=b.height+4,b.width>d&&(d=b.width);let x=[];t.classData.members.forEach(async e=>{let r=e.getDisplayDetails(),i=r.displayText;u(o())&&(i=i.replace(/</g,`<`).replace(/>/g,`>`));let a=await V(p,i,r.cssStyle?r.cssStyle:t.labelStyle,!0,!0),s=a.getBBox();if(u(o())){let e=a.children[0],t=n(a);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}s.width>d&&(d=s.width),f+=s.height+4,x.push(a)}),f+=8;let S=[];if(t.classData.methods.forEach(async e=>{let r=e.getDisplayDetails(),i=r.displayText;u(o())&&(i=i.replace(/</g,`<`).replace(/>/g,`>`));let a=await V(p,i,r.cssStyle?r.cssStyle:t.labelStyle,!0,!0),s=a.getBBox();if(u(o())){let e=a.children[0],t=n(a);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}s.width>d&&(d=s.width),f+=s.height+4,S.push(a)}),f+=8,h){let e=(d-_.width)/2;n(g).attr(`transform`,`translate( `+(-1*d/2+e)+`, `+-1*f/2+`)`),m=_.height+4}let C=(d-b.width)/2;return n(y).attr(`transform`,`translate( `+(-1*d/2+C)+`, `+(-1*f/2+m)+`)`),m+=b.height+4,c.attr(`class`,`divider`).attr(`x1`,-d/2-r).attr(`x2`,d/2+r).attr(`y1`,-f/2-r+8+m).attr(`y2`,-f/2-r+8+m),m+=8,x.forEach(e=>{n(e).attr(`transform`,`translate( `+-d/2+`, `+(-1*f/2+m+8/2)+`)`);let t=e?.getBBox();m+=(t?.height??0)+4}),m+=8,l.attr(`class`,`divider`).attr(`x1`,-d/2-r).attr(`x2`,d/2+r).attr(`y1`,-f/2-r+8+m).attr(`y2`,-f/2-r+8+m),m+=8,S.forEach(e=>{n(e).attr(`transform`,`translate( `+-d/2+`, `+(-1*f/2+m)+`)`);let t=e?.getBBox();m+=(t?.height??0)+4}),s.attr(`style`,t.style).attr(`class`,`outer title-state`).attr(`x`,-d/2-r).attr(`y`,-(f/2)-r).attr(`width`,d+t.padding).attr(`height`,f+t.padding),J(t,s),t.intersect=function(e){return K.rect(t,e)},a},`class_box`)},Q={},pt=t(async(e,t,n)=>{let r,i;if(t.link){let a;o().securityLevel===`sandbox`?a=`_top`:t.linkTarget&&(a=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,a),i=await ft[t.shape](r,t,n)}else i=await ft[t.shape](e,t,n),r=i;return t.tooltip&&i.attr(`title`,t.tooltip),t.class&&i.attr(`class`,`node default `+t.class),Q[t.id]=r,t.haveCallback&&Q[t.id].attr(`class`,Q[t.id].attr(`class`)+` clickable`),r},`insertNode`),mt=t(t=>{let n=Q[t.id];e.trace(`Transforming node`,t.diff,t,`translate(`+(t.x-t.width/2-5)+`, `+t.width/2+`)`);let r=t.diff||0;return t.clusterNode?n.attr(`transform`,`translate(`+(t.x+r-t.width/2)+`, `+(t.y-t.height/2-8)+`)`):n.attr(`transform`,`translate(`+t.x+`, `+t.y+`)`),r},`positionNode`);function ht(e,t,n=!1){let r=e,i=`default`;(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(` `)),i+=` flowchart-label`;let a=0,o=``,s;switch(r.type){case`round`:a=5,o=`rect`;break;case`composite`:a=0,o=`composite`,s=0;break;case`square`:o=`rect`;break;case`diamond`:o=`question`;break;case`hexagon`:o=`hexagon`;break;case`block_arrow`:o=`block_arrow`;break;case`odd`:o=`rect_left_inv_arrow`;break;case`lean_right`:o=`lean_right`;break;case`lean_left`:o=`lean_left`;break;case`trapezoid`:o=`trapezoid`;break;case`inv_trapezoid`:o=`inv_trapezoid`;break;case`rect_left_inv_arrow`:o=`rect_left_inv_arrow`;break;case`circle`:o=`circle`;break;case`ellipse`:o=`ellipse`;break;case`stadium`:o=`stadium`;break;case`subroutine`:o=`subroutine`;break;case`cylinder`:o=`cylinder`;break;case`group`:o=`rect`;break;case`doublecircle`:o=`doublecircle`;break;default:o=`rect`}let c=m(r?.styles??[]),l=r.label,u=r.size??{width:0,height:0,x:0,y:0},f=t.getDiagramId();return{labelStyle:c.labelStyle,shape:o,labelText:l,rx:a,ry:a,class:i,style:c.style,id:r.id,domId:f?`${f}-${r.id}`:r.id,directions:r.directions,width:u.width,height:u.height,x:u.x,y:u.y,positioned:n,intersect:void 0,type:r.type,padding:s??d()?.block?.padding??0}}t(ht,`getNodeFromBlock`);async function gt(e,t,n){let r=ht(t,n,!1);if(r.type===`group`)return;let i=await pt(e,r,{config:d()}),a=i.node().getBBox(),o=n.getBlock(r.id);o.size={width:a.width,height:a.height,x:0,y:0,node:i},n.setBlock(o),i.remove()}t(gt,`calculateBlockSize`);async function _t(e,t,n){let r=ht(t,n,!0);n.getBlock(r.id).type!==`space`&&(await pt(e,r,{config:d()}),t.intersect=r?.intersect,mt(r))}t(_t,`insertBlockPositioned`);async function $(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await $(e,i.children,n,r)}t($,`performOperations`);async function vt(e,t,n){await $(e,t,n,gt)}t(vt,`calculateBlockSizes`);async function yt(e,t,n){await $(e,t,n,_t)}t(yt,`insertBlocks`);async function bt(e,t,n,r,i){let a=new w({multigraph:!0,compound:!0});a.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),o=r.getBlock(n.end);if(t?.size&&o?.size){let r=t.size,s=o.size,c=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}],l=i?`${i}-${n.id}`:n.id;Ae(e,{v:n.start,w:n.end,name:l},{...n,id:l,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:`edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1`},void 0,`block`,a,i),n.label&&(await Te(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:`edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1`}),Ee({...n,x:c[1].x,y:c[1].y},{originalPath:c}))}}}t(bt,`insertEdges`);var xt={parser:D,db:me,renderer:{draw:t(async function(t,r,i,a){let{securityLevel:o,block:c}=d(),l=a.db;l.setDiagramId(r);let u;o===`sandbox`&&(u=n(`#i`+r));let f=n(o===`sandbox`?u.nodes()[0].contentDocument.body:`body`),p=o===`sandbox`?f.select(`[id="${r}"]`):n(`[id="${r}"]`);ye(p,[`point`,`circle`,`cross`],a.type,r);let m=l.getBlocks(),h=l.getBlocksFlat(),g=l.getEdges(),_=p.insert(`g`).attr(`class`,`block`);await vt(_,m,l);let v=xe(l);if(await yt(_,m,l),await bt(_,g,h,l,r),v){let t=v,n=Math.max(1,Math.round(.125*(t.width/t.height))),r=t.height+n+10,i=t.width+10,{useMaxWidth:a}=c;s(p,r,i,!!a),e.debug(`Here Bounds`,v,t),p.attr(`viewBox`,`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},`draw`),getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`)},styles:ge};export{xt as diagram};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{g as e,h as t,p as n}from"./src-PKe5NtkK.js";import{B as r,L as i,V as a,_ as o,b as s,c as l,r as u,s as d,v as f}from"./chunk-ICPOFSXX-iKiUSjDK.js";import{t as p}from"./dist-C_eddq6m.js";import{g as m,n as h,t as g}from"./chunk-5PVQY5BW-BBHW_uCu.js";import{a as _,s as v}from"./chunk-YZCP3GAM-BfPcXRm2.js";var y=p(),b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],ee=[1,54],te=[1,55],ne=[1,56],z=[1,57],B=[1,58],V=[1,59],H=[1,60],re=[14,42],ie=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ae=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],U=[1,82],W=[1,83],G=[1,84],K=[1,85],q=[12,14,42],oe=[12,14,33,42],se=[12,14,33,42,76,77,79,80],ce=[12,33],le=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:te,70:ne,71:z,72:B,73:V,74:H},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:te,70:ne,71:z,72:B,73:V,74:H},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:te,70:ne,71:z,72:B,73:V,74:H},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:te,70:ne,71:z,72:B,73:V,74:H},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:te,70:ne,71:z,72:B,73:V,74:H},{14:[1,74]},e(re,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:te,70:ne,71:z,72:B,73:V,74:H}),e(re,[2,14]),e(ie,[2,16],{12:[1,76]}),e(re,[2,36],{12:[1,77]}),e(ae,[2,19]),e(ae,[2,20]),{25:[1,78]},{27:[1,79]},e(ae,[2,23]),{35:80,75:81,76:U,77:W,79:G,80:K},{35:86,75:81,76:U,77:W,79:G,80:K},{35:87,75:81,76:U,77:W,79:G,80:K},{35:88,75:81,76:U,77:W,79:G,80:K},{35:89,75:81,76:U,77:W,79:G,80:K},{35:90,75:81,76:U,77:W,79:G,80:K},{35:91,75:81,76:U,77:W,79:G,80:K},{35:92,75:81,76:U,77:W,79:G,80:K},{35:93,75:81,76:U,77:W,79:G,80:K},{35:94,75:81,76:U,77:W,79:G,80:K},{35:95,75:81,76:U,77:W,79:G,80:K},{35:96,75:81,76:U,77:W,79:G,80:K},{35:97,75:81,76:U,77:W,79:G,80:K},{35:98,75:81,76:U,77:W,79:G,80:K},{35:99,75:81,76:U,77:W,79:G,80:K},{35:100,75:81,76:U,77:W,79:G,80:K},{35:101,75:81,76:U,77:W,79:G,80:K},{35:102,75:81,76:U,77:W,79:G,80:K},{35:103,75:81,76:U,77:W,79:G,80:K},{35:104,75:81,76:U,77:W,79:G,80:K},e(q,[2,59]),{35:105,75:81,76:U,77:W,79:G,80:K},{35:106,75:81,76:U,77:W,79:G,80:K},{35:107,75:81,76:U,77:W,79:G,80:K},{35:108,75:81,76:U,77:W,79:G,80:K},{35:109,75:81,76:U,77:W,79:G,80:K},{35:110,75:81,76:U,77:W,79:G,80:K},{35:111,75:81,76:U,77:W,79:G,80:K},{35:112,75:81,76:U,77:W,79:G,80:K},{35:113,75:81,76:U,77:W,79:G,80:K},{35:114,75:81,76:U,77:W,79:G,80:K},{35:115,75:81,76:U,77:W,79:G,80:K},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:te,70:ne,71:z,72:B,73:V,74:H},{12:[1,118],33:[1,117]},{35:119,75:81,76:U,77:W,79:G,80:K},{35:120,75:81,76:U,77:W,79:G,80:K},{35:121,75:81,76:U,77:W,79:G,80:K},{35:122,75:81,76:U,77:W,79:G,80:K},{35:123,75:81,76:U,77:W,79:G,80:K},{35:124,75:81,76:U,77:W,79:G,80:K},{35:125,75:81,76:U,77:W,79:G,80:K},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(re,[2,15]),e(ie,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),e(re,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:te,70:ne,71:z,72:B,73:V,74:H}),e(ae,[2,21]),e(ae,[2,22]),e(q,[2,39]),e(oe,[2,71],{75:81,35:132,76:U,77:W,79:G,80:K}),e(se,[2,73]),{78:[1,133]},e(se,[2,75]),e(se,[2,76]),e(q,[2,40]),e(q,[2,41]),e(q,[2,42]),e(q,[2,43]),e(q,[2,44]),e(q,[2,45]),e(q,[2,46]),e(q,[2,47]),e(q,[2,48]),e(q,[2,49]),e(q,[2,50]),e(q,[2,51]),e(q,[2,52]),e(q,[2,53]),e(q,[2,54]),e(q,[2,55]),e(q,[2,56]),e(q,[2,57]),e(q,[2,58]),e(q,[2,60]),e(q,[2,61]),e(q,[2,62]),e(q,[2,63]),e(q,[2,64]),e(q,[2,65]),e(q,[2,66]),e(q,[2,67]),e(q,[2,68]),e(q,[2,69]),e(q,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ce,[2,28]),e(ce,[2,29]),e(ce,[2,30]),e(ce,[2,31]),e(ce,[2,32]),e(ce,[2,33]),e(ce,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(ie,[2,18]),e(re,[2,38]),e(oe,[2,72]),e(se,[2,74]),e(q,[2,24]),e(q,[2,35]),e(le,[2,25]),e(le,[2,26],{12:[1,138]}),e(le,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}t(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
|
|
2
|
+
`+g.showPosition()+`
|
|
3
|
+
Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:r.push(C),a.push(g.yytext),o.push(g.yylloc),r.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(r=r.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),r.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[r[r.length-2]][r[r.length-1]],r.push(j);break;case 3:return!0}}return!0},`parse`)};J.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin(`acc_title`),24;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),26;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin(`person_ext`),45;case 23:return this.begin(`person`),44;case 24:return this.begin(`system_ext_queue`),51;case 25:return this.begin(`system_ext_db`),50;case 26:return this.begin(`system_ext`),49;case 27:return this.begin(`system_queue`),48;case 28:return this.begin(`system_db`),47;case 29:return this.begin(`system`),46;case 30:return this.begin(`boundary`),37;case 31:return this.begin(`enterprise_boundary`),34;case 32:return this.begin(`system_boundary`),36;case 33:return this.begin(`container_ext_queue`),57;case 34:return this.begin(`container_ext_db`),56;case 35:return this.begin(`container_ext`),55;case 36:return this.begin(`container_queue`),54;case 37:return this.begin(`container_db`),53;case 38:return this.begin(`container`),52;case 39:return this.begin(`container_boundary`),38;case 40:return this.begin(`component_ext_queue`),63;case 41:return this.begin(`component_ext_db`),62;case 42:return this.begin(`component_ext`),61;case 43:return this.begin(`component_queue`),60;case 44:return this.begin(`component_db`),59;case 45:return this.begin(`component`),58;case 46:return this.begin(`node`),39;case 47:return this.begin(`node`),39;case 48:return this.begin(`node_l`),40;case 49:return this.begin(`node_r`),41;case 50:return this.begin(`rel`),64;case 51:return this.begin(`birel`),65;case 52:return this.begin(`rel_u`),66;case 53:return this.begin(`rel_u`),66;case 54:return this.begin(`rel_d`),67;case 55:return this.begin(`rel_d`),67;case 56:return this.begin(`rel_l`),68;case 57:return this.begin(`rel_l`),68;case 58:return this.begin(`rel_r`),69;case 59:return this.begin(`rel_r`),69;case 60:return this.begin(`rel_b`),70;case 61:return this.begin(`rel_index`),71;case 62:return this.begin(`update_el_style`),72;case 63:return this.begin(`update_rel_style`),73;case 64:return this.begin(`update_layout_config`),74;case 65:return`EOF_IN_STRUCT`;case 66:return this.begin(`attribute`),`ATTRIBUTE_EMPTY`;case 67:this.begin(`attribute`);break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin(`string`);break;case 73:this.popState();break;case 74:return`STR`;case 75:this.begin(`string_kv`);break;case 76:return this.begin(`string_kv_key`),`STR_KEY`;case 77:this.popState(),this.begin(`string_kv_value`);break;case 78:return`STR_VALUE`;case 79:this.popState(),this.popState();break;case 80:return`STR`;case 81:return`LBRACE`;case 82:return`RBRACE`;case 83:return`SPACE`;case 84:return`EOL`;case 85:return 14}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}})();function ue(){this.yy={}}return t(ue,`Parser`),ue.prototype=J,J.Parser=ue,new ue})();b.parser=b;var x=b,S=[],C=[``],w=`global`,T=``,E=[{alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}],D=[],O=``,k=!1,A=4,j=2,M,N=t(function(){return M},`getC4Type`),P=t(function(e){M=i(e,s())},`setC4Type`),F=t(function(e,t,n,r,i,a,o,s,l){if(e==null||t==null||n==null||r==null)return;let u={},d=D.find(e=>e.from===t&&e.to===n);if(d?u=d:D.push(u),u.type=e,u.from=t,u.to=n,u.label={text:r},i==null)u.techn={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];u[e]={text:t}}else u.techn={text:i};if(a==null)u.descr={text:``};else if(typeof a==`object`){let[e,t]=Object.entries(a)[0];u[e]={text:t}}else u.descr={text:a};if(typeof o==`object`){let[e,t]=Object.entries(o)[0];u[e]=t}else u.sprite=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];u[e]=t}else u.tags=s;if(typeof l==`object`){let[e,t]=Object.entries(l)[0];u[e]=t}else u.link=l;u.wrap=J()},`addRel`),I=t(function(e,t,n,r,i,a,o){if(t===null||n===null)return;let s={},l=S.find(e=>e.alias===t);if(l&&t===l.alias?s=l:(s.alias=t,S.push(s)),n==null?s.label={text:``}:s.label={text:n},r==null)s.descr={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]={text:t}}else s.descr={text:r};if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.sprite=i;if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=t}else s.tags=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=t}else s.link=o;s.typeC4Shape={text:e},s.parentBoundary=w,s.wrap=J()},`addPersonOrSystem`),L=t(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=S.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,S.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof a==`object`){let[e,t]=Object.entries(a)[0];l[e]=t}else l.sprite=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.wrap=J(),l.typeC4Shape={text:e},l.parentBoundary=w},`addContainer`),R=t(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=S.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,S.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof a==`object`){let[e,t]=Object.entries(a)[0];l[e]=t}else l.sprite=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.wrap=J(),l.typeC4Shape={text:e},l.parentBoundary=w},`addComponent`),ee=t(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=E.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,E.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`system`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};if(typeof r==`object`){let[e,t]=Object.entries(r)[0];a[e]=t}else a.tags=r;if(typeof i==`object`){let[e,t]=Object.entries(i)[0];a[e]=t}else a.link=i;a.parentBoundary=w,a.wrap=J(),T=w,w=e,C.push(T)},`addPersonOrSystemBoundary`),te=t(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=E.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,E.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`container`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};if(typeof r==`object`){let[e,t]=Object.entries(r)[0];a[e]=t}else a.tags=r;if(typeof i==`object`){let[e,t]=Object.entries(i)[0];a[e]=t}else a.link=i;a.parentBoundary=w,a.wrap=J(),T=w,w=e,C.push(T)},`addContainerBoundary`),ne=t(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=E.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,E.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.type={text:`node`};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.type={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.nodeType=e,l.parentBoundary=w,l.wrap=J(),T=w,w=t,C.push(T)},`addDeploymentNode`),z=t(function(){w=T,C.pop(),T=C.pop(),C.push(T)},`popBoundaryParseStack`),B=t(function(e,t,n,r,i,a,o,s,l,u,d){let f=S.find(e=>e.alias===t);if(!(f===void 0&&(f=E.find(e=>e.alias===t),f===void 0))){if(n!=null)if(typeof n==`object`){let[e,t]=Object.entries(n)[0];f[e]=t}else f.bgColor=n;if(r!=null)if(typeof r==`object`){let[e,t]=Object.entries(r)[0];f[e]=t}else f.fontColor=r;if(i!=null)if(typeof i==`object`){let[e,t]=Object.entries(i)[0];f[e]=t}else f.borderColor=i;if(a!=null)if(typeof a==`object`){let[e,t]=Object.entries(a)[0];f[e]=t}else f.shadowing=a;if(o!=null)if(typeof o==`object`){let[e,t]=Object.entries(o)[0];f[e]=t}else f.shape=o;if(s!=null)if(typeof s==`object`){let[e,t]=Object.entries(s)[0];f[e]=t}else f.sprite=s;if(l!=null)if(typeof l==`object`){let[e,t]=Object.entries(l)[0];f[e]=t}else f.techn=l;if(u!=null)if(typeof u==`object`){let[e,t]=Object.entries(u)[0];f[e]=t}else f.legendText=u;if(d!=null)if(typeof d==`object`){let[e,t]=Object.entries(d)[0];f[e]=t}else f.legendSprite=d}},`updateElStyle`),V=t(function(e,t,n,r,i,a,o){let s=D.find(e=>e.from===t&&e.to===n);if(s!==void 0){if(r!=null)if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]=t}else s.textColor=r;if(i!=null)if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.lineColor=i;if(a!=null)if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=parseInt(t)}else s.offsetX=parseInt(a);if(o!=null)if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=parseInt(t)}else s.offsetY=parseInt(o)}},`updateRelStyle`),H=t(function(e,t,n){let r=A,i=j;if(typeof t==`object`){let e=Object.values(t)[0];r=parseInt(e)}else r=parseInt(t);if(typeof n==`object`){let e=Object.values(n)[0];i=parseInt(e)}else i=parseInt(n);r>=1&&(A=r),i>=1&&(j=i)},`updateLayoutConfig`),re=t(function(){return A},`getC4ShapeInRow`),ie=t(function(){return j},`getC4BoundaryInRow`),ae=t(function(){return w},`getCurrentBoundaryParse`),U=t(function(){return T},`getParentBoundaryParse`),W=t(function(e){return e==null?S:S.filter(t=>t.parentBoundary===e)},`getC4ShapeArray`),G=t(function(e){return S.find(t=>t.alias===e)},`getC4Shape`),K=t(function(e){return Object.keys(W(e))},`getC4ShapeKeys`),q=t(function(e){return e==null?E:E.filter(t=>t.parentBoundary===e)},`getBoundaries`),oe=q,se=t(function(){return D},`getRels`),ce=t(function(){return O},`getTitle`),le=t(function(e){k=e},`setWrap`),J=t(function(){return k},`autoWrap`),ue={addPersonOrSystem:I,addPersonOrSystemBoundary:ee,addContainer:L,addContainerBoundary:te,addComponent:R,addDeploymentNode:ne,popBoundaryParseStack:z,addRel:F,updateElStyle:B,updateRelStyle:V,updateLayoutConfig:H,autoWrap:J,setWrap:le,getC4ShapeArray:W,getC4Shape:G,getC4ShapeKeys:K,getBoundaries:q,getBoundarys:oe,getCurrentBoundaryParse:ae,getParentBoundaryParse:U,getRels:se,getTitle:ce,getC4Type:N,getC4ShapeInRow:re,getC4BoundaryInRow:ie,setAccTitle:a,getAccTitle:f,getAccDescription:o,setAccDescription:r,getConfig:t(()=>s().c4,`getConfig`),clear:t(function(){S=[],E=[{alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}],T=``,w=`global`,C=[``],D=[],C=[``],O=``,k=!1,A=4,j=2},`clear`),LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:t(function(e){O=i(e,s())},`setTitle`),setC4Type:P},de=t(function(e,t){return _(e,t)},`drawRect`),fe=t(function(e,t,n,r,i,a){let o=e.append(`image`);o.attr(`width`,t),o.attr(`height`,n),o.attr(`x`,r),o.attr(`y`,i);let s=a.startsWith(`data:image/png;base64`)?a:(0,y.sanitizeUrl)(a);o.attr(`xlink:href`,s)},`drawImage`),pe=t((e,t,n,r)=>{let i=e.append(`g`),a=0;for(let e of t){let t=e.textColor?e.textColor:`#444444`,o=e.lineColor?e.lineColor:`#444444`,s=e.offsetX?parseInt(e.offsetX):0,l=e.offsetY?parseInt(e.offsetY):0;if(a===0){let t=i.append(`line`);t.attr(`x1`,e.startPoint.x),t.attr(`y1`,e.startPoint.y),t.attr(`x2`,e.endPoint.x),t.attr(`y2`,e.endPoint.y),t.attr(`stroke-width`,`1`),t.attr(`stroke`,o),t.style(`fill`,`none`),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`),a=-1}else{let t=i.append(`path`);t.attr(`fill`,`none`).attr(`stroke-width`,`1`).attr(`stroke`,o).attr(`d`,`Mstartx,starty Qcontrolx,controly stopx,stopy `.replaceAll(`startx`,e.startPoint.x).replaceAll(`starty`,e.startPoint.y).replaceAll(`controlx`,e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll(`controly`,e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll(`stopx`,e.endPoint.x).replaceAll(`stopy`,e.endPoint.y)),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`)}let u=n.messageFont();Y(n)(e.label.text,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+l,e.label.width,e.label.height,{fill:t},u),e.techn&&e.techn.text!==``&&(u=n.messageFont(),Y(n)(`[`+e.techn.text+`]`,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+n.messageFontSize+5+l,Math.max(e.label.width,e.techn.width),e.techn.height,{fill:t,"font-style":`italic`},u))}},`drawRels`),me=t(function(e,t,n){let r=e.append(`g`),i=t.bgColor?t.bgColor:`none`,a=t.borderColor?t.borderColor:`#444444`,o=t.fontColor?t.fontColor:`black`,s={"stroke-width":1,"stroke-dasharray":`7.0,7.0`};t.nodeType&&(s={"stroke-width":1}),de(r,{x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:s});let l=n.boundaryFont();l.fontWeight=`bold`,l.fontSize+=2,l.fontColor=o,Y(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:`#444444`},l),t.type&&t.type.text!==``&&(l=n.boundaryFont(),l.fontColor=o,Y(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:`#444444`},l)),t.descr&&t.descr.text!==``&&(l=n.boundaryFont(),l.fontSize-=2,l.fontColor=o,Y(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:`#444444`},l))},`drawBoundary`),he=t(function(e,t,n){let r=t.bgColor?t.bgColor:n[t.typeC4Shape.text+`_bg_color`],i=t.borderColor?t.borderColor:n[t.typeC4Shape.text+`_border_color`],a=t.fontColor?t.fontColor:`#FFFFFF`,o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=`;switch(t.typeC4Shape.text){case`person`:o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=`;break;case`external_person`:o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=`;break}let s=e.append(`g`);s.attr(`class`,`person-man`);let l=v();switch(t.typeC4Shape.text){case`person`:case`external_person`:case`system`:case`external_system`:case`container`:case`external_container`:case`component`:case`external_component`:l.x=t.x,l.y=t.y,l.fill=r,l.width=t.width,l.height=t.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},de(s,l);break;case`system_db`:case`external_system_db`:case`container_db`:case`external_container_db`:case`component_db`:case`external_component_db`:s.append(`path`).attr(`fill`,r).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`half`,t.width/2).replaceAll(`height`,t.height)),s.append(`path`).attr(`fill`,`none`).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`half`,t.width/2));break;case`system_queue`:case`external_system_queue`:case`container_queue`:case`external_container_queue`:case`component_queue`:case`external_component_queue`:s.append(`path`).attr(`fill`,r).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`width`,t.width).replaceAll(`half`,t.height/2)),s.append(`path`).attr(`fill`,`none`).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half`.replaceAll(`startx`,t.x+t.width).replaceAll(`starty`,t.y).replaceAll(`half`,t.height/2));break}let u=Ce(n,t.typeC4Shape.text);switch(s.append(`text`).attr(`fill`,a).attr(`font-family`,u.fontFamily).attr(`font-size`,u.fontSize-2).attr(`font-style`,`italic`).attr(`lengthAdjust`,`spacing`).attr(`textLength`,t.typeC4Shape.width).attr(`x`,t.x+t.width/2-t.typeC4Shape.width/2).attr(`y`,t.y+t.typeC4Shape.Y).text(`<<`+t.typeC4Shape.text+`>>`),t.typeC4Shape.text){case`person`:case`external_person`:fe(s,48,48,t.x+t.width/2-24,t.y+t.image.Y,o);break}let d=n[t.typeC4Shape.text+`Font`]();return d.fontWeight=`bold`,d.fontSize+=2,d.fontColor=a,Y(n)(t.label.text,s,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=n[t.typeC4Shape.text+`Font`](),d.fontColor=a,t.techn&&t.techn?.text!==``?Y(n)(t.techn.text,s,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":`italic`},d):t.type&&t.type.text!==``&&Y(n)(t.type.text,s,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":`italic`},d),t.descr&&t.descr.text!==``&&(d=n.personFont(),d.fontColor=a,Y(n)(t.descr.text,s,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},`drawC4Shape`),ge=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),_e=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),ve=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),ye=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`)},`insertArrowHead`),be=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowend`).attr(`refX`,1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`)},`insertArrowEnd`),xe=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Se=t(function(e,t){let n=e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,16).attr(`refY`,4);n.append(`path`).attr(`fill`,`black`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 9,2 V 6 L16,4 Z`),n.append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 0,1 L 6,7 M 6,1 L 0,7`)},`insertArrowCrossHead`),Ce=t((e,t)=>({fontFamily:e[t+`FontFamily`],fontSize:e[t+`FontSize`],fontWeight:e[t+`FontWeight`]}),`getC4ShapeFont`),Y=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}t(e,`byText`);function n(e,t,n,r,a,o,s,l){let{fontSize:u,fontFamily:f,fontWeight:p}=l,m=e.split(d.lineBreakRegex);for(let e=0;e<m.length;e++){let o=e*u-u*(m.length-1)/2,l=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).style(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).style(`font-size`,u).style(`font-weight`,p).style(`font-family`,f);l.append(`tspan`).attr(`dy`,o).text(m[e]).attr(`alignment-baseline`,`mathematical`),i(l,s)}}t(n,`byTspan`);function r(e,t,r,a,o,s,l,u){let d=t.append(`switch`),f=d.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,d,r,a,o,s,l,u),i(f,l)}t(r,`byFo`);function i(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return t(i,`_setTextAttrs`),function(t){return t.textPlacement===`fo`?r:t.textPlacement===`old`?e:n}})(),X={drawRect:de,drawBoundary:me,drawC4Shape:he,drawRels:pe,drawImage:fe,insertArrowHead:ye,insertArrowEnd:be,insertArrowFilledHead:xe,insertArrowCrossHead:Se,insertDatabaseIcon:ge,insertComputerIcon:_e,insertClockIcon:ve},we=0,Te=0,Ee=4,De=2;b.yy=ue;var Z={},Oe=class{static{t(this,`Bounds`)}constructor(e){this.name=``,this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,ke(e.db.getConfig())}setData(e,t,n,r){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=r}updateVal(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=t+e.width,r=this.nextData.starty+e.margin*2,i=r+e.height;(t>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>Ee)&&(t=this.nextData.startx+e.margin+Z.nextLinePaddingX,r=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=r+e.height,this.nextData.cnt=1),e.x=t,e.y=r,this.updateVal(this.data,`startx`,t,Math.min),this.updateVal(this.data,`starty`,r,Math.min),this.updateVal(this.data,`stopx`,n,Math.max),this.updateVal(this.data,`stopy`,i,Math.max),this.updateVal(this.nextData,`startx`,t,Math.min),this.updateVal(this.nextData,`starty`,r,Math.min),this.updateVal(this.nextData,`stopx`,n,Math.max),this.updateVal(this.nextData,`stopy`,i,Math.max)}init(e){this.name=``,this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ke(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},ke=t(function(e){u(Z,e),e.fontFamily&&(Z.personFontFamily=Z.systemFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.personFontSize=Z.systemFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.personFontWeight=Z.systemFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),Ae=t((e,t)=>({fontFamily:e[t+`FontFamily`],fontSize:e[t+`FontSize`],fontWeight:e[t+`FontWeight`]}),`c4ShapeFont`),je=t(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),`boundaryFont`),Me=t(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`);function Q(e,t,n,r,i){if(!t[e].width)if(n)t[e].text=m(t[e].text,i,r),t[e].textLines=t[e].text.split(d.lineBreakRegex).length,t[e].width=i,t[e].height=g(t[e].text,r);else{let n=t[e].text.split(d.lineBreakRegex);t[e].textLines=n.length;let i=0;t[e].height=0,t[e].width=0;for(let a of n)t[e].width=Math.max(h(a,r),t[e].width),i=g(a,r),t[e].height=t[e].height+i}}t(Q,`calcC4ShapeTextWH`);var Ne=t(function(e,t,n){t.x=n.data.startx,t.y=n.data.starty,t.width=n.data.stopx-n.data.startx,t.height=n.data.stopy-n.data.starty,t.label.y=Z.c4ShapeMargin-35;let r=t.wrap&&Z.wrap,i=je(Z);i.fontSize+=2,i.fontWeight=`bold`,Q(`label`,t,r,i,h(t.label.text,i)),X.drawBoundary(e,t,Z)},`drawBoundary`),Pe=t(function(e,t,n,r){let i=0;for(let a of r){i=0;let r=n[a],o=Ae(Z,r.typeC4Shape.text);switch(o.fontSize-=2,r.typeC4Shape.width=h(`«`+r.typeC4Shape.text+`»`,o),r.typeC4Shape.height=o.fontSize+2,r.typeC4Shape.Y=Z.c4ShapePadding,i=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case`person`:case`external_person`:r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height);let s=r.wrap&&Z.wrap,l=Z.width-Z.c4ShapePadding*2,u=Ae(Z,r.typeC4Shape.text);u.fontSize+=2,u.fontWeight=`bold`,Q(`label`,r,s,u,l),r.label.Y=i+8,i=r.label.Y+r.label.height,r.type&&r.type.text!==``?(r.type.text=`[`+r.type.text+`]`,Q(`type`,r,s,Ae(Z,r.typeC4Shape.text),l),r.type.Y=i+5,i=r.type.Y+r.type.height):r.techn&&r.techn.text!==``&&(r.techn.text=`[`+r.techn.text+`]`,Q(`techn`,r,s,Ae(Z,r.techn.text),l),r.techn.Y=i+5,i=r.techn.Y+r.techn.height);let d=i,f=r.label.width;r.descr&&r.descr.text!==``&&(Q(`descr`,r,s,Ae(Z,r.typeC4Shape.text),l),r.descr.Y=i+20,i=r.descr.Y+r.descr.height,f=Math.max(r.label.width,r.descr.width),d=i-r.descr.textLines*5),f+=Z.c4ShapePadding,r.width=Math.max(r.width||Z.width,f,Z.width),r.height=Math.max(r.height||Z.height,d,Z.height),r.margin=r.margin||Z.c4ShapeMargin,e.insert(r),X.drawC4Shape(t,r,Z)}e.bumpLastMargin(Z.c4ShapeMargin)},`drawC4ShapeArray`),$=class{static{t(this,`Point`)}constructor(e,t){this.x=e,this.y=t}},Fe=t(function(e,t){let n=e.x,r=e.y,i=t.x,a=t.y,o=n+e.width/2,s=r+e.height/2,l=Math.abs(n-i),u=Math.abs(r-a),d=u/l,f=e.height/e.width,p=null;return r==a&&n<i?p=new $(n+e.width,s):r==a&&n>i?p=new $(n,s):n==i&&r<a?p=new $(o,r+e.height):n==i&&r>a&&(p=new $(o,r)),n>i&&r<a?p=f>=d?new $(n,s+d*e.width/2):new $(o-l/u*e.height/2,r+e.height):n<i&&r<a?p=f>=d?new $(n+e.width,s+d*e.width/2):new $(o+l/u*e.height/2,r+e.height):n<i&&r>a?p=f>=d?new $(n+e.width,s-d*e.width/2):new $(o+e.height/2*l/u,r):n>i&&r>a&&(p=f>=d?new $(n,s-e.width/2*d):new $(o-e.height/2*l/u,r)),p},`getIntersectPoint`),Ie=t(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let r=Fe(e,n);return n.x=e.x+e.width/2,n.y=e.y+e.height/2,{startPoint:r,endPoint:Fe(t,n)}},`getIntersectPoints`),Le=t(function(e,t,n,r,i){let a=0;for(let e of t){a+=1;let t=e.wrap&&Z.wrap,i=Me(Z);r.db.getC4Type()===`C4Dynamic`&&(e.label.text=a+`: `+e.label.text);let o=h(e.label.text,i);Q(`label`,e,t,i,o),e.techn&&e.techn.text!==``&&(o=h(e.techn.text,i),Q(`techn`,e,t,i,o)),e.descr&&e.descr.text!==``&&(o=h(e.descr.text,i),Q(`descr`,e,t,i,o));let s=Ie(n(e.from),n(e.to));e.startPoint=s.startPoint,e.endPoint=s.endPoint}X.drawRels(e,t,Z,i)},`drawRels`);function Re(e,t,n,r,i){let a=new Oe(i);a.data.widthLimit=n.data.widthLimit/Math.min(De,r.length);for(let[o,s]of r.entries()){let r=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=r,r=s.image.Y+s.image.height);let l=s.wrap&&Z.wrap,u=je(Z);if(u.fontSize+=2,u.fontWeight=`bold`,Q(`label`,s,l,u,a.data.widthLimit),s.label.Y=r+8,r=s.label.Y+s.label.height,s.type&&s.type.text!==``&&(s.type.text=`[`+s.type.text+`]`,Q(`type`,s,l,je(Z),a.data.widthLimit),s.type.Y=r+5,r=s.type.Y+s.type.height),s.descr&&s.descr.text!==``){let e=je(Z);e.fontSize-=2,Q(`descr`,s,l,e,a.data.widthLimit),s.descr.Y=r+20,r=s.descr.Y+s.descr.height}if(o==0||o%De===0){let e=n.data.startx+Z.diagramMarginX,t=n.data.stopy+Z.diagramMarginY+r;a.setData(e,e,t,t)}else{let e=a.data.stopx===a.data.startx?a.data.startx:a.data.stopx+Z.diagramMarginX,t=a.data.starty;a.setData(e,e,t,t)}a.name=s.alias;let d=i.db.getC4ShapeArray(s.alias),f=i.db.getC4ShapeKeys(s.alias);f.length>0&&Pe(a,e,d,f),t=s.alias;let p=i.db.getBoundaries(t);p.length>0&&Re(e,t,a,p,i),s.alias!==`global`&&Ne(e,s,a),n.data.stopy=Math.max(a.data.stopy+Z.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+Z.c4ShapeMargin,n.data.stopx),we=Math.max(we,n.data.stopx),Te=Math.max(Te,n.data.stopy)}}t(Re,`drawInsideBoundary`);var ze={drawPersonOrSystemArray:Pe,drawBoundary:Ne,setConf:ke,draw:t(function(t,r,i,a){Z=s().c4;let o=s().securityLevel,u;o===`sandbox`&&(u=n(`#i`+r));let d=n(o===`sandbox`?u.nodes()[0].contentDocument.body:`body`),f=a.db;a.db.setWrap(Z.wrap),Ee=f.getC4ShapeInRow(),De=f.getC4BoundaryInRow(),e.debug(`C:${JSON.stringify(Z,null,2)}`);let p=o===`sandbox`?d.select(`[id="${r}"]`):n(`[id="${r}"]`);X.insertComputerIcon(p,r),X.insertDatabaseIcon(p,r),X.insertClockIcon(p,r);let m=new Oe(a);m.setData(Z.diagramMarginX,Z.diagramMarginX,Z.diagramMarginY,Z.diagramMarginY),m.data.widthLimit=screen.availWidth,we=Z.diagramMarginX,Te=Z.diagramMarginY;let h=a.db.getTitle();Re(p,``,m,a.db.getBoundaries(``),a),X.insertArrowHead(p,r),X.insertArrowEnd(p,r),X.insertArrowCrossHead(p,r),X.insertArrowFilledHead(p,r),Le(p,a.db.getRels(),a.db.getC4Shape,a,r),m.data.stopx=we,m.data.stopy=Te;let g=m.data,_=g.stopy-g.starty+2*Z.diagramMarginY,v=g.stopx-g.startx+2*Z.diagramMarginX;h&&p.append(`text`).text(h).attr(`x`,(g.stopx-g.startx)/2-4*Z.diagramMarginX).attr(`y`,g.starty+Z.diagramMarginY),l(p,_,v,Z.useMaxWidth);let y=h?60:0;p.attr(`viewBox`,g.startx-Z.diagramMarginX+` -`+(Z.diagramMarginY+y)+` `+v+` `+(_+y)),e.debug(`models:`,g)},`draw`)},Be={parser:x,db:ue,renderer:ze,styles:t(e=>`.person {
|
|
7
|
+
stroke: ${e.personBorder};
|
|
8
|
+
fill: ${e.personBkg};
|
|
9
|
+
}
|
|
10
|
+
`,`getStyles`),init:t(({c4:e,wrap:t})=>{ze.setConf(e),ue.setWrap(t)},`init`)};export{Be as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{nt as e,rt as t}from"./chunk-ICPOFSXX-iKiUSjDK.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,g as t,h as n,i as r,m as i,s as a,t as o,u as s,v as c}from"./chunk-K5T4RW27-CKR-lPBN.js";var l=class extends o{static{i(this,`RadarTokenBuilder`)}constructor(){super([`radar-beta`])}},u={parser:{TokenBuilder:i(()=>new l,`TokenBuilder`),ValueConverter:i(()=>new r,`ValueConverter`)}};function d(r=n){let i=t(c(r),a),o=t(e({shared:i}),s,u);return i.ServiceRegistry.register(o),{shared:i,Radar:o}}i(d,`createRadarServices`);export{d as n,u as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-DDMqpjkB.js","assets/dist-C_eddq6m.js","assets/index-aLvjHQW4.js","assets/index-BoggyWS0.css","assets/chunk-U2HBQHQK-BvtlVHAg.js","assets/src-PKe5NtkK.js","assets/chunk-5PVQY5BW-BBHW_uCu.js","assets/chunk-ICPOFSXX-iKiUSjDK.js","assets/_baseFor-Ck08IaSF.js","assets/dagre-CilMRazv.js","assets/graphlib-Bpd0q3yO.js","assets/isEmpty-BrFi5AqV.js","assets/reduce-CV2X8n1a.js","assets/flatten-B8XIuT0x.js","assets/clone-CI9aUwHe.js","assets/chunk-5FUZZQ4R-C72e1c_O.js","assets/chunk-X2U36JSP-BI_g8mub.js","assets/chunk-ZZ45TVLE-Bg4q68wZ.js","assets/rough.esm-Bbn_-PMU.js","assets/chunk-BSJP7CBP-BmsSs1Nt.js","assets/chunk-ENJZ2VHE-_OzxcZOU.js","assets/line-CRxEwpOv.js","assets/path-DfRbCp9y.js","assets/array-DOVTz2Mq.js","assets/cose-bilkent-S5V4N54A-7BpAeDh5.js","assets/cytoscape.esm-DoTFyJaN.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e}from"./index-aLvjHQW4.js";import{g as t,h as n}from"./src-PKe5NtkK.js";import{s as r,y as i}from"./chunk-ICPOFSXX-iKiUSjDK.js";import{u as a}from"./chunk-5PVQY5BW-BBHW_uCu.js";import{a as o,i as s,s as c}from"./chunk-5FUZZQ4R-C72e1c_O.js";import{a as l,i as u,n as d,r as f}from"./chunk-ENJZ2VHE-_OzxcZOU.js";var p={common:r,getConfig:i,insertCluster:s,insertEdge:d,insertEdgeLabel:f,insertMarkers:u,insertNode:o,interpolateToCurve:a,labelHelper:c,log:t,positionEdgeLabel:l},m={},h=n(e=>{for(let t of e)m[t.name]=t},`registerLayoutLoaders`);n(()=>{h([{name:`dagre`,loader:n(async()=>await e(()=>import(`./dagre-KV5264BT-DDMqpjkB.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),`loader`)},...[{name:`cose-bilkent`,loader:n(async()=>await e(()=>import(`./cose-bilkent-S5V4N54A-7BpAeDh5.js`),__vite__mapDeps([24,2,3,25,5])),`loader`)}]])},`registerDefaultLayoutLoaders`)();var g=n(async(e,t)=>{if(!(e.layoutAlgorithm in m))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=m[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,p,{algorithm:n.algorithm})},`render`),_=n((e=``,{fallback:n=`dagre`}={})=>{if(e in m)return e;if(n in m)return t.warn(`Layout algorithm ${e} is not registered. Using ${n} as fallback.`),n;throw Error(`Both layout algorithms ${e} and ${n} are not registered.`)},`getRegisteredLayoutAlgorithm`);export{h as n,g as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,p as t}from"./src-PKe5NtkK.js";import{b as n}from"./chunk-ICPOFSXX-iKiUSjDK.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./src-PKe5NtkK.js";function t(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}e(t,`populateCommonDb`);export{t};
|