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