mdts 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -2
- package/dist/frontend/bundle.js +2366 -2245
- package/dist/frontend/{node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_architecture-PBZL5I3N_mjs.bundle.js → node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_architecture-YZFGNWBL_mjs.bundle.js} +4 -4
- package/dist/frontend/{node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_gitGraph-HDMCJU4V_mjs.bundle.js → node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_gitGraph-7Q5UKJZL_mjs.bundle.js} +4 -4
- package/dist/frontend/{node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_info-3K5VOQVL_mjs.bundle.js → node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_info-OMHHGYJF_mjs.bundle.js} +4 -4
- package/dist/frontend/{node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_packet-RMMSAZCW_mjs.bundle.js → node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_packet-4T2RLAQJ_mjs.bundle.js} +4 -4
- package/dist/frontend/{node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_pie-UPGHQEXC_mjs.bundle.js → node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_pie-ZZUOXDRM_mjs.bundle.js} +4 -4
- package/dist/frontend/{node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_radar-KQ55EAFF_mjs.bundle.js → node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_radar-PYXPWWZC_mjs.bundle.js} +4 -4
- package/dist/frontend/node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_treeView-SZITEDCU_mjs.bundle.js +22 -0
- package/dist/frontend/{node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_treemap-KZPCXAKY_mjs.bundle.js → node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_treemap-W4RFUUIX_mjs.bundle.js} +4 -4
- package/dist/frontend/node_modules_mermaid-js_parser_dist_chunks_mermaid-parser_core_wardley-RL74JXVD_mjs.bundle.js +22 -0
- package/dist/frontend/node_modules_mermaid_dist_chunks_mermaid_core_classDiagram-6PBFFD2Q_mjs.bundle.js +22 -0
- package/dist/frontend/node_modules_mermaid_dist_chunks_mermaid_core_classDiagram-v2-HSJHXN6E_mjs.bundle.js +22 -0
- package/dist/frontend/node_modules_mermaid_dist_chunks_mermaid_core_diagram-5BDNPKRD_mjs.bundle.js +42 -0
- package/dist/frontend/{node_modules_mermaid_dist_chunks_mermaid_core_diagram-P4PSJMXO_mjs.bundle.js → node_modules_mermaid_dist_chunks_mermaid_core_diagram-TYMM5635_mjs.bundle.js} +4 -4
- package/dist/frontend/{node_modules_mermaid_dist_chunks_mermaid_core_infoDiagram-LFFYTUFH_mjs.bundle.js → node_modules_mermaid_dist_chunks_mermaid_core_infoDiagram-42DDH7IO_mjs.bundle.js} +4 -4
- package/dist/frontend/{node_modules_mermaid_dist_chunks_mermaid_core_pieDiagram-SKSYHLDU_mjs.bundle.js → node_modules_mermaid_dist_chunks_mermaid_core_pieDiagram-DEJITSTG_mjs.bundle.js} +4 -4
- package/dist/frontend/node_modules_mermaid_dist_chunks_mermaid_core_stateDiagram-v2-QKLJ7IA2_mjs.bundle.js +22 -0
- package/dist/frontend/vendors-node_modules_mermaid-js_parser_dist_mermaid-parser_core_mjs.bundle.js +45 -25
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_architectureDiagram-2XIMDMQ5_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_architectureDiagram-Q4EWVU46_mjs.bundle.js} +4 -4
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_blockDiagram-DXYQGD6D_mjs.bundle.js +52 -0
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_c4Diagram-IC4MRINW_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_c4Diagram-AHTNJAMY_mjs.bundle.js} +7 -7
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_chunk-4TB4RGXK_mjs.bundle.js +62 -0
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_chunk-NQ4KR5QH_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_chunk-OYMX7WX6_mjs.bundle.js} +7 -7
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_dagre-KLK3FWXG_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_dagre-KV5264BT_mjs.bundle.js} +4 -4
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_diagram-E7M64L7V_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_diagram-G4DWMVQ6_mjs.bundle.js} +7 -7
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_diagram-IFDJBPK2_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_diagram-MMDJMWI5_mjs.bundle.js} +4 -4
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_erDiagram-INFDFZHY_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_erDiagram-SMLLAGMA_mjs.bundle.js} +7 -7
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_flowDiagram-DWJPFMVM_mjs.bundle.js +72 -0
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_ganttDiagram-T4ZO3ILL_mjs.bundle.js +62 -0
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_gitGraphDiagram-UUTBAWPF_mjs.bundle.js +42 -0
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_ishikawaDiagram-PHBUUO56_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_ishikawaDiagram-UXIWVN3A_mjs.bundle.js} +4 -4
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_journeyDiagram-4ABVD52K_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_journeyDiagram-VCZTEJTY_mjs.bundle.js} +7 -7
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_kanban-definition-K7BYSVSG_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_kanban-definition-6JOO6SKY_mjs.bundle.js} +4 -4
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_mindmap-definition-YRQLILUH_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_mindmap-definition-QFDTVHPH_mjs.bundle.js} +7 -7
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_quadrantDiagram-337W2JSQ_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_quadrantDiagram-34T5L4WZ_mjs.bundle.js} +4 -4
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_requirementDiagram-Z7DCOOCP_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_requirementDiagram-MS252O5E_mjs.bundle.js} +7 -7
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_sankeyDiagram-WA2Y5GQK_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_sankeyDiagram-XADWPNL6_mjs.bundle.js} +7 -7
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_sequenceDiagram-FGHM5R23_mjs.bundle.js +42 -0
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_stateDiagram-FHFEXIEX_mjs.bundle.js +22 -0
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_timeline-definition-GMOUNBTQ_mjs.bundle.js +22 -0
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_vennDiagram-LZ73GAT5_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_vennDiagram-DHZGUBPP_mjs.bundle.js} +4 -4
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_wardleyDiagram-NUSXRM2D_mjs.bundle.js +32 -0
- package/dist/frontend/{vendors-node_modules_mermaid_dist_chunks_mermaid_core_xychartDiagram-JWTSCODW_mjs.bundle.js → vendors-node_modules_mermaid_dist_chunks_mermaid_core_xychartDiagram-5P7HB3ND_mjs.bundle.js} +4 -4
- package/package.json +3 -3
- package/dist/frontend/node_modules_mermaid_dist_chunks_mermaid_core_classDiagram-VBA2DB6C_mjs.bundle.js +0 -22
- package/dist/frontend/node_modules_mermaid_dist_chunks_mermaid_core_classDiagram-v2-RAHNMMFH_mjs.bundle.js +0 -22
- package/dist/frontend/node_modules_mermaid_dist_chunks_mermaid_core_stateDiagram-v2-FVOUBMTO_mjs.bundle.js +0 -22
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_blockDiagram-WCTKOSBZ_mjs.bundle.js +0 -52
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_chunk-WL4C6EOR_mjs.bundle.js +0 -62
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_flowDiagram-PKNHOUZH_mjs.bundle.js +0 -72
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_ganttDiagram-A5KZAMGK_mjs.bundle.js +0 -62
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_gitGraphDiagram-K3NZZRJ6_mjs.bundle.js +0 -42
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_sequenceDiagram-2WXFIKYE_mjs.bundle.js +0 -42
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_stateDiagram-RAJIS63D_mjs.bundle.js +0 -22
- package/dist/frontend/vendors-node_modules_mermaid_dist_chunks_mermaid_core_timeline-definition-YZTLITO2_mjs.bundle.js +0 -22
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
4
|
+
* This devtool is neither made for production nor for readable output files.
|
|
5
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
6
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
7
|
+
* or disable the default devtool with "devtool: false".
|
|
8
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
9
|
+
*/
|
|
10
|
+
(self["webpackChunk_mdts_frontend"] = self["webpackChunk_mdts_frontend"] || []).push([["vendors-node_modules_mermaid_dist_chunks_mermaid_core_stateDiagram-FHFEXIEX_mjs"],{
|
|
11
|
+
|
|
12
|
+
/***/ "./node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FHFEXIEX.mjs"
|
|
13
|
+
/*!*********************************************************************************!*\
|
|
14
|
+
!*** ./node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FHFEXIEX.mjs ***!
|
|
15
|
+
\*********************************************************************************/
|
|
16
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
17
|
+
|
|
18
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ diagram: () => (/* binding */ diagram)\n/* harmony export */ });\n/* harmony import */ var _chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-OYMX7WX6.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-OYMX7WX6.mjs\");\n/* harmony import */ var _chunk_55IACEB6_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-55IACEB6.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.mjs\");\n/* harmony import */ var _chunk_EDXVE4YY_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-EDXVE4YY.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-EDXVE4YY.mjs\");\n/* harmony import */ var _chunk_336JU56O_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chunk-336JU56O.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.mjs\");\n/* harmony import */ var _chunk_ENJZ2VHE_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./chunk-ENJZ2VHE.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.mjs\");\n/* harmony import */ var _chunk_BSJP7CBP_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./chunk-BSJP7CBP.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-BSJP7CBP.mjs\");\n/* harmony import */ var _chunk_5FUZZQ4R_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./chunk-5FUZZQ4R.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.mjs\");\n/* harmony import */ var _chunk_ZZ45TVLE_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./chunk-ZZ45TVLE.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.mjs\");\n/* harmony import */ var _chunk_X2U36JSP_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./chunk-X2U36JSP.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-X2U36JSP.mjs\");\n/* harmony import */ var _chunk_U2HBQHQK_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./chunk-U2HBQHQK.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.mjs\");\n/* harmony import */ var _chunk_5PVQY5BW_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./chunk-5PVQY5BW.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.mjs\");\n/* harmony import */ var _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./chunk-ICPOFSXX.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.mjs\");\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! dagre-d3-es/src/dagre/index.js */ \"./node_modules/dagre-d3-es/src/dagre/index.js\");\n/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! dagre-d3-es/src/graphlib/index.js */ \"./node_modules/dagre-d3-es/src/graphlib/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// src/diagrams/state/stateRenderer.js\n\n\n\n\n// src/diagrams/state/shapes.js\n\nvar drawStartState = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((g) => g.append(\"circle\").attr(\"class\", \"start-state\").attr(\"r\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit).attr(\"cx\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit).attr(\"cy\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit), \"drawStartState\");\nvar drawDivider = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((g) => g.append(\"line\").style(\"stroke\", \"grey\").style(\"stroke-dasharray\", \"3\").attr(\"x1\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight).attr(\"class\", \"divider\").attr(\"x2\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight * 2).attr(\"y1\", 0).attr(\"y2\", 0), \"drawDivider\");\nvar drawSimpleState = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((g, stateDef) => {\n const state = g.append(\"text\").attr(\"x\", 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"y\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"font-size\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.id);\n const classBox = state.node().getBBox();\n g.insert(\"rect\", \":first-child\").attr(\"x\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"y\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"width\", classBox.width + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"height\", classBox.height + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"rx\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.radius);\n return state;\n}, \"drawSimpleState\");\nvar drawDescrState = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((g, stateDef) => {\n const addTspan = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)(function(textEl, txt, isFirst2) {\n const tSpan = textEl.append(\"tspan\").attr(\"x\", 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).text(txt);\n if (!isFirst2) {\n tSpan.attr(\"dy\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight);\n }\n }, \"addTspan\");\n const title = g.append(\"text\").attr(\"x\", 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"y\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight + 1.3 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"font-size\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.descriptions[0]);\n const titleBox = title.node().getBBox();\n const titleHeight = titleBox.height;\n const description = g.append(\"text\").attr(\"x\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\n \"y\",\n titleHeight + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding * 0.4 + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.dividerMargin + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight\n ).attr(\"class\", \"state-description\");\n let isFirst = true;\n let isSecond = true;\n stateDef.descriptions.forEach(function(descr) {\n if (!isFirst) {\n addTspan(description, descr, isSecond);\n isSecond = false;\n }\n isFirst = false;\n });\n const descrLine = g.append(\"line\").attr(\"x1\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"y1\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding + titleHeight + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.dividerMargin / 2).attr(\"y2\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding + titleHeight + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.dividerMargin / 2).attr(\"class\", \"descr-divider\");\n const descrBox = description.node().getBBox();\n const width = Math.max(descrBox.width, titleBox.width);\n descrLine.attr(\"x2\", width + 3 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding);\n g.insert(\"rect\", \":first-child\").attr(\"x\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"y\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"width\", width + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"height\", descrBox.height + titleHeight + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"rx\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.radius);\n return g;\n}, \"drawDescrState\");\nvar addTitleAndBox = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((g, stateDef, altBkg) => {\n const pad = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding;\n const dblPad = 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding;\n const orgBox = g.node().getBBox();\n const orgWidth = orgBox.width;\n const orgX = orgBox.x;\n const title = g.append(\"text\").attr(\"x\", 0).attr(\"y\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.titleShift).attr(\"font-size\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.fontSize).attr(\"class\", \"state-title\").text(stateDef.id);\n const titleBox = title.node().getBBox();\n const titleWidth = titleBox.width + dblPad;\n let width = Math.max(titleWidth, orgWidth);\n if (width === orgWidth) {\n width = width + dblPad;\n }\n let startX;\n const graphBox = g.node().getBBox();\n if (stateDef.doc) {\n }\n startX = orgX - pad;\n if (titleWidth > orgWidth) {\n startX = (orgWidth - width) / 2 + pad;\n }\n if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) {\n startX = orgX - (titleWidth - orgWidth) / 2;\n }\n const lineY = 1 - (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight;\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\"y\", lineY).attr(\"class\", altBkg ? \"alt-composit\" : \"composit\").attr(\"width\", width).attr(\n \"height\",\n graphBox.height + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.titleShift + 1\n ).attr(\"rx\", \"0\");\n title.attr(\"x\", startX + pad);\n if (titleWidth <= orgWidth) {\n title.attr(\"x\", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);\n }\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\n \"y\",\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.titleShift - (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight - (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding\n ).attr(\"width\", width).attr(\"height\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight * 3).attr(\"rx\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.radius);\n g.insert(\"rect\", \":first-child\").attr(\"x\", startX).attr(\n \"y\",\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.titleShift - (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight - (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding\n ).attr(\"width\", width).attr(\"height\", graphBox.height + 3 + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.textHeight).attr(\"rx\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.radius);\n return g;\n}, \"addTitleAndBox\");\nvar drawEndState = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((g) => {\n g.append(\"circle\").attr(\"class\", \"end-state-outer\").attr(\"r\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.miniPadding).attr(\n \"cx\",\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.miniPadding\n ).attr(\n \"cy\",\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.miniPadding\n );\n return g.append(\"circle\").attr(\"class\", \"end-state-inner\").attr(\"r\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit).attr(\"cx\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit + 2).attr(\"cy\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.sizeUnit + 2);\n}, \"drawEndState\");\nvar drawForkJoinState = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((g, stateDef) => {\n let width = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.forkWidth;\n let height = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.forkHeight;\n if (stateDef.parentId) {\n let tmp = width;\n width = height;\n height = tmp;\n }\n return g.append(\"rect\").style(\"stroke\", \"black\").style(\"fill\", \"black\").attr(\"width\", width).attr(\"height\", height).attr(\"x\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"y\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding);\n}, \"drawForkJoinState\");\nvar _drawLongText = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((_text, x, y, g) => {\n let textHeight = 0;\n const textElem = g.append(\"text\");\n textElem.style(\"text-anchor\", \"start\");\n textElem.attr(\"class\", \"noteText\");\n let text = _text.replace(/\\r\\n/g, \"<br/>\");\n text = text.replace(/\\n/g, \"<br/>\");\n const lines = text.split(_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.common_default.lineBreakRegex);\n let tHeight = 1.25 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.noteMargin;\n for (const line2 of lines) {\n const txt = line2.trim();\n if (txt.length > 0) {\n const span = textElem.append(\"tspan\");\n span.text(txt);\n if (tHeight === 0) {\n const textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n textHeight += tHeight;\n span.attr(\"x\", x + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.noteMargin);\n span.attr(\"y\", y + textHeight + 1.25 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.noteMargin);\n }\n }\n return { textWidth: textElem.node().getBBox().width, textHeight };\n}, \"_drawLongText\");\nvar drawNote = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((text, g) => {\n g.attr(\"class\", \"state-note\");\n const note = g.append(\"rect\").attr(\"x\", 0).attr(\"y\", (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding);\n const rectElem = g.append(\"g\");\n const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);\n note.attr(\"height\", textHeight + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.noteMargin);\n note.attr(\"width\", textWidth + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.noteMargin * 2);\n return note;\n}, \"drawNote\");\nvar drawState = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)(function(elem, stateDef) {\n const id = stateDef.id;\n const stateInfo = {\n id,\n label: stateDef.id,\n width: 0,\n height: 0\n };\n const g = elem.append(\"g\").attr(\"id\", id).attr(\"class\", \"stateGroup\");\n if (stateDef.type === \"start\") {\n drawStartState(g);\n }\n if (stateDef.type === \"end\") {\n drawEndState(g);\n }\n if (stateDef.type === \"fork\" || stateDef.type === \"join\") {\n drawForkJoinState(g, stateDef);\n }\n if (stateDef.type === \"note\") {\n drawNote(stateDef.note.text, g);\n }\n if (stateDef.type === \"divider\") {\n drawDivider(g);\n }\n if (stateDef.type === \"default\" && stateDef.descriptions.length === 0) {\n drawSimpleState(g, stateDef);\n }\n if (stateDef.type === \"default\" && stateDef.descriptions.length > 0) {\n drawDescrState(g, stateDef);\n }\n const stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding;\n stateInfo.height = stateBox.height + 2 * (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding;\n return stateInfo;\n}, \"drawState\");\nvar edgeCount = 0;\nvar drawEdge = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)(function(elem, path, relation) {\n const getRelationType = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)(function(type) {\n switch (type) {\n case _chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__.StateDB.relationType.AGGREGATION:\n return \"aggregation\";\n case _chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__.StateDB.relationType.EXTENSION:\n return \"extension\";\n case _chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__.StateDB.relationType.COMPOSITION:\n return \"composition\";\n case _chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__.StateDB.relationType.DEPENDENCY:\n return \"dependency\";\n }\n }, \"getRelationType\");\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n const lineData = path.points;\n const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_13__.line)().x(function(d) {\n return d.x;\n }).y(function(d) {\n return d.y;\n }).curve(d3__WEBPACK_IMPORTED_MODULE_13__.curveBasis);\n const svgPath = elem.append(\"path\").attr(\"d\", lineFunction(lineData)).attr(\"id\", \"edge\" + edgeCount).attr(\"class\", \"transition\");\n let url = \"\";\n if ((0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.arrowMarkerAbsolute) {\n url = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getUrl)(true);\n }\n svgPath.attr(\n \"marker-end\",\n \"url(\" + url + \"#\" + getRelationType(_chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__.StateDB.relationType.DEPENDENCY) + \"End)\"\n );\n if (relation.title !== void 0) {\n const label = elem.append(\"g\").attr(\"class\", \"stateLabel\");\n const { x, y } = _chunk_5PVQY5BW_mjs__WEBPACK_IMPORTED_MODULE_10__.utils_default.calcLabelPosition(path.points);\n const rows = _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.common_default.getRows(relation.title);\n let titleHeight = 0;\n const titleRows = [];\n let maxWidth = 0;\n let minX = 0;\n for (let i = 0; i <= rows.length; i++) {\n const title = label.append(\"text\").attr(\"text-anchor\", \"middle\").text(rows[i]).attr(\"x\", x).attr(\"y\", y + titleHeight);\n const boundsTmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundsTmp.width);\n minX = Math.min(minX, boundsTmp.x);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.info(boundsTmp.x, x, y + titleHeight);\n if (titleHeight === 0) {\n const titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.info(\"Title height\", titleHeight, y);\n }\n titleRows.push(title);\n }\n let boxHeight = titleHeight * rows.length;\n if (rows.length > 1) {\n const heightAdj = (rows.length - 1) * titleHeight * 0.5;\n titleRows.forEach((title, i) => title.attr(\"y\", y + i * titleHeight - heightAdj));\n boxHeight = titleHeight * rows.length;\n }\n const bounds = label.node().getBBox();\n label.insert(\"rect\", \":first-child\").attr(\"class\", \"box\").attr(\"x\", x - maxWidth / 2 - (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding / 2).attr(\"y\", y - boxHeight / 2 - (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding / 2 - 3.5).attr(\"width\", maxWidth + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding).attr(\"height\", boxHeight + (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state.padding);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.info(bounds);\n }\n edgeCount++;\n}, \"drawEdge\");\n\n// src/diagrams/state/stateRenderer.js\nvar conf;\nvar transformationLog = {};\nvar setConf = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)(function() {\n}, \"setConf\");\nvar insertMarkers = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)(function(elem) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"dependencyEnd\").attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 19,7 L9,13 L14,7 L9,1 Z\");\n}, \"insertMarkers\");\nvar draw = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)(function(text, id, _version, diagObj) {\n conf = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().state;\n const securityLevel = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.getConfig2)().securityLevel;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_13__.select)(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? (0,d3__WEBPACK_IMPORTED_MODULE_13__.select)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_13__.select)(\"body\");\n const doc = securityLevel === \"sandbox\" ? sandboxElement.nodes()[0].contentDocument : document;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.debug(\"Rendering diagram \" + text);\n const diagram2 = root.select(`[id='${id}']`);\n insertMarkers(diagram2);\n const rootDoc = diagObj.db.getRootDoc();\n const rootG = diagram2.append(\"g\").attr(\"id\", id + \"-root\");\n renderDoc(rootDoc, rootG, void 0, false, root, doc, diagObj);\n const padding = conf.padding;\n const bounds = diagram2.node().getBBox();\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n const svgWidth = width * 1.75;\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.configureSvgSize)(diagram2, height, svgWidth, conf.useMaxWidth);\n diagram2.attr(\n \"viewBox\",\n `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + \" \" + height\n );\n}, \"draw\");\nvar getLabelWidth = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((text) => {\n return text ? text.length * conf.fontSizeFactor : 1;\n}, \"getLabelWidth\");\nvar renderDoc = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => {\n const graph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_15__.Graph({\n compound: true,\n multigraph: true\n });\n let i;\n let edgeFreeDoc = true;\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === \"relation\") {\n edgeFreeDoc = false;\n break;\n }\n }\n if (parentId) {\n graph.setGraph({\n rankdir: \"LR\",\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: \"tight-tree\",\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true\n // ranksep: 5,\n // nodesep: 1\n });\n } else {\n graph.setGraph({\n rankdir: \"TB\",\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: \"tight-tree\",\n // ranker: 'network-simplex'\n isMultiGraph: true\n });\n }\n graph.setDefaultEdgeLabel(function() {\n return {};\n });\n const states = diagObj.db.getStates();\n const relations = diagObj.db.getRelations();\n const keys = Object.keys(states);\n let first = true;\n for (const key of keys) {\n const stateDef = states[key];\n if (parentId) {\n stateDef.parentId = parentId;\n }\n let node;\n if (stateDef.doc) {\n let sub = diagram2.append(\"g\").attr(\"id\", stateDef.id).attr(\"class\", \"stateGroup\");\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);\n if (first) {\n sub = addTitleAndBox(sub, stateDef, altBkg);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n } else {\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height;\n }\n } else {\n node = drawState(diagram2, stateDef, graph);\n }\n if (stateDef.note) {\n const noteDef = {\n descriptions: [],\n id: stateDef.id + \"-note\",\n note: stateDef.note,\n type: \"note\"\n };\n const note = drawState(diagram2, noteDef, graph);\n if (stateDef.note.position === \"left of\") {\n graph.setNode(node.id + \"-note\", note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + \"-note\", note);\n }\n graph.setParent(node.id, node.id + \"-group\");\n graph.setParent(node.id + \"-note\", node.id + \"-group\");\n } else {\n graph.setNode(node.id, node);\n }\n }\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.debug(\"Count=\", graph.nodeCount(), graph);\n let cnt = 0;\n relations.forEach(function(relation) {\n cnt++;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.debug(\"Setting edge\", relation);\n graph.setEdge(\n relation.id1,\n relation.id2,\n {\n relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_11__.common_default.getRows(relation.title).length,\n labelpos: \"c\"\n },\n \"id\" + cnt\n );\n });\n (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_14__.layout)(graph);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.debug(\"Graph after layout\", graph.nodes());\n const svgElem = diagram2.node();\n graph.nodes().forEach(function(v) {\n if (v !== void 0 && graph.node(v) !== void 0) {\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.warn(\"Node \" + v + \": \" + JSON.stringify(graph.node(v)));\n root.select(\"#\" + svgElem.id + \" #\" + v).attr(\n \"transform\",\n \"translate(\" + (graph.node(v).x - graph.node(v).width / 2) + \",\" + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + \" )\"\n );\n root.select(\"#\" + svgElem.id + \" #\" + v).attr(\"data-x-shift\", graph.node(v).x - graph.node(v).width / 2);\n const dividers = domDocument.querySelectorAll(\"#\" + svgElem.id + \" #\" + v + \" .divider\");\n dividers.forEach((divider) => {\n const parent = divider.parentElement;\n let pWidth = 0;\n let pShift = 0;\n if (parent) {\n if (parent.parentElement) {\n pWidth = parent.parentElement.getBBox().width;\n }\n pShift = parseInt(parent.getAttribute(\"data-x-shift\"), 10);\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n divider.setAttribute(\"x1\", 0 - pShift + 8);\n divider.setAttribute(\"x2\", pWidth - pShift - 8);\n });\n } else {\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.debug(\"No Node \" + v + \": \" + JSON.stringify(graph.node(v)));\n }\n });\n let stateBox = svgElem.getBBox();\n graph.edges().forEach(function(e) {\n if (e !== void 0 && graph.edge(e) !== void 0) {\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.debug(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n drawEdge(diagram2, graph.edge(e), graph.edge(e).relation);\n }\n });\n stateBox = svgElem.getBBox();\n const stateInfo = {\n id: parentId ? parentId : \"root\",\n label: parentId ? parentId : \"root\",\n width: 0,\n height: 0\n };\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.log.debug(\"Doc rendered\", stateInfo, graph);\n return stateInfo;\n}, \"renderDoc\");\nvar stateRenderer_default = {\n setConf,\n draw\n};\n\n// src/diagrams/state/stateDiagram.ts\nvar diagram = {\n parser: _chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__.stateDiagram_default,\n get db() {\n return new _chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__.StateDB(1);\n },\n renderer: stateRenderer_default,\n styles: _chunk_OYMX7WX6_mjs__WEBPACK_IMPORTED_MODULE_0__.styles_default,\n init: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_12__.__name)((cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n }, \"init\")\n};\n\n\n\n//# sourceURL=webpack://@mdts/frontend/./node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FHFEXIEX.mjs?\n}");
|
|
19
|
+
|
|
20
|
+
/***/ }
|
|
21
|
+
|
|
22
|
+
}]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
4
|
+
* This devtool is neither made for production nor for readable output files.
|
|
5
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
6
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
7
|
+
* or disable the default devtool with "devtool: false".
|
|
8
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
9
|
+
*/
|
|
10
|
+
(self["webpackChunk_mdts_frontend"] = self["webpackChunk_mdts_frontend"] || []).push([["vendors-node_modules_mermaid_dist_chunks_mermaid_core_timeline-definition-GMOUNBTQ_mjs"],{
|
|
11
|
+
|
|
12
|
+
/***/ "./node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.mjs"
|
|
13
|
+
/*!****************************************************************************************!*\
|
|
14
|
+
!*** ./node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.mjs ***!
|
|
15
|
+
\****************************************************************************************/
|
|
16
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
17
|
+
|
|
18
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ diagram: () => (/* binding */ diagram)\n/* harmony export */ });\n/* harmony import */ var _chunk_426QAEUC_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-426QAEUC.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-426QAEUC.mjs\");\n/* harmony import */ var _chunk_5PVQY5BW_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-5PVQY5BW.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.mjs\");\n/* harmony import */ var _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-ICPOFSXX.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.mjs\");\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/is_dark.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/lighten.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/darken.js\");\n\n\n\n\n\n// src/diagrams/timeline/parser/timeline.jison\nvar parser = (function() {\n var o = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n return o2;\n }, \"o\"), $V0 = [6, 11, 13, 14, 15, 17, 19, 20, 23, 24], $V1 = [1, 12], $V2 = [1, 13], $V3 = [1, 14], $V4 = [1, 15], $V5 = [1, 16], $V6 = [1, 19], $V7 = [1, 20];\n var parser2 = {\n trace: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function trace() {\n }, \"trace\"),\n yy: {},\n symbols_: { \"error\": 2, \"start\": 3, \"timeline_header\": 4, \"document\": 5, \"EOF\": 6, \"timeline\": 7, \"timeline_lr\": 8, \"timeline_td\": 9, \"line\": 10, \"SPACE\": 11, \"statement\": 12, \"NEWLINE\": 13, \"title\": 14, \"acc_title\": 15, \"acc_title_value\": 16, \"acc_descr\": 17, \"acc_descr_value\": 18, \"acc_descr_multiline_value\": 19, \"section\": 20, \"period_statement\": 21, \"event_statement\": 22, \"period\": 23, \"event\": 24, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 6: \"EOF\", 7: \"timeline\", 8: \"timeline_lr\", 9: \"timeline_td\", 11: \"SPACE\", 13: \"NEWLINE\", 14: \"title\", 15: \"acc_title\", 16: \"acc_title_value\", 17: \"acc_descr\", 18: \"acc_descr_value\", 19: \"acc_descr_multiline_value\", 20: \"section\", 23: \"period\", 24: \"event\" },\n productions_: [0, [3, 3], [4, 1], [4, 1], [4, 1], [5, 0], [5, 2], [10, 2], [10, 1], [10, 1], [10, 1], [12, 1], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [21, 1], [22, 1]],\n performAction: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 1:\n return $$[$0 - 1];\n // removed by dead control flow\n\n case 3:\n yy.setDirection(\"LR\");\n break;\n case 4:\n yy.setDirection(\"TD\");\n break;\n case 5:\n this.$ = [];\n break;\n case 6:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n case 7:\n case 8:\n this.$ = $$[$0];\n break;\n case 9:\n case 10:\n this.$ = [];\n break;\n case 11:\n yy.getCommonDb().setDiagramTitle($$[$0].substr(6));\n this.$ = $$[$0].substr(6);\n break;\n case 12:\n this.$ = $$[$0].trim();\n yy.getCommonDb().setAccTitle(this.$);\n break;\n case 13:\n case 14:\n this.$ = $$[$0].trim();\n yy.getCommonDb().setAccDescription(this.$);\n break;\n case 15:\n yy.addSection($$[$0].substr(8));\n this.$ = $$[$0].substr(8);\n break;\n case 18:\n yy.addTask($$[$0], 0, \"\");\n this.$ = $$[$0];\n break;\n case 19:\n yy.addEvent($$[$0].substr(2));\n this.$ = $$[$0];\n break;\n }\n }, \"anonymous\"),\n table: [{ 3: 1, 4: 2, 7: [1, 3], 8: [1, 4], 9: [1, 5] }, { 1: [3] }, o($V0, [2, 5], { 5: 6 }), o($V0, [2, 2]), o($V0, [2, 3]), o($V0, [2, 4]), { 6: [1, 7], 10: 8, 11: [1, 9], 12: 10, 13: [1, 11], 14: $V1, 15: $V2, 17: $V3, 19: $V4, 20: $V5, 21: 17, 22: 18, 23: $V6, 24: $V7 }, o($V0, [2, 10], { 1: [2, 1] }), o($V0, [2, 6]), { 12: 21, 14: $V1, 15: $V2, 17: $V3, 19: $V4, 20: $V5, 21: 17, 22: 18, 23: $V6, 24: $V7 }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 11]), { 16: [1, 22] }, { 18: [1, 23] }, o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 7]), o($V0, [2, 12]), o($V0, [2, 13])],\n defaultActions: {},\n parseError: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n }, \"parseError\"),\n parse: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(popStack, \"popStack\");\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(lex, \"lex\");\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }, \"parse\")\n };\n var lexer = /* @__PURE__ */ (function() {\n var lexer2 = {\n EOF: 1,\n parseError: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n }, \"parseError\"),\n // resets the lexer, sets new input\n setInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n }, \"setInput\"),\n // consumes and returns one char from the input\n input: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n }, \"input\"),\n // unshifts one char (or a string) into the input\n unput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n }, \"unput\"),\n // When called from action, caches matched text and appends it on next action\n more: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n this._more = true;\n return this;\n }, \"more\"),\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n }, \"reject\"),\n // retain first n characters of the match\n less: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(n) {\n this.unput(this.match.slice(n));\n }, \"less\"),\n // displays already matched input, i.e. for error messages\n pastInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n }, \"pastInput\"),\n // displays upcoming input, i.e. for error messages\n upcomingInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n }, \"upcomingInput\"),\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n }, \"showPosition\"),\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n }, \"test_match\"),\n // return next match in input\n next: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n }, \"next\"),\n // return next match that has a token\n lex: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n }, \"lex\"),\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function begin(condition) {\n this.conditionStack.push(condition);\n }, \"begin\"),\n // pop the previously active lexer condition state off the condition stack\n popState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n }, \"popState\"),\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n }, \"_currentRules\"),\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n }, \"topState\"),\n // alias for begin(condition)\n pushState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function pushState(condition) {\n this.begin(condition);\n }, \"pushState\"),\n // return the number of states currently on the stack\n stateStackSize: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function stateStackSize() {\n return this.conditionStack.length;\n }, \"stateStackSize\"),\n options: { \"case-insensitive\": true },\n performAction: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n switch ($avoiding_name_collisions) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n return 13;\n // removed by dead control flow\n\n case 3:\n break;\n case 4:\n break;\n case 5:\n return 8;\n // removed by dead control flow\n\n case 6:\n return 9;\n // removed by dead control flow\n\n case 7:\n return 7;\n // removed by dead control flow\n\n case 8:\n return 14;\n // removed by dead control flow\n\n case 9:\n this.begin(\"acc_title\");\n return 15;\n // removed by dead control flow\n\n case 10:\n this.popState();\n return \"acc_title_value\";\n // removed by dead control flow\n\n case 11:\n this.begin(\"acc_descr\");\n return 17;\n // removed by dead control flow\n\n case 12:\n this.popState();\n return \"acc_descr_value\";\n // removed by dead control flow\n\n case 13:\n this.begin(\"acc_descr_multiline\");\n break;\n case 14:\n this.popState();\n break;\n case 15:\n return \"acc_descr_multiline_value\";\n // removed by dead control flow\n\n case 16:\n return 20;\n // removed by dead control flow\n\n case 17:\n return 24;\n // removed by dead control flow\n\n case 18:\n return 23;\n // removed by dead control flow\n\n case 19:\n return 6;\n // removed by dead control flow\n\n case 20:\n return \"INVALID\";\n // removed by dead control flow\n\n }\n }, \"anonymous\"),\n rules: [/^(?:%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:[\\n]+)/i, /^(?:\\s+)/i, /^(?:#[^\\n]*)/i, /^(?:timeline[ \\t]+LR\\b)/i, /^(?:timeline[ \\t]+TD\\b)/i, /^(?:timeline\\b)/i, /^(?:title\\s[^\\n]+)/i, /^(?:accTitle\\s*:\\s*)/i, /^(?:(?!\\n||)*[^\\n]*)/i, /^(?:accDescr\\s*:\\s*)/i, /^(?:(?!\\n||)*[^\\n]*)/i, /^(?:accDescr\\s*\\{\\s*)/i, /^(?:[\\}])/i, /^(?:[^\\}]*)/i, /^(?:section\\s[^:\\n]+)/i, /^(?::\\s(?:[^:\\n]|:(?!\\s))+)/i, /^(?:[^#:\\n]+)/i, /^(?:$)/i, /^(?:.)/i],\n conditions: { \"acc_descr_multiline\": { \"rules\": [14, 15], \"inclusive\": false }, \"acc_descr\": { \"rules\": [12], \"inclusive\": false }, \"acc_title\": { \"rules\": [10], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 16, 17, 18, 19, 20], \"inclusive\": true } }\n };\n return lexer2;\n })();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(Parser, \"Parser\");\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n})();\nparser.parser = parser;\nvar timeline_default = parser;\n\n// src/diagrams/timeline/timelineDb.js\nvar timelineDb_exports = {};\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__export)(timelineDb_exports, {\n addEvent: () => addEvent,\n addSection: () => addSection,\n addTask: () => addTask,\n addTaskOrg: () => addTaskOrg,\n clear: () => clear2,\n default: () => timelineDb_default,\n getCommonDb: () => getCommonDb,\n getDirection: () => getDirection,\n getSections: () => getSections,\n getTasks: () => getTasks,\n setDirection: () => setDirection\n});\nvar currentSection = \"\";\nvar currentTaskId = 0;\nvar direction = \"LR\";\nvar sections = [];\nvar tasks = [];\nvar rawTasks = [];\nvar getCommonDb = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.commonDb_exports, \"getCommonDb\");\nvar clear2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n sections.length = 0;\n tasks.length = 0;\n currentSection = \"\";\n rawTasks.length = 0;\n direction = \"LR\";\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.clear)();\n}, \"clear\");\nvar setDirection = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(dir) {\n direction = dir;\n}, \"setDirection\");\nvar getDirection = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n return direction;\n}, \"getDirection\");\nvar addSection = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(txt) {\n currentSection = txt;\n sections.push(txt);\n}, \"addSection\");\nvar getSections = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n return sections;\n}, \"getSections\");\nvar getTasks = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n let allItemsProcessed = compileTasks();\n const maxDepth = 100;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n tasks.push(...rawTasks);\n return tasks;\n}, \"getTasks\");\nvar addTask = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(period, length, event) {\n const rawTask = {\n id: currentTaskId++,\n section: currentSection,\n type: currentSection,\n task: period,\n score: length ? length : 0,\n //if event is defined, then add it the events array\n events: event ? [event] : []\n };\n rawTasks.push(rawTask);\n}, \"addTask\");\nvar addEvent = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(event) {\n const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1);\n currentTask.events.push(event);\n}, \"addEvent\");\nvar addTaskOrg = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(descr) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: []\n };\n tasks.push(newTask);\n}, \"addTaskOrg\");\nvar compileTasks = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n const compileTask = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(pos) {\n return rawTasks[pos].processed;\n }, \"compileTask\");\n let allProcessed = true;\n for (const [i, rawTask] of rawTasks.entries()) {\n compileTask(i);\n allProcessed = allProcessed && rawTask.processed;\n }\n return allProcessed;\n}, \"compileTasks\");\nvar timelineDb_default = {\n clear: clear2,\n getCommonDb,\n getDirection,\n setDirection,\n addSection,\n getSections,\n getTasks,\n addTask,\n addTaskOrg,\n addEvent\n};\n\n// src/diagrams/timeline/timelineRenderer.ts\n\n\n// src/diagrams/timeline/svgDraw.js\n\nvar nodeCount = 0;\nvar drawRect = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, rectData) {\n const rectElem = elem.append(\"rect\");\n rectElem.attr(\"x\", rectData.x);\n rectElem.attr(\"y\", rectData.y);\n rectElem.attr(\"fill\", rectData.fill);\n rectElem.attr(\"stroke\", rectData.stroke);\n rectElem.attr(\"width\", rectData.width);\n rectElem.attr(\"height\", rectData.height);\n rectElem.attr(\"rx\", rectData.rx);\n rectElem.attr(\"ry\", rectData.ry);\n if (rectData.class !== void 0) {\n rectElem.attr(\"class\", rectData.class);\n }\n return rectElem;\n}, \"drawRect\");\nvar drawFace = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(element, faceData) {\n const radius = 15;\n const circleElement = element.append(\"circle\").attr(\"cx\", faceData.cx).attr(\"cy\", faceData.cy).attr(\"class\", \"face\").attr(\"r\", radius).attr(\"stroke-width\", 2).attr(\"overflow\", \"visible\");\n const face = element.append(\"g\");\n face.append(\"circle\").attr(\"cx\", faceData.cx - radius / 3).attr(\"cy\", faceData.cy - radius / 3).attr(\"r\", 1.5).attr(\"stroke-width\", 2).attr(\"fill\", \"#666\").attr(\"stroke\", \"#666\");\n face.append(\"circle\").attr(\"cx\", faceData.cx + radius / 3).attr(\"cy\", faceData.cy - radius / 3).attr(\"r\", 1.5).attr(\"stroke-width\", 2).attr(\"fill\", \"#666\").attr(\"stroke\", \"#666\");\n function smile(face2) {\n const arc = (0,d3__WEBPACK_IMPORTED_MODULE_4__.arc)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);\n face2.append(\"path\").attr(\"class\", \"mouth\").attr(\"d\", arc).attr(\"transform\", \"translate(\" + faceData.cx + \",\" + (faceData.cy + 2) + \")\");\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(smile, \"smile\");\n function sad(face2) {\n const arc = (0,d3__WEBPACK_IMPORTED_MODULE_4__.arc)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);\n face2.append(\"path\").attr(\"class\", \"mouth\").attr(\"d\", arc).attr(\"transform\", \"translate(\" + faceData.cx + \",\" + (faceData.cy + 7) + \")\");\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(sad, \"sad\");\n function ambivalent(face2) {\n face2.append(\"line\").attr(\"class\", \"mouth\").attr(\"stroke\", 2).attr(\"x1\", faceData.cx - 5).attr(\"y1\", faceData.cy + 7).attr(\"x2\", faceData.cx + 5).attr(\"y2\", faceData.cy + 7).attr(\"class\", \"mouth\").attr(\"stroke-width\", \"1px\").attr(\"stroke\", \"#666\");\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(ambivalent, \"ambivalent\");\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n return circleElement;\n}, \"drawFace\");\nvar drawCircle = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(element, circleData) {\n const circleElement = element.append(\"circle\");\n circleElement.attr(\"cx\", circleData.cx);\n circleElement.attr(\"cy\", circleData.cy);\n circleElement.attr(\"class\", \"actor-\" + circleData.pos);\n circleElement.attr(\"fill\", circleData.fill);\n circleElement.attr(\"stroke\", circleData.stroke);\n circleElement.attr(\"r\", circleData.r);\n if (circleElement.class !== void 0) {\n circleElement.attr(\"class\", circleElement.class);\n }\n if (circleData.title !== void 0) {\n circleElement.append(\"title\").text(circleData.title);\n }\n return circleElement;\n}, \"drawCircle\");\nvar drawText = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, textData) {\n const nText = textData.text.replace(/<br\\s*\\/?>/gi, \" \");\n const textElem = elem.append(\"text\");\n textElem.attr(\"x\", textData.x);\n textElem.attr(\"y\", textData.y);\n textElem.attr(\"class\", \"legend\");\n textElem.style(\"text-anchor\", textData.anchor);\n if (textData.class !== void 0) {\n textElem.attr(\"class\", textData.class);\n }\n const span = textElem.append(\"tspan\");\n span.attr(\"x\", textData.x + textData.textMargin * 2);\n span.text(nText);\n return textElem;\n}, \"drawText\");\nvar drawLabel = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, txtObject) {\n function genPoints(x, y, width, height, cut) {\n return x + \",\" + y + \" \" + (x + width) + \",\" + y + \" \" + (x + width) + \",\" + (y + height - cut) + \" \" + (x + width - cut * 1.2) + \",\" + (y + height) + \" \" + x + \",\" + (y + height);\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(genPoints, \"genPoints\");\n const polygon = elem.append(\"polygon\");\n polygon.attr(\"points\", genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr(\"class\", \"labelBox\");\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n}, \"drawLabel\");\nvar drawSection = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, section, conf) {\n const g = elem.append(\"g\");\n const rect = getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = \"journey-section section-type-\" + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n _drawTextCandidateFunc(conf)(\n section.text,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: \"journey-section section-type-\" + section.num },\n conf,\n section.colour\n );\n}, \"drawSection\");\nvar taskCount = -1;\nvar drawTask = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, task, conf, diagramId) {\n const center = task.x + conf.width / 2;\n const g = elem.append(\"g\");\n taskCount++;\n const maxHeight = 300 + 5 * 30;\n g.append(\"line\").attr(\"id\", diagramId + \"-task\" + taskCount).attr(\"x1\", center).attr(\"y1\", task.y).attr(\"x2\", center).attr(\"y2\", maxHeight).attr(\"class\", \"task-line\").attr(\"stroke-width\", \"1px\").attr(\"stroke-dasharray\", \"4 2\").attr(\"stroke\", \"#666\");\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score\n });\n const rect = getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = \"task task-type-\" + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n _drawTextCandidateFunc(conf)(\n task.task,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: \"task\" },\n conf,\n task.colour\n );\n}, \"drawTask\");\nvar drawBackgroundRect = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, bounds) {\n const rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n class: \"rect\"\n });\n rectElem.lower();\n}, \"drawBackgroundRect\");\nvar getTextObj = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n return {\n x: 0,\n y: 0,\n fill: void 0,\n \"text-anchor\": \"start\",\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0\n };\n}, \"getTextObj\");\nvar getNoteRect = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n return {\n x: 0,\n y: 0,\n width: 100,\n anchor: \"start\",\n height: 100,\n rx: 0,\n ry: 0\n };\n}, \"getNoteRect\");\nvar _drawTextCandidateFunc = /* @__PURE__ */ (function() {\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n const text = g.append(\"text\").attr(\"x\", x + width / 2).attr(\"y\", y + height / 2 + 5).style(\"font-color\", colour).style(\"text-anchor\", \"middle\").text(content);\n _setTextAttrs(text, textAttrs);\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(byText, \"byText\");\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n const { taskFontSize, taskFontFamily } = conf;\n const lines = content.split(/<br\\s*\\/?>/gi);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;\n const text = g.append(\"text\").attr(\"x\", x + width / 2).attr(\"y\", y).attr(\"fill\", colour).style(\"text-anchor\", \"middle\").style(\"font-size\", taskFontSize).style(\"font-family\", taskFontFamily);\n text.append(\"tspan\").attr(\"x\", x + width / 2).attr(\"dy\", dy).text(lines[i]);\n text.attr(\"y\", y + height / 2).attr(\"dominant-baseline\", \"central\").attr(\"alignment-baseline\", \"central\");\n _setTextAttrs(text, textAttrs);\n }\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(byTspan, \"byTspan\");\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const body = g.append(\"switch\");\n const f = body.append(\"foreignObject\").attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height).attr(\"position\", \"fixed\");\n const text = f.append(\"xhtml:div\").style(\"display\", \"table\").style(\"height\", \"100%\").style(\"width\", \"100%\");\n text.append(\"div\").attr(\"class\", \"label\").style(\"display\", \"table-cell\").style(\"text-align\", \"center\").style(\"vertical-align\", \"middle\").text(content);\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(byFo, \"byFo\");\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(_setTextAttrs, \"_setTextAttrs\");\n return function(conf) {\n return conf.textPlacement === \"fo\" ? byFo : conf.textPlacement === \"old\" ? byText : byTspan;\n };\n})();\nvar initGraphics = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(graphics, id) {\n nodeCount = 0;\n taskCount = -1;\n graphics.append(\"defs\").append(\"marker\").attr(\"id\", id + \"-arrowhead\").attr(\"refX\", 5).attr(\"refY\", 2).attr(\"markerWidth\", 6).attr(\"markerHeight\", 4).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0,0 V 4 L6,2 Z\");\n}, \"initGraphics\");\nfunction wrap(text, width) {\n text.each(function() {\n var text2 = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(this), words = text2.text().split(/(\\s+|<br>)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr(\"y\"), dy = parseFloat(text2.attr(\"dy\")), tspan = text2.text(null).append(\"tspan\").attr(\"x\", 0).attr(\"y\", y).attr(\"dy\", dy + \"em\");\n for (let j = 0; j < words.length; j++) {\n word = words[words.length - 1 - j];\n line.push(word);\n tspan.text(line.join(\" \").trim());\n if (tspan.node().getComputedTextLength() > width || word === \"<br>\") {\n line.pop();\n tspan.text(line.join(\" \").trim());\n if (word === \"<br>\") {\n line = [\"\"];\n } else {\n line = [word];\n }\n tspan = text2.append(\"tspan\").attr(\"x\", 0).attr(\"y\", y).attr(\"dy\", lineHeight + \"em\").text(word);\n }\n }\n });\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(wrap, \"wrap\");\nvar drawNode = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, node, fullSection, conf, diagramId, isEvent = false) {\n const { theme, look } = conf;\n const isReduxTheme = theme?.includes(\"redux\");\n const maxSections = conf?.themeVariables?.THEME_COLOR_LIMIT ?? 12;\n const section = fullSection % maxSections - 1;\n const nodeElem = elem.append(\"g\");\n node.section = section;\n nodeElem.attr(\n \"class\",\n (node.class ? node.class + \" \" : \"\") + \"timeline-node \" + (\"section-\" + section)\n );\n const bkgElem = nodeElem.append(\"g\");\n const textElem = nodeElem.append(\"g\");\n const txt = textElem.append(\"text\").text(node.descr).attr(\"dy\", \"1em\").attr(\"alignment-baseline\", \"middle\").attr(\"dominant-baseline\", \"middle\").attr(\"text-anchor\", \"middle\").call(wrap, node.width);\n const bbox = txt.node().getBBox();\n const fontSize = conf.fontSize?.replace ? conf.fontSize.replace(\"px\", \"\") : conf.fontSize;\n node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;\n node.height = Math.max(node.height, node.maxHeight);\n node.width = node.width + 2 * node.padding;\n textElem.attr(\"transform\", \"translate(\" + node.width / 2 + \", \" + node.padding / 2 + \")\");\n if (isReduxTheme) {\n textElem.attr(\n \"transform\",\n `translate(${node.width / 2}, ${isEvent ? node.padding / 2 + 3 : node.padding})`\n );\n }\n defaultBkg(bkgElem, node, section, diagramId, conf);\n if (look === \"neo\") {\n nodeElem.attr(\"data-look\", `neo`);\n if (isReduxTheme) {\n const isDark2 = theme.includes(\"dark\");\n const rootSvgNode = elem.node()?.ownerSVGElement ?? elem.node();\n const rootSvg = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(rootSvgNode);\n const svgId = rootSvg.attr(\"id\") ?? \"\";\n const dropShadowId = svgId ? `${svgId}-drop-shadow` : \"drop-shadow\";\n if (rootSvg.select(`#${dropShadowId}`).empty()) {\n const existingDefs = rootSvg.select(\"defs\");\n const defsEl = existingDefs.empty() ? rootSvg.append(\"defs\") : existingDefs;\n defsEl.append(\"filter\").attr(\"id\", dropShadowId).attr(\"height\", \"130%\").attr(\"width\", \"130%\").append(\"feDropShadow\").attr(\"dx\", \"4\").attr(\"dy\", \"4\").attr(\"stdDeviation\", 0).attr(\"flood-opacity\", isDark2 ? \"0.2\" : \"0.06\").attr(\"flood-color\", isDark2 ? \"#FFFFFF\" : \"#000000\");\n }\n }\n }\n return node;\n}, \"drawNode\");\nvar getVirtualNodeHeight = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, node, conf) {\n const textElem = elem.append(\"g\");\n const txt = textElem.append(\"text\").text(node.descr).attr(\"dy\", \"1em\").attr(\"alignment-baseline\", \"middle\").attr(\"dominant-baseline\", \"middle\").attr(\"text-anchor\", \"middle\").call(wrap, node.width);\n const bbox = txt.node().getBBox();\n const fontSize = conf.fontSize?.replace ? conf.fontSize.replace(\"px\", \"\") : conf.fontSize;\n textElem.remove();\n return bbox.height + fontSize * 1.1 * 0.5 + node.padding;\n}, \"getVirtualNodeHeight\");\nvar defaultBkg = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(elem, node, section, diagramId, config) {\n const { theme } = config;\n const r = theme?.includes(\"redux\") ? 0 : 5;\n const rd = 5;\n const d = r > 0 ? `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-${r},${r},-${r} h${node.width - 2 * rd} q${r},0,${r},${r} v${node.height - rd} H0 Z` : `M0 ${node.height - rd} v${-(node.height - rd)} h${node.width} v${node.height} H0 Z`;\n elem.append(\"path\").attr(\"id\", diagramId + \"-node-\" + nodeCount++).attr(\"class\", \"node-bkg node-\" + node.type).attr(\"d\", d);\n if (!theme?.includes(\"redux\")) {\n elem.append(\"line\").attr(\"class\", \"node-line-\" + section).attr(\"x1\", 0).attr(\"y1\", node.height).attr(\"x2\", node.width).attr(\"y2\", node.height);\n }\n}, \"defaultBkg\");\nvar svgDraw_default = {\n drawRect,\n drawCircle,\n drawSection,\n drawText,\n drawLabel,\n drawTask,\n drawBackgroundRect,\n getTextObj,\n getNoteRect,\n initGraphics,\n drawNode,\n getVirtualNodeHeight\n};\n\n// src/diagrams/timeline/timelineRenderer.ts\nvar draw = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(text, id, version, diagObj) {\n const conf = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getConfig2)();\n const { look, theme, themeVariables } = conf;\n const { useGradient, gradientStart, gradientStop } = themeVariables;\n const LEFT_MARGIN = conf.timeline?.leftMargin ?? 50;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"timeline\", diagObj.db);\n const securityLevel = conf.securityLevel;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(\"body\");\n const svg = root.select(\"#\" + id);\n svg.append(\"g\");\n const tasks2 = diagObj.db.getTasks();\n const title = diagObj.db.getCommonDb().getDiagramTitle();\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"task\", tasks2);\n svgDraw_default.initGraphics(svg, id);\n const sections2 = diagObj.db.getSections();\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"sections\", sections2);\n let maxSectionHeight = 0;\n let maxTaskHeight = 0;\n let depthY = 0;\n let sectionBeginY = 0;\n let masterX = 50 + LEFT_MARGIN;\n let masterY = 50;\n sectionBeginY = 50;\n let sectionNumber = 0;\n let hasSections = true;\n sections2.forEach(function(section) {\n const sectionNode = {\n number: sectionNumber,\n descr: section,\n section: sectionNumber,\n width: 150,\n padding: 20,\n maxHeight: maxSectionHeight\n };\n const sectionHeight = svgDraw_default.getVirtualNodeHeight(svg, sectionNode, conf);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"sectionHeight before draw\", sectionHeight);\n maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20);\n });\n let maxEventCount = 0;\n let maxEventLineLength = 0;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"tasks.length\", tasks2.length);\n for (const [i, task] of tasks2.entries()) {\n const taskNode = {\n number: i,\n descr: task,\n section: task.section,\n width: 150,\n padding: 20,\n maxHeight: maxTaskHeight\n };\n const taskHeight = svgDraw_default.getVirtualNodeHeight(svg, taskNode, conf);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"taskHeight before draw\", taskHeight);\n maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20);\n maxEventCount = Math.max(maxEventCount, task.events.length);\n let maxEventLineLengthTemp = 0;\n for (const event of task.events) {\n const eventNode = {\n descr: event,\n section: task.section,\n number: task.section,\n width: 150,\n padding: 20,\n maxHeight: 50\n };\n maxEventLineLengthTemp += svgDraw_default.getVirtualNodeHeight(svg, eventNode, conf);\n }\n if (task.events.length > 0) {\n maxEventLineLengthTemp += (task.events.length - 1) * 10;\n }\n maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp);\n }\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"maxSectionHeight before draw\", maxSectionHeight);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"maxTaskHeight before draw\", maxTaskHeight);\n if (sections2 && sections2.length > 0) {\n sections2.forEach((section) => {\n const tasksForSection = tasks2.filter((task) => task.section === section);\n const sectionNode = {\n number: sectionNumber,\n descr: section,\n section: sectionNumber,\n width: 200 * Math.max(tasksForSection.length, 1) - 50,\n padding: 20,\n maxHeight: maxSectionHeight\n };\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"sectionNode\", sectionNode);\n const sectionNodeWrapper = svg.append(\"g\");\n const node = svgDraw_default.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf, id);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"sectionNode output\", node);\n sectionNodeWrapper.attr(\"transform\", `translate(${masterX}, ${sectionBeginY})`);\n masterY += maxSectionHeight + 50;\n if (tasksForSection.length > 0) {\n drawTasks(\n svg,\n tasksForSection,\n sectionNumber,\n masterX,\n masterY,\n maxTaskHeight,\n conf,\n maxEventCount,\n maxEventLineLength,\n maxSectionHeight,\n false,\n id\n );\n }\n masterX += 200 * Math.max(tasksForSection.length, 1);\n masterY = sectionBeginY;\n sectionNumber++;\n });\n } else {\n hasSections = false;\n drawTasks(\n svg,\n tasks2,\n sectionNumber,\n masterX,\n masterY,\n maxTaskHeight,\n conf,\n maxEventCount,\n maxEventLineLength,\n maxSectionHeight,\n true,\n id\n );\n }\n const box = svg.node().getBBox();\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"bounds\", box);\n if (title) {\n svg.append(\"text\").text(title).attr(\"x\", look === \"neo\" ? box.x * 2 + LEFT_MARGIN : box.width / 2 - LEFT_MARGIN).attr(\"font-size\", \"4ex\").attr(\"font-weight\", \"bold\").attr(\"y\", 20);\n }\n depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100;\n const lineWrapper = svg.append(\"g\").attr(\"class\", \"lineWrapper\");\n lineWrapper.append(\"line\").attr(\"x1\", LEFT_MARGIN).attr(\"y1\", depthY).attr(\"x2\", box.width + 3 * LEFT_MARGIN).attr(\"y2\", depthY).attr(\"stroke-width\", 4).attr(\"stroke\", \"black\").attr(\"marker-end\", `url(#${id}-arrowhead)`);\n if (look === \"neo\" && useGradient && theme !== \"neutral\") {\n const existingDefs = svg.select(\"defs\");\n const defsEl = existingDefs.empty() ? svg.append(\"defs\") : existingDefs;\n const gradient = defsEl.append(\"linearGradient\").attr(\"id\", svg.attr(\"id\") + \"-gradient\").attr(\"gradientUnits\", \"objectBoundingBox\").attr(\"x1\", \"0%\").attr(\"y1\", \"0%\").attr(\"x2\", \"100%\").attr(\"y2\", \"0%\");\n gradient.append(\"stop\").attr(\"offset\", \"0%\").attr(\"stop-color\", gradientStart).attr(\"stop-opacity\", 1);\n gradient.append(\"stop\").attr(\"offset\", \"100%\").attr(\"stop-color\", gradientStop).attr(\"stop-opacity\", 1);\n }\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.setupGraphViewbox)(\n void 0,\n svg,\n conf.timeline?.padding ?? 50,\n conf.timeline?.useMaxWidth ?? false\n );\n}, \"draw\");\nvar drawTasks = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections, diagramId) {\n for (const task of tasks2) {\n const taskNode = {\n descr: task.task,\n section: sectionColor,\n number: sectionColor,\n width: 150,\n padding: 20,\n maxHeight: maxTaskHeight\n };\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"taskNode\", taskNode);\n const taskWrapper = diagram2.append(\"g\").attr(\"class\", \"taskWrapper\");\n const node = svgDraw_default.drawNode(taskWrapper, taskNode, sectionColor, conf, diagramId);\n const taskHeight = node.height;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"taskHeight after draw\", taskHeight);\n taskWrapper.attr(\"transform\", `translate(${masterX}, ${masterY})`);\n maxTaskHeight = Math.max(maxTaskHeight, taskHeight);\n if (task.events) {\n const lineWrapper = diagram2.append(\"g\").attr(\"class\", \"lineWrapper\");\n let lineLength = maxTaskHeight;\n masterY += 100;\n lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf, diagramId);\n masterY -= 100;\n lineWrapper.append(\"line\").attr(\"x1\", masterX + 190 / 2).attr(\"y1\", masterY + maxTaskHeight).attr(\"x2\", masterX + 190 / 2).attr(\"y2\", masterY + maxTaskHeight + 100 + maxEventLineLength + 100).attr(\"stroke-width\", 2).attr(\"stroke\", \"black\").attr(\"marker-end\", `url(#${diagramId}-arrowhead)`).attr(\"stroke-dasharray\", \"5,5\");\n }\n masterX = masterX + 200;\n if (isWithoutSections && !conf.timeline?.disableMulticolor) {\n sectionColor++;\n }\n }\n masterY = masterY - 10;\n}, \"drawTasks\");\nvar drawEvents = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(diagram2, events, sectionColor, masterX, masterY, conf, diagramId) {\n let maxEventHeight = 0;\n const eventBeginY = masterY;\n masterY = masterY + 100;\n for (const event of events) {\n const eventNode = {\n descr: event,\n section: sectionColor,\n number: sectionColor,\n width: 150,\n padding: 20,\n maxHeight: 50\n };\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"eventNode\", eventNode);\n const eventWrapper = diagram2.append(\"g\").attr(\"class\", \"eventWrapper\");\n const node = svgDraw_default.drawNode(eventWrapper, eventNode, sectionColor, conf, diagramId, true);\n const eventHeight = node.height;\n maxEventHeight = maxEventHeight + eventHeight;\n eventWrapper.attr(\"transform\", `translate(${masterX}, ${masterY})`);\n masterY = masterY + 10 + eventHeight;\n }\n masterY = eventBeginY;\n return maxEventHeight;\n}, \"drawEvents\");\nvar timelineRenderer_default = {\n setConf: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n }, \"setConf\"),\n draw\n};\n\n// src/diagrams/timeline/timelineRendererVertical.ts\nvar NODE_WIDTH = 200;\nvar NODE_PADDING = 5;\nvar NODE_TOTAL_WIDTH = NODE_WIDTH + NODE_PADDING * 2;\nvar EVENT_WIDTH = NODE_WIDTH + 100;\nvar EVENT_TOTAL_WIDTH = EVENT_WIDTH + NODE_PADDING * 2;\nvar EVENT_SPACING = 10;\nvar EVENT_VERTICAL_GAP = 0;\nvar SECTION_TASK_GAP = 20;\nvar TASK_AXIS_GAP = 20;\nvar TASK_VERTICAL_GAP = 30;\nvar EVENT_AXIS_GAP = 50;\nvar draw2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(text, id, version, diagObj) {\n const conf = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getConfig2)();\n const LEFT_MARGIN = conf.timeline?.leftMargin ?? 50;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"timeline\", diagObj.db);\n const svg = (0,_chunk_426QAEUC_mjs__WEBPACK_IMPORTED_MODULE_0__.selectSvgElement)(id);\n svg.append(\"g\");\n const tasks2 = diagObj.db.getTasks();\n const title = diagObj.db.getCommonDb().getDiagramTitle();\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"task\", tasks2);\n svgDraw_default.initGraphics(svg);\n const sections2 = diagObj.db.getSections();\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"sections\", sections2);\n let maxSectionHeight = 0;\n let maxTaskHeight = 0;\n const masterX = 50 + LEFT_MARGIN;\n let masterY = 50;\n const contentTopY = masterY;\n const sectionBeginX = masterX;\n const leftWidth = NODE_TOTAL_WIDTH + TASK_AXIS_GAP;\n const rightWidth = EVENT_TOTAL_WIDTH + EVENT_AXIS_GAP;\n const axisX = sectionBeginX + leftWidth;\n let sectionNumber = 0;\n const hasSections = sections2 && sections2.length > 0;\n const timelineX = hasSections ? axisX : masterX + leftWidth;\n const sectionWidth = Math.max(50, leftWidth + rightWidth - NODE_PADDING * 2);\n sections2.forEach(function(section) {\n const sectionNode = {\n number: sectionNumber,\n descr: section,\n section: sectionNumber,\n width: sectionWidth,\n padding: NODE_PADDING,\n maxHeight: maxSectionHeight\n };\n const sectionHeight = svgDraw_default.getVirtualNodeHeight(svg, sectionNode, conf);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"sectionHeight before draw\", sectionHeight);\n maxSectionHeight = Math.max(maxSectionHeight, sectionHeight);\n });\n let maxEventStackHeight = 0;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"tasks.length\", tasks2.length);\n for (const [i, task] of tasks2.entries()) {\n const taskNode = {\n number: i,\n descr: task,\n section: task.section,\n width: NODE_WIDTH,\n padding: NODE_PADDING,\n maxHeight: maxTaskHeight\n };\n const taskHeight = svgDraw_default.getVirtualNodeHeight(svg, taskNode, conf);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"taskHeight before draw\", taskHeight);\n maxTaskHeight = Math.max(maxTaskHeight, taskHeight);\n let maxEventStackHeightTemp = 0;\n for (const event of task.events) {\n const eventNode = {\n descr: event,\n section: task.section,\n number: task.section,\n width: EVENT_WIDTH,\n padding: NODE_PADDING,\n maxHeight: 50\n };\n maxEventStackHeightTemp += svgDraw_default.getVirtualNodeHeight(svg, eventNode, conf);\n }\n if (task.events.length > 0) {\n maxEventStackHeightTemp += (task.events.length - 1) * EVENT_SPACING;\n }\n maxEventStackHeight = Math.max(maxEventStackHeight, maxEventStackHeightTemp) + EVENT_VERTICAL_GAP;\n }\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"maxSectionHeight before draw\", maxSectionHeight);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"maxTaskHeight before draw\", maxTaskHeight);\n const taskBlockHeight = Math.max(maxTaskHeight, maxEventStackHeight);\n const taskSpacing = taskBlockHeight + TASK_VERTICAL_GAP;\n if (hasSections) {\n sections2.forEach((section) => {\n const tasksForSection = tasks2.filter((task) => task.section === section);\n const sectionNode = {\n number: sectionNumber,\n descr: section,\n section: sectionNumber,\n width: sectionWidth,\n padding: NODE_PADDING,\n maxHeight: maxSectionHeight\n };\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"sectionNode\", sectionNode);\n const sectionNodeWrapper = svg.append(\"g\");\n const node = svgDraw_default.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf);\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"sectionNode output\", node);\n const sectionX = timelineX - leftWidth;\n sectionNodeWrapper.attr(\"transform\", `translate(${sectionX}, ${masterY})`);\n const taskStartY = masterY + node.height + SECTION_TASK_GAP;\n if (tasksForSection.length > 0) {\n drawTasks2(\n svg,\n tasksForSection,\n sectionNumber,\n timelineX,\n taskStartY,\n maxTaskHeight,\n conf,\n taskSpacing,\n false\n );\n }\n const taskCount2 = tasksForSection.length;\n const sectionHeight = node.height + SECTION_TASK_GAP + taskSpacing * Math.max(taskCount2, 1) - (taskCount2 > 0 ? TASK_VERTICAL_GAP * 2 : 0);\n masterY += sectionHeight;\n sectionNumber++;\n });\n } else {\n drawTasks2(\n svg,\n tasks2,\n sectionNumber,\n timelineX,\n masterY,\n maxTaskHeight,\n conf,\n taskSpacing,\n true\n );\n }\n let box = svg.node()?.getBBox();\n if (!box) {\n throw new Error(\"bbox not found\");\n }\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"bounds\", box);\n if (title) {\n svg.append(\"text\").text(title).attr(\"x\", box.width / 2 - LEFT_MARGIN).attr(\"font-size\", \"4ex\").attr(\"font-weight\", \"bold\").attr(\"y\", 20);\n box = svg.node()?.getBBox();\n if (!box) {\n throw new Error(\"bbox not found\");\n }\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"bounds after title\", box);\n }\n const [fontSize] = (0,_chunk_5PVQY5BW_mjs__WEBPACK_IMPORTED_MODULE_1__.parseFontSize)(conf.fontSize);\n const arrowTopOffset = (fontSize ?? 16) * 2;\n const arrowBottomPadding = (fontSize ?? 16) * 0.5 + 20;\n const lineWrapper = svg.append(\"g\").attr(\"class\", \"lineWrapper\");\n lineWrapper.append(\"line\").attr(\"x1\", timelineX).attr(\"y1\", contentTopY - arrowTopOffset).attr(\"x2\", timelineX).attr(\"y2\", box.y + box.height + arrowBottomPadding).attr(\"stroke-width\", 4).attr(\"stroke\", \"black\").attr(\"marker-end\", \"url(#arrowhead)\");\n lineWrapper.lower();\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.setupGraphViewbox)(\n void 0,\n svg,\n conf.timeline?.padding ?? 50,\n conf.timeline?.useMaxWidth ?? false\n );\n}, \"draw\");\nvar drawTasks2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(diagram2, tasks2, sectionColor, timelineX, masterY, maxTaskHeight, conf, taskSpacing, isWithoutSections) {\n for (const task of tasks2) {\n const taskNode = {\n descr: task.task,\n section: sectionColor,\n number: sectionColor,\n width: NODE_WIDTH,\n padding: NODE_PADDING,\n maxHeight: maxTaskHeight\n };\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"taskNode\", taskNode);\n const taskWrapper = diagram2.append(\"g\").attr(\"class\", \"taskWrapper\");\n const node = svgDraw_default.drawNode(taskWrapper, taskNode, sectionColor, conf);\n const taskHeight = node.height;\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"taskHeight after draw\", taskHeight);\n const taskX = timelineX - TASK_AXIS_GAP - node.width;\n taskWrapper.attr(\"transform\", `translate(${taskX}, ${masterY})`);\n maxTaskHeight = Math.max(maxTaskHeight, taskHeight);\n if (task.events && task.events.length > 0) {\n const eventsStartY = masterY;\n const eventsX = timelineX + EVENT_AXIS_GAP;\n drawEvents2(diagram2, task.events, sectionColor, timelineX, eventsX, eventsStartY, conf);\n }\n masterY = masterY + taskSpacing;\n if (isWithoutSections && !conf.timeline?.disableMulticolor) {\n sectionColor++;\n }\n }\n}, \"drawTasks\");\nvar drawEvents2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(diagram2, events, sectionColor, axisX, eventsX, startY, conf) {\n let currentY = startY;\n for (const event of events) {\n const eventNode = {\n descr: event,\n section: sectionColor,\n number: sectionColor,\n width: EVENT_WIDTH,\n padding: NODE_PADDING,\n maxHeight: 0\n };\n _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.log.debug(\"eventNode\", eventNode);\n const eventWrapper = diagram2.append(\"g\").attr(\"class\", \"eventWrapper\");\n const node = svgDraw_default.drawNode(eventWrapper, eventNode, sectionColor, conf);\n const eventHeight = node.height;\n eventWrapper.attr(\"transform\", `translate(${eventsX}, ${currentY})`);\n const lineWrapper = diagram2.append(\"g\").attr(\"class\", \"lineWrapper\");\n const lineY = currentY + eventHeight / 2;\n lineWrapper.append(\"line\").attr(\"x1\", axisX).attr(\"y1\", lineY).attr(\"x2\", eventsX).attr(\"y2\", lineY).attr(\"stroke-width\", 2).attr(\"stroke\", \"black\").attr(\"marker-end\", \"url(#arrowhead)\").attr(\"stroke-dasharray\", \"5,5\");\n currentY = currentY + eventHeight + EVENT_SPACING;\n }\n return currentY - startY;\n}, \"drawEvents\");\nvar timelineRendererVertical_default = {\n setConf: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n }, \"setConf\"),\n draw: draw2\n};\n\n// src/diagrams/timeline/styles.js\n\nvar genReduxSections = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((options) => {\n const { theme } = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getConfig)();\n const isDarkTheme = theme?.includes(\"dark\");\n const isColorTheme = theme?.includes(\"color\");\n const rawSvgId = options.svgId?.replace(/^#/, \"\") ?? \"\";\n const scopedDropShadow = rawSvgId ? `url(#${rawSvgId}-drop-shadow)` : options.dropShadow ?? \"none\";\n let sections2 = \"\";\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n const sw = `${17 - 3 * i}`;\n const color = isColorTheme ? options.borderColorArray[i] : options.mainBkg;\n const stroke = isColorTheme ? options.borderColorArray[i] : options.nodeBorder;\n sections2 += `\n .section-${i - 1} rect,\n .section-${i - 1} path,\n .section-${i - 1} circle {\n fill: ${isDarkTheme && isColorTheme ? options.mainBkg : color};\n stroke: ${stroke};\n stroke-width: ${options.strokeWidth};\n filter: ${scopedDropShadow};\n }\n\n .section-${i - 1} text {\n fill: ${options.nodeBorder};\n font-weight: ${options.fontWeight}\n }\n\n .node-icon-${i - 1} {\n font-size: 40px;\n color: ${options[\"cScaleLabel\" + i]};\n }\n\n .section-edge-${i - 1} {\n stroke: ${options[\"cScale\" + i]};\n }\n\n .edge-depth-${i - 1} {\n stroke-width: ${sw};\n }\n\n .section-${i - 1} line {\n stroke: ${options[\"cScaleInv\" + i]};\n stroke-width: 3;\n }\n\n .lineWrapper line {\n stroke: ${options.nodeBorder};\n stroke-width:${options.strokeWidth}\n }\n\n .disabled,\n .disabled circle,\n .disabled text {\n fill: ${options.tertiaryColor ?? \"lightgray\"};\n }\n\n .disabled text {\n fill: ${options.clusterBorder ?? \"#efefef\"};\n }\n `;\n }\n return sections2;\n}, \"genReduxSections\");\nvar genSections = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((options) => {\n let sections2 = \"\";\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n options[\"lineColor\" + i] = options[\"lineColor\" + i] || options[\"cScaleInv\" + i];\n if ((0,khroma__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(options[\"lineColor\" + i])) {\n options[\"lineColor\" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(options[\"lineColor\" + i], 20);\n } else {\n options[\"lineColor\" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(options[\"lineColor\" + i], 20);\n }\n }\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n const sw = \"\" + (17 - 3 * i);\n sections2 += `\n .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path {\n fill: ${options[\"cScale\" + i]};\n }\n .section-${i - 1} text {\n fill: ${options[\"cScaleLabel\" + i]};\n }\n .node-icon-${i - 1} {\n font-size: 40px;\n color: ${options[\"cScaleLabel\" + i]};\n }\n .section-edge-${i - 1}{\n stroke: ${options[\"cScale\" + i]};\n }\n .edge-depth-${i - 1}{\n stroke-width: ${sw};\n }\n .section-${i - 1} line {\n stroke: ${options[\"cScaleInv\" + i]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${options[\"cScaleLabel\" + i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: ${options.tertiaryColor ?? \"lightgray\"};\n }\n .disabled text {\n fill: ${options.clusterBorder ?? \"#efefef\"};\n }\n `;\n }\n return sections2;\n}, \"genSections\");\nvar getStyles = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((options) => {\n const { theme } = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getConfig)();\n const isReduxTheme = theme?.includes(\"redux\");\n const isNeutralTheme = theme === \"neutral\";\n const rawSvgId = options.svgId?.replace(/^#/, \"\") ?? \"\";\n let gradientSections = \"\";\n if (options.useGradient && rawSvgId && options.THEME_COLOR_LIMIT && !isNeutralTheme) {\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n gradientSections += `\n .section-${i - 1}[data-look=\"neo\"] rect,\n .section-${i - 1}[data-look=\"neo\"] path,\n .section-${i - 1}[data-look=\"neo\"] circle {\n fill: ${options.mainBkg};\n stroke: url(#${rawSvgId}-gradient);\n stroke-width: 2;\n }\n .section-${i - 1}[data-look=\"neo\"] line {\n stroke: url(#${rawSvgId}-gradient);\n stroke-width: 2;\n }`;\n }\n }\n return `\n .edge {\n stroke-width: 3;\n }\n ${isReduxTheme ? genReduxSections(options) : genSections(options)}\n ${gradientSections}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`;\n}, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/timeline/timeline-definition.ts\nvar rendererSelector = {\n setConf: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n }, \"setConf\"),\n draw: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((text, id, version, diagObj) => {\n const direction2 = diagObj?.db?.getDirection?.() ?? \"LR\";\n if (direction2 === \"TD\") {\n return timelineRendererVertical_default.draw(text, id, version, diagObj);\n }\n return timelineRenderer_default.draw(text, id, version, diagObj);\n }, \"draw\")\n};\nvar diagram = {\n db: timelineDb_exports,\n renderer: rendererSelector,\n parser: timeline_default,\n styles: styles_default\n};\n\n\n\n//# sourceURL=webpack://@mdts/frontend/./node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.mjs?\n}");
|
|
19
|
+
|
|
20
|
+
/***/ }
|
|
21
|
+
|
|
22
|
+
}]);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* or disable the default devtool with "devtool: false".
|
|
8
8
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
9
9
|
*/
|
|
10
|
-
(self["webpackChunk_mdts_frontend"] = self["webpackChunk_mdts_frontend"] || []).push([["vendors-node_modules_mermaid_dist_chunks_mermaid_core_vennDiagram-
|
|
10
|
+
(self["webpackChunk_mdts_frontend"] = self["webpackChunk_mdts_frontend"] || []).push([["vendors-node_modules_mermaid_dist_chunks_mermaid_core_vennDiagram-DHZGUBPP_mjs"],{
|
|
11
11
|
|
|
12
12
|
/***/ "./node_modules/@upsetjs/venn.js/build/venn.esm.js"
|
|
13
13
|
/*!*********************************************************!*\
|
|
@@ -29,13 +29,13 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
29
29
|
|
|
30
30
|
/***/ },
|
|
31
31
|
|
|
32
|
-
/***/ "./node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-
|
|
32
|
+
/***/ "./node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.mjs"
|
|
33
33
|
/*!********************************************************************************!*\
|
|
34
|
-
!*** ./node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-
|
|
34
|
+
!*** ./node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.mjs ***!
|
|
35
35
|
\********************************************************************************/
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ diagram: () => (/* binding */ diagram)\n/* harmony export */ });\n/* harmony import */ var _chunk_HHEYEP7N_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-HHEYEP7N.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-HHEYEP7N.mjs\");\n/* harmony import */ var _chunk_GEFDOKGD_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-GEFDOKGD.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-GEFDOKGD.mjs\");\n/* harmony import */ var _chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-7R4GIKGN.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-7R4GIKGN.mjs\");\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/is_dark.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/lighten.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/darken.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/transparentize.js\");\n/* harmony import */ var _upsetjs_venn_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @upsetjs/venn.js */ \"./node_modules/@upsetjs/venn.js/build/venn.esm.js\");\n/* harmony import */ var roughjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! roughjs */ \"./node_modules/roughjs/bundled/rough.esm.js\");\n\n\n\n\n\n// src/diagrams/venn/parser/venn.jison\nvar parser = (function() {\n var o = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n return o2;\n }, \"o\"), $V0 = [5, 8], $V1 = [7, 8, 11, 12, 17, 19, 22, 24], $V2 = [1, 17], $V3 = [1, 18], $V4 = [7, 8, 11, 12, 14, 15, 16, 17, 19, 20, 21, 22, 24, 27], $V5 = [1, 31], $V6 = [1, 39], $V7 = [7, 8, 11, 12, 17, 19, 22, 24, 27], $V8 = [1, 57], $V9 = [1, 56], $Va = [1, 58], $Vb = [1, 59], $Vc = [1, 60], $Vd = [7, 8, 11, 12, 16, 17, 19, 20, 22, 24, 27, 31, 32, 33];\n var parser2 = {\n trace: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function trace() {\n }, \"trace\"),\n yy: {},\n symbols_: { \"error\": 2, \"start\": 3, \"optNewlines\": 4, \"VENN\": 5, \"document\": 6, \"EOF\": 7, \"NEWLINE\": 8, \"line\": 9, \"statement\": 10, \"TITLE\": 11, \"SET\": 12, \"identifier\": 13, \"BRACKET_LABEL\": 14, \"COLON\": 15, \"NUMERIC\": 16, \"UNION\": 17, \"identifierList\": 18, \"TEXT\": 19, \"IDENTIFIER\": 20, \"STRING\": 21, \"INDENT_TEXT\": 22, \"indentedTextTail\": 23, \"STYLE\": 24, \"stylesOpt\": 25, \"styleField\": 26, \"COMMA\": 27, \"styleValue\": 28, \"valueTokens\": 29, \"valueToken\": 30, \"HEXCOLOR\": 31, \"RGBCOLOR\": 32, \"RGBACOLOR\": 33, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 5: \"VENN\", 7: \"EOF\", 8: \"NEWLINE\", 11: \"TITLE\", 12: \"SET\", 14: \"BRACKET_LABEL\", 15: \"COLON\", 16: \"NUMERIC\", 17: \"UNION\", 19: \"TEXT\", 20: \"IDENTIFIER\", 21: \"STRING\", 22: \"INDENT_TEXT\", 24: \"STYLE\", 27: \"COMMA\", 31: \"HEXCOLOR\", 32: \"RGBCOLOR\", 33: \"RGBACOLOR\" },\n productions_: [0, [3, 4], [4, 0], [4, 2], [6, 0], [6, 2], [9, 1], [9, 1], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [10, 2], [10, 3], [10, 4], [10, 5], [10, 3], [10, 3], [10, 3], [10, 4], [10, 4], [10, 2], [10, 3], [23, 1], [23, 1], [23, 1], [23, 2], [23, 2], [25, 1], [25, 3], [26, 3], [28, 1], [28, 1], [29, 1], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [30, 1], [18, 1], [18, 3], [13, 1], [13, 1]],\n performAction: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 1:\n return $$[$0 - 1];\n // removed by dead control flow\n\n case 2:\n case 3:\n case 4:\n this.$ = [];\n break;\n case 5:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n case 6:\n this.$ = [];\n break;\n case 7:\n case 22:\n case 32:\n case 36:\n case 37:\n case 38:\n case 39:\n case 40:\n this.$ = $$[$0];\n break;\n case 8:\n yy.setDiagramTitle($$[$0].substr(6));\n this.$ = $$[$0].substr(6);\n break;\n case 9:\n yy.addSubsetData([$$[$0]], void 0, void 0);\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 10:\n yy.addSubsetData([$$[$0 - 1]], $$[$0], void 0);\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 11:\n yy.addSubsetData([$$[$0 - 2]], void 0, parseFloat($$[$0]));\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 12:\n yy.addSubsetData([$$[$0 - 3]], $$[$0 - 2], parseFloat($$[$0]));\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 13:\n if ($$[$0].length < 2) {\n throw new Error(\"union requires multiple identifiers\");\n }\n if (yy.validateUnionIdentifiers) {\n yy.validateUnionIdentifiers($$[$0]);\n }\n yy.addSubsetData($$[$0], void 0, void 0);\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 14:\n if ($$[$0 - 1].length < 2) {\n throw new Error(\"union requires multiple identifiers\");\n }\n if (yy.validateUnionIdentifiers) {\n yy.validateUnionIdentifiers($$[$0 - 1]);\n }\n yy.addSubsetData($$[$0 - 1], $$[$0], void 0);\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 15:\n if ($$[$0 - 2].length < 2) {\n throw new Error(\"union requires multiple identifiers\");\n }\n if (yy.validateUnionIdentifiers) {\n yy.validateUnionIdentifiers($$[$0 - 2]);\n }\n yy.addSubsetData($$[$0 - 2], void 0, parseFloat($$[$0]));\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 16:\n if ($$[$0 - 3].length < 2) {\n throw new Error(\"union requires multiple identifiers\");\n }\n if (yy.validateUnionIdentifiers) {\n yy.validateUnionIdentifiers($$[$0 - 3]);\n }\n yy.addSubsetData($$[$0 - 3], $$[$0 - 2], parseFloat($$[$0]));\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 17:\n case 18:\n case 19:\n yy.addTextData($$[$0 - 1], $$[$0], void 0);\n break;\n case 20:\n case 21:\n yy.addTextData($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n case 23:\n yy.addStyleData($$[$0 - 1], $$[$0]);\n break;\n case 24:\n case 25:\n case 26:\n var cs = yy.getCurrentSets();\n if (!cs) throw new Error(\"text requires set\");\n yy.addTextData(cs, $$[$0], void 0);\n break;\n case 27:\n case 28:\n var cs = yy.getCurrentSets();\n if (!cs) throw new Error(\"text requires set\");\n yy.addTextData(cs, $$[$0 - 1], $$[$0]);\n break;\n case 29:\n case 41:\n this.$ = [$$[$0]];\n break;\n case 30:\n case 42:\n this.$ = [...$$[$0 - 2], $$[$0]];\n break;\n case 31:\n this.$ = [$$[$0 - 2], $$[$0]];\n break;\n case 33:\n this.$ = $$[$0].join(\" \");\n break;\n case 34:\n this.$ = [$$[$0]];\n break;\n case 35:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n case 43:\n case 44:\n this.$ = $$[$0];\n break;\n }\n }, \"anonymous\"),\n table: [o($V0, [2, 2], { 3: 1, 4: 2 }), { 1: [3] }, { 5: [1, 3], 8: [1, 4] }, o($V1, [2, 4], { 6: 5 }), o($V0, [2, 3]), { 7: [1, 6], 8: [1, 8], 9: 7, 10: 9, 11: [1, 10], 12: [1, 11], 17: [1, 12], 19: [1, 13], 22: [1, 14], 24: [1, 15] }, { 1: [2, 1] }, o($V1, [2, 5]), o($V1, [2, 6]), o($V1, [2, 7]), o($V1, [2, 8]), { 13: 16, 20: $V2, 21: $V3 }, { 13: 20, 18: 19, 20: $V2, 21: $V3 }, { 13: 20, 18: 21, 20: $V2, 21: $V3 }, { 16: [1, 25], 20: [1, 23], 21: [1, 24], 23: 22 }, { 13: 20, 18: 26, 20: $V2, 21: $V3 }, o($V1, [2, 9], { 14: [1, 27], 15: [1, 28] }), o($V4, [2, 43]), o($V4, [2, 44]), o($V1, [2, 13], { 14: [1, 29], 15: [1, 30], 27: $V5 }), o($V4, [2, 41]), { 16: [1, 34], 20: [1, 32], 21: [1, 33], 27: $V5 }, o($V1, [2, 22]), o($V1, [2, 24], { 14: [1, 35] }), o($V1, [2, 25], { 14: [1, 36] }), o($V1, [2, 26]), { 20: $V6, 25: 37, 26: 38, 27: $V5 }, o($V1, [2, 10], { 15: [1, 40] }), { 16: [1, 41] }, o($V1, [2, 14], { 15: [1, 42] }), { 16: [1, 43] }, { 13: 44, 20: $V2, 21: $V3 }, o($V1, [2, 17], { 14: [1, 45] }), o($V1, [2, 18], { 14: [1, 46] }), o($V1, [2, 19]), o($V1, [2, 27]), o($V1, [2, 28]), o($V1, [2, 23], { 27: [1, 47] }), o($V7, [2, 29]), { 15: [1, 48] }, { 16: [1, 49] }, o($V1, [2, 11]), { 16: [1, 50] }, o($V1, [2, 15]), o($V4, [2, 42]), o($V1, [2, 20]), o($V1, [2, 21]), { 20: $V6, 26: 51 }, { 16: $V8, 20: $V9, 21: [1, 53], 28: 52, 29: 54, 30: 55, 31: $Va, 32: $Vb, 33: $Vc }, o($V1, [2, 12]), o($V1, [2, 16]), o($V7, [2, 30]), o($V7, [2, 31]), o($V7, [2, 32]), o($V7, [2, 33], { 30: 61, 16: $V8, 20: $V9, 31: $Va, 32: $Vb, 33: $Vc }), o($Vd, [2, 34]), o($Vd, [2, 36]), o($Vd, [2, 37]), o($Vd, [2, 38]), o($Vd, [2, 39]), o($Vd, [2, 40]), o($Vd, [2, 35])],\n defaultActions: { 6: [2, 1] },\n parseError: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n }, \"parseError\"),\n parse: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(popStack, \"popStack\");\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(lex, \"lex\");\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }, \"parse\")\n };\n var lexer = /* @__PURE__ */ (function() {\n var lexer2 = {\n EOF: 1,\n parseError: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n }, \"parseError\"),\n // resets the lexer, sets new input\n setInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n }, \"setInput\"),\n // consumes and returns one char from the input\n input: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n }, \"input\"),\n // unshifts one char (or a string) into the input\n unput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n }, \"unput\"),\n // When called from action, caches matched text and appends it on next action\n more: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n this._more = true;\n return this;\n }, \"more\"),\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n }, \"reject\"),\n // retain first n characters of the match\n less: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(n) {\n this.unput(this.match.slice(n));\n }, \"less\"),\n // displays already matched input, i.e. for error messages\n pastInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n }, \"pastInput\"),\n // displays upcoming input, i.e. for error messages\n upcomingInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n }, \"upcomingInput\"),\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n }, \"showPosition\"),\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n }, \"test_match\"),\n // return next match in input\n next: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n }, \"next\"),\n // return next match that has a token\n lex: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n }, \"lex\"),\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function begin(condition) {\n this.conditionStack.push(condition);\n }, \"begin\"),\n // pop the previously active lexer condition state off the condition stack\n popState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n }, \"popState\"),\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n }, \"_currentRules\"),\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n }, \"topState\"),\n // alias for begin(condition)\n pushState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function pushState(condition) {\n this.begin(condition);\n }, \"pushState\"),\n // return the number of states currently on the stack\n stateStackSize: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function stateStackSize() {\n return this.conditionStack.length;\n }, \"stateStackSize\"),\n options: { \"case-insensitive\": true },\n performAction: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n switch ($avoiding_name_collisions) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n if (yy.getIndentMode && yy.getIndentMode()) {\n yy.consumeIndentText = true;\n this.begin(\"INITIAL\");\n return 22;\n }\n break;\n case 4:\n break;\n case 5:\n if (yy.setIndentMode) {\n yy.setIndentMode(false);\n }\n this.begin(\"INITIAL\");\n this.unput(yy_.yytext);\n break;\n case 6:\n this.begin(\"bol\");\n return 8;\n // removed by dead control flow\n\n case 7:\n break;\n case 8:\n break;\n case 9:\n return 7;\n // removed by dead control flow\n\n case 10:\n return 11;\n // removed by dead control flow\n\n case 11:\n return 5;\n // removed by dead control flow\n\n case 12:\n return 12;\n // removed by dead control flow\n\n case 13:\n return 17;\n // removed by dead control flow\n\n case 14:\n if (yy.consumeIndentText) {\n yy.consumeIndentText = false;\n } else {\n return 19;\n }\n break;\n case 15:\n return 24;\n // removed by dead control flow\n\n case 16:\n yy_.yytext = yy_.yytext.slice(2, -2);\n return 14;\n // removed by dead control flow\n\n case 17:\n yy_.yytext = yy_.yytext.slice(1, -1).trim();\n return 14;\n // removed by dead control flow\n\n case 18:\n return 16;\n // removed by dead control flow\n\n case 19:\n return 31;\n // removed by dead control flow\n\n case 20:\n return 33;\n // removed by dead control flow\n\n case 21:\n return 32;\n // removed by dead control flow\n\n case 22:\n return 20;\n // removed by dead control flow\n\n case 23:\n return 21;\n // removed by dead control flow\n\n case 24:\n return 27;\n // removed by dead control flow\n\n case 25:\n return 15;\n // removed by dead control flow\n\n }\n }, \"anonymous\"),\n rules: [/^(?:%%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:[ \\t]+(?=[\\n\\r]))/i, /^(?:[ \\t]+(?=text\\b))/i, /^(?:[ \\t]+)/i, /^(?:[^ \\t\\n\\r])/i, /^(?:[\\n\\r]+)/i, /^(?:%%[^\\n]*)/i, /^(?:[ \\t]+)/i, /^(?:$)/i, /^(?:title\\s[^#\\n;]+)/i, /^(?:venn-beta\\b)/i, /^(?:set\\b)/i, /^(?:union\\b)/i, /^(?:text\\b)/i, /^(?:style\\b)/i, /^(?:\\[\"[^\\\"]*\"\\])/i, /^(?:\\[[^\\]\\\"]+\\])/i, /^(?:[+-]?(\\d+(\\.\\d+)?|\\.\\d+))/i, /^(?:#[0-9a-fA-F]{3,8})/i, /^(?:rgba\\(\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*\\))/i, /^(?:rgb\\(\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*\\))/i, /^(?:[A-Za-z_][A-Za-z0-9\\-_]*)/i, /^(?:\"[^\\\"]*\")/i, /^(?:,)/i, /^(?::)/i],\n conditions: { \"bol\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], \"inclusive\": true }, \"INITIAL\": { \"rules\": [0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], \"inclusive\": true } }\n };\n return lexer2;\n })();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(Parser, \"Parser\");\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n})();\nparser.parser = parser;\nvar venn_default = parser;\n\n// src/diagrams/venn/vennDB.ts\nvar subsets = [];\nvar textNodes = [];\nvar styleEntries = [];\nvar knownSets = /* @__PURE__ */ new Set();\nvar currentSets;\nvar indentMode = false;\nvar addSubsetData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList, label, size) => {\n const sets = normalizeIdentifierList(identifierList).sort();\n const resolvedSize = size ?? 10 / Math.pow(identifierList.length, 2);\n currentSets = sets;\n if (sets.length === 1) {\n knownSets.add(sets[0]);\n }\n subsets.push({\n sets,\n size: resolvedSize,\n label: label ? normalizeText(label) : void 0\n });\n}, \"addSubsetData\");\nvar getSubsetData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n return subsets;\n}, \"getSubsetData\");\nvar normalizeText = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((text) => {\n const trimmed = text.trim();\n if (trimmed.length >= 2 && trimmed.startsWith('\"') && trimmed.endsWith('\"')) {\n return trimmed.slice(1, -1);\n }\n return trimmed;\n}, \"normalizeText\");\nvar normalizeStyleValue = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((value) => {\n return value ? normalizeText(value) : value;\n}, \"normalizeStyleValue\");\nvar addTextData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList, id, label) => {\n const normalizedId = normalizeText(id);\n textNodes.push({\n sets: normalizeIdentifierList(identifierList).sort(),\n id: normalizedId,\n label: label ? normalizeText(label) : void 0\n });\n}, \"addTextData\");\nvar addStyleData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList, data) => {\n const targets = normalizeIdentifierList(identifierList).sort();\n const styles = {};\n for (const [key, value] of data) {\n styles[key] = normalizeStyleValue(value) ?? value;\n }\n styleEntries.push({ targets, styles });\n}, \"addStyleData\");\nvar getStyleData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n return styleEntries;\n}, \"getStyleData\");\nvar normalizeIdentifierList = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList) => {\n return identifierList.map((identifier) => normalizeText(identifier));\n}, \"normalizeIdentifierList\");\nvar validateUnionIdentifiers = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList) => {\n const normalized = normalizeIdentifierList(identifierList);\n const unknown = normalized.filter((identifier) => !knownSets.has(identifier));\n if (unknown.length > 0) {\n throw new Error(`unknown set identifier: ${unknown.join(\", \")}`);\n }\n}, \"validateUnionIdentifiers\");\nvar getTextData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n return textNodes;\n}, \"getTextData\");\nvar getCurrentSets = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => currentSets, \"getCurrentSets\");\nvar getIndentMode = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => indentMode, \"getIndentMode\");\nvar setIndentMode = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((enabled) => {\n indentMode = enabled;\n}, \"setIndentMode\");\nvar DEFAULT_VENN_CONFIG = _chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.defaultConfig_default.venn;\nfunction getConfig2() {\n return (0,_chunk_GEFDOKGD_mjs__WEBPACK_IMPORTED_MODULE_1__.cleanAndMerge)(DEFAULT_VENN_CONFIG, (0,_chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.getConfig)().venn);\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(getConfig2, \"getConfig\");\nvar customClear = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n (0,_chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.clear)();\n subsets.length = 0;\n textNodes.length = 0;\n styleEntries.length = 0;\n knownSets.clear();\n currentSets = void 0;\n indentMode = false;\n}, \"customClear\");\nvar db = {\n getConfig: getConfig2,\n clear: customClear,\n setAccTitle: _chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.setAccTitle,\n getAccTitle: _chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.getAccTitle,\n setDiagramTitle: _chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.setDiagramTitle,\n getDiagramTitle: _chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.getDiagramTitle,\n getAccDescription: _chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.getAccDescription,\n setAccDescription: _chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.setAccDescription,\n addSubsetData,\n getSubsetData,\n addTextData,\n addStyleData,\n validateUnionIdentifiers,\n getTextData,\n getStyleData,\n getCurrentSets,\n getIndentMode,\n setIndentMode\n};\n\n// src/diagrams/venn/styles.ts\nvar getStyles = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((options) => `\n .venn-title {\n font-size: 32px;\n fill: ${options.vennTitleTextColor};\n font-family: ${options.fontFamily};\n }\n\n .venn-circle text {\n font-size: 48px;\n font-family: ${options.fontFamily};\n }\n\n .venn-intersection text {\n font-size: 48px;\n fill: ${options.vennSetTextColor};\n font-family: ${options.fontFamily};\n }\n\n .venn-text-node {\n font-family: ${options.fontFamily};\n color: ${options.vennSetTextColor};\n }\n`, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/venn/vennRenderer.ts\n\n\n\n\nfunction buildStyleByKey(styleData) {\n const map = /* @__PURE__ */ new Map();\n for (const entry of styleData) {\n const key = entry.targets.join(\"|\");\n const existing = map.get(key);\n if (existing) {\n Object.assign(existing, entry.styles);\n } else {\n map.set(key, { ...entry.styles });\n }\n }\n return map;\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(buildStyleByKey, \"buildStyleByKey\");\nvar draw = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((_text, id, _version, diagObj) => {\n const db2 = diagObj.db;\n const config = db2.getConfig?.();\n const { themeVariables, look, handDrawnSeed } = (0,_chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.getConfig)();\n const isHandDrawn = look === \"handDrawn\";\n const themeColors = [\n themeVariables.venn1,\n themeVariables.venn2,\n themeVariables.venn3,\n themeVariables.venn4,\n themeVariables.venn5,\n themeVariables.venn6,\n themeVariables.venn7,\n themeVariables.venn8\n ].filter(Boolean);\n const title = db2.getDiagramTitle?.();\n const sets = db2.getSubsetData();\n const textNodes2 = db2.getTextData();\n const styleByKey = buildStyleByKey(db2.getStyleData());\n const svgWidth = config?.width ?? 800;\n const svgHeight = config?.height ?? 450;\n const REFERENCE_WIDTH = 1600;\n const scale = svgWidth / REFERENCE_WIDTH;\n const titleHeight = title ? 48 * scale : 0;\n const defaultTextColor = themeVariables.primaryTextColor ?? themeVariables.textColor;\n const svg = (0,_chunk_HHEYEP7N_mjs__WEBPACK_IMPORTED_MODULE_0__.selectSvgElement)(id);\n svg.attr(\"viewBox\", `0 0 ${svgWidth} ${svgHeight}`);\n if (title) {\n svg.append(\"text\").text(title).attr(\"class\", \"venn-title\").attr(\"font-size\", `${32 * scale}px`).attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").attr(\"x\", \"50%\").attr(\"y\", 32 * scale).style(\"fill\", themeVariables.vennTitleTextColor || themeVariables.titleColor);\n }\n const dummyD3root = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(document.createElement(\"div\"));\n const vennDiagram = _upsetjs_venn_js__WEBPACK_IMPORTED_MODULE_9__.VennDiagram().width(svgWidth).height(svgHeight - titleHeight);\n dummyD3root.datum(sets).call(vennDiagram);\n const roughSvg = isHandDrawn ? roughjs__WEBPACK_IMPORTED_MODULE_10__[\"default\"].svg(dummyD3root.select(\"svg\").node()) : void 0;\n const layoutAreas = _upsetjs_venn_js__WEBPACK_IMPORTED_MODULE_9__.layout(sets, {\n width: svgWidth,\n height: svgHeight - titleHeight,\n padding: config?.padding ?? 15\n });\n const layoutByKey = /* @__PURE__ */ new Map();\n for (const area of layoutAreas) {\n const key = stableSetsKey([...area.data.sets].sort());\n layoutByKey.set(key, area);\n }\n if (textNodes2.length > 0) {\n renderTextNodes(config, layoutByKey, dummyD3root, textNodes2, scale, styleByKey);\n }\n const themeDark = (0,khroma__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(themeVariables.background || \"#f4f4f4\");\n dummyD3root.selectAll(\".venn-circle\").each(function(d, i) {\n const group = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(this);\n const data = d;\n const setsKey = stableSetsKey([...data.sets].sort());\n const customStyle = styleByKey.get(setsKey);\n const baseColor = customStyle?.fill || themeColors[i % themeColors.length] || themeVariables.primaryColor;\n group.classed(`venn-set-${i % 8}`, true);\n const fillOpacity = customStyle?.[\"fill-opacity\"] ?? 0.1;\n const strokeColor = customStyle?.stroke || baseColor;\n const strokeWidthVal = customStyle?.[\"stroke-width\"] || `${5 * scale}`;\n if (isHandDrawn && roughSvg) {\n const layoutArea = layoutByKey.get(setsKey);\n if (layoutArea && layoutArea.circles.length > 0) {\n const c = layoutArea.circles[0];\n const roughNode = roughSvg.circle(c.x, c.y, c.radius * 2, {\n roughness: 0.7,\n seed: handDrawnSeed,\n fill: (0,khroma__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(baseColor, 0.7),\n fillStyle: \"hachure\",\n fillWeight: 2,\n hachureGap: 8,\n hachureAngle: -41 + i * 60,\n stroke: strokeColor,\n strokeWidth: parseFloat(String(strokeWidthVal))\n });\n group.select(\"path\").remove();\n group.node()?.insertBefore(roughNode, group.select(\"text\").node());\n }\n } else {\n group.select(\"path\").style(\"fill\", baseColor).style(\"fill-opacity\", fillOpacity).style(\"stroke\", strokeColor).style(\"stroke-width\", strokeWidthVal).style(\"stroke-opacity\", 0.95);\n }\n const textColor = customStyle?.color || (themeDark ? (0,khroma__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(baseColor, 30) : (0,khroma__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(baseColor, 30));\n group.select(\"text\").style(\"font-size\", `${48 * scale}px`).style(\"fill\", textColor);\n });\n if (isHandDrawn && roughSvg) {\n dummyD3root.selectAll(\".venn-intersection\").each(function(d) {\n const group = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(this);\n const data = d;\n const setsKey = stableSetsKey([...data.sets].sort());\n const customStyle = styleByKey.get(setsKey);\n const customFill = customStyle?.fill;\n if (customFill) {\n const pathEl = group.select(\"path\");\n const pathD = pathEl.attr(\"d\");\n if (pathD) {\n const roughNode = roughSvg.path(pathD, {\n roughness: 0.7,\n seed: handDrawnSeed,\n fill: (0,khroma__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(customFill, 0.3),\n fillStyle: \"cross-hatch\",\n fillWeight: 2,\n hachureGap: 6,\n hachureAngle: 60,\n stroke: \"none\"\n });\n const existingPath = pathEl.node();\n existingPath?.parentNode?.insertBefore(roughNode, existingPath);\n pathEl.remove();\n }\n } else {\n group.select(\"path\").style(\"fill-opacity\", 0);\n }\n group.select(\"text\").style(\"font-size\", `${48 * scale}px`).style(\"fill\", customStyle?.color ?? themeVariables.vennSetTextColor ?? defaultTextColor);\n });\n } else {\n dummyD3root.selectAll(\".venn-intersection text\").style(\"font-size\", `${48 * scale}px`).style(\"fill\", (e) => {\n const data = e;\n const setsKey = stableSetsKey([...data.sets].sort());\n return styleByKey.get(setsKey)?.color ?? themeVariables.vennSetTextColor ?? defaultTextColor;\n });\n dummyD3root.selectAll(\".venn-intersection path\").style(\"fill-opacity\", (e) => {\n const data = e;\n const setsKey = stableSetsKey([...data.sets].sort());\n return styleByKey.get(setsKey)?.fill ? 1 : 0;\n }).style(\"fill\", (e) => {\n const data = e;\n const setsKey = stableSetsKey([...data.sets].sort());\n return styleByKey.get(setsKey)?.fill ?? \"transparent\";\n });\n }\n const vennGroup = svg.append(\"g\").attr(\"transform\", `translate(0, ${titleHeight})`);\n const dummySvg = dummyD3root.select(\"svg\").node();\n if (dummySvg && \"childNodes\" in dummySvg) {\n for (const child of [...dummySvg.childNodes]) {\n vennGroup.node()?.appendChild(child);\n }\n }\n (0,_chunk_7R4GIKGN_mjs__WEBPACK_IMPORTED_MODULE_2__.configureSvgSize)(svg, svgHeight, svgWidth, config?.useMaxWidth ?? true);\n}, \"draw\");\nfunction stableSetsKey(setIds) {\n return setIds.join(\"|\");\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(stableSetsKey, \"stableSetsKey\");\nfunction renderTextNodes(config, layoutByKey, dummyD3root, textNodes2, scale, styleByKey) {\n const useDebugLayout = config?.useDebugLayout ?? false;\n const vennSvg = dummyD3root.select(\"svg\");\n const textGroup = vennSvg.append(\"g\").attr(\"class\", \"venn-text-nodes\");\n const nodesByArea = /* @__PURE__ */ new Map();\n for (const node of textNodes2) {\n const key = stableSetsKey(node.sets);\n const existing = nodesByArea.get(key);\n if (existing) {\n existing.push(node);\n } else {\n nodesByArea.set(key, [node]);\n }\n }\n for (const [key, nodes] of nodesByArea.entries()) {\n const area = layoutByKey.get(key);\n if (!area?.text) {\n continue;\n }\n const centerX = area.text.x;\n const centerY = area.text.y;\n const minCircleRadius = Math.min(...area.circles.map((c) => c.radius));\n const innerRadiusRaw = Math.min(\n ...area.circles.map((c) => c.radius - Math.hypot(centerX - c.x, centerY - c.y))\n );\n let innerRadius = Number.isFinite(innerRadiusRaw) ? Math.max(0, innerRadiusRaw) : 0;\n if (innerRadius === 0 && Number.isFinite(minCircleRadius)) {\n innerRadius = minCircleRadius * 0.6;\n }\n const areaGroup = textGroup.append(\"g\").attr(\"class\", \"venn-text-area\").attr(\"font-size\", `${40 * scale}px`);\n if (useDebugLayout) {\n areaGroup.append(\"circle\").attr(\"class\", \"venn-text-debug-circle\").attr(\"cx\", centerX).attr(\"cy\", centerY).attr(\"r\", innerRadius).attr(\"fill\", \"none\").attr(\"stroke\", \"purple\").attr(\"stroke-width\", 1.5 * scale).attr(\"stroke-dasharray\", `${6 * scale} ${4 * scale}`);\n }\n const innerWidth = Math.max(80 * scale, innerRadius * 2 * 0.95);\n const innerHeight = Math.max(60 * scale, innerRadius * 2 * 0.95);\n const hasLabel = area.data.label && area.data.label.length > 0;\n const labelOffsetBase = hasLabel ? Math.min(32 * scale, innerRadius * 0.25) : 0;\n const labelOffset = labelOffsetBase + (nodes.length <= 2 ? 30 * scale : 0);\n const startX = centerX - innerWidth / 2;\n const startY = centerY - innerHeight / 2 + labelOffset;\n const cols = Math.max(1, Math.ceil(Math.sqrt(nodes.length)));\n const rows = Math.max(1, Math.ceil(nodes.length / cols));\n const cellWidth = innerWidth / cols;\n const cellHeight = innerHeight / rows;\n for (const [i, node] of nodes.entries()) {\n const col = i % cols;\n const row = Math.floor(i / cols);\n const x = startX + cellWidth * (col + 0.5);\n const y = startY + cellHeight * (row + 0.5);\n if (useDebugLayout) {\n areaGroup.append(\"rect\").attr(\"class\", \"venn-text-debug-cell\").attr(\"x\", startX + cellWidth * col).attr(\"y\", startY + cellHeight * row).attr(\"width\", cellWidth).attr(\"height\", cellHeight).attr(\"fill\", \"none\").attr(\"stroke\", \"teal\").attr(\"stroke-width\", 1 * scale).attr(\"stroke-dasharray\", `${4 * scale} ${3 * scale}`);\n }\n const boxWidth = cellWidth * 0.9;\n const boxHeight = cellHeight * 0.9;\n const container = areaGroup.append(\"foreignObject\").attr(\"class\", \"venn-text-node-fo\").attr(\"width\", boxWidth).attr(\"height\", boxHeight).attr(\"x\", x - boxWidth / 2).attr(\"y\", y - boxHeight / 2).attr(\"overflow\", \"visible\");\n const textColor = styleByKey.get(node.id)?.color;\n const text = container.append(\"xhtml:span\").attr(\"class\", \"venn-text-node\").style(\"display\", \"flex\").style(\"width\", \"100%\").style(\"height\", \"100%\").style(\"white-space\", \"normal\").style(\"align-items\", \"center\").style(\"justify-content\", \"center\").style(\"text-align\", \"center\").style(\"overflow-wrap\", \"normal\").style(\"word-break\", \"normal\").text(node.label ?? node.id);\n if (textColor) {\n text.style(\"color\", textColor);\n }\n }\n }\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(renderTextNodes, \"renderTextNodes\");\nvar renderer = { draw };\n\n// src/diagrams/venn/vennDiagram.ts\nvar diagram = {\n parser: venn_default,\n db,\n renderer,\n styles: styles_default\n};\n\n\n\n//# sourceURL=webpack://@mdts/frontend/./node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-LZ73GAT5.mjs?\n}");
|
|
38
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ diagram: () => (/* binding */ diagram)\n/* harmony export */ });\n/* harmony import */ var _chunk_426QAEUC_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-426QAEUC.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-426QAEUC.mjs\");\n/* harmony import */ var _chunk_5PVQY5BW_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-5PVQY5BW.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.mjs\");\n/* harmony import */ var _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-ICPOFSXX.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.mjs\");\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3 */ \"./node_modules/d3/src/index.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/is_dark.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/lighten.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/darken.js\");\n/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! khroma */ \"./node_modules/khroma/dist/methods/transparentize.js\");\n/* harmony import */ var _upsetjs_venn_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @upsetjs/venn.js */ \"./node_modules/@upsetjs/venn.js/build/venn.esm.js\");\n/* harmony import */ var roughjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! roughjs */ \"./node_modules/roughjs/bundled/rough.esm.js\");\n\n\n\n\n\n// src/diagrams/venn/parser/venn.jison\nvar parser = (function() {\n var o = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n return o2;\n }, \"o\"), $V0 = [5, 8], $V1 = [7, 8, 11, 12, 17, 19, 22, 24], $V2 = [1, 17], $V3 = [1, 18], $V4 = [7, 8, 11, 12, 14, 15, 16, 17, 19, 20, 21, 22, 24, 27], $V5 = [1, 31], $V6 = [1, 39], $V7 = [7, 8, 11, 12, 17, 19, 22, 24, 27], $V8 = [1, 57], $V9 = [1, 56], $Va = [1, 58], $Vb = [1, 59], $Vc = [1, 60], $Vd = [7, 8, 11, 12, 16, 17, 19, 20, 22, 24, 27, 31, 32, 33];\n var parser2 = {\n trace: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function trace() {\n }, \"trace\"),\n yy: {},\n symbols_: { \"error\": 2, \"start\": 3, \"optNewlines\": 4, \"VENN\": 5, \"document\": 6, \"EOF\": 7, \"NEWLINE\": 8, \"line\": 9, \"statement\": 10, \"TITLE\": 11, \"SET\": 12, \"identifier\": 13, \"BRACKET_LABEL\": 14, \"COLON\": 15, \"NUMERIC\": 16, \"UNION\": 17, \"identifierList\": 18, \"TEXT\": 19, \"IDENTIFIER\": 20, \"STRING\": 21, \"INDENT_TEXT\": 22, \"indentedTextTail\": 23, \"STYLE\": 24, \"stylesOpt\": 25, \"styleField\": 26, \"COMMA\": 27, \"styleValue\": 28, \"valueTokens\": 29, \"valueToken\": 30, \"HEXCOLOR\": 31, \"RGBCOLOR\": 32, \"RGBACOLOR\": 33, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 5: \"VENN\", 7: \"EOF\", 8: \"NEWLINE\", 11: \"TITLE\", 12: \"SET\", 14: \"BRACKET_LABEL\", 15: \"COLON\", 16: \"NUMERIC\", 17: \"UNION\", 19: \"TEXT\", 20: \"IDENTIFIER\", 21: \"STRING\", 22: \"INDENT_TEXT\", 24: \"STYLE\", 27: \"COMMA\", 31: \"HEXCOLOR\", 32: \"RGBCOLOR\", 33: \"RGBACOLOR\" },\n productions_: [0, [3, 4], [4, 0], [4, 2], [6, 0], [6, 2], [9, 1], [9, 1], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [10, 2], [10, 3], [10, 4], [10, 5], [10, 3], [10, 3], [10, 3], [10, 4], [10, 4], [10, 2], [10, 3], [23, 1], [23, 1], [23, 1], [23, 2], [23, 2], [25, 1], [25, 3], [26, 3], [28, 1], [28, 1], [29, 1], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [30, 1], [18, 1], [18, 3], [13, 1], [13, 1]],\n performAction: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 1:\n return $$[$0 - 1];\n // removed by dead control flow\n\n case 2:\n case 3:\n case 4:\n this.$ = [];\n break;\n case 5:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n case 6:\n this.$ = [];\n break;\n case 7:\n case 22:\n case 32:\n case 36:\n case 37:\n case 38:\n case 39:\n case 40:\n this.$ = $$[$0];\n break;\n case 8:\n yy.setDiagramTitle($$[$0].substr(6));\n this.$ = $$[$0].substr(6);\n break;\n case 9:\n yy.addSubsetData([$$[$0]], void 0, void 0);\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 10:\n yy.addSubsetData([$$[$0 - 1]], $$[$0], void 0);\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 11:\n yy.addSubsetData([$$[$0 - 2]], void 0, parseFloat($$[$0]));\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 12:\n yy.addSubsetData([$$[$0 - 3]], $$[$0 - 2], parseFloat($$[$0]));\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 13:\n if ($$[$0].length < 2) {\n throw new Error(\"union requires multiple identifiers\");\n }\n if (yy.validateUnionIdentifiers) {\n yy.validateUnionIdentifiers($$[$0]);\n }\n yy.addSubsetData($$[$0], void 0, void 0);\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 14:\n if ($$[$0 - 1].length < 2) {\n throw new Error(\"union requires multiple identifiers\");\n }\n if (yy.validateUnionIdentifiers) {\n yy.validateUnionIdentifiers($$[$0 - 1]);\n }\n yy.addSubsetData($$[$0 - 1], $$[$0], void 0);\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 15:\n if ($$[$0 - 2].length < 2) {\n throw new Error(\"union requires multiple identifiers\");\n }\n if (yy.validateUnionIdentifiers) {\n yy.validateUnionIdentifiers($$[$0 - 2]);\n }\n yy.addSubsetData($$[$0 - 2], void 0, parseFloat($$[$0]));\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 16:\n if ($$[$0 - 3].length < 2) {\n throw new Error(\"union requires multiple identifiers\");\n }\n if (yy.validateUnionIdentifiers) {\n yy.validateUnionIdentifiers($$[$0 - 3]);\n }\n yy.addSubsetData($$[$0 - 3], $$[$0 - 2], parseFloat($$[$0]));\n if (yy.setIndentMode) {\n yy.setIndentMode(true);\n }\n break;\n case 17:\n case 18:\n case 19:\n yy.addTextData($$[$0 - 1], $$[$0], void 0);\n break;\n case 20:\n case 21:\n yy.addTextData($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n case 23:\n yy.addStyleData($$[$0 - 1], $$[$0]);\n break;\n case 24:\n case 25:\n case 26:\n var cs = yy.getCurrentSets();\n if (!cs) throw new Error(\"text requires set\");\n yy.addTextData(cs, $$[$0], void 0);\n break;\n case 27:\n case 28:\n var cs = yy.getCurrentSets();\n if (!cs) throw new Error(\"text requires set\");\n yy.addTextData(cs, $$[$0 - 1], $$[$0]);\n break;\n case 29:\n case 41:\n this.$ = [$$[$0]];\n break;\n case 30:\n case 42:\n this.$ = [...$$[$0 - 2], $$[$0]];\n break;\n case 31:\n this.$ = [$$[$0 - 2], $$[$0]];\n break;\n case 33:\n this.$ = $$[$0].join(\" \");\n break;\n case 34:\n this.$ = [$$[$0]];\n break;\n case 35:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n case 43:\n case 44:\n this.$ = $$[$0];\n break;\n }\n }, \"anonymous\"),\n table: [o($V0, [2, 2], { 3: 1, 4: 2 }), { 1: [3] }, { 5: [1, 3], 8: [1, 4] }, o($V1, [2, 4], { 6: 5 }), o($V0, [2, 3]), { 7: [1, 6], 8: [1, 8], 9: 7, 10: 9, 11: [1, 10], 12: [1, 11], 17: [1, 12], 19: [1, 13], 22: [1, 14], 24: [1, 15] }, { 1: [2, 1] }, o($V1, [2, 5]), o($V1, [2, 6]), o($V1, [2, 7]), o($V1, [2, 8]), { 13: 16, 20: $V2, 21: $V3 }, { 13: 20, 18: 19, 20: $V2, 21: $V3 }, { 13: 20, 18: 21, 20: $V2, 21: $V3 }, { 16: [1, 25], 20: [1, 23], 21: [1, 24], 23: 22 }, { 13: 20, 18: 26, 20: $V2, 21: $V3 }, o($V1, [2, 9], { 14: [1, 27], 15: [1, 28] }), o($V4, [2, 43]), o($V4, [2, 44]), o($V1, [2, 13], { 14: [1, 29], 15: [1, 30], 27: $V5 }), o($V4, [2, 41]), { 16: [1, 34], 20: [1, 32], 21: [1, 33], 27: $V5 }, o($V1, [2, 22]), o($V1, [2, 24], { 14: [1, 35] }), o($V1, [2, 25], { 14: [1, 36] }), o($V1, [2, 26]), { 20: $V6, 25: 37, 26: 38, 27: $V5 }, o($V1, [2, 10], { 15: [1, 40] }), { 16: [1, 41] }, o($V1, [2, 14], { 15: [1, 42] }), { 16: [1, 43] }, { 13: 44, 20: $V2, 21: $V3 }, o($V1, [2, 17], { 14: [1, 45] }), o($V1, [2, 18], { 14: [1, 46] }), o($V1, [2, 19]), o($V1, [2, 27]), o($V1, [2, 28]), o($V1, [2, 23], { 27: [1, 47] }), o($V7, [2, 29]), { 15: [1, 48] }, { 16: [1, 49] }, o($V1, [2, 11]), { 16: [1, 50] }, o($V1, [2, 15]), o($V4, [2, 42]), o($V1, [2, 20]), o($V1, [2, 21]), { 20: $V6, 26: 51 }, { 16: $V8, 20: $V9, 21: [1, 53], 28: 52, 29: 54, 30: 55, 31: $Va, 32: $Vb, 33: $Vc }, o($V1, [2, 12]), o($V1, [2, 16]), o($V7, [2, 30]), o($V7, [2, 31]), o($V7, [2, 32]), o($V7, [2, 33], { 30: 61, 16: $V8, 20: $V9, 31: $Va, 32: $Vb, 33: $Vc }), o($Vd, [2, 34]), o($Vd, [2, 36]), o($Vd, [2, 37]), o($Vd, [2, 38]), o($Vd, [2, 39]), o($Vd, [2, 40]), o($Vd, [2, 35])],\n defaultActions: { 6: [2, 1] },\n parseError: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n }, \"parseError\"),\n parse: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(popStack, \"popStack\");\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(lex, \"lex\");\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }, \"parse\")\n };\n var lexer = /* @__PURE__ */ (function() {\n var lexer2 = {\n EOF: 1,\n parseError: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n }, \"parseError\"),\n // resets the lexer, sets new input\n setInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n }, \"setInput\"),\n // consumes and returns one char from the input\n input: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n }, \"input\"),\n // unshifts one char (or a string) into the input\n unput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n }, \"unput\"),\n // When called from action, caches matched text and appends it on next action\n more: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n this._more = true;\n return this;\n }, \"more\"),\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n }, \"reject\"),\n // retain first n characters of the match\n less: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(n) {\n this.unput(this.match.slice(n));\n }, \"less\"),\n // displays already matched input, i.e. for error messages\n pastInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n }, \"pastInput\"),\n // displays upcoming input, i.e. for error messages\n upcomingInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n }, \"upcomingInput\"),\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n }, \"showPosition\"),\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n }, \"test_match\"),\n // return next match in input\n next: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n }, \"next\"),\n // return next match that has a token\n lex: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n }, \"lex\"),\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function begin(condition) {\n this.conditionStack.push(condition);\n }, \"begin\"),\n // pop the previously active lexer condition state off the condition stack\n popState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n }, \"popState\"),\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n }, \"_currentRules\"),\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n }, \"topState\"),\n // alias for begin(condition)\n pushState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function pushState(condition) {\n this.begin(condition);\n }, \"pushState\"),\n // return the number of states currently on the stack\n stateStackSize: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function stateStackSize() {\n return this.conditionStack.length;\n }, \"stateStackSize\"),\n options: { \"case-insensitive\": true },\n performAction: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n switch ($avoiding_name_collisions) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n if (yy.getIndentMode && yy.getIndentMode()) {\n yy.consumeIndentText = true;\n this.begin(\"INITIAL\");\n return 22;\n }\n break;\n case 4:\n break;\n case 5:\n if (yy.setIndentMode) {\n yy.setIndentMode(false);\n }\n this.begin(\"INITIAL\");\n this.unput(yy_.yytext);\n break;\n case 6:\n this.begin(\"bol\");\n return 8;\n // removed by dead control flow\n\n case 7:\n break;\n case 8:\n break;\n case 9:\n return 7;\n // removed by dead control flow\n\n case 10:\n return 11;\n // removed by dead control flow\n\n case 11:\n return 5;\n // removed by dead control flow\n\n case 12:\n return 12;\n // removed by dead control flow\n\n case 13:\n return 17;\n // removed by dead control flow\n\n case 14:\n if (yy.consumeIndentText) {\n yy.consumeIndentText = false;\n } else {\n return 19;\n }\n break;\n case 15:\n return 24;\n // removed by dead control flow\n\n case 16:\n yy_.yytext = yy_.yytext.slice(2, -2);\n return 14;\n // removed by dead control flow\n\n case 17:\n yy_.yytext = yy_.yytext.slice(1, -1).trim();\n return 14;\n // removed by dead control flow\n\n case 18:\n return 16;\n // removed by dead control flow\n\n case 19:\n return 31;\n // removed by dead control flow\n\n case 20:\n return 33;\n // removed by dead control flow\n\n case 21:\n return 32;\n // removed by dead control flow\n\n case 22:\n return 20;\n // removed by dead control flow\n\n case 23:\n return 21;\n // removed by dead control flow\n\n case 24:\n return 27;\n // removed by dead control flow\n\n case 25:\n return 15;\n // removed by dead control flow\n\n }\n }, \"anonymous\"),\n rules: [/^(?:%%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:[ \\t]+(?=[\\n\\r]))/i, /^(?:[ \\t]+(?=text\\b))/i, /^(?:[ \\t]+)/i, /^(?:[^ \\t\\n\\r])/i, /^(?:[\\n\\r]+)/i, /^(?:%%[^\\n]*)/i, /^(?:[ \\t]+)/i, /^(?:$)/i, /^(?:title\\s[^#\\n;]+)/i, /^(?:venn-beta\\b)/i, /^(?:set\\b)/i, /^(?:union\\b)/i, /^(?:text\\b)/i, /^(?:style\\b)/i, /^(?:\\[\"[^\\\"]*\"\\])/i, /^(?:\\[[^\\]\\\"]+\\])/i, /^(?:[+-]?(\\d+(\\.\\d+)?|\\.\\d+))/i, /^(?:#[0-9a-fA-F]{3,8})/i, /^(?:rgba\\(\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*\\))/i, /^(?:rgb\\(\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*[,]\\s*[0-9.]+\\s*\\))/i, /^(?:[A-Za-z_][A-Za-z0-9\\-_]*)/i, /^(?:\"[^\\\"]*\")/i, /^(?:,)/i, /^(?::)/i],\n conditions: { \"bol\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], \"inclusive\": true }, \"INITIAL\": { \"rules\": [0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], \"inclusive\": true } }\n };\n return lexer2;\n })();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(Parser, \"Parser\");\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n})();\nparser.parser = parser;\nvar venn_default = parser;\n\n// src/diagrams/venn/vennDB.ts\nvar subsets = [];\nvar textNodes = [];\nvar styleEntries = [];\nvar knownSets = /* @__PURE__ */ new Set();\nvar currentSets;\nvar indentMode = false;\nvar addSubsetData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList, label, size) => {\n const sets = normalizeIdentifierList(identifierList).sort();\n const resolvedSize = size ?? 10 / Math.pow(identifierList.length, 2);\n currentSets = sets;\n if (sets.length === 1) {\n knownSets.add(sets[0]);\n }\n subsets.push({\n sets,\n size: resolvedSize,\n label: label ? normalizeText(label) : void 0\n });\n}, \"addSubsetData\");\nvar getSubsetData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n return subsets;\n}, \"getSubsetData\");\nvar normalizeText = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((text) => {\n const trimmed = text.trim();\n if (trimmed.length >= 2 && trimmed.startsWith('\"') && trimmed.endsWith('\"')) {\n return trimmed.slice(1, -1);\n }\n return trimmed;\n}, \"normalizeText\");\nvar normalizeStyleValue = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((value) => {\n return value ? normalizeText(value) : value;\n}, \"normalizeStyleValue\");\nvar addTextData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList, id, label) => {\n const normalizedId = normalizeText(id);\n textNodes.push({\n sets: normalizeIdentifierList(identifierList).sort(),\n id: normalizedId,\n label: label ? normalizeText(label) : void 0\n });\n}, \"addTextData\");\nvar addStyleData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList, data) => {\n const targets = normalizeIdentifierList(identifierList).sort();\n const styles = {};\n for (const [key, value] of data) {\n styles[key] = normalizeStyleValue(value) ?? value;\n }\n styleEntries.push({ targets, styles });\n}, \"addStyleData\");\nvar getStyleData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n return styleEntries;\n}, \"getStyleData\");\nvar normalizeIdentifierList = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList) => {\n return identifierList.map((identifier) => normalizeText(identifier));\n}, \"normalizeIdentifierList\");\nvar validateUnionIdentifiers = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((identifierList) => {\n const normalized = normalizeIdentifierList(identifierList);\n const unknown = normalized.filter((identifier) => !knownSets.has(identifier));\n if (unknown.length > 0) {\n throw new Error(`unknown set identifier: ${unknown.join(\", \")}`);\n }\n}, \"validateUnionIdentifiers\");\nvar getTextData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n return textNodes;\n}, \"getTextData\");\nvar getCurrentSets = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => currentSets, \"getCurrentSets\");\nvar getIndentMode = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => indentMode, \"getIndentMode\");\nvar setIndentMode = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((enabled) => {\n indentMode = enabled;\n}, \"setIndentMode\");\nvar DEFAULT_VENN_CONFIG = _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.defaultConfig_default.venn;\nfunction getConfig2() {\n return (0,_chunk_5PVQY5BW_mjs__WEBPACK_IMPORTED_MODULE_1__.cleanAndMerge)(DEFAULT_VENN_CONFIG, (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getConfig)().venn);\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(getConfig2, \"getConfig\");\nvar customClear = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(() => {\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.clear)();\n subsets.length = 0;\n textNodes.length = 0;\n styleEntries.length = 0;\n knownSets.clear();\n currentSets = void 0;\n indentMode = false;\n}, \"customClear\");\nvar db = {\n getConfig: getConfig2,\n clear: customClear,\n setAccTitle: _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.setAccTitle,\n getAccTitle: _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getAccTitle,\n setDiagramTitle: _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.setDiagramTitle,\n getDiagramTitle: _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getDiagramTitle,\n getAccDescription: _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getAccDescription,\n setAccDescription: _chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.setAccDescription,\n addSubsetData,\n getSubsetData,\n addTextData,\n addStyleData,\n validateUnionIdentifiers,\n getTextData,\n getStyleData,\n getCurrentSets,\n getIndentMode,\n setIndentMode\n};\n\n// src/diagrams/venn/styles.ts\nvar getStyles = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((options) => `\n .venn-title {\n font-size: 32px;\n fill: ${options.vennTitleTextColor};\n font-family: ${options.fontFamily};\n }\n\n .venn-circle text {\n font-size: 48px;\n font-family: ${options.fontFamily};\n }\n\n .venn-intersection text {\n font-size: 48px;\n fill: ${options.vennSetTextColor};\n font-family: ${options.fontFamily};\n }\n\n .venn-text-node {\n font-family: ${options.fontFamily};\n color: ${options.vennSetTextColor};\n }\n`, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/venn/vennRenderer.ts\n\n\n\n\nfunction buildStyleByKey(styleData) {\n const map = /* @__PURE__ */ new Map();\n for (const entry of styleData) {\n const key = entry.targets.join(\"|\");\n const existing = map.get(key);\n if (existing) {\n Object.assign(existing, entry.styles);\n } else {\n map.set(key, { ...entry.styles });\n }\n }\n return map;\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(buildStyleByKey, \"buildStyleByKey\");\nvar draw = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)((_text, id, _version, diagObj) => {\n const db2 = diagObj.db;\n const config = db2.getConfig?.();\n const { themeVariables, look, handDrawnSeed } = (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.getConfig)();\n const isHandDrawn = look === \"handDrawn\";\n const themeColors = [\n themeVariables.venn1,\n themeVariables.venn2,\n themeVariables.venn3,\n themeVariables.venn4,\n themeVariables.venn5,\n themeVariables.venn6,\n themeVariables.venn7,\n themeVariables.venn8\n ].filter(Boolean);\n const title = db2.getDiagramTitle?.();\n const sets = db2.getSubsetData();\n const textNodes2 = db2.getTextData();\n const styleByKey = buildStyleByKey(db2.getStyleData());\n const svgWidth = config?.width ?? 800;\n const svgHeight = config?.height ?? 450;\n const REFERENCE_WIDTH = 1600;\n const scale = svgWidth / REFERENCE_WIDTH;\n const titleHeight = title ? 48 * scale : 0;\n const defaultTextColor = themeVariables.primaryTextColor ?? themeVariables.textColor;\n const svg = (0,_chunk_426QAEUC_mjs__WEBPACK_IMPORTED_MODULE_0__.selectSvgElement)(id);\n svg.attr(\"viewBox\", `0 0 ${svgWidth} ${svgHeight}`);\n if (title) {\n svg.append(\"text\").text(title).attr(\"class\", \"venn-title\").attr(\"font-size\", `${32 * scale}px`).attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").attr(\"x\", \"50%\").attr(\"y\", 32 * scale).style(\"fill\", themeVariables.vennTitleTextColor || themeVariables.titleColor);\n }\n const dummyD3root = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(document.createElement(\"div\"));\n const vennDiagram = _upsetjs_venn_js__WEBPACK_IMPORTED_MODULE_9__.VennDiagram().width(svgWidth).height(svgHeight - titleHeight);\n dummyD3root.datum(sets).call(vennDiagram);\n const roughSvg = isHandDrawn ? roughjs__WEBPACK_IMPORTED_MODULE_10__[\"default\"].svg(dummyD3root.select(\"svg\").node()) : void 0;\n const layoutAreas = _upsetjs_venn_js__WEBPACK_IMPORTED_MODULE_9__.layout(sets, {\n width: svgWidth,\n height: svgHeight - titleHeight,\n padding: config?.padding ?? 15\n });\n const layoutByKey = /* @__PURE__ */ new Map();\n for (const area of layoutAreas) {\n const key = stableSetsKey([...area.data.sets].sort());\n layoutByKey.set(key, area);\n }\n if (textNodes2.length > 0) {\n renderTextNodes(config, layoutByKey, dummyD3root, textNodes2, scale, styleByKey);\n }\n const themeDark = (0,khroma__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(themeVariables.background || \"#f4f4f4\");\n dummyD3root.selectAll(\".venn-circle\").each(function(d, i) {\n const group = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(this);\n const data = d;\n const setsKey = stableSetsKey([...data.sets].sort());\n const customStyle = styleByKey.get(setsKey);\n const baseColor = customStyle?.fill || themeColors[i % themeColors.length] || themeVariables.primaryColor;\n group.classed(`venn-set-${i % 8}`, true);\n const fillOpacity = customStyle?.[\"fill-opacity\"] ?? 0.1;\n const strokeColor = customStyle?.stroke || baseColor;\n const strokeWidthVal = customStyle?.[\"stroke-width\"] || `${5 * scale}`;\n if (isHandDrawn && roughSvg) {\n const layoutArea = layoutByKey.get(setsKey);\n if (layoutArea && layoutArea.circles.length > 0) {\n const c = layoutArea.circles[0];\n const roughNode = roughSvg.circle(c.x, c.y, c.radius * 2, {\n roughness: 0.7,\n seed: handDrawnSeed,\n fill: (0,khroma__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(baseColor, 0.7),\n fillStyle: \"hachure\",\n fillWeight: 2,\n hachureGap: 8,\n hachureAngle: -41 + i * 60,\n stroke: strokeColor,\n strokeWidth: parseFloat(String(strokeWidthVal))\n });\n group.select(\"path\").remove();\n group.node()?.insertBefore(roughNode, group.select(\"text\").node());\n }\n } else {\n group.select(\"path\").style(\"fill\", baseColor).style(\"fill-opacity\", fillOpacity).style(\"stroke\", strokeColor).style(\"stroke-width\", strokeWidthVal).style(\"stroke-opacity\", 0.95);\n }\n const textColor = customStyle?.color || (themeDark ? (0,khroma__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(baseColor, 30) : (0,khroma__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(baseColor, 30));\n group.select(\"text\").style(\"font-size\", `${48 * scale}px`).style(\"fill\", textColor);\n });\n if (isHandDrawn && roughSvg) {\n dummyD3root.selectAll(\".venn-intersection\").each(function(d) {\n const group = (0,d3__WEBPACK_IMPORTED_MODULE_4__.select)(this);\n const data = d;\n const setsKey = stableSetsKey([...data.sets].sort());\n const customStyle = styleByKey.get(setsKey);\n const customFill = customStyle?.fill;\n if (customFill) {\n const pathEl = group.select(\"path\");\n const pathD = pathEl.attr(\"d\");\n if (pathD) {\n const roughNode = roughSvg.path(pathD, {\n roughness: 0.7,\n seed: handDrawnSeed,\n fill: (0,khroma__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(customFill, 0.3),\n fillStyle: \"cross-hatch\",\n fillWeight: 2,\n hachureGap: 6,\n hachureAngle: 60,\n stroke: \"none\"\n });\n const existingPath = pathEl.node();\n existingPath?.parentNode?.insertBefore(roughNode, existingPath);\n pathEl.remove();\n }\n } else {\n group.select(\"path\").style(\"fill-opacity\", 0);\n }\n group.select(\"text\").style(\"font-size\", `${48 * scale}px`).style(\"fill\", customStyle?.color ?? themeVariables.vennSetTextColor ?? defaultTextColor);\n });\n } else {\n dummyD3root.selectAll(\".venn-intersection text\").style(\"font-size\", `${48 * scale}px`).style(\"fill\", (e) => {\n const data = e;\n const setsKey = stableSetsKey([...data.sets].sort());\n return styleByKey.get(setsKey)?.color ?? themeVariables.vennSetTextColor ?? defaultTextColor;\n });\n dummyD3root.selectAll(\".venn-intersection path\").style(\"fill-opacity\", (e) => {\n const data = e;\n const setsKey = stableSetsKey([...data.sets].sort());\n return styleByKey.get(setsKey)?.fill ? 1 : 0;\n }).style(\"fill\", (e) => {\n const data = e;\n const setsKey = stableSetsKey([...data.sets].sort());\n return styleByKey.get(setsKey)?.fill ?? \"transparent\";\n });\n }\n const vennGroup = svg.append(\"g\").attr(\"transform\", `translate(0, ${titleHeight})`);\n const dummySvg = dummyD3root.select(\"svg\").node();\n if (dummySvg && \"childNodes\" in dummySvg) {\n for (const child of [...dummySvg.childNodes]) {\n vennGroup.node()?.appendChild(child);\n }\n }\n (0,_chunk_ICPOFSXX_mjs__WEBPACK_IMPORTED_MODULE_2__.configureSvgSize)(svg, svgHeight, svgWidth, config?.useMaxWidth ?? true);\n}, \"draw\");\nfunction stableSetsKey(setIds) {\n return setIds.join(\"|\");\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(stableSetsKey, \"stableSetsKey\");\nfunction renderTextNodes(config, layoutByKey, dummyD3root, textNodes2, scale, styleByKey) {\n const useDebugLayout = config?.useDebugLayout ?? false;\n const vennSvg = dummyD3root.select(\"svg\");\n const textGroup = vennSvg.append(\"g\").attr(\"class\", \"venn-text-nodes\");\n const nodesByArea = /* @__PURE__ */ new Map();\n for (const node of textNodes2) {\n const key = stableSetsKey(node.sets);\n const existing = nodesByArea.get(key);\n if (existing) {\n existing.push(node);\n } else {\n nodesByArea.set(key, [node]);\n }\n }\n for (const [key, nodes] of nodesByArea.entries()) {\n const area = layoutByKey.get(key);\n if (!area?.text) {\n continue;\n }\n const centerX = area.text.x;\n const centerY = area.text.y;\n const minCircleRadius = Math.min(...area.circles.map((c) => c.radius));\n const innerRadiusRaw = Math.min(\n ...area.circles.map((c) => c.radius - Math.hypot(centerX - c.x, centerY - c.y))\n );\n let innerRadius = Number.isFinite(innerRadiusRaw) ? Math.max(0, innerRadiusRaw) : 0;\n if (innerRadius === 0 && Number.isFinite(minCircleRadius)) {\n innerRadius = minCircleRadius * 0.6;\n }\n const areaGroup = textGroup.append(\"g\").attr(\"class\", \"venn-text-area\").attr(\"font-size\", `${40 * scale}px`);\n if (useDebugLayout) {\n areaGroup.append(\"circle\").attr(\"class\", \"venn-text-debug-circle\").attr(\"cx\", centerX).attr(\"cy\", centerY).attr(\"r\", innerRadius).attr(\"fill\", \"none\").attr(\"stroke\", \"purple\").attr(\"stroke-width\", 1.5 * scale).attr(\"stroke-dasharray\", `${6 * scale} ${4 * scale}`);\n }\n const innerWidth = Math.max(80 * scale, innerRadius * 2 * 0.95);\n const innerHeight = Math.max(60 * scale, innerRadius * 2 * 0.95);\n const hasLabel = area.data.label && area.data.label.length > 0;\n const labelOffsetBase = hasLabel ? Math.min(32 * scale, innerRadius * 0.25) : 0;\n const labelOffset = labelOffsetBase + (nodes.length <= 2 ? 30 * scale : 0);\n const startX = centerX - innerWidth / 2;\n const startY = centerY - innerHeight / 2 + labelOffset;\n const cols = Math.max(1, Math.ceil(Math.sqrt(nodes.length)));\n const rows = Math.max(1, Math.ceil(nodes.length / cols));\n const cellWidth = innerWidth / cols;\n const cellHeight = innerHeight / rows;\n for (const [i, node] of nodes.entries()) {\n const col = i % cols;\n const row = Math.floor(i / cols);\n const x = startX + cellWidth * (col + 0.5);\n const y = startY + cellHeight * (row + 0.5);\n if (useDebugLayout) {\n areaGroup.append(\"rect\").attr(\"class\", \"venn-text-debug-cell\").attr(\"x\", startX + cellWidth * col).attr(\"y\", startY + cellHeight * row).attr(\"width\", cellWidth).attr(\"height\", cellHeight).attr(\"fill\", \"none\").attr(\"stroke\", \"teal\").attr(\"stroke-width\", 1 * scale).attr(\"stroke-dasharray\", `${4 * scale} ${3 * scale}`);\n }\n const boxWidth = cellWidth * 0.9;\n const boxHeight = cellHeight * 0.9;\n const container = areaGroup.append(\"foreignObject\").attr(\"class\", \"venn-text-node-fo\").attr(\"width\", boxWidth).attr(\"height\", boxHeight).attr(\"x\", x - boxWidth / 2).attr(\"y\", y - boxHeight / 2).attr(\"overflow\", \"visible\");\n const textColor = styleByKey.get(node.id)?.color;\n const text = container.append(\"xhtml:span\").attr(\"class\", \"venn-text-node\").style(\"display\", \"flex\").style(\"width\", \"100%\").style(\"height\", \"100%\").style(\"white-space\", \"normal\").style(\"align-items\", \"center\").style(\"justify-content\", \"center\").style(\"text-align\", \"center\").style(\"overflow-wrap\", \"normal\").style(\"word-break\", \"normal\").text(node.label ?? node.id);\n if (textColor) {\n text.style(\"color\", textColor);\n }\n }\n }\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_3__.__name)(renderTextNodes, \"renderTextNodes\");\nvar renderer = { draw };\n\n// src/diagrams/venn/vennDiagram.ts\nvar diagram = {\n parser: venn_default,\n db,\n renderer,\n styles: styles_default\n};\n\n\n\n//# sourceURL=webpack://@mdts/frontend/./node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.mjs?\n}");
|
|
39
39
|
|
|
40
40
|
/***/ }
|
|
41
41
|
|