@ucap-llm/ai-ui 1.1.6 → 1.1.7

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 (55) hide show
  1. package/_basePickBy-7d00d05e.mjs +153 -0
  2. package/_baseUniq-1876be04.mjs +440 -0
  3. package/ai-ui.es.js +11 -78207
  4. package/ai-ui.umd.js +2701 -143
  5. package/arc-bb1e7b28.mjs +85 -0
  6. package/architecture-4AB2E3PP-26f07d27.mjs +10 -0
  7. package/architectureDiagram-IEHRJDOE-535e4958.mjs +4640 -0
  8. package/blockDiagram-JOT3LUYC-e5536854.mjs +2251 -0
  9. package/c4Diagram-VJAJSXHY-311741c3.mjs +1583 -0
  10. package/channel-5d097975.mjs +5 -0
  11. package/chunk-4BMEZGHF-55420838.mjs +9 -0
  12. package/chunk-A2AXSNBT-5f9de039.mjs +1373 -0
  13. package/chunk-AEK57VVT-bd6e836f.mjs +1416 -0
  14. package/chunk-D6G4REZN-69cf348a.mjs +64 -0
  15. package/chunk-RZ5BOZE2-ebe3985e.mjs +24 -0
  16. package/chunk-XZIHB7SX-ed9a9d65.mjs +15 -0
  17. package/classDiagram-GIVACNV2-4d61f06d.mjs +18 -0
  18. package/classDiagram-v2-COTLJTTW-4d61f06d.mjs +18 -0
  19. package/clone-44064c55.mjs +8 -0
  20. package/cytoscape.esm-bb479f88.mjs +18232 -0
  21. package/dagre-OKDRZEBW-0574359b.mjs +448 -0
  22. package/diagram-SSKATNLV-f4dd04b2.mjs +225 -0
  23. package/diagram-VNBRO52H-f77f925a.mjs +130 -0
  24. package/erDiagram-Q7BY3M3F-8213684f.mjs +843 -0
  25. package/flowDiagram-4HSFHLVR-1decdff6.mjs +1624 -0
  26. package/ganttDiagram-APWFNJXF-461381a5.mjs +2521 -0
  27. package/gitGraph-O2Q2CXLX-d961db16.mjs +10 -0
  28. package/gitGraphDiagram-7IBYFJ6S-be6c39c3.mjs +716 -0
  29. package/graph-7ba79f74.mjs +249 -0
  30. package/index-f5aac161.mjs +93487 -0
  31. package/info-4N47QTOZ-615527c9.mjs +10 -0
  32. package/infoDiagram-PH2N3AL5-064df479.mjs +26 -0
  33. package/init-f9637058.mjs +16 -0
  34. package/journeyDiagram-U35MCT3I-94c54b39.mjs +811 -0
  35. package/kanban-definition-NDS4AKOZ-58a05db1.mjs +720 -0
  36. package/katex-2e45926a.mjs +11700 -0
  37. package/layout-c953b0e7.mjs +1344 -0
  38. package/linear-3c81794f.mjs +447 -0
  39. package/mermaid-parser.core-7afd2b2f.mjs +12845 -0
  40. package/mindmap-definition-ALO5MXBD-60e68e28.mjs +3222 -0
  41. package/ordinal-980380c7.mjs +65 -0
  42. package/package.json +1 -1
  43. package/packet-KVYON367-4b5a305e.mjs +10 -0
  44. package/pie-R6RNRRYF-0f27d16d.mjs +10 -0
  45. package/pieDiagram-IB7DONF6-66cebf11.mjs +167 -0
  46. package/quadrantDiagram-7GDLP6J5-f2cbfc79.mjs +1027 -0
  47. package/radar-MK3ICKWK-9e1913d7.mjs +10 -0
  48. package/requirementDiagram-KVF5MWMF-36d316c2.mjs +853 -0
  49. package/sankeyDiagram-QLVOVGJD-76245efb.mjs +826 -0
  50. package/sequenceDiagram-X6HHIX6F-a0ec0021.mjs +2283 -0
  51. package/stateDiagram-DGXRK772-e6387816.mjs +274 -0
  52. package/stateDiagram-v2-YXO3MK2T-f011ada4.mjs +18 -0
  53. package/style.css +1 -1
  54. package/timeline-definition-BDJGKUSR-a62514a7.mjs +806 -0
  55. package/xychartDiagram-VJFVF3MP-1b807048.mjs +1306 -0
@@ -0,0 +1,1027 @@
1
+ import { _ as o, K as _e, C as D, l as At, d as wt, i as Ae, o as ie, s as ke, g as Fe, n as Pe, b as ve, c as Ce, t as Le, j as zt, k as Ee } from "./index-f5aac161.mjs";
2
+ import { l as ee } from "./linear-3c81794f.mjs";
3
+ import "vue";
4
+ import "./init-f9637058.mjs";
5
+ var Vt = function() {
6
+ var t = /* @__PURE__ */ o(function(j, r, l, g) {
7
+ for (l = l || {}, g = j.length; g--; l[j[g]] = r)
8
+ ;
9
+ return l;
10
+ }, "o"), n = [1, 3], u = [1, 4], c = [1, 5], h = [1, 6], p = [1, 7], y = [1, 4, 5, 10, 12, 13, 14, 18, 25, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], S = [1, 4, 5, 10, 12, 13, 14, 18, 25, 28, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], a = [55, 56, 57], A = [2, 36], d = [1, 37], T = [1, 36], q = [1, 38], m = [1, 35], b = [1, 43], x = [1, 41], O = [1, 14], Y = [1, 23], G = [1, 18], yt = [1, 19], Tt = [1, 20], ht = [1, 21], Ft = [1, 22], ct = [1, 24], dt = [1, 25], ut = [1, 26], xt = [1, 27], i = [1, 28], Bt = [1, 29], W = [1, 32], U = [1, 33], k = [1, 34], F = [1, 39], P = [1, 40], v = [1, 42], C = [1, 44], H = [1, 62], X = [1, 61], L = [4, 5, 8, 10, 12, 13, 14, 18, 44, 47, 49, 55, 56, 57, 63, 64, 65, 66, 67], Rt = [1, 65], Nt = [1, 66], Wt = [1, 67], Ut = [1, 68], Qt = [1, 69], Ot = [1, 70], Ht = [1, 71], Xt = [1, 72], Mt = [1, 73], Yt = [1, 74], jt = [1, 75], Gt = [1, 76], I = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], J = [1, 90], $ = [1, 91], tt = [1, 92], et = [1, 99], it = [1, 93], at = [1, 96], nt = [1, 94], st = [1, 95], rt = [1, 97], ot = [1, 98], Pt = [1, 102], Kt = [10, 55, 56, 57], R = [4, 5, 6, 8, 10, 11, 13, 17, 18, 19, 20, 55, 56, 57], vt = {
11
+ trace: /* @__PURE__ */ o(function() {
12
+ }, "trace"),
13
+ yy: {},
14
+ 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 },
15
+ 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" },
16
+ 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], [59, 1], [59, 1], [59, 1]],
17
+ performAction: /* @__PURE__ */ o(function(r, l, g, f, _, e, ft) {
18
+ var s = e.length - 1;
19
+ switch (_) {
20
+ case 23:
21
+ this.$ = e[s];
22
+ break;
23
+ case 24:
24
+ this.$ = e[s - 1] + "" + e[s];
25
+ break;
26
+ case 26:
27
+ this.$ = e[s - 1] + e[s];
28
+ break;
29
+ case 27:
30
+ this.$ = [e[s].trim()];
31
+ break;
32
+ case 28:
33
+ e[s - 2].push(e[s].trim()), this.$ = e[s - 2];
34
+ break;
35
+ case 29:
36
+ this.$ = e[s - 4], f.addClass(e[s - 2], e[s]);
37
+ break;
38
+ case 37:
39
+ this.$ = [];
40
+ break;
41
+ case 42:
42
+ this.$ = e[s].trim(), f.setDiagramTitle(this.$);
43
+ break;
44
+ case 43:
45
+ this.$ = e[s].trim(), f.setAccTitle(this.$);
46
+ break;
47
+ case 44:
48
+ case 45:
49
+ this.$ = e[s].trim(), f.setAccDescription(this.$);
50
+ break;
51
+ case 46:
52
+ f.addSection(e[s].substr(8)), this.$ = e[s].substr(8);
53
+ break;
54
+ case 47:
55
+ f.addPoint(e[s - 3], "", e[s - 1], e[s], []);
56
+ break;
57
+ case 48:
58
+ f.addPoint(e[s - 4], e[s - 3], e[s - 1], e[s], []);
59
+ break;
60
+ case 49:
61
+ f.addPoint(e[s - 4], "", e[s - 2], e[s - 1], e[s]);
62
+ break;
63
+ case 50:
64
+ f.addPoint(e[s - 5], e[s - 4], e[s - 2], e[s - 1], e[s]);
65
+ break;
66
+ case 51:
67
+ f.setXAxisLeftText(e[s - 2]), f.setXAxisRightText(e[s]);
68
+ break;
69
+ case 52:
70
+ e[s - 1].text += " \u27F6 ", f.setXAxisLeftText(e[s - 1]);
71
+ break;
72
+ case 53:
73
+ f.setXAxisLeftText(e[s]);
74
+ break;
75
+ case 54:
76
+ f.setYAxisBottomText(e[s - 2]), f.setYAxisTopText(e[s]);
77
+ break;
78
+ case 55:
79
+ e[s - 1].text += " \u27F6 ", f.setYAxisBottomText(e[s - 1]);
80
+ break;
81
+ case 56:
82
+ f.setYAxisBottomText(e[s]);
83
+ break;
84
+ case 57:
85
+ f.setQuadrant1Text(e[s]);
86
+ break;
87
+ case 58:
88
+ f.setQuadrant2Text(e[s]);
89
+ break;
90
+ case 59:
91
+ f.setQuadrant3Text(e[s]);
92
+ break;
93
+ case 60:
94
+ f.setQuadrant4Text(e[s]);
95
+ break;
96
+ case 64:
97
+ this.$ = { text: e[s], type: "text" };
98
+ break;
99
+ case 65:
100
+ this.$ = { text: e[s - 1].text + "" + e[s], type: e[s - 1].type };
101
+ break;
102
+ case 66:
103
+ this.$ = { text: e[s], type: "text" };
104
+ break;
105
+ case 67:
106
+ this.$ = { text: e[s], type: "markdown" };
107
+ break;
108
+ case 68:
109
+ this.$ = e[s];
110
+ break;
111
+ case 69:
112
+ this.$ = e[s - 1] + "" + e[s];
113
+ break;
114
+ }
115
+ }, "anonymous"),
116
+ table: [{ 18: n, 26: 1, 27: 2, 28: u, 55: c, 56: h, 57: p }, { 1: [3] }, { 18: n, 26: 8, 27: 2, 28: u, 55: c, 56: h, 57: p }, { 18: n, 26: 9, 27: 2, 28: u, 55: c, 56: h, 57: p }, t(y, [2, 33], { 29: 10 }), t(S, [2, 61]), t(S, [2, 62]), t(S, [2, 63]), { 1: [2, 30] }, { 1: [2, 31] }, t(a, A, { 30: 11, 31: 12, 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 1: [2, 32], 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 18: O, 25: Y, 35: G, 37: yt, 39: Tt, 41: ht, 42: Ft, 48: ct, 50: dt, 51: ut, 52: xt, 53: i, 54: Bt, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(y, [2, 34]), { 27: 45, 55: c, 56: h, 57: p }, t(a, [2, 37]), t(a, A, { 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 31: 46, 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 18: O, 25: Y, 35: G, 37: yt, 39: Tt, 41: ht, 42: Ft, 48: ct, 50: dt, 51: ut, 52: xt, 53: i, 54: Bt, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 39]), t(a, [2, 40]), t(a, [2, 41]), { 36: [1, 47] }, { 38: [1, 48] }, { 40: [1, 49] }, t(a, [2, 45]), t(a, [2, 46]), { 18: [1, 50] }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 51, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 52, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 53, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 54, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 55, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 56, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 44: [1, 57], 47: [1, 58], 58: 60, 59: 59, 63: k, 64: F, 65: P, 66: v, 67: C }, t(L, [2, 64]), t(L, [2, 66]), t(L, [2, 67]), t(L, [2, 70]), t(L, [2, 71]), t(L, [2, 72]), t(L, [2, 73]), t(L, [2, 74]), t(L, [2, 75]), t(L, [2, 76]), t(L, [2, 77]), t(L, [2, 78]), t(L, [2, 79]), t(L, [2, 80]), t(y, [2, 35]), t(a, [2, 38]), t(a, [2, 42]), t(a, [2, 43]), t(a, [2, 44]), { 3: 64, 4: Rt, 5: Nt, 6: Wt, 7: Ut, 8: Qt, 9: Ot, 10: Ht, 11: Xt, 12: Mt, 13: Yt, 14: jt, 15: Gt, 21: 63 }, t(a, [2, 53], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 49: [1, 77], 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 56], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 49: [1, 78], 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 57], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 58], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 59], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 60], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), { 45: [1, 79] }, { 44: [1, 80] }, t(L, [2, 65]), t(L, [2, 81]), t(L, [2, 82]), t(L, [2, 83]), { 3: 82, 4: Rt, 5: Nt, 6: Wt, 7: Ut, 8: Qt, 9: Ot, 10: Ht, 11: Xt, 12: Mt, 13: Yt, 14: jt, 15: Gt, 18: [1, 81] }, t(I, [2, 23]), t(I, [2, 1]), t(I, [2, 2]), t(I, [2, 3]), t(I, [2, 4]), t(I, [2, 5]), t(I, [2, 6]), t(I, [2, 7]), t(I, [2, 8]), t(I, [2, 9]), t(I, [2, 10]), t(I, [2, 11]), t(I, [2, 12]), t(a, [2, 52], { 58: 31, 43: 83, 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 55], { 58: 31, 43: 84, 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), { 46: [1, 85] }, { 45: [1, 86] }, { 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 16: 89, 17: nt, 18: st, 19: rt, 20: ot, 22: 88, 23: 87 }, t(I, [2, 24]), t(a, [2, 51], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 54], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 47], { 22: 88, 16: 89, 23: 100, 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 17: nt, 18: st, 19: rt, 20: ot }), { 46: [1, 101] }, t(a, [2, 29], { 10: Pt }), t(Kt, [2, 27], { 16: 103, 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 17: nt, 18: st, 19: rt, 20: ot }), t(R, [2, 25]), t(R, [2, 13]), t(R, [2, 14]), t(R, [2, 15]), t(R, [2, 16]), t(R, [2, 17]), t(R, [2, 18]), t(R, [2, 19]), t(R, [2, 20]), t(R, [2, 21]), t(R, [2, 22]), t(a, [2, 49], { 10: Pt }), t(a, [2, 48], { 22: 88, 16: 89, 23: 104, 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 17: nt, 18: st, 19: rt, 20: ot }), { 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 16: 89, 17: nt, 18: st, 19: rt, 20: ot, 22: 105 }, t(R, [2, 26]), t(a, [2, 50], { 10: Pt }), t(Kt, [2, 28], { 16: 103, 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 17: nt, 18: st, 19: rt, 20: ot })],
117
+ defaultActions: { 8: [2, 30], 9: [2, 31] },
118
+ parseError: /* @__PURE__ */ o(function(r, l) {
119
+ if (l.recoverable)
120
+ this.trace(r);
121
+ else {
122
+ var g = new Error(r);
123
+ throw g.hash = l, g;
124
+ }
125
+ }, "parseError"),
126
+ parse: /* @__PURE__ */ o(function(r) {
127
+ var l = this, g = [0], f = [], _ = [null], e = [], ft = this.table, s = "", mt = 0, Zt = 0, qe = 2, Jt = 1, me = e.slice.call(arguments, 1), E = Object.create(this.lexer), K = { yy: {} };
128
+ for (var Ct in this.yy)
129
+ Object.prototype.hasOwnProperty.call(this.yy, Ct) && (K.yy[Ct] = this.yy[Ct]);
130
+ E.setInput(r, K.yy), K.yy.lexer = E, K.yy.parser = this, typeof E.yylloc > "u" && (E.yylloc = {});
131
+ var Lt = E.yylloc;
132
+ e.push(Lt);
133
+ var be = E.options && E.options.ranges;
134
+ typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
135
+ function Se(B) {
136
+ g.length = g.length - 2 * B, _.length = _.length - B, e.length = e.length - B;
137
+ }
138
+ o(Se, "popStack");
139
+ function $t() {
140
+ var B;
141
+ return B = f.pop() || E.lex() || Jt, typeof B != "number" && (B instanceof Array && (f = B, B = f.pop()), B = l.symbols_[B] || B), B;
142
+ }
143
+ o($t, "lex");
144
+ for (var w, Z, N, Et, lt = {}, bt, M, te, St; ; ) {
145
+ if (Z = g[g.length - 1], this.defaultActions[Z] ? N = this.defaultActions[Z] : ((w === null || typeof w > "u") && (w = $t()), N = ft[Z] && ft[Z][w]), typeof N > "u" || !N.length || !N[0]) {
146
+ var Dt = "";
147
+ St = [];
148
+ for (bt in ft[Z])
149
+ this.terminals_[bt] && bt > qe && St.push("'" + this.terminals_[bt] + "'");
150
+ E.showPosition ? Dt = "Parse error on line " + (mt + 1) + `:
151
+ ` + E.showPosition() + `
152
+ Expecting ` + St.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Dt = "Parse error on line " + (mt + 1) + ": Unexpected " + (w == Jt ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Dt, {
153
+ text: E.match,
154
+ token: this.terminals_[w] || w,
155
+ line: E.yylineno,
156
+ loc: Lt,
157
+ expected: St
158
+ });
159
+ }
160
+ if (N[0] instanceof Array && N.length > 1)
161
+ throw new Error("Parse Error: multiple actions possible at state: " + Z + ", token: " + w);
162
+ switch (N[0]) {
163
+ case 1:
164
+ g.push(w), _.push(E.yytext), e.push(E.yylloc), g.push(N[1]), w = null, Zt = E.yyleng, s = E.yytext, mt = E.yylineno, Lt = E.yylloc;
165
+ break;
166
+ case 2:
167
+ if (M = this.productions_[N[1]][1], lt.$ = _[_.length - M], lt._$ = {
168
+ first_line: e[e.length - (M || 1)].first_line,
169
+ last_line: e[e.length - 1].last_line,
170
+ first_column: e[e.length - (M || 1)].first_column,
171
+ last_column: e[e.length - 1].last_column
172
+ }, be && (lt._$.range = [
173
+ e[e.length - (M || 1)].range[0],
174
+ e[e.length - 1].range[1]
175
+ ]), Et = this.performAction.apply(lt, [
176
+ s,
177
+ Zt,
178
+ mt,
179
+ K.yy,
180
+ N[1],
181
+ _,
182
+ e
183
+ ].concat(me)), typeof Et < "u")
184
+ return Et;
185
+ M && (g = g.slice(0, -1 * M * 2), _ = _.slice(0, -1 * M), e = e.slice(0, -1 * M)), g.push(this.productions_[N[1]][0]), _.push(lt.$), e.push(lt._$), te = ft[g[g.length - 2]][g[g.length - 1]], g.push(te);
186
+ break;
187
+ case 3:
188
+ return !0;
189
+ }
190
+ }
191
+ return !0;
192
+ }, "parse")
193
+ }, Te = /* @__PURE__ */ function() {
194
+ var j = {
195
+ EOF: 1,
196
+ parseError: /* @__PURE__ */ o(function(l, g) {
197
+ if (this.yy.parser)
198
+ this.yy.parser.parseError(l, g);
199
+ else
200
+ throw new Error(l);
201
+ }, "parseError"),
202
+ // resets the lexer, sets new input
203
+ setInput: /* @__PURE__ */ o(function(r, l) {
204
+ return this.yy = l || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
205
+ first_line: 1,
206
+ first_column: 0,
207
+ last_line: 1,
208
+ last_column: 0
209
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
210
+ }, "setInput"),
211
+ // consumes and returns one char from the input
212
+ input: /* @__PURE__ */ o(function() {
213
+ var r = this._input[0];
214
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
215
+ var l = r.match(/(?:\r\n?|\n).*/g);
216
+ return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
217
+ }, "input"),
218
+ // unshifts one char (or a string) into the input
219
+ unput: /* @__PURE__ */ o(function(r) {
220
+ var l = r.length, g = r.split(/(?:\r\n?|\n)/g);
221
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
222
+ var f = this.match.split(/(?:\r\n?|\n)/g);
223
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), g.length - 1 && (this.yylineno -= g.length - 1);
224
+ var _ = this.yylloc.range;
225
+ return this.yylloc = {
226
+ first_line: this.yylloc.first_line,
227
+ last_line: this.yylineno + 1,
228
+ first_column: this.yylloc.first_column,
229
+ last_column: g ? (g.length === f.length ? this.yylloc.first_column : 0) + f[f.length - g.length].length - g[0].length : this.yylloc.first_column - l
230
+ }, this.options.ranges && (this.yylloc.range = [_[0], _[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
231
+ }, "unput"),
232
+ // When called from action, caches matched text and appends it on next action
233
+ more: /* @__PURE__ */ o(function() {
234
+ return this._more = !0, this;
235
+ }, "more"),
236
+ // 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.
237
+ reject: /* @__PURE__ */ o(function() {
238
+ if (this.options.backtrack_lexer)
239
+ this._backtrack = !0;
240
+ else
241
+ 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).
242
+ ` + this.showPosition(), {
243
+ text: "",
244
+ token: null,
245
+ line: this.yylineno
246
+ });
247
+ return this;
248
+ }, "reject"),
249
+ // retain first n characters of the match
250
+ less: /* @__PURE__ */ o(function(r) {
251
+ this.unput(this.match.slice(r));
252
+ }, "less"),
253
+ // displays already matched input, i.e. for error messages
254
+ pastInput: /* @__PURE__ */ o(function() {
255
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
256
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
257
+ }, "pastInput"),
258
+ // displays upcoming input, i.e. for error messages
259
+ upcomingInput: /* @__PURE__ */ o(function() {
260
+ var r = this.match;
261
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
262
+ }, "upcomingInput"),
263
+ // displays the character position where the lexing error occurred, i.e. for error messages
264
+ showPosition: /* @__PURE__ */ o(function() {
265
+ var r = this.pastInput(), l = new Array(r.length + 1).join("-");
266
+ return r + this.upcomingInput() + `
267
+ ` + l + "^";
268
+ }, "showPosition"),
269
+ // test the lexed token: return FALSE when not a match, otherwise return token
270
+ test_match: /* @__PURE__ */ o(function(r, l) {
271
+ var g, f, _;
272
+ if (this.options.backtrack_lexer && (_ = {
273
+ yylineno: this.yylineno,
274
+ yylloc: {
275
+ first_line: this.yylloc.first_line,
276
+ last_line: this.last_line,
277
+ first_column: this.yylloc.first_column,
278
+ last_column: this.yylloc.last_column
279
+ },
280
+ yytext: this.yytext,
281
+ match: this.match,
282
+ matches: this.matches,
283
+ matched: this.matched,
284
+ yyleng: this.yyleng,
285
+ offset: this.offset,
286
+ _more: this._more,
287
+ _input: this._input,
288
+ yy: this.yy,
289
+ conditionStack: this.conditionStack.slice(0),
290
+ done: this.done
291
+ }, this.options.ranges && (_.yylloc.range = this.yylloc.range.slice(0))), f = r[0].match(/(?:\r\n?|\n).*/g), f && (this.yylineno += f.length), this.yylloc = {
292
+ first_line: this.yylloc.last_line,
293
+ last_line: this.yylineno + 1,
294
+ first_column: this.yylloc.last_column,
295
+ last_column: f ? f[f.length - 1].length - f[f.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
296
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], g = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), g)
297
+ return g;
298
+ if (this._backtrack) {
299
+ for (var e in _)
300
+ this[e] = _[e];
301
+ return !1;
302
+ }
303
+ return !1;
304
+ }, "test_match"),
305
+ // return next match in input
306
+ next: /* @__PURE__ */ o(function() {
307
+ if (this.done)
308
+ return this.EOF;
309
+ this._input || (this.done = !0);
310
+ var r, l, g, f;
311
+ this._more || (this.yytext = "", this.match = "");
312
+ for (var _ = this._currentRules(), e = 0; e < _.length; e++)
313
+ if (g = this._input.match(this.rules[_[e]]), g && (!l || g[0].length > l[0].length)) {
314
+ if (l = g, f = e, this.options.backtrack_lexer) {
315
+ if (r = this.test_match(g, _[e]), r !== !1)
316
+ return r;
317
+ if (this._backtrack) {
318
+ l = !1;
319
+ continue;
320
+ } else
321
+ return !1;
322
+ } else if (!this.options.flex)
323
+ break;
324
+ }
325
+ return l ? (r = this.test_match(l, _[f]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
326
+ ` + this.showPosition(), {
327
+ text: "",
328
+ token: null,
329
+ line: this.yylineno
330
+ });
331
+ }, "next"),
332
+ // return next match that has a token
333
+ lex: /* @__PURE__ */ o(function() {
334
+ var l = this.next();
335
+ return l || this.lex();
336
+ }, "lex"),
337
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
338
+ begin: /* @__PURE__ */ o(function(l) {
339
+ this.conditionStack.push(l);
340
+ }, "begin"),
341
+ // pop the previously active lexer condition state off the condition stack
342
+ popState: /* @__PURE__ */ o(function() {
343
+ var l = this.conditionStack.length - 1;
344
+ return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
345
+ }, "popState"),
346
+ // produce the lexer rule set which is active for the currently active lexer condition state
347
+ _currentRules: /* @__PURE__ */ o(function() {
348
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
349
+ }, "_currentRules"),
350
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
351
+ topState: /* @__PURE__ */ o(function(l) {
352
+ return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
353
+ }, "topState"),
354
+ // alias for begin(condition)
355
+ pushState: /* @__PURE__ */ o(function(l) {
356
+ this.begin(l);
357
+ }, "pushState"),
358
+ // return the number of states currently on the stack
359
+ stateStackSize: /* @__PURE__ */ o(function() {
360
+ return this.conditionStack.length;
361
+ }, "stateStackSize"),
362
+ options: { "case-insensitive": !0 },
363
+ performAction: /* @__PURE__ */ o(function(l, g, f, _) {
364
+ switch (f) {
365
+ case 0:
366
+ break;
367
+ case 1:
368
+ break;
369
+ case 2:
370
+ return 55;
371
+ case 3:
372
+ break;
373
+ case 4:
374
+ return this.begin("title"), 35;
375
+ case 5:
376
+ return this.popState(), "title_value";
377
+ case 6:
378
+ return this.begin("acc_title"), 37;
379
+ case 7:
380
+ return this.popState(), "acc_title_value";
381
+ case 8:
382
+ return this.begin("acc_descr"), 39;
383
+ case 9:
384
+ return this.popState(), "acc_descr_value";
385
+ case 10:
386
+ this.begin("acc_descr_multiline");
387
+ break;
388
+ case 11:
389
+ this.popState();
390
+ break;
391
+ case 12:
392
+ return "acc_descr_multiline_value";
393
+ case 13:
394
+ return 48;
395
+ case 14:
396
+ return 50;
397
+ case 15:
398
+ return 49;
399
+ case 16:
400
+ return 51;
401
+ case 17:
402
+ return 52;
403
+ case 18:
404
+ return 53;
405
+ case 19:
406
+ return 54;
407
+ case 20:
408
+ return 25;
409
+ case 21:
410
+ this.begin("md_string");
411
+ break;
412
+ case 22:
413
+ return "MD_STR";
414
+ case 23:
415
+ this.popState();
416
+ break;
417
+ case 24:
418
+ this.begin("string");
419
+ break;
420
+ case 25:
421
+ this.popState();
422
+ break;
423
+ case 26:
424
+ return "STR";
425
+ case 27:
426
+ this.begin("class_name");
427
+ break;
428
+ case 28:
429
+ return this.popState(), 47;
430
+ case 29:
431
+ return this.begin("point_start"), 44;
432
+ case 30:
433
+ return this.begin("point_x"), 45;
434
+ case 31:
435
+ this.popState();
436
+ break;
437
+ case 32:
438
+ this.popState(), this.begin("point_y");
439
+ break;
440
+ case 33:
441
+ return this.popState(), 46;
442
+ case 34:
443
+ return 28;
444
+ case 35:
445
+ return 4;
446
+ case 36:
447
+ return 11;
448
+ case 37:
449
+ return 64;
450
+ case 38:
451
+ return 10;
452
+ case 39:
453
+ return 65;
454
+ case 40:
455
+ return 65;
456
+ case 41:
457
+ return 14;
458
+ case 42:
459
+ return 13;
460
+ case 43:
461
+ return 67;
462
+ case 44:
463
+ return 66;
464
+ case 45:
465
+ return 12;
466
+ case 46:
467
+ return 8;
468
+ case 47:
469
+ return 5;
470
+ case 48:
471
+ return 18;
472
+ case 49:
473
+ return 56;
474
+ case 50:
475
+ return 63;
476
+ case 51:
477
+ return 57;
478
+ }
479
+ }, "anonymous"),
480
+ 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, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
481
+ conditions: { class_name: { rules: [28], inclusive: !1 }, point_y: { rules: [33], inclusive: !1 }, point_x: { rules: [32], inclusive: !1 }, point_start: { rules: [30, 31], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, title: { rules: [5], inclusive: !1 }, md_string: { rules: [22, 23], inclusive: !1 }, string: { rules: [25, 26], inclusive: !1 }, 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], inclusive: !0 } }
482
+ };
483
+ return j;
484
+ }();
485
+ vt.lexer = Te;
486
+ function qt() {
487
+ this.yy = {};
488
+ }
489
+ return o(qt, "Parser"), qt.prototype = vt, vt.Parser = qt, new qt();
490
+ }();
491
+ Vt.parser = Vt;
492
+ var De = Vt, V = _e(), gt, ze = (gt = class {
493
+ constructor() {
494
+ this.classes = /* @__PURE__ */ new Map(), this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData();
495
+ }
496
+ getDefaultData() {
497
+ return {
498
+ titleText: "",
499
+ quadrant1Text: "",
500
+ quadrant2Text: "",
501
+ quadrant3Text: "",
502
+ quadrant4Text: "",
503
+ xAxisLeftText: "",
504
+ xAxisRightText: "",
505
+ yAxisBottomText: "",
506
+ yAxisTopText: "",
507
+ points: []
508
+ };
509
+ }
510
+ getDefaultConfig() {
511
+ var n, u, c, h, p, y, S, a, A, d, T, q, m, b, x, O, Y, G;
512
+ return {
513
+ showXAxis: !0,
514
+ showYAxis: !0,
515
+ showTitle: !0,
516
+ chartHeight: ((n = D.quadrantChart) == null ? void 0 : n.chartWidth) || 500,
517
+ chartWidth: ((u = D.quadrantChart) == null ? void 0 : u.chartHeight) || 500,
518
+ titlePadding: ((c = D.quadrantChart) == null ? void 0 : c.titlePadding) || 10,
519
+ titleFontSize: ((h = D.quadrantChart) == null ? void 0 : h.titleFontSize) || 20,
520
+ quadrantPadding: ((p = D.quadrantChart) == null ? void 0 : p.quadrantPadding) || 5,
521
+ xAxisLabelPadding: ((y = D.quadrantChart) == null ? void 0 : y.xAxisLabelPadding) || 5,
522
+ yAxisLabelPadding: ((S = D.quadrantChart) == null ? void 0 : S.yAxisLabelPadding) || 5,
523
+ xAxisLabelFontSize: ((a = D.quadrantChart) == null ? void 0 : a.xAxisLabelFontSize) || 16,
524
+ yAxisLabelFontSize: ((A = D.quadrantChart) == null ? void 0 : A.yAxisLabelFontSize) || 16,
525
+ quadrantLabelFontSize: ((d = D.quadrantChart) == null ? void 0 : d.quadrantLabelFontSize) || 16,
526
+ quadrantTextTopPadding: ((T = D.quadrantChart) == null ? void 0 : T.quadrantTextTopPadding) || 5,
527
+ pointTextPadding: ((q = D.quadrantChart) == null ? void 0 : q.pointTextPadding) || 5,
528
+ pointLabelFontSize: ((m = D.quadrantChart) == null ? void 0 : m.pointLabelFontSize) || 12,
529
+ pointRadius: ((b = D.quadrantChart) == null ? void 0 : b.pointRadius) || 5,
530
+ xAxisPosition: ((x = D.quadrantChart) == null ? void 0 : x.xAxisPosition) || "top",
531
+ yAxisPosition: ((O = D.quadrantChart) == null ? void 0 : O.yAxisPosition) || "left",
532
+ quadrantInternalBorderStrokeWidth: ((Y = D.quadrantChart) == null ? void 0 : Y.quadrantInternalBorderStrokeWidth) || 1,
533
+ quadrantExternalBorderStrokeWidth: ((G = D.quadrantChart) == null ? void 0 : G.quadrantExternalBorderStrokeWidth) || 2
534
+ };
535
+ }
536
+ getDefaultThemeConfig() {
537
+ return {
538
+ quadrant1Fill: V.quadrant1Fill,
539
+ quadrant2Fill: V.quadrant2Fill,
540
+ quadrant3Fill: V.quadrant3Fill,
541
+ quadrant4Fill: V.quadrant4Fill,
542
+ quadrant1TextFill: V.quadrant1TextFill,
543
+ quadrant2TextFill: V.quadrant2TextFill,
544
+ quadrant3TextFill: V.quadrant3TextFill,
545
+ quadrant4TextFill: V.quadrant4TextFill,
546
+ quadrantPointFill: V.quadrantPointFill,
547
+ quadrantPointTextFill: V.quadrantPointTextFill,
548
+ quadrantXAxisTextFill: V.quadrantXAxisTextFill,
549
+ quadrantYAxisTextFill: V.quadrantYAxisTextFill,
550
+ quadrantTitleFill: V.quadrantTitleFill,
551
+ quadrantInternalBorderStrokeFill: V.quadrantInternalBorderStrokeFill,
552
+ quadrantExternalBorderStrokeFill: V.quadrantExternalBorderStrokeFill
553
+ };
554
+ }
555
+ clear() {
556
+ this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), this.classes = /* @__PURE__ */ new Map(), At.info("clear called");
557
+ }
558
+ setData(n) {
559
+ this.data = { ...this.data, ...n };
560
+ }
561
+ addPoints(n) {
562
+ this.data.points = [...n, ...this.data.points];
563
+ }
564
+ addClass(n, u) {
565
+ this.classes.set(n, u);
566
+ }
567
+ setConfig(n) {
568
+ At.trace("setConfig called with: ", n), this.config = { ...this.config, ...n };
569
+ }
570
+ setThemeConfig(n) {
571
+ At.trace("setThemeConfig called with: ", n), this.themeConfig = { ...this.themeConfig, ...n };
572
+ }
573
+ calculateSpace(n, u, c, h) {
574
+ const p = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, y = {
575
+ top: n === "top" && u ? p : 0,
576
+ bottom: n === "bottom" && u ? p : 0
577
+ }, S = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, a = {
578
+ left: this.config.yAxisPosition === "left" && c ? S : 0,
579
+ right: this.config.yAxisPosition === "right" && c ? S : 0
580
+ }, A = this.config.titleFontSize + this.config.titlePadding * 2, d = {
581
+ top: h ? A : 0
582
+ }, T = this.config.quadrantPadding + a.left, q = this.config.quadrantPadding + y.top + d.top, m = this.config.chartWidth - this.config.quadrantPadding * 2 - a.left - a.right, b = this.config.chartHeight - this.config.quadrantPadding * 2 - y.top - y.bottom - d.top, x = m / 2, O = b / 2;
583
+ return {
584
+ xAxisSpace: y,
585
+ yAxisSpace: a,
586
+ titleSpace: d,
587
+ quadrantSpace: {
588
+ quadrantLeft: T,
589
+ quadrantTop: q,
590
+ quadrantWidth: m,
591
+ quadrantHalfWidth: x,
592
+ quadrantHeight: b,
593
+ quadrantHalfHeight: O
594
+ }
595
+ };
596
+ }
597
+ getAxisLabels(n, u, c, h) {
598
+ const { quadrantSpace: p, titleSpace: y } = h, {
599
+ quadrantHalfHeight: S,
600
+ quadrantHeight: a,
601
+ quadrantLeft: A,
602
+ quadrantHalfWidth: d,
603
+ quadrantTop: T,
604
+ quadrantWidth: q
605
+ } = p, m = !!this.data.xAxisRightText, b = !!this.data.yAxisTopText, x = [];
606
+ return this.data.xAxisLeftText && u && x.push({
607
+ text: this.data.xAxisLeftText,
608
+ fill: this.themeConfig.quadrantXAxisTextFill,
609
+ x: A + (m ? d / 2 : 0),
610
+ y: n === "top" ? this.config.xAxisLabelPadding + y.top : this.config.xAxisLabelPadding + T + a + this.config.quadrantPadding,
611
+ fontSize: this.config.xAxisLabelFontSize,
612
+ verticalPos: m ? "center" : "left",
613
+ horizontalPos: "top",
614
+ rotation: 0
615
+ }), this.data.xAxisRightText && u && x.push({
616
+ text: this.data.xAxisRightText,
617
+ fill: this.themeConfig.quadrantXAxisTextFill,
618
+ x: A + d + (m ? d / 2 : 0),
619
+ y: n === "top" ? this.config.xAxisLabelPadding + y.top : this.config.xAxisLabelPadding + T + a + this.config.quadrantPadding,
620
+ fontSize: this.config.xAxisLabelFontSize,
621
+ verticalPos: m ? "center" : "left",
622
+ horizontalPos: "top",
623
+ rotation: 0
624
+ }), this.data.yAxisBottomText && c && x.push({
625
+ text: this.data.yAxisBottomText,
626
+ fill: this.themeConfig.quadrantYAxisTextFill,
627
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + A + q + this.config.quadrantPadding,
628
+ y: T + a - (b ? S / 2 : 0),
629
+ fontSize: this.config.yAxisLabelFontSize,
630
+ verticalPos: b ? "center" : "left",
631
+ horizontalPos: "top",
632
+ rotation: -90
633
+ }), this.data.yAxisTopText && c && x.push({
634
+ text: this.data.yAxisTopText,
635
+ fill: this.themeConfig.quadrantYAxisTextFill,
636
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + A + q + this.config.quadrantPadding,
637
+ y: T + S - (b ? S / 2 : 0),
638
+ fontSize: this.config.yAxisLabelFontSize,
639
+ verticalPos: b ? "center" : "left",
640
+ horizontalPos: "top",
641
+ rotation: -90
642
+ }), x;
643
+ }
644
+ getQuadrants(n) {
645
+ const { quadrantSpace: u } = n, { quadrantHalfHeight: c, quadrantLeft: h, quadrantHalfWidth: p, quadrantTop: y } = u, S = [
646
+ {
647
+ text: {
648
+ text: this.data.quadrant1Text,
649
+ fill: this.themeConfig.quadrant1TextFill,
650
+ x: 0,
651
+ y: 0,
652
+ fontSize: this.config.quadrantLabelFontSize,
653
+ verticalPos: "center",
654
+ horizontalPos: "middle",
655
+ rotation: 0
656
+ },
657
+ x: h + p,
658
+ y,
659
+ width: p,
660
+ height: c,
661
+ fill: this.themeConfig.quadrant1Fill
662
+ },
663
+ {
664
+ text: {
665
+ text: this.data.quadrant2Text,
666
+ fill: this.themeConfig.quadrant2TextFill,
667
+ x: 0,
668
+ y: 0,
669
+ fontSize: this.config.quadrantLabelFontSize,
670
+ verticalPos: "center",
671
+ horizontalPos: "middle",
672
+ rotation: 0
673
+ },
674
+ x: h,
675
+ y,
676
+ width: p,
677
+ height: c,
678
+ fill: this.themeConfig.quadrant2Fill
679
+ },
680
+ {
681
+ text: {
682
+ text: this.data.quadrant3Text,
683
+ fill: this.themeConfig.quadrant3TextFill,
684
+ x: 0,
685
+ y: 0,
686
+ fontSize: this.config.quadrantLabelFontSize,
687
+ verticalPos: "center",
688
+ horizontalPos: "middle",
689
+ rotation: 0
690
+ },
691
+ x: h,
692
+ y: y + c,
693
+ width: p,
694
+ height: c,
695
+ fill: this.themeConfig.quadrant3Fill
696
+ },
697
+ {
698
+ text: {
699
+ text: this.data.quadrant4Text,
700
+ fill: this.themeConfig.quadrant4TextFill,
701
+ x: 0,
702
+ y: 0,
703
+ fontSize: this.config.quadrantLabelFontSize,
704
+ verticalPos: "center",
705
+ horizontalPos: "middle",
706
+ rotation: 0
707
+ },
708
+ x: h + p,
709
+ y: y + c,
710
+ width: p,
711
+ height: c,
712
+ fill: this.themeConfig.quadrant4Fill
713
+ }
714
+ ];
715
+ for (const a of S)
716
+ a.text.x = a.x + a.width / 2, this.data.points.length === 0 ? (a.text.y = a.y + a.height / 2, a.text.horizontalPos = "middle") : (a.text.y = a.y + this.config.quadrantTextTopPadding, a.text.horizontalPos = "top");
717
+ return S;
718
+ }
719
+ getQuadrantPoints(n) {
720
+ const { quadrantSpace: u } = n, { quadrantHeight: c, quadrantLeft: h, quadrantTop: p, quadrantWidth: y } = u, S = ee().domain([0, 1]).range([h, y + h]), a = ee().domain([0, 1]).range([c + p, p]);
721
+ return this.data.points.map((d) => {
722
+ const T = this.classes.get(d.className);
723
+ return T && (d = { ...T, ...d }), {
724
+ x: S(d.x),
725
+ y: a(d.y),
726
+ fill: d.color ?? this.themeConfig.quadrantPointFill,
727
+ radius: d.radius ?? this.config.pointRadius,
728
+ text: {
729
+ text: d.text,
730
+ fill: this.themeConfig.quadrantPointTextFill,
731
+ x: S(d.x),
732
+ y: a(d.y) + this.config.pointTextPadding,
733
+ verticalPos: "center",
734
+ horizontalPos: "top",
735
+ fontSize: this.config.pointLabelFontSize,
736
+ rotation: 0
737
+ },
738
+ strokeColor: d.strokeColor ?? this.themeConfig.quadrantPointFill,
739
+ strokeWidth: d.strokeWidth ?? "0px"
740
+ };
741
+ });
742
+ }
743
+ getBorders(n) {
744
+ const u = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: c } = n, {
745
+ quadrantHalfHeight: h,
746
+ quadrantHeight: p,
747
+ quadrantLeft: y,
748
+ quadrantHalfWidth: S,
749
+ quadrantTop: a,
750
+ quadrantWidth: A
751
+ } = c;
752
+ return [
753
+ // top border
754
+ {
755
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
756
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
757
+ x1: y - u,
758
+ y1: a,
759
+ x2: y + A + u,
760
+ y2: a
761
+ },
762
+ // right border
763
+ {
764
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
765
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
766
+ x1: y + A,
767
+ y1: a + u,
768
+ x2: y + A,
769
+ y2: a + p - u
770
+ },
771
+ // bottom border
772
+ {
773
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
774
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
775
+ x1: y - u,
776
+ y1: a + p,
777
+ x2: y + A + u,
778
+ y2: a + p
779
+ },
780
+ // left border
781
+ {
782
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
783
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
784
+ x1: y,
785
+ y1: a + u,
786
+ x2: y,
787
+ y2: a + p - u
788
+ },
789
+ // vertical inner border
790
+ {
791
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
792
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
793
+ x1: y + S,
794
+ y1: a + u,
795
+ x2: y + S,
796
+ y2: a + p - u
797
+ },
798
+ // horizontal inner border
799
+ {
800
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
801
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
802
+ x1: y + u,
803
+ y1: a + h,
804
+ x2: y + A - u,
805
+ y2: a + h
806
+ }
807
+ ];
808
+ }
809
+ getTitle(n) {
810
+ if (n)
811
+ return {
812
+ text: this.data.titleText,
813
+ fill: this.themeConfig.quadrantTitleFill,
814
+ fontSize: this.config.titleFontSize,
815
+ horizontalPos: "top",
816
+ verticalPos: "center",
817
+ rotation: 0,
818
+ y: this.config.titlePadding,
819
+ x: this.config.chartWidth / 2
820
+ };
821
+ }
822
+ build() {
823
+ const n = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), u = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), c = this.config.showTitle && !!this.data.titleText, h = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, p = this.calculateSpace(h, n, u, c);
824
+ return {
825
+ points: this.getQuadrantPoints(p),
826
+ quadrants: this.getQuadrants(p),
827
+ axisLabels: this.getAxisLabels(h, n, u, p),
828
+ borderLines: this.getBorders(p),
829
+ title: this.getTitle(c)
830
+ };
831
+ }
832
+ }, o(gt, "QuadrantBuilder"), gt), pt, _t = (pt = class extends Error {
833
+ constructor(n, u, c) {
834
+ super(`value for ${n} ${u} is invalid, please use a valid ${c}`), this.name = "InvalidStyleError";
835
+ }
836
+ }, o(pt, "InvalidStyleError"), pt);
837
+ function It(t) {
838
+ return !/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t);
839
+ }
840
+ o(It, "validateHexCode");
841
+ function ae(t) {
842
+ return !/^\d+$/.test(t);
843
+ }
844
+ o(ae, "validateNumber");
845
+ function ne(t) {
846
+ return !/^\d+px$/.test(t);
847
+ }
848
+ o(ne, "validateSizeInPixels");
849
+ var Ve = wt();
850
+ function Q(t) {
851
+ return Ae(t.trim(), Ve);
852
+ }
853
+ o(Q, "textSanitizer");
854
+ var z = new ze();
855
+ function se(t) {
856
+ z.setData({ quadrant1Text: Q(t.text) });
857
+ }
858
+ o(se, "setQuadrant1Text");
859
+ function re(t) {
860
+ z.setData({ quadrant2Text: Q(t.text) });
861
+ }
862
+ o(re, "setQuadrant2Text");
863
+ function oe(t) {
864
+ z.setData({ quadrant3Text: Q(t.text) });
865
+ }
866
+ o(oe, "setQuadrant3Text");
867
+ function le(t) {
868
+ z.setData({ quadrant4Text: Q(t.text) });
869
+ }
870
+ o(le, "setQuadrant4Text");
871
+ function he(t) {
872
+ z.setData({ xAxisLeftText: Q(t.text) });
873
+ }
874
+ o(he, "setXAxisLeftText");
875
+ function ce(t) {
876
+ z.setData({ xAxisRightText: Q(t.text) });
877
+ }
878
+ o(ce, "setXAxisRightText");
879
+ function de(t) {
880
+ z.setData({ yAxisTopText: Q(t.text) });
881
+ }
882
+ o(de, "setYAxisTopText");
883
+ function ue(t) {
884
+ z.setData({ yAxisBottomText: Q(t.text) });
885
+ }
886
+ o(ue, "setYAxisBottomText");
887
+ function kt(t) {
888
+ const n = {};
889
+ for (const u of t) {
890
+ const [c, h] = u.trim().split(/\s*:\s*/);
891
+ if (c === "radius") {
892
+ if (ae(h))
893
+ throw new _t(c, h, "number");
894
+ n.radius = parseInt(h);
895
+ } else if (c === "color") {
896
+ if (It(h))
897
+ throw new _t(c, h, "hex code");
898
+ n.color = h;
899
+ } else if (c === "stroke-color") {
900
+ if (It(h))
901
+ throw new _t(c, h, "hex code");
902
+ n.strokeColor = h;
903
+ } else if (c === "stroke-width") {
904
+ if (ne(h))
905
+ throw new _t(c, h, "number of pixels (eg. 10px)");
906
+ n.strokeWidth = h;
907
+ } else
908
+ throw new Error(`style named ${c} is not supported.`);
909
+ }
910
+ return n;
911
+ }
912
+ o(kt, "parseStyles");
913
+ function xe(t, n, u, c, h) {
914
+ const p = kt(h);
915
+ z.addPoints([
916
+ {
917
+ x: u,
918
+ y: c,
919
+ text: Q(t.text),
920
+ className: n,
921
+ ...p
922
+ }
923
+ ]);
924
+ }
925
+ o(xe, "addPoint");
926
+ function fe(t, n) {
927
+ z.addClass(t, kt(n));
928
+ }
929
+ o(fe, "addClass");
930
+ function ge(t) {
931
+ z.setConfig({ chartWidth: t });
932
+ }
933
+ o(ge, "setWidth");
934
+ function pe(t) {
935
+ z.setConfig({ chartHeight: t });
936
+ }
937
+ o(pe, "setHeight");
938
+ function ye() {
939
+ const t = wt(), { themeVariables: n, quadrantChart: u } = t;
940
+ return u && z.setConfig(u), z.setThemeConfig({
941
+ quadrant1Fill: n.quadrant1Fill,
942
+ quadrant2Fill: n.quadrant2Fill,
943
+ quadrant3Fill: n.quadrant3Fill,
944
+ quadrant4Fill: n.quadrant4Fill,
945
+ quadrant1TextFill: n.quadrant1TextFill,
946
+ quadrant2TextFill: n.quadrant2TextFill,
947
+ quadrant3TextFill: n.quadrant3TextFill,
948
+ quadrant4TextFill: n.quadrant4TextFill,
949
+ quadrantPointFill: n.quadrantPointFill,
950
+ quadrantPointTextFill: n.quadrantPointTextFill,
951
+ quadrantXAxisTextFill: n.quadrantXAxisTextFill,
952
+ quadrantYAxisTextFill: n.quadrantYAxisTextFill,
953
+ quadrantExternalBorderStrokeFill: n.quadrantExternalBorderStrokeFill,
954
+ quadrantInternalBorderStrokeFill: n.quadrantInternalBorderStrokeFill,
955
+ quadrantTitleFill: n.quadrantTitleFill
956
+ }), z.setData({ titleText: ie() }), z.build();
957
+ }
958
+ o(ye, "getQuadrantData");
959
+ var Ie = /* @__PURE__ */ o(function() {
960
+ z.clear(), Le();
961
+ }, "clear"), we = {
962
+ setWidth: ge,
963
+ setHeight: pe,
964
+ setQuadrant1Text: se,
965
+ setQuadrant2Text: re,
966
+ setQuadrant3Text: oe,
967
+ setQuadrant4Text: le,
968
+ setXAxisLeftText: he,
969
+ setXAxisRightText: ce,
970
+ setYAxisTopText: de,
971
+ setYAxisBottomText: ue,
972
+ parseStyles: kt,
973
+ addPoint: xe,
974
+ addClass: fe,
975
+ getQuadrantData: ye,
976
+ clear: Ie,
977
+ setAccTitle: ke,
978
+ getAccTitle: Fe,
979
+ setDiagramTitle: Pe,
980
+ getDiagramTitle: ie,
981
+ getAccDescription: ve,
982
+ setAccDescription: Ce
983
+ }, Be = /* @__PURE__ */ o((t, n, u, c) => {
984
+ var dt, ut, xt;
985
+ function h(i) {
986
+ return i === "top" ? "hanging" : "middle";
987
+ }
988
+ o(h, "getDominantBaseLine");
989
+ function p(i) {
990
+ return i === "left" ? "start" : "middle";
991
+ }
992
+ o(p, "getTextAnchor");
993
+ function y(i) {
994
+ return `translate(${i.x}, ${i.y}) rotate(${i.rotation || 0})`;
995
+ }
996
+ o(y, "getTransformation");
997
+ const S = wt();
998
+ At.debug(`Rendering quadrant chart
999
+ ` + t);
1000
+ const a = S.securityLevel;
1001
+ let A;
1002
+ a === "sandbox" && (A = zt("#i" + n));
1003
+ const T = (a === "sandbox" ? zt(A.nodes()[0].contentDocument.body) : zt("body")).select(`[id="${n}"]`), q = T.append("g").attr("class", "main"), m = ((dt = S.quadrantChart) == null ? void 0 : dt.chartWidth) ?? 500, b = ((ut = S.quadrantChart) == null ? void 0 : ut.chartHeight) ?? 500;
1004
+ Ee(T, b, m, ((xt = S.quadrantChart) == null ? void 0 : xt.useMaxWidth) ?? !0), T.attr("viewBox", "0 0 " + m + " " + b), c.db.setHeight(b), c.db.setWidth(m);
1005
+ const x = c.db.getQuadrantData(), O = q.append("g").attr("class", "quadrants"), Y = q.append("g").attr("class", "border"), G = q.append("g").attr("class", "data-points"), yt = q.append("g").attr("class", "labels"), Tt = q.append("g").attr("class", "title");
1006
+ x.title && Tt.append("text").attr("x", 0).attr("y", 0).attr("fill", x.title.fill).attr("font-size", x.title.fontSize).attr("dominant-baseline", h(x.title.horizontalPos)).attr("text-anchor", p(x.title.verticalPos)).attr("transform", y(x.title)).text(x.title.text), x.borderLines && Y.selectAll("line").data(x.borderLines).enter().append("line").attr("x1", (i) => i.x1).attr("y1", (i) => i.y1).attr("x2", (i) => i.x2).attr("y2", (i) => i.y2).style("stroke", (i) => i.strokeFill).style("stroke-width", (i) => i.strokeWidth);
1007
+ const ht = O.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class", "quadrant");
1008
+ ht.append("rect").attr("x", (i) => i.x).attr("y", (i) => i.y).attr("width", (i) => i.width).attr("height", (i) => i.height).attr("fill", (i) => i.fill), ht.append("text").attr("x", 0).attr("y", 0).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
1009
+ "dominant-baseline",
1010
+ (i) => h(i.text.horizontalPos)
1011
+ ).attr("text-anchor", (i) => p(i.text.verticalPos)).attr("transform", (i) => y(i.text)).text((i) => i.text.text), yt.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class", "label").append("text").attr("x", 0).attr("y", 0).text((i) => i.text).attr("fill", (i) => i.fill).attr("font-size", (i) => i.fontSize).attr("dominant-baseline", (i) => h(i.horizontalPos)).attr("text-anchor", (i) => p(i.verticalPos)).attr("transform", (i) => y(i));
1012
+ const ct = G.selectAll("g.data-point").data(x.points).enter().append("g").attr("class", "data-point");
1013
+ ct.append("circle").attr("cx", (i) => i.x).attr("cy", (i) => i.y).attr("r", (i) => i.radius).attr("fill", (i) => i.fill).attr("stroke", (i) => i.strokeColor).attr("stroke-width", (i) => i.strokeWidth), ct.append("text").attr("x", 0).attr("y", 0).text((i) => i.text.text).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
1014
+ "dominant-baseline",
1015
+ (i) => h(i.text.horizontalPos)
1016
+ ).attr("text-anchor", (i) => p(i.text.verticalPos)).attr("transform", (i) => y(i.text));
1017
+ }, "draw"), Re = {
1018
+ draw: Be
1019
+ }, Oe = {
1020
+ parser: De,
1021
+ db: we,
1022
+ renderer: Re,
1023
+ styles: /* @__PURE__ */ o(() => "", "styles")
1024
+ };
1025
+ export {
1026
+ Oe as diagram
1027
+ };