@yorz/cli 0.1.3 → 0.1.5

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.
Files changed (139) hide show
  1. package/README.md +5 -2
  2. package/dist/cli/index.js +385 -28
  3. package/dist/gui/assets/{abnfDiagram-VRR7QNED-DE_Lwnyj.js → abnfDiagram-VRR7QNED-BjiKWU_r.js} +1 -1
  4. package/dist/gui/assets/{arc-0XKFeKL1.js → arc--ZszoeC5.js} +1 -1
  5. package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-WVMr6CTB.js → architectureDiagram-ZJ3FMSHR-D8beCiJM.js} +1 -1
  6. package/dist/gui/assets/{blockDiagram-677ZJIJ3-JmkelTQ6.js → blockDiagram-677ZJIJ3-XTjBv4Yl.js} +1 -1
  7. package/dist/gui/assets/{c4Diagram-LMCZKHZV-BYvSE_vv.js → c4Diagram-LMCZKHZV-B8mRAP6M.js} +1 -1
  8. package/dist/gui/assets/channel-DSEvjkHE.js +1 -0
  9. package/dist/gui/assets/{chunk-2Q5K7J3B-cgJ3ifz_.js → chunk-2Q5K7J3B-yiwKrUMh.js} +1 -1
  10. package/dist/gui/assets/{chunk-32BRIVSS-DR-AYVVA.js → chunk-32BRIVSS-BKUpEqmm.js} +1 -1
  11. package/dist/gui/assets/{chunk-5VM5RSS4-Di4z9gEz.js → chunk-5VM5RSS4-DbsGyMz5.js} +1 -1
  12. package/dist/gui/assets/{chunk-EX3LRPZG-CtCaJMGG.js → chunk-EX3LRPZG-DTBuQkne.js} +1 -1
  13. package/dist/gui/assets/{chunk-JWPE2WC7-EjoKlGne.js → chunk-JWPE2WC7-Durur7_4.js} +1 -1
  14. package/dist/gui/assets/{chunk-MOJQB5TN-ndMzM7-f.js → chunk-MOJQB5TN-DXNE2VJB.js} +1 -1
  15. package/dist/gui/assets/{chunk-RYQCIY6F-CDdJsSDv.js → chunk-RYQCIY6F-HY8qhnee.js} +1 -1
  16. package/dist/gui/assets/{chunk-V7JOEXUC-BptnbB4R.js → chunk-V7JOEXUC-BXRxPy5M.js} +1 -1
  17. package/dist/gui/assets/{chunk-VR4S4FIN-CF8Dsx8K.js → chunk-VR4S4FIN-Ws4fVn18.js} +1 -1
  18. package/dist/gui/assets/{chunk-XXDRQBXY-CgGWri-V.js → chunk-XXDRQBXY-CwHBGyO1.js} +1 -1
  19. package/dist/gui/assets/classDiagram-OUVF2IWQ-BN1qwPdD.js +1 -0
  20. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-BN1qwPdD.js +1 -0
  21. package/dist/gui/assets/{cose-bilkent-JH36ORCC-Bm9uE-P8.js → cose-bilkent-JH36ORCC-C3oDctXM.js} +1 -1
  22. package/dist/gui/assets/{cynefin-VYW2F7L2-Dd-Apprt.js → cynefin-VYW2F7L2-BjremdIM.js} +1 -1
  23. package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-DpGBOFX2.js → cynefinDiagram-TSTJHNR4-Cwe2fD65.js} +1 -1
  24. package/dist/gui/assets/{dagre-VKFMJZFB-DmKBW-UB.js → dagre-VKFMJZFB-Bx2kzeqs.js} +1 -1
  25. package/dist/gui/assets/{diagram-FQU43EPY-CYuUGN7Z.js → diagram-FQU43EPY-BVyLKNdq.js} +1 -1
  26. package/dist/gui/assets/{diagram-G47NLZAW-BZ-zUUWn.js → diagram-G47NLZAW-DicBAwcf.js} +1 -1
  27. package/dist/gui/assets/{diagram-NH7WQ7WH-D2qb5dA_.js → diagram-NH7WQ7WH-BbRrvaYb.js} +1 -1
  28. package/dist/gui/assets/{diagram-OA4YK3LP-BSy8-VUz.js → diagram-OA4YK3LP-C2YIUXV5.js} +1 -1
  29. package/dist/gui/assets/{diagram-WEI45ONY-B-vTVzM8.js → diagram-WEI45ONY-DJHPHFaZ.js} +1 -1
  30. package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-cKb33glS.js → ebnfDiagram-CCIWWBDH-DtDW0rR6.js} +1 -1
  31. package/dist/gui/assets/{erDiagram-Q63AITRT-DvWEFI1U.js → erDiagram-Q63AITRT-C5CAH1UZ.js} +1 -1
  32. package/dist/gui/assets/{flowDiagram-23GEKE2U-CfvFgLP2.js → flowDiagram-23GEKE2U-DA2WblHa.js} +1 -1
  33. package/dist/gui/assets/{ganttDiagram-NO4QXBWP-BnDujV-k.js → ganttDiagram-NO4QXBWP-TMRYyAbG.js} +1 -1
  34. package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-Sv91FaB5.js → gitGraphDiagram-IHSO6WYX-Ci-GVNac.js} +1 -1
  35. package/dist/gui/assets/index-Bq3A8DU2.js +21 -0
  36. package/dist/gui/assets/{infoDiagram-FWYZ7A6U-BE3WS_us.js → infoDiagram-FWYZ7A6U-BV4Ye9h-.js} +1 -1
  37. package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-FObQPAd_.js → ishikawaDiagram-FXEZZL3T-CLBTOnXf.js} +1 -1
  38. package/dist/gui/assets/{journeyDiagram-5HDEW3XC-D3RAFL7x.js → journeyDiagram-5HDEW3XC-BINYoOlq.js} +1 -1
  39. package/dist/gui/assets/{kanban-definition-HUTT4EX6-Bx1DS2KG.js → kanban-definition-HUTT4EX6-Bvoywhuo.js} +1 -1
  40. package/dist/gui/assets/{linear-oevdTPQK.js → linear-CldLHplp.js} +1 -1
  41. package/dist/gui/assets/{mermaid.core-jn1Xktvs.js → mermaid.core-1Uynhu-S.js} +4 -4
  42. package/dist/gui/assets/{mindmap-definition-LN4V7U3C-xLT5IJki.js → mindmap-definition-LN4V7U3C-Sv5B_zGg.js} +1 -1
  43. package/dist/gui/assets/{pegDiagram-2B236MQR-DToAMrXG.js → pegDiagram-2B236MQR-CyYAur_9.js} +1 -1
  44. package/dist/gui/assets/{pieDiagram-ENE6RG2P-Cw6tv4YJ.js → pieDiagram-ENE6RG2P-D3P7lu31.js} +1 -1
  45. package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-GW5Knopm.js → quadrantDiagram-ABIIQ3AL-zmQrhKVf.js} +1 -1
  46. package/dist/gui/assets/{railroadDiagram-RFXS5EU6-CuP1sa-2.js → railroadDiagram-RFXS5EU6-D5HlXQ4M.js} +1 -1
  47. package/dist/gui/assets/{requirementDiagram-TGXJPOKE-D8IcCo1X.js → requirementDiagram-TGXJPOKE-BJcv5tpR.js} +1 -1
  48. package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-CfT_C9uh.js → sankeyDiagram-HTMAVEWB-9R97Q-65.js} +1 -1
  49. package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-BwUwWFYe.js → sequenceDiagram-DBY2YBRQ-D6v2e_UA.js} +1 -1
  50. package/dist/gui/assets/{sizeCapture-X5ZJPWSS-DyBlcl4H.js → sizeCapture-X5ZJPWSS-5Ee75AoR.js} +1 -1
  51. package/dist/gui/assets/{stateDiagram-2N3HPSRC-yv8DkbvF.js → stateDiagram-2N3HPSRC-CiFKPVFd.js} +1 -1
  52. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-XeM3QPuf.js +1 -0
  53. package/dist/gui/assets/{swimlanes-5IMT3BWC-BnOmKdmr.js → swimlanes-5IMT3BWC-DejeKz32.js} +2 -2
  54. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-BaUP5W6u.js +8 -0
  55. package/dist/gui/assets/{timeline-definition-FHXFAJF6-C6_-GVjE.js → timeline-definition-FHXFAJF6-CpW-bina.js} +1 -1
  56. package/dist/gui/assets/{vennDiagram-L72KCM5P-D_N0uLk2.js → vennDiagram-L72KCM5P-DFEDh4dV.js} +1 -1
  57. package/dist/gui/assets/{wardleyDiagram-EHGQE667-CnNoxFYY.js → wardleyDiagram-EHGQE667-B4Blcc-a.js} +1 -1
  58. package/dist/gui/assets/{xychartDiagram-FW5EYKEG-CloORw9z.js → xychartDiagram-FW5EYKEG-D9idxadT.js} +1 -1
  59. package/dist/gui/index.html +1 -1
  60. package/package.json +2 -2
  61. package/dist/_commonjsHelpers-DyI1JsEH.js +0 -34
  62. package/dist/abnfDiagram-VRR7QNED-UQS77aUi.js +0 -119
  63. package/dist/api-DrYc_Ds_.js +0 -129852
  64. package/dist/arc-B1cAL3U1.js +0 -132
  65. package/dist/architectureDiagram-ZJ3FMSHR-CfWOhs-q.js +0 -8816
  66. package/dist/blockDiagram-677ZJIJ3-CLOAAFZa.js +0 -3796
  67. package/dist/c4Diagram-LMCZKHZV-BGdELGkb.js +0 -2483
  68. package/dist/certs-BeimSwB3.js +0 -14071
  69. package/dist/certs-C4t5lAmJ.js +0 -14071
  70. package/dist/certs-CLLngjpY.js +0 -14071
  71. package/dist/certs-D3fTB-0_.js +0 -14071
  72. package/dist/channel-_gQD3mZ8.js +0 -8
  73. package/dist/chunk-2Q5K7J3B-DIJkMPWD.js +0 -20
  74. package/dist/chunk-32BRIVSS-CIQb7-9I.js +0 -117
  75. package/dist/chunk-5VM5RSS4-DmlAsh6o.js +0 -20
  76. package/dist/chunk-EX3LRPZG-BEXyn5R-.js +0 -1989
  77. package/dist/chunk-JWPE2WC7-XiIefccF.js +0 -17
  78. package/dist/chunk-MOJQB5TN-CC5OBDWw.js +0 -861
  79. package/dist/chunk-RYQCIY6F-DQacsGpB.js +0 -475
  80. package/dist/chunk-V7JOEXUC-TLRsIUvf.js +0 -2027
  81. package/dist/chunk-VR4S4FIN-9AfN7RDF.js +0 -25
  82. package/dist/chunk-XXDRQBXY-DhWucSRr.js +0 -14
  83. package/dist/classDiagram-OUVF2IWQ-CN55rRkB.js +0 -20
  84. package/dist/classDiagram-v2-EOCWNBFH-CN55rRkB.js +0 -20
  85. package/dist/cose-bilkent-JH36ORCC-8uGYe6_d.js +0 -4944
  86. package/dist/cynefin-VYW2F7L2-BwTeE-TI.js +0 -32061
  87. package/dist/cynefinDiagram-TSTJHNR4-DM7ixE-v.js +0 -454
  88. package/dist/cytoscape.esm-BTopYfIb.js +0 -30347
  89. package/dist/dagre-VKFMJZFB-blEDoYen.js +0 -522
  90. package/dist/defaultLocale-wHUL1xE2.js +0 -207
  91. package/dist/diagram-FQU43EPY-MEZlmmdi.js +0 -633
  92. package/dist/diagram-G47NLZAW-DZOZvHqp.js +0 -857
  93. package/dist/diagram-NH7WQ7WH-ChpmPbZz.js +0 -213
  94. package/dist/diagram-OA4YK3LP-oy4yvrnL.js +0 -489
  95. package/dist/diagram-WEI45ONY-B3nx1cYt.js +0 -305
  96. package/dist/ebnfDiagram-CCIWWBDH-BASj7BoO.js +0 -139
  97. package/dist/erDiagram-Q63AITRT-lujHq-S9.js +0 -1239
  98. package/dist/flowDiagram-23GEKE2U-BdsAVPgU.js +0 -2349
  99. package/dist/ganttDiagram-NO4QXBWP-DUUP4lsu.js +0 -3733
  100. package/dist/gitGraphDiagram-IHSO6WYX-BdIPAtb0.js +0 -1374
  101. package/dist/graph-CE8jV7cI.js +0 -2043
  102. package/dist/gui/assets/channel-BhMtSKKb.js +0 -1
  103. package/dist/gui/assets/classDiagram-OUVF2IWQ-DiPaZ7LY.js +0 -1
  104. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DiPaZ7LY.js +0 -1
  105. package/dist/gui/assets/index-Do-LzYBw.js +0 -21
  106. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-BspjtPpt.js +0 -1
  107. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-BgPC3dJX.js +0 -8
  108. package/dist/index--GoVvfUP.js +0 -5447
  109. package/dist/index-3-WDiDAh.js +0 -5466
  110. package/dist/index-CHBXZAxg.js +0 -5460
  111. package/dist/index-DeCq8xn7.js +0 -5460
  112. package/dist/infoDiagram-FWYZ7A6U-D9wo93kg.js +0 -32
  113. package/dist/init-DDGa2CQM.js +0 -17
  114. package/dist/ishikawaDiagram-FXEZZL3T-DZh3_kt2.js +0 -968
  115. package/dist/journeyDiagram-5HDEW3XC-C8RWHIn0.js +0 -1256
  116. package/dist/kanban-definition-HUTT4EX6-B7qQtB5a.js +0 -1053
  117. package/dist/katex-WjDlQEfU.js +0 -14500
  118. package/dist/layout-DQAYh_L7.js +0 -2360
  119. package/dist/linear-C_kZRZXS.js +0 -341
  120. package/dist/map-BElV7BMC.js +0 -299
  121. package/dist/mermaid.core-Dy_tFRs7.js +0 -26495
  122. package/dist/mindmap-definition-LN4V7U3C-BzHCd5Ab.js +0 -1181
  123. package/dist/ordinal-C2kkg180.js +0 -77
  124. package/dist/pegDiagram-2B236MQR-B046bQWM.js +0 -127
  125. package/dist/pieDiagram-ENE6RG2P-B5_W2CZy.js +0 -316
  126. package/dist/quadrantDiagram-ABIIQ3AL-Bbpt496h.js +0 -1342
  127. package/dist/railroadDiagram-RFXS5EU6-10XIH3X0.js +0 -93
  128. package/dist/requirementDiagram-TGXJPOKE-Dt1QyccY.js +0 -1205
  129. package/dist/sankeyDiagram-HTMAVEWB-CnqRAq7M.js +0 -1274
  130. package/dist/sequenceDiagram-DBY2YBRQ-DtJLSXoz.js +0 -4515
  131. package/dist/sizeCapture-X5ZJPWSS-DUl5ZEo3.js +0 -63
  132. package/dist/stateDiagram-2N3HPSRC-b-qzcVNj.js +0 -449
  133. package/dist/stateDiagram-v2-6OUMAXLB-KjDlRfc7.js +0 -20
  134. package/dist/swimlanes-5IMT3BWC-CAjGnQLa.js +0 -8553
  135. package/dist/swimlanesDiagram-G3AALYLV-DiOi9bzU.js +0 -16
  136. package/dist/timeline-definition-FHXFAJF6-Bme2FWbh.js +0 -1597
  137. package/dist/vennDiagram-L72KCM5P-BUQgnZDB.js +0 -2516
  138. package/dist/wardleyDiagram-EHGQE667-DHR2Avlu.js +0 -976
  139. package/dist/xychartDiagram-FW5EYKEG-V4K5eBMS.js +0 -2000
@@ -1,1342 +0,0 @@
1
- #!/usr/bin/env node
2
- import { s as setAccDescription, g as getAccDescription, o as getDiagramTitle, n as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, c as getConfig2, l as log, d as select, e as configureSvgSize, p as clear, B as defaultConfig_default, i as sanitizeText, E as getThemeVariables3 } from "./mermaid.core-Dy_tFRs7.js";
3
- import { l as linear } from "./linear-C_kZRZXS.js";
4
- var parser = (function() {
5
- var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
6
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
7
- return o2;
8
- }, "o"), $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 7], $V5 = [1, 4, 5, 10, 12, 13, 14, 15, 18, 25, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], $V6 = [1, 4, 5, 10, 12, 13, 14, 15, 18, 25, 28, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], $V7 = [55, 56, 57], $V8 = [2, 36], $V9 = [1, 37], $Va = [1, 36], $Vb = [1, 38], $Vc = [1, 35], $Vd = [1, 43], $Ve = [1, 41], $Vf = [1, 45], $Vg = [1, 14], $Vh = [1, 23], $Vi = [1, 18], $Vj = [1, 19], $Vk = [1, 20], $Vl = [1, 21], $Vm = [1, 22], $Vn = [1, 24], $Vo = [1, 25], $Vp = [1, 26], $Vq = [1, 27], $Vr = [1, 28], $Vs = [1, 29], $Vt = [1, 32], $Vu = [1, 33], $Vv = [1, 34], $Vw = [1, 39], $Vx = [1, 40], $Vy = [1, 42], $Vz = [1, 44], $VA = [1, 63], $VB = [1, 62], $VC = [4, 5, 8, 10, 12, 13, 14, 15, 18, 44, 47, 49, 55, 56, 57, 63, 64, 65, 66, 67], $VD = [1, 66], $VE = [1, 67], $VF = [1, 68], $VG = [1, 69], $VH = [1, 70], $VI = [1, 71], $VJ = [1, 72], $VK = [1, 73], $VL = [1, 74], $VM = [1, 75], $VN = [1, 76], $VO = [1, 77], $VP = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], $VQ = [1, 91], $VR = [1, 92], $VS = [1, 93], $VT = [1, 100], $VU = [1, 94], $VV = [1, 97], $VW = [1, 95], $VX = [1, 96], $VY = [1, 98], $VZ = [1, 99], $V_ = [1, 103], $V$ = [10, 55, 56, 57], $V01 = [4, 5, 6, 8, 10, 11, 13, 17, 18, 19, 20, 55, 56, 57];
9
- var parser2 = {
10
- trace: /* @__PURE__ */ __name(function trace() {
11
- }, "trace"),
12
- yy: {},
13
- symbols_: { "error": 2, "idStringToken": 3, "ALPHA": 4, "NUM": 5, "NODE_STRING": 6, "DOWN": 7, "MINUS": 8, "DEFAULT": 9, "COMMA": 10, "COLON": 11, "AMP": 12, "BRKT": 13, "MULT": 14, "UNICODE_TEXT": 15, "styleComponent": 16, "UNIT": 17, "SPACE": 18, "STYLE": 19, "PCT": 20, "idString": 21, "style": 22, "stylesOpt": 23, "classDefStatement": 24, "CLASSDEF": 25, "start": 26, "eol": 27, "QUADRANT": 28, "document": 29, "line": 30, "statement": 31, "axisDetails": 32, "quadrantDetails": 33, "points": 34, "title": 35, "title_value": 36, "acc_title": 37, "acc_title_value": 38, "acc_descr": 39, "acc_descr_value": 40, "acc_descr_multiline_value": 41, "section": 42, "text": 43, "point_start": 44, "point_x": 45, "point_y": 46, "class_name": 47, "X-AXIS": 48, "AXIS-TEXT-DELIMITER": 49, "Y-AXIS": 50, "QUADRANT_1": 51, "QUADRANT_2": 52, "QUADRANT_3": 53, "QUADRANT_4": 54, "NEWLINE": 55, "SEMI": 56, "EOF": 57, "alphaNumToken": 58, "textNoTagsToken": 59, "STR": 60, "MD_STR": 61, "alphaNum": 62, "PUNCTUATION": 63, "PLUS": 64, "EQUALS": 65, "DOT": 66, "UNDERSCORE": 67, "$accept": 0, "$end": 1 },
14
- terminals_: { 2: "error", 4: "ALPHA", 5: "NUM", 6: "NODE_STRING", 7: "DOWN", 8: "MINUS", 9: "DEFAULT", 10: "COMMA", 11: "COLON", 12: "AMP", 13: "BRKT", 14: "MULT", 15: "UNICODE_TEXT", 17: "UNIT", 18: "SPACE", 19: "STYLE", 20: "PCT", 25: "CLASSDEF", 28: "QUADRANT", 35: "title", 36: "title_value", 37: "acc_title", 38: "acc_title_value", 39: "acc_descr", 40: "acc_descr_value", 41: "acc_descr_multiline_value", 42: "section", 44: "point_start", 45: "point_x", 46: "point_y", 47: "class_name", 48: "X-AXIS", 49: "AXIS-TEXT-DELIMITER", 50: "Y-AXIS", 51: "QUADRANT_1", 52: "QUADRANT_2", 53: "QUADRANT_3", 54: "QUADRANT_4", 55: "NEWLINE", 56: "SEMI", 57: "EOF", 60: "STR", 61: "MD_STR", 63: "PUNCTUATION", 64: "PLUS", 65: "EQUALS", 66: "DOT", 67: "UNDERSCORE" },
15
- productions_: [0, [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [21, 1], [21, 2], [22, 1], [22, 2], [23, 1], [23, 3], [24, 5], [26, 2], [26, 2], [26, 2], [29, 0], [29, 2], [30, 2], [31, 0], [31, 1], [31, 2], [31, 1], [31, 1], [31, 1], [31, 2], [31, 2], [31, 2], [31, 1], [31, 1], [34, 4], [34, 5], [34, 5], [34, 6], [32, 4], [32, 3], [32, 2], [32, 4], [32, 3], [32, 2], [33, 2], [33, 2], [33, 2], [33, 2], [27, 1], [27, 1], [27, 1], [43, 1], [43, 2], [43, 1], [43, 1], [62, 1], [62, 2], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [59, 1], [59, 1], [59, 1]],
16
- performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
17
- var $0 = $$.length - 1;
18
- switch (yystate) {
19
- case 23:
20
- this.$ = $$[$0];
21
- break;
22
- case 24:
23
- this.$ = $$[$0 - 1] + "" + $$[$0];
24
- break;
25
- case 26:
26
- this.$ = $$[$0 - 1] + $$[$0];
27
- break;
28
- case 27:
29
- this.$ = [$$[$0].trim()];
30
- break;
31
- case 28:
32
- $$[$0 - 2].push($$[$0].trim());
33
- this.$ = $$[$0 - 2];
34
- break;
35
- case 29:
36
- this.$ = $$[$0 - 4];
37
- yy.addClass($$[$0 - 2], $$[$0]);
38
- break;
39
- case 37:
40
- this.$ = [];
41
- break;
42
- case 42:
43
- this.$ = $$[$0].trim();
44
- yy.setDiagramTitle(this.$);
45
- break;
46
- case 43:
47
- this.$ = $$[$0].trim();
48
- yy.setAccTitle(this.$);
49
- break;
50
- case 44:
51
- case 45:
52
- this.$ = $$[$0].trim();
53
- yy.setAccDescription(this.$);
54
- break;
55
- case 46:
56
- yy.addSection($$[$0].substr(8));
57
- this.$ = $$[$0].substr(8);
58
- break;
59
- case 47:
60
- yy.addPoint($$[$0 - 3], "", $$[$0 - 1], $$[$0], []);
61
- break;
62
- case 48:
63
- yy.addPoint($$[$0 - 4], $$[$0 - 3], $$[$0 - 1], $$[$0], []);
64
- break;
65
- case 49:
66
- yy.addPoint($$[$0 - 4], "", $$[$0 - 2], $$[$0 - 1], $$[$0]);
67
- break;
68
- case 50:
69
- yy.addPoint($$[$0 - 5], $$[$0 - 4], $$[$0 - 2], $$[$0 - 1], $$[$0]);
70
- break;
71
- case 51:
72
- yy.setXAxisLeftText($$[$0 - 2]);
73
- yy.setXAxisRightText($$[$0]);
74
- break;
75
- case 52:
76
- $$[$0 - 1].text += " ⟶ ";
77
- yy.setXAxisLeftText($$[$0 - 1]);
78
- break;
79
- case 53:
80
- yy.setXAxisLeftText($$[$0]);
81
- break;
82
- case 54:
83
- yy.setYAxisBottomText($$[$0 - 2]);
84
- yy.setYAxisTopText($$[$0]);
85
- break;
86
- case 55:
87
- $$[$0 - 1].text += " ⟶ ";
88
- yy.setYAxisBottomText($$[$0 - 1]);
89
- break;
90
- case 56:
91
- yy.setYAxisBottomText($$[$0]);
92
- break;
93
- case 57:
94
- yy.setQuadrant1Text($$[$0]);
95
- break;
96
- case 58:
97
- yy.setQuadrant2Text($$[$0]);
98
- break;
99
- case 59:
100
- yy.setQuadrant3Text($$[$0]);
101
- break;
102
- case 60:
103
- yy.setQuadrant4Text($$[$0]);
104
- break;
105
- case 64:
106
- this.$ = { text: $$[$0], type: "text" };
107
- break;
108
- case 65:
109
- this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
110
- break;
111
- case 66:
112
- this.$ = { text: $$[$0], type: "text" };
113
- break;
114
- case 67:
115
- this.$ = { text: $$[$0], type: "markdown" };
116
- break;
117
- case 68:
118
- this.$ = $$[$0];
119
- break;
120
- case 69:
121
- this.$ = $$[$0 - 1] + "" + $$[$0];
122
- break;
123
- }
124
- }, "anonymous"),
125
- table: [{ 18: $V0, 26: 1, 27: 2, 28: $V1, 55: $V2, 56: $V3, 57: $V4 }, { 1: [3] }, { 18: $V0, 26: 8, 27: 2, 28: $V1, 55: $V2, 56: $V3, 57: $V4 }, { 18: $V0, 26: 9, 27: 2, 28: $V1, 55: $V2, 56: $V3, 57: $V4 }, o($V5, [2, 33], { 29: 10 }), o($V6, [2, 61]), o($V6, [2, 62]), o($V6, [2, 63]), { 1: [2, 30] }, { 1: [2, 31] }, o($V7, $V8, { 30: 11, 31: 12, 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 1: [2, 32], 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $Vg, 25: $Vh, 35: $Vi, 37: $Vj, 39: $Vk, 41: $Vl, 42: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V5, [2, 34]), { 27: 46, 55: $V2, 56: $V3, 57: $V4 }, o($V7, [2, 37]), o($V7, $V8, { 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 31: 47, 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $Vg, 25: $Vh, 35: $Vi, 37: $Vj, 39: $Vk, 41: $Vl, 42: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 39]), o($V7, [2, 40]), o($V7, [2, 41]), { 36: [1, 48] }, { 38: [1, 49] }, { 40: [1, 50] }, o($V7, [2, 45]), o($V7, [2, 46]), { 18: [1, 51] }, { 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 43: 52, 58: 31, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }, { 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 43: 53, 58: 31, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }, { 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 43: 54, 58: 31, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }, { 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 43: 55, 58: 31, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }, { 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 43: 56, 58: 31, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }, { 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 43: 57, 58: 31, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }, { 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 44: [1, 58], 47: [1, 59], 58: 61, 59: 60, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }, o($VC, [2, 64]), o($VC, [2, 66]), o($VC, [2, 67]), o($VC, [2, 70]), o($VC, [2, 71]), o($VC, [2, 72]), o($VC, [2, 73]), o($VC, [2, 74]), o($VC, [2, 75]), o($VC, [2, 76]), o($VC, [2, 77]), o($VC, [2, 78]), o($VC, [2, 79]), o($VC, [2, 80]), o($VC, [2, 81]), o($V5, [2, 35]), o($V7, [2, 38]), o($V7, [2, 42]), o($V7, [2, 43]), o($V7, [2, 44]), { 3: 65, 4: $VD, 5: $VE, 6: $VF, 7: $VG, 8: $VH, 9: $VI, 10: $VJ, 11: $VK, 12: $VL, 13: $VM, 14: $VN, 15: $VO, 21: 64 }, o($V7, [2, 53], { 59: 60, 58: 61, 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 49: [1, 78], 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 56], { 59: 60, 58: 61, 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 49: [1, 79], 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 57], { 59: 60, 58: 61, 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 58], { 59: 60, 58: 61, 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 59], { 59: 60, 58: 61, 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 60], { 59: 60, 58: 61, 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), { 45: [1, 80] }, { 44: [1, 81] }, o($VC, [2, 65]), o($VC, [2, 82]), o($VC, [2, 83]), o($VC, [2, 84]), { 3: 83, 4: $VD, 5: $VE, 6: $VF, 7: $VG, 8: $VH, 9: $VI, 10: $VJ, 11: $VK, 12: $VL, 13: $VM, 14: $VN, 15: $VO, 18: [1, 82] }, o($VP, [2, 23]), o($VP, [2, 1]), o($VP, [2, 2]), o($VP, [2, 3]), o($VP, [2, 4]), o($VP, [2, 5]), o($VP, [2, 6]), o($VP, [2, 7]), o($VP, [2, 8]), o($VP, [2, 9]), o($VP, [2, 10]), o($VP, [2, 11]), o($VP, [2, 12]), o($V7, [2, 52], { 58: 31, 43: 84, 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 55], { 58: 31, 43: 85, 4: $V9, 5: $Va, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 60: $Vt, 61: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), { 46: [1, 86] }, { 45: [1, 87] }, { 4: $VQ, 5: $VR, 6: $VS, 8: $VT, 11: $VU, 13: $VV, 16: 90, 17: $VW, 18: $VX, 19: $VY, 20: $VZ, 22: 89, 23: 88 }, o($VP, [2, 24]), o($V7, [2, 51], { 59: 60, 58: 61, 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 54], { 59: 60, 58: 61, 4: $V9, 5: $Va, 8: $VA, 10: $Vb, 12: $Vc, 13: $Vd, 14: $Ve, 15: $Vf, 18: $VB, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz }), o($V7, [2, 47], { 22: 89, 16: 90, 23: 101, 4: $VQ, 5: $VR, 6: $VS, 8: $VT, 11: $VU, 13: $VV, 17: $VW, 18: $VX, 19: $VY, 20: $VZ }), { 46: [1, 102] }, o($V7, [2, 29], { 10: $V_ }), o($V$, [2, 27], { 16: 104, 4: $VQ, 5: $VR, 6: $VS, 8: $VT, 11: $VU, 13: $VV, 17: $VW, 18: $VX, 19: $VY, 20: $VZ }), o($V01, [2, 25]), o($V01, [2, 13]), o($V01, [2, 14]), o($V01, [2, 15]), o($V01, [2, 16]), o($V01, [2, 17]), o($V01, [2, 18]), o($V01, [2, 19]), o($V01, [2, 20]), o($V01, [2, 21]), o($V01, [2, 22]), o($V7, [2, 49], { 10: $V_ }), o($V7, [2, 48], { 22: 89, 16: 90, 23: 105, 4: $VQ, 5: $VR, 6: $VS, 8: $VT, 11: $VU, 13: $VV, 17: $VW, 18: $VX, 19: $VY, 20: $VZ }), { 4: $VQ, 5: $VR, 6: $VS, 8: $VT, 11: $VU, 13: $VV, 16: 90, 17: $VW, 18: $VX, 19: $VY, 20: $VZ, 22: 106 }, o($V01, [2, 26]), o($V7, [2, 50], { 10: $V_ }), o($V$, [2, 28], { 16: 104, 4: $VQ, 5: $VR, 6: $VS, 8: $VT, 11: $VU, 13: $VV, 17: $VW, 18: $VX, 19: $VY, 20: $VZ })],
126
- defaultActions: { 8: [2, 30], 9: [2, 31] },
127
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
128
- if (hash.recoverable) {
129
- this.trace(str);
130
- } else {
131
- var error = new Error(str);
132
- error.hash = hash;
133
- throw error;
134
- }
135
- }, "parseError"),
136
- parse: /* @__PURE__ */ __name(function parse(input) {
137
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
138
- var args = lstack.slice.call(arguments, 1);
139
- var lexer2 = Object.create(this.lexer);
140
- var sharedState = { yy: {} };
141
- for (var k in this.yy) {
142
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
143
- sharedState.yy[k] = this.yy[k];
144
- }
145
- }
146
- lexer2.setInput(input, sharedState.yy);
147
- sharedState.yy.lexer = lexer2;
148
- sharedState.yy.parser = this;
149
- if (typeof lexer2.yylloc == "undefined") {
150
- lexer2.yylloc = {};
151
- }
152
- var yyloc = lexer2.yylloc;
153
- lstack.push(yyloc);
154
- var ranges = lexer2.options && lexer2.options.ranges;
155
- if (typeof sharedState.yy.parseError === "function") {
156
- this.parseError = sharedState.yy.parseError;
157
- } else {
158
- this.parseError = Object.getPrototypeOf(this).parseError;
159
- }
160
- function popStack(n) {
161
- stack.length = stack.length - 2 * n;
162
- vstack.length = vstack.length - n;
163
- lstack.length = lstack.length - n;
164
- }
165
- __name(popStack, "popStack");
166
- function lex() {
167
- var token;
168
- token = tstack.pop() || lexer2.lex() || EOF;
169
- if (typeof token !== "number") {
170
- if (token instanceof Array) {
171
- tstack = token;
172
- token = tstack.pop();
173
- }
174
- token = self.symbols_[token] || token;
175
- }
176
- return token;
177
- }
178
- __name(lex, "lex");
179
- var symbol, state, action, r, yyval = {}, p, len, newState, expected;
180
- while (true) {
181
- state = stack[stack.length - 1];
182
- if (this.defaultActions[state]) {
183
- action = this.defaultActions[state];
184
- } else {
185
- if (symbol === null || typeof symbol == "undefined") {
186
- symbol = lex();
187
- }
188
- action = table[state] && table[state][symbol];
189
- }
190
- if (typeof action === "undefined" || !action.length || !action[0]) {
191
- var errStr = "";
192
- expected = [];
193
- for (p in table[state]) {
194
- if (this.terminals_[p] && p > TERROR) {
195
- expected.push("'" + this.terminals_[p] + "'");
196
- }
197
- }
198
- if (lexer2.showPosition) {
199
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
200
- } else {
201
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
202
- }
203
- this.parseError(errStr, {
204
- text: lexer2.match,
205
- token: this.terminals_[symbol] || symbol,
206
- line: lexer2.yylineno,
207
- loc: yyloc,
208
- expected
209
- });
210
- }
211
- if (action[0] instanceof Array && action.length > 1) {
212
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
213
- }
214
- switch (action[0]) {
215
- case 1:
216
- stack.push(symbol);
217
- vstack.push(lexer2.yytext);
218
- lstack.push(lexer2.yylloc);
219
- stack.push(action[1]);
220
- symbol = null;
221
- {
222
- yyleng = lexer2.yyleng;
223
- yytext = lexer2.yytext;
224
- yylineno = lexer2.yylineno;
225
- yyloc = lexer2.yylloc;
226
- }
227
- break;
228
- case 2:
229
- len = this.productions_[action[1]][1];
230
- yyval.$ = vstack[vstack.length - len];
231
- yyval._$ = {
232
- first_line: lstack[lstack.length - (len || 1)].first_line,
233
- last_line: lstack[lstack.length - 1].last_line,
234
- first_column: lstack[lstack.length - (len || 1)].first_column,
235
- last_column: lstack[lstack.length - 1].last_column
236
- };
237
- if (ranges) {
238
- yyval._$.range = [
239
- lstack[lstack.length - (len || 1)].range[0],
240
- lstack[lstack.length - 1].range[1]
241
- ];
242
- }
243
- r = this.performAction.apply(yyval, [
244
- yytext,
245
- yyleng,
246
- yylineno,
247
- sharedState.yy,
248
- action[1],
249
- vstack,
250
- lstack
251
- ].concat(args));
252
- if (typeof r !== "undefined") {
253
- return r;
254
- }
255
- if (len) {
256
- stack = stack.slice(0, -1 * len * 2);
257
- vstack = vstack.slice(0, -1 * len);
258
- lstack = lstack.slice(0, -1 * len);
259
- }
260
- stack.push(this.productions_[action[1]][0]);
261
- vstack.push(yyval.$);
262
- lstack.push(yyval._$);
263
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
264
- stack.push(newState);
265
- break;
266
- case 3:
267
- return true;
268
- }
269
- }
270
- return true;
271
- }, "parse")
272
- };
273
- var lexer = /* @__PURE__ */ (function() {
274
- var lexer2 = {
275
- EOF: 1,
276
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
277
- if (this.yy.parser) {
278
- this.yy.parser.parseError(str, hash);
279
- } else {
280
- throw new Error(str);
281
- }
282
- }, "parseError"),
283
- // resets the lexer, sets new input
284
- setInput: /* @__PURE__ */ __name(function(input, yy) {
285
- this.yy = yy || this.yy || {};
286
- this._input = input;
287
- this._more = this._backtrack = this.done = false;
288
- this.yylineno = this.yyleng = 0;
289
- this.yytext = this.matched = this.match = "";
290
- this.conditionStack = ["INITIAL"];
291
- this.yylloc = {
292
- first_line: 1,
293
- first_column: 0,
294
- last_line: 1,
295
- last_column: 0
296
- };
297
- if (this.options.ranges) {
298
- this.yylloc.range = [0, 0];
299
- }
300
- this.offset = 0;
301
- return this;
302
- }, "setInput"),
303
- // consumes and returns one char from the input
304
- input: /* @__PURE__ */ __name(function() {
305
- var ch = this._input[0];
306
- this.yytext += ch;
307
- this.yyleng++;
308
- this.offset++;
309
- this.match += ch;
310
- this.matched += ch;
311
- var lines = ch.match(/(?:\r\n?|\n).*/g);
312
- if (lines) {
313
- this.yylineno++;
314
- this.yylloc.last_line++;
315
- } else {
316
- this.yylloc.last_column++;
317
- }
318
- if (this.options.ranges) {
319
- this.yylloc.range[1]++;
320
- }
321
- this._input = this._input.slice(1);
322
- return ch;
323
- }, "input"),
324
- // unshifts one char (or a string) into the input
325
- unput: /* @__PURE__ */ __name(function(ch) {
326
- var len = ch.length;
327
- var lines = ch.split(/(?:\r\n?|\n)/g);
328
- this._input = ch + this._input;
329
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
330
- this.offset -= len;
331
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
332
- this.match = this.match.substr(0, this.match.length - 1);
333
- this.matched = this.matched.substr(0, this.matched.length - 1);
334
- if (lines.length - 1) {
335
- this.yylineno -= lines.length - 1;
336
- }
337
- var r = this.yylloc.range;
338
- this.yylloc = {
339
- first_line: this.yylloc.first_line,
340
- last_line: this.yylineno + 1,
341
- first_column: this.yylloc.first_column,
342
- 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
343
- };
344
- if (this.options.ranges) {
345
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
346
- }
347
- this.yyleng = this.yytext.length;
348
- return this;
349
- }, "unput"),
350
- // When called from action, caches matched text and appends it on next action
351
- more: /* @__PURE__ */ __name(function() {
352
- this._more = true;
353
- return this;
354
- }, "more"),
355
- // 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.
356
- reject: /* @__PURE__ */ __name(function() {
357
- if (this.options.backtrack_lexer) {
358
- this._backtrack = true;
359
- } else {
360
- 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(), {
361
- text: "",
362
- token: null,
363
- line: this.yylineno
364
- });
365
- }
366
- return this;
367
- }, "reject"),
368
- // retain first n characters of the match
369
- less: /* @__PURE__ */ __name(function(n) {
370
- this.unput(this.match.slice(n));
371
- }, "less"),
372
- // displays already matched input, i.e. for error messages
373
- pastInput: /* @__PURE__ */ __name(function() {
374
- var past = this.matched.substr(0, this.matched.length - this.match.length);
375
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
376
- }, "pastInput"),
377
- // displays upcoming input, i.e. for error messages
378
- upcomingInput: /* @__PURE__ */ __name(function() {
379
- var next = this.match;
380
- if (next.length < 20) {
381
- next += this._input.substr(0, 20 - next.length);
382
- }
383
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
384
- }, "upcomingInput"),
385
- // displays the character position where the lexing error occurred, i.e. for error messages
386
- showPosition: /* @__PURE__ */ __name(function() {
387
- var pre = this.pastInput();
388
- var c = new Array(pre.length + 1).join("-");
389
- return pre + this.upcomingInput() + "\n" + c + "^";
390
- }, "showPosition"),
391
- // test the lexed token: return FALSE when not a match, otherwise return token
392
- test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
393
- var token, lines, backup;
394
- if (this.options.backtrack_lexer) {
395
- backup = {
396
- yylineno: this.yylineno,
397
- yylloc: {
398
- first_line: this.yylloc.first_line,
399
- last_line: this.last_line,
400
- first_column: this.yylloc.first_column,
401
- last_column: this.yylloc.last_column
402
- },
403
- yytext: this.yytext,
404
- match: this.match,
405
- matches: this.matches,
406
- matched: this.matched,
407
- yyleng: this.yyleng,
408
- offset: this.offset,
409
- _more: this._more,
410
- _input: this._input,
411
- yy: this.yy,
412
- conditionStack: this.conditionStack.slice(0),
413
- done: this.done
414
- };
415
- if (this.options.ranges) {
416
- backup.yylloc.range = this.yylloc.range.slice(0);
417
- }
418
- }
419
- lines = match[0].match(/(?:\r\n?|\n).*/g);
420
- if (lines) {
421
- this.yylineno += lines.length;
422
- }
423
- this.yylloc = {
424
- first_line: this.yylloc.last_line,
425
- last_line: this.yylineno + 1,
426
- first_column: this.yylloc.last_column,
427
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
428
- };
429
- this.yytext += match[0];
430
- this.match += match[0];
431
- this.matches = match;
432
- this.yyleng = this.yytext.length;
433
- if (this.options.ranges) {
434
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
435
- }
436
- this._more = false;
437
- this._backtrack = false;
438
- this._input = this._input.slice(match[0].length);
439
- this.matched += match[0];
440
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
441
- if (this.done && this._input) {
442
- this.done = false;
443
- }
444
- if (token) {
445
- return token;
446
- } else if (this._backtrack) {
447
- for (var k in backup) {
448
- this[k] = backup[k];
449
- }
450
- return false;
451
- }
452
- return false;
453
- }, "test_match"),
454
- // return next match in input
455
- next: /* @__PURE__ */ __name(function() {
456
- if (this.done) {
457
- return this.EOF;
458
- }
459
- if (!this._input) {
460
- this.done = true;
461
- }
462
- var token, match, tempMatch, index;
463
- if (!this._more) {
464
- this.yytext = "";
465
- this.match = "";
466
- }
467
- var rules = this._currentRules();
468
- for (var i = 0; i < rules.length; i++) {
469
- tempMatch = this._input.match(this.rules[rules[i]]);
470
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
471
- match = tempMatch;
472
- index = i;
473
- if (this.options.backtrack_lexer) {
474
- token = this.test_match(tempMatch, rules[i]);
475
- if (token !== false) {
476
- return token;
477
- } else if (this._backtrack) {
478
- match = false;
479
- continue;
480
- } else {
481
- return false;
482
- }
483
- } else if (!this.options.flex) {
484
- break;
485
- }
486
- }
487
- }
488
- if (match) {
489
- token = this.test_match(match, rules[index]);
490
- if (token !== false) {
491
- return token;
492
- }
493
- return false;
494
- }
495
- if (this._input === "") {
496
- return this.EOF;
497
- } else {
498
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
499
- text: "",
500
- token: null,
501
- line: this.yylineno
502
- });
503
- }
504
- }, "next"),
505
- // return next match that has a token
506
- lex: /* @__PURE__ */ __name(function lex() {
507
- var r = this.next();
508
- if (r) {
509
- return r;
510
- } else {
511
- return this.lex();
512
- }
513
- }, "lex"),
514
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
515
- begin: /* @__PURE__ */ __name(function begin(condition) {
516
- this.conditionStack.push(condition);
517
- }, "begin"),
518
- // pop the previously active lexer condition state off the condition stack
519
- popState: /* @__PURE__ */ __name(function popState() {
520
- var n = this.conditionStack.length - 1;
521
- if (n > 0) {
522
- return this.conditionStack.pop();
523
- } else {
524
- return this.conditionStack[0];
525
- }
526
- }, "popState"),
527
- // produce the lexer rule set which is active for the currently active lexer condition state
528
- _currentRules: /* @__PURE__ */ __name(function _currentRules() {
529
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
530
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
531
- } else {
532
- return this.conditions["INITIAL"].rules;
533
- }
534
- }, "_currentRules"),
535
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
536
- topState: /* @__PURE__ */ __name(function topState(n) {
537
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
538
- if (n >= 0) {
539
- return this.conditionStack[n];
540
- } else {
541
- return "INITIAL";
542
- }
543
- }, "topState"),
544
- // alias for begin(condition)
545
- pushState: /* @__PURE__ */ __name(function pushState(condition) {
546
- this.begin(condition);
547
- }, "pushState"),
548
- // return the number of states currently on the stack
549
- stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
550
- return this.conditionStack.length;
551
- }, "stateStackSize"),
552
- options: { "case-insensitive": true },
553
- performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
554
- switch ($avoiding_name_collisions) {
555
- case 0:
556
- break;
557
- case 1:
558
- break;
559
- case 2:
560
- return 55;
561
- case 3:
562
- break;
563
- case 4:
564
- this.begin("title");
565
- return 35;
566
- case 5:
567
- this.popState();
568
- return "title_value";
569
- case 6:
570
- this.begin("acc_title");
571
- return 37;
572
- case 7:
573
- this.popState();
574
- return "acc_title_value";
575
- case 8:
576
- this.begin("acc_descr");
577
- return 39;
578
- case 9:
579
- this.popState();
580
- return "acc_descr_value";
581
- case 10:
582
- this.begin("acc_descr_multiline");
583
- break;
584
- case 11:
585
- this.popState();
586
- break;
587
- case 12:
588
- return "acc_descr_multiline_value";
589
- case 13:
590
- return 48;
591
- case 14:
592
- return 50;
593
- case 15:
594
- return 49;
595
- case 16:
596
- return 51;
597
- case 17:
598
- return 52;
599
- case 18:
600
- return 53;
601
- case 19:
602
- return 54;
603
- case 20:
604
- return 25;
605
- case 21:
606
- this.begin("md_string");
607
- break;
608
- case 22:
609
- return "MD_STR";
610
- case 23:
611
- this.popState();
612
- break;
613
- case 24:
614
- this.begin("string");
615
- break;
616
- case 25:
617
- this.popState();
618
- break;
619
- case 26:
620
- return "STR";
621
- case 27:
622
- this.begin("class_name");
623
- break;
624
- case 28:
625
- this.popState();
626
- return 47;
627
- case 29:
628
- this.begin("point_start");
629
- return 44;
630
- case 30:
631
- this.begin("point_x");
632
- return 45;
633
- case 31:
634
- this.popState();
635
- break;
636
- case 32:
637
- this.popState();
638
- this.begin("point_y");
639
- break;
640
- case 33:
641
- this.popState();
642
- return 46;
643
- case 34:
644
- return 28;
645
- case 35:
646
- return 4;
647
- case 36:
648
- return 15;
649
- case 37:
650
- return 11;
651
- case 38:
652
- return 64;
653
- case 39:
654
- return 10;
655
- case 40:
656
- return 65;
657
- case 41:
658
- return 65;
659
- case 42:
660
- return 14;
661
- case 43:
662
- return 13;
663
- case 44:
664
- return 67;
665
- case 45:
666
- return 66;
667
- case 46:
668
- return 12;
669
- case 47:
670
- return 8;
671
- case 48:
672
- return 5;
673
- case 49:
674
- return 18;
675
- case 50:
676
- return 56;
677
- case 51:
678
- return 63;
679
- case 52:
680
- return 57;
681
- }
682
- }, "anonymous"),
683
- rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:classDef\b)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?::::)/i, /^(?:^\w+)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?:[^\x00-\x7F]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
684
- conditions: { "class_name": { "rules": [28], "inclusive": false }, "point_y": { "rules": [33], "inclusive": false }, "point_x": { "rules": [32], "inclusive": false }, "point_start": { "rules": [30, 31], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "title": { "rules": [5], "inclusive": false }, "md_string": { "rules": [22, 23], "inclusive": false }, "string": { "rules": [25, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 27, 29, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], "inclusive": true } }
685
- };
686
- return lexer2;
687
- })();
688
- parser2.lexer = lexer;
689
- function Parser() {
690
- this.yy = {};
691
- }
692
- __name(Parser, "Parser");
693
- Parser.prototype = parser2;
694
- parser2.Parser = Parser;
695
- return new Parser();
696
- })();
697
- parser.parser = parser;
698
- var quadrant_default = parser;
699
- var defaultThemeVariables = getThemeVariables3();
700
- var QuadrantBuilder = class {
701
- constructor() {
702
- this.classes = /* @__PURE__ */ new Map();
703
- this.config = this.getDefaultConfig();
704
- this.themeConfig = this.getDefaultThemeConfig();
705
- this.data = this.getDefaultData();
706
- }
707
- static {
708
- __name(this, "QuadrantBuilder");
709
- }
710
- getDefaultData() {
711
- return {
712
- titleText: "",
713
- quadrant1Text: "",
714
- quadrant2Text: "",
715
- quadrant3Text: "",
716
- quadrant4Text: "",
717
- xAxisLeftText: "",
718
- xAxisRightText: "",
719
- yAxisBottomText: "",
720
- yAxisTopText: "",
721
- points: []
722
- };
723
- }
724
- getDefaultConfig() {
725
- return {
726
- showXAxis: true,
727
- showYAxis: true,
728
- showTitle: true,
729
- chartHeight: defaultConfig_default.quadrantChart?.chartWidth || 500,
730
- chartWidth: defaultConfig_default.quadrantChart?.chartHeight || 500,
731
- titlePadding: defaultConfig_default.quadrantChart?.titlePadding || 10,
732
- titleFontSize: defaultConfig_default.quadrantChart?.titleFontSize || 20,
733
- quadrantPadding: defaultConfig_default.quadrantChart?.quadrantPadding || 5,
734
- xAxisLabelPadding: defaultConfig_default.quadrantChart?.xAxisLabelPadding || 5,
735
- yAxisLabelPadding: defaultConfig_default.quadrantChart?.yAxisLabelPadding || 5,
736
- xAxisLabelFontSize: defaultConfig_default.quadrantChart?.xAxisLabelFontSize || 16,
737
- yAxisLabelFontSize: defaultConfig_default.quadrantChart?.yAxisLabelFontSize || 16,
738
- quadrantLabelFontSize: defaultConfig_default.quadrantChart?.quadrantLabelFontSize || 16,
739
- quadrantTextTopPadding: defaultConfig_default.quadrantChart?.quadrantTextTopPadding || 5,
740
- pointTextPadding: defaultConfig_default.quadrantChart?.pointTextPadding || 5,
741
- pointLabelFontSize: defaultConfig_default.quadrantChart?.pointLabelFontSize || 12,
742
- pointRadius: defaultConfig_default.quadrantChart?.pointRadius || 5,
743
- xAxisPosition: defaultConfig_default.quadrantChart?.xAxisPosition || "top",
744
- yAxisPosition: defaultConfig_default.quadrantChart?.yAxisPosition || "left",
745
- quadrantInternalBorderStrokeWidth: defaultConfig_default.quadrantChart?.quadrantInternalBorderStrokeWidth || 1,
746
- quadrantExternalBorderStrokeWidth: defaultConfig_default.quadrantChart?.quadrantExternalBorderStrokeWidth || 2
747
- };
748
- }
749
- getDefaultThemeConfig() {
750
- return {
751
- quadrant1Fill: defaultThemeVariables.quadrant1Fill,
752
- quadrant2Fill: defaultThemeVariables.quadrant2Fill,
753
- quadrant3Fill: defaultThemeVariables.quadrant3Fill,
754
- quadrant4Fill: defaultThemeVariables.quadrant4Fill,
755
- quadrant1TextFill: defaultThemeVariables.quadrant1TextFill,
756
- quadrant2TextFill: defaultThemeVariables.quadrant2TextFill,
757
- quadrant3TextFill: defaultThemeVariables.quadrant3TextFill,
758
- quadrant4TextFill: defaultThemeVariables.quadrant4TextFill,
759
- quadrantPointFill: defaultThemeVariables.quadrantPointFill,
760
- quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill,
761
- quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill,
762
- quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill,
763
- quadrantTitleFill: defaultThemeVariables.quadrantTitleFill,
764
- quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill,
765
- quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill
766
- };
767
- }
768
- clear() {
769
- this.config = this.getDefaultConfig();
770
- this.themeConfig = this.getDefaultThemeConfig();
771
- this.data = this.getDefaultData();
772
- this.classes = /* @__PURE__ */ new Map();
773
- log.info("clear called");
774
- }
775
- setData(data) {
776
- this.data = { ...this.data, ...data };
777
- }
778
- addPoints(points) {
779
- this.data.points = [...points, ...this.data.points];
780
- }
781
- addClass(className, styles) {
782
- this.classes.set(className, styles);
783
- }
784
- setConfig(config) {
785
- log.trace("setConfig called with: ", config);
786
- this.config = { ...this.config, ...config };
787
- }
788
- setThemeConfig(themeConfig) {
789
- log.trace("setThemeConfig called with: ", themeConfig);
790
- this.themeConfig = { ...this.themeConfig, ...themeConfig };
791
- }
792
- calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle) {
793
- const xAxisSpaceCalculation = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize;
794
- const xAxisSpace = {
795
- top: xAxisPosition === "top" && showXAxis ? xAxisSpaceCalculation : 0,
796
- bottom: xAxisPosition === "bottom" && showXAxis ? xAxisSpaceCalculation : 0
797
- };
798
- const yAxisSpaceCalculation = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize;
799
- const yAxisSpace = {
800
- left: this.config.yAxisPosition === "left" && showYAxis ? yAxisSpaceCalculation : 0,
801
- right: this.config.yAxisPosition === "right" && showYAxis ? yAxisSpaceCalculation : 0
802
- };
803
- const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2;
804
- const titleSpace = {
805
- top: showTitle ? titleSpaceCalculation : 0
806
- };
807
- const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left;
808
- const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top;
809
- const quadrantWidth = this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right;
810
- const quadrantHeight = this.config.chartHeight - this.config.quadrantPadding * 2 - xAxisSpace.top - xAxisSpace.bottom - titleSpace.top;
811
- const quadrantHalfWidth = quadrantWidth / 2;
812
- const quadrantHalfHeight = quadrantHeight / 2;
813
- const quadrantSpace = {
814
- quadrantLeft,
815
- quadrantTop,
816
- quadrantWidth,
817
- quadrantHalfWidth,
818
- quadrantHeight,
819
- quadrantHalfHeight
820
- };
821
- return {
822
- xAxisSpace,
823
- yAxisSpace,
824
- titleSpace,
825
- quadrantSpace
826
- };
827
- }
828
- getAxisLabels(xAxisPosition, showXAxis, showYAxis, spaceData) {
829
- const { quadrantSpace, titleSpace } = spaceData;
830
- const {
831
- quadrantHalfHeight,
832
- quadrantHeight,
833
- quadrantLeft,
834
- quadrantHalfWidth,
835
- quadrantTop,
836
- quadrantWidth
837
- } = quadrantSpace;
838
- const drawXAxisLabelsInMiddle = Boolean(this.data.xAxisRightText);
839
- const drawYAxisLabelsInMiddle = Boolean(this.data.yAxisTopText);
840
- const axisLabels = [];
841
- if (this.data.xAxisLeftText && showXAxis) {
842
- axisLabels.push({
843
- text: this.data.xAxisLeftText,
844
- fill: this.themeConfig.quadrantXAxisTextFill,
845
- x: quadrantLeft + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),
846
- y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding,
847
- fontSize: this.config.xAxisLabelFontSize,
848
- verticalPos: drawXAxisLabelsInMiddle ? "center" : "left",
849
- horizontalPos: "top",
850
- rotation: 0
851
- });
852
- }
853
- if (this.data.xAxisRightText && showXAxis) {
854
- axisLabels.push({
855
- text: this.data.xAxisRightText,
856
- fill: this.themeConfig.quadrantXAxisTextFill,
857
- x: quadrantLeft + quadrantHalfWidth + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),
858
- y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding,
859
- fontSize: this.config.xAxisLabelFontSize,
860
- verticalPos: drawXAxisLabelsInMiddle ? "center" : "left",
861
- horizontalPos: "top",
862
- rotation: 0
863
- });
864
- }
865
- if (this.data.yAxisBottomText && showYAxis) {
866
- axisLabels.push({
867
- text: this.data.yAxisBottomText,
868
- fill: this.themeConfig.quadrantYAxisTextFill,
869
- x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding,
870
- y: quadrantTop + quadrantHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),
871
- fontSize: this.config.yAxisLabelFontSize,
872
- verticalPos: drawYAxisLabelsInMiddle ? "center" : "left",
873
- horizontalPos: "top",
874
- rotation: -90
875
- });
876
- }
877
- if (this.data.yAxisTopText && showYAxis) {
878
- axisLabels.push({
879
- text: this.data.yAxisTopText,
880
- fill: this.themeConfig.quadrantYAxisTextFill,
881
- x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding,
882
- y: quadrantTop + quadrantHalfHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),
883
- fontSize: this.config.yAxisLabelFontSize,
884
- verticalPos: drawYAxisLabelsInMiddle ? "center" : "left",
885
- horizontalPos: "top",
886
- rotation: -90
887
- });
888
- }
889
- return axisLabels;
890
- }
891
- getQuadrants(spaceData) {
892
- const { quadrantSpace } = spaceData;
893
- const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace;
894
- const quadrants = [
895
- {
896
- text: {
897
- text: this.data.quadrant1Text,
898
- fill: this.themeConfig.quadrant1TextFill,
899
- x: 0,
900
- y: 0,
901
- fontSize: this.config.quadrantLabelFontSize,
902
- verticalPos: "center",
903
- horizontalPos: "middle",
904
- rotation: 0
905
- },
906
- x: quadrantLeft + quadrantHalfWidth,
907
- y: quadrantTop,
908
- width: quadrantHalfWidth,
909
- height: quadrantHalfHeight,
910
- fill: this.themeConfig.quadrant1Fill
911
- },
912
- {
913
- text: {
914
- text: this.data.quadrant2Text,
915
- fill: this.themeConfig.quadrant2TextFill,
916
- x: 0,
917
- y: 0,
918
- fontSize: this.config.quadrantLabelFontSize,
919
- verticalPos: "center",
920
- horizontalPos: "middle",
921
- rotation: 0
922
- },
923
- x: quadrantLeft,
924
- y: quadrantTop,
925
- width: quadrantHalfWidth,
926
- height: quadrantHalfHeight,
927
- fill: this.themeConfig.quadrant2Fill
928
- },
929
- {
930
- text: {
931
- text: this.data.quadrant3Text,
932
- fill: this.themeConfig.quadrant3TextFill,
933
- x: 0,
934
- y: 0,
935
- fontSize: this.config.quadrantLabelFontSize,
936
- verticalPos: "center",
937
- horizontalPos: "middle",
938
- rotation: 0
939
- },
940
- x: quadrantLeft,
941
- y: quadrantTop + quadrantHalfHeight,
942
- width: quadrantHalfWidth,
943
- height: quadrantHalfHeight,
944
- fill: this.themeConfig.quadrant3Fill
945
- },
946
- {
947
- text: {
948
- text: this.data.quadrant4Text,
949
- fill: this.themeConfig.quadrant4TextFill,
950
- x: 0,
951
- y: 0,
952
- fontSize: this.config.quadrantLabelFontSize,
953
- verticalPos: "center",
954
- horizontalPos: "middle",
955
- rotation: 0
956
- },
957
- x: quadrantLeft + quadrantHalfWidth,
958
- y: quadrantTop + quadrantHalfHeight,
959
- width: quadrantHalfWidth,
960
- height: quadrantHalfHeight,
961
- fill: this.themeConfig.quadrant4Fill
962
- }
963
- ];
964
- for (const quadrant of quadrants) {
965
- quadrant.text.x = quadrant.x + quadrant.width / 2;
966
- if (this.data.points.length === 0) {
967
- quadrant.text.y = quadrant.y + quadrant.height / 2;
968
- quadrant.text.horizontalPos = "middle";
969
- } else {
970
- quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding;
971
- quadrant.text.horizontalPos = "top";
972
- }
973
- }
974
- return quadrants;
975
- }
976
- getQuadrantPoints(spaceData) {
977
- const { quadrantSpace } = spaceData;
978
- const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace;
979
- const xAxis = linear().domain([0, 1]).range([quadrantLeft, quadrantWidth + quadrantLeft]);
980
- const yAxis = linear().domain([0, 1]).range([quadrantHeight + quadrantTop, quadrantTop]);
981
- const points = this.data.points.map((point) => {
982
- const classStyles = this.classes.get(point.className);
983
- if (classStyles) {
984
- point = { ...classStyles, ...point };
985
- }
986
- const props = {
987
- x: xAxis(point.x),
988
- y: yAxis(point.y),
989
- fill: point.color ?? this.themeConfig.quadrantPointFill,
990
- radius: point.radius ?? this.config.pointRadius,
991
- text: {
992
- text: point.text,
993
- fill: this.themeConfig.quadrantPointTextFill,
994
- x: xAxis(point.x),
995
- y: yAxis(point.y) + this.config.pointTextPadding,
996
- verticalPos: "center",
997
- horizontalPos: "top",
998
- fontSize: this.config.pointLabelFontSize,
999
- rotation: 0
1000
- },
1001
- strokeColor: point.strokeColor ?? this.themeConfig.quadrantPointFill,
1002
- strokeWidth: point.strokeWidth ?? "0px"
1003
- };
1004
- return props;
1005
- });
1006
- return points;
1007
- }
1008
- getBorders(spaceData) {
1009
- const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2;
1010
- const { quadrantSpace } = spaceData;
1011
- const {
1012
- quadrantHalfHeight,
1013
- quadrantHeight,
1014
- quadrantLeft,
1015
- quadrantHalfWidth,
1016
- quadrantTop,
1017
- quadrantWidth
1018
- } = quadrantSpace;
1019
- const borderLines = [
1020
- // top border
1021
- {
1022
- strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
1023
- strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
1024
- x1: quadrantLeft - halfExternalBorderWidth,
1025
- y1: quadrantTop,
1026
- x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,
1027
- y2: quadrantTop
1028
- },
1029
- // right border
1030
- {
1031
- strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
1032
- strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
1033
- x1: quadrantLeft + quadrantWidth,
1034
- y1: quadrantTop + halfExternalBorderWidth,
1035
- x2: quadrantLeft + quadrantWidth,
1036
- y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
1037
- },
1038
- // bottom border
1039
- {
1040
- strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
1041
- strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
1042
- x1: quadrantLeft - halfExternalBorderWidth,
1043
- y1: quadrantTop + quadrantHeight,
1044
- x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,
1045
- y2: quadrantTop + quadrantHeight
1046
- },
1047
- // left border
1048
- {
1049
- strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
1050
- strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
1051
- x1: quadrantLeft,
1052
- y1: quadrantTop + halfExternalBorderWidth,
1053
- x2: quadrantLeft,
1054
- y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
1055
- },
1056
- // vertical inner border
1057
- {
1058
- strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
1059
- strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
1060
- x1: quadrantLeft + quadrantHalfWidth,
1061
- y1: quadrantTop + halfExternalBorderWidth,
1062
- x2: quadrantLeft + quadrantHalfWidth,
1063
- y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
1064
- },
1065
- // horizontal inner border
1066
- {
1067
- strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
1068
- strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
1069
- x1: quadrantLeft + halfExternalBorderWidth,
1070
- y1: quadrantTop + quadrantHalfHeight,
1071
- x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth,
1072
- y2: quadrantTop + quadrantHalfHeight
1073
- }
1074
- ];
1075
- return borderLines;
1076
- }
1077
- getTitle(showTitle) {
1078
- if (showTitle) {
1079
- return {
1080
- text: this.data.titleText,
1081
- fill: this.themeConfig.quadrantTitleFill,
1082
- fontSize: this.config.titleFontSize,
1083
- horizontalPos: "top",
1084
- verticalPos: "center",
1085
- rotation: 0,
1086
- y: this.config.titlePadding,
1087
- x: this.config.chartWidth / 2
1088
- };
1089
- }
1090
- return;
1091
- }
1092
- build() {
1093
- const showXAxis = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText);
1094
- const showYAxis = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText);
1095
- const showTitle = this.config.showTitle && !!this.data.titleText;
1096
- const xAxisPosition = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition;
1097
- const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle);
1098
- return {
1099
- points: this.getQuadrantPoints(calculatedSpace),
1100
- quadrants: this.getQuadrants(calculatedSpace),
1101
- axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace),
1102
- borderLines: this.getBorders(calculatedSpace),
1103
- title: this.getTitle(showTitle)
1104
- };
1105
- }
1106
- };
1107
- var InvalidStyleError = class extends Error {
1108
- static {
1109
- __name(this, "InvalidStyleError");
1110
- }
1111
- constructor(style, value, type) {
1112
- super(`value for ${style} ${value} is invalid, please use a valid ${type}`);
1113
- this.name = "InvalidStyleError";
1114
- }
1115
- };
1116
- function validateHexCode(value) {
1117
- return !/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(value);
1118
- }
1119
- __name(validateHexCode, "validateHexCode");
1120
- function validateNumber(value) {
1121
- return !/^\d+$/.test(value);
1122
- }
1123
- __name(validateNumber, "validateNumber");
1124
- function validateSizeInPixels(value) {
1125
- return !/^\d+px$/.test(value);
1126
- }
1127
- __name(validateSizeInPixels, "validateSizeInPixels");
1128
- function textSanitizer(text) {
1129
- return sanitizeText(text.trim(), getConfig2());
1130
- }
1131
- __name(textSanitizer, "textSanitizer");
1132
- var quadrantBuilder = new QuadrantBuilder();
1133
- function setQuadrant1Text(textObj) {
1134
- quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) });
1135
- }
1136
- __name(setQuadrant1Text, "setQuadrant1Text");
1137
- function setQuadrant2Text(textObj) {
1138
- quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) });
1139
- }
1140
- __name(setQuadrant2Text, "setQuadrant2Text");
1141
- function setQuadrant3Text(textObj) {
1142
- quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) });
1143
- }
1144
- __name(setQuadrant3Text, "setQuadrant3Text");
1145
- function setQuadrant4Text(textObj) {
1146
- quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) });
1147
- }
1148
- __name(setQuadrant4Text, "setQuadrant4Text");
1149
- function setXAxisLeftText(textObj) {
1150
- quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) });
1151
- }
1152
- __name(setXAxisLeftText, "setXAxisLeftText");
1153
- function setXAxisRightText(textObj) {
1154
- quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) });
1155
- }
1156
- __name(setXAxisRightText, "setXAxisRightText");
1157
- function setYAxisTopText(textObj) {
1158
- quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) });
1159
- }
1160
- __name(setYAxisTopText, "setYAxisTopText");
1161
- function setYAxisBottomText(textObj) {
1162
- quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) });
1163
- }
1164
- __name(setYAxisBottomText, "setYAxisBottomText");
1165
- function parseStyles(styles) {
1166
- const stylesObject = {};
1167
- for (const style of styles) {
1168
- const [key, value] = style.trim().split(/\s*:\s*/);
1169
- if (key === "radius") {
1170
- if (validateNumber(value)) {
1171
- throw new InvalidStyleError(key, value, "number");
1172
- }
1173
- stylesObject.radius = parseInt(value);
1174
- } else if (key === "color") {
1175
- if (validateHexCode(value)) {
1176
- throw new InvalidStyleError(key, value, "hex code");
1177
- }
1178
- stylesObject.color = value;
1179
- } else if (key === "stroke-color") {
1180
- if (validateHexCode(value)) {
1181
- throw new InvalidStyleError(key, value, "hex code");
1182
- }
1183
- stylesObject.strokeColor = value;
1184
- } else if (key === "stroke-width") {
1185
- if (validateSizeInPixels(value)) {
1186
- throw new InvalidStyleError(key, value, "number of pixels (eg. 10px)");
1187
- }
1188
- stylesObject.strokeWidth = value;
1189
- } else {
1190
- throw new Error(`style named ${key} is not supported.`);
1191
- }
1192
- }
1193
- return stylesObject;
1194
- }
1195
- __name(parseStyles, "parseStyles");
1196
- function addPoint(textObj, className, x, y, styles) {
1197
- const stylesObject = parseStyles(styles);
1198
- quadrantBuilder.addPoints([
1199
- {
1200
- x,
1201
- y,
1202
- text: textSanitizer(textObj.text),
1203
- className,
1204
- ...stylesObject
1205
- }
1206
- ]);
1207
- }
1208
- __name(addPoint, "addPoint");
1209
- function addClass(className, styles) {
1210
- quadrantBuilder.addClass(className, parseStyles(styles));
1211
- }
1212
- __name(addClass, "addClass");
1213
- function setWidth(width) {
1214
- quadrantBuilder.setConfig({ chartWidth: width });
1215
- }
1216
- __name(setWidth, "setWidth");
1217
- function setHeight(height) {
1218
- quadrantBuilder.setConfig({ chartHeight: height });
1219
- }
1220
- __name(setHeight, "setHeight");
1221
- function getQuadrantData() {
1222
- const config = getConfig2();
1223
- const { themeVariables, quadrantChart: quadrantChartConfig } = config;
1224
- if (quadrantChartConfig) {
1225
- quadrantBuilder.setConfig(quadrantChartConfig);
1226
- }
1227
- quadrantBuilder.setThemeConfig({
1228
- quadrant1Fill: themeVariables.quadrant1Fill,
1229
- quadrant2Fill: themeVariables.quadrant2Fill,
1230
- quadrant3Fill: themeVariables.quadrant3Fill,
1231
- quadrant4Fill: themeVariables.quadrant4Fill,
1232
- quadrant1TextFill: themeVariables.quadrant1TextFill,
1233
- quadrant2TextFill: themeVariables.quadrant2TextFill,
1234
- quadrant3TextFill: themeVariables.quadrant3TextFill,
1235
- quadrant4TextFill: themeVariables.quadrant4TextFill,
1236
- quadrantPointFill: themeVariables.quadrantPointFill,
1237
- quadrantPointTextFill: themeVariables.quadrantPointTextFill,
1238
- quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill,
1239
- quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill,
1240
- quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill,
1241
- quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill,
1242
- quadrantTitleFill: themeVariables.quadrantTitleFill
1243
- });
1244
- quadrantBuilder.setData({ titleText: getDiagramTitle() });
1245
- return quadrantBuilder.build();
1246
- }
1247
- __name(getQuadrantData, "getQuadrantData");
1248
- var clear2 = /* @__PURE__ */ __name(function() {
1249
- quadrantBuilder.clear();
1250
- clear();
1251
- }, "clear");
1252
- var quadrantDb_default = {
1253
- setWidth,
1254
- setHeight,
1255
- setQuadrant1Text,
1256
- setQuadrant2Text,
1257
- setQuadrant3Text,
1258
- setQuadrant4Text,
1259
- setXAxisLeftText,
1260
- setXAxisRightText,
1261
- setYAxisTopText,
1262
- setYAxisBottomText,
1263
- parseStyles,
1264
- addPoint,
1265
- addClass,
1266
- getQuadrantData,
1267
- clear: clear2,
1268
- setAccTitle,
1269
- getAccTitle,
1270
- setDiagramTitle,
1271
- getDiagramTitle,
1272
- getAccDescription,
1273
- setAccDescription
1274
- };
1275
- var draw = /* @__PURE__ */ __name((txt, id, _version, diagObj) => {
1276
- function getDominantBaseLine(horizontalPos) {
1277
- return horizontalPos === "top" ? "hanging" : "middle";
1278
- }
1279
- __name(getDominantBaseLine, "getDominantBaseLine");
1280
- function getTextAnchor(verticalPos) {
1281
- return verticalPos === "left" ? "start" : "middle";
1282
- }
1283
- __name(getTextAnchor, "getTextAnchor");
1284
- function getTransformation(data) {
1285
- return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;
1286
- }
1287
- __name(getTransformation, "getTransformation");
1288
- const conf = getConfig2();
1289
- log.debug("Rendering quadrant chart\n" + txt);
1290
- const securityLevel = conf.securityLevel;
1291
- let sandboxElement;
1292
- if (securityLevel === "sandbox") {
1293
- sandboxElement = select("#i" + id);
1294
- }
1295
- const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
1296
- const svg = root.select(`[id="${id}"]`);
1297
- const group = svg.append("g").attr("class", "main");
1298
- const width = conf.quadrantChart?.chartWidth ?? 500;
1299
- const height = conf.quadrantChart?.chartHeight ?? 500;
1300
- configureSvgSize(svg, height, width, conf.quadrantChart?.useMaxWidth ?? true);
1301
- svg.attr("viewBox", "0 0 " + width + " " + height);
1302
- diagObj.db.setHeight(height);
1303
- diagObj.db.setWidth(width);
1304
- const quadrantData = diagObj.db.getQuadrantData();
1305
- const quadrantsGroup = group.append("g").attr("class", "quadrants");
1306
- const borderGroup = group.append("g").attr("class", "border");
1307
- const dataPointGroup = group.append("g").attr("class", "data-points");
1308
- const labelGroup = group.append("g").attr("class", "labels");
1309
- const titleGroup = group.append("g").attr("class", "title");
1310
- if (quadrantData.title) {
1311
- titleGroup.append("text").attr("x", 0).attr("y", 0).attr("fill", quadrantData.title.fill).attr("font-size", quadrantData.title.fontSize).attr("dominant-baseline", getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor", getTextAnchor(quadrantData.title.verticalPos)).attr("transform", getTransformation(quadrantData.title)).text(quadrantData.title.text);
1312
- }
1313
- if (quadrantData.borderLines) {
1314
- borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1", (data) => data.x1).attr("y1", (data) => data.y1).attr("x2", (data) => data.x2).attr("y2", (data) => data.y2).style("stroke", (data) => data.strokeFill).style("stroke-width", (data) => data.strokeWidth);
1315
- }
1316
- const quadrants = quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class", "quadrant");
1317
- quadrants.append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill);
1318
- quadrants.append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr(
1319
- "dominant-baseline",
1320
- (data) => getDominantBaseLine(data.text.horizontalPos)
1321
- ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)).text((data) => data.text.text);
1322
- const labels = labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class", "label");
1323
- labels.append("text").attr("x", 0).attr("y", 0).text((data) => data.text).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.horizontalPos)).attr("text-anchor", (data) => getTextAnchor(data.verticalPos)).attr("transform", (data) => getTransformation(data));
1324
- const dataPoints = dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class", "data-point");
1325
- dataPoints.append("circle").attr("cx", (data) => data.x).attr("cy", (data) => data.y).attr("r", (data) => data.radius).attr("fill", (data) => data.fill).attr("stroke", (data) => data.strokeColor).attr("stroke-width", (data) => data.strokeWidth);
1326
- dataPoints.append("text").attr("x", 0).attr("y", 0).text((data) => data.text.text).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr(
1327
- "dominant-baseline",
1328
- (data) => getDominantBaseLine(data.text.horizontalPos)
1329
- ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text));
1330
- }, "draw");
1331
- var quadrantRenderer_default = {
1332
- draw
1333
- };
1334
- var diagram = {
1335
- parser: quadrant_default,
1336
- db: quadrantDb_default,
1337
- renderer: quadrantRenderer_default,
1338
- styles: /* @__PURE__ */ __name(() => "", "styles")
1339
- };
1340
- export {
1341
- diagram
1342
- };