@draftably/editor 0.1.0 → 0.2.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/README.md +4 -5
- package/dist/assets/{engine.worker-DmHew5f6.js → engine.worker-DwN9io_m.js} +2765 -2722
- package/dist/element.js +1 -1
- package/dist/index.js +19553 -2
- package/dist/types/src/components/controls.d.ts +8 -5
- package/dist/types/src/state/canvas-commands.d.ts +169 -0
- package/dist/types/src/state/canvas-keyboard.d.ts +15 -0
- package/dist/types/src/state/links.d.ts +4 -1
- package/dist/types/src/state/workspace.d.ts +3 -0
- package/package.json +1 -1
- package/dist/assets/import-d2.worker-CnXfFXoa.js +0 -5395
- package/dist/chunks/abnfDiagram-WEYOIA3C-llcpthp5.js +0 -87
- package/dist/chunks/arc-rJj0TtXf.js +0 -83
- package/dist/chunks/architectureDiagram-ZHVYKT53-CfiXg0Lk.js +0 -4781
- package/dist/chunks/blockDiagram-RJAE7QA3-CO-14jWz.js +0 -1440
- package/dist/chunks/browser-iNhbPsGc.js +0 -40
- package/dist/chunks/c4Diagram-XDPPPE54-DYKuxA4n.js +0 -1524
- package/dist/chunks/channel-qMvPU6eH.js +0 -5
- package/dist/chunks/chunk-2E7WHVMD-BEZwsFS3.js +0 -670
- package/dist/chunks/chunk-2Q5K7J3B-gqtzQ8ux.js +0 -18
- package/dist/chunks/chunk-4EMNKR2T-MC54CXVe.js +0 -262
- package/dist/chunks/chunk-55XCU76K-DkZUAaqC.js +0 -68
- package/dist/chunks/chunk-5VM5RSS4-CaKe4sjM.js +0 -19
- package/dist/chunks/chunk-JWPE2WC7-CnAFS2xF.js +0 -8
- package/dist/chunks/chunk-VQ5W62QI-CXRv7FiX.js +0 -19
- package/dist/chunks/chunk-XXDRQBXY-B-AMQgD2.js +0 -8
- package/dist/chunks/chunk-ZCHMQSOR-BALpdc3g.js +0 -451
- package/dist/chunks/classDiagram-v2-4MYWR3UA-wPjgJTg4.js +0 -1570
- package/dist/chunks/cose-bilkent-JH36ORCC-Bbh5ggBc.js +0 -2608
- package/dist/chunks/cynefin-EF2NZ3EQ-Bt6b88hY.js +0 -22361
- package/dist/chunks/cynefinDiagram-WF24UDRP-BHWZvxoF.js +0 -299
- package/dist/chunks/cytoscape.esm-CRsF_JA3.js +0 -18791
- package/dist/chunks/dagre-NK4GIZVX-Cz37yPrT.js +0 -2157
- package/dist/chunks/defaultLocale-BgPVtth8.js +0 -171
- package/dist/chunks/diagram-CBK3MWTC-Q2R6FJ0B.js +0 -531
- package/dist/chunks/diagram-I5XIIV2D-a2Kdu_wA.js +0 -153
- package/dist/chunks/diagram-ODIL2UCW-DTWXxcOn.js +0 -346
- package/dist/chunks/diagram-PFBEJUXE-DIAQQ5KX.js +0 -480
- package/dist/chunks/diagram-RJA3I4VV-BPD0GghS.js +0 -219
- package/dist/chunks/diagram-TYUNFSNR-BmdkONfG.js +0 -2586
- package/dist/chunks/dot-importer-B23jwEkx.js +0 -1547
- package/dist/chunks/ebnfDiagram-V4P3TTPT-C5IKvYlb.js +0 -109
- package/dist/chunks/elk-QONTBCTQ-CtdQFvh2.js +0 -49229
- package/dist/chunks/erDiagram-KYQIGQAA-5wguK9Dx.js +0 -1064
- package/dist/chunks/flowDiagram-IUGLLWBU-BijvFPku.js +0 -1771
- package/dist/chunks/ganttDiagram-R7GPNTJY-BaqGPz-O.js +0 -2729
- package/dist/chunks/gitGraphDiagram-PDYL7XHY-DZfMGyHE.js +0 -815
- package/dist/chunks/graph-CKJmgLki.js +0 -1541
- package/dist/chunks/import-core-C-I1wGfw.js +0 -145
- package/dist/chunks/infoDiagram-MVDRKAX5-C2vH_59e.js +0 -24
- package/dist/chunks/init-DjUOC4st.js +0 -16
- package/dist/chunks/ishikawaDiagram-HPEHV2GE-q149MFlV.js +0 -624
- package/dist/chunks/journeyDiagram-BOSHW7O7-D-2Z3VtR.js +0 -834
- package/dist/chunks/kanban-definition-FNSA4HC5-wvAjV5ub.js +0 -724
- package/dist/chunks/katex-BsrBVQKd.js +0 -11314
- package/dist/chunks/linear-4t7D_ros.js +0 -259
- package/dist/chunks/mermaid-facade-BoLWBerE.js +0 -289
- package/dist/chunks/mermaid-importer-Cgx1IhmR.js +0 -478
- package/dist/chunks/mermaid.core-DXv6D2Sm.js +0 -19244
- package/dist/chunks/mindmap-definition-6OY57UG3-r9wTKul_.js +0 -837
- package/dist/chunks/mount-C1Xk_GQz.js +0 -22131
- package/dist/chunks/ordinal-DfAQgscy.js +0 -61
- package/dist/chunks/pegDiagram-ECIUJNBX-CmKlFWiP.js +0 -95
- package/dist/chunks/pieDiagram-GNMPY74T-DNTw_qan.js +0 -208
- package/dist/chunks/quadrantDiagram-D57K4MC3-CT_tvVub.js +0 -1029
- package/dist/chunks/railroadDiagram-Y72NRBL7-C5TUvZBe.js +0 -77
- package/dist/chunks/requirementDiagram-EQYSW5RA-C_c65aCa.js +0 -889
- package/dist/chunks/sankeyDiagram-SY24JHO5-CKcbizM1.js +0 -859
- package/dist/chunks/sequenceDiagram-BLEHNHQU-GpVnHOjf.js +0 -2972
- package/dist/chunks/sizeCapture-INFHLROL-CToN3JSu.js +0 -46
- package/dist/chunks/stateDiagram-v2-A6IESKWZ-rJYd2FfM.js +0 -1520
- package/dist/chunks/swimlanes-B3ENRKFQ-C7w5pfxG.js +0 -4991
- package/dist/chunks/swimlanesDiagram-AYQRV4AK-BpGY_bvE.js +0 -13
- package/dist/chunks/timeline-definition-JXYKGLGB-ChKFPBKc.js +0 -1058
- package/dist/chunks/usecaseDiagram-WPOLBNNX-skXH8Dcu.js +0 -7945
- package/dist/chunks/vennDiagram-Q3Y3IDCW-C5KknmJf.js +0 -1578
- package/dist/chunks/wardleyDiagram-IVAIDKWA-DY4Lkfpu.js +0 -678
- package/dist/chunks/xychartDiagram-4URNHDU4-BHScsL7h.js +0 -1536
- package/dist/types/src/import/browser.d.ts +0 -3
- package/dist/types/src/import/detect.d.ts +0 -31
- package/dist/types/src/import/dot-importer.d.ts +0 -3
- package/dist/types/src/import/import-core.d.ts +0 -105
- package/dist/types/src/import/mermaid-facade.d.ts +0 -120
- package/dist/types/src/import/mermaid-importer.d.ts +0 -4
- package/dist/types/src/import/mermaid-sequence.d.ts +0 -8
- package/dist/types/src/import/scratch.d.ts +0 -3
- package/dist/types/src/lib/source-hash.d.ts +0 -7
- package/dist/types/src/model/candidates.d.ts +0 -53
- package/dist/types/src/model/examples.d.ts +0 -15
- package/dist/types/src/model/label-hits.d.ts +0 -27
- package/dist/types/src/model/static-scene.d.ts +0 -15
- package/dist/types/src/state/commands.d.ts +0 -529
- package/dist/types/src/state/comparison.d.ts +0 -151
- package/dist/types/src/state/files.d.ts +0 -61
- package/dist/types/src/state/keyboard.d.ts +0 -6
- package/dist/types/src/state/launch.d.ts +0 -61
- package/dist/types/src/state/ui.d.ts +0 -39
|
@@ -1,1029 +0,0 @@
|
|
|
1
|
-
import { s as Se, g as _e, t as ee, q as Ae, a as ke, b as Fe, _ as r, c as Et, l as qt, k as vt, d as Pe, A as ve, O as z, j as Ce, R as Le } from "./mermaid.core-DXv6D2Sm.js";
|
|
2
|
-
import { l as te } from "./linear-4t7D_ros.js";
|
|
3
|
-
var Ct = (function() {
|
|
4
|
-
var t = /* @__PURE__ */ r(function(Y, s, l, u) {
|
|
5
|
-
for (l = l || {}, u = Y.length; u--; l[Y[u]] = s) ;
|
|
6
|
-
return l;
|
|
7
|
-
}, "o"), a = [1, 3], p = [1, 4], f = [1, 5], o = [1, 6], x = [1, 7], _ = [1, 4, 5, 10, 12, 13, 14, 15, 18, 25, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], h = [1, 4, 5, 10, 12, 13, 14, 15, 18, 25, 28, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], c = [55, 56, 57], S = [2, 36], m = [1, 37], b = [1, 36], y = [1, 38], T = [1, 35], q = [1, 43], g = [1, 41], k = [1, 45], ct = [1, 14], dt = [1, 23], ut = [1, 18], xt = [1, 19], ot = [1, 20], bt = [1, 21], lt = [1, 22], i = [1, 24], Dt = [1, 25], zt = [1, 26], Vt = [1, 27], It = [1, 28], wt = [1, 29], U = [1, 32], Q = [1, 33], F = [1, 34], P = [1, 39], v = [1, 40], C = [1, 42], L = [1, 44], H = [1, 63], X = [1, 62], E = [4, 5, 8, 10, 12, 13, 14, 15, 18, 44, 47, 49, 55, 56, 57, 63, 64, 65, 66, 67], Rt = [1, 66], Bt = [1, 67], Nt = [1, 68], Wt = [1, 69], Ut = [1, 70], Qt = [1, 71], Ot = [1, 72], Ht = [1, 73], Xt = [1, 74], Mt = [1, 75], Yt = [1, 76], jt = [1, 77], w = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], K = [1, 91], Z = [1, 92], J = [1, 93], $ = [1, 100], tt = [1, 94], et = [1, 97], it = [1, 95], at = [1, 96], nt = [1, 98], st = [1, 99], St = [1, 103], Gt = [10, 55, 56, 57], N = [4, 5, 6, 8, 10, 11, 13, 17, 18, 19, 20, 55, 56, 57], _t = {
|
|
8
|
-
trace: /* @__PURE__ */ r(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], [58, 1], [59, 1], [59, 1], [59, 1]],
|
|
14
|
-
performAction: /* @__PURE__ */ r(function(s, l, u, d, A, e, ht) {
|
|
15
|
-
var n = e.length - 1;
|
|
16
|
-
switch (A) {
|
|
17
|
-
case 23:
|
|
18
|
-
this.$ = e[n];
|
|
19
|
-
break;
|
|
20
|
-
case 24:
|
|
21
|
-
this.$ = e[n - 1] + "" + e[n];
|
|
22
|
-
break;
|
|
23
|
-
case 26:
|
|
24
|
-
this.$ = e[n - 1] + e[n];
|
|
25
|
-
break;
|
|
26
|
-
case 27:
|
|
27
|
-
this.$ = [e[n].trim()];
|
|
28
|
-
break;
|
|
29
|
-
case 28:
|
|
30
|
-
e[n - 2].push(e[n].trim()), this.$ = e[n - 2];
|
|
31
|
-
break;
|
|
32
|
-
case 29:
|
|
33
|
-
this.$ = e[n - 4], d.addClass(e[n - 2], e[n]);
|
|
34
|
-
break;
|
|
35
|
-
case 37:
|
|
36
|
-
this.$ = [];
|
|
37
|
-
break;
|
|
38
|
-
case 42:
|
|
39
|
-
this.$ = e[n].trim(), d.setDiagramTitle(this.$);
|
|
40
|
-
break;
|
|
41
|
-
case 43:
|
|
42
|
-
this.$ = e[n].trim(), d.setAccTitle(this.$);
|
|
43
|
-
break;
|
|
44
|
-
case 44:
|
|
45
|
-
case 45:
|
|
46
|
-
this.$ = e[n].trim(), d.setAccDescription(this.$);
|
|
47
|
-
break;
|
|
48
|
-
case 46:
|
|
49
|
-
d.addSection(e[n].substr(8)), this.$ = e[n].substr(8);
|
|
50
|
-
break;
|
|
51
|
-
case 47:
|
|
52
|
-
d.addPoint(e[n - 3], "", e[n - 1], e[n], []);
|
|
53
|
-
break;
|
|
54
|
-
case 48:
|
|
55
|
-
d.addPoint(e[n - 4], e[n - 3], e[n - 1], e[n], []);
|
|
56
|
-
break;
|
|
57
|
-
case 49:
|
|
58
|
-
d.addPoint(e[n - 4], "", e[n - 2], e[n - 1], e[n]);
|
|
59
|
-
break;
|
|
60
|
-
case 50:
|
|
61
|
-
d.addPoint(e[n - 5], e[n - 4], e[n - 2], e[n - 1], e[n]);
|
|
62
|
-
break;
|
|
63
|
-
case 51:
|
|
64
|
-
d.setXAxisLeftText(e[n - 2]), d.setXAxisRightText(e[n]);
|
|
65
|
-
break;
|
|
66
|
-
case 52:
|
|
67
|
-
e[n - 1].text += " ⟶ ", d.setXAxisLeftText(e[n - 1]);
|
|
68
|
-
break;
|
|
69
|
-
case 53:
|
|
70
|
-
d.setXAxisLeftText(e[n]);
|
|
71
|
-
break;
|
|
72
|
-
case 54:
|
|
73
|
-
d.setYAxisBottomText(e[n - 2]), d.setYAxisTopText(e[n]);
|
|
74
|
-
break;
|
|
75
|
-
case 55:
|
|
76
|
-
e[n - 1].text += " ⟶ ", d.setYAxisBottomText(e[n - 1]);
|
|
77
|
-
break;
|
|
78
|
-
case 56:
|
|
79
|
-
d.setYAxisBottomText(e[n]);
|
|
80
|
-
break;
|
|
81
|
-
case 57:
|
|
82
|
-
d.setQuadrant1Text(e[n]);
|
|
83
|
-
break;
|
|
84
|
-
case 58:
|
|
85
|
-
d.setQuadrant2Text(e[n]);
|
|
86
|
-
break;
|
|
87
|
-
case 59:
|
|
88
|
-
d.setQuadrant3Text(e[n]);
|
|
89
|
-
break;
|
|
90
|
-
case 60:
|
|
91
|
-
d.setQuadrant4Text(e[n]);
|
|
92
|
-
break;
|
|
93
|
-
case 64:
|
|
94
|
-
this.$ = { text: e[n], type: "text" };
|
|
95
|
-
break;
|
|
96
|
-
case 65:
|
|
97
|
-
this.$ = { text: e[n - 1].text + "" + e[n], type: e[n - 1].type };
|
|
98
|
-
break;
|
|
99
|
-
case 66:
|
|
100
|
-
this.$ = { text: e[n], type: "text" };
|
|
101
|
-
break;
|
|
102
|
-
case 67:
|
|
103
|
-
this.$ = { text: e[n], type: "markdown" };
|
|
104
|
-
break;
|
|
105
|
-
case 68:
|
|
106
|
-
this.$ = e[n];
|
|
107
|
-
break;
|
|
108
|
-
case 69:
|
|
109
|
-
this.$ = e[n - 1] + "" + e[n];
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
}, "anonymous"),
|
|
113
|
-
table: [{ 18: a, 26: 1, 27: 2, 28: p, 55: f, 56: o, 57: x }, { 1: [3] }, { 18: a, 26: 8, 27: 2, 28: p, 55: f, 56: o, 57: x }, { 18: a, 26: 9, 27: 2, 28: p, 55: f, 56: o, 57: x }, t(_, [2, 33], { 29: 10 }), t(h, [2, 61]), t(h, [2, 62]), t(h, [2, 63]), { 1: [2, 30] }, { 1: [2, 31] }, t(c, S, { 30: 11, 31: 12, 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 1: [2, 32], 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 18: ct, 25: dt, 35: ut, 37: xt, 39: ot, 41: bt, 42: lt, 48: i, 50: Dt, 51: zt, 52: Vt, 53: It, 54: wt, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }), t(_, [2, 34]), { 27: 46, 55: f, 56: o, 57: x }, t(c, [2, 37]), t(c, S, { 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 31: 47, 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 18: ct, 25: dt, 35: ut, 37: xt, 39: ot, 41: bt, 42: lt, 48: i, 50: Dt, 51: zt, 52: Vt, 53: It, 54: wt, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 39]), t(c, [2, 40]), t(c, [2, 41]), { 36: [1, 48] }, { 38: [1, 49] }, { 40: [1, 50] }, t(c, [2, 45]), t(c, [2, 46]), { 18: [1, 51] }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 43: 52, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 43: 53, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 43: 54, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 43: 55, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 43: 56, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 43: 57, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 44: [1, 58], 47: [1, 59], 58: 61, 59: 60, 63: F, 64: P, 65: v, 66: C, 67: L }, t(E, [2, 64]), t(E, [2, 66]), t(E, [2, 67]), t(E, [2, 70]), t(E, [2, 71]), t(E, [2, 72]), t(E, [2, 73]), t(E, [2, 74]), t(E, [2, 75]), t(E, [2, 76]), t(E, [2, 77]), t(E, [2, 78]), t(E, [2, 79]), t(E, [2, 80]), t(E, [2, 81]), t(_, [2, 35]), t(c, [2, 38]), t(c, [2, 42]), t(c, [2, 43]), t(c, [2, 44]), { 3: 65, 4: Rt, 5: Bt, 6: Nt, 7: Wt, 8: Ut, 9: Qt, 10: Ot, 11: Ht, 12: Xt, 13: Mt, 14: Yt, 15: jt, 21: 64 }, t(c, [2, 53], { 59: 60, 58: 61, 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 49: [1, 78], 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 56], { 59: 60, 58: 61, 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 49: [1, 79], 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 57], { 59: 60, 58: 61, 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 58], { 59: 60, 58: 61, 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 59], { 59: 60, 58: 61, 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 60], { 59: 60, 58: 61, 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), { 45: [1, 80] }, { 44: [1, 81] }, t(E, [2, 65]), t(E, [2, 82]), t(E, [2, 83]), t(E, [2, 84]), { 3: 83, 4: Rt, 5: Bt, 6: Nt, 7: Wt, 8: Ut, 9: Qt, 10: Ot, 11: Ht, 12: Xt, 13: Mt, 14: Yt, 15: jt, 18: [1, 82] }, 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(c, [2, 52], { 58: 31, 43: 84, 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 55], { 58: 31, 43: 85, 4: m, 5: b, 10: y, 12: T, 13: q, 14: g, 15: k, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }), { 46: [1, 86] }, { 45: [1, 87] }, { 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 16: 90, 17: it, 18: at, 19: nt, 20: st, 22: 89, 23: 88 }, t(w, [2, 24]), t(c, [2, 51], { 59: 60, 58: 61, 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 54], { 59: 60, 58: 61, 4: m, 5: b, 8: H, 10: y, 12: T, 13: q, 14: g, 15: k, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(c, [2, 47], { 22: 89, 16: 90, 23: 101, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), { 46: [1, 102] }, t(c, [2, 29], { 10: St }), t(Gt, [2, 27], { 16: 104, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), t(N, [2, 25]), t(N, [2, 13]), t(N, [2, 14]), t(N, [2, 15]), t(N, [2, 16]), t(N, [2, 17]), t(N, [2, 18]), t(N, [2, 19]), t(N, [2, 20]), t(N, [2, 21]), t(N, [2, 22]), t(c, [2, 49], { 10: St }), t(c, [2, 48], { 22: 89, 16: 90, 23: 105, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), { 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 16: 90, 17: it, 18: at, 19: nt, 20: st, 22: 106 }, t(N, [2, 26]), t(c, [2, 50], { 10: St }), t(Gt, [2, 28], { 16: 104, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st })],
|
|
114
|
-
defaultActions: { 8: [2, 30], 9: [2, 31] },
|
|
115
|
-
parseError: /* @__PURE__ */ r(function(s, l) {
|
|
116
|
-
if (l.recoverable)
|
|
117
|
-
this.trace(s);
|
|
118
|
-
else {
|
|
119
|
-
var u = new Error(s);
|
|
120
|
-
throw u.hash = l, u;
|
|
121
|
-
}
|
|
122
|
-
}, "parseError"),
|
|
123
|
-
parse: /* @__PURE__ */ r(function(s) {
|
|
124
|
-
var l = this, u = [0], d = [], A = [null], e = [], ht = this.table, n = "", gt = 0, Kt = 0, Te = 2, Zt = 1, qe = e.slice.call(arguments, 1), D = Object.create(this.lexer), j = { yy: {} };
|
|
125
|
-
for (var At in this.yy)
|
|
126
|
-
Object.prototype.hasOwnProperty.call(this.yy, At) && (j.yy[At] = this.yy[At]);
|
|
127
|
-
D.setInput(s, j.yy), j.yy.lexer = D, j.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
|
|
128
|
-
var kt = D.yylloc;
|
|
129
|
-
e.push(kt);
|
|
130
|
-
var me = D.options && D.options.ranges;
|
|
131
|
-
typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
132
|
-
function be(B) {
|
|
133
|
-
u.length = u.length - 2 * B, A.length = A.length - B, e.length = e.length - B;
|
|
134
|
-
}
|
|
135
|
-
r(be, "popStack");
|
|
136
|
-
function Jt() {
|
|
137
|
-
var B;
|
|
138
|
-
return B = d.pop() || D.lex() || Zt, typeof B != "number" && (B instanceof Array && (d = B, B = d.pop()), B = l.symbols_[B] || B), B;
|
|
139
|
-
}
|
|
140
|
-
r(Jt, "lex");
|
|
141
|
-
for (var R, G, W, Ft, rt = {}, pt, M, $t, yt; ; ) {
|
|
142
|
-
if (G = u[u.length - 1], this.defaultActions[G] ? W = this.defaultActions[G] : ((R === null || typeof R > "u") && (R = Jt()), W = ht[G] && ht[G][R]), typeof W > "u" || !W.length || !W[0]) {
|
|
143
|
-
var Pt = "";
|
|
144
|
-
yt = [];
|
|
145
|
-
for (pt in ht[G])
|
|
146
|
-
this.terminals_[pt] && pt > Te && yt.push("'" + this.terminals_[pt] + "'");
|
|
147
|
-
D.showPosition ? Pt = "Parse error on line " + (gt + 1) + `:
|
|
148
|
-
` + D.showPosition() + `
|
|
149
|
-
Expecting ` + yt.join(", ") + ", got '" + (this.terminals_[R] || R) + "'" : Pt = "Parse error on line " + (gt + 1) + ": Unexpected " + (R == Zt ? "end of input" : "'" + (this.terminals_[R] || R) + "'"), this.parseError(Pt, {
|
|
150
|
-
text: D.match,
|
|
151
|
-
token: this.terminals_[R] || R,
|
|
152
|
-
line: D.yylineno,
|
|
153
|
-
loc: kt,
|
|
154
|
-
expected: yt
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
if (W[0] instanceof Array && W.length > 1)
|
|
158
|
-
throw new Error("Parse Error: multiple actions possible at state: " + G + ", token: " + R);
|
|
159
|
-
switch (W[0]) {
|
|
160
|
-
case 1:
|
|
161
|
-
u.push(R), A.push(D.yytext), e.push(D.yylloc), u.push(W[1]), R = null, Kt = D.yyleng, n = D.yytext, gt = D.yylineno, kt = D.yylloc;
|
|
162
|
-
break;
|
|
163
|
-
case 2:
|
|
164
|
-
if (M = this.productions_[W[1]][1], rt.$ = A[A.length - M], rt._$ = {
|
|
165
|
-
first_line: e[e.length - (M || 1)].first_line,
|
|
166
|
-
last_line: e[e.length - 1].last_line,
|
|
167
|
-
first_column: e[e.length - (M || 1)].first_column,
|
|
168
|
-
last_column: e[e.length - 1].last_column
|
|
169
|
-
}, me && (rt._$.range = [
|
|
170
|
-
e[e.length - (M || 1)].range[0],
|
|
171
|
-
e[e.length - 1].range[1]
|
|
172
|
-
]), Ft = this.performAction.apply(rt, [
|
|
173
|
-
n,
|
|
174
|
-
Kt,
|
|
175
|
-
gt,
|
|
176
|
-
j.yy,
|
|
177
|
-
W[1],
|
|
178
|
-
A,
|
|
179
|
-
e
|
|
180
|
-
].concat(qe)), typeof Ft < "u")
|
|
181
|
-
return Ft;
|
|
182
|
-
M && (u = u.slice(0, -1 * M * 2), A = A.slice(0, -1 * M), e = e.slice(0, -1 * M)), u.push(this.productions_[W[1]][0]), A.push(rt.$), e.push(rt._$), $t = ht[u[u.length - 2]][u[u.length - 1]], u.push($t);
|
|
183
|
-
break;
|
|
184
|
-
case 3:
|
|
185
|
-
return !0;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return !0;
|
|
189
|
-
}, "parse")
|
|
190
|
-
}, ye = /* @__PURE__ */ (function() {
|
|
191
|
-
var Y = {
|
|
192
|
-
EOF: 1,
|
|
193
|
-
parseError: /* @__PURE__ */ r(function(l, u) {
|
|
194
|
-
if (this.yy.parser)
|
|
195
|
-
this.yy.parser.parseError(l, u);
|
|
196
|
-
else
|
|
197
|
-
throw new Error(l);
|
|
198
|
-
}, "parseError"),
|
|
199
|
-
// resets the lexer, sets new input
|
|
200
|
-
setInput: /* @__PURE__ */ r(function(s, l) {
|
|
201
|
-
return this.yy = l || this.yy || {}, this._input = s, 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__ */ r(function() {
|
|
210
|
-
var s = this._input[0];
|
|
211
|
-
this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
|
|
212
|
-
var l = s.match(/(?:\r\n?|\n).*/g);
|
|
213
|
-
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), s;
|
|
214
|
-
}, "input"),
|
|
215
|
-
// unshifts one char (or a string) into the input
|
|
216
|
-
unput: /* @__PURE__ */ r(function(s) {
|
|
217
|
-
var l = s.length, u = s.split(/(?:\r\n?|\n)/g);
|
|
218
|
-
this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
|
|
219
|
-
var d = 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), u.length - 1 && (this.yylineno -= u.length - 1);
|
|
221
|
-
var A = 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: u ? (u.length === d.length ? this.yylloc.first_column : 0) + d[d.length - u.length].length - u[0].length : this.yylloc.first_column - l
|
|
227
|
-
}, this.options.ranges && (this.yylloc.range = [A[0], A[0] + this.yyleng - l]), 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__ */ r(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__ */ r(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__ */ r(function(s) {
|
|
248
|
-
this.unput(this.match.slice(s));
|
|
249
|
-
}, "less"),
|
|
250
|
-
// displays already matched input, i.e. for error messages
|
|
251
|
-
pastInput: /* @__PURE__ */ r(function() {
|
|
252
|
-
var s = this.matched.substr(0, this.matched.length - this.match.length);
|
|
253
|
-
return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
|
|
254
|
-
}, "pastInput"),
|
|
255
|
-
// displays upcoming input, i.e. for error messages
|
|
256
|
-
upcomingInput: /* @__PURE__ */ r(function() {
|
|
257
|
-
var s = this.match;
|
|
258
|
-
return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.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__ */ r(function() {
|
|
262
|
-
var s = this.pastInput(), l = new Array(s.length + 1).join("-");
|
|
263
|
-
return s + this.upcomingInput() + `
|
|
264
|
-
` + l + "^";
|
|
265
|
-
}, "showPosition"),
|
|
266
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
267
|
-
test_match: /* @__PURE__ */ r(function(s, l) {
|
|
268
|
-
var u, d, A;
|
|
269
|
-
if (this.options.backtrack_lexer && (A = {
|
|
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 && (A.yylloc.range = this.yylloc.range.slice(0))), d = s[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.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: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
|
|
293
|
-
}, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], u = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u)
|
|
294
|
-
return u;
|
|
295
|
-
if (this._backtrack) {
|
|
296
|
-
for (var e in A)
|
|
297
|
-
this[e] = A[e];
|
|
298
|
-
return !1;
|
|
299
|
-
}
|
|
300
|
-
return !1;
|
|
301
|
-
}, "test_match"),
|
|
302
|
-
// return next match in input
|
|
303
|
-
next: /* @__PURE__ */ r(function() {
|
|
304
|
-
if (this.done)
|
|
305
|
-
return this.EOF;
|
|
306
|
-
this._input || (this.done = !0);
|
|
307
|
-
var s, l, u, d;
|
|
308
|
-
this._more || (this.yytext = "", this.match = "");
|
|
309
|
-
for (var A = this._currentRules(), e = 0; e < A.length; e++)
|
|
310
|
-
if (u = this._input.match(this.rules[A[e]]), u && (!l || u[0].length > l[0].length)) {
|
|
311
|
-
if (l = u, d = e, this.options.backtrack_lexer) {
|
|
312
|
-
if (s = this.test_match(u, A[e]), s !== !1)
|
|
313
|
-
return s;
|
|
314
|
-
if (this._backtrack) {
|
|
315
|
-
l = !1;
|
|
316
|
-
continue;
|
|
317
|
-
} else
|
|
318
|
-
return !1;
|
|
319
|
-
} else if (!this.options.flex)
|
|
320
|
-
break;
|
|
321
|
-
}
|
|
322
|
-
return l ? (s = this.test_match(l, A[d]), s !== !1 ? s : !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__ */ r(function() {
|
|
331
|
-
var l = this.next();
|
|
332
|
-
return l || this.lex();
|
|
333
|
-
}, "lex"),
|
|
334
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
335
|
-
begin: /* @__PURE__ */ r(function(l) {
|
|
336
|
-
this.conditionStack.push(l);
|
|
337
|
-
}, "begin"),
|
|
338
|
-
// pop the previously active lexer condition state off the condition stack
|
|
339
|
-
popState: /* @__PURE__ */ r(function() {
|
|
340
|
-
var l = this.conditionStack.length - 1;
|
|
341
|
-
return l > 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__ */ r(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__ */ r(function(l) {
|
|
349
|
-
return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
|
|
350
|
-
}, "topState"),
|
|
351
|
-
// alias for begin(condition)
|
|
352
|
-
pushState: /* @__PURE__ */ r(function(l) {
|
|
353
|
-
this.begin(l);
|
|
354
|
-
}, "pushState"),
|
|
355
|
-
// return the number of states currently on the stack
|
|
356
|
-
stateStackSize: /* @__PURE__ */ r(function() {
|
|
357
|
-
return this.conditionStack.length;
|
|
358
|
-
}, "stateStackSize"),
|
|
359
|
-
options: { "case-insensitive": !0 },
|
|
360
|
-
performAction: /* @__PURE__ */ r(function(l, u, d, A) {
|
|
361
|
-
switch (d) {
|
|
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 15;
|
|
445
|
-
case 37:
|
|
446
|
-
return 11;
|
|
447
|
-
case 38:
|
|
448
|
-
return 64;
|
|
449
|
-
case 39:
|
|
450
|
-
return 10;
|
|
451
|
-
case 40:
|
|
452
|
-
return 65;
|
|
453
|
-
case 41:
|
|
454
|
-
return 65;
|
|
455
|
-
case 42:
|
|
456
|
-
return 14;
|
|
457
|
-
case 43:
|
|
458
|
-
return 13;
|
|
459
|
-
case 44:
|
|
460
|
-
return 67;
|
|
461
|
-
case 45:
|
|
462
|
-
return 66;
|
|
463
|
-
case 46:
|
|
464
|
-
return 12;
|
|
465
|
-
case 47:
|
|
466
|
-
return 8;
|
|
467
|
-
case 48:
|
|
468
|
-
return 5;
|
|
469
|
-
case 49:
|
|
470
|
-
return 18;
|
|
471
|
-
case 50:
|
|
472
|
-
return 56;
|
|
473
|
-
case 51:
|
|
474
|
-
return 63;
|
|
475
|
-
case 52:
|
|
476
|
-
return 57;
|
|
477
|
-
}
|
|
478
|
-
}, "anonymous"),
|
|
479
|
-
rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:classDef\b)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?::::)/i, /^(?:^\w+)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?:[^\x00-\x7F]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
|
|
480
|
-
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, 52], inclusive: !0 } }
|
|
481
|
-
};
|
|
482
|
-
return Y;
|
|
483
|
-
})();
|
|
484
|
-
_t.lexer = ye;
|
|
485
|
-
function ft() {
|
|
486
|
-
this.yy = {};
|
|
487
|
-
}
|
|
488
|
-
return r(ft, "Parser"), ft.prototype = _t, _t.Parser = ft, new ft();
|
|
489
|
-
})();
|
|
490
|
-
Ct.parser = Ct;
|
|
491
|
-
var Ee = Ct, I = Le(), De = class {
|
|
492
|
-
constructor() {
|
|
493
|
-
this.classes = /* @__PURE__ */ new Map(), this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData();
|
|
494
|
-
}
|
|
495
|
-
static {
|
|
496
|
-
r(this, "QuadrantBuilder");
|
|
497
|
-
}
|
|
498
|
-
getDefaultData() {
|
|
499
|
-
return {
|
|
500
|
-
titleText: "",
|
|
501
|
-
quadrant1Text: "",
|
|
502
|
-
quadrant2Text: "",
|
|
503
|
-
quadrant3Text: "",
|
|
504
|
-
quadrant4Text: "",
|
|
505
|
-
xAxisLeftText: "",
|
|
506
|
-
xAxisRightText: "",
|
|
507
|
-
yAxisBottomText: "",
|
|
508
|
-
yAxisTopText: "",
|
|
509
|
-
points: []
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
getDefaultConfig() {
|
|
513
|
-
return {
|
|
514
|
-
showXAxis: !0,
|
|
515
|
-
showYAxis: !0,
|
|
516
|
-
showTitle: !0,
|
|
517
|
-
chartHeight: z.quadrantChart?.chartWidth || 500,
|
|
518
|
-
chartWidth: z.quadrantChart?.chartHeight || 500,
|
|
519
|
-
titlePadding: z.quadrantChart?.titlePadding || 10,
|
|
520
|
-
titleFontSize: z.quadrantChart?.titleFontSize || 20,
|
|
521
|
-
quadrantPadding: z.quadrantChart?.quadrantPadding || 5,
|
|
522
|
-
xAxisLabelPadding: z.quadrantChart?.xAxisLabelPadding || 5,
|
|
523
|
-
yAxisLabelPadding: z.quadrantChart?.yAxisLabelPadding || 5,
|
|
524
|
-
xAxisLabelFontSize: z.quadrantChart?.xAxisLabelFontSize || 16,
|
|
525
|
-
yAxisLabelFontSize: z.quadrantChart?.yAxisLabelFontSize || 16,
|
|
526
|
-
quadrantLabelFontSize: z.quadrantChart?.quadrantLabelFontSize || 16,
|
|
527
|
-
quadrantTextTopPadding: z.quadrantChart?.quadrantTextTopPadding || 5,
|
|
528
|
-
pointTextPadding: z.quadrantChart?.pointTextPadding || 5,
|
|
529
|
-
pointLabelFontSize: z.quadrantChart?.pointLabelFontSize || 12,
|
|
530
|
-
pointRadius: z.quadrantChart?.pointRadius || 5,
|
|
531
|
-
xAxisPosition: z.quadrantChart?.xAxisPosition || "top",
|
|
532
|
-
yAxisPosition: z.quadrantChart?.yAxisPosition || "left",
|
|
533
|
-
quadrantInternalBorderStrokeWidth: z.quadrantChart?.quadrantInternalBorderStrokeWidth || 1,
|
|
534
|
-
quadrantExternalBorderStrokeWidth: z.quadrantChart?.quadrantExternalBorderStrokeWidth || 2
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
getDefaultThemeConfig() {
|
|
538
|
-
return {
|
|
539
|
-
quadrant1Fill: I.quadrant1Fill,
|
|
540
|
-
quadrant2Fill: I.quadrant2Fill,
|
|
541
|
-
quadrant3Fill: I.quadrant3Fill,
|
|
542
|
-
quadrant4Fill: I.quadrant4Fill,
|
|
543
|
-
quadrant1TextFill: I.quadrant1TextFill,
|
|
544
|
-
quadrant2TextFill: I.quadrant2TextFill,
|
|
545
|
-
quadrant3TextFill: I.quadrant3TextFill,
|
|
546
|
-
quadrant4TextFill: I.quadrant4TextFill,
|
|
547
|
-
quadrantPointFill: I.quadrantPointFill,
|
|
548
|
-
quadrantPointTextFill: I.quadrantPointTextFill,
|
|
549
|
-
quadrantXAxisTextFill: I.quadrantXAxisTextFill,
|
|
550
|
-
quadrantYAxisTextFill: I.quadrantYAxisTextFill,
|
|
551
|
-
quadrantTitleFill: I.quadrantTitleFill,
|
|
552
|
-
quadrantInternalBorderStrokeFill: I.quadrantInternalBorderStrokeFill,
|
|
553
|
-
quadrantExternalBorderStrokeFill: I.quadrantExternalBorderStrokeFill
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
clear() {
|
|
557
|
-
this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), this.classes = /* @__PURE__ */ new Map(), qt.info("clear called");
|
|
558
|
-
}
|
|
559
|
-
setData(t) {
|
|
560
|
-
this.data = { ...this.data, ...t };
|
|
561
|
-
}
|
|
562
|
-
addPoints(t) {
|
|
563
|
-
this.data.points = [...t, ...this.data.points];
|
|
564
|
-
}
|
|
565
|
-
addClass(t, a) {
|
|
566
|
-
this.classes.set(t, a);
|
|
567
|
-
}
|
|
568
|
-
setConfig(t) {
|
|
569
|
-
qt.trace("setConfig called with: ", t), this.config = { ...this.config, ...t };
|
|
570
|
-
}
|
|
571
|
-
setThemeConfig(t) {
|
|
572
|
-
qt.trace("setThemeConfig called with: ", t), this.themeConfig = { ...this.themeConfig, ...t };
|
|
573
|
-
}
|
|
574
|
-
calculateSpace(t, a, p, f) {
|
|
575
|
-
const o = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, x = {
|
|
576
|
-
top: t === "top" && a ? o : 0,
|
|
577
|
-
bottom: t === "bottom" && a ? o : 0
|
|
578
|
-
}, _ = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, h = {
|
|
579
|
-
left: this.config.yAxisPosition === "left" && p ? _ : 0,
|
|
580
|
-
right: this.config.yAxisPosition === "right" && p ? _ : 0
|
|
581
|
-
}, c = this.config.titleFontSize + this.config.titlePadding * 2, S = {
|
|
582
|
-
top: f ? c : 0
|
|
583
|
-
}, m = this.config.quadrantPadding + h.left, b = this.config.quadrantPadding + x.top + S.top, y = this.config.chartWidth - this.config.quadrantPadding * 2 - h.left - h.right, T = this.config.chartHeight - this.config.quadrantPadding * 2 - x.top - x.bottom - S.top, q = y / 2, g = T / 2;
|
|
584
|
-
return {
|
|
585
|
-
xAxisSpace: x,
|
|
586
|
-
yAxisSpace: h,
|
|
587
|
-
titleSpace: S,
|
|
588
|
-
quadrantSpace: {
|
|
589
|
-
quadrantLeft: m,
|
|
590
|
-
quadrantTop: b,
|
|
591
|
-
quadrantWidth: y,
|
|
592
|
-
quadrantHalfWidth: q,
|
|
593
|
-
quadrantHeight: T,
|
|
594
|
-
quadrantHalfHeight: g
|
|
595
|
-
}
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
getAxisLabels(t, a, p, f) {
|
|
599
|
-
const { quadrantSpace: o, titleSpace: x } = f, {
|
|
600
|
-
quadrantHalfHeight: _,
|
|
601
|
-
quadrantHeight: h,
|
|
602
|
-
quadrantLeft: c,
|
|
603
|
-
quadrantHalfWidth: S,
|
|
604
|
-
quadrantTop: m,
|
|
605
|
-
quadrantWidth: b
|
|
606
|
-
} = o, y = !!this.data.xAxisRightText, T = !!this.data.yAxisTopText, q = [];
|
|
607
|
-
return this.data.xAxisLeftText && a && q.push({
|
|
608
|
-
text: this.data.xAxisLeftText,
|
|
609
|
-
fill: this.themeConfig.quadrantXAxisTextFill,
|
|
610
|
-
x: c + (y ? S / 2 : 0),
|
|
611
|
-
y: t === "top" ? this.config.xAxisLabelPadding + x.top : this.config.xAxisLabelPadding + m + h + this.config.quadrantPadding,
|
|
612
|
-
fontSize: this.config.xAxisLabelFontSize,
|
|
613
|
-
verticalPos: y ? "center" : "left",
|
|
614
|
-
horizontalPos: "top",
|
|
615
|
-
rotation: 0
|
|
616
|
-
}), this.data.xAxisRightText && a && q.push({
|
|
617
|
-
text: this.data.xAxisRightText,
|
|
618
|
-
fill: this.themeConfig.quadrantXAxisTextFill,
|
|
619
|
-
x: c + S + (y ? S / 2 : 0),
|
|
620
|
-
y: t === "top" ? this.config.xAxisLabelPadding + x.top : this.config.xAxisLabelPadding + m + h + this.config.quadrantPadding,
|
|
621
|
-
fontSize: this.config.xAxisLabelFontSize,
|
|
622
|
-
verticalPos: y ? "center" : "left",
|
|
623
|
-
horizontalPos: "top",
|
|
624
|
-
rotation: 0
|
|
625
|
-
}), this.data.yAxisBottomText && p && q.push({
|
|
626
|
-
text: this.data.yAxisBottomText,
|
|
627
|
-
fill: this.themeConfig.quadrantYAxisTextFill,
|
|
628
|
-
x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + c + b + this.config.quadrantPadding,
|
|
629
|
-
y: m + h - (T ? _ / 2 : 0),
|
|
630
|
-
fontSize: this.config.yAxisLabelFontSize,
|
|
631
|
-
verticalPos: T ? "center" : "left",
|
|
632
|
-
horizontalPos: "top",
|
|
633
|
-
rotation: -90
|
|
634
|
-
}), this.data.yAxisTopText && p && q.push({
|
|
635
|
-
text: this.data.yAxisTopText,
|
|
636
|
-
fill: this.themeConfig.quadrantYAxisTextFill,
|
|
637
|
-
x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + c + b + this.config.quadrantPadding,
|
|
638
|
-
y: m + _ - (T ? _ / 2 : 0),
|
|
639
|
-
fontSize: this.config.yAxisLabelFontSize,
|
|
640
|
-
verticalPos: T ? "center" : "left",
|
|
641
|
-
horizontalPos: "top",
|
|
642
|
-
rotation: -90
|
|
643
|
-
}), q;
|
|
644
|
-
}
|
|
645
|
-
getQuadrants(t) {
|
|
646
|
-
const { quadrantSpace: a } = t, { quadrantHalfHeight: p, quadrantLeft: f, quadrantHalfWidth: o, quadrantTop: x } = a, _ = [
|
|
647
|
-
{
|
|
648
|
-
text: {
|
|
649
|
-
text: this.data.quadrant1Text,
|
|
650
|
-
fill: this.themeConfig.quadrant1TextFill,
|
|
651
|
-
x: 0,
|
|
652
|
-
y: 0,
|
|
653
|
-
fontSize: this.config.quadrantLabelFontSize,
|
|
654
|
-
verticalPos: "center",
|
|
655
|
-
horizontalPos: "middle",
|
|
656
|
-
rotation: 0
|
|
657
|
-
},
|
|
658
|
-
x: f + o,
|
|
659
|
-
y: x,
|
|
660
|
-
width: o,
|
|
661
|
-
height: p,
|
|
662
|
-
fill: this.themeConfig.quadrant1Fill
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
text: {
|
|
666
|
-
text: this.data.quadrant2Text,
|
|
667
|
-
fill: this.themeConfig.quadrant2TextFill,
|
|
668
|
-
x: 0,
|
|
669
|
-
y: 0,
|
|
670
|
-
fontSize: this.config.quadrantLabelFontSize,
|
|
671
|
-
verticalPos: "center",
|
|
672
|
-
horizontalPos: "middle",
|
|
673
|
-
rotation: 0
|
|
674
|
-
},
|
|
675
|
-
x: f,
|
|
676
|
-
y: x,
|
|
677
|
-
width: o,
|
|
678
|
-
height: p,
|
|
679
|
-
fill: this.themeConfig.quadrant2Fill
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
text: {
|
|
683
|
-
text: this.data.quadrant3Text,
|
|
684
|
-
fill: this.themeConfig.quadrant3TextFill,
|
|
685
|
-
x: 0,
|
|
686
|
-
y: 0,
|
|
687
|
-
fontSize: this.config.quadrantLabelFontSize,
|
|
688
|
-
verticalPos: "center",
|
|
689
|
-
horizontalPos: "middle",
|
|
690
|
-
rotation: 0
|
|
691
|
-
},
|
|
692
|
-
x: f,
|
|
693
|
-
y: x + p,
|
|
694
|
-
width: o,
|
|
695
|
-
height: p,
|
|
696
|
-
fill: this.themeConfig.quadrant3Fill
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
text: {
|
|
700
|
-
text: this.data.quadrant4Text,
|
|
701
|
-
fill: this.themeConfig.quadrant4TextFill,
|
|
702
|
-
x: 0,
|
|
703
|
-
y: 0,
|
|
704
|
-
fontSize: this.config.quadrantLabelFontSize,
|
|
705
|
-
verticalPos: "center",
|
|
706
|
-
horizontalPos: "middle",
|
|
707
|
-
rotation: 0
|
|
708
|
-
},
|
|
709
|
-
x: f + o,
|
|
710
|
-
y: x + p,
|
|
711
|
-
width: o,
|
|
712
|
-
height: p,
|
|
713
|
-
fill: this.themeConfig.quadrant4Fill
|
|
714
|
-
}
|
|
715
|
-
];
|
|
716
|
-
for (const h of _)
|
|
717
|
-
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");
|
|
718
|
-
return _;
|
|
719
|
-
}
|
|
720
|
-
getQuadrantPoints(t) {
|
|
721
|
-
const { quadrantSpace: a } = t, { quadrantHeight: p, quadrantLeft: f, quadrantTop: o, quadrantWidth: x } = a, _ = te().domain([0, 1]).range([f, x + f]), h = te().domain([0, 1]).range([p + o, o]);
|
|
722
|
-
return this.data.points.map((S) => {
|
|
723
|
-
const m = this.classes.get(S.className);
|
|
724
|
-
return m && (S = { ...m, ...S }), {
|
|
725
|
-
x: _(S.x),
|
|
726
|
-
y: h(S.y),
|
|
727
|
-
fill: S.color ?? this.themeConfig.quadrantPointFill,
|
|
728
|
-
radius: S.radius ?? this.config.pointRadius,
|
|
729
|
-
text: {
|
|
730
|
-
text: S.text,
|
|
731
|
-
fill: this.themeConfig.quadrantPointTextFill,
|
|
732
|
-
x: _(S.x),
|
|
733
|
-
y: h(S.y) + this.config.pointTextPadding,
|
|
734
|
-
verticalPos: "center",
|
|
735
|
-
horizontalPos: "top",
|
|
736
|
-
fontSize: this.config.pointLabelFontSize,
|
|
737
|
-
rotation: 0
|
|
738
|
-
},
|
|
739
|
-
strokeColor: S.strokeColor ?? this.themeConfig.quadrantPointFill,
|
|
740
|
-
strokeWidth: S.strokeWidth ?? "0px"
|
|
741
|
-
};
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
getBorders(t) {
|
|
745
|
-
const a = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: p } = t, {
|
|
746
|
-
quadrantHalfHeight: f,
|
|
747
|
-
quadrantHeight: o,
|
|
748
|
-
quadrantLeft: x,
|
|
749
|
-
quadrantHalfWidth: _,
|
|
750
|
-
quadrantTop: h,
|
|
751
|
-
quadrantWidth: c
|
|
752
|
-
} = p;
|
|
753
|
-
return [
|
|
754
|
-
// top border
|
|
755
|
-
{
|
|
756
|
-
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
|
757
|
-
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
|
758
|
-
x1: x - a,
|
|
759
|
-
y1: h,
|
|
760
|
-
x2: x + c + a,
|
|
761
|
-
y2: h
|
|
762
|
-
},
|
|
763
|
-
// right border
|
|
764
|
-
{
|
|
765
|
-
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
|
766
|
-
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
|
767
|
-
x1: x + c,
|
|
768
|
-
y1: h + a,
|
|
769
|
-
x2: x + c,
|
|
770
|
-
y2: h + o - a
|
|
771
|
-
},
|
|
772
|
-
// bottom border
|
|
773
|
-
{
|
|
774
|
-
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
|
775
|
-
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
|
776
|
-
x1: x - a,
|
|
777
|
-
y1: h + o,
|
|
778
|
-
x2: x + c + a,
|
|
779
|
-
y2: h + o
|
|
780
|
-
},
|
|
781
|
-
// left border
|
|
782
|
-
{
|
|
783
|
-
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
|
784
|
-
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
|
785
|
-
x1: x,
|
|
786
|
-
y1: h + a,
|
|
787
|
-
x2: x,
|
|
788
|
-
y2: h + o - a
|
|
789
|
-
},
|
|
790
|
-
// vertical inner border
|
|
791
|
-
{
|
|
792
|
-
strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
|
|
793
|
-
strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
|
|
794
|
-
x1: x + _,
|
|
795
|
-
y1: h + a,
|
|
796
|
-
x2: x + _,
|
|
797
|
-
y2: h + o - a
|
|
798
|
-
},
|
|
799
|
-
// horizontal inner border
|
|
800
|
-
{
|
|
801
|
-
strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
|
|
802
|
-
strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
|
|
803
|
-
x1: x + a,
|
|
804
|
-
y1: h + f,
|
|
805
|
-
x2: x + c - a,
|
|
806
|
-
y2: h + f
|
|
807
|
-
}
|
|
808
|
-
];
|
|
809
|
-
}
|
|
810
|
-
getTitle(t) {
|
|
811
|
-
if (t)
|
|
812
|
-
return {
|
|
813
|
-
text: this.data.titleText,
|
|
814
|
-
fill: this.themeConfig.quadrantTitleFill,
|
|
815
|
-
fontSize: this.config.titleFontSize,
|
|
816
|
-
horizontalPos: "top",
|
|
817
|
-
verticalPos: "center",
|
|
818
|
-
rotation: 0,
|
|
819
|
-
y: this.config.titlePadding,
|
|
820
|
-
x: this.config.chartWidth / 2
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
build() {
|
|
824
|
-
const t = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), a = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), p = this.config.showTitle && !!this.data.titleText, f = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, o = this.calculateSpace(f, t, a, p);
|
|
825
|
-
return {
|
|
826
|
-
points: this.getQuadrantPoints(o),
|
|
827
|
-
quadrants: this.getQuadrants(o),
|
|
828
|
-
axisLabels: this.getAxisLabels(f, t, a, o),
|
|
829
|
-
borderLines: this.getBorders(o),
|
|
830
|
-
title: this.getTitle(p)
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
}, Tt = class extends Error {
|
|
834
|
-
static {
|
|
835
|
-
r(this, "InvalidStyleError");
|
|
836
|
-
}
|
|
837
|
-
constructor(t, a, p) {
|
|
838
|
-
super(`value for ${t} ${a} is invalid, please use a valid ${p}`), this.name = "InvalidStyleError";
|
|
839
|
-
}
|
|
840
|
-
};
|
|
841
|
-
function Lt(t) {
|
|
842
|
-
return !/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t);
|
|
843
|
-
}
|
|
844
|
-
r(Lt, "validateHexCode");
|
|
845
|
-
function ie(t) {
|
|
846
|
-
return !/^\d+$/.test(t);
|
|
847
|
-
}
|
|
848
|
-
r(ie, "validateNumber");
|
|
849
|
-
function ae(t) {
|
|
850
|
-
return !/^\d+px$/.test(t);
|
|
851
|
-
}
|
|
852
|
-
r(ae, "validateSizeInPixels");
|
|
853
|
-
function O(t) {
|
|
854
|
-
return Ce(t.trim(), Et());
|
|
855
|
-
}
|
|
856
|
-
r(O, "textSanitizer");
|
|
857
|
-
var V = new De();
|
|
858
|
-
function ne(t) {
|
|
859
|
-
V.setData({ quadrant1Text: O(t.text) });
|
|
860
|
-
}
|
|
861
|
-
r(ne, "setQuadrant1Text");
|
|
862
|
-
function se(t) {
|
|
863
|
-
V.setData({ quadrant2Text: O(t.text) });
|
|
864
|
-
}
|
|
865
|
-
r(se, "setQuadrant2Text");
|
|
866
|
-
function re(t) {
|
|
867
|
-
V.setData({ quadrant3Text: O(t.text) });
|
|
868
|
-
}
|
|
869
|
-
r(re, "setQuadrant3Text");
|
|
870
|
-
function oe(t) {
|
|
871
|
-
V.setData({ quadrant4Text: O(t.text) });
|
|
872
|
-
}
|
|
873
|
-
r(oe, "setQuadrant4Text");
|
|
874
|
-
function le(t) {
|
|
875
|
-
V.setData({ xAxisLeftText: O(t.text) });
|
|
876
|
-
}
|
|
877
|
-
r(le, "setXAxisLeftText");
|
|
878
|
-
function he(t) {
|
|
879
|
-
V.setData({ xAxisRightText: O(t.text) });
|
|
880
|
-
}
|
|
881
|
-
r(he, "setXAxisRightText");
|
|
882
|
-
function ce(t) {
|
|
883
|
-
V.setData({ yAxisTopText: O(t.text) });
|
|
884
|
-
}
|
|
885
|
-
r(ce, "setYAxisTopText");
|
|
886
|
-
function de(t) {
|
|
887
|
-
V.setData({ yAxisBottomText: O(t.text) });
|
|
888
|
-
}
|
|
889
|
-
r(de, "setYAxisBottomText");
|
|
890
|
-
function mt(t) {
|
|
891
|
-
const a = {};
|
|
892
|
-
for (const p of t) {
|
|
893
|
-
const [f, o] = p.trim().split(/\s*:\s*/);
|
|
894
|
-
if (f === "radius") {
|
|
895
|
-
if (ie(o))
|
|
896
|
-
throw new Tt(f, o, "number");
|
|
897
|
-
a.radius = parseInt(o);
|
|
898
|
-
} else if (f === "color") {
|
|
899
|
-
if (Lt(o))
|
|
900
|
-
throw new Tt(f, o, "hex code");
|
|
901
|
-
a.color = o;
|
|
902
|
-
} else if (f === "stroke-color") {
|
|
903
|
-
if (Lt(o))
|
|
904
|
-
throw new Tt(f, o, "hex code");
|
|
905
|
-
a.strokeColor = o;
|
|
906
|
-
} else if (f === "stroke-width") {
|
|
907
|
-
if (ae(o))
|
|
908
|
-
throw new Tt(f, o, "number of pixels (eg. 10px)");
|
|
909
|
-
a.strokeWidth = o;
|
|
910
|
-
} else
|
|
911
|
-
throw new Error(`style named ${f} is not supported.`);
|
|
912
|
-
}
|
|
913
|
-
return a;
|
|
914
|
-
}
|
|
915
|
-
r(mt, "parseStyles");
|
|
916
|
-
function ue(t, a, p, f, o) {
|
|
917
|
-
const x = mt(o);
|
|
918
|
-
V.addPoints([
|
|
919
|
-
{
|
|
920
|
-
x: p,
|
|
921
|
-
y: f,
|
|
922
|
-
text: O(t.text),
|
|
923
|
-
className: a,
|
|
924
|
-
...x
|
|
925
|
-
}
|
|
926
|
-
]);
|
|
927
|
-
}
|
|
928
|
-
r(ue, "addPoint");
|
|
929
|
-
function xe(t, a) {
|
|
930
|
-
V.addClass(t, mt(a));
|
|
931
|
-
}
|
|
932
|
-
r(xe, "addClass");
|
|
933
|
-
function fe(t) {
|
|
934
|
-
V.setConfig({ chartWidth: t });
|
|
935
|
-
}
|
|
936
|
-
r(fe, "setWidth");
|
|
937
|
-
function ge(t) {
|
|
938
|
-
V.setConfig({ chartHeight: t });
|
|
939
|
-
}
|
|
940
|
-
r(ge, "setHeight");
|
|
941
|
-
function pe() {
|
|
942
|
-
const t = Et(), { themeVariables: a, quadrantChart: p } = t;
|
|
943
|
-
return p && V.setConfig(p), V.setThemeConfig({
|
|
944
|
-
quadrant1Fill: a.quadrant1Fill,
|
|
945
|
-
quadrant2Fill: a.quadrant2Fill,
|
|
946
|
-
quadrant3Fill: a.quadrant3Fill,
|
|
947
|
-
quadrant4Fill: a.quadrant4Fill,
|
|
948
|
-
quadrant1TextFill: a.quadrant1TextFill,
|
|
949
|
-
quadrant2TextFill: a.quadrant2TextFill,
|
|
950
|
-
quadrant3TextFill: a.quadrant3TextFill,
|
|
951
|
-
quadrant4TextFill: a.quadrant4TextFill,
|
|
952
|
-
quadrantPointFill: a.quadrantPointFill,
|
|
953
|
-
quadrantPointTextFill: a.quadrantPointTextFill,
|
|
954
|
-
quadrantXAxisTextFill: a.quadrantXAxisTextFill,
|
|
955
|
-
quadrantYAxisTextFill: a.quadrantYAxisTextFill,
|
|
956
|
-
quadrantExternalBorderStrokeFill: a.quadrantExternalBorderStrokeFill,
|
|
957
|
-
quadrantInternalBorderStrokeFill: a.quadrantInternalBorderStrokeFill,
|
|
958
|
-
quadrantTitleFill: a.quadrantTitleFill
|
|
959
|
-
}), V.setData({ titleText: ee() }), V.build();
|
|
960
|
-
}
|
|
961
|
-
r(pe, "getQuadrantData");
|
|
962
|
-
var ze = /* @__PURE__ */ r(function() {
|
|
963
|
-
V.clear(), ve();
|
|
964
|
-
}, "clear"), Ve = {
|
|
965
|
-
setWidth: fe,
|
|
966
|
-
setHeight: ge,
|
|
967
|
-
setQuadrant1Text: ne,
|
|
968
|
-
setQuadrant2Text: se,
|
|
969
|
-
setQuadrant3Text: re,
|
|
970
|
-
setQuadrant4Text: oe,
|
|
971
|
-
setXAxisLeftText: le,
|
|
972
|
-
setXAxisRightText: he,
|
|
973
|
-
setYAxisTopText: ce,
|
|
974
|
-
setYAxisBottomText: de,
|
|
975
|
-
parseStyles: mt,
|
|
976
|
-
addPoint: ue,
|
|
977
|
-
addClass: xe,
|
|
978
|
-
getQuadrantData: pe,
|
|
979
|
-
clear: ze,
|
|
980
|
-
setAccTitle: Fe,
|
|
981
|
-
getAccTitle: ke,
|
|
982
|
-
setDiagramTitle: Ae,
|
|
983
|
-
getDiagramTitle: ee,
|
|
984
|
-
getAccDescription: _e,
|
|
985
|
-
setAccDescription: Se
|
|
986
|
-
}, Ie = /* @__PURE__ */ r((t, a, p, f) => {
|
|
987
|
-
function o(i) {
|
|
988
|
-
return i === "top" ? "hanging" : "middle";
|
|
989
|
-
}
|
|
990
|
-
r(o, "getDominantBaseLine");
|
|
991
|
-
function x(i) {
|
|
992
|
-
return i === "left" ? "start" : "middle";
|
|
993
|
-
}
|
|
994
|
-
r(x, "getTextAnchor");
|
|
995
|
-
function _(i) {
|
|
996
|
-
return `translate(${i.x}, ${i.y}) rotate(${i.rotation || 0})`;
|
|
997
|
-
}
|
|
998
|
-
r(_, "getTransformation");
|
|
999
|
-
const h = Et();
|
|
1000
|
-
qt.debug(`Rendering quadrant chart
|
|
1001
|
-
` + t);
|
|
1002
|
-
const c = h.securityLevel;
|
|
1003
|
-
let S;
|
|
1004
|
-
c === "sandbox" && (S = vt("#i" + a));
|
|
1005
|
-
const b = (c === "sandbox" ? vt(S.nodes()[0].contentDocument.body) : vt("body")).select(`[id="${a}"]`), y = b.append("g").attr("class", "main"), T = h.quadrantChart?.chartWidth ?? 500, q = h.quadrantChart?.chartHeight ?? 500;
|
|
1006
|
-
Pe(b, q, T, h.quadrantChart?.useMaxWidth ?? !0), b.attr("viewBox", "0 0 " + T + " " + q), f.db.setHeight(q), f.db.setWidth(T);
|
|
1007
|
-
const g = f.db.getQuadrantData(), k = y.append("g").attr("class", "quadrants"), ct = y.append("g").attr("class", "border"), dt = y.append("g").attr("class", "data-points"), ut = y.append("g").attr("class", "labels"), xt = y.append("g").attr("class", "title");
|
|
1008
|
-
g.title && xt.append("text").attr("x", 0).attr("y", 0).attr("fill", g.title.fill).attr("font-size", g.title.fontSize).attr("dominant-baseline", o(g.title.horizontalPos)).attr("text-anchor", x(g.title.verticalPos)).attr("transform", _(g.title)).text(g.title.text), g.borderLines && ct.selectAll("line").data(g.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);
|
|
1009
|
-
const ot = k.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class", "quadrant");
|
|
1010
|
-
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(
|
|
1011
|
-
"dominant-baseline",
|
|
1012
|
-
(i) => o(i.text.horizontalPos)
|
|
1013
|
-
).attr("text-anchor", (i) => x(i.text.verticalPos)).attr("transform", (i) => _(i.text)).text((i) => i.text.text), ut.selectAll("g.label").data(g.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) => o(i.horizontalPos)).attr("text-anchor", (i) => x(i.verticalPos)).attr("transform", (i) => _(i));
|
|
1014
|
-
const lt = dt.selectAll("g.data-point").data(g.points).enter().append("g").attr("class", "data-point");
|
|
1015
|
-
lt.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), lt.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(
|
|
1016
|
-
"dominant-baseline",
|
|
1017
|
-
(i) => o(i.text.horizontalPos)
|
|
1018
|
-
).attr("text-anchor", (i) => x(i.text.verticalPos)).attr("transform", (i) => _(i.text));
|
|
1019
|
-
}, "draw"), we = {
|
|
1020
|
-
draw: Ie
|
|
1021
|
-
}, Ne = {
|
|
1022
|
-
parser: Ee,
|
|
1023
|
-
db: Ve,
|
|
1024
|
-
renderer: we,
|
|
1025
|
-
styles: /* @__PURE__ */ r(() => "", "styles")
|
|
1026
|
-
};
|
|
1027
|
-
export {
|
|
1028
|
-
Ne as diagram
|
|
1029
|
-
};
|