@kong-ui-public/documentation 0.3.42 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/Tableau10-GLA_9iAD-BMurskAd.js +9 -0
  2. package/dist/arc-BSRpyMf3-C5dasNo_.js +86 -0
  3. package/dist/array-CqVTtuYm-fKLgkG2b.js +6 -0
  4. package/dist/astro-mwoSwJnq-CNh-xuM0.js +27 -0
  5. package/dist/blockDiagram-6b2b5046-D02VCbQO-CPmGy0xX.js +1224 -0
  6. package/dist/c-eDnjw9rh-eDnjw9rh.js +87 -0
  7. package/dist/c4Diagram-b947cdbb-gYcL5VzP-DIDY83e1.js +1578 -0
  8. package/dist/channel-DHTQ8Ynn-7OPGex2S.js +5 -0
  9. package/dist/classDiagram-35230388-JdSKLSZv-D2crBRy-.js +217 -0
  10. package/dist/classDiagram-v2-412acd34-DFFRHXE_-B6aCxlD1.js +200 -0
  11. package/dist/clone-p6h9XXNm-3JQ-HRC6.js +8 -0
  12. package/dist/coffee-CRlSxcc3-CY091_1T.js +108 -0
  13. package/dist/cpp-DizfY48B-CA38N4Mn.js +208 -0
  14. package/dist/createText-423428c9-LivTKT7b-BXNfjcdp.js +2964 -0
  15. package/dist/csharp-uGDiXTZn-uGDiXTZn.js +762 -0
  16. package/dist/css-CAzixsid-CEpuX1HY.js +511 -0
  17. package/dist/csv-D4BoHddH-D4BoHddH.js +7 -0
  18. package/dist/diff-Bo5iyMQ2-Bo5iyMQ2.js +7 -0
  19. package/dist/docker-B10O2enb-B10O2enb.js +7 -0
  20. package/dist/documentation.es.js +5 -3130
  21. package/dist/documentation.umd.js +10152 -50
  22. package/dist/edges-d417c7a0-C1ggiwWz-Aj0OUf7e.js +1082 -0
  23. package/dist/erDiagram-0ea73325-mz0Z_-DA-Dr01LsTB.js +924 -0
  24. package/dist/flowDb-d35e309a-CPyxEMIt-lofeyUuw.js +1126 -0
  25. package/dist/flowDiagram-d949d7c1-DqCa0HNN-BK5wNO9Z.js +782 -0
  26. package/dist/flowDiagram-v2-49332944-UMosz1sZ-BG39AuNP.js +17 -0
  27. package/dist/flowchart-elk-definition-27cc417a-D2UKpS6N-r2p34307.js +48387 -0
  28. package/dist/ganttDiagram-5c869e3b-CVBHw4pG-CaG9QXQM.js +2490 -0
  29. package/dist/git-commit-CWf81VOF-DtOZSoIU.js +9 -0
  30. package/dist/git-rebase-sR-yVH_J-D5M2oE9O.js +9 -0
  31. package/dist/gitGraphDiagram-b9d81de9-BGm3fU0n-CbCpf-4j.js +1262 -0
  32. package/dist/go-BCCWZWY1-BCCWZWY1.js +7 -0
  33. package/dist/graph-4FyIWFHN-774TpNLL.js +870 -0
  34. package/dist/graphql-CT32SSoq-1pBWfpcR.js +18 -0
  35. package/dist/haml-8RvrfhLO-Bbc4xoLP.js +19 -0
  36. package/dist/handlebars-Cr5ro0bH-CLcCNLtV.js +15 -0
  37. package/dist/haskell-BfFu8DD8-BmkPJdLL.js +565 -0
  38. package/dist/html-BZB5lEhh-B74zAnWx.js +84 -0
  39. package/dist/html-derivative-0y7sV5Qc-D8-muTWn.js +9 -0
  40. package/dist/index-8fae9850-_CN7MNjP-Cq-s0PmS.js +373 -0
  41. package/dist/index-B-5DuDrq.js +29996 -0
  42. package/dist/infoDiagram-db7b18fc-V446j9uR-GSa8bniv.js +319 -0
  43. package/dist/ini-BsUFIxsI-BsUFIxsI.js +7 -0
  44. package/dist/init-DjUOC4st-C8Nwz6AJ.js +16 -0
  45. package/dist/java-Bk2JzfKB-Bk2JzfKB.js +74 -0
  46. package/dist/javascript-DqVBMyXe-DqVBMyXe.js +705 -0
  47. package/dist/journeyDiagram-d5636530-CFiu7dnV-DJMu6A22.js +803 -0
  48. package/dist/json-B12k4-6m-B12k4-6m.js +31 -0
  49. package/dist/json5-CvqQZK9I-CvqQZK9I.js +23 -0
  50. package/dist/jsonc-v2qGKRJY-v2qGKRJY.js +31 -0
  51. package/dist/jsonl-izxnMeZX-izxnMeZX.js +31 -0
  52. package/dist/jsx-aDp7j9_Z-aDp7j9_Z.js +705 -0
  53. package/dist/kotlin-NOMOielb-NOMOielb.js +7 -0
  54. package/dist/latex-Bw_ghldO-BlUAi6pB.js +339 -0
  55. package/dist/layout-2-aEcfuw-BqqWy5wB.js +1524 -0
  56. package/dist/less-CW2GmQHL-CW2GmQHL.js +165 -0
  57. package/dist/line-nVq5kEiy-DtZd3PHZ.js +34 -0
  58. package/dist/linear-Bz4oRFvQ-C869GXbm.js +447 -0
  59. package/dist/liquid-DJ2rh7oT-FwZwa67Y.js +28 -0
  60. package/dist/lua-5TZ-G8Be-CogscVHC.js +9 -0
  61. package/dist/make-whncTQWE-whncTQWE.js +7 -0
  62. package/dist/markdown-DYKdIx5--DYKdIx5-.js +135 -0
  63. package/dist/material-theme-lighter-BRE1Bis3-BRE1Bis3.js +769 -0
  64. package/dist/material-theme-palenight-Dhz61Tee-Dhz61Tee.js +769 -0
  65. package/dist/mdc-D0DPLwil-BfE3hy8_.js +88 -0
  66. package/dist/mdx-CKDMxEaL-CKDMxEaL.js +7 -0
  67. package/dist/mermaid-BxNM-z-u-BxNM-z-u.js +7 -0
  68. package/dist/mindmap-definition-377f8f1f-C2vFYDMs-B71SGbvx.js +19078 -0
  69. package/dist/nginx-C082G13W-vryM9k1W.js +9 -0
  70. package/dist/objective-c-BVtzkNiv-BVtzkNiv.js +115 -0
  71. package/dist/onig-BonMD2gC-BonMD2gC.js +4 -0
  72. package/dist/ordinal-MUacOSdK-B1MUT0BL.js +65 -0
  73. package/dist/pascal-CrvtytWS-CrvtytWS.js +7 -0
  74. package/dist/path-Crsf9Nsj-SiSjwXsf.js +91 -0
  75. package/dist/perl-D29UPKP6-Dez6-HRy.js +17 -0
  76. package/dist/php-D7Tl-iS7-BtPFrDEt.js +789 -0
  77. package/dist/pieDiagram-b0208e96-DhA_SoTh-CfDd9YdA.js +501 -0
  78. package/dist/plsql-8SPzZKaa-8SPzZKaa.js +7 -0
  79. package/dist/postcss-Cz2vjx_4-Cz2vjx_4.js +7 -0
  80. package/dist/powershell-B0buHCuS-B0buHCuS.js +7 -0
  81. package/dist/proto-6YaU_lta-6YaU_lta.js +7 -0
  82. package/dist/pug-DbFO7359-duYD8LVa.js +21 -0
  83. package/dist/python-BQXev0_W-BQXev0_W.js +524 -0
  84. package/dist/quadrantDiagram-0332be45-C8q96Ohm-DMblaqnx.js +903 -0
  85. package/dist/r-DU7Q70f1-DU7Q70f1.js +7 -0
  86. package/dist/reg-DoGLEyFr-DoGLEyFr.js +7 -0
  87. package/dist/requirementDiagram-bf7890df-D30zCZjB-B_JBC9RM.js +767 -0
  88. package/dist/rst-Bm1i8IkK-C9EaDq6g.js +26 -0
  89. package/dist/ruby-CZZKXaz8-BxaDEkRP.js +102 -0
  90. package/dist/rust-CIl6NRUt-CIl6NRUt.js +7 -0
  91. package/dist/sankeyDiagram-0acdec17-B4vNjMaS-Bauvtonp.js +816 -0
  92. package/dist/sass-LqXmC1Fh-LqXmC1Fh.js +8 -0
  93. package/dist/scss-DjxgF7f7-DGTzny6p.js +98 -0
  94. package/dist/sequenceDiagram-c18d009d-BniqGSPK-DuYYUmiZ.js +2201 -0
  95. package/dist/shellscript-CUUTQKn5-CUUTQKn5.js +7 -0
  96. package/dist/shellsession-BIPXtZci-D6avbCwN.js +9 -0
  97. package/dist/splunk-C0K00wNV-C0K00wNV.js +7 -0
  98. package/dist/sql-DkzN59UV-DkzN59UV.js +27 -0
  99. package/dist/ssh-config-BbWAW6SY-BbWAW6SY.js +7 -0
  100. package/dist/stateDiagram-43596fc0-F0V9suMd-L2Ywe-J_.js +266 -0
  101. package/dist/stateDiagram-v2-2ead4f9c-DUgJH8tF-BVo1q2i1.js +184 -0
  102. package/dist/style.css +1 -1
  103. package/dist/styles-6860f46c-Dflmq0ac-BRNSwis6.js +1089 -0
  104. package/dist/styles-7383a064-Dg7mXkpq-C4bItohl.js +430 -0
  105. package/dist/styles-b2c874b6-HpcOhE4Y-Bj0upXzO.js +960 -0
  106. package/dist/stylus-CAHdVuhm-CAHdVuhm.js +21 -0
  107. package/dist/svelte-DAxjO8Sh-D0e501jC.js +29 -0
  108. package/dist/svgDrawCommon-0ee1b4e9-CNkCfzsJ-Bz_doYLk.js +64 -0
  109. package/dist/swift-x2DVyVjN-Bz5PC9YM.js +550 -0
  110. package/dist/timeline-definition-d977decf-Cl38e_0g-D_Dlqa-R.js +794 -0
  111. package/dist/toml-Dbtbfmwk-Dbtbfmwk.js +75 -0
  112. package/dist/tsx-BmwsDeeh-BmwsDeeh.js +705 -0
  113. package/dist/twig-B_Gr-ODl-Cl9Q0GWo.js +58 -0
  114. package/dist/types/components/DocumentationContent.vue.d.ts +8 -1
  115. package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -1
  116. package/dist/types/components/DocumentationDisplay.vue.d.ts +5 -1
  117. package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -1
  118. package/dist/types/components/ProductDocumentModal.vue.d.ts +1 -1
  119. package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -1
  120. package/dist/types/composables/useI18n.d.ts +4 -0
  121. package/dist/types/composables/useI18n.d.ts.map +1 -1
  122. package/dist/typescript-AEg-ehu7-AEg-ehu7.js +672 -0
  123. package/dist/v-BuvBsUKm-BuvBsUKm.js +7 -0
  124. package/dist/vb-cqjo5dul-cqjo5dul.js +7 -0
  125. package/dist/viml-h3ATW6He-h3ATW6He.js +7 -0
  126. package/dist/vue-Dz-azHaT-B9qBHMZi.js +71 -0
  127. package/dist/vue-html-DIGKAAs4-BeHSIJcx.js +11 -0
  128. package/dist/wasm-xOGcJ9Ts-xOGcJ9Ts.js +7 -0
  129. package/dist/wgsl-hGLOfCya-hGLOfCya.js +7 -0
  130. package/dist/xml-CfRpfi_B-BH3JRQfc.js +9 -0
  131. package/dist/xsl-BAqhSCYL-BTKPZRNQ.js +9 -0
  132. package/dist/xychartDiagram-e50adddc-JdLmRUgg-HmDalTeo.js +1282 -0
  133. package/dist/yaml-PGla5xPP-HJurM_FJ.js +206 -0
  134. package/package.json +13 -13
  135. package/dist/prism-bash.min-DDo5CyRs-DihCfXgx.js +0 -7
  136. package/dist/prism-css.min-BrrzZC7b-BrrzZC7b.js +0 -7
  137. package/dist/prism-docker.min-DnIEokC3-D0v8IWN_.js +0 -22
  138. package/dist/prism-go.min-C7UmK6TW-C7UmK6TW.js +0 -1
  139. package/dist/prism-http.min-CsU3-jB8-CQ8PCDXl.js +0 -23
  140. package/dist/prism-javascript.min-CEqHqgbm-CEqHqgbm.js +0 -8
  141. package/dist/prism-jq.min-Q555vXZm-Q555vXZm.js +0 -8
  142. package/dist/prism-json.min-B1GJqK1k-B1GJqK1k.js +0 -1
  143. package/dist/prism-log.min-SDopTpKN-SDopTpKN.js +0 -1
  144. package/dist/prism-lua.min-DwRnUVfS-DwRnUVfS.js +0 -1
  145. package/dist/prism-makefile.min-DyutknhE-DyutknhE.js +0 -1
  146. package/dist/prism-markdown.min-B7US-xc7-DB9aF_ZA.js +0 -63
  147. package/dist/prism-python.min-BIfpAh5K-BIfpAh5K.js +0 -1
  148. package/dist/prism-regex.min-f8DNqi8X-f8DNqi8X.js +0 -4
  149. package/dist/prism-rest.min-B6veHRJF-B6veHRJF.js +0 -1
  150. package/dist/prism-rust.min-Cb-Mi-h0-Cb-Mi-h0.js +0 -9
  151. package/dist/prism-scss.min-B0csyGJo-B0csyGJo.js +0 -1
  152. package/dist/prism-sql.min-BHXzX-c_-BHXzX-c_.js +0 -1
  153. package/dist/prism-typescript.min-oSVeWCAd-oSVeWCAd.js +0 -5
  154. package/dist/prism-xml-doc.min-yj0YzRGe-KgTQx-dc.js +0 -7
  155. package/dist/prism-yaml.min-CTetcdKA-C1YzP_OY.js +0 -28
@@ -0,0 +1,1282 @@
1
+ import { a$ as Ft, b0 as at, aM as At, aL as Nt, s as Ot, g as Bt, v as Vt, x as St, a as Xt, b as Yt, z as Ut, l as wt, aK as Ht, i as Qt, d as Gt } from "./index-B-5DuDrq.js";
2
+ import { Q as jt } from "./createText-423428c9-LivTKT7b-BXNfjcdp.js";
3
+ import { t as Kt } from "./init-DjUOC4st-C8Nwz6AJ.js";
4
+ import { h as Zt } from "./ordinal-MUacOSdK-B1MUT0BL.js";
5
+ import { Z as dt } from "./linear-Bz4oRFvQ-C869GXbm.js";
6
+ import { P as pt } from "./line-nVq5kEiy-DtZd3PHZ.js";
7
+ function Jt(e, t, i) {
8
+ e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
9
+ for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
10
+ o[s] = e + s * i;
11
+ return o;
12
+ }
13
+ function et() {
14
+ var e = Zt().unknown(void 0), t = e.domain, i = e.range, s = 0, n = 1, o, u, d = !1, x = 0, _ = 0, k = 0.5;
15
+ delete e.unknown;
16
+ function b() {
17
+ var f = t().length, T = n < s, S = T ? n : s, D = T ? s : n;
18
+ o = (D - S) / Math.max(1, f - x + _ * 2), d && (o = Math.floor(o)), S += (D - S - o * (f - x)) * k, u = o * (1 - x), d && (S = Math.round(S), u = Math.round(u));
19
+ var p = Jt(f).map(function(w) {
20
+ return S + o * w;
21
+ });
22
+ return i(T ? p.reverse() : p);
23
+ }
24
+ return e.domain = function(f) {
25
+ return arguments.length ? (t(f), b()) : t();
26
+ }, e.range = function(f) {
27
+ return arguments.length ? ([s, n] = f, s = +s, n = +n, b()) : [s, n];
28
+ }, e.rangeRound = function(f) {
29
+ return [s, n] = f, s = +s, n = +n, d = !0, b();
30
+ }, e.bandwidth = function() {
31
+ return u;
32
+ }, e.step = function() {
33
+ return o;
34
+ }, e.round = function(f) {
35
+ return arguments.length ? (d = !!f, b()) : d;
36
+ }, e.padding = function(f) {
37
+ return arguments.length ? (x = Math.min(1, _ = +f), b()) : x;
38
+ }, e.paddingInner = function(f) {
39
+ return arguments.length ? (x = Math.min(1, f), b()) : x;
40
+ }, e.paddingOuter = function(f) {
41
+ return arguments.length ? (_ = +f, b()) : _;
42
+ }, e.align = function(f) {
43
+ return arguments.length ? (k = Math.max(0, Math.min(1, f)), b()) : k;
44
+ }, e.copy = function() {
45
+ return et(t(), [s, n]).round(d).paddingInner(x).paddingOuter(_).align(k);
46
+ }, Kt.apply(b(), arguments);
47
+ }
48
+ var st = function() {
49
+ var e = function($, h, l, c) {
50
+ for (l = l || {}, c = $.length; c--; l[$[c]] = h)
51
+ ;
52
+ return l;
53
+ }, t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], n = [1, 5], o = [1, 6], u = [1, 7], d = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], x = [1, 25], _ = [1, 26], k = [1, 28], b = [1, 29], f = [1, 30], T = [1, 31], S = [1, 32], D = [1, 33], p = [1, 34], w = [1, 35], r = [1, 36], P = [1, 37], N = [1, 43], rt = [1, 42], lt = [1, 47], Y = [1, 50], A = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], j = [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], ct = [1, 64], K = {
54
+ trace: function() {
55
+ },
56
+ yy: {},
57
+ 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 },
58
+ 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" },
59
+ 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]],
60
+ performAction: function($, h, l, c, m, a, R) {
61
+ var g = a.length - 1;
62
+ switch (m) {
63
+ case 5:
64
+ c.setOrientation(a[g]);
65
+ break;
66
+ case 9:
67
+ c.setDiagramTitle(a[g].text.trim());
68
+ break;
69
+ case 12:
70
+ c.setLineData({ text: "", type: "text" }, a[g]);
71
+ break;
72
+ case 13:
73
+ c.setLineData(a[g - 1], a[g]);
74
+ break;
75
+ case 14:
76
+ c.setBarData({ text: "", type: "text" }, a[g]);
77
+ break;
78
+ case 15:
79
+ c.setBarData(a[g - 1], a[g]);
80
+ break;
81
+ case 16:
82
+ this.$ = a[g].trim(), c.setAccTitle(this.$);
83
+ break;
84
+ case 17:
85
+ case 18:
86
+ this.$ = a[g].trim(), c.setAccDescription(this.$);
87
+ break;
88
+ case 19:
89
+ this.$ = a[g - 1];
90
+ break;
91
+ case 20:
92
+ this.$ = [Number(a[g - 2]), ...a[g]];
93
+ break;
94
+ case 21:
95
+ this.$ = [Number(a[g])];
96
+ break;
97
+ case 22:
98
+ c.setXAxisTitle(a[g]);
99
+ break;
100
+ case 23:
101
+ c.setXAxisTitle(a[g - 1]);
102
+ break;
103
+ case 24:
104
+ c.setXAxisTitle({ type: "text", text: "" });
105
+ break;
106
+ case 25:
107
+ c.setXAxisBand(a[g]);
108
+ break;
109
+ case 26:
110
+ c.setXAxisRangeData(Number(a[g - 2]), Number(a[g]));
111
+ break;
112
+ case 27:
113
+ this.$ = a[g - 1];
114
+ break;
115
+ case 28:
116
+ this.$ = [a[g - 2], ...a[g]];
117
+ break;
118
+ case 29:
119
+ this.$ = [a[g]];
120
+ break;
121
+ case 30:
122
+ c.setYAxisTitle(a[g]);
123
+ break;
124
+ case 31:
125
+ c.setYAxisTitle(a[g - 1]);
126
+ break;
127
+ case 32:
128
+ c.setYAxisTitle({ type: "text", text: "" });
129
+ break;
130
+ case 33:
131
+ c.setYAxisRangeData(Number(a[g - 2]), Number(a[g]));
132
+ break;
133
+ case 37:
134
+ this.$ = { text: a[g], type: "text" };
135
+ break;
136
+ case 38:
137
+ this.$ = { text: a[g], type: "text" };
138
+ break;
139
+ case 39:
140
+ this.$ = { text: a[g], type: "markdown" };
141
+ break;
142
+ case 40:
143
+ this.$ = a[g];
144
+ break;
145
+ case 41:
146
+ this.$ = a[g - 1] + "" + a[g];
147
+ break;
148
+ }
149
+ },
150
+ table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 34: n, 35: o, 36: u }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 34: n, 35: o, 36: u }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 34: n, 35: o, 36: u }), { 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(d, [2, 34]), e(d, [2, 35]), e(d, [2, 36]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 34: n, 35: o, 36: u }), { 1: [2, 3] }, e(d, [2, 5]), e(t, [2, 7], { 4: 22, 34: n, 35: o, 36: u }), { 11: 23, 37: 24, 38: x, 39: _, 40: 27, 41: k, 42: b, 43: f, 44: T, 45: S, 46: D, 47: p, 48: w, 49: r, 50: P }, { 11: 39, 13: 38, 24: N, 27: rt, 29: 40, 30: 41, 37: 24, 38: x, 39: _, 40: 27, 41: k, 42: b, 43: f, 44: T, 45: S, 46: D, 47: p, 48: w, 49: r, 50: P }, { 11: 45, 15: 44, 27: lt, 33: 46, 37: 24, 38: x, 39: _, 40: 27, 41: k, 42: b, 43: f, 44: T, 45: S, 46: D, 47: p, 48: w, 49: r, 50: P }, { 11: 49, 17: 48, 24: Y, 37: 24, 38: x, 39: _, 40: 27, 41: k, 42: b, 43: f, 44: T, 45: S, 46: D, 47: p, 48: w, 49: r, 50: P }, { 11: 52, 17: 51, 24: Y, 37: 24, 38: x, 39: _, 40: 27, 41: k, 42: b, 43: f, 44: T, 45: S, 46: D, 47: p, 48: w, 49: r, 50: P }, { 20: [1, 53] }, { 22: [1, 54] }, e(A, [2, 18]), { 1: [2, 2] }, e(A, [2, 8]), e(A, [2, 9]), e(j, [2, 37], { 40: 55, 41: k, 42: b, 43: f, 44: T, 45: S, 46: D, 47: p, 48: w, 49: r, 50: P }), e(j, [2, 38]), e(j, [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(A, [2, 10]), e(A, [2, 22], { 30: 41, 29: 56, 24: N, 27: rt }), e(A, [2, 24]), e(A, [2, 25]), { 31: [1, 57] }, { 11: 59, 32: 58, 37: 24, 38: x, 39: _, 40: 27, 41: k, 42: b, 43: f, 44: T, 45: S, 46: D, 47: p, 48: w, 49: r, 50: P }, e(A, [2, 11]), e(A, [2, 30], { 33: 60, 27: lt }), e(A, [2, 32]), { 31: [1, 61] }, e(A, [2, 12]), { 17: 62, 24: Y }, { 25: 63, 27: ct }, e(A, [2, 14]), { 17: 65, 24: Y }, e(A, [2, 16]), e(A, [2, 17]), e(E, [2, 41]), e(A, [2, 23]), { 27: [1, 66] }, { 26: [1, 67] }, { 26: [2, 29], 28: [1, 68] }, e(A, [2, 31]), { 27: [1, 69] }, e(A, [2, 13]), { 26: [1, 70] }, { 26: [2, 21], 28: [1, 71] }, e(A, [2, 15]), e(A, [2, 26]), e(A, [2, 27]), { 11: 59, 32: 72, 37: 24, 38: x, 39: _, 40: 27, 41: k, 42: b, 43: f, 44: T, 45: S, 46: D, 47: p, 48: w, 49: r, 50: P }, e(A, [2, 33]), e(A, [2, 19]), { 25: 73, 27: ct }, { 26: [2, 28] }, { 26: [2, 20] }],
151
+ defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] },
152
+ parseError: function($, h) {
153
+ if (h.recoverable)
154
+ this.trace($);
155
+ else {
156
+ var l = new Error($);
157
+ throw l.hash = h, l;
158
+ }
159
+ },
160
+ parse: function($) {
161
+ var h = this, l = [0], c = [], m = [null], a = [], R = this.table, g = "", U = 0, ut = 0, Mt = 2, gt = 1, It = a.slice.call(arguments, 1), C = Object.create(this.lexer), z = { yy: {} };
162
+ for (var J in this.yy)
163
+ Object.prototype.hasOwnProperty.call(this.yy, J) && (z.yy[J] = this.yy[J]);
164
+ C.setInput($, z.yy), z.yy.lexer = C, z.yy.parser = this, typeof C.yylloc > "u" && (C.yylloc = {});
165
+ var q = C.yylloc;
166
+ a.push(q);
167
+ var zt = C.options && C.options.ranges;
168
+ typeof z.yy.parseError == "function" ? this.parseError = z.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
169
+ function Wt() {
170
+ var I;
171
+ return I = c.pop() || C.lex() || gt, typeof I != "number" && (I instanceof Array && (c = I, I = c.pop()), I = h.symbols_[I] || I), I;
172
+ }
173
+ for (var L, W, v, tt, F = {}, H, M, xt, Q; ; ) {
174
+ if (W = l[l.length - 1], this.defaultActions[W] ? v = this.defaultActions[W] : ((L === null || typeof L > "u") && (L = Wt()), v = R[W] && R[W][L]), typeof v > "u" || !v.length || !v[0]) {
175
+ var it = "";
176
+ Q = [];
177
+ for (H in R[W])
178
+ this.terminals_[H] && H > Mt && Q.push("'" + this.terminals_[H] + "'");
179
+ C.showPosition ? it = "Parse error on line " + (U + 1) + `:
180
+ ` + C.showPosition() + `
181
+ Expecting ` + Q.join(", ") + ", got '" + (this.terminals_[L] || L) + "'" : it = "Parse error on line " + (U + 1) + ": Unexpected " + (L == gt ? "end of input" : "'" + (this.terminals_[L] || L) + "'"), this.parseError(it, {
182
+ text: C.match,
183
+ token: this.terminals_[L] || L,
184
+ line: C.yylineno,
185
+ loc: q,
186
+ expected: Q
187
+ });
188
+ }
189
+ if (v[0] instanceof Array && v.length > 1)
190
+ throw new Error("Parse Error: multiple actions possible at state: " + W + ", token: " + L);
191
+ switch (v[0]) {
192
+ case 1:
193
+ l.push(L), m.push(C.yytext), a.push(C.yylloc), l.push(v[1]), L = null, ut = C.yyleng, g = C.yytext, U = C.yylineno, q = C.yylloc;
194
+ break;
195
+ case 2:
196
+ if (M = this.productions_[v[1]][1], F.$ = m[m.length - M], F._$ = {
197
+ first_line: a[a.length - (M || 1)].first_line,
198
+ last_line: a[a.length - 1].last_line,
199
+ first_column: a[a.length - (M || 1)].first_column,
200
+ last_column: a[a.length - 1].last_column
201
+ }, zt && (F._$.range = [
202
+ a[a.length - (M || 1)].range[0],
203
+ a[a.length - 1].range[1]
204
+ ]), tt = this.performAction.apply(F, [
205
+ g,
206
+ ut,
207
+ U,
208
+ z.yy,
209
+ v[1],
210
+ m,
211
+ a
212
+ ].concat(It)), typeof tt < "u")
213
+ return tt;
214
+ M && (l = l.slice(0, -1 * M * 2), m = m.slice(0, -1 * M), a = a.slice(0, -1 * M)), l.push(this.productions_[v[1]][0]), m.push(F.$), a.push(F._$), xt = R[l[l.length - 2]][l[l.length - 1]], l.push(xt);
215
+ break;
216
+ case 3:
217
+ return !0;
218
+ }
219
+ }
220
+ return !0;
221
+ }
222
+ }, $t = /* @__PURE__ */ function() {
223
+ var $ = {
224
+ EOF: 1,
225
+ parseError: function(h, l) {
226
+ if (this.yy.parser)
227
+ this.yy.parser.parseError(h, l);
228
+ else
229
+ throw new Error(h);
230
+ },
231
+ // resets the lexer, sets new input
232
+ setInput: function(h, l) {
233
+ return this.yy = l || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
234
+ first_line: 1,
235
+ first_column: 0,
236
+ last_line: 1,
237
+ last_column: 0
238
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
239
+ },
240
+ // consumes and returns one char from the input
241
+ input: function() {
242
+ var h = this._input[0];
243
+ this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
244
+ var l = h.match(/(?:\r\n?|\n).*/g);
245
+ 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), h;
246
+ },
247
+ // unshifts one char (or a string) into the input
248
+ unput: function(h) {
249
+ var l = h.length, c = h.split(/(?:\r\n?|\n)/g);
250
+ this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
251
+ var m = this.match.split(/(?:\r\n?|\n)/g);
252
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
253
+ var a = this.yylloc.range;
254
+ return this.yylloc = {
255
+ first_line: this.yylloc.first_line,
256
+ last_line: this.yylineno + 1,
257
+ first_column: this.yylloc.first_column,
258
+ last_column: c ? (c.length === m.length ? this.yylloc.first_column : 0) + m[m.length - c.length].length - c[0].length : this.yylloc.first_column - l
259
+ }, this.options.ranges && (this.yylloc.range = [a[0], a[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
260
+ },
261
+ // When called from action, caches matched text and appends it on next action
262
+ more: function() {
263
+ return this._more = !0, this;
264
+ },
265
+ // 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.
266
+ reject: function() {
267
+ if (this.options.backtrack_lexer)
268
+ this._backtrack = !0;
269
+ else
270
+ 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).
271
+ ` + this.showPosition(), {
272
+ text: "",
273
+ token: null,
274
+ line: this.yylineno
275
+ });
276
+ return this;
277
+ },
278
+ // retain first n characters of the match
279
+ less: function(h) {
280
+ this.unput(this.match.slice(h));
281
+ },
282
+ // displays already matched input, i.e. for error messages
283
+ pastInput: function() {
284
+ var h = this.matched.substr(0, this.matched.length - this.match.length);
285
+ return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
286
+ },
287
+ // displays upcoming input, i.e. for error messages
288
+ upcomingInput: function() {
289
+ var h = this.match;
290
+ return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
291
+ },
292
+ // displays the character position where the lexing error occurred, i.e. for error messages
293
+ showPosition: function() {
294
+ var h = this.pastInput(), l = new Array(h.length + 1).join("-");
295
+ return h + this.upcomingInput() + `
296
+ ` + l + "^";
297
+ },
298
+ // test the lexed token: return FALSE when not a match, otherwise return token
299
+ test_match: function(h, l) {
300
+ var c, m, a;
301
+ if (this.options.backtrack_lexer && (a = {
302
+ yylineno: this.yylineno,
303
+ yylloc: {
304
+ first_line: this.yylloc.first_line,
305
+ last_line: this.last_line,
306
+ first_column: this.yylloc.first_column,
307
+ last_column: this.yylloc.last_column
308
+ },
309
+ yytext: this.yytext,
310
+ match: this.match,
311
+ matches: this.matches,
312
+ matched: this.matched,
313
+ yyleng: this.yyleng,
314
+ offset: this.offset,
315
+ _more: this._more,
316
+ _input: this._input,
317
+ yy: this.yy,
318
+ conditionStack: this.conditionStack.slice(0),
319
+ done: this.done
320
+ }, this.options.ranges && (a.yylloc.range = this.yylloc.range.slice(0))), m = h[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
321
+ first_line: this.yylloc.last_line,
322
+ last_line: this.yylineno + 1,
323
+ first_column: this.yylloc.last_column,
324
+ last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
325
+ }, this.yytext += h[0], this.match += h[0], this.matches = h, 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(h[0].length), this.matched += h[0], c = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
326
+ return c;
327
+ if (this._backtrack) {
328
+ for (var R in a)
329
+ this[R] = a[R];
330
+ return !1;
331
+ }
332
+ return !1;
333
+ },
334
+ // return next match in input
335
+ next: function() {
336
+ if (this.done)
337
+ return this.EOF;
338
+ this._input || (this.done = !0);
339
+ var h, l, c, m;
340
+ this._more || (this.yytext = "", this.match = "");
341
+ for (var a = this._currentRules(), R = 0; R < a.length; R++)
342
+ if (c = this._input.match(this.rules[a[R]]), c && (!l || c[0].length > l[0].length)) {
343
+ if (l = c, m = R, this.options.backtrack_lexer) {
344
+ if (h = this.test_match(c, a[R]), h !== !1)
345
+ return h;
346
+ if (this._backtrack) {
347
+ l = !1;
348
+ continue;
349
+ } else
350
+ return !1;
351
+ } else if (!this.options.flex)
352
+ break;
353
+ }
354
+ return l ? (h = this.test_match(l, a[m]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
355
+ ` + this.showPosition(), {
356
+ text: "",
357
+ token: null,
358
+ line: this.yylineno
359
+ });
360
+ },
361
+ // return next match that has a token
362
+ lex: function() {
363
+ var h = this.next();
364
+ return h || this.lex();
365
+ },
366
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
367
+ begin: function(h) {
368
+ this.conditionStack.push(h);
369
+ },
370
+ // pop the previously active lexer condition state off the condition stack
371
+ popState: function() {
372
+ var h = this.conditionStack.length - 1;
373
+ return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
374
+ },
375
+ // produce the lexer rule set which is active for the currently active lexer condition state
376
+ _currentRules: function() {
377
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
378
+ },
379
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
380
+ topState: function(h) {
381
+ return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
382
+ },
383
+ // alias for begin(condition)
384
+ pushState: function(h) {
385
+ this.begin(h);
386
+ },
387
+ // return the number of states currently on the stack
388
+ stateStackSize: function() {
389
+ return this.conditionStack.length;
390
+ },
391
+ options: { "case-insensitive": !0 },
392
+ performAction: function(h, l, c, m) {
393
+ switch (c) {
394
+ case 0:
395
+ break;
396
+ case 1:
397
+ break;
398
+ case 2:
399
+ return this.popState(), 34;
400
+ case 3:
401
+ return this.popState(), 34;
402
+ case 4:
403
+ return 34;
404
+ case 5:
405
+ break;
406
+ case 6:
407
+ return 10;
408
+ case 7:
409
+ return this.pushState("acc_title"), 19;
410
+ case 8:
411
+ return this.popState(), "acc_title_value";
412
+ case 9:
413
+ return this.pushState("acc_descr"), 21;
414
+ case 10:
415
+ return this.popState(), "acc_descr_value";
416
+ case 11:
417
+ this.pushState("acc_descr_multiline");
418
+ break;
419
+ case 12:
420
+ this.popState();
421
+ break;
422
+ case 13:
423
+ return "acc_descr_multiline_value";
424
+ case 14:
425
+ return 5;
426
+ case 15:
427
+ return 8;
428
+ case 16:
429
+ return this.pushState("axis_data"), "X_AXIS";
430
+ case 17:
431
+ return this.pushState("axis_data"), "Y_AXIS";
432
+ case 18:
433
+ return this.pushState("axis_band_data"), 24;
434
+ case 19:
435
+ return 31;
436
+ case 20:
437
+ return this.pushState("data"), 16;
438
+ case 21:
439
+ return this.pushState("data"), 18;
440
+ case 22:
441
+ return this.pushState("data_inner"), 24;
442
+ case 23:
443
+ return 27;
444
+ case 24:
445
+ return this.popState(), 26;
446
+ case 25:
447
+ this.popState();
448
+ break;
449
+ case 26:
450
+ this.pushState("string");
451
+ break;
452
+ case 27:
453
+ this.popState();
454
+ break;
455
+ case 28:
456
+ return "STR";
457
+ case 29:
458
+ return 24;
459
+ case 30:
460
+ return 26;
461
+ case 31:
462
+ return 43;
463
+ case 32:
464
+ return "COLON";
465
+ case 33:
466
+ return 44;
467
+ case 34:
468
+ return 28;
469
+ case 35:
470
+ return 45;
471
+ case 36:
472
+ return 46;
473
+ case 37:
474
+ return 48;
475
+ case 38:
476
+ return 50;
477
+ case 39:
478
+ return 47;
479
+ case 40:
480
+ return 41;
481
+ case 41:
482
+ return 49;
483
+ case 42:
484
+ return 42;
485
+ case 43:
486
+ break;
487
+ case 44:
488
+ return 35;
489
+ case 45:
490
+ return 36;
491
+ }
492
+ },
493
+ 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],
494
+ 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 } }
495
+ };
496
+ return $;
497
+ }();
498
+ K.lexer = $t;
499
+ function Z() {
500
+ this.yy = {};
501
+ }
502
+ return Z.prototype = K, K.Parser = Z, new Z();
503
+ }();
504
+ st.parser = st;
505
+ const qt = st;
506
+ function ft(e) {
507
+ return e.type === "bar";
508
+ }
509
+ function kt(e) {
510
+ return e.type === "band";
511
+ }
512
+ function O(e) {
513
+ return e.type === "linear";
514
+ }
515
+ class Ct {
516
+ constructor(t) {
517
+ this.parentGroup = t;
518
+ }
519
+ getMaxDimension(t, i) {
520
+ if (!this.parentGroup)
521
+ return {
522
+ width: t.reduce((o, u) => Math.max(u.length, o), 0) * i,
523
+ height: i
524
+ };
525
+ const s = {
526
+ width: 0,
527
+ height: 0
528
+ }, n = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
529
+ for (const o of t) {
530
+ const u = jt(n, 1, o), d = u ? u.width : o.length * i, x = u ? u.height : i;
531
+ s.width = Math.max(s.width, d), s.height = Math.max(s.height, x);
532
+ }
533
+ return n.remove(), s;
534
+ }
535
+ }
536
+ const yt = 0.7, mt = 0.2;
537
+ class _t {
538
+ constructor(t, i, s, n) {
539
+ 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";
540
+ }
541
+ setRange(t) {
542
+ 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();
543
+ }
544
+ getRange() {
545
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
546
+ }
547
+ setAxisPosition(t) {
548
+ this.axisPosition = t, this.setRange(this.range);
549
+ }
550
+ getTickDistance() {
551
+ const t = this.getRange();
552
+ return Math.abs(t[0] - t[1]) / this.getTickValues().length;
553
+ }
554
+ getAxisOuterPadding() {
555
+ return this.outerPadding;
556
+ }
557
+ getLabelDimension() {
558
+ return this.textDimensionCalculator.getMaxDimension(
559
+ this.getTickValues().map((t) => t.toString()),
560
+ this.axisConfig.labelFontSize
561
+ );
562
+ }
563
+ recalculateOuterPaddingToDrawBar() {
564
+ yt * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(yt * this.getTickDistance() / 2)), this.recalculateScale();
565
+ }
566
+ calculateSpaceIfDrawnHorizontally(t) {
567
+ let i = t.height;
568
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
569
+ const s = this.getLabelDimension(), n = mt * t.width;
570
+ this.outerPadding = Math.min(s.width / 2, n);
571
+ const o = s.height + this.axisConfig.labelPadding * 2;
572
+ this.labelTextHeight = s.height, o <= i && (i -= o, this.showLabel = !0);
573
+ }
574
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
575
+ const s = this.textDimensionCalculator.getMaxDimension(
576
+ [this.title],
577
+ this.axisConfig.titleFontSize
578
+ ), n = s.height + this.axisConfig.titlePadding * 2;
579
+ this.titleTextHeight = s.height, n <= i && (i -= n, this.showTitle = !0);
580
+ }
581
+ this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
582
+ }
583
+ calculateSpaceIfDrawnVertical(t) {
584
+ let i = t.width;
585
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
586
+ const s = this.getLabelDimension(), n = mt * t.height;
587
+ this.outerPadding = Math.min(s.height / 2, n);
588
+ const o = s.width + this.axisConfig.labelPadding * 2;
589
+ o <= i && (i -= o, this.showLabel = !0);
590
+ }
591
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
592
+ const s = this.textDimensionCalculator.getMaxDimension(
593
+ [this.title],
594
+ this.axisConfig.titleFontSize
595
+ ), n = s.height + this.axisConfig.titlePadding * 2;
596
+ this.titleTextHeight = s.height, n <= i && (i -= n, this.showTitle = !0);
597
+ }
598
+ this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
599
+ }
600
+ calculateSpace(t) {
601
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
602
+ width: this.boundingRect.width,
603
+ height: this.boundingRect.height
604
+ };
605
+ }
606
+ setBoundingBoxXY(t) {
607
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
608
+ }
609
+ getDrawableElementsForLeftAxis() {
610
+ const t = [];
611
+ if (this.showAxisLine) {
612
+ const i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
613
+ t.push({
614
+ type: "path",
615
+ groupTexts: ["left-axis", "axisl-line"],
616
+ data: [
617
+ {
618
+ path: `M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y + this.boundingRect.height} `,
619
+ strokeFill: this.axisThemeConfig.axisLineColor,
620
+ strokeWidth: this.axisConfig.axisLineWidth
621
+ }
622
+ ]
623
+ });
624
+ }
625
+ if (this.showLabel && t.push({
626
+ type: "text",
627
+ groupTexts: ["left-axis", "label"],
628
+ data: this.getTickValues().map((i) => ({
629
+ text: i.toString(),
630
+ 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),
631
+ y: this.getScaleValue(i),
632
+ fill: this.axisThemeConfig.labelColor,
633
+ fontSize: this.axisConfig.labelFontSize,
634
+ rotation: 0,
635
+ verticalPos: "middle",
636
+ horizontalPos: "right"
637
+ }))
638
+ }), this.showTick) {
639
+ const i = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
640
+ t.push({
641
+ type: "path",
642
+ groupTexts: ["left-axis", "ticks"],
643
+ data: this.getTickValues().map((s) => ({
644
+ path: `M ${i},${this.getScaleValue(s)} L ${i - this.axisConfig.tickLength},${this.getScaleValue(s)}`,
645
+ strokeFill: this.axisThemeConfig.tickColor,
646
+ strokeWidth: this.axisConfig.tickWidth
647
+ }))
648
+ });
649
+ }
650
+ return this.showTitle && t.push({
651
+ type: "text",
652
+ groupTexts: ["left-axis", "title"],
653
+ data: [
654
+ {
655
+ text: this.title,
656
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
657
+ y: this.boundingRect.y + this.boundingRect.height / 2,
658
+ fill: this.axisThemeConfig.titleColor,
659
+ fontSize: this.axisConfig.titleFontSize,
660
+ rotation: 270,
661
+ verticalPos: "top",
662
+ horizontalPos: "center"
663
+ }
664
+ ]
665
+ }), t;
666
+ }
667
+ getDrawableElementsForBottomAxis() {
668
+ const t = [];
669
+ if (this.showAxisLine) {
670
+ const i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
671
+ t.push({
672
+ type: "path",
673
+ groupTexts: ["bottom-axis", "axis-line"],
674
+ data: [
675
+ {
676
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
677
+ strokeFill: this.axisThemeConfig.axisLineColor,
678
+ strokeWidth: this.axisConfig.axisLineWidth
679
+ }
680
+ ]
681
+ });
682
+ }
683
+ if (this.showLabel && t.push({
684
+ type: "text",
685
+ groupTexts: ["bottom-axis", "label"],
686
+ data: this.getTickValues().map((i) => ({
687
+ text: i.toString(),
688
+ x: this.getScaleValue(i),
689
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
690
+ fill: this.axisThemeConfig.labelColor,
691
+ fontSize: this.axisConfig.labelFontSize,
692
+ rotation: 0,
693
+ verticalPos: "top",
694
+ horizontalPos: "center"
695
+ }))
696
+ }), this.showTick) {
697
+ const i = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
698
+ t.push({
699
+ type: "path",
700
+ groupTexts: ["bottom-axis", "ticks"],
701
+ data: this.getTickValues().map((s) => ({
702
+ path: `M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i + this.axisConfig.tickLength}`,
703
+ strokeFill: this.axisThemeConfig.tickColor,
704
+ strokeWidth: this.axisConfig.tickWidth
705
+ }))
706
+ });
707
+ }
708
+ return this.showTitle && t.push({
709
+ type: "text",
710
+ groupTexts: ["bottom-axis", "title"],
711
+ data: [
712
+ {
713
+ text: this.title,
714
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
715
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
716
+ fill: this.axisThemeConfig.titleColor,
717
+ fontSize: this.axisConfig.titleFontSize,
718
+ rotation: 0,
719
+ verticalPos: "top",
720
+ horizontalPos: "center"
721
+ }
722
+ ]
723
+ }), t;
724
+ }
725
+ getDrawableElementsForTopAxis() {
726
+ const t = [];
727
+ if (this.showAxisLine) {
728
+ const i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
729
+ t.push({
730
+ type: "path",
731
+ groupTexts: ["top-axis", "axis-line"],
732
+ data: [
733
+ {
734
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
735
+ strokeFill: this.axisThemeConfig.axisLineColor,
736
+ strokeWidth: this.axisConfig.axisLineWidth
737
+ }
738
+ ]
739
+ });
740
+ }
741
+ if (this.showLabel && t.push({
742
+ type: "text",
743
+ groupTexts: ["top-axis", "label"],
744
+ data: this.getTickValues().map((i) => ({
745
+ text: i.toString(),
746
+ x: this.getScaleValue(i),
747
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
748
+ fill: this.axisThemeConfig.labelColor,
749
+ fontSize: this.axisConfig.labelFontSize,
750
+ rotation: 0,
751
+ verticalPos: "top",
752
+ horizontalPos: "center"
753
+ }))
754
+ }), this.showTick) {
755
+ const i = this.boundingRect.y;
756
+ t.push({
757
+ type: "path",
758
+ groupTexts: ["top-axis", "ticks"],
759
+ data: this.getTickValues().map((s) => ({
760
+ 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)}`,
761
+ strokeFill: this.axisThemeConfig.tickColor,
762
+ strokeWidth: this.axisConfig.tickWidth
763
+ }))
764
+ });
765
+ }
766
+ return this.showTitle && t.push({
767
+ type: "text",
768
+ groupTexts: ["top-axis", "title"],
769
+ data: [
770
+ {
771
+ text: this.title,
772
+ x: this.boundingRect.x + this.boundingRect.width / 2,
773
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
774
+ fill: this.axisThemeConfig.titleColor,
775
+ fontSize: this.axisConfig.titleFontSize,
776
+ rotation: 0,
777
+ verticalPos: "top",
778
+ horizontalPos: "center"
779
+ }
780
+ ]
781
+ }), t;
782
+ }
783
+ getDrawableElements() {
784
+ if (this.axisPosition === "left")
785
+ return this.getDrawableElementsForLeftAxis();
786
+ if (this.axisPosition === "right")
787
+ throw Error("Drawing of right axis is not implemented");
788
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
789
+ }
790
+ }
791
+ class ti extends _t {
792
+ constructor(t, i, s, n, o) {
793
+ super(t, n, o, i), this.categories = s, this.scale = et().domain(this.categories).range(this.getRange());
794
+ }
795
+ setRange(t) {
796
+ super.setRange(t);
797
+ }
798
+ recalculateScale() {
799
+ this.scale = et().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), wt.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
800
+ }
801
+ getTickValues() {
802
+ return this.categories;
803
+ }
804
+ getScaleValue(t) {
805
+ return this.scale(t) || this.getRange()[0];
806
+ }
807
+ }
808
+ class ii extends _t {
809
+ constructor(t, i, s, n, o) {
810
+ super(t, n, o, i), this.domain = s, this.scale = dt().domain(this.domain).range(this.getRange());
811
+ }
812
+ getTickValues() {
813
+ return this.scale.ticks();
814
+ }
815
+ recalculateScale() {
816
+ const t = [...this.domain];
817
+ this.axisPosition === "left" && t.reverse(), this.scale = dt().domain(t).range(this.getRange());
818
+ }
819
+ getScaleValue(t) {
820
+ return this.scale(t);
821
+ }
822
+ }
823
+ function bt(e, t, i, s) {
824
+ const n = new Ct(s);
825
+ return kt(e) ? new ti(
826
+ t,
827
+ i,
828
+ e.categories,
829
+ e.title,
830
+ n
831
+ ) : new ii(
832
+ t,
833
+ i,
834
+ [e.min, e.max],
835
+ e.title,
836
+ n
837
+ );
838
+ }
839
+ class ei {
840
+ constructor(t, i, s, n) {
841
+ this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = n, this.boundingRect = {
842
+ x: 0,
843
+ y: 0,
844
+ width: 0,
845
+ height: 0
846
+ }, this.showChartTitle = !1;
847
+ }
848
+ setBoundingBoxXY(t) {
849
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
850
+ }
851
+ calculateSpace(t) {
852
+ const i = this.textDimensionCalculator.getMaxDimension(
853
+ [this.chartData.title],
854
+ this.chartConfig.titleFontSize
855
+ ), s = Math.max(i.width, t.width), n = i.height + 2 * this.chartConfig.titlePadding;
856
+ return i.width <= s && i.height <= n && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = s, this.boundingRect.height = n, this.showChartTitle = !0), {
857
+ width: this.boundingRect.width,
858
+ height: this.boundingRect.height
859
+ };
860
+ }
861
+ getDrawableElements() {
862
+ const t = [];
863
+ return this.showChartTitle && t.push({
864
+ groupTexts: ["chart-title"],
865
+ type: "text",
866
+ data: [
867
+ {
868
+ fontSize: this.chartConfig.titleFontSize,
869
+ text: this.chartData.title,
870
+ verticalPos: "middle",
871
+ horizontalPos: "center",
872
+ x: this.boundingRect.x + this.boundingRect.width / 2,
873
+ y: this.boundingRect.y + this.boundingRect.height / 2,
874
+ fill: this.chartThemeConfig.titleColor,
875
+ rotation: 0
876
+ }
877
+ ]
878
+ }), t;
879
+ }
880
+ }
881
+ function si(e, t, i, s) {
882
+ const n = new Ct(s);
883
+ return new ei(n, e, t, i);
884
+ }
885
+ class ni {
886
+ constructor(t, i, s, n, o) {
887
+ this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = n, this.plotIndex = o;
888
+ }
889
+ getDrawableElement() {
890
+ const t = this.plotData.data.map((s) => [
891
+ this.xAxis.getScaleValue(s[0]),
892
+ this.yAxis.getScaleValue(s[1])
893
+ ]);
894
+ let i;
895
+ 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 ? [
896
+ {
897
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
898
+ type: "path",
899
+ data: [
900
+ {
901
+ path: i,
902
+ strokeFill: this.plotData.strokeFill,
903
+ strokeWidth: this.plotData.strokeWidth
904
+ }
905
+ ]
906
+ }
907
+ ] : [];
908
+ }
909
+ }
910
+ class ai {
911
+ constructor(t, i, s, n, o, u) {
912
+ this.barData = t, this.boundingRect = i, this.xAxis = s, this.yAxis = n, this.orientation = o, this.plotIndex = u;
913
+ }
914
+ getDrawableElement() {
915
+ const t = this.barData.data.map((n) => [
916
+ this.xAxis.getScaleValue(n[0]),
917
+ this.yAxis.getScaleValue(n[1])
918
+ ]), i = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - 0.05), s = i / 2;
919
+ return this.orientation === "horizontal" ? [
920
+ {
921
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
922
+ type: "rect",
923
+ data: t.map((n) => ({
924
+ x: this.boundingRect.x,
925
+ y: n[0] - s,
926
+ height: i,
927
+ width: n[1] - this.boundingRect.x,
928
+ fill: this.barData.fill,
929
+ strokeWidth: 0,
930
+ strokeFill: this.barData.fill
931
+ }))
932
+ }
933
+ ] : [
934
+ {
935
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
936
+ type: "rect",
937
+ data: t.map((n) => ({
938
+ x: n[0] - s,
939
+ y: n[1],
940
+ width: i,
941
+ height: this.boundingRect.y + this.boundingRect.height - n[1],
942
+ fill: this.barData.fill,
943
+ strokeWidth: 0,
944
+ strokeFill: this.barData.fill
945
+ }))
946
+ }
947
+ ];
948
+ }
949
+ }
950
+ class hi {
951
+ constructor(t, i, s) {
952
+ this.chartConfig = t, this.chartData = i, this.chartThemeConfig = s, this.boundingRect = {
953
+ x: 0,
954
+ y: 0,
955
+ width: 0,
956
+ height: 0
957
+ };
958
+ }
959
+ setAxes(t, i) {
960
+ this.xAxis = t, this.yAxis = i;
961
+ }
962
+ setBoundingBoxXY(t) {
963
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
964
+ }
965
+ calculateSpace(t) {
966
+ return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
967
+ width: this.boundingRect.width,
968
+ height: this.boundingRect.height
969
+ };
970
+ }
971
+ getDrawableElements() {
972
+ if (!(this.xAxis && this.yAxis))
973
+ throw Error("Axes must be passed to render Plots");
974
+ const t = [];
975
+ for (const [i, s] of this.chartData.plots.entries())
976
+ switch (s.type) {
977
+ case "line":
978
+ {
979
+ const n = new ni(
980
+ s,
981
+ this.xAxis,
982
+ this.yAxis,
983
+ this.chartConfig.chartOrientation,
984
+ i
985
+ );
986
+ t.push(...n.getDrawableElement());
987
+ }
988
+ break;
989
+ case "bar":
990
+ {
991
+ const n = new ai(
992
+ s,
993
+ this.boundingRect,
994
+ this.xAxis,
995
+ this.yAxis,
996
+ this.chartConfig.chartOrientation,
997
+ i
998
+ );
999
+ t.push(...n.getDrawableElement());
1000
+ }
1001
+ break;
1002
+ }
1003
+ return t;
1004
+ }
1005
+ }
1006
+ function oi(e, t, i) {
1007
+ return new hi(e, t, i);
1008
+ }
1009
+ class ri {
1010
+ constructor(t, i, s, n) {
1011
+ this.chartConfig = t, this.chartData = i, this.componentStore = {
1012
+ title: si(t, i, s, n),
1013
+ plot: oi(t, i, s),
1014
+ xAxis: bt(
1015
+ i.xAxis,
1016
+ t.xAxis,
1017
+ {
1018
+ titleColor: s.xAxisTitleColor,
1019
+ labelColor: s.xAxisLabelColor,
1020
+ tickColor: s.xAxisTickColor,
1021
+ axisLineColor: s.xAxisLineColor
1022
+ },
1023
+ n
1024
+ ),
1025
+ yAxis: bt(
1026
+ i.yAxis,
1027
+ t.yAxis,
1028
+ {
1029
+ titleColor: s.yAxisTitleColor,
1030
+ labelColor: s.yAxisLabelColor,
1031
+ tickColor: s.yAxisTickColor,
1032
+ axisLineColor: s.yAxisLineColor
1033
+ },
1034
+ n
1035
+ )
1036
+ };
1037
+ }
1038
+ calculateVerticalSpace() {
1039
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), u = Math.floor(
1040
+ i * this.chartConfig.plotReservedSpacePercent / 100
1041
+ ), d = this.componentStore.plot.calculateSpace({
1042
+ width: o,
1043
+ height: u
1044
+ });
1045
+ t -= d.width, i -= d.height, d = this.componentStore.title.calculateSpace({
1046
+ width: this.chartConfig.width,
1047
+ height: i
1048
+ }), n = d.height, i -= d.height, this.componentStore.xAxis.setAxisPosition("bottom"), d = this.componentStore.xAxis.calculateSpace({
1049
+ width: t,
1050
+ height: i
1051
+ }), i -= d.height, this.componentStore.yAxis.setAxisPosition("left"), d = this.componentStore.yAxis.calculateSpace({
1052
+ width: t,
1053
+ height: i
1054
+ }), s = d.width, t -= d.width, t > 0 && (o += t, t = 0), i > 0 && (u += i, i = 0), this.componentStore.plot.calculateSpace({
1055
+ width: o,
1056
+ height: u
1057
+ }), this.componentStore.plot.setBoundingBoxXY({ x: s, y: n }), this.componentStore.xAxis.setRange([s, s + o]), this.componentStore.xAxis.setBoundingBoxXY({ x: s, y: n + u }), this.componentStore.yAxis.setRange([n, n + u]), this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: n }), this.chartData.plots.some((x) => ft(x)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1058
+ }
1059
+ calculateHorizonatalSpace() {
1060
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = 0, u = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), d = Math.floor(
1061
+ i * this.chartConfig.plotReservedSpacePercent / 100
1062
+ ), x = this.componentStore.plot.calculateSpace({
1063
+ width: u,
1064
+ height: d
1065
+ });
1066
+ t -= x.width, i -= x.height, x = this.componentStore.title.calculateSpace({
1067
+ width: this.chartConfig.width,
1068
+ height: i
1069
+ }), s = x.height, i -= x.height, this.componentStore.xAxis.setAxisPosition("left"), x = this.componentStore.xAxis.calculateSpace({
1070
+ width: t,
1071
+ height: i
1072
+ }), t -= x.width, n = x.width, this.componentStore.yAxis.setAxisPosition("top"), x = this.componentStore.yAxis.calculateSpace({
1073
+ width: t,
1074
+ height: i
1075
+ }), i -= x.height, o = s + x.height, t > 0 && (u += t, t = 0), i > 0 && (d += i, i = 0), this.componentStore.plot.calculateSpace({
1076
+ width: u,
1077
+ height: d
1078
+ }), this.componentStore.plot.setBoundingBoxXY({ x: n, y: o }), this.componentStore.yAxis.setRange([n, n + u]), this.componentStore.yAxis.setBoundingBoxXY({ x: n, y: s }), this.componentStore.xAxis.setRange([o, o + d]), this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: o }), this.chartData.plots.some((_) => ft(_)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1079
+ }
1080
+ calculateSpace() {
1081
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizonatalSpace() : this.calculateVerticalSpace();
1082
+ }
1083
+ getDrawableElement() {
1084
+ this.calculateSpace();
1085
+ const t = [];
1086
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1087
+ for (const i of Object.values(this.componentStore))
1088
+ t.push(...i.getDrawableElements());
1089
+ return t;
1090
+ }
1091
+ }
1092
+ class li {
1093
+ static build(t, i, s, n) {
1094
+ return new ri(t, i, s, n).getDrawableElement();
1095
+ }
1096
+ }
1097
+ let B = 0, Tt, V = Lt(), X = Rt(), y = Dt(), nt = X.plotColorPalette.split(",").map((e) => e.trim()), G = !1, ht = !1;
1098
+ function Rt() {
1099
+ const e = Ft(), t = at();
1100
+ return At(e.xyChart, t.themeVariables.xyChart);
1101
+ }
1102
+ function Lt() {
1103
+ const e = at();
1104
+ return At(
1105
+ Nt.xyChart,
1106
+ e.xyChart
1107
+ );
1108
+ }
1109
+ function Dt() {
1110
+ return {
1111
+ yAxis: {
1112
+ type: "linear",
1113
+ title: "",
1114
+ min: 1 / 0,
1115
+ max: -1 / 0
1116
+ },
1117
+ xAxis: {
1118
+ type: "band",
1119
+ title: "",
1120
+ categories: []
1121
+ },
1122
+ title: "",
1123
+ plots: []
1124
+ };
1125
+ }
1126
+ function ot(e) {
1127
+ const t = at();
1128
+ return Gt(e.trim(), t);
1129
+ }
1130
+ function ci(e) {
1131
+ Tt = e;
1132
+ }
1133
+ function ui(e) {
1134
+ e === "horizontal" ? V.chartOrientation = "horizontal" : V.chartOrientation = "vertical";
1135
+ }
1136
+ function gi(e) {
1137
+ y.xAxis.title = ot(e.text);
1138
+ }
1139
+ function Pt(e, t) {
1140
+ y.xAxis = { type: "linear", title: y.xAxis.title, min: e, max: t }, G = !0;
1141
+ }
1142
+ function xi(e) {
1143
+ y.xAxis = {
1144
+ type: "band",
1145
+ title: y.xAxis.title,
1146
+ categories: e.map((t) => ot(t.text))
1147
+ }, G = !0;
1148
+ }
1149
+ function di(e) {
1150
+ y.yAxis.title = ot(e.text);
1151
+ }
1152
+ function pi(e, t) {
1153
+ y.yAxis = { type: "linear", title: y.yAxis.title, min: e, max: t }, ht = !0;
1154
+ }
1155
+ function fi(e) {
1156
+ const t = Math.min(...e), i = Math.max(...e), s = O(y.yAxis) ? y.yAxis.min : 1 / 0, n = O(y.yAxis) ? y.yAxis.max : -1 / 0;
1157
+ y.yAxis = {
1158
+ type: "linear",
1159
+ title: y.yAxis.title,
1160
+ min: Math.min(s, t),
1161
+ max: Math.max(n, i)
1162
+ };
1163
+ }
1164
+ function Et(e) {
1165
+ let t = [];
1166
+ if (e.length === 0)
1167
+ return t;
1168
+ if (!G) {
1169
+ const i = O(y.xAxis) ? y.xAxis.min : 1 / 0, s = O(y.xAxis) ? y.xAxis.max : -1 / 0;
1170
+ Pt(Math.min(i, 1), Math.max(s, e.length));
1171
+ }
1172
+ if (ht || fi(e), kt(y.xAxis) && (t = y.xAxis.categories.map((i, s) => [i, e[s]])), O(y.xAxis)) {
1173
+ const i = y.xAxis.min, s = y.xAxis.max, n = (s - i + 1) / e.length, o = [];
1174
+ for (let u = i; u <= s; u += n)
1175
+ o.push(`${u}`);
1176
+ t = o.map((u, d) => [u, e[d]]);
1177
+ }
1178
+ return t;
1179
+ }
1180
+ function vt(e) {
1181
+ return nt[e === 0 ? 0 : e % nt.length];
1182
+ }
1183
+ function yi(e, t) {
1184
+ const i = Et(t);
1185
+ y.plots.push({
1186
+ type: "line",
1187
+ strokeFill: vt(B),
1188
+ strokeWidth: 2,
1189
+ data: i
1190
+ }), B++;
1191
+ }
1192
+ function mi(e, t) {
1193
+ const i = Et(t);
1194
+ y.plots.push({
1195
+ type: "bar",
1196
+ fill: vt(B),
1197
+ data: i
1198
+ }), B++;
1199
+ }
1200
+ function bi() {
1201
+ if (y.plots.length === 0)
1202
+ throw Error("No Plot to render, please provide a plot with some data");
1203
+ return y.title = St(), li.build(V, y, X, Tt);
1204
+ }
1205
+ function Ai() {
1206
+ return X;
1207
+ }
1208
+ function Si() {
1209
+ return V;
1210
+ }
1211
+ const wi = function() {
1212
+ Ut(), B = 0, V = Lt(), y = Dt(), X = Rt(), nt = X.plotColorPalette.split(",").map((e) => e.trim()), G = !1, ht = !1;
1213
+ }, ki = {
1214
+ getDrawableElem: bi,
1215
+ clear: wi,
1216
+ setAccTitle: Ot,
1217
+ getAccTitle: Bt,
1218
+ setDiagramTitle: Vt,
1219
+ getDiagramTitle: St,
1220
+ getAccDescription: Xt,
1221
+ setAccDescription: Yt,
1222
+ setOrientation: ui,
1223
+ setXAxisTitle: gi,
1224
+ setXAxisRangeData: Pt,
1225
+ setXAxisBand: xi,
1226
+ setYAxisTitle: di,
1227
+ setYAxisRangeData: pi,
1228
+ setLineData: yi,
1229
+ setBarData: mi,
1230
+ setTmpSVGG: ci,
1231
+ getChartThemeConfig: Ai,
1232
+ getChartConfig: Si
1233
+ }, Ci = (e, t, i, s) => {
1234
+ const n = s.db, o = n.getChartThemeConfig(), u = n.getChartConfig();
1235
+ function d(p) {
1236
+ return p === "top" ? "text-before-edge" : "middle";
1237
+ }
1238
+ function x(p) {
1239
+ return p === "left" ? "start" : p === "right" ? "end" : "middle";
1240
+ }
1241
+ function _(p) {
1242
+ return `translate(${p.x}, ${p.y}) rotate(${p.rotation || 0})`;
1243
+ }
1244
+ wt.debug(`Rendering xychart chart
1245
+ ` + e);
1246
+ const k = Ht(t), b = k.append("g").attr("class", "main"), f = b.append("rect").attr("width", u.width).attr("height", u.height).attr("class", "background");
1247
+ Qt(k, u.height, u.width, !0), k.attr("viewBox", `0 0 ${u.width} ${u.height}`), f.attr("fill", o.backgroundColor), n.setTmpSVGG(k.append("g").attr("class", "mermaid-tmp-group"));
1248
+ const T = n.getDrawableElem(), S = {};
1249
+ function D(p) {
1250
+ let w = b, r = "";
1251
+ for (const [P] of p.entries()) {
1252
+ let N = b;
1253
+ P > 0 && S[r] && (N = S[r]), r += p[P], w = S[r], w || (w = S[r] = N.append("g").attr("class", p[P]));
1254
+ }
1255
+ return w;
1256
+ }
1257
+ for (const p of T) {
1258
+ if (p.data.length === 0)
1259
+ continue;
1260
+ const w = D(p.groupTexts);
1261
+ switch (p.type) {
1262
+ case "rect":
1263
+ w.selectAll("rect").data(p.data).enter().append("rect").attr("x", (r) => r.x).attr("y", (r) => r.y).attr("width", (r) => r.width).attr("height", (r) => r.height).attr("fill", (r) => r.fill).attr("stroke", (r) => r.strokeFill).attr("stroke-width", (r) => r.strokeWidth);
1264
+ break;
1265
+ case "text":
1266
+ w.selectAll("text").data(p.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (r) => r.fill).attr("font-size", (r) => r.fontSize).attr("dominant-baseline", (r) => d(r.verticalPos)).attr("text-anchor", (r) => x(r.horizontalPos)).attr("transform", (r) => _(r)).text((r) => r.text);
1267
+ break;
1268
+ case "path":
1269
+ w.selectAll("path").data(p.data).enter().append("path").attr("d", (r) => r.path).attr("fill", (r) => r.fill ? r.fill : "none").attr("stroke", (r) => r.strokeFill).attr("stroke-width", (r) => r.strokeWidth);
1270
+ break;
1271
+ }
1272
+ }
1273
+ }, _i = {
1274
+ draw: Ci
1275
+ }, vi = {
1276
+ parser: qt,
1277
+ db: ki,
1278
+ renderer: _i
1279
+ };
1280
+ export {
1281
+ vi as diagram
1282
+ };