@layers-app/editor 0.7.18 → 0.7.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +77 -1
  3. package/dist/index.js +15 -9
  4. package/dist/layers.-pxItkuK.js +11 -0
  5. package/dist/layers.4783bPvO.js +39 -0
  6. package/dist/layers.4XOTUH37.js +1089 -0
  7. package/dist/layers.4peyl00A.js +2 -0
  8. package/dist/layers.4wAcqQtQ.js +423 -0
  9. package/dist/layers.4ykD0YcM.js +40 -0
  10. package/dist/layers.52famHy6.js +1 -0
  11. package/dist/layers.6Feq9YXQ.js +40 -0
  12. package/dist/layers.6GQPwq_6.js +960 -0
  13. package/dist/layers.7JqFgE4-.js +15 -0
  14. package/dist/layers.7wQbmwwB.js +1034 -0
  15. package/dist/layers.8JNx1FTq.js +35 -0
  16. package/dist/layers.8jhm9FEJ.js +10 -0
  17. package/dist/layers.8lNrKfca.js +41 -0
  18. package/dist/layers.9kQUqqYe.js +139 -0
  19. package/dist/layers.9pNaFvaX.js +1 -0
  20. package/dist/layers.AO3vHISA.js +33 -0
  21. package/dist/layers.Ab6Lx44l.js +129 -0
  22. package/dist/layers.B-w9_4cB.js +22 -0
  23. package/dist/layers.B0bpRgNT.js +122 -0
  24. package/dist/layers.B19hGmey.js +1 -0
  25. package/dist/layers.B2OK_mI8.js +1 -0
  26. package/dist/layers.B3D4g2HH.js +1 -0
  27. package/dist/layers.B3mzJc8P.js +907 -0
  28. package/dist/layers.B5YhL7Gw.js +40 -0
  29. package/dist/layers.B7K7JjK6.js +1510 -0
  30. package/dist/layers.B885pkJL.js +794 -0
  31. package/dist/layers.B961U-Vk.js +1 -0
  32. package/dist/layers.B9jATAXU.js +42 -0
  33. package/dist/layers.BAtv1CM7.js +1 -0
  34. package/dist/layers.BBv6P-Uu.js +37 -0
  35. package/dist/layers.BC6JEDP2.js +796 -0
  36. package/dist/layers.BEagxCE_.js +35 -0
  37. package/dist/layers.BH34WCDb.js +6 -0
  38. package/dist/layers.BIeVwYKL.js +1 -0
  39. package/dist/layers.BIkD0WQr.js +10 -0
  40. package/dist/layers.BIlhFIEz.js +37 -0
  41. package/dist/layers.BJDrjORS.js +244 -0
  42. package/dist/{layers.D99OBX9u.js → layers.BJLOp9cg.js} +88 -86
  43. package/dist/layers.BJsWSYrS.js +323 -0
  44. package/dist/layers.BKwcxD8A.js +5 -0
  45. package/dist/layers.BLd2spTm.js +1 -0
  46. package/dist/layers.BLv_frn1.js +10 -0
  47. package/dist/layers.BO2V23mI.js +1 -0
  48. package/dist/layers.BO_D4q5p.js +42 -0
  49. package/dist/layers.BP7EcZBZ.js +1 -0
  50. package/dist/layers.BP8OcU0T.js +10 -0
  51. package/dist/layers.BRaRY9tU.js +373 -0
  52. package/dist/layers.BSTBZrFn.js +1 -0
  53. package/dist/layers.BT2iHuSm.js +8 -0
  54. package/dist/layers.BU-tjKWq.js +33 -0
  55. package/dist/layers.BWEUOe94.js +40 -0
  56. package/dist/layers.BXAu7G4b.js +4 -0
  57. package/dist/layers.BZ9zcjtY.js +8 -0
  58. package/dist/layers.BZa5A6cg.js +425 -0
  59. package/dist/layers.BZlzQFiI.js +51 -0
  60. package/dist/layers.BagtOD0V.js +1 -0
  61. package/dist/layers.BbCfEXyj.js +55 -0
  62. package/dist/layers.Be94M_F4.js +7 -0
  63. package/dist/layers.BhdUQN6J.js +1583 -0
  64. package/dist/layers.Bj915C_T.js +5 -0
  65. package/dist/layers.BnHSrOPr.js +40 -0
  66. package/dist/layers.BngaRys_.js +8583 -0
  67. package/dist/layers.BoRvGzPp.js +1 -0
  68. package/dist/layers.Bob38w8X.js +5 -0
  69. package/dist/layers.BpTkSHkL.js +38 -0
  70. package/dist/layers.BpVR__4s.js +32 -0
  71. package/dist/layers.BpilXLfW.js +6 -0
  72. package/dist/layers.Br9HAzwf.js +2482 -0
  73. package/dist/layers.Bt7brqhi.js +116 -0
  74. package/dist/layers.BtqAfMks.js +1 -0
  75. package/dist/layers.BtvHse58.js +1 -0
  76. package/dist/layers.BwzogUnt.js +41 -0
  77. package/dist/layers.ByB5f2g3.js +7 -0
  78. package/dist/layers.ByipH4AB.js +207 -0
  79. package/dist/layers.BzC5N3hu.js +1619 -0
  80. package/dist/layers.C-KP-jFZ.js +8 -0
  81. package/dist/layers.C0iFGBoQ.js +213 -0
  82. package/dist/layers.C1AULvj_.js +40 -0
  83. package/dist/layers.C2f7uCzl.js +21620 -0
  84. package/dist/layers.C47t6lve.js +2 -0
  85. package/dist/layers.C4gRYt-z.js +9 -0
  86. package/dist/layers.C4nmPqDc.js +9 -0
  87. package/dist/layers.C5UKJ24R.js +271 -0
  88. package/dist/layers.C5qsYNKq.js +7 -0
  89. package/dist/layers.C70jnpZq.js +42 -0
  90. package/dist/layers.C7Qg5l_Q.js +5 -0
  91. package/dist/layers.C7v0beLV.js +9 -0
  92. package/dist/layers.C8_lu5UH.js +23 -0
  93. package/dist/layers.CAcCDIzK.js +32 -0
  94. package/dist/layers.CCWJVHwX.js +26946 -0
  95. package/dist/layers.CF2BAIC-.js +1 -0
  96. package/dist/layers.CFUGAgBV.js +805 -0
  97. package/dist/layers.CHZsXQcr.js +1 -0
  98. package/dist/layers.CIo6HbVI.js +37 -0
  99. package/dist/layers.CJaSQy6k.js +70 -0
  100. package/dist/layers.CJhFGqXY.js +1 -0
  101. package/dist/layers.CKU_klOZ.js +41 -0
  102. package/dist/layers.CKrtSnTU.js +7 -0
  103. package/dist/layers.CNoIsdHV.js +223 -0
  104. package/dist/layers.CQ-g_IO8.js +39 -0
  105. package/dist/layers.CRWtU7Vx.js +1268 -0
  106. package/dist/layers.CSattQNk.js +8 -0
  107. package/dist/layers.CT-8Geho.js +118 -0
  108. package/dist/layers.CWTjwUqI.js +9 -0
  109. package/dist/layers.CY3nuiOZ.js +39 -0
  110. package/dist/layers.CYDGmR2c.js +1 -0
  111. package/dist/layers.CYPtUh0S.js +36 -0
  112. package/dist/layers.CYjyWg9h.js +139 -0
  113. package/dist/layers.CZCoH1Jq.js +189 -0
  114. package/dist/layers.CZVe7Rrz.js +4 -0
  115. package/dist/layers.C_8NFZw0.js +84 -0
  116. package/dist/layers.C_IvrzZ3.js +7 -0
  117. package/dist/layers.C_vVmOaW.js +7 -0
  118. package/dist/layers.Cb3vLPzi.js +1 -0
  119. package/dist/layers.Cblg5KAJ.js +1286 -0
  120. package/dist/layers.CeUsnn-s.js +41 -0
  121. package/dist/layers.Cfwoj-CP.js +76 -0
  122. package/dist/layers.Cfxt2JbX.js +160 -0
  123. package/dist/layers.CjixIcYE.js +205 -0
  124. package/dist/layers.CliEt_s4.js +8 -0
  125. package/dist/layers.Cmumbtn4.js +11 -0
  126. package/dist/layers.Cnkh0zSn.js +5 -0
  127. package/dist/layers.Co0MEzNt.js +32 -0
  128. package/dist/layers.CpgPovn6.js +32 -0
  129. package/dist/layers.CqVTtuYm.js +6 -0
  130. package/dist/layers.Cr_8J_Ls.js +36 -0
  131. package/dist/layers.Cs7THreY.js +42 -0
  132. package/dist/layers.CtQHRQJd.js +65 -0
  133. package/dist/layers.Cuv2Lipq.js +10 -0
  134. package/dist/layers.Cuy--_Li.js +14 -0
  135. package/dist/layers.Cxrjuyke.js +38 -0
  136. package/dist/layers.Cxuu78R8.js +1 -0
  137. package/dist/layers.Cy_jbtrS.js +198 -0
  138. package/dist/layers.CyabQ7I1.js +40 -0
  139. package/dist/layers.CyqF5h2Z.js +1 -0
  140. package/dist/layers.Cyzu9PKQ.js +1 -0
  141. package/dist/layers.CzDyzzM2.js +36 -0
  142. package/dist/layers.D-LL79P8.js +32 -0
  143. package/dist/layers.D-uQN6e4.js +271 -0
  144. package/dist/layers.D00djYUT.js +9 -0
  145. package/dist/layers.D0zn4_Mx.js +1 -0
  146. package/dist/layers.D1PMEoqL.js +41 -0
  147. package/dist/layers.D1WSB9zI.js +806 -0
  148. package/dist/layers.D2dRxQww.js +10 -0
  149. package/dist/layers.D3KEnhiI.js +6 -0
  150. package/dist/layers.D3SlAvNp.js +934 -0
  151. package/dist/layers.D3eKKoAb.js +1 -0
  152. package/dist/layers.D4T8fTcj.js +1223 -0
  153. package/dist/layers.D7gfmd9A.js +36 -0
  154. package/dist/layers.D7jGxypv.js +8 -0
  155. package/dist/layers.DA1OUhKy.js +10 -0
  156. package/dist/layers.DB4o6Xfv.js +42 -0
  157. package/dist/layers.DBUjVgMd.js +1 -0
  158. package/dist/layers.DCkmUFPh.js +2966 -0
  159. package/dist/layers.DD4QPdYS.js +96 -0
  160. package/dist/layers.DE2Io1k7.js +295 -0
  161. package/dist/layers.DKnEcoKx.js +1088 -0
  162. package/dist/layers.DKsXm_hK.js +9 -0
  163. package/dist/layers.DLeGllIz.js +1 -0
  164. package/dist/layers.DLwuMfdd.js +84 -0
  165. package/dist/layers.DMkBISW1.js +1 -0
  166. package/dist/layers.DN9HoVxI.js +18 -0
  167. package/dist/layers.DOrgOHBr.js +1 -0
  168. package/dist/layers.DPipd7Yf.js +1 -0
  169. package/dist/layers.DQpNkl-s.js +39 -0
  170. package/dist/layers.DSNr6P6_.js +40 -0
  171. package/dist/layers.DWGLEZg1.js +34 -0
  172. package/dist/layers.DWxUDz1V.js +13 -0
  173. package/dist/layers.DYk9FILk.js +8 -0
  174. package/dist/layers.DZ3Nv-_j.js +8 -0
  175. package/dist/layers.DZGvjyDH.js +1 -0
  176. package/dist/layers.DZucH9TB.js +40 -0
  177. package/dist/layers.D__NkOsa.js +7 -0
  178. package/dist/layers.DbaKVP5e.js +1 -0
  179. package/dist/layers.DfkAyTyX.js +39 -0
  180. package/dist/layers.Dgie_iy2.js +772 -0
  181. package/dist/layers.DhHIDfZ5.js +1 -0
  182. package/dist/layers.Di-7t8Xt.js +6 -0
  183. package/dist/layers.DiPSTN4q.js +1 -0
  184. package/dist/layers.DjLIeP8d.js +257 -0
  185. package/dist/layers.DjUOC4st.js +16 -0
  186. package/dist/layers.Dk6h-6Wb.js +2 -0
  187. package/dist/layers.DkRR3p16.js +61 -0
  188. package/dist/layers.DnXxZJQo.js +48149 -0
  189. package/dist/layers.DpahuC02.js +6 -0
  190. package/dist/layers.Dpqc2FAN.js +40 -0
  191. package/dist/layers.DqScp2vq.js +1126 -0
  192. package/dist/layers.Dr1JRZ_S.js +4 -0
  193. package/dist/layers.DrTaVUsA.js +39 -0
  194. package/dist/layers.DrXLa4el.js +44 -0
  195. package/dist/layers.DtKxMd0g.js +4 -0
  196. package/dist/layers.DxA6ocdw.js +70 -0
  197. package/dist/layers.DxRZNwMP.js +1 -0
  198. package/dist/layers.Dy1naDTQ.js +14 -0
  199. package/dist/layers.FArKPCKA.js +21941 -0
  200. package/dist/layers.FXdB_jrR.js +9 -0
  201. package/dist/layers.GbuD0dtx.js +6 -0
  202. package/dist/layers.ILs-xE7i.js +11 -0
  203. package/dist/layers.JWCLFILJ.js +1 -0
  204. package/dist/layers.L9obQAvP.js +10 -0
  205. package/dist/layers.Lb5VQ9U4.js +504 -0
  206. package/dist/layers.MCy444Ia.js +41 -0
  207. package/dist/layers.QyDQqf0G.js +39 -0
  208. package/dist/layers.R4CPUhiF.js +8 -0
  209. package/dist/layers.R8mPlCA0.js +261 -0
  210. package/dist/layers.Sjtd5SpD.js +84 -0
  211. package/dist/layers.XlzBx5CM.js +437 -0
  212. package/dist/layers.YD8zq7G1.js +41 -0
  213. package/dist/layers.YWM6eRUH.js +1 -0
  214. package/dist/layers.a6EbdnVa.js +37 -0
  215. package/dist/layers.b0h5ZBmD.js +61 -0
  216. package/dist/layers.b9B2NY7n.js +11690 -0
  217. package/dist/layers.bS5nz97o.js +3 -0
  218. package/dist/layers.biaV5QcU.js +7 -0
  219. package/dist/layers.dxw35GiE.js +52 -0
  220. package/dist/layers.gFW_9pGM.js +1225 -0
  221. package/dist/layers.ge00jJfz.js +38 -0
  222. package/dist/layers.iryDeY19.js +9 -0
  223. package/dist/layers.jN02hLg8.js +7 -0
  224. package/dist/layers.jqEynR2I.js +8 -0
  225. package/dist/layers.lCpg7dOn.js +21 -0
  226. package/dist/layers.lIg0cncJ.js +39 -0
  227. package/dist/layers.lKk6bx4R.js +1 -0
  228. package/dist/layers.m4XcFQDd.js +6 -0
  229. package/dist/layers.m6FDW_ho.js +8 -0
  230. package/dist/layers.r6u8p96p.js +2238 -0
  231. package/dist/layers.rWob7btU.js +10 -0
  232. package/dist/layers.rYZbXo4d.js +32 -0
  233. package/dist/layers.sldWqHdD.js +11 -0
  234. package/dist/layers.tFqdqg82.js +10 -0
  235. package/dist/layers.v25uTBY8.js +39 -0
  236. package/dist/layers.wNarGMxP.js +9 -0
  237. package/dist/layers.wxYowcaq.js +41 -0
  238. package/dist/layers.xjN3ile4.js +9 -0
  239. package/dist/layers.yNlD-OCA.js +35 -0
  240. package/dist/layers.z-RuimGg.js +11 -0
  241. package/dist/layers.zvsP8spW.js +1 -0
  242. package/package.json +1 -1
  243. package/dist/layers.94hwidA2.js +0 -198
  244. package/dist/layers.B4l6ta1Q.js +0 -1
  245. package/dist/layers.BMrOAD_P.js +0 -1
  246. package/dist/layers.DOzLBYZr.js +0 -304
  247. package/dist/layers.YRyXopy_.js +0 -151
  248. package/dist/layers.usKC_Id5.js +0 -1
  249. package/dist/layers.zu-IYGYU.js +0 -47463
@@ -0,0 +1,1286 @@
1
+ import { s as zt, a as Ft, n as wt, o as Nt, b as Xt, c as Yt, l as St, A as Ht, e as $t, q as Ut, W as ot, a7 as Ct, P as qt, Q as jt, i as Gt } from "./layers.BngaRys_.js";
2
+ import { a as Qt } from "./layers.DCkmUFPh.js";
3
+ import "./layers.C2f7uCzl.js";
4
+ import "lodash-es/memoize.js";
5
+ import "lodash-es/merge.js";
6
+ import "lodash-es/isEmpty.js";
7
+ import { i as Kt } from "./layers.DjUOC4st.js";
8
+ import { o as Zt } from "./layers.b0h5ZBmD.js";
9
+ import { l as ft } from "./layers.4wAcqQtQ.js";
10
+ import { l as pt } from "./layers.BU-tjKWq.js";
11
+ function Jt(e, t, i) {
12
+ e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
13
+ for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
14
+ o[s] = e + s * i;
15
+ return o;
16
+ }
17
+ function st() {
18
+ var e = Zt().unknown(void 0), t = e.domain, i = e.range, s = 0, n = 1, o, c, f = !1, d = 0, R = 0, _ = 0.5;
19
+ delete e.unknown;
20
+ function A() {
21
+ var m = t().length, T = n < s, S = T ? n : s, P = T ? s : n;
22
+ o = (P - S) / Math.max(1, m - d + R * 2), f && (o = Math.floor(o)), S += (P - S - o * (m - d)) * _, c = o * (1 - d), f && (S = Math.round(S), c = Math.round(c));
23
+ var p = Jt(m).map(function(C) {
24
+ return S + o * C;
25
+ });
26
+ return i(T ? p.reverse() : p);
27
+ }
28
+ return e.domain = function(m) {
29
+ return arguments.length ? (t(m), A()) : t();
30
+ }, e.range = function(m) {
31
+ return arguments.length ? ([s, n] = m, s = +s, n = +n, A()) : [s, n];
32
+ }, e.rangeRound = function(m) {
33
+ return [s, n] = m, s = +s, n = +n, f = !0, A();
34
+ }, e.bandwidth = function() {
35
+ return c;
36
+ }, e.step = function() {
37
+ return o;
38
+ }, e.round = function(m) {
39
+ return arguments.length ? (f = !!m, A()) : f;
40
+ }, e.padding = function(m) {
41
+ return arguments.length ? (d = Math.min(1, R = +m), A()) : d;
42
+ }, e.paddingInner = function(m) {
43
+ return arguments.length ? (d = Math.min(1, m), A()) : d;
44
+ }, e.paddingOuter = function(m) {
45
+ return arguments.length ? (R = +m, A()) : R;
46
+ }, e.align = function(m) {
47
+ return arguments.length ? (_ = Math.max(0, Math.min(1, m)), A()) : _;
48
+ }, e.copy = function() {
49
+ return st(t(), [s, n]).round(f).paddingInner(d).paddingOuter(R).align(_);
50
+ }, Kt.apply(A(), arguments);
51
+ }
52
+ var nt = (function() {
53
+ var e = function(V, r, l, u) {
54
+ for (l = l || {}, u = V.length; u--; l[V[u]] = r)
55
+ ;
56
+ return l;
57
+ }, t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], n = [1, 5], o = [1, 6], c = [1, 7], f = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], d = [1, 25], R = [1, 26], _ = [1, 28], A = [1, 29], m = [1, 30], T = [1, 31], S = [1, 32], P = [1, 33], p = [1, 34], C = [1, 35], h = [1, 36], L = [1, 37], z = [1, 43], lt = [1, 42], ct = [1, 47], $ = [1, 50], w = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], Q = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36], E = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], ut = [1, 64], K = {
58
+ trace: function() {
59
+ },
60
+ yy: {},
61
+ symbols_: { error: 2, start: 3, eol: 4, XYCHART: 5, chartConfig: 6, document: 7, CHART_ORIENTATION: 8, statement: 9, title: 10, text: 11, X_AXIS: 12, parseXAxis: 13, Y_AXIS: 14, parseYAxis: 15, LINE: 16, plotData: 17, BAR: 18, acc_title: 19, acc_title_value: 20, acc_descr: 21, acc_descr_value: 22, acc_descr_multiline_value: 23, SQUARE_BRACES_START: 24, commaSeparatedNumbers: 25, SQUARE_BRACES_END: 26, NUMBER_WITH_DECIMAL: 27, COMMA: 28, xAxisData: 29, bandData: 30, ARROW_DELIMITER: 31, commaSeparatedTexts: 32, yAxisData: 33, NEWLINE: 34, SEMI: 35, EOF: 36, alphaNum: 37, STR: 38, MD_STR: 39, alphaNumToken: 40, AMP: 41, NUM: 42, ALPHA: 43, PLUS: 44, EQUALS: 45, MULT: 46, DOT: 47, BRKT: 48, MINUS: 49, UNDERSCORE: 50, $accept: 0, $end: 1 },
62
+ terminals_: { 2: "error", 5: "XYCHART", 8: "CHART_ORIENTATION", 10: "title", 12: "X_AXIS", 14: "Y_AXIS", 16: "LINE", 18: "BAR", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "SQUARE_BRACES_START", 26: "SQUARE_BRACES_END", 27: "NUMBER_WITH_DECIMAL", 28: "COMMA", 31: "ARROW_DELIMITER", 34: "NEWLINE", 35: "SEMI", 36: "EOF", 38: "STR", 39: "MD_STR", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "PLUS", 45: "EQUALS", 46: "MULT", 47: "DOT", 48: "BRKT", 49: "MINUS", 50: "UNDERSCORE" },
63
+ productions_: [0, [3, 2], [3, 3], [3, 2], [3, 1], [6, 1], [7, 0], [7, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 3], [9, 2], [9, 3], [9, 2], [9, 2], [9, 1], [17, 3], [25, 3], [25, 1], [13, 1], [13, 2], [13, 1], [29, 1], [29, 3], [30, 3], [32, 3], [32, 1], [15, 1], [15, 2], [15, 1], [33, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [37, 1], [37, 2], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1]],
64
+ performAction: function(r, l, u, g, b, a, F) {
65
+ var x = a.length - 1;
66
+ switch (b) {
67
+ case 5:
68
+ g.setOrientation(a[x]);
69
+ break;
70
+ case 9:
71
+ g.setDiagramTitle(a[x].text.trim());
72
+ break;
73
+ case 12:
74
+ g.setLineData({ text: "", type: "text" }, a[x]);
75
+ break;
76
+ case 13:
77
+ g.setLineData(a[x - 1], a[x]);
78
+ break;
79
+ case 14:
80
+ g.setBarData({ text: "", type: "text" }, a[x]);
81
+ break;
82
+ case 15:
83
+ g.setBarData(a[x - 1], a[x]);
84
+ break;
85
+ case 16:
86
+ this.$ = a[x].trim(), g.setAccTitle(this.$);
87
+ break;
88
+ case 17:
89
+ case 18:
90
+ this.$ = a[x].trim(), g.setAccDescription(this.$);
91
+ break;
92
+ case 19:
93
+ this.$ = a[x - 1];
94
+ break;
95
+ case 20:
96
+ this.$ = [Number(a[x - 2]), ...a[x]];
97
+ break;
98
+ case 21:
99
+ this.$ = [Number(a[x])];
100
+ break;
101
+ case 22:
102
+ g.setXAxisTitle(a[x]);
103
+ break;
104
+ case 23:
105
+ g.setXAxisTitle(a[x - 1]);
106
+ break;
107
+ case 24:
108
+ g.setXAxisTitle({ type: "text", text: "" });
109
+ break;
110
+ case 25:
111
+ g.setXAxisBand(a[x]);
112
+ break;
113
+ case 26:
114
+ g.setXAxisRangeData(Number(a[x - 2]), Number(a[x]));
115
+ break;
116
+ case 27:
117
+ this.$ = a[x - 1];
118
+ break;
119
+ case 28:
120
+ this.$ = [a[x - 2], ...a[x]];
121
+ break;
122
+ case 29:
123
+ this.$ = [a[x]];
124
+ break;
125
+ case 30:
126
+ g.setYAxisTitle(a[x]);
127
+ break;
128
+ case 31:
129
+ g.setYAxisTitle(a[x - 1]);
130
+ break;
131
+ case 32:
132
+ g.setYAxisTitle({ type: "text", text: "" });
133
+ break;
134
+ case 33:
135
+ g.setYAxisRangeData(Number(a[x - 2]), Number(a[x]));
136
+ break;
137
+ case 37:
138
+ this.$ = { text: a[x], type: "text" };
139
+ break;
140
+ case 38:
141
+ this.$ = { text: a[x], type: "text" };
142
+ break;
143
+ case 39:
144
+ this.$ = { text: a[x], type: "markdown" };
145
+ break;
146
+ case 40:
147
+ this.$ = a[x];
148
+ break;
149
+ case 41:
150
+ this.$ = a[x - 1] + "" + a[x];
151
+ break;
152
+ }
153
+ },
154
+ table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 34: n, 35: o, 36: c }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 34: n, 35: o, 36: c }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 34: n, 35: o, 36: c }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, e(f, [2, 34]), e(f, [2, 35]), e(f, [2, 36]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 34: n, 35: o, 36: c }), { 1: [2, 3] }, e(f, [2, 5]), e(t, [2, 7], { 4: 22, 34: n, 35: o, 36: c }), { 11: 23, 37: 24, 38: d, 39: R, 40: 27, 41: _, 42: A, 43: m, 44: T, 45: S, 46: P, 47: p, 48: C, 49: h, 50: L }, { 11: 39, 13: 38, 24: z, 27: lt, 29: 40, 30: 41, 37: 24, 38: d, 39: R, 40: 27, 41: _, 42: A, 43: m, 44: T, 45: S, 46: P, 47: p, 48: C, 49: h, 50: L }, { 11: 45, 15: 44, 27: ct, 33: 46, 37: 24, 38: d, 39: R, 40: 27, 41: _, 42: A, 43: m, 44: T, 45: S, 46: P, 47: p, 48: C, 49: h, 50: L }, { 11: 49, 17: 48, 24: $, 37: 24, 38: d, 39: R, 40: 27, 41: _, 42: A, 43: m, 44: T, 45: S, 46: P, 47: p, 48: C, 49: h, 50: L }, { 11: 52, 17: 51, 24: $, 37: 24, 38: d, 39: R, 40: 27, 41: _, 42: A, 43: m, 44: T, 45: S, 46: P, 47: p, 48: C, 49: h, 50: L }, { 20: [1, 53] }, { 22: [1, 54] }, e(w, [2, 18]), { 1: [2, 2] }, e(w, [2, 8]), e(w, [2, 9]), e(Q, [2, 37], { 40: 55, 41: _, 42: A, 43: m, 44: T, 45: S, 46: P, 47: p, 48: C, 49: h, 50: L }), e(Q, [2, 38]), e(Q, [2, 39]), e(E, [2, 40]), e(E, [2, 42]), e(E, [2, 43]), e(E, [2, 44]), e(E, [2, 45]), e(E, [2, 46]), e(E, [2, 47]), e(E, [2, 48]), e(E, [2, 49]), e(E, [2, 50]), e(E, [2, 51]), e(w, [2, 10]), e(w, [2, 22], { 30: 41, 29: 56, 24: z, 27: lt }), e(w, [2, 24]), e(w, [2, 25]), { 31: [1, 57] }, { 11: 59, 32: 58, 37: 24, 38: d, 39: R, 40: 27, 41: _, 42: A, 43: m, 44: T, 45: S, 46: P, 47: p, 48: C, 49: h, 50: L }, e(w, [2, 11]), e(w, [2, 30], { 33: 60, 27: ct }), e(w, [2, 32]), { 31: [1, 61] }, e(w, [2, 12]), { 17: 62, 24: $ }, { 25: 63, 27: ut }, e(w, [2, 14]), { 17: 65, 24: $ }, e(w, [2, 16]), e(w, [2, 17]), e(E, [2, 41]), e(w, [2, 23]), { 27: [1, 66] }, { 26: [1, 67] }, { 26: [2, 29], 28: [1, 68] }, e(w, [2, 31]), { 27: [1, 69] }, e(w, [2, 13]), { 26: [1, 70] }, { 26: [2, 21], 28: [1, 71] }, e(w, [2, 15]), e(w, [2, 26]), e(w, [2, 27]), { 11: 59, 32: 72, 37: 24, 38: d, 39: R, 40: 27, 41: _, 42: A, 43: m, 44: T, 45: S, 46: P, 47: p, 48: C, 49: h, 50: L }, e(w, [2, 33]), e(w, [2, 19]), { 25: 73, 27: ut }, { 26: [2, 28] }, { 26: [2, 20] }],
155
+ defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] },
156
+ parseError: function(r, l) {
157
+ if (l.recoverable)
158
+ this.trace(r);
159
+ else {
160
+ var u = new Error(r);
161
+ throw u.hash = l, u;
162
+ }
163
+ },
164
+ parse: function(r) {
165
+ var l = this, u = [0], g = [], b = [null], a = [], F = this.table, x = "", U = 0, gt = 0, Vt = 2, xt = 1, Wt = a.slice.call(arguments, 1), k = Object.create(this.lexer), W = { yy: {} };
166
+ for (var J in this.yy)
167
+ Object.prototype.hasOwnProperty.call(this.yy, J) && (W.yy[J] = this.yy[J]);
168
+ k.setInput(r, W.yy), W.yy.lexer = k, W.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
169
+ var tt = k.yylloc;
170
+ a.push(tt);
171
+ var Bt = k.options && k.options.ranges;
172
+ typeof W.yy.parseError == "function" ? this.parseError = W.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
173
+ function Ot() {
174
+ var I;
175
+ return I = g.pop() || k.lex() || xt, typeof I != "number" && (I instanceof Array && (g = I, I = g.pop()), I = l.symbols_[I] || I), I;
176
+ }
177
+ for (var D, B, v, it, O = {}, q, M, dt, j; ; ) {
178
+ if (B = u[u.length - 1], this.defaultActions[B] ? v = this.defaultActions[B] : ((D === null || typeof D > "u") && (D = Ot()), v = F[B] && F[B][D]), typeof v > "u" || !v.length || !v[0]) {
179
+ var et = "";
180
+ j = [];
181
+ for (q in F[B])
182
+ this.terminals_[q] && q > Vt && j.push("'" + this.terminals_[q] + "'");
183
+ k.showPosition ? et = "Parse error on line " + (U + 1) + `:
184
+ ` + k.showPosition() + `
185
+ Expecting ` + j.join(", ") + ", got '" + (this.terminals_[D] || D) + "'" : et = "Parse error on line " + (U + 1) + ": Unexpected " + (D == xt ? "end of input" : "'" + (this.terminals_[D] || D) + "'"), this.parseError(et, {
186
+ text: k.match,
187
+ token: this.terminals_[D] || D,
188
+ line: k.yylineno,
189
+ loc: tt,
190
+ expected: j
191
+ });
192
+ }
193
+ if (v[0] instanceof Array && v.length > 1)
194
+ throw new Error("Parse Error: multiple actions possible at state: " + B + ", token: " + D);
195
+ switch (v[0]) {
196
+ case 1:
197
+ u.push(D), b.push(k.yytext), a.push(k.yylloc), u.push(v[1]), D = null, gt = k.yyleng, x = k.yytext, U = k.yylineno, tt = k.yylloc;
198
+ break;
199
+ case 2:
200
+ if (M = this.productions_[v[1]][1], O.$ = b[b.length - M], O._$ = {
201
+ first_line: a[a.length - (M || 1)].first_line,
202
+ last_line: a[a.length - 1].last_line,
203
+ first_column: a[a.length - (M || 1)].first_column,
204
+ last_column: a[a.length - 1].last_column
205
+ }, Bt && (O._$.range = [
206
+ a[a.length - (M || 1)].range[0],
207
+ a[a.length - 1].range[1]
208
+ ]), it = this.performAction.apply(O, [
209
+ x,
210
+ gt,
211
+ U,
212
+ W.yy,
213
+ v[1],
214
+ b,
215
+ a
216
+ ].concat(Wt)), typeof it < "u")
217
+ return it;
218
+ M && (u = u.slice(0, -1 * M * 2), b = b.slice(0, -1 * M), a = a.slice(0, -1 * M)), u.push(this.productions_[v[1]][0]), b.push(O.$), a.push(O._$), dt = F[u[u.length - 2]][u[u.length - 1]], u.push(dt);
219
+ break;
220
+ case 3:
221
+ return !0;
222
+ }
223
+ }
224
+ return !0;
225
+ }
226
+ }, It = /* @__PURE__ */ (function() {
227
+ var V = {
228
+ EOF: 1,
229
+ parseError: function(l, u) {
230
+ if (this.yy.parser)
231
+ this.yy.parser.parseError(l, u);
232
+ else
233
+ throw new Error(l);
234
+ },
235
+ // resets the lexer, sets new input
236
+ setInput: function(r, l) {
237
+ return this.yy = l || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
238
+ first_line: 1,
239
+ first_column: 0,
240
+ last_line: 1,
241
+ last_column: 0
242
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
243
+ },
244
+ // consumes and returns one char from the input
245
+ input: function() {
246
+ var r = this._input[0];
247
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
248
+ var l = r.match(/(?:\r\n?|\n).*/g);
249
+ return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
250
+ },
251
+ // unshifts one char (or a string) into the input
252
+ unput: function(r) {
253
+ var l = r.length, u = r.split(/(?:\r\n?|\n)/g);
254
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
255
+ var g = this.match.split(/(?:\r\n?|\n)/g);
256
+ 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);
257
+ var b = this.yylloc.range;
258
+ return this.yylloc = {
259
+ first_line: this.yylloc.first_line,
260
+ last_line: this.yylineno + 1,
261
+ first_column: this.yylloc.first_column,
262
+ last_column: u ? (u.length === g.length ? this.yylloc.first_column : 0) + g[g.length - u.length].length - u[0].length : this.yylloc.first_column - l
263
+ }, this.options.ranges && (this.yylloc.range = [b[0], b[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
264
+ },
265
+ // When called from action, caches matched text and appends it on next action
266
+ more: function() {
267
+ return this._more = !0, this;
268
+ },
269
+ // 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.
270
+ reject: function() {
271
+ if (this.options.backtrack_lexer)
272
+ this._backtrack = !0;
273
+ else
274
+ 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).
275
+ ` + this.showPosition(), {
276
+ text: "",
277
+ token: null,
278
+ line: this.yylineno
279
+ });
280
+ return this;
281
+ },
282
+ // retain first n characters of the match
283
+ less: function(r) {
284
+ this.unput(this.match.slice(r));
285
+ },
286
+ // displays already matched input, i.e. for error messages
287
+ pastInput: function() {
288
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
289
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
290
+ },
291
+ // displays upcoming input, i.e. for error messages
292
+ upcomingInput: function() {
293
+ var r = this.match;
294
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
295
+ },
296
+ // displays the character position where the lexing error occurred, i.e. for error messages
297
+ showPosition: function() {
298
+ var r = this.pastInput(), l = new Array(r.length + 1).join("-");
299
+ return r + this.upcomingInput() + `
300
+ ` + l + "^";
301
+ },
302
+ // test the lexed token: return FALSE when not a match, otherwise return token
303
+ test_match: function(r, l) {
304
+ var u, g, b;
305
+ if (this.options.backtrack_lexer && (b = {
306
+ yylineno: this.yylineno,
307
+ yylloc: {
308
+ first_line: this.yylloc.first_line,
309
+ last_line: this.last_line,
310
+ first_column: this.yylloc.first_column,
311
+ last_column: this.yylloc.last_column
312
+ },
313
+ yytext: this.yytext,
314
+ match: this.match,
315
+ matches: this.matches,
316
+ matched: this.matched,
317
+ yyleng: this.yyleng,
318
+ offset: this.offset,
319
+ _more: this._more,
320
+ _input: this._input,
321
+ yy: this.yy,
322
+ conditionStack: this.conditionStack.slice(0),
323
+ done: this.done
324
+ }, this.options.ranges && (b.yylloc.range = this.yylloc.range.slice(0))), g = r[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
325
+ first_line: this.yylloc.last_line,
326
+ last_line: this.yylineno + 1,
327
+ first_column: this.yylloc.last_column,
328
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
329
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], u = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u)
330
+ return u;
331
+ if (this._backtrack) {
332
+ for (var a in b)
333
+ this[a] = b[a];
334
+ return !1;
335
+ }
336
+ return !1;
337
+ },
338
+ // return next match in input
339
+ next: function() {
340
+ if (this.done)
341
+ return this.EOF;
342
+ this._input || (this.done = !0);
343
+ var r, l, u, g;
344
+ this._more || (this.yytext = "", this.match = "");
345
+ for (var b = this._currentRules(), a = 0; a < b.length; a++)
346
+ if (u = this._input.match(this.rules[b[a]]), u && (!l || u[0].length > l[0].length)) {
347
+ if (l = u, g = a, this.options.backtrack_lexer) {
348
+ if (r = this.test_match(u, b[a]), r !== !1)
349
+ return r;
350
+ if (this._backtrack) {
351
+ l = !1;
352
+ continue;
353
+ } else
354
+ return !1;
355
+ } else if (!this.options.flex)
356
+ break;
357
+ }
358
+ return l ? (r = this.test_match(l, b[g]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
359
+ ` + this.showPosition(), {
360
+ text: "",
361
+ token: null,
362
+ line: this.yylineno
363
+ });
364
+ },
365
+ // return next match that has a token
366
+ lex: function() {
367
+ var l = this.next();
368
+ return l || this.lex();
369
+ },
370
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
371
+ begin: function(l) {
372
+ this.conditionStack.push(l);
373
+ },
374
+ // pop the previously active lexer condition state off the condition stack
375
+ popState: function() {
376
+ var l = this.conditionStack.length - 1;
377
+ return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
378
+ },
379
+ // produce the lexer rule set which is active for the currently active lexer condition state
380
+ _currentRules: function() {
381
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
382
+ },
383
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
384
+ topState: function(l) {
385
+ return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
386
+ },
387
+ // alias for begin(condition)
388
+ pushState: function(l) {
389
+ this.begin(l);
390
+ },
391
+ // return the number of states currently on the stack
392
+ stateStackSize: function() {
393
+ return this.conditionStack.length;
394
+ },
395
+ options: { "case-insensitive": !0 },
396
+ performAction: function(l, u, g, b) {
397
+ switch (g) {
398
+ case 0:
399
+ break;
400
+ case 1:
401
+ break;
402
+ case 2:
403
+ return this.popState(), 34;
404
+ case 3:
405
+ return this.popState(), 34;
406
+ case 4:
407
+ return 34;
408
+ case 5:
409
+ break;
410
+ case 6:
411
+ return 10;
412
+ case 7:
413
+ return this.pushState("acc_title"), 19;
414
+ case 8:
415
+ return this.popState(), "acc_title_value";
416
+ case 9:
417
+ return this.pushState("acc_descr"), 21;
418
+ case 10:
419
+ return this.popState(), "acc_descr_value";
420
+ case 11:
421
+ this.pushState("acc_descr_multiline");
422
+ break;
423
+ case 12:
424
+ this.popState();
425
+ break;
426
+ case 13:
427
+ return "acc_descr_multiline_value";
428
+ case 14:
429
+ return 5;
430
+ case 15:
431
+ return 8;
432
+ case 16:
433
+ return this.pushState("axis_data"), "X_AXIS";
434
+ case 17:
435
+ return this.pushState("axis_data"), "Y_AXIS";
436
+ case 18:
437
+ return this.pushState("axis_band_data"), 24;
438
+ case 19:
439
+ return 31;
440
+ case 20:
441
+ return this.pushState("data"), 16;
442
+ case 21:
443
+ return this.pushState("data"), 18;
444
+ case 22:
445
+ return this.pushState("data_inner"), 24;
446
+ case 23:
447
+ return 27;
448
+ case 24:
449
+ return this.popState(), 26;
450
+ case 25:
451
+ this.popState();
452
+ break;
453
+ case 26:
454
+ this.pushState("string");
455
+ break;
456
+ case 27:
457
+ this.popState();
458
+ break;
459
+ case 28:
460
+ return "STR";
461
+ case 29:
462
+ return 24;
463
+ case 30:
464
+ return 26;
465
+ case 31:
466
+ return 43;
467
+ case 32:
468
+ return "COLON";
469
+ case 33:
470
+ return 44;
471
+ case 34:
472
+ return 28;
473
+ case 35:
474
+ return 45;
475
+ case 36:
476
+ return 46;
477
+ case 37:
478
+ return 48;
479
+ case 38:
480
+ return 50;
481
+ case 39:
482
+ return 47;
483
+ case 40:
484
+ return 41;
485
+ case 41:
486
+ return 49;
487
+ case 42:
488
+ return 42;
489
+ case 43:
490
+ break;
491
+ case 44:
492
+ return 35;
493
+ case 45:
494
+ return 36;
495
+ }
496
+ },
497
+ rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:(\r?\n))/i, /^(?:(\r?\n))/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:\{)/i, /^(?:[^\}]*)/i, /^(?:xychart-beta\b)/i, /^(?:(?:vertical|horizontal))/i, /^(?:x-axis\b)/i, /^(?:y-axis\b)/i, /^(?:\[)/i, /^(?:-->)/i, /^(?:line\b)/i, /^(?:bar\b)/i, /^(?:\[)/i, /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i, /^(?:\])/i, /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s+)/i, /^(?:;)/i, /^(?:$)/i],
498
+ conditions: { data_inner: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 }, data: { rules: [0, 1, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 22, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 }, axis_band_data: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 }, axis_data: { rules: [0, 1, 2, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 }, acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [], inclusive: !1 }, md_string: { rules: [], inclusive: !1 }, string: { rules: [27, 28], inclusive: !1 }, INITIAL: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], inclusive: !0 } }
499
+ };
500
+ return V;
501
+ })();
502
+ K.lexer = It;
503
+ function Z() {
504
+ this.yy = {};
505
+ }
506
+ return Z.prototype = K, K.Parser = Z, new Z();
507
+ })();
508
+ nt.parser = nt;
509
+ const ti = nt;
510
+ function mt(e) {
511
+ return e.type === "bar";
512
+ }
513
+ function _t(e) {
514
+ return e.type === "band";
515
+ }
516
+ function N(e) {
517
+ return e.type === "linear";
518
+ }
519
+ class kt {
520
+ constructor(t) {
521
+ this.parentGroup = t;
522
+ }
523
+ getMaxDimension(t, i) {
524
+ if (!this.parentGroup)
525
+ return {
526
+ width: t.reduce((o, c) => Math.max(c.length, o), 0) * i,
527
+ height: i
528
+ };
529
+ const s = {
530
+ width: 0,
531
+ height: 0
532
+ }, n = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
533
+ for (const o of t) {
534
+ const c = Qt(n, 1, o), f = c ? c.width : o.length * i, d = c ? c.height : i;
535
+ s.width = Math.max(s.width, f), s.height = Math.max(s.height, d);
536
+ }
537
+ return n.remove(), s;
538
+ }
539
+ }
540
+ const yt = 0.7, bt = 0.2;
541
+ class Rt {
542
+ constructor(t, i, s, n) {
543
+ this.axisConfig = t, this.title = i, this.textDimensionCalculator = s, this.axisThemeConfig = n, this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left", this.showTitle = !1, this.showLabel = !1, this.showTick = !1, this.showAxisLine = !1, this.outerPadding = 0, this.titleTextHeight = 0, this.labelTextHeight = 0, this.range = [0, 10], this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left";
544
+ }
545
+ setRange(t) {
546
+ this.range = t, this.axisPosition === "left" || this.axisPosition === "right" ? this.boundingRect.height = t[1] - t[0] : this.boundingRect.width = t[1] - t[0], this.recalculateScale();
547
+ }
548
+ getRange() {
549
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
550
+ }
551
+ setAxisPosition(t) {
552
+ this.axisPosition = t, this.setRange(this.range);
553
+ }
554
+ getTickDistance() {
555
+ const t = this.getRange();
556
+ return Math.abs(t[0] - t[1]) / this.getTickValues().length;
557
+ }
558
+ getAxisOuterPadding() {
559
+ return this.outerPadding;
560
+ }
561
+ getLabelDimension() {
562
+ return this.textDimensionCalculator.getMaxDimension(
563
+ this.getTickValues().map((t) => t.toString()),
564
+ this.axisConfig.labelFontSize
565
+ );
566
+ }
567
+ recalculateOuterPaddingToDrawBar() {
568
+ yt * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(yt * this.getTickDistance() / 2)), this.recalculateScale();
569
+ }
570
+ calculateSpaceIfDrawnHorizontally(t) {
571
+ let i = t.height;
572
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
573
+ const s = this.getLabelDimension(), n = bt * t.width;
574
+ this.outerPadding = Math.min(s.width / 2, n);
575
+ const o = s.height + this.axisConfig.labelPadding * 2;
576
+ this.labelTextHeight = s.height, o <= i && (i -= o, this.showLabel = !0);
577
+ }
578
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
579
+ const s = this.textDimensionCalculator.getMaxDimension(
580
+ [this.title],
581
+ this.axisConfig.titleFontSize
582
+ ), n = s.height + this.axisConfig.titlePadding * 2;
583
+ this.titleTextHeight = s.height, n <= i && (i -= n, this.showTitle = !0);
584
+ }
585
+ this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
586
+ }
587
+ calculateSpaceIfDrawnVertical(t) {
588
+ let i = t.width;
589
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
590
+ const s = this.getLabelDimension(), n = bt * t.height;
591
+ this.outerPadding = Math.min(s.height / 2, n);
592
+ const o = s.width + this.axisConfig.labelPadding * 2;
593
+ o <= i && (i -= o, this.showLabel = !0);
594
+ }
595
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
596
+ const s = this.textDimensionCalculator.getMaxDimension(
597
+ [this.title],
598
+ this.axisConfig.titleFontSize
599
+ ), n = s.height + this.axisConfig.titlePadding * 2;
600
+ this.titleTextHeight = s.height, n <= i && (i -= n, this.showTitle = !0);
601
+ }
602
+ this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
603
+ }
604
+ calculateSpace(t) {
605
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
606
+ width: this.boundingRect.width,
607
+ height: this.boundingRect.height
608
+ };
609
+ }
610
+ setBoundingBoxXY(t) {
611
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
612
+ }
613
+ getDrawableElementsForLeftAxis() {
614
+ const t = [];
615
+ if (this.showAxisLine) {
616
+ const i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
617
+ t.push({
618
+ type: "path",
619
+ groupTexts: ["left-axis", "axisl-line"],
620
+ data: [
621
+ {
622
+ path: `M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y + this.boundingRect.height} `,
623
+ strokeFill: this.axisThemeConfig.axisLineColor,
624
+ strokeWidth: this.axisConfig.axisLineWidth
625
+ }
626
+ ]
627
+ });
628
+ }
629
+ if (this.showLabel && t.push({
630
+ type: "text",
631
+ groupTexts: ["left-axis", "label"],
632
+ data: this.getTickValues().map((i) => ({
633
+ text: i.toString(),
634
+ x: this.boundingRect.x + this.boundingRect.width - (this.showLabel ? this.axisConfig.labelPadding : 0) - (this.showTick ? this.axisConfig.tickLength : 0) - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
635
+ y: this.getScaleValue(i),
636
+ fill: this.axisThemeConfig.labelColor,
637
+ fontSize: this.axisConfig.labelFontSize,
638
+ rotation: 0,
639
+ verticalPos: "middle",
640
+ horizontalPos: "right"
641
+ }))
642
+ }), this.showTick) {
643
+ const i = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
644
+ t.push({
645
+ type: "path",
646
+ groupTexts: ["left-axis", "ticks"],
647
+ data: this.getTickValues().map((s) => ({
648
+ path: `M ${i},${this.getScaleValue(s)} L ${i - this.axisConfig.tickLength},${this.getScaleValue(s)}`,
649
+ strokeFill: this.axisThemeConfig.tickColor,
650
+ strokeWidth: this.axisConfig.tickWidth
651
+ }))
652
+ });
653
+ }
654
+ return this.showTitle && t.push({
655
+ type: "text",
656
+ groupTexts: ["left-axis", "title"],
657
+ data: [
658
+ {
659
+ text: this.title,
660
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
661
+ y: this.boundingRect.y + this.boundingRect.height / 2,
662
+ fill: this.axisThemeConfig.titleColor,
663
+ fontSize: this.axisConfig.titleFontSize,
664
+ rotation: 270,
665
+ verticalPos: "top",
666
+ horizontalPos: "center"
667
+ }
668
+ ]
669
+ }), t;
670
+ }
671
+ getDrawableElementsForBottomAxis() {
672
+ const t = [];
673
+ if (this.showAxisLine) {
674
+ const i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
675
+ t.push({
676
+ type: "path",
677
+ groupTexts: ["bottom-axis", "axis-line"],
678
+ data: [
679
+ {
680
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
681
+ strokeFill: this.axisThemeConfig.axisLineColor,
682
+ strokeWidth: this.axisConfig.axisLineWidth
683
+ }
684
+ ]
685
+ });
686
+ }
687
+ if (this.showLabel && t.push({
688
+ type: "text",
689
+ groupTexts: ["bottom-axis", "label"],
690
+ data: this.getTickValues().map((i) => ({
691
+ text: i.toString(),
692
+ x: this.getScaleValue(i),
693
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
694
+ fill: this.axisThemeConfig.labelColor,
695
+ fontSize: this.axisConfig.labelFontSize,
696
+ rotation: 0,
697
+ verticalPos: "top",
698
+ horizontalPos: "center"
699
+ }))
700
+ }), this.showTick) {
701
+ const i = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
702
+ t.push({
703
+ type: "path",
704
+ groupTexts: ["bottom-axis", "ticks"],
705
+ data: this.getTickValues().map((s) => ({
706
+ path: `M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i + this.axisConfig.tickLength}`,
707
+ strokeFill: this.axisThemeConfig.tickColor,
708
+ strokeWidth: this.axisConfig.tickWidth
709
+ }))
710
+ });
711
+ }
712
+ return this.showTitle && t.push({
713
+ type: "text",
714
+ groupTexts: ["bottom-axis", "title"],
715
+ data: [
716
+ {
717
+ text: this.title,
718
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
719
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
720
+ fill: this.axisThemeConfig.titleColor,
721
+ fontSize: this.axisConfig.titleFontSize,
722
+ rotation: 0,
723
+ verticalPos: "top",
724
+ horizontalPos: "center"
725
+ }
726
+ ]
727
+ }), t;
728
+ }
729
+ getDrawableElementsForTopAxis() {
730
+ const t = [];
731
+ if (this.showAxisLine) {
732
+ const i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
733
+ t.push({
734
+ type: "path",
735
+ groupTexts: ["top-axis", "axis-line"],
736
+ data: [
737
+ {
738
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
739
+ strokeFill: this.axisThemeConfig.axisLineColor,
740
+ strokeWidth: this.axisConfig.axisLineWidth
741
+ }
742
+ ]
743
+ });
744
+ }
745
+ if (this.showLabel && t.push({
746
+ type: "text",
747
+ groupTexts: ["top-axis", "label"],
748
+ data: this.getTickValues().map((i) => ({
749
+ text: i.toString(),
750
+ x: this.getScaleValue(i),
751
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
752
+ fill: this.axisThemeConfig.labelColor,
753
+ fontSize: this.axisConfig.labelFontSize,
754
+ rotation: 0,
755
+ verticalPos: "top",
756
+ horizontalPos: "center"
757
+ }))
758
+ }), this.showTick) {
759
+ const i = this.boundingRect.y;
760
+ t.push({
761
+ type: "path",
762
+ groupTexts: ["top-axis", "ticks"],
763
+ data: this.getTickValues().map((s) => ({
764
+ path: `M ${this.getScaleValue(s)},${i + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(s)},${i + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
765
+ strokeFill: this.axisThemeConfig.tickColor,
766
+ strokeWidth: this.axisConfig.tickWidth
767
+ }))
768
+ });
769
+ }
770
+ return this.showTitle && t.push({
771
+ type: "text",
772
+ groupTexts: ["top-axis", "title"],
773
+ data: [
774
+ {
775
+ text: this.title,
776
+ x: this.boundingRect.x + this.boundingRect.width / 2,
777
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
778
+ fill: this.axisThemeConfig.titleColor,
779
+ fontSize: this.axisConfig.titleFontSize,
780
+ rotation: 0,
781
+ verticalPos: "top",
782
+ horizontalPos: "center"
783
+ }
784
+ ]
785
+ }), t;
786
+ }
787
+ getDrawableElements() {
788
+ if (this.axisPosition === "left")
789
+ return this.getDrawableElementsForLeftAxis();
790
+ if (this.axisPosition === "right")
791
+ throw Error("Drawing of right axis is not implemented");
792
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
793
+ }
794
+ }
795
+ class ii extends Rt {
796
+ constructor(t, i, s, n, o) {
797
+ super(t, n, o, i), this.categories = s, this.scale = st().domain(this.categories).range(this.getRange());
798
+ }
799
+ setRange(t) {
800
+ super.setRange(t);
801
+ }
802
+ recalculateScale() {
803
+ this.scale = st().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), St.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
804
+ }
805
+ getTickValues() {
806
+ return this.categories;
807
+ }
808
+ getScaleValue(t) {
809
+ return this.scale(t) || this.getRange()[0];
810
+ }
811
+ }
812
+ class ei extends Rt {
813
+ constructor(t, i, s, n, o) {
814
+ super(t, n, o, i), this.domain = s, this.scale = ft().domain(this.domain).range(this.getRange());
815
+ }
816
+ getTickValues() {
817
+ return this.scale.ticks();
818
+ }
819
+ recalculateScale() {
820
+ const t = [...this.domain];
821
+ this.axisPosition === "left" && t.reverse(), this.scale = ft().domain(t).range(this.getRange());
822
+ }
823
+ getScaleValue(t) {
824
+ return this.scale(t);
825
+ }
826
+ }
827
+ function At(e, t, i, s) {
828
+ const n = new kt(s);
829
+ return _t(e) ? new ii(
830
+ t,
831
+ i,
832
+ e.categories,
833
+ e.title,
834
+ n
835
+ ) : new ei(
836
+ t,
837
+ i,
838
+ [e.min, e.max],
839
+ e.title,
840
+ n
841
+ );
842
+ }
843
+ class si {
844
+ constructor(t, i, s, n) {
845
+ this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = n, this.boundingRect = {
846
+ x: 0,
847
+ y: 0,
848
+ width: 0,
849
+ height: 0
850
+ }, this.showChartTitle = !1;
851
+ }
852
+ setBoundingBoxXY(t) {
853
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
854
+ }
855
+ calculateSpace(t) {
856
+ const i = this.textDimensionCalculator.getMaxDimension(
857
+ [this.chartData.title],
858
+ this.chartConfig.titleFontSize
859
+ ), s = Math.max(i.width, t.width), n = i.height + 2 * this.chartConfig.titlePadding;
860
+ return i.width <= s && i.height <= n && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = s, this.boundingRect.height = n, this.showChartTitle = !0), {
861
+ width: this.boundingRect.width,
862
+ height: this.boundingRect.height
863
+ };
864
+ }
865
+ getDrawableElements() {
866
+ const t = [];
867
+ return this.showChartTitle && t.push({
868
+ groupTexts: ["chart-title"],
869
+ type: "text",
870
+ data: [
871
+ {
872
+ fontSize: this.chartConfig.titleFontSize,
873
+ text: this.chartData.title,
874
+ verticalPos: "middle",
875
+ horizontalPos: "center",
876
+ x: this.boundingRect.x + this.boundingRect.width / 2,
877
+ y: this.boundingRect.y + this.boundingRect.height / 2,
878
+ fill: this.chartThemeConfig.titleColor,
879
+ rotation: 0
880
+ }
881
+ ]
882
+ }), t;
883
+ }
884
+ }
885
+ function ni(e, t, i, s) {
886
+ const n = new kt(s);
887
+ return new si(n, e, t, i);
888
+ }
889
+ class ai {
890
+ constructor(t, i, s, n, o) {
891
+ this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = n, this.plotIndex = o;
892
+ }
893
+ getDrawableElement() {
894
+ const t = this.plotData.data.map((s) => [
895
+ this.xAxis.getScaleValue(s[0]),
896
+ this.yAxis.getScaleValue(s[1])
897
+ ]);
898
+ let i;
899
+ return this.orientation === "horizontal" ? i = pt().y((s) => s[0]).x((s) => s[1])(t) : i = pt().x((s) => s[0]).y((s) => s[1])(t), i ? [
900
+ {
901
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
902
+ type: "path",
903
+ data: [
904
+ {
905
+ path: i,
906
+ strokeFill: this.plotData.strokeFill,
907
+ strokeWidth: this.plotData.strokeWidth
908
+ }
909
+ ]
910
+ }
911
+ ] : [];
912
+ }
913
+ }
914
+ class oi {
915
+ constructor(t, i, s, n, o, c) {
916
+ this.barData = t, this.boundingRect = i, this.xAxis = s, this.yAxis = n, this.orientation = o, this.plotIndex = c;
917
+ }
918
+ getDrawableElement() {
919
+ const t = this.barData.data.map((o) => [
920
+ this.xAxis.getScaleValue(o[0]),
921
+ this.yAxis.getScaleValue(o[1])
922
+ ]), s = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - 0.05), n = s / 2;
923
+ return this.orientation === "horizontal" ? [
924
+ {
925
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
926
+ type: "rect",
927
+ data: t.map((o) => ({
928
+ x: this.boundingRect.x,
929
+ y: o[0] - n,
930
+ height: s,
931
+ width: o[1] - this.boundingRect.x,
932
+ fill: this.barData.fill,
933
+ strokeWidth: 0,
934
+ strokeFill: this.barData.fill
935
+ }))
936
+ }
937
+ ] : [
938
+ {
939
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
940
+ type: "rect",
941
+ data: t.map((o) => ({
942
+ x: o[0] - n,
943
+ y: o[1],
944
+ width: s,
945
+ height: this.boundingRect.y + this.boundingRect.height - o[1],
946
+ fill: this.barData.fill,
947
+ strokeWidth: 0,
948
+ strokeFill: this.barData.fill
949
+ }))
950
+ }
951
+ ];
952
+ }
953
+ }
954
+ class ri {
955
+ constructor(t, i, s) {
956
+ this.chartConfig = t, this.chartData = i, this.chartThemeConfig = s, this.boundingRect = {
957
+ x: 0,
958
+ y: 0,
959
+ width: 0,
960
+ height: 0
961
+ };
962
+ }
963
+ setAxes(t, i) {
964
+ this.xAxis = t, this.yAxis = i;
965
+ }
966
+ setBoundingBoxXY(t) {
967
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
968
+ }
969
+ calculateSpace(t) {
970
+ return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
971
+ width: this.boundingRect.width,
972
+ height: this.boundingRect.height
973
+ };
974
+ }
975
+ getDrawableElements() {
976
+ if (!(this.xAxis && this.yAxis))
977
+ throw Error("Axes must be passed to render Plots");
978
+ const t = [];
979
+ for (const [i, s] of this.chartData.plots.entries())
980
+ switch (s.type) {
981
+ case "line":
982
+ {
983
+ const n = new ai(
984
+ s,
985
+ this.xAxis,
986
+ this.yAxis,
987
+ this.chartConfig.chartOrientation,
988
+ i
989
+ );
990
+ t.push(...n.getDrawableElement());
991
+ }
992
+ break;
993
+ case "bar":
994
+ {
995
+ const n = new oi(
996
+ s,
997
+ this.boundingRect,
998
+ this.xAxis,
999
+ this.yAxis,
1000
+ this.chartConfig.chartOrientation,
1001
+ i
1002
+ );
1003
+ t.push(...n.getDrawableElement());
1004
+ }
1005
+ break;
1006
+ }
1007
+ return t;
1008
+ }
1009
+ }
1010
+ function hi(e, t, i) {
1011
+ return new ri(e, t, i);
1012
+ }
1013
+ class li {
1014
+ constructor(t, i, s, n) {
1015
+ this.chartConfig = t, this.chartData = i, this.componentStore = {
1016
+ title: ni(t, i, s, n),
1017
+ plot: hi(t, i, s),
1018
+ xAxis: At(
1019
+ i.xAxis,
1020
+ t.xAxis,
1021
+ {
1022
+ titleColor: s.xAxisTitleColor,
1023
+ labelColor: s.xAxisLabelColor,
1024
+ tickColor: s.xAxisTickColor,
1025
+ axisLineColor: s.xAxisLineColor
1026
+ },
1027
+ n
1028
+ ),
1029
+ yAxis: At(
1030
+ i.yAxis,
1031
+ t.yAxis,
1032
+ {
1033
+ titleColor: s.yAxisTitleColor,
1034
+ labelColor: s.yAxisLabelColor,
1035
+ tickColor: s.yAxisTickColor,
1036
+ axisLineColor: s.yAxisLineColor
1037
+ },
1038
+ n
1039
+ )
1040
+ };
1041
+ }
1042
+ calculateVerticalSpace() {
1043
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), c = Math.floor(
1044
+ i * this.chartConfig.plotReservedSpacePercent / 100
1045
+ ), f = this.componentStore.plot.calculateSpace({
1046
+ width: o,
1047
+ height: c
1048
+ });
1049
+ t -= f.width, i -= f.height, f = this.componentStore.title.calculateSpace({
1050
+ width: this.chartConfig.width,
1051
+ height: i
1052
+ }), n = f.height, i -= f.height, this.componentStore.xAxis.setAxisPosition("bottom"), f = this.componentStore.xAxis.calculateSpace({
1053
+ width: t,
1054
+ height: i
1055
+ }), i -= f.height, this.componentStore.yAxis.setAxisPosition("left"), f = this.componentStore.yAxis.calculateSpace({
1056
+ width: t,
1057
+ height: i
1058
+ }), s = f.width, t -= f.width, t > 0 && (o += t, t = 0), i > 0 && (c += i, i = 0), this.componentStore.plot.calculateSpace({
1059
+ width: o,
1060
+ height: c
1061
+ }), this.componentStore.plot.setBoundingBoxXY({ x: s, y: n }), this.componentStore.xAxis.setRange([s, s + o]), this.componentStore.xAxis.setBoundingBoxXY({ x: s, y: n + c }), this.componentStore.yAxis.setRange([n, n + c]), this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: n }), this.chartData.plots.some((d) => mt(d)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1062
+ }
1063
+ calculateHorizontalSpace() {
1064
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = 0, c = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), f = Math.floor(
1065
+ i * this.chartConfig.plotReservedSpacePercent / 100
1066
+ ), d = this.componentStore.plot.calculateSpace({
1067
+ width: c,
1068
+ height: f
1069
+ });
1070
+ t -= d.width, i -= d.height, d = this.componentStore.title.calculateSpace({
1071
+ width: this.chartConfig.width,
1072
+ height: i
1073
+ }), s = d.height, i -= d.height, this.componentStore.xAxis.setAxisPosition("left"), d = this.componentStore.xAxis.calculateSpace({
1074
+ width: t,
1075
+ height: i
1076
+ }), t -= d.width, n = d.width, this.componentStore.yAxis.setAxisPosition("top"), d = this.componentStore.yAxis.calculateSpace({
1077
+ width: t,
1078
+ height: i
1079
+ }), i -= d.height, o = s + d.height, t > 0 && (c += t, t = 0), i > 0 && (f += i, i = 0), this.componentStore.plot.calculateSpace({
1080
+ width: c,
1081
+ height: f
1082
+ }), this.componentStore.plot.setBoundingBoxXY({ x: n, y: o }), this.componentStore.yAxis.setRange([n, n + c]), this.componentStore.yAxis.setBoundingBoxXY({ x: n, y: s }), this.componentStore.xAxis.setRange([o, o + f]), this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: o }), this.chartData.plots.some((R) => mt(R)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1083
+ }
1084
+ calculateSpace() {
1085
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1086
+ }
1087
+ getDrawableElement() {
1088
+ this.calculateSpace();
1089
+ const t = [];
1090
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1091
+ for (const i of Object.values(this.componentStore))
1092
+ t.push(...i.getDrawableElements());
1093
+ return t;
1094
+ }
1095
+ }
1096
+ class ci {
1097
+ static build(t, i, s, n) {
1098
+ return new li(t, i, s, n).getDrawableElement();
1099
+ }
1100
+ }
1101
+ let X = 0, Tt, Y = Pt(), H = Dt(), y = Lt(), at = H.plotColorPalette.split(",").map((e) => e.trim()), G = !1, rt = !1;
1102
+ function Dt() {
1103
+ const e = jt(), t = ot();
1104
+ return Ct(e.xyChart, t.themeVariables.xyChart);
1105
+ }
1106
+ function Pt() {
1107
+ const e = ot();
1108
+ return Ct(
1109
+ qt.xyChart,
1110
+ e.xyChart
1111
+ );
1112
+ }
1113
+ function Lt() {
1114
+ return {
1115
+ yAxis: {
1116
+ type: "linear",
1117
+ title: "",
1118
+ min: 1 / 0,
1119
+ max: -1 / 0
1120
+ },
1121
+ xAxis: {
1122
+ type: "band",
1123
+ title: "",
1124
+ categories: []
1125
+ },
1126
+ title: "",
1127
+ plots: []
1128
+ };
1129
+ }
1130
+ function ht(e) {
1131
+ const t = ot();
1132
+ return Gt(e.trim(), t);
1133
+ }
1134
+ function ui(e) {
1135
+ Tt = e;
1136
+ }
1137
+ function gi(e) {
1138
+ e === "horizontal" ? Y.chartOrientation = "horizontal" : Y.chartOrientation = "vertical";
1139
+ }
1140
+ function xi(e) {
1141
+ y.xAxis.title = ht(e.text);
1142
+ }
1143
+ function Et(e, t) {
1144
+ y.xAxis = { type: "linear", title: y.xAxis.title, min: e, max: t }, G = !0;
1145
+ }
1146
+ function di(e) {
1147
+ y.xAxis = {
1148
+ type: "band",
1149
+ title: y.xAxis.title,
1150
+ categories: e.map((t) => ht(t.text))
1151
+ }, G = !0;
1152
+ }
1153
+ function fi(e) {
1154
+ y.yAxis.title = ht(e.text);
1155
+ }
1156
+ function pi(e, t) {
1157
+ y.yAxis = { type: "linear", title: y.yAxis.title, min: e, max: t }, rt = !0;
1158
+ }
1159
+ function mi(e) {
1160
+ const t = Math.min(...e), i = Math.max(...e), s = N(y.yAxis) ? y.yAxis.min : 1 / 0, n = N(y.yAxis) ? y.yAxis.max : -1 / 0;
1161
+ y.yAxis = {
1162
+ type: "linear",
1163
+ title: y.yAxis.title,
1164
+ min: Math.min(s, t),
1165
+ max: Math.max(n, i)
1166
+ };
1167
+ }
1168
+ function vt(e) {
1169
+ let t = [];
1170
+ if (e.length === 0)
1171
+ return t;
1172
+ if (!G) {
1173
+ const i = N(y.xAxis) ? y.xAxis.min : 1 / 0, s = N(y.xAxis) ? y.xAxis.max : -1 / 0;
1174
+ Et(Math.min(i, 1), Math.max(s, e.length));
1175
+ }
1176
+ if (rt || mi(e), _t(y.xAxis) && (t = y.xAxis.categories.map((i, s) => [i, e[s]])), N(y.xAxis)) {
1177
+ const i = y.xAxis.min, s = y.xAxis.max, n = (s - i + 1) / e.length, o = [];
1178
+ for (let c = i; c <= s; c += n)
1179
+ o.push(`${c}`);
1180
+ t = o.map((c, f) => [c, e[f]]);
1181
+ }
1182
+ return t;
1183
+ }
1184
+ function Mt(e) {
1185
+ return at[e === 0 ? 0 : e % at.length];
1186
+ }
1187
+ function yi(e, t) {
1188
+ const i = vt(t);
1189
+ y.plots.push({
1190
+ type: "line",
1191
+ strokeFill: Mt(X),
1192
+ strokeWidth: 2,
1193
+ data: i
1194
+ }), X++;
1195
+ }
1196
+ function bi(e, t) {
1197
+ const i = vt(t);
1198
+ y.plots.push({
1199
+ type: "bar",
1200
+ fill: Mt(X),
1201
+ data: i
1202
+ }), X++;
1203
+ }
1204
+ function Ai() {
1205
+ if (y.plots.length === 0)
1206
+ throw Error("No Plot to render, please provide a plot with some data");
1207
+ return y.title = wt(), ci.build(Y, y, H, Tt);
1208
+ }
1209
+ function wi() {
1210
+ return H;
1211
+ }
1212
+ function Si() {
1213
+ return Y;
1214
+ }
1215
+ const Ci = function() {
1216
+ Ut(), X = 0, Y = Pt(), y = Lt(), H = Dt(), at = H.plotColorPalette.split(",").map((e) => e.trim()), G = !1, rt = !1;
1217
+ }, _i = {
1218
+ getDrawableElem: Ai,
1219
+ clear: Ci,
1220
+ setAccTitle: Yt,
1221
+ getAccTitle: Xt,
1222
+ setDiagramTitle: Nt,
1223
+ getDiagramTitle: wt,
1224
+ getAccDescription: Ft,
1225
+ setAccDescription: zt,
1226
+ setOrientation: gi,
1227
+ setXAxisTitle: xi,
1228
+ setXAxisRangeData: Et,
1229
+ setXAxisBand: di,
1230
+ setYAxisTitle: fi,
1231
+ setYAxisRangeData: pi,
1232
+ setLineData: yi,
1233
+ setBarData: bi,
1234
+ setTmpSVGG: ui,
1235
+ getChartThemeConfig: wi,
1236
+ getChartConfig: Si
1237
+ }, ki = (e, t, i, s) => {
1238
+ const n = s.db, o = n.getChartThemeConfig(), c = n.getChartConfig();
1239
+ function f(p) {
1240
+ return p === "top" ? "text-before-edge" : "middle";
1241
+ }
1242
+ function d(p) {
1243
+ return p === "left" ? "start" : p === "right" ? "end" : "middle";
1244
+ }
1245
+ function R(p) {
1246
+ return `translate(${p.x}, ${p.y}) rotate(${p.rotation || 0})`;
1247
+ }
1248
+ St.debug(`Rendering xychart chart
1249
+ ` + e);
1250
+ const _ = Ht(t), A = _.append("g").attr("class", "main"), m = A.append("rect").attr("width", c.width).attr("height", c.height).attr("class", "background");
1251
+ $t(_, c.height, c.width, !0), _.attr("viewBox", `0 0 ${c.width} ${c.height}`), m.attr("fill", o.backgroundColor), n.setTmpSVGG(_.append("g").attr("class", "mermaid-tmp-group"));
1252
+ const T = n.getDrawableElem(), S = {};
1253
+ function P(p) {
1254
+ let C = A, h = "";
1255
+ for (const [L] of p.entries()) {
1256
+ let z = A;
1257
+ L > 0 && S[h] && (z = S[h]), h += p[L], C = S[h], C || (C = S[h] = z.append("g").attr("class", p[L]));
1258
+ }
1259
+ return C;
1260
+ }
1261
+ for (const p of T) {
1262
+ if (p.data.length === 0)
1263
+ continue;
1264
+ const C = P(p.groupTexts);
1265
+ switch (p.type) {
1266
+ case "rect":
1267
+ C.selectAll("rect").data(p.data).enter().append("rect").attr("x", (h) => h.x).attr("y", (h) => h.y).attr("width", (h) => h.width).attr("height", (h) => h.height).attr("fill", (h) => h.fill).attr("stroke", (h) => h.strokeFill).attr("stroke-width", (h) => h.strokeWidth);
1268
+ break;
1269
+ case "text":
1270
+ C.selectAll("text").data(p.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (h) => h.fill).attr("font-size", (h) => h.fontSize).attr("dominant-baseline", (h) => f(h.verticalPos)).attr("text-anchor", (h) => d(h.horizontalPos)).attr("transform", (h) => R(h)).text((h) => h.text);
1271
+ break;
1272
+ case "path":
1273
+ C.selectAll("path").data(p.data).enter().append("path").attr("d", (h) => h.path).attr("fill", (h) => h.fill ? h.fill : "none").attr("stroke", (h) => h.strokeFill).attr("stroke-width", (h) => h.strokeWidth);
1274
+ break;
1275
+ }
1276
+ }
1277
+ }, Ri = {
1278
+ draw: ki
1279
+ }, Bi = {
1280
+ parser: ti,
1281
+ db: _i,
1282
+ renderer: Ri
1283
+ };
1284
+ export {
1285
+ Bi as diagram
1286
+ };