@layers-app/editor 0.7.45 → 0.7.46

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 (248) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +5 -4
  3. package/dist/index.js +3 -3
  4. package/dist/{layers.dO_EcGnI.js → layers.B88sQYuh.js} +1 -1
  5. package/dist/layers.BgMykHnn.js +154 -0
  6. package/dist/{layers.BNRMPVpZ.js → layers.BtvuN20E.js} +8992 -9643
  7. package/dist/{layers.D7AwxDU3.js → layers.Cfvta__C.js} +1 -1
  8. package/dist/{layers.b9B2NY7n.js → layers.CsQlovyR.js} +2191 -1950
  9. package/dist/layers.Ct1ojjl3.js +1 -0
  10. package/dist/{layers.Cqs6IYG7.js → layers.Hq0pIRX3.js} +24 -24
  11. package/dist/layers.JT_kEFH5.js +129 -0
  12. package/dist/{layers.D10qGvZV.js → layers.NW1lST7i.js} +1 -1
  13. package/dist/layers.pwc3O6Es.js +261 -0
  14. package/package.json +2 -2
  15. package/dist/layers.-kgSm_ki.js +0 -1
  16. package/dist/layers.3H8YMnha.js +0 -960
  17. package/dist/layers.52famHy6.js +0 -1
  18. package/dist/layers.5E21elPk.js +0 -11
  19. package/dist/layers.5VXqgOA9.js +0 -1
  20. package/dist/layers.5VwU1GK1.js +0 -1268
  21. package/dist/layers.7JqFgE4-.js +0 -15
  22. package/dist/layers.7RI58uNS.js +0 -189
  23. package/dist/layers.7SpesQUg.js +0 -40
  24. package/dist/layers.7T_XLunz.js +0 -7
  25. package/dist/layers.8yVEuzdp.js +0 -2238
  26. package/dist/layers.9VxE_IU7.js +0 -6
  27. package/dist/layers.9pNaFvaX.js +0 -1
  28. package/dist/layers.AfB9ZNIL.js +0 -41
  29. package/dist/layers.AwYI6tm5.js +0 -39
  30. package/dist/layers.B-gjjpRn.js +0 -4
  31. package/dist/layers.B09AFCqn.js +0 -37
  32. package/dist/layers.B19hGmey.js +0 -1
  33. package/dist/layers.B1GZzJe5.js +0 -9
  34. package/dist/layers.B1MgjnS3.js +0 -129
  35. package/dist/layers.B3D4g2HH.js +0 -1
  36. package/dist/layers.B4--F20o.js +0 -10
  37. package/dist/layers.B47Vqw3v.js +0 -8
  38. package/dist/layers.B7K7JjK6.js +0 -1510
  39. package/dist/layers.B7Ogzw_9.js +0 -8
  40. package/dist/layers.B9DV1y8l.js +0 -437
  41. package/dist/layers.BAnldxOY.js +0 -61
  42. package/dist/layers.BAtv1CM7.js +0 -1
  43. package/dist/layers.BAuuzKLZ.js +0 -8
  44. package/dist/layers.BBkLpECL.js +0 -41
  45. package/dist/layers.BCFFwcHc.js +0 -8
  46. package/dist/layers.BElVFj7p.js +0 -10
  47. package/dist/layers.BHMGJS6y.js +0 -35
  48. package/dist/layers.BI0na45P.js +0 -39
  49. package/dist/layers.BIeVwYKL.js +0 -1
  50. package/dist/layers.BJDrjORS.js +0 -244
  51. package/dist/layers.BLVqWrAY.js +0 -10
  52. package/dist/layers.BLd2spTm.js +0 -1
  53. package/dist/layers.BMdx5wVt.js +0 -1126
  54. package/dist/layers.BPxT8M1-.js +0 -1619
  55. package/dist/layers.BQ47bUTF.js +0 -207
  56. package/dist/layers.BRQk8xaN.js +0 -52
  57. package/dist/layers.BSTBZrFn.js +0 -1
  58. package/dist/layers.BSd2L4Fm.js +0 -1
  59. package/dist/layers.BT4kTHz7.js +0 -51
  60. package/dist/layers.BaqpKN-R.js +0 -4
  61. package/dist/layers.BbCfEXyj.js +0 -55
  62. package/dist/layers.Bd6ZkqZ7.js +0 -40
  63. package/dist/layers.BdSYcWLH.js +0 -373
  64. package/dist/layers.Be33AcY-.js +0 -1
  65. package/dist/layers.BiIBffqS.js +0 -6
  66. package/dist/layers.BijSGz6X.js +0 -1
  67. package/dist/layers.BioO0hx9.js +0 -10
  68. package/dist/layers.BmE6NOAc.js +0 -41
  69. package/dist/layers.BoRU6N6t.js +0 -1225
  70. package/dist/layers.Boa1dqY1.js +0 -1
  71. package/dist/layers.BpilXLfW.js +0 -6
  72. package/dist/layers.BqYphIWO.js +0 -11
  73. package/dist/layers.Bs1NMWU2.js +0 -9
  74. package/dist/layers.BsKvPJTl.js +0 -10
  75. package/dist/layers.BsZCaVRX.js +0 -22
  76. package/dist/layers.BtKfezUO.js +0 -32
  77. package/dist/layers.BuVXf7W5.js +0 -42
  78. package/dist/layers.BwuvbB4R.js +0 -39
  79. package/dist/layers.BxiXm40L.js +0 -2
  80. package/dist/layers.By8sBqwN.js +0 -116
  81. package/dist/layers.BzGZoEEl.js +0 -10
  82. package/dist/layers.BzLeOHKa.js +0 -796
  83. package/dist/layers.Bz_dhG__.js +0 -39
  84. package/dist/layers.C1KqMlKg.js +0 -1
  85. package/dist/layers.C1i1mw5H.js +0 -39
  86. package/dist/layers.C2RYi1R4.js +0 -9
  87. package/dist/layers.C3J_d41Q.js +0 -1
  88. package/dist/layers.C4I8YhJZ.js +0 -5
  89. package/dist/layers.C5qL4bIV.js +0 -205
  90. package/dist/layers.C6aCloZA.js +0 -38
  91. package/dist/layers.C7u0t-7x.js +0 -1286
  92. package/dist/layers.C8_lu5UH.js +0 -23
  93. package/dist/layers.CAAFE7RU.js +0 -139
  94. package/dist/layers.CB2mPEGO.js +0 -1
  95. package/dist/layers.CBcgiYqo.js +0 -4
  96. package/dist/layers.CCDs3V-r.js +0 -8
  97. package/dist/layers.CDLOFVyh.js +0 -38
  98. package/dist/layers.CGbUBRpT.js +0 -271
  99. package/dist/layers.CHZsXQcr.js +0 -1
  100. package/dist/layers.CIugfnNi.js +0 -3
  101. package/dist/layers.CJjG7mfo.js +0 -122
  102. package/dist/layers.CJuRWDaP.js +0 -4
  103. package/dist/layers.CJx3dksh.js +0 -160
  104. package/dist/layers.CKG-SsM4.js +0 -11
  105. package/dist/layers.CKquYTab.js +0 -1
  106. package/dist/layers.CLVteXPI.js +0 -1
  107. package/dist/layers.CMSKPoUf.js +0 -1
  108. package/dist/layers.CMi59Dge.js +0 -10
  109. package/dist/layers.CPPXzJSG.js +0 -36
  110. package/dist/layers.CQZ1lodE.js +0 -7
  111. package/dist/layers.CQzsYN9o.js +0 -35
  112. package/dist/layers.CRHVKIv6.js +0 -6
  113. package/dist/layers.CSf6dhab.js +0 -6
  114. package/dist/layers.CWNyz0df.js +0 -772
  115. package/dist/layers.CZmZZ456.js +0 -1
  116. package/dist/layers.C_-XV7nk.js +0 -84
  117. package/dist/layers.C_IvrzZ3.js +0 -7
  118. package/dist/layers.Ca9pf4pJ.js +0 -76
  119. package/dist/layers.CbY0jZsb.js +0 -32
  120. package/dist/layers.Cc2rZkMQ.js +0 -1
  121. package/dist/layers.Cd9MRGMA.js +0 -7
  122. package/dist/layers.CexInYJw.js +0 -41
  123. package/dist/layers.CfUjnxzs.js +0 -36
  124. package/dist/layers.CfiPo1zZ.js +0 -10
  125. package/dist/layers.CftSz0vc.js +0 -1
  126. package/dist/layers.Cfv_lKzM.js +0 -10
  127. package/dist/layers.CgV5Zdgg.js +0 -41
  128. package/dist/layers.Cho0M3o5.js +0 -9
  129. package/dist/layers.CiGopRcm.js +0 -1
  130. package/dist/layers.Ck8FKMZm.js +0 -1
  131. package/dist/layers.ClN7_yK6.js +0 -5
  132. package/dist/layers.CmzeQrqF.js +0 -1
  133. package/dist/layers.Cnf9xVrU.js +0 -37
  134. package/dist/layers.Cq1FOBBz.js +0 -1089
  135. package/dist/layers.CqVTtuYm.js +0 -6
  136. package/dist/layers.CtVzpEDj.js +0 -6
  137. package/dist/layers.CvxLmsUR.js +0 -794
  138. package/dist/layers.Cx0MLYpT.js +0 -8
  139. package/dist/layers.CxBPsaPO.js +0 -39
  140. package/dist/layers.Cxm8b7tr.js +0 -39
  141. package/dist/layers.CyodKjZl.js +0 -8
  142. package/dist/layers.Cyzu9PKQ.js +0 -1
  143. package/dist/layers.Cz-fKIJ9.js +0 -36
  144. package/dist/layers.CzhydN8y.js +0 -1
  145. package/dist/layers.D-An1dnI.js +0 -14
  146. package/dist/layers.D-gA0YP7.js +0 -323
  147. package/dist/layers.D0q1Ima3.js +0 -8
  148. package/dist/layers.D0zn4_Mx.js +0 -1
  149. package/dist/layers.D2BUdbOP.js +0 -42
  150. package/dist/layers.D3R9NG6l.js +0 -36
  151. package/dist/layers.D4CL9IrO.js +0 -40
  152. package/dist/layers.D4T8fTcj.js +0 -1223
  153. package/dist/layers.D5rUZxAZ.js +0 -7
  154. package/dist/layers.D6_pquAg.js +0 -5
  155. package/dist/layers.D7jGxypv.js +0 -8
  156. package/dist/layers.D8mu5H7D.js +0 -40
  157. package/dist/layers.D9hwmTsT.js +0 -40
  158. package/dist/layers.DD85x_gL.js +0 -70
  159. package/dist/layers.DEafoGBP.js +0 -276
  160. package/dist/layers.DHntpDKc.js +0 -7
  161. package/dist/layers.DLMNg96A.js +0 -38
  162. package/dist/layers.DLofN-Lu.js +0 -8583
  163. package/dist/layers.DLwuMfdd.js +0 -84
  164. package/dist/layers.DMJTlnQs.js +0 -805
  165. package/dist/layers.DMkBISW1.js +0 -1
  166. package/dist/layers.DN9HoVxI.js +0 -18
  167. package/dist/layers.DN_7Oas1.js +0 -1034
  168. package/dist/layers.DO0LV8uH.js +0 -9
  169. package/dist/layers.DOGjj8Tb.js +0 -9
  170. package/dist/layers.DOU0CUz1.js +0 -9
  171. package/dist/layers.DOrgOHBr.js +0 -1
  172. package/dist/layers.DQ9XoPxf.js +0 -35
  173. package/dist/layers.DRJ1C2cQ.js +0 -907
  174. package/dist/layers.DW4YSj_5.js +0 -425
  175. package/dist/layers.DWZOB_8o.js +0 -48149
  176. package/dist/layers.DXraj6Ay.js +0 -806
  177. package/dist/layers.DZ1kwAKl.js +0 -41
  178. package/dist/layers.DZkyZJBC.js +0 -2966
  179. package/dist/layers.DasUia_A.js +0 -96
  180. package/dist/layers.DbLpb0GU.js +0 -5
  181. package/dist/layers.DbaKVP5e.js +0 -1
  182. package/dist/layers.Des3K8ZW.js +0 -257
  183. package/dist/layers.DfNV-1tq.js +0 -1
  184. package/dist/layers.Dg4R4jUk.js +0 -39
  185. package/dist/layers.DiMecbBf.js +0 -213
  186. package/dist/layers.DjUOC4st.js +0 -16
  187. package/dist/layers.Djrk43ut.js +0 -7
  188. package/dist/layers.DkU_CdUC.js +0 -1
  189. package/dist/layers.DmGGgMLi.js +0 -32
  190. package/dist/layers.DmWCogHY.js +0 -9
  191. package/dist/layers.DmrEOz9f.js +0 -40
  192. package/dist/layers.DoRJikzG.js +0 -33
  193. package/dist/layers.DoUFJmIZ.js +0 -2482
  194. package/dist/layers.DpOQ0SWe.js +0 -41
  195. package/dist/layers.DpTLOdAf.js +0 -2
  196. package/dist/layers.Dpx73nZ5.js +0 -37
  197. package/dist/layers.DrjRMlMd.js +0 -504
  198. package/dist/layers.DsfTLYHN.js +0 -295
  199. package/dist/layers.DtKC3G6H.js +0 -40
  200. package/dist/layers.DtOyZMno.js +0 -42
  201. package/dist/layers.Dv9gkxbE.js +0 -8
  202. package/dist/layers.DvK2O2ur.js +0 -21941
  203. package/dist/layers.DxA6ocdw.js +0 -70
  204. package/dist/layers.Dxw5Sd8s.js +0 -223
  205. package/dist/layers.Dy1naDTQ.js +0 -14
  206. package/dist/layers.Dy44TnYE.js +0 -32
  207. package/dist/layers.DyypgoWd.js +0 -39
  208. package/dist/layers.Dzcm8AcP.js +0 -1583
  209. package/dist/layers.F0RyUduP.js +0 -65
  210. package/dist/layers.F544mK7B.js +0 -41
  211. package/dist/layers.GAckqh_M.js +0 -40
  212. package/dist/layers.HUIM9HzL.js +0 -9
  213. package/dist/layers.HfEMdS1b.js +0 -10
  214. package/dist/layers.JWCLFILJ.js +0 -1
  215. package/dist/layers.MIHL5IVH.js +0 -7
  216. package/dist/layers.N0yl3_Na.js +0 -44
  217. package/dist/layers.NWhpAYeJ.js +0 -198
  218. package/dist/layers.Q2Aadwn9.js +0 -42
  219. package/dist/layers.R8mPlCA0.js +0 -261
  220. package/dist/layers.Vof2qGdM.js +0 -1088
  221. package/dist/layers.W_ErWU4y.js +0 -139
  222. package/dist/layers.WlID94Nt.js +0 -6
  223. package/dist/layers.YY1k0HSU.js +0 -1
  224. package/dist/layers.YjzlfOSN.js +0 -84
  225. package/dist/layers.ZX3I648e.js +0 -934
  226. package/dist/layers.b0h5ZBmD.js +0 -61
  227. package/dist/layers.bPp4y4tJ.js +0 -423
  228. package/dist/layers.bXo5QOKy.js +0 -5
  229. package/dist/layers.bkVgdJRL.js +0 -2
  230. package/dist/layers.d6r5nQuW.js +0 -11
  231. package/dist/layers.dl89lGbj.js +0 -33
  232. package/dist/layers.dswX3xs9.js +0 -1
  233. package/dist/layers.efcYaHoV.js +0 -32
  234. package/dist/layers.fLsBww_F.js +0 -1
  235. package/dist/layers.i1FJeF3y.js +0 -37
  236. package/dist/layers.jU6Z3i2q.js +0 -40
  237. package/dist/layers.k6Lqzy4i.js +0 -8
  238. package/dist/layers.lCpg7dOn.js +0 -21
  239. package/dist/layers.nVP4QDpX.js +0 -118
  240. package/dist/layers.obbaq0Iy.js +0 -42
  241. package/dist/layers.ooKeArD_.js +0 -34
  242. package/dist/layers.pXaWfCQn.js +0 -40
  243. package/dist/layers.pYlF8GU4.js +0 -32
  244. package/dist/layers.qhRg6f--.js +0 -11
  245. package/dist/layers.rNCWSOcA.js +0 -7
  246. package/dist/layers.t1lmm4vP.js +0 -13
  247. package/dist/layers.wEFFSFio.js +0 -21620
  248. package/dist/layers.zAXb9NBT.js +0 -9
@@ -1,504 +0,0 @@
1
- import { H as J, a as rt, s as at, b as lt, c as ot, n as ct, o as ht, l as et, g as it, a7 as ut, A as yt, T as ft, e as pt, i as gt, q as dt, P as mt } from "./layers.DLofN-Lu.js";
2
- import "./layers.wEFFSFio.js";
3
- import "lodash-es/memoize.js";
4
- import "lodash-es/merge.js";
5
- import "lodash-es/isEmpty.js";
6
- import { a as tt } from "./layers.C_-XV7nk.js";
7
- import { o as _t } from "./layers.b0h5ZBmD.js";
8
- import { a as xt } from "./layers.CqVTtuYm.js";
9
- import { c as F } from "./layers.DLwuMfdd.js";
10
- function kt(e, u) {
11
- return u < e ? -1 : u > e ? 1 : u >= e ? 0 : NaN;
12
- }
13
- function vt(e) {
14
- return e;
15
- }
16
- function bt() {
17
- var e = vt, u = kt, $ = null, p = F(0), g = F(J), A = F(0);
18
- function y(a) {
19
- var l, d = (a = xt(a)).length, k, I, T = 0, m = new Array(d), v = new Array(d), c = +p.apply(this, arguments), E = Math.min(J, Math.max(-J, g.apply(this, arguments) - c)), O, w = Math.min(Math.abs(E) / d, A.apply(this, arguments)), b = w * (E < 0 ? -1 : 1), t;
20
- for (l = 0; l < d; ++l)
21
- (t = v[m[l] = l] = +e(a[l], l, a)) > 0 && (T += t);
22
- for (u != null ? m.sort(function(i, n) {
23
- return u(v[i], v[n]);
24
- }) : $ != null && m.sort(function(i, n) {
25
- return $(a[i], a[n]);
26
- }), l = 0, I = T ? (E - d * b) / T : 0; l < d; ++l, c = O)
27
- k = m[l], t = v[k], O = c + (t > 0 ? t * I : 0) + b, v[k] = {
28
- data: a[k],
29
- index: l,
30
- value: t,
31
- startAngle: c,
32
- endAngle: O,
33
- padAngle: w
34
- };
35
- return v;
36
- }
37
- return y.value = function(a) {
38
- return arguments.length ? (e = typeof a == "function" ? a : F(+a), y) : e;
39
- }, y.sortValues = function(a) {
40
- return arguments.length ? (u = a, $ = null, y) : u;
41
- }, y.sort = function(a) {
42
- return arguments.length ? ($ = a, u = null, y) : $;
43
- }, y.startAngle = function(a) {
44
- return arguments.length ? (p = typeof a == "function" ? a : F(+a), y) : p;
45
- }, y.endAngle = function(a) {
46
- return arguments.length ? (g = typeof a == "function" ? a : F(+a), y) : g;
47
- }, y.padAngle = function(a) {
48
- return arguments.length ? (A = typeof a == "function" ? a : F(+a), y) : A;
49
- }, y;
50
- }
51
- var K = (function() {
52
- var e = function(b, t, i, n) {
53
- for (i = i || {}, n = b.length; n--; i[b[n]] = t)
54
- ;
55
- return i;
56
- }, u = [1, 3], $ = [1, 4], p = [1, 5], g = [1, 6], A = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], y = [2, 4], a = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], l = [20, 21, 22], d = [2, 7], k = [1, 12], I = [1, 13], T = [1, 14], m = [1, 15], v = [1, 16], c = [1, 17], E = {
57
- trace: function() {
58
- },
59
- yy: {},
60
- symbols_: { error: 2, start: 3, eol: 4, PIE: 5, document: 6, showData: 7, line: 8, statement: 9, txt: 10, value: 11, title: 12, title_value: 13, acc_title: 14, acc_title_value: 15, acc_descr: 16, acc_descr_value: 17, acc_descr_multiline_value: 18, section: 19, NEWLINE: 20, ";": 21, EOF: 22, $accept: 0, $end: 1 },
61
- terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" },
62
- productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]],
63
- performAction: function(t, i, n, r, o, s, P) {
64
- var _ = s.length - 1;
65
- switch (o) {
66
- case 3:
67
- r.setShowData(!0);
68
- break;
69
- case 6:
70
- this.$ = s[_ - 1];
71
- break;
72
- case 8:
73
- r.addSection(s[_ - 1], r.cleanupValue(s[_]));
74
- break;
75
- case 9:
76
- this.$ = s[_].trim(), r.setDiagramTitle(this.$);
77
- break;
78
- case 10:
79
- this.$ = s[_].trim(), r.setAccTitle(this.$);
80
- break;
81
- case 11:
82
- case 12:
83
- this.$ = s[_].trim(), r.setAccDescription(this.$);
84
- break;
85
- case 13:
86
- r.addSection(s[_].substr(8)), this.$ = s[_].substr(8);
87
- break;
88
- }
89
- },
90
- table: [{ 3: 1, 4: 2, 5: u, 20: $, 21: p, 22: g }, { 1: [3] }, { 3: 7, 4: 2, 5: u, 20: $, 21: p, 22: g }, e(A, y, { 6: 8, 7: [1, 9] }), e(a, [2, 14]), e(a, [2, 15]), e(a, [2, 16]), { 1: [2, 1] }, e(l, d, { 8: 10, 9: 11, 1: [2, 2], 10: k, 12: I, 14: T, 16: m, 18: v, 19: c }), e(A, y, { 6: 18 }), e(A, [2, 5]), { 4: 19, 20: $, 21: p, 22: g }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, e(l, [2, 12]), e(l, [2, 13]), e(l, d, { 8: 10, 9: 11, 1: [2, 3], 10: k, 12: I, 14: T, 16: m, 18: v, 19: c }), e(A, [2, 6]), e(l, [2, 8]), e(l, [2, 9]), e(l, [2, 10]), e(l, [2, 11])],
91
- defaultActions: { 7: [2, 1] },
92
- parseError: function(t, i) {
93
- if (i.recoverable)
94
- this.trace(t);
95
- else {
96
- var n = new Error(t);
97
- throw n.hash = i, n;
98
- }
99
- },
100
- parse: function(t) {
101
- var i = this, n = [0], r = [], o = [null], s = [], P = this.table, _ = "", f = 0, V = 0, R = 2, M = 1, B = s.slice.call(arguments, 1), h = Object.create(this.lexer), N = { yy: {} };
102
- for (var Y in this.yy)
103
- Object.prototype.hasOwnProperty.call(this.yy, Y) && (N.yy[Y] = this.yy[Y]);
104
- h.setInput(t, N.yy), N.yy.lexer = h, N.yy.parser = this, typeof h.yylloc > "u" && (h.yylloc = {});
105
- var q = h.yylloc;
106
- s.push(q);
107
- var nt = h.options && h.options.ranges;
108
- typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
109
- function st() {
110
- var C;
111
- return C = r.pop() || h.lex() || M, typeof C != "number" && (C instanceof Array && (r = C, C = r.pop()), C = i.symbols_[C] || C), C;
112
- }
113
- for (var x, L, S, H, z = {}, j, D, X, W; ; ) {
114
- if (L = n[n.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((x === null || typeof x > "u") && (x = st()), S = P[L] && P[L][x]), typeof S > "u" || !S.length || !S[0]) {
115
- var Z = "";
116
- W = [];
117
- for (j in P[L])
118
- this.terminals_[j] && j > R && W.push("'" + this.terminals_[j] + "'");
119
- h.showPosition ? Z = "Parse error on line " + (f + 1) + `:
120
- ` + h.showPosition() + `
121
- Expecting ` + W.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : Z = "Parse error on line " + (f + 1) + ": Unexpected " + (x == M ? "end of input" : "'" + (this.terminals_[x] || x) + "'"), this.parseError(Z, {
122
- text: h.match,
123
- token: this.terminals_[x] || x,
124
- line: h.yylineno,
125
- loc: q,
126
- expected: W
127
- });
128
- }
129
- if (S[0] instanceof Array && S.length > 1)
130
- throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + x);
131
- switch (S[0]) {
132
- case 1:
133
- n.push(x), o.push(h.yytext), s.push(h.yylloc), n.push(S[1]), x = null, V = h.yyleng, _ = h.yytext, f = h.yylineno, q = h.yylloc;
134
- break;
135
- case 2:
136
- if (D = this.productions_[S[1]][1], z.$ = o[o.length - D], z._$ = {
137
- first_line: s[s.length - (D || 1)].first_line,
138
- last_line: s[s.length - 1].last_line,
139
- first_column: s[s.length - (D || 1)].first_column,
140
- last_column: s[s.length - 1].last_column
141
- }, nt && (z._$.range = [
142
- s[s.length - (D || 1)].range[0],
143
- s[s.length - 1].range[1]
144
- ]), H = this.performAction.apply(z, [
145
- _,
146
- V,
147
- f,
148
- N.yy,
149
- S[1],
150
- o,
151
- s
152
- ].concat(B)), typeof H < "u")
153
- return H;
154
- D && (n = n.slice(0, -1 * D * 2), o = o.slice(0, -1 * D), s = s.slice(0, -1 * D)), n.push(this.productions_[S[1]][0]), o.push(z.$), s.push(z._$), X = P[n[n.length - 2]][n[n.length - 1]], n.push(X);
155
- break;
156
- case 3:
157
- return !0;
158
- }
159
- }
160
- return !0;
161
- }
162
- }, O = /* @__PURE__ */ (function() {
163
- var b = {
164
- EOF: 1,
165
- parseError: function(i, n) {
166
- if (this.yy.parser)
167
- this.yy.parser.parseError(i, n);
168
- else
169
- throw new Error(i);
170
- },
171
- // resets the lexer, sets new input
172
- setInput: function(t, i) {
173
- return this.yy = i || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
174
- first_line: 1,
175
- first_column: 0,
176
- last_line: 1,
177
- last_column: 0
178
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
179
- },
180
- // consumes and returns one char from the input
181
- input: function() {
182
- var t = this._input[0];
183
- this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
184
- var i = t.match(/(?:\r\n?|\n).*/g);
185
- return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
186
- },
187
- // unshifts one char (or a string) into the input
188
- unput: function(t) {
189
- var i = t.length, n = t.split(/(?:\r\n?|\n)/g);
190
- this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
191
- var r = this.match.split(/(?:\r\n?|\n)/g);
192
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
193
- var o = this.yylloc.range;
194
- return this.yylloc = {
195
- first_line: this.yylloc.first_line,
196
- last_line: this.yylineno + 1,
197
- first_column: this.yylloc.first_column,
198
- last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - i
199
- }, this.options.ranges && (this.yylloc.range = [o[0], o[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
200
- },
201
- // When called from action, caches matched text and appends it on next action
202
- more: function() {
203
- return this._more = !0, this;
204
- },
205
- // 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.
206
- reject: function() {
207
- if (this.options.backtrack_lexer)
208
- this._backtrack = !0;
209
- else
210
- 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).
211
- ` + this.showPosition(), {
212
- text: "",
213
- token: null,
214
- line: this.yylineno
215
- });
216
- return this;
217
- },
218
- // retain first n characters of the match
219
- less: function(t) {
220
- this.unput(this.match.slice(t));
221
- },
222
- // displays already matched input, i.e. for error messages
223
- pastInput: function() {
224
- var t = this.matched.substr(0, this.matched.length - this.match.length);
225
- return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
226
- },
227
- // displays upcoming input, i.e. for error messages
228
- upcomingInput: function() {
229
- var t = this.match;
230
- return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
231
- },
232
- // displays the character position where the lexing error occurred, i.e. for error messages
233
- showPosition: function() {
234
- var t = this.pastInput(), i = new Array(t.length + 1).join("-");
235
- return t + this.upcomingInput() + `
236
- ` + i + "^";
237
- },
238
- // test the lexed token: return FALSE when not a match, otherwise return token
239
- test_match: function(t, i) {
240
- var n, r, o;
241
- if (this.options.backtrack_lexer && (o = {
242
- yylineno: this.yylineno,
243
- yylloc: {
244
- first_line: this.yylloc.first_line,
245
- last_line: this.last_line,
246
- first_column: this.yylloc.first_column,
247
- last_column: this.yylloc.last_column
248
- },
249
- yytext: this.yytext,
250
- match: this.match,
251
- matches: this.matches,
252
- matched: this.matched,
253
- yyleng: this.yyleng,
254
- offset: this.offset,
255
- _more: this._more,
256
- _input: this._input,
257
- yy: this.yy,
258
- conditionStack: this.conditionStack.slice(0),
259
- done: this.done
260
- }, this.options.ranges && (o.yylloc.range = this.yylloc.range.slice(0))), r = t[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
261
- first_line: this.yylloc.last_line,
262
- last_line: this.yylineno + 1,
263
- first_column: this.yylloc.last_column,
264
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
265
- }, this.yytext += t[0], this.match += t[0], this.matches = t, 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(t[0].length), this.matched += t[0], n = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
266
- return n;
267
- if (this._backtrack) {
268
- for (var s in o)
269
- this[s] = o[s];
270
- return !1;
271
- }
272
- return !1;
273
- },
274
- // return next match in input
275
- next: function() {
276
- if (this.done)
277
- return this.EOF;
278
- this._input || (this.done = !0);
279
- var t, i, n, r;
280
- this._more || (this.yytext = "", this.match = "");
281
- for (var o = this._currentRules(), s = 0; s < o.length; s++)
282
- if (n = this._input.match(this.rules[o[s]]), n && (!i || n[0].length > i[0].length)) {
283
- if (i = n, r = s, this.options.backtrack_lexer) {
284
- if (t = this.test_match(n, o[s]), t !== !1)
285
- return t;
286
- if (this._backtrack) {
287
- i = !1;
288
- continue;
289
- } else
290
- return !1;
291
- } else if (!this.options.flex)
292
- break;
293
- }
294
- return i ? (t = this.test_match(i, o[r]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
295
- ` + this.showPosition(), {
296
- text: "",
297
- token: null,
298
- line: this.yylineno
299
- });
300
- },
301
- // return next match that has a token
302
- lex: function() {
303
- var i = this.next();
304
- return i || this.lex();
305
- },
306
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
307
- begin: function(i) {
308
- this.conditionStack.push(i);
309
- },
310
- // pop the previously active lexer condition state off the condition stack
311
- popState: function() {
312
- var i = this.conditionStack.length - 1;
313
- return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
314
- },
315
- // produce the lexer rule set which is active for the currently active lexer condition state
316
- _currentRules: function() {
317
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
318
- },
319
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
320
- topState: function(i) {
321
- return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
322
- },
323
- // alias for begin(condition)
324
- pushState: function(i) {
325
- this.begin(i);
326
- },
327
- // return the number of states currently on the stack
328
- stateStackSize: function() {
329
- return this.conditionStack.length;
330
- },
331
- options: { "case-insensitive": !0 },
332
- performAction: function(i, n, r, o) {
333
- switch (r) {
334
- case 0:
335
- break;
336
- case 1:
337
- break;
338
- case 2:
339
- return 20;
340
- case 3:
341
- break;
342
- case 4:
343
- break;
344
- case 5:
345
- return this.begin("title"), 12;
346
- case 6:
347
- return this.popState(), "title_value";
348
- case 7:
349
- return this.begin("acc_title"), 14;
350
- case 8:
351
- return this.popState(), "acc_title_value";
352
- case 9:
353
- return this.begin("acc_descr"), 16;
354
- case 10:
355
- return this.popState(), "acc_descr_value";
356
- case 11:
357
- this.begin("acc_descr_multiline");
358
- break;
359
- case 12:
360
- this.popState();
361
- break;
362
- case 13:
363
- return "acc_descr_multiline_value";
364
- case 14:
365
- this.begin("string");
366
- break;
367
- case 15:
368
- this.popState();
369
- break;
370
- case 16:
371
- return "txt";
372
- case 17:
373
- return 5;
374
- case 18:
375
- return 7;
376
- case 19:
377
- return "value";
378
- case 20:
379
- return 22;
380
- }
381
- },
382
- rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/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, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i],
383
- conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [6], inclusive: !1 }, string: { rules: [15, 16], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], inclusive: !0 } }
384
- };
385
- return b;
386
- })();
387
- E.lexer = O;
388
- function w() {
389
- this.yy = {};
390
- }
391
- return w.prototype = E, E.Parser = w, new w();
392
- })();
393
- K.parser = K;
394
- const St = K, $t = mt.pie, G = {
395
- sections: {},
396
- showData: !1
397
- };
398
- let U = G.sections, Q = G.showData;
399
- const At = structuredClone($t), Et = () => structuredClone(At), wt = () => {
400
- U = structuredClone(G.sections), Q = G.showData, dt();
401
- }, Tt = (e, u) => {
402
- e = gt(e, it()), U[e] === void 0 && (U[e] = u, et.debug(`added new section: ${e}, with value: ${u}`));
403
- }, It = () => U, Dt = (e) => (e.substring(0, 1) === ":" && (e = e.substring(1).trim()), Number(e.trim())), Ct = (e) => {
404
- Q = e;
405
- }, Ot = () => Q, Pt = {
406
- getConfig: Et,
407
- clear: wt,
408
- setDiagramTitle: ht,
409
- getDiagramTitle: ct,
410
- setAccTitle: ot,
411
- getAccTitle: lt,
412
- setAccDescription: at,
413
- getAccDescription: rt,
414
- addSection: Tt,
415
- getSections: It,
416
- cleanupValue: Dt,
417
- setShowData: Ct,
418
- getShowData: Ot
419
- }, Vt = (e) => `
420
- .pieCircle{
421
- stroke: ${e.pieStrokeColor};
422
- stroke-width : ${e.pieStrokeWidth};
423
- opacity : ${e.pieOpacity};
424
- }
425
- .pieOuterCircle{
426
- stroke: ${e.pieOuterStrokeColor};
427
- stroke-width: ${e.pieOuterStrokeWidth};
428
- fill: none;
429
- }
430
- .pieTitleText {
431
- text-anchor: middle;
432
- font-size: ${e.pieTitleTextSize};
433
- fill: ${e.pieTitleTextColor};
434
- font-family: ${e.fontFamily};
435
- }
436
- .slice {
437
- font-family: ${e.fontFamily};
438
- fill: ${e.pieSectionTextColor};
439
- font-size:${e.pieSectionTextSize};
440
- // fill: white;
441
- }
442
- .legend text {
443
- fill: ${e.pieLegendTextColor};
444
- font-family: ${e.fontFamily};
445
- font-size: ${e.pieLegendTextSize};
446
- }
447
- `, Nt = Vt, Lt = (e) => {
448
- const u = Object.entries(e).map((p) => ({
449
- label: p[0],
450
- value: p[1]
451
- })).sort((p, g) => g.value - p.value);
452
- return bt().value(
453
- (p) => p.value
454
- )(u);
455
- }, Ft = (e, u, $, p) => {
456
- et.debug(`rendering pie chart
457
- ` + e);
458
- const g = p.db, A = it(), y = ut(g.getConfig(), A.pie), a = 40, l = 18, d = 4, k = 450, I = k, T = yt(u), m = T.append("g"), v = g.getSections();
459
- m.attr("transform", "translate(" + I / 2 + "," + k / 2 + ")");
460
- const { themeVariables: c } = A;
461
- let [E] = ft(c.pieOuterStrokeWidth);
462
- E ?? (E = 2);
463
- const O = y.textPosition, w = Math.min(I, k) / 2 - a, b = tt().innerRadius(0).outerRadius(w), t = tt().innerRadius(w * O).outerRadius(w * O);
464
- m.append("circle").attr("cx", 0).attr("cy", 0).attr("r", w + E / 2).attr("class", "pieOuterCircle");
465
- const i = Lt(v), n = [
466
- c.pie1,
467
- c.pie2,
468
- c.pie3,
469
- c.pie4,
470
- c.pie5,
471
- c.pie6,
472
- c.pie7,
473
- c.pie8,
474
- c.pie9,
475
- c.pie10,
476
- c.pie11,
477
- c.pie12
478
- ], r = _t(n);
479
- m.selectAll("mySlices").data(i).enter().append("path").attr("d", b).attr("fill", (f) => r(f.data.label)).attr("class", "pieCircle");
480
- let o = 0;
481
- Object.keys(v).forEach((f) => {
482
- o += v[f];
483
- }), m.selectAll("mySlices").data(i).enter().append("text").text((f) => (f.data.value / o * 100).toFixed(0) + "%").attr("transform", (f) => "translate(" + t.centroid(f) + ")").style("text-anchor", "middle").attr("class", "slice"), m.append("text").text(g.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
484
- const s = m.selectAll(".legend").data(r.domain()).enter().append("g").attr("class", "legend").attr("transform", (f, V) => {
485
- const R = l + d, M = R * r.domain().length / 2, B = 12 * l, h = V * R - M;
486
- return "translate(" + B + "," + h + ")";
487
- });
488
- s.append("rect").attr("width", l).attr("height", l).style("fill", r).style("stroke", r), s.data(i).append("text").attr("x", l + d).attr("y", l - d).text((f) => {
489
- const { label: V, value: R } = f.data;
490
- return g.getShowData() ? `${V} [${R}]` : V;
491
- });
492
- const P = Math.max(
493
- ...s.selectAll("text").nodes().map((f) => (f == null ? void 0 : f.getBoundingClientRect().width) ?? 0)
494
- ), _ = I + a + l + d + P;
495
- T.attr("viewBox", `0 0 ${_} ${k}`), pt(T, k, _, y.useMaxWidth);
496
- }, Rt = { draw: Ft }, Ht = {
497
- parser: St,
498
- db: Pt,
499
- renderer: Rt,
500
- styles: Nt
501
- };
502
- export {
503
- Ht as diagram
504
- };