@8btc/xcanvas 0.0.1

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 (121) hide show
  1. package/README.md +70 -0
  2. package/dist/Tableau10-BqnYsPR6.js +9 -0
  3. package/dist/XCanvas-BxdLBkBz.js +27732 -0
  4. package/dist/_commonjs-dynamic-modules-TGKdzP3c.js +6 -0
  5. package/dist/ar-SA-G6X2FPQ2-DjqDLLYL.js +41 -0
  6. package/dist/arc-D1qX5GFf.js +132 -0
  7. package/dist/array-DgktLKBx.js +6 -0
  8. package/dist/az-AZ-76LH7QW2-D7LOsF3_.js +32 -0
  9. package/dist/bg-BG-XCXSNQG7-WI4tFn23.js +36 -0
  10. package/dist/blockDiagram-38ab4fdb-DtemKfEh.js +1811 -0
  11. package/dist/bn-BD-2XOGV67Q-Bugx_8fy.js +36 -0
  12. package/dist/c4Diagram-3d4e48cf-Byd2vU9K.js +2463 -0
  13. package/dist/ca-ES-6MX7JW3Y-6rFwKGsQ.js +39 -0
  14. package/dist/channel-BT_3Ze-Y.js +7 -0
  15. package/dist/chunk-EIO257PC-C7qD7hGu.js +1641 -0
  16. package/dist/classDiagram-70f12bd4-CwfYadk-.js +354 -0
  17. package/dist/classDiagram-v2-f2320105-B28MuM8f.js +284 -0
  18. package/dist/clone-D2FUK8WY.js +8 -0
  19. package/dist/createText-2e5e7dd3-Ca1JfQaJ.js +4914 -0
  20. package/dist/cs-CZ-2BRQDIVT-Dhd8XszK.js +42 -0
  21. package/dist/da-DK-5WZEPLOC-BhL87sSs.js +36 -0
  22. package/dist/de-DE-XR44H4JA-xSrZSV0J.js +39 -0
  23. package/dist/directory-open-01563666-XowynPwH.js +14 -0
  24. package/dist/directory-open-4ed118d0-BwYbu9dw.js +55 -0
  25. package/dist/edges-e0da2a9e-9VbVapWU.js +1840 -0
  26. package/dist/el-GR-BZB4AONW-DQORZ_pY.js +41 -0
  27. package/dist/en-B4ZKOASM-D2BVbEdz.js +39 -0
  28. package/dist/erDiagram-9861fffd-D4S9QDes.js +1318 -0
  29. package/dist/es-ES-U4NZUMDT-C0Q89-0V.js +40 -0
  30. package/dist/eu-ES-A7QVB2H4-BwBW3cEw.js +42 -0
  31. package/dist/fa-IR-HGAKTJCU-DtZ74rm4.js +39 -0
  32. package/dist/fi-FI-Z5N7JZ37-QvQan48z.js +37 -0
  33. package/dist/file-open-002ab408-BNIYSKAV.js +18 -0
  34. package/dist/file-open-7c801643-B_l1UXdI.js +15 -0
  35. package/dist/file-save-3189631c-vzijizFw.js +23 -0
  36. package/dist/file-save-745eba88-B5-wM56X.js +25 -0
  37. package/dist/flowDb-956e92f1-S6T8ppJw.js +1713 -0
  38. package/dist/flowDiagram-66a62f08-C6TTwS5_.js +1264 -0
  39. package/dist/flowDiagram-v2-96b9c2cf-CzfeUNGP.js +24 -0
  40. package/dist/flowchart-elk-definition-4a651766-CRv1kWtk.js +92922 -0
  41. package/dist/fr-FR-RHASNOE6-CZFiweNU.js +40 -0
  42. package/dist/ganttDiagram-c361ad54-CAnfd8Sw.js +3420 -0
  43. package/dist/gitGraphDiagram-72cf32ee-CSGI-xRI.js +1790 -0
  44. package/dist/gl-ES-HMX3MZ6V-Bqv2xL-V.js +41 -0
  45. package/dist/graph-Ct2tKpKj.js +1253 -0
  46. package/dist/he-IL-6SHJWFNN-kso30jhn.js +41 -0
  47. package/dist/hi-IN-IWLTKZ5I-Busk5oaa.js +35 -0
  48. package/dist/hu-HU-A5ZG7DT2-xSR2C2H0.js +38 -0
  49. package/dist/id-ID-SAP4L64H-BQQZYm1L.js +41 -0
  50. package/dist/image-EDRW2JGV-Cx7o2kxD.js +6 -0
  51. package/dist/image-blob-reduce.esm-BKPqMdie.js +2396 -0
  52. package/dist/index-3862675e-B3j3w-v_.js +663 -0
  53. package/dist/index-CLOU2Ikr.js +14364 -0
  54. package/dist/index.css +450 -0
  55. package/dist/index.d.ts +40 -0
  56. package/dist/index.js +7 -0
  57. package/dist/index.umd.cjs +235477 -0
  58. package/dist/infoDiagram-f8f76790-NqA75uBo.js +510 -0
  59. package/dist/init-ZxktEp_H.js +16 -0
  60. package/dist/it-IT-JPQ66NNP-CAMVZrYt.js +42 -0
  61. package/dist/ja-JP-DBVTYXUO-CAX8A_Uj.js +39 -0
  62. package/dist/journeyDiagram-49397b02-By5oBzsZ.js +1182 -0
  63. package/dist/kaa-6HZHGXH3-4-o94cPY.js +32 -0
  64. package/dist/kab-KAB-ZGHBKWFO-CgyjjBvZ.js +39 -0
  65. package/dist/katex-C-jAQc2m.js +14516 -0
  66. package/dist/kk-KZ-P5N5QNE5-BEqZcwLA.js +32 -0
  67. package/dist/km-KH-HSX4SM5Z-DvKDbeH4.js +42 -0
  68. package/dist/ko-KR-MTYHY66A-DKCuAbKE.js +40 -0
  69. package/dist/ku-TR-6OUDTVRD-CNUs4cCe.js +40 -0
  70. package/dist/layout-AJxYKqQV.js +2292 -0
  71. package/dist/line-DJIf5OM8.js +45 -0
  72. package/dist/linear-Cfj4s4vI.js +539 -0
  73. package/dist/lt-LT-XHIRWOB4-gouzGdoW.js +34 -0
  74. package/dist/lv-LV-5QDEKY6T-CTvg1XFv.js +38 -0
  75. package/dist/mindmap-definition-fc14e90a-CBlwH_UF.js +35283 -0
  76. package/dist/mr-IN-CRQNXWMA-QeYm06Kq.js +44 -0
  77. package/dist/my-MM-5M5IBNSE-DG3k9ORf.js +32 -0
  78. package/dist/nb-NO-T6EIAALU-Cj995Nmg.js +41 -0
  79. package/dist/nl-NL-IS3SIHDZ-B-2H7xey.js +39 -0
  80. package/dist/nn-NO-6E72VCQL-DrAwKKTN.js +39 -0
  81. package/dist/oc-FR-POXYY2M6-CeyJD7tq.js +39 -0
  82. package/dist/ordinal-DSZU4PqD.js +76 -0
  83. package/dist/pa-IN-N4M65BXN-DHzi6mjo.js +35 -0
  84. package/dist/path-Cp2qmpkd.js +109 -0
  85. package/dist/percentages-BXMCSKIN-CDYsTuua.js +6 -0
  86. package/dist/pica-CzzcRNRD.js +1702 -0
  87. package/dist/pieDiagram-8a3498a8-DueGoZOh.js +768 -0
  88. package/dist/pl-PL-T2D74RX3-BBNEV2c6.js +40 -0
  89. package/dist/pt-BR-5N22H2LF-D2cTx_F0.js +40 -0
  90. package/dist/pt-PT-UZXXM6DQ-BddvLLsF.js +40 -0
  91. package/dist/quadrantDiagram-120e2f19-Tb6_oGIn.js +1198 -0
  92. package/dist/requirementDiagram-deff3bca-CEeg0ep-.js +1089 -0
  93. package/dist/ro-RO-JPDTUUEW-DynuW50i.js +42 -0
  94. package/dist/roundRect-CjfubgrN.js +152 -0
  95. package/dist/ru-RU-B4JR7IUQ-B5Hecrew.js +40 -0
  96. package/dist/sankeyDiagram-04a897e0-CGTLQ8Gm.js +1172 -0
  97. package/dist/sequenceDiagram-704730f1-CZ72D-Nd.js +3336 -0
  98. package/dist/si-LK-N5RQ5JYF-BGMa93tc.js +32 -0
  99. package/dist/sk-SK-C5VTKIMK-BttCAlBm.js +37 -0
  100. package/dist/sl-SI-NN7IZMDC-DTC59nzG.js +37 -0
  101. package/dist/stateDiagram-587899a1-XISZzz_f.js +451 -0
  102. package/dist/stateDiagram-v2-d93cdb3a-DbCcmzTc.js +319 -0
  103. package/dist/styles-6aaf32cf-CyfdkEib.js +1363 -0
  104. package/dist/styles-9a916d00-zQ92RrTB.js +1483 -0
  105. package/dist/styles-c10674c1-BWmkigmR.js +571 -0
  106. package/dist/subset-shared.chunk-BuFt2PpZ.js +8 -0
  107. package/dist/subset-worker.chunk-CgaFXU4O.js +14 -0
  108. package/dist/sv-SE-XGPEYMSR-BPDlPxC1.js +41 -0
  109. package/dist/svgDrawCommon-08f97a94-CJ0lufOi.js +100 -0
  110. package/dist/ta-IN-2NMHFXQM-CI1ZsNk9.js +40 -0
  111. package/dist/th-TH-HPSO5L25-CUM-w2Qt.js +33 -0
  112. package/dist/timeline-definition-85554ec2-DV6084Gl.js +1210 -0
  113. package/dist/tr-TR-DEFEU3FU-CGpyf_vD.js +38 -0
  114. package/dist/uk-UA-QMV73CPH-Bg15Mv3J.js +37 -0
  115. package/dist/vi-VN-M7AON7JQ-AYmca9so.js +36 -0
  116. package/dist/vite.svg +1 -0
  117. package/dist/xychartDiagram-e933f94c-P1e6EEaH.js +1796 -0
  118. package/dist/zh-CN-LNUGB5OW-Dem2Cc-c.js +41 -0
  119. package/dist/zh-HK-E62DVLB3-BjsDyiLI.js +32 -0
  120. package/dist/zh-TW-RAJ6MFWO-IDAsc9Pz.js +40 -0
  121. package/package.json +52 -0
@@ -0,0 +1,1198 @@
1
+ import { s as setAccDescription, a as getAccDescription, o as getDiagramTitle, p as setDiagramTitle, b as getAccTitle, c as setAccTitle, g as getConfig, l as log$1, d as select, e as configureSvgSize, r as clear$1, Q as defaultConfig$2, R as getThemeVariables$2, i as sanitizeText$2 } from "./index-CLOU2Ikr.js";
2
+ import { l as linear } from "./linear-Cfj4s4vI.js";
3
+ var parser = (function() {
4
+ var o = function(k, v, o2, l) {
5
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
6
+ ;
7
+ return o2;
8
+ }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 7], $V5 = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V6 = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V7 = [32, 33, 34], $V8 = [2, 7], $V9 = [1, 13], $Va = [1, 17], $Vb = [1, 18], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 21], $Vf = [1, 22], $Vg = [1, 23], $Vh = [1, 24], $Vi = [1, 25], $Vj = [1, 26], $Vk = [1, 27], $Vl = [1, 30], $Vm = [1, 31], $Vn = [1, 32], $Vo = [1, 33], $Vp = [1, 34], $Vq = [1, 35], $Vr = [1, 36], $Vs = [1, 37], $Vt = [1, 38], $Vu = [1, 39], $Vv = [1, 40], $Vw = [1, 41], $Vx = [1, 42], $Vy = [1, 57], $Vz = [1, 58], $VA = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
9
+ var parser2 = {
10
+ trace: function trace() {
11
+ },
12
+ yy: {},
13
+ symbols_: { "error": 2, "start": 3, "eol": 4, "SPACE": 5, "QUADRANT": 6, "document": 7, "line": 8, "statement": 9, "axisDetails": 10, "quadrantDetails": 11, "points": 12, "title": 13, "title_value": 14, "acc_title": 15, "acc_title_value": 16, "acc_descr": 17, "acc_descr_value": 18, "acc_descr_multiline_value": 19, "section": 20, "text": 21, "point_start": 22, "point_x": 23, "point_y": 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, "QUADRANT_1": 28, "QUADRANT_2": 29, "QUADRANT_3": 30, "QUADRANT_4": 31, "NEWLINE": 32, "SEMI": 33, "EOF": 34, "alphaNumToken": 35, "textNoTagsToken": 36, "STR": 37, "MD_STR": 38, "alphaNum": 39, "PUNCTUATION": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "COMMA": 44, "PLUS": 45, "EQUALS": 46, "MULT": 47, "DOT": 48, "BRKT": 49, "UNDERSCORE": 50, "MINUS": 51, "$accept": 0, "$end": 1 },
14
+ terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" },
15
+ productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]],
16
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
17
+ var $0 = $$.length - 1;
18
+ switch (yystate) {
19
+ case 12:
20
+ this.$ = $$[$0].trim();
21
+ yy.setDiagramTitle(this.$);
22
+ break;
23
+ case 13:
24
+ this.$ = $$[$0].trim();
25
+ yy.setAccTitle(this.$);
26
+ break;
27
+ case 14:
28
+ case 15:
29
+ this.$ = $$[$0].trim();
30
+ yy.setAccDescription(this.$);
31
+ break;
32
+ case 16:
33
+ yy.addSection($$[$0].substr(8));
34
+ this.$ = $$[$0].substr(8);
35
+ break;
36
+ case 17:
37
+ yy.addPoint($$[$0 - 3], $$[$0 - 1], $$[$0]);
38
+ break;
39
+ case 18:
40
+ yy.setXAxisLeftText($$[$0 - 2]);
41
+ yy.setXAxisRightText($$[$0]);
42
+ break;
43
+ case 19:
44
+ $$[$0 - 1].text += " ⟶ ";
45
+ yy.setXAxisLeftText($$[$0 - 1]);
46
+ break;
47
+ case 20:
48
+ yy.setXAxisLeftText($$[$0]);
49
+ break;
50
+ case 21:
51
+ yy.setYAxisBottomText($$[$0 - 2]);
52
+ yy.setYAxisTopText($$[$0]);
53
+ break;
54
+ case 22:
55
+ $$[$0 - 1].text += " ⟶ ";
56
+ yy.setYAxisBottomText($$[$0 - 1]);
57
+ break;
58
+ case 23:
59
+ yy.setYAxisBottomText($$[$0]);
60
+ break;
61
+ case 24:
62
+ yy.setQuadrant1Text($$[$0]);
63
+ break;
64
+ case 25:
65
+ yy.setQuadrant2Text($$[$0]);
66
+ break;
67
+ case 26:
68
+ yy.setQuadrant3Text($$[$0]);
69
+ break;
70
+ case 27:
71
+ yy.setQuadrant4Text($$[$0]);
72
+ break;
73
+ case 31:
74
+ this.$ = { text: $$[$0], type: "text" };
75
+ break;
76
+ case 32:
77
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
78
+ break;
79
+ case 33:
80
+ this.$ = { text: $$[$0], type: "text" };
81
+ break;
82
+ case 34:
83
+ this.$ = { text: $$[$0], type: "markdown" };
84
+ break;
85
+ case 35:
86
+ this.$ = $$[$0];
87
+ break;
88
+ case 36:
89
+ this.$ = $$[$0 - 1] + "" + $$[$0];
90
+ break;
91
+ }
92
+ },
93
+ table: [{ 3: 1, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 1: [3] }, { 3: 8, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 3: 9, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, o($V5, [2, 4], { 7: 10 }), o($V6, [2, 28]), o($V6, [2, 29]), o($V6, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, o($V7, $V8, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V5, [2, 5]), { 4: 43, 32: $V2, 33: $V3, 34: $V4 }, o($V7, $V8, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, o($V7, [2, 15]), o($V7, [2, 16]), { 21: 48, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 49, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 50, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 51, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 52, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 53, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 5: $Vy, 22: [1, 54], 35: 56, 36: 55, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }, o($VA, [2, 31]), o($VA, [2, 33]), o($VA, [2, 34]), o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), o($VA, [2, 40]), o($VA, [2, 41]), o($VA, [2, 42]), o($VA, [2, 43]), o($VA, [2, 44]), o($VA, [2, 45]), o($VA, [2, 46]), o($VA, [2, 47]), o($V5, [2, 6]), o($V7, [2, 8]), o($V7, [2, 12]), o($V7, [2, 13]), o($V7, [2, 14]), o($V7, [2, 20], { 36: 55, 35: 56, 5: $Vy, 26: [1, 59], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 23], { 36: 55, 35: 56, 5: $Vy, 26: [1, 60], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 24], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 25], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 26], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 27], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), { 23: [1, 61] }, o($VA, [2, 32]), o($VA, [2, 48]), o($VA, [2, 49]), o($VA, [2, 50]), o($V7, [2, 19], { 35: 29, 21: 62, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 22], { 35: 29, 21: 63, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), { 24: [1, 64] }, o($V7, [2, 18], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 21], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 17])],
94
+ defaultActions: { 8: [2, 1], 9: [2, 2] },
95
+ parseError: function parseError(str, hash) {
96
+ if (hash.recoverable) {
97
+ this.trace(str);
98
+ } else {
99
+ var error = new Error(str);
100
+ error.hash = hash;
101
+ throw error;
102
+ }
103
+ },
104
+ parse: function parse(input) {
105
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
106
+ var args = lstack.slice.call(arguments, 1);
107
+ var lexer2 = Object.create(this.lexer);
108
+ var sharedState = { yy: {} };
109
+ for (var k in this.yy) {
110
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
111
+ sharedState.yy[k] = this.yy[k];
112
+ }
113
+ }
114
+ lexer2.setInput(input, sharedState.yy);
115
+ sharedState.yy.lexer = lexer2;
116
+ sharedState.yy.parser = this;
117
+ if (typeof lexer2.yylloc == "undefined") {
118
+ lexer2.yylloc = {};
119
+ }
120
+ var yyloc = lexer2.yylloc;
121
+ lstack.push(yyloc);
122
+ var ranges = lexer2.options && lexer2.options.ranges;
123
+ if (typeof sharedState.yy.parseError === "function") {
124
+ this.parseError = sharedState.yy.parseError;
125
+ } else {
126
+ this.parseError = Object.getPrototypeOf(this).parseError;
127
+ }
128
+ function lex() {
129
+ var token;
130
+ token = tstack.pop() || lexer2.lex() || EOF;
131
+ if (typeof token !== "number") {
132
+ if (token instanceof Array) {
133
+ tstack = token;
134
+ token = tstack.pop();
135
+ }
136
+ token = self.symbols_[token] || token;
137
+ }
138
+ return token;
139
+ }
140
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
141
+ while (true) {
142
+ state = stack[stack.length - 1];
143
+ if (this.defaultActions[state]) {
144
+ action = this.defaultActions[state];
145
+ } else {
146
+ if (symbol === null || typeof symbol == "undefined") {
147
+ symbol = lex();
148
+ }
149
+ action = table[state] && table[state][symbol];
150
+ }
151
+ if (typeof action === "undefined" || !action.length || !action[0]) {
152
+ var errStr = "";
153
+ expected = [];
154
+ for (p in table[state]) {
155
+ if (this.terminals_[p] && p > TERROR) {
156
+ expected.push("'" + this.terminals_[p] + "'");
157
+ }
158
+ }
159
+ if (lexer2.showPosition) {
160
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
161
+ } else {
162
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
163
+ }
164
+ this.parseError(errStr, {
165
+ text: lexer2.match,
166
+ token: this.terminals_[symbol] || symbol,
167
+ line: lexer2.yylineno,
168
+ loc: yyloc,
169
+ expected
170
+ });
171
+ }
172
+ if (action[0] instanceof Array && action.length > 1) {
173
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
174
+ }
175
+ switch (action[0]) {
176
+ case 1:
177
+ stack.push(symbol);
178
+ vstack.push(lexer2.yytext);
179
+ lstack.push(lexer2.yylloc);
180
+ stack.push(action[1]);
181
+ symbol = null;
182
+ {
183
+ yyleng = lexer2.yyleng;
184
+ yytext = lexer2.yytext;
185
+ yylineno = lexer2.yylineno;
186
+ yyloc = lexer2.yylloc;
187
+ }
188
+ break;
189
+ case 2:
190
+ len = this.productions_[action[1]][1];
191
+ yyval.$ = vstack[vstack.length - len];
192
+ yyval._$ = {
193
+ first_line: lstack[lstack.length - (len || 1)].first_line,
194
+ last_line: lstack[lstack.length - 1].last_line,
195
+ first_column: lstack[lstack.length - (len || 1)].first_column,
196
+ last_column: lstack[lstack.length - 1].last_column
197
+ };
198
+ if (ranges) {
199
+ yyval._$.range = [
200
+ lstack[lstack.length - (len || 1)].range[0],
201
+ lstack[lstack.length - 1].range[1]
202
+ ];
203
+ }
204
+ r = this.performAction.apply(yyval, [
205
+ yytext,
206
+ yyleng,
207
+ yylineno,
208
+ sharedState.yy,
209
+ action[1],
210
+ vstack,
211
+ lstack
212
+ ].concat(args));
213
+ if (typeof r !== "undefined") {
214
+ return r;
215
+ }
216
+ if (len) {
217
+ stack = stack.slice(0, -1 * len * 2);
218
+ vstack = vstack.slice(0, -1 * len);
219
+ lstack = lstack.slice(0, -1 * len);
220
+ }
221
+ stack.push(this.productions_[action[1]][0]);
222
+ vstack.push(yyval.$);
223
+ lstack.push(yyval._$);
224
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
225
+ stack.push(newState);
226
+ break;
227
+ case 3:
228
+ return true;
229
+ }
230
+ }
231
+ return true;
232
+ }
233
+ };
234
+ var lexer = /* @__PURE__ */ (function() {
235
+ var lexer2 = {
236
+ EOF: 1,
237
+ parseError: function parseError(str, hash) {
238
+ if (this.yy.parser) {
239
+ this.yy.parser.parseError(str, hash);
240
+ } else {
241
+ throw new Error(str);
242
+ }
243
+ },
244
+ // resets the lexer, sets new input
245
+ setInput: function(input, yy) {
246
+ this.yy = yy || this.yy || {};
247
+ this._input = input;
248
+ this._more = this._backtrack = this.done = false;
249
+ this.yylineno = this.yyleng = 0;
250
+ this.yytext = this.matched = this.match = "";
251
+ this.conditionStack = ["INITIAL"];
252
+ this.yylloc = {
253
+ first_line: 1,
254
+ first_column: 0,
255
+ last_line: 1,
256
+ last_column: 0
257
+ };
258
+ if (this.options.ranges) {
259
+ this.yylloc.range = [0, 0];
260
+ }
261
+ this.offset = 0;
262
+ return this;
263
+ },
264
+ // consumes and returns one char from the input
265
+ input: function() {
266
+ var ch = this._input[0];
267
+ this.yytext += ch;
268
+ this.yyleng++;
269
+ this.offset++;
270
+ this.match += ch;
271
+ this.matched += ch;
272
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
273
+ if (lines) {
274
+ this.yylineno++;
275
+ this.yylloc.last_line++;
276
+ } else {
277
+ this.yylloc.last_column++;
278
+ }
279
+ if (this.options.ranges) {
280
+ this.yylloc.range[1]++;
281
+ }
282
+ this._input = this._input.slice(1);
283
+ return ch;
284
+ },
285
+ // unshifts one char (or a string) into the input
286
+ unput: function(ch) {
287
+ var len = ch.length;
288
+ var lines = ch.split(/(?:\r\n?|\n)/g);
289
+ this._input = ch + this._input;
290
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
291
+ this.offset -= len;
292
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
293
+ this.match = this.match.substr(0, this.match.length - 1);
294
+ this.matched = this.matched.substr(0, this.matched.length - 1);
295
+ if (lines.length - 1) {
296
+ this.yylineno -= lines.length - 1;
297
+ }
298
+ var r = this.yylloc.range;
299
+ this.yylloc = {
300
+ first_line: this.yylloc.first_line,
301
+ last_line: this.yylineno + 1,
302
+ first_column: this.yylloc.first_column,
303
+ 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
304
+ };
305
+ if (this.options.ranges) {
306
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
307
+ }
308
+ this.yyleng = this.yytext.length;
309
+ return this;
310
+ },
311
+ // When called from action, caches matched text and appends it on next action
312
+ more: function() {
313
+ this._more = true;
314
+ return this;
315
+ },
316
+ // 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.
317
+ reject: function() {
318
+ if (this.options.backtrack_lexer) {
319
+ this._backtrack = true;
320
+ } else {
321
+ 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(), {
322
+ text: "",
323
+ token: null,
324
+ line: this.yylineno
325
+ });
326
+ }
327
+ return this;
328
+ },
329
+ // retain first n characters of the match
330
+ less: function(n) {
331
+ this.unput(this.match.slice(n));
332
+ },
333
+ // displays already matched input, i.e. for error messages
334
+ pastInput: function() {
335
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
336
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
337
+ },
338
+ // displays upcoming input, i.e. for error messages
339
+ upcomingInput: function() {
340
+ var next = this.match;
341
+ if (next.length < 20) {
342
+ next += this._input.substr(0, 20 - next.length);
343
+ }
344
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
345
+ },
346
+ // displays the character position where the lexing error occurred, i.e. for error messages
347
+ showPosition: function() {
348
+ var pre = this.pastInput();
349
+ var c = new Array(pre.length + 1).join("-");
350
+ return pre + this.upcomingInput() + "\n" + c + "^";
351
+ },
352
+ // test the lexed token: return FALSE when not a match, otherwise return token
353
+ test_match: function(match, indexed_rule) {
354
+ var token, lines, backup;
355
+ if (this.options.backtrack_lexer) {
356
+ backup = {
357
+ yylineno: this.yylineno,
358
+ yylloc: {
359
+ first_line: this.yylloc.first_line,
360
+ last_line: this.last_line,
361
+ first_column: this.yylloc.first_column,
362
+ last_column: this.yylloc.last_column
363
+ },
364
+ yytext: this.yytext,
365
+ match: this.match,
366
+ matches: this.matches,
367
+ matched: this.matched,
368
+ yyleng: this.yyleng,
369
+ offset: this.offset,
370
+ _more: this._more,
371
+ _input: this._input,
372
+ yy: this.yy,
373
+ conditionStack: this.conditionStack.slice(0),
374
+ done: this.done
375
+ };
376
+ if (this.options.ranges) {
377
+ backup.yylloc.range = this.yylloc.range.slice(0);
378
+ }
379
+ }
380
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
381
+ if (lines) {
382
+ this.yylineno += lines.length;
383
+ }
384
+ this.yylloc = {
385
+ first_line: this.yylloc.last_line,
386
+ last_line: this.yylineno + 1,
387
+ first_column: this.yylloc.last_column,
388
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
389
+ };
390
+ this.yytext += match[0];
391
+ this.match += match[0];
392
+ this.matches = match;
393
+ this.yyleng = this.yytext.length;
394
+ if (this.options.ranges) {
395
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
396
+ }
397
+ this._more = false;
398
+ this._backtrack = false;
399
+ this._input = this._input.slice(match[0].length);
400
+ this.matched += match[0];
401
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
402
+ if (this.done && this._input) {
403
+ this.done = false;
404
+ }
405
+ if (token) {
406
+ return token;
407
+ } else if (this._backtrack) {
408
+ for (var k in backup) {
409
+ this[k] = backup[k];
410
+ }
411
+ return false;
412
+ }
413
+ return false;
414
+ },
415
+ // return next match in input
416
+ next: function() {
417
+ if (this.done) {
418
+ return this.EOF;
419
+ }
420
+ if (!this._input) {
421
+ this.done = true;
422
+ }
423
+ var token, match, tempMatch, index;
424
+ if (!this._more) {
425
+ this.yytext = "";
426
+ this.match = "";
427
+ }
428
+ var rules = this._currentRules();
429
+ for (var i = 0; i < rules.length; i++) {
430
+ tempMatch = this._input.match(this.rules[rules[i]]);
431
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
432
+ match = tempMatch;
433
+ index = i;
434
+ if (this.options.backtrack_lexer) {
435
+ token = this.test_match(tempMatch, rules[i]);
436
+ if (token !== false) {
437
+ return token;
438
+ } else if (this._backtrack) {
439
+ match = false;
440
+ continue;
441
+ } else {
442
+ return false;
443
+ }
444
+ } else if (!this.options.flex) {
445
+ break;
446
+ }
447
+ }
448
+ }
449
+ if (match) {
450
+ token = this.test_match(match, rules[index]);
451
+ if (token !== false) {
452
+ return token;
453
+ }
454
+ return false;
455
+ }
456
+ if (this._input === "") {
457
+ return this.EOF;
458
+ } else {
459
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
460
+ text: "",
461
+ token: null,
462
+ line: this.yylineno
463
+ });
464
+ }
465
+ },
466
+ // return next match that has a token
467
+ lex: function lex() {
468
+ var r = this.next();
469
+ if (r) {
470
+ return r;
471
+ } else {
472
+ return this.lex();
473
+ }
474
+ },
475
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
476
+ begin: function begin(condition) {
477
+ this.conditionStack.push(condition);
478
+ },
479
+ // pop the previously active lexer condition state off the condition stack
480
+ popState: function popState() {
481
+ var n = this.conditionStack.length - 1;
482
+ if (n > 0) {
483
+ return this.conditionStack.pop();
484
+ } else {
485
+ return this.conditionStack[0];
486
+ }
487
+ },
488
+ // produce the lexer rule set which is active for the currently active lexer condition state
489
+ _currentRules: function _currentRules() {
490
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
491
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
492
+ } else {
493
+ return this.conditions["INITIAL"].rules;
494
+ }
495
+ },
496
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
497
+ topState: function topState(n) {
498
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
499
+ if (n >= 0) {
500
+ return this.conditionStack[n];
501
+ } else {
502
+ return "INITIAL";
503
+ }
504
+ },
505
+ // alias for begin(condition)
506
+ pushState: function pushState(condition) {
507
+ this.begin(condition);
508
+ },
509
+ // return the number of states currently on the stack
510
+ stateStackSize: function stateStackSize() {
511
+ return this.conditionStack.length;
512
+ },
513
+ options: { "case-insensitive": true },
514
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
515
+ switch ($avoiding_name_collisions) {
516
+ case 0:
517
+ break;
518
+ case 1:
519
+ break;
520
+ case 2:
521
+ return 32;
522
+ case 3:
523
+ break;
524
+ case 4:
525
+ this.begin("title");
526
+ return 13;
527
+ case 5:
528
+ this.popState();
529
+ return "title_value";
530
+ case 6:
531
+ this.begin("acc_title");
532
+ return 15;
533
+ case 7:
534
+ this.popState();
535
+ return "acc_title_value";
536
+ case 8:
537
+ this.begin("acc_descr");
538
+ return 17;
539
+ case 9:
540
+ this.popState();
541
+ return "acc_descr_value";
542
+ case 10:
543
+ this.begin("acc_descr_multiline");
544
+ break;
545
+ case 11:
546
+ this.popState();
547
+ break;
548
+ case 12:
549
+ return "acc_descr_multiline_value";
550
+ case 13:
551
+ return 25;
552
+ case 14:
553
+ return 27;
554
+ case 15:
555
+ return 26;
556
+ case 16:
557
+ return 28;
558
+ case 17:
559
+ return 29;
560
+ case 18:
561
+ return 30;
562
+ case 19:
563
+ return 31;
564
+ case 20:
565
+ this.begin("md_string");
566
+ break;
567
+ case 21:
568
+ return "MD_STR";
569
+ case 22:
570
+ this.popState();
571
+ break;
572
+ case 23:
573
+ this.begin("string");
574
+ break;
575
+ case 24:
576
+ this.popState();
577
+ break;
578
+ case 25:
579
+ return "STR";
580
+ case 26:
581
+ this.begin("point_start");
582
+ return 22;
583
+ case 27:
584
+ this.begin("point_x");
585
+ return 23;
586
+ case 28:
587
+ this.popState();
588
+ break;
589
+ case 29:
590
+ this.popState();
591
+ this.begin("point_y");
592
+ break;
593
+ case 30:
594
+ this.popState();
595
+ return 24;
596
+ case 31:
597
+ return 6;
598
+ case 32:
599
+ return 43;
600
+ case 33:
601
+ return "COLON";
602
+ case 34:
603
+ return 45;
604
+ case 35:
605
+ return 44;
606
+ case 36:
607
+ return 46;
608
+ case 37:
609
+ return 46;
610
+ case 38:
611
+ return 47;
612
+ case 39:
613
+ return 49;
614
+ case 40:
615
+ return 50;
616
+ case 41:
617
+ return 48;
618
+ case 42:
619
+ return 41;
620
+ case 43:
621
+ return 51;
622
+ case 44:
623
+ return 42;
624
+ case 45:
625
+ return 5;
626
+ case 46:
627
+ return 33;
628
+ case 47:
629
+ return 40;
630
+ case 48:
631
+ return 34;
632
+ }
633
+ },
634
+ 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, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
635
+ conditions: { "point_y": { "rules": [30], "inclusive": false }, "point_x": { "rules": [29], "inclusive": false }, "point_start": { "rules": [27, 28], "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": [21, 22], "inclusive": false }, "string": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "inclusive": true } }
636
+ };
637
+ return lexer2;
638
+ })();
639
+ parser2.lexer = lexer;
640
+ function Parser() {
641
+ this.yy = {};
642
+ }
643
+ Parser.prototype = parser2;
644
+ parser2.Parser = Parser;
645
+ return new Parser();
646
+ })();
647
+ parser.parser = parser;
648
+ const parser$1 = parser;
649
+ const defaultThemeVariables = getThemeVariables$2();
650
+ class QuadrantBuilder {
651
+ constructor() {
652
+ this.config = this.getDefaultConfig();
653
+ this.themeConfig = this.getDefaultThemeConfig();
654
+ this.data = this.getDefaultData();
655
+ }
656
+ getDefaultData() {
657
+ return {
658
+ titleText: "",
659
+ quadrant1Text: "",
660
+ quadrant2Text: "",
661
+ quadrant3Text: "",
662
+ quadrant4Text: "",
663
+ xAxisLeftText: "",
664
+ xAxisRightText: "",
665
+ yAxisBottomText: "",
666
+ yAxisTopText: "",
667
+ points: []
668
+ };
669
+ }
670
+ getDefaultConfig() {
671
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
672
+ return {
673
+ showXAxis: true,
674
+ showYAxis: true,
675
+ showTitle: true,
676
+ chartHeight: ((_a = defaultConfig$2.quadrantChart) == null ? void 0 : _a.chartWidth) || 500,
677
+ chartWidth: ((_b = defaultConfig$2.quadrantChart) == null ? void 0 : _b.chartHeight) || 500,
678
+ titlePadding: ((_c = defaultConfig$2.quadrantChart) == null ? void 0 : _c.titlePadding) || 10,
679
+ titleFontSize: ((_d = defaultConfig$2.quadrantChart) == null ? void 0 : _d.titleFontSize) || 20,
680
+ quadrantPadding: ((_e = defaultConfig$2.quadrantChart) == null ? void 0 : _e.quadrantPadding) || 5,
681
+ xAxisLabelPadding: ((_f = defaultConfig$2.quadrantChart) == null ? void 0 : _f.xAxisLabelPadding) || 5,
682
+ yAxisLabelPadding: ((_g = defaultConfig$2.quadrantChart) == null ? void 0 : _g.yAxisLabelPadding) || 5,
683
+ xAxisLabelFontSize: ((_h = defaultConfig$2.quadrantChart) == null ? void 0 : _h.xAxisLabelFontSize) || 16,
684
+ yAxisLabelFontSize: ((_i = defaultConfig$2.quadrantChart) == null ? void 0 : _i.yAxisLabelFontSize) || 16,
685
+ quadrantLabelFontSize: ((_j = defaultConfig$2.quadrantChart) == null ? void 0 : _j.quadrantLabelFontSize) || 16,
686
+ quadrantTextTopPadding: ((_k = defaultConfig$2.quadrantChart) == null ? void 0 : _k.quadrantTextTopPadding) || 5,
687
+ pointTextPadding: ((_l = defaultConfig$2.quadrantChart) == null ? void 0 : _l.pointTextPadding) || 5,
688
+ pointLabelFontSize: ((_m = defaultConfig$2.quadrantChart) == null ? void 0 : _m.pointLabelFontSize) || 12,
689
+ pointRadius: ((_n = defaultConfig$2.quadrantChart) == null ? void 0 : _n.pointRadius) || 5,
690
+ xAxisPosition: ((_o = defaultConfig$2.quadrantChart) == null ? void 0 : _o.xAxisPosition) || "top",
691
+ yAxisPosition: ((_p = defaultConfig$2.quadrantChart) == null ? void 0 : _p.yAxisPosition) || "left",
692
+ quadrantInternalBorderStrokeWidth: ((_q = defaultConfig$2.quadrantChart) == null ? void 0 : _q.quadrantInternalBorderStrokeWidth) || 1,
693
+ quadrantExternalBorderStrokeWidth: ((_r = defaultConfig$2.quadrantChart) == null ? void 0 : _r.quadrantExternalBorderStrokeWidth) || 2
694
+ };
695
+ }
696
+ getDefaultThemeConfig() {
697
+ return {
698
+ quadrant1Fill: defaultThemeVariables.quadrant1Fill,
699
+ quadrant2Fill: defaultThemeVariables.quadrant2Fill,
700
+ quadrant3Fill: defaultThemeVariables.quadrant3Fill,
701
+ quadrant4Fill: defaultThemeVariables.quadrant4Fill,
702
+ quadrant1TextFill: defaultThemeVariables.quadrant1TextFill,
703
+ quadrant2TextFill: defaultThemeVariables.quadrant2TextFill,
704
+ quadrant3TextFill: defaultThemeVariables.quadrant3TextFill,
705
+ quadrant4TextFill: defaultThemeVariables.quadrant4TextFill,
706
+ quadrantPointFill: defaultThemeVariables.quadrantPointFill,
707
+ quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill,
708
+ quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill,
709
+ quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill,
710
+ quadrantTitleFill: defaultThemeVariables.quadrantTitleFill,
711
+ quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill,
712
+ quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill
713
+ };
714
+ }
715
+ clear() {
716
+ this.config = this.getDefaultConfig();
717
+ this.themeConfig = this.getDefaultThemeConfig();
718
+ this.data = this.getDefaultData();
719
+ log$1.info("clear called");
720
+ }
721
+ setData(data) {
722
+ this.data = { ...this.data, ...data };
723
+ }
724
+ addPoints(points) {
725
+ this.data.points = [...points, ...this.data.points];
726
+ }
727
+ setConfig(config2) {
728
+ log$1.trace("setConfig called with: ", config2);
729
+ this.config = { ...this.config, ...config2 };
730
+ }
731
+ setThemeConfig(themeConfig) {
732
+ log$1.trace("setThemeConfig called with: ", themeConfig);
733
+ this.themeConfig = { ...this.themeConfig, ...themeConfig };
734
+ }
735
+ calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle) {
736
+ const xAxisSpaceCalculation = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize;
737
+ const xAxisSpace = {
738
+ top: xAxisPosition === "top" && showXAxis ? xAxisSpaceCalculation : 0,
739
+ bottom: xAxisPosition === "bottom" && showXAxis ? xAxisSpaceCalculation : 0
740
+ };
741
+ const yAxisSpaceCalculation = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize;
742
+ const yAxisSpace = {
743
+ left: this.config.yAxisPosition === "left" && showYAxis ? yAxisSpaceCalculation : 0,
744
+ right: this.config.yAxisPosition === "right" && showYAxis ? yAxisSpaceCalculation : 0
745
+ };
746
+ const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2;
747
+ const titleSpace = {
748
+ top: showTitle ? titleSpaceCalculation : 0
749
+ };
750
+ const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left;
751
+ const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top;
752
+ const quadrantWidth = this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right;
753
+ const quadrantHeight = this.config.chartHeight - this.config.quadrantPadding * 2 - xAxisSpace.top - xAxisSpace.bottom - titleSpace.top;
754
+ const quadrantHalfWidth = quadrantWidth / 2;
755
+ const quadrantHalfHeight = quadrantHeight / 2;
756
+ const quadrantSpace = {
757
+ quadrantLeft,
758
+ quadrantTop,
759
+ quadrantWidth,
760
+ quadrantHalfWidth,
761
+ quadrantHeight,
762
+ quadrantHalfHeight
763
+ };
764
+ return {
765
+ xAxisSpace,
766
+ yAxisSpace,
767
+ titleSpace,
768
+ quadrantSpace
769
+ };
770
+ }
771
+ getAxisLabels(xAxisPosition, showXAxis, showYAxis, spaceData) {
772
+ const { quadrantSpace, titleSpace } = spaceData;
773
+ const {
774
+ quadrantHalfHeight,
775
+ quadrantHeight,
776
+ quadrantLeft,
777
+ quadrantHalfWidth,
778
+ quadrantTop,
779
+ quadrantWidth
780
+ } = quadrantSpace;
781
+ const drawXAxisLabelsInMiddle = Boolean(this.data.xAxisRightText);
782
+ const drawYAxisLabelsInMiddle = Boolean(this.data.yAxisTopText);
783
+ const axisLabels = [];
784
+ if (this.data.xAxisLeftText && showXAxis) {
785
+ axisLabels.push({
786
+ text: this.data.xAxisLeftText,
787
+ fill: this.themeConfig.quadrantXAxisTextFill,
788
+ x: quadrantLeft + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),
789
+ y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding,
790
+ fontSize: this.config.xAxisLabelFontSize,
791
+ verticalPos: drawXAxisLabelsInMiddle ? "center" : "left",
792
+ horizontalPos: "top",
793
+ rotation: 0
794
+ });
795
+ }
796
+ if (this.data.xAxisRightText && showXAxis) {
797
+ axisLabels.push({
798
+ text: this.data.xAxisRightText,
799
+ fill: this.themeConfig.quadrantXAxisTextFill,
800
+ x: quadrantLeft + quadrantHalfWidth + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),
801
+ y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding,
802
+ fontSize: this.config.xAxisLabelFontSize,
803
+ verticalPos: drawXAxisLabelsInMiddle ? "center" : "left",
804
+ horizontalPos: "top",
805
+ rotation: 0
806
+ });
807
+ }
808
+ if (this.data.yAxisBottomText && showYAxis) {
809
+ axisLabels.push({
810
+ text: this.data.yAxisBottomText,
811
+ fill: this.themeConfig.quadrantYAxisTextFill,
812
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding,
813
+ y: quadrantTop + quadrantHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),
814
+ fontSize: this.config.yAxisLabelFontSize,
815
+ verticalPos: drawYAxisLabelsInMiddle ? "center" : "left",
816
+ horizontalPos: "top",
817
+ rotation: -90
818
+ });
819
+ }
820
+ if (this.data.yAxisTopText && showYAxis) {
821
+ axisLabels.push({
822
+ text: this.data.yAxisTopText,
823
+ fill: this.themeConfig.quadrantYAxisTextFill,
824
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding,
825
+ y: quadrantTop + quadrantHalfHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),
826
+ fontSize: this.config.yAxisLabelFontSize,
827
+ verticalPos: drawYAxisLabelsInMiddle ? "center" : "left",
828
+ horizontalPos: "top",
829
+ rotation: -90
830
+ });
831
+ }
832
+ return axisLabels;
833
+ }
834
+ getQuadrants(spaceData) {
835
+ const { quadrantSpace } = spaceData;
836
+ const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace;
837
+ const quadrants = [
838
+ {
839
+ text: {
840
+ text: this.data.quadrant1Text,
841
+ fill: this.themeConfig.quadrant1TextFill,
842
+ x: 0,
843
+ y: 0,
844
+ fontSize: this.config.quadrantLabelFontSize,
845
+ verticalPos: "center",
846
+ horizontalPos: "middle",
847
+ rotation: 0
848
+ },
849
+ x: quadrantLeft + quadrantHalfWidth,
850
+ y: quadrantTop,
851
+ width: quadrantHalfWidth,
852
+ height: quadrantHalfHeight,
853
+ fill: this.themeConfig.quadrant1Fill
854
+ },
855
+ {
856
+ text: {
857
+ text: this.data.quadrant2Text,
858
+ fill: this.themeConfig.quadrant2TextFill,
859
+ x: 0,
860
+ y: 0,
861
+ fontSize: this.config.quadrantLabelFontSize,
862
+ verticalPos: "center",
863
+ horizontalPos: "middle",
864
+ rotation: 0
865
+ },
866
+ x: quadrantLeft,
867
+ y: quadrantTop,
868
+ width: quadrantHalfWidth,
869
+ height: quadrantHalfHeight,
870
+ fill: this.themeConfig.quadrant2Fill
871
+ },
872
+ {
873
+ text: {
874
+ text: this.data.quadrant3Text,
875
+ fill: this.themeConfig.quadrant3TextFill,
876
+ x: 0,
877
+ y: 0,
878
+ fontSize: this.config.quadrantLabelFontSize,
879
+ verticalPos: "center",
880
+ horizontalPos: "middle",
881
+ rotation: 0
882
+ },
883
+ x: quadrantLeft,
884
+ y: quadrantTop + quadrantHalfHeight,
885
+ width: quadrantHalfWidth,
886
+ height: quadrantHalfHeight,
887
+ fill: this.themeConfig.quadrant3Fill
888
+ },
889
+ {
890
+ text: {
891
+ text: this.data.quadrant4Text,
892
+ fill: this.themeConfig.quadrant4TextFill,
893
+ x: 0,
894
+ y: 0,
895
+ fontSize: this.config.quadrantLabelFontSize,
896
+ verticalPos: "center",
897
+ horizontalPos: "middle",
898
+ rotation: 0
899
+ },
900
+ x: quadrantLeft + quadrantHalfWidth,
901
+ y: quadrantTop + quadrantHalfHeight,
902
+ width: quadrantHalfWidth,
903
+ height: quadrantHalfHeight,
904
+ fill: this.themeConfig.quadrant4Fill
905
+ }
906
+ ];
907
+ for (const quadrant of quadrants) {
908
+ quadrant.text.x = quadrant.x + quadrant.width / 2;
909
+ if (this.data.points.length === 0) {
910
+ quadrant.text.y = quadrant.y + quadrant.height / 2;
911
+ quadrant.text.horizontalPos = "middle";
912
+ } else {
913
+ quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding;
914
+ quadrant.text.horizontalPos = "top";
915
+ }
916
+ }
917
+ return quadrants;
918
+ }
919
+ getQuadrantPoints(spaceData) {
920
+ const { quadrantSpace } = spaceData;
921
+ const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace;
922
+ const xAxis = linear().domain([0, 1]).range([quadrantLeft, quadrantWidth + quadrantLeft]);
923
+ const yAxis = linear().domain([0, 1]).range([quadrantHeight + quadrantTop, quadrantTop]);
924
+ const points = this.data.points.map((point) => {
925
+ const props = {
926
+ x: xAxis(point.x),
927
+ y: yAxis(point.y),
928
+ fill: this.themeConfig.quadrantPointFill,
929
+ radius: this.config.pointRadius,
930
+ text: {
931
+ text: point.text,
932
+ fill: this.themeConfig.quadrantPointTextFill,
933
+ x: xAxis(point.x),
934
+ y: yAxis(point.y) + this.config.pointTextPadding,
935
+ verticalPos: "center",
936
+ horizontalPos: "top",
937
+ fontSize: this.config.pointLabelFontSize,
938
+ rotation: 0
939
+ }
940
+ };
941
+ return props;
942
+ });
943
+ return points;
944
+ }
945
+ getBorders(spaceData) {
946
+ const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2;
947
+ const { quadrantSpace } = spaceData;
948
+ const {
949
+ quadrantHalfHeight,
950
+ quadrantHeight,
951
+ quadrantLeft,
952
+ quadrantHalfWidth,
953
+ quadrantTop,
954
+ quadrantWidth
955
+ } = quadrantSpace;
956
+ const borderLines = [
957
+ // top border
958
+ {
959
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
960
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
961
+ x1: quadrantLeft - halfExternalBorderWidth,
962
+ y1: quadrantTop,
963
+ x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,
964
+ y2: quadrantTop
965
+ },
966
+ // right border
967
+ {
968
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
969
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
970
+ x1: quadrantLeft + quadrantWidth,
971
+ y1: quadrantTop + halfExternalBorderWidth,
972
+ x2: quadrantLeft + quadrantWidth,
973
+ y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
974
+ },
975
+ // bottom border
976
+ {
977
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
978
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
979
+ x1: quadrantLeft - halfExternalBorderWidth,
980
+ y1: quadrantTop + quadrantHeight,
981
+ x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,
982
+ y2: quadrantTop + quadrantHeight
983
+ },
984
+ // left border
985
+ {
986
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
987
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
988
+ x1: quadrantLeft,
989
+ y1: quadrantTop + halfExternalBorderWidth,
990
+ x2: quadrantLeft,
991
+ y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
992
+ },
993
+ // vertical inner border
994
+ {
995
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
996
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
997
+ x1: quadrantLeft + quadrantHalfWidth,
998
+ y1: quadrantTop + halfExternalBorderWidth,
999
+ x2: quadrantLeft + quadrantHalfWidth,
1000
+ y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
1001
+ },
1002
+ // horizontal inner border
1003
+ {
1004
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
1005
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
1006
+ x1: quadrantLeft + halfExternalBorderWidth,
1007
+ y1: quadrantTop + quadrantHalfHeight,
1008
+ x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth,
1009
+ y2: quadrantTop + quadrantHalfHeight
1010
+ }
1011
+ ];
1012
+ return borderLines;
1013
+ }
1014
+ getTitle(showTitle) {
1015
+ if (showTitle) {
1016
+ return {
1017
+ text: this.data.titleText,
1018
+ fill: this.themeConfig.quadrantTitleFill,
1019
+ fontSize: this.config.titleFontSize,
1020
+ horizontalPos: "top",
1021
+ verticalPos: "center",
1022
+ rotation: 0,
1023
+ y: this.config.titlePadding,
1024
+ x: this.config.chartWidth / 2
1025
+ };
1026
+ }
1027
+ return;
1028
+ }
1029
+ build() {
1030
+ const showXAxis = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText);
1031
+ const showYAxis = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText);
1032
+ const showTitle = this.config.showTitle && !!this.data.titleText;
1033
+ const xAxisPosition = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition;
1034
+ const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle);
1035
+ return {
1036
+ points: this.getQuadrantPoints(calculatedSpace),
1037
+ quadrants: this.getQuadrants(calculatedSpace),
1038
+ axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace),
1039
+ borderLines: this.getBorders(calculatedSpace),
1040
+ title: this.getTitle(showTitle)
1041
+ };
1042
+ }
1043
+ }
1044
+ const config = getConfig();
1045
+ function textSanitizer(text) {
1046
+ return sanitizeText$2(text.trim(), config);
1047
+ }
1048
+ const quadrantBuilder = new QuadrantBuilder();
1049
+ function setQuadrant1Text(textObj) {
1050
+ quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) });
1051
+ }
1052
+ function setQuadrant2Text(textObj) {
1053
+ quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) });
1054
+ }
1055
+ function setQuadrant3Text(textObj) {
1056
+ quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) });
1057
+ }
1058
+ function setQuadrant4Text(textObj) {
1059
+ quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) });
1060
+ }
1061
+ function setXAxisLeftText(textObj) {
1062
+ quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) });
1063
+ }
1064
+ function setXAxisRightText(textObj) {
1065
+ quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) });
1066
+ }
1067
+ function setYAxisTopText(textObj) {
1068
+ quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) });
1069
+ }
1070
+ function setYAxisBottomText(textObj) {
1071
+ quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) });
1072
+ }
1073
+ function addPoint(textObj, x, y) {
1074
+ quadrantBuilder.addPoints([{ x, y, text: textSanitizer(textObj.text) }]);
1075
+ }
1076
+ function setWidth(width) {
1077
+ quadrantBuilder.setConfig({ chartWidth: width });
1078
+ }
1079
+ function setHeight(height) {
1080
+ quadrantBuilder.setConfig({ chartHeight: height });
1081
+ }
1082
+ function getQuadrantData() {
1083
+ const config2 = getConfig();
1084
+ const { themeVariables, quadrantChart: quadrantChartConfig } = config2;
1085
+ if (quadrantChartConfig) {
1086
+ quadrantBuilder.setConfig(quadrantChartConfig);
1087
+ }
1088
+ quadrantBuilder.setThemeConfig({
1089
+ quadrant1Fill: themeVariables.quadrant1Fill,
1090
+ quadrant2Fill: themeVariables.quadrant2Fill,
1091
+ quadrant3Fill: themeVariables.quadrant3Fill,
1092
+ quadrant4Fill: themeVariables.quadrant4Fill,
1093
+ quadrant1TextFill: themeVariables.quadrant1TextFill,
1094
+ quadrant2TextFill: themeVariables.quadrant2TextFill,
1095
+ quadrant3TextFill: themeVariables.quadrant3TextFill,
1096
+ quadrant4TextFill: themeVariables.quadrant4TextFill,
1097
+ quadrantPointFill: themeVariables.quadrantPointFill,
1098
+ quadrantPointTextFill: themeVariables.quadrantPointTextFill,
1099
+ quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill,
1100
+ quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill,
1101
+ quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill,
1102
+ quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill,
1103
+ quadrantTitleFill: themeVariables.quadrantTitleFill
1104
+ });
1105
+ quadrantBuilder.setData({ titleText: getDiagramTitle() });
1106
+ return quadrantBuilder.build();
1107
+ }
1108
+ const clear = function() {
1109
+ quadrantBuilder.clear();
1110
+ clear$1();
1111
+ };
1112
+ const db = {
1113
+ setWidth,
1114
+ setHeight,
1115
+ setQuadrant1Text,
1116
+ setQuadrant2Text,
1117
+ setQuadrant3Text,
1118
+ setQuadrant4Text,
1119
+ setXAxisLeftText,
1120
+ setXAxisRightText,
1121
+ setYAxisTopText,
1122
+ setYAxisBottomText,
1123
+ addPoint,
1124
+ getQuadrantData,
1125
+ clear,
1126
+ setAccTitle,
1127
+ getAccTitle,
1128
+ setDiagramTitle,
1129
+ getDiagramTitle,
1130
+ getAccDescription,
1131
+ setAccDescription
1132
+ };
1133
+ const draw = (txt, id, _version, diagObj) => {
1134
+ var _a, _b, _c;
1135
+ function getDominantBaseLine(horizontalPos) {
1136
+ return horizontalPos === "top" ? "hanging" : "middle";
1137
+ }
1138
+ function getTextAnchor(verticalPos) {
1139
+ return verticalPos === "left" ? "start" : "middle";
1140
+ }
1141
+ function getTransformation(data) {
1142
+ return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;
1143
+ }
1144
+ const conf = getConfig();
1145
+ log$1.debug("Rendering quadrant chart\n" + txt);
1146
+ const securityLevel = conf.securityLevel;
1147
+ let sandboxElement;
1148
+ if (securityLevel === "sandbox") {
1149
+ sandboxElement = select("#i" + id);
1150
+ }
1151
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
1152
+ const svg = root.select(`[id="${id}"]`);
1153
+ const group = svg.append("g").attr("class", "main");
1154
+ const width = ((_a = conf.quadrantChart) == null ? void 0 : _a.chartWidth) || 500;
1155
+ const height = ((_b = conf.quadrantChart) == null ? void 0 : _b.chartHeight) || 500;
1156
+ configureSvgSize(svg, height, width, ((_c = conf.quadrantChart) == null ? void 0 : _c.useMaxWidth) || true);
1157
+ svg.attr("viewBox", "0 0 " + width + " " + height);
1158
+ diagObj.db.setHeight(height);
1159
+ diagObj.db.setWidth(width);
1160
+ const quadrantData = diagObj.db.getQuadrantData();
1161
+ const quadrantsGroup = group.append("g").attr("class", "quadrants");
1162
+ const borderGroup = group.append("g").attr("class", "border");
1163
+ const dataPointGroup = group.append("g").attr("class", "data-points");
1164
+ const labelGroup = group.append("g").attr("class", "labels");
1165
+ const titleGroup = group.append("g").attr("class", "title");
1166
+ if (quadrantData.title) {
1167
+ 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);
1168
+ }
1169
+ if (quadrantData.borderLines) {
1170
+ 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);
1171
+ }
1172
+ const quadrants = quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class", "quadrant");
1173
+ 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);
1174
+ quadrants.append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr(
1175
+ "dominant-baseline",
1176
+ (data) => getDominantBaseLine(data.text.horizontalPos)
1177
+ ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)).text((data) => data.text.text);
1178
+ const labels = labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class", "label");
1179
+ 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));
1180
+ const dataPoints = dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class", "data-point");
1181
+ dataPoints.append("circle").attr("cx", (data) => data.x).attr("cy", (data) => data.y).attr("r", (data) => data.radius).attr("fill", (data) => data.fill);
1182
+ 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(
1183
+ "dominant-baseline",
1184
+ (data) => getDominantBaseLine(data.text.horizontalPos)
1185
+ ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text));
1186
+ };
1187
+ const renderer = {
1188
+ draw
1189
+ };
1190
+ const diagram = {
1191
+ parser: parser$1,
1192
+ db,
1193
+ renderer,
1194
+ styles: () => ""
1195
+ };
1196
+ export {
1197
+ diagram
1198
+ };