@svgrid/grid 3.0.3 → 3.0.4

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 (281) hide show
  1. package/README.md +2 -1
  2. package/dist/GridMenus.svelte +44 -2
  3. package/dist/SvChartMenu.svelte +69 -0
  4. package/dist/SvChartMenu.svelte.d.ts +11 -0
  5. package/dist/SvChartPanes.svelte +113 -0
  6. package/dist/SvChartPanes.svelte.d.ts +20 -0
  7. package/dist/SvGrid.controller.svelte.d.ts +110 -39
  8. package/dist/SvGrid.controller.svelte.js +655 -200
  9. package/dist/SvGrid.css +105 -2
  10. package/dist/SvGrid.svelte +386 -514
  11. package/dist/SvGrid.types.d.ts +210 -9
  12. package/dist/SvGridCellEditor.svelte +17 -0
  13. package/dist/SvGridChart.svelte +2257 -329
  14. package/dist/SvGridChart.svelte.d.ts +6 -106
  15. package/dist/SvGridChart.types.d.ts +338 -0
  16. package/dist/SvGridChart.types.js +1 -0
  17. package/dist/SvGridChartBuilder.svelte +323 -0
  18. package/dist/SvGridChartBuilder.svelte.d.ts +34 -0
  19. package/dist/SvGridChartPanel.svelte +221 -275
  20. package/dist/SvGridChartPickers.svelte +417 -0
  21. package/dist/SvGridChartPickers.svelte.d.ts +70 -0
  22. package/dist/SvGridChartView.svelte +13 -14
  23. package/dist/SvModal.svelte +7 -1
  24. package/dist/SvModal.svelte.d.ts +5 -0
  25. package/dist/ai.d.ts +40 -8
  26. package/dist/ai.js +135 -24
  27. package/dist/aria.d.ts +11 -0
  28. package/dist/build-api.js +108 -22
  29. package/dist/cdn/GridMenus-7kbpnnBW.js +635 -0
  30. package/dist/cdn/GridMenus-BL7ZgQvU.js +636 -0
  31. package/dist/cdn/SvChartMenu-Bl6PBbkT.js +58 -0
  32. package/dist/cdn/SvChartMenu-FBSMINA6.js +59 -0
  33. package/dist/cdn/{SvDateRangeInput-DMLKmGEc.js → SvDateRangeInput-BeU_TkbQ.js} +15 -14
  34. package/dist/cdn/{SvDateRangeInput-CaOuMs8O.js → SvDateRangeInput-yX8vzleW.js} +38 -37
  35. package/dist/cdn/{SvDateTimePicker-sonaH0oh.js → SvDateTimePicker-DQwt4UAs.js} +139 -180
  36. package/dist/cdn/SvDateTimePicker-vNU6bZ-q.js +775 -0
  37. package/dist/cdn/{SvGridCellEditor-CjEJMJKc.js → SvGridCellEditor-B1p-vCK5.js} +188 -178
  38. package/dist/cdn/{SvGridCellEditor-BWnTi2N7.js → SvGridCellEditor-D_0q4xAu.js} +98 -88
  39. package/dist/cdn/SvGridChart-C3EWAZaM.js +3574 -0
  40. package/dist/cdn/SvGridChart-DzLkSwCH.js +3572 -0
  41. package/dist/cdn/SvGridChartBuilder-BE2T1ykB.js +783 -0
  42. package/dist/cdn/SvGridChartBuilder-CfII62sZ.js +784 -0
  43. package/dist/cdn/SvGridChartPanel-CCX5_Wgd.js +675 -0
  44. package/dist/cdn/SvGridChartPanel-xf4sWVTo.js +699 -0
  45. package/dist/cdn/SvGridChartView-CfuXmY5I.js +48 -0
  46. package/dist/cdn/SvGridChartView-DYwabQWj.js +47 -0
  47. package/dist/cdn/SvMenuList-CLN8OuIK.js +452 -0
  48. package/dist/cdn/SvMenuList-DkGhNKjf.js +451 -0
  49. package/dist/cdn/SvModal-BAE-pjZX.js +396 -0
  50. package/dist/cdn/SvModal-CIZWCcad.js +397 -0
  51. package/dist/cdn/chart-Dz7SqMXH.js +4341 -0
  52. package/dist/cdn/chart-export-BXqueeWJ.js +135 -0
  53. package/dist/cdn/chart-export-pdf-DONFUnNY.js +110 -0
  54. package/dist/cdn/chart-panel-messages-CUbf2R4i.js +1052 -0
  55. package/dist/cdn/chart-panel-messages-CmNrMdsr.js +1053 -0
  56. package/dist/cdn/chart-summary-BJW_tg_X.js +138 -0
  57. package/dist/cdn/chart-trend-CaN9mDEV.js +50 -0
  58. package/dist/cdn/chart-validate-HcOVFAfJ.js +188 -0
  59. package/dist/cdn/{column-resize-DsfNXMom.js → column-resize-DpmOLfRp.js} +3 -3
  60. package/dist/cdn/{date-format-BnnHlqGw.js → date-format-CtquV-p3.js} +583 -603
  61. package/dist/cdn/{date-format-BNii4zeD.js → date-format-D6KFzU_W.js} +347 -367
  62. package/dist/cdn/dismissable-DAHetSNk.js +44 -0
  63. package/dist/cdn/editor-contract-LXgQJAgd.js +22 -0
  64. package/dist/cdn/focus-trap-BBOQYBma.js +65 -0
  65. package/dist/cdn/{row-resize-BRcimkUT.js → row-resize-niQCp040.js} +44 -36
  66. package/dist/cdn/{src-D6XvA1Ij.js → src-BKhZ6eXd.js} +10227 -9787
  67. package/dist/cdn/{src-Bugf5XlI.js → src-V1uu8iE9.js} +6568 -6128
  68. package/dist/cdn/svgrid.js +26 -15
  69. package/dist/cdn/svgrid.svelte-external.js +26 -15
  70. package/dist/chart-axes.d.ts +53 -0
  71. package/dist/chart-axes.js +351 -0
  72. package/dist/chart-cartesian.d.ts +88 -0
  73. package/dist/chart-cartesian.js +1862 -0
  74. package/dist/chart-decimate.d.ts +51 -0
  75. package/dist/chart-decimate.js +199 -0
  76. package/dist/chart-export-pdf.d.ts +47 -0
  77. package/dist/chart-export-pdf.js +187 -0
  78. package/dist/chart-export.d.ts +2 -1
  79. package/dist/chart-export.js +18 -3
  80. package/dist/chart-financial.d.ts +91 -0
  81. package/dist/chart-financial.js +175 -0
  82. package/dist/chart-flow.d.ts +10 -0
  83. package/dist/chart-flow.js +298 -0
  84. package/dist/chart-format.d.ts +18 -0
  85. package/dist/chart-format.js +65 -0
  86. package/dist/chart-grid.d.ts +8 -0
  87. package/dist/chart-grid.js +190 -0
  88. package/dist/chart-hierarchy.d.ts +17 -0
  89. package/dist/chart-hierarchy.js +146 -0
  90. package/dist/chart-indicators.d.ts +115 -0
  91. package/dist/chart-indicators.js +389 -0
  92. package/dist/chart-messages.d.ts +95 -0
  93. package/dist/chart-messages.js +92 -0
  94. package/dist/chart-motion.d.ts +16 -0
  95. package/dist/chart-motion.js +141 -0
  96. package/dist/chart-panel-messages.d.ts +265 -0
  97. package/dist/chart-panel-messages.js +285 -0
  98. package/dist/chart-pivot.d.ts +87 -0
  99. package/dist/chart-pivot.js +156 -0
  100. package/dist/chart-polar.d.ts +25 -0
  101. package/dist/chart-polar.js +700 -0
  102. package/dist/chart-samples.d.ts +16 -0
  103. package/dist/chart-samples.js +153 -0
  104. package/dist/chart-scale.d.ts +113 -0
  105. package/dist/chart-scale.js +405 -0
  106. package/dist/chart-stats.d.ts +111 -0
  107. package/dist/chart-stats.js +419 -0
  108. package/dist/chart-stream.d.ts +45 -0
  109. package/dist/chart-stream.js +91 -0
  110. package/dist/chart-summary.d.ts +27 -0
  111. package/dist/chart-summary.js +205 -0
  112. package/dist/chart-sync.svelte.d.ts +32 -0
  113. package/dist/chart-sync.svelte.js +23 -0
  114. package/dist/chart-table.d.ts +35 -0
  115. package/dist/chart-table.js +165 -0
  116. package/dist/chart-trend.d.ts +19 -0
  117. package/dist/chart-trend.js +61 -0
  118. package/dist/chart-types.d.ts +1456 -0
  119. package/dist/chart-types.js +6 -0
  120. package/dist/chart-validate.d.ts +43 -0
  121. package/dist/chart-validate.js +272 -0
  122. package/dist/chart-zoom.d.ts +40 -0
  123. package/dist/chart-zoom.js +145 -0
  124. package/dist/chart.d.ts +186 -865
  125. package/dist/chart.js +460 -2204
  126. package/dist/clipboard.d.ts +1 -0
  127. package/dist/clipboard.js +137 -18
  128. package/dist/column-resize.d.ts +3 -0
  129. package/dist/column-resize.js +4 -1
  130. package/dist/columns.js +3 -0
  131. package/dist/command-context.d.ts +19 -0
  132. package/dist/command-context.js +116 -0
  133. package/dist/core.d.ts +7 -0
  134. package/dist/createPopoverSelect.svelte.d.ts +2 -2
  135. package/dist/editing.d.ts +2 -8
  136. package/dist/editing.js +262 -33
  137. package/dist/fill-patterns.d.ts +0 -5
  138. package/dist/fill-patterns.js +56 -2
  139. package/dist/grid-messages.d.ts +10 -3
  140. package/dist/grid-messages.js +5 -0
  141. package/dist/history.d.ts +83 -0
  142. package/dist/history.js +133 -0
  143. package/dist/index.d.ts +24 -6
  144. package/dist/index.js +20 -2
  145. package/dist/keyboard-handlers.js +88 -31
  146. package/dist/keyboard.d.ts +55 -0
  147. package/dist/keyboard.js +132 -0
  148. package/dist/menus.d.ts +3 -1
  149. package/dist/menus.js +7 -2
  150. package/dist/merges.d.ts +97 -0
  151. package/dist/merges.js +147 -0
  152. package/dist/row-resize.d.ts +3 -0
  153. package/dist/row-resize.js +14 -0
  154. package/dist/scroll-sync.d.ts +1 -0
  155. package/dist/scroll-sync.js +24 -0
  156. package/dist/selection.d.ts +16 -0
  157. package/dist/selection.js +108 -16
  158. package/dist/shortcut-registry.d.ts +145 -0
  159. package/dist/shortcut-registry.js +44 -0
  160. package/dist/svgrid-wrapper.types.d.ts +213 -22
  161. package/dist/virtualization/virtualizer.js +38 -17
  162. package/package.json +6 -1
  163. package/src/GridMenus.svelte +44 -2
  164. package/src/SvChartMenu.svelte +69 -0
  165. package/src/SvChartPanes.svelte +113 -0
  166. package/src/SvChartPanes.test.ts +66 -0
  167. package/src/SvGrid.controller.svelte.ts +629 -172
  168. package/src/SvGrid.css +105 -2
  169. package/src/SvGrid.svelte +386 -514
  170. package/src/SvGrid.types.ts +188 -8
  171. package/src/SvGridCellEditor.svelte +17 -0
  172. package/src/SvGridChart.svelte +2257 -329
  173. package/src/SvGridChart.test.ts +1419 -1
  174. package/src/SvGridChart.types.ts +336 -0
  175. package/src/SvGridChartBuilder.svelte +323 -0
  176. package/src/SvGridChartPanel.svelte +221 -275
  177. package/src/SvGridChartPickers.svelte +417 -0
  178. package/src/SvGridChartView.svelte +13 -14
  179. package/src/SvModal.svelte +7 -1
  180. package/src/SvModal.test.ts +9 -0
  181. package/src/ai.test.ts +57 -2
  182. package/src/ai.ts +166 -22
  183. package/src/aria.d.ts +11 -0
  184. package/src/build-api.coverage.test.ts +184 -0
  185. package/src/build-api.ts +107 -18
  186. package/src/chart-axes.test.ts +573 -0
  187. package/src/chart-axes.ts +342 -0
  188. package/src/chart-cartesian.ts +1863 -0
  189. package/src/chart-decimate.test.ts +249 -0
  190. package/src/chart-decimate.ts +186 -0
  191. package/src/chart-export-pdf.test.ts +91 -0
  192. package/src/chart-export-pdf.ts +207 -0
  193. package/src/chart-export.test.ts +14 -0
  194. package/src/chart-export.ts +13 -3
  195. package/src/chart-financial.ts +208 -0
  196. package/src/chart-flow.ts +286 -0
  197. package/src/chart-format.ts +67 -0
  198. package/src/chart-grid.ts +179 -0
  199. package/src/chart-hierarchy.ts +135 -0
  200. package/src/chart-indicators.test.ts +443 -0
  201. package/src/chart-indicators.ts +384 -0
  202. package/src/chart-messages.test.ts +21 -0
  203. package/src/chart-messages.ts +184 -0
  204. package/src/chart-motion.test.ts +71 -0
  205. package/src/chart-motion.ts +148 -0
  206. package/src/chart-panel-messages.test.ts +29 -0
  207. package/src/chart-panel-messages.ts +550 -0
  208. package/src/chart-pivot.test.ts +54 -0
  209. package/src/chart-pivot.ts +225 -0
  210. package/src/chart-polar.ts +674 -0
  211. package/src/chart-samples.ts +106 -0
  212. package/src/chart-scale.ts +394 -0
  213. package/src/chart-series-types.test.ts +714 -0
  214. package/src/chart-stats.ts +409 -0
  215. package/src/chart-stream.test.ts +75 -0
  216. package/src/chart-stream.ts +114 -0
  217. package/src/chart-summary.test.ts +90 -0
  218. package/src/chart-summary.ts +197 -0
  219. package/src/chart-sync.svelte.ts +41 -0
  220. package/src/chart-table.test.ts +76 -0
  221. package/src/chart-table.ts +178 -0
  222. package/src/chart-trend.ts +47 -0
  223. package/src/chart-types.ts +1309 -0
  224. package/src/chart-validate.test.ts +100 -0
  225. package/src/chart-validate.ts +247 -0
  226. package/src/chart-zoom.test.ts +137 -0
  227. package/src/chart-zoom.ts +124 -0
  228. package/src/chart.coverage.test.ts +81 -0
  229. package/src/chart.test.ts +56 -3
  230. package/src/chart.ts +557 -2784
  231. package/src/clipboard.test.ts +151 -0
  232. package/src/clipboard.ts +145 -16
  233. package/src/column-resize.ts +7 -1
  234. package/src/columns.ts +2 -0
  235. package/src/command-context.test.ts +200 -0
  236. package/src/command-context.ts +137 -0
  237. package/src/core.ts +7 -0
  238. package/src/editing.test.ts +281 -3
  239. package/src/editing.ts +256 -38
  240. package/src/fill-patterns.test.ts +35 -0
  241. package/src/fill-patterns.ts +56 -2
  242. package/src/grid-messages.ts +16 -3
  243. package/src/history.test.ts +196 -0
  244. package/src/history.ts +162 -0
  245. package/src/icon-seam.test.ts +3 -2
  246. package/src/index.ts +150 -2
  247. package/src/keyboard-handlers.coverage.test.ts +126 -6
  248. package/src/keyboard-handlers.ts +91 -30
  249. package/src/keyboard-shortcuts.seam.test.ts +200 -0
  250. package/src/keyboard.test.ts +124 -1
  251. package/src/keyboard.ts +142 -0
  252. package/src/menus.test.ts +26 -0
  253. package/src/menus.ts +10 -3
  254. package/src/merges.test.ts +112 -0
  255. package/src/merges.ts +168 -0
  256. package/src/pivot.grid.test.ts +40 -5
  257. package/src/row-resize.test.ts +44 -0
  258. package/src/row-resize.ts +17 -0
  259. package/src/scroll-sync.test.ts +42 -1
  260. package/src/scroll-sync.ts +25 -0
  261. package/src/selection.multi-range.test.ts +34 -0
  262. package/src/selection.test.ts +30 -2
  263. package/src/selection.ts +111 -19
  264. package/src/shortcut-registry.test.ts +97 -0
  265. package/src/shortcut-registry.ts +181 -0
  266. package/src/svgrid-wrapper.types.ts +184 -13
  267. package/src/svgrid.behavior.test.ts +135 -0
  268. package/src/svgrid.charting.test.ts +513 -3
  269. package/src/svgrid.context-menu.test.ts +31 -0
  270. package/src/svgrid.new-features.wrapper.test.ts +10 -3
  271. package/src/virtualization/virtualizer.ts +39 -17
  272. package/dist/cdn/GridMenus-CHOMnW-c.js +0 -602
  273. package/dist/cdn/GridMenus-DhdPF700.js +0 -603
  274. package/dist/cdn/SvDateTimePicker-CCbDZNZB.js +0 -816
  275. package/dist/cdn/SvGridChart-1PMSp2LZ.js +0 -1481
  276. package/dist/cdn/SvGridChart-D02avhyr.js +0 -1480
  277. package/dist/cdn/SvGridChartPanel-DJnViOv4.js +0 -834
  278. package/dist/cdn/SvGridChartPanel-vPTNerFZ.js +0 -810
  279. package/dist/cdn/SvGridChartView-C--HhdUo.js +0 -56
  280. package/dist/cdn/SvGridChartView-KyyFG-wY.js +0 -55
  281. package/dist/cdn/chart-DLg3_zTQ.js +0 -1652
@@ -0,0 +1,3572 @@
1
+ import { B as e, D as t, E as n, F as r, G as i, H as a, I as o, J as s, K as c, L as l, N as u, R as d, U as f, V as p, X as m, Y as h, _ as g, a as _, at as v, b as ee, d as y, et as b, ft as te, i as ne, it as x, j as re, k as S, lt as ie, nt as C, o as ae, pt as w, q as oe, rt as se, st as T, t as E, tt as D, u as ce, ut as le, v as O, w as ue, x as de } from "./disclose-version-Dr7rEVv-.js";
2
+ import { a as fe } from "./editor-contract-LXgQJAgd.js";
3
+ import { i as pe } from "./chart-trend-CaN9mDEV.js";
4
+ import { C as me, D as he, E as ge, H as _e, O as ve, T as ye, X as be, c as xe, et as Se, g as Ce, gt as we, ht as Te, i as Ee, mt as De, o as Oe, r as ke, w as Ae } from "./chart-Dz7SqMXH.js";
5
+ import { a as je, t as Me } from "./chart-export-BXqueeWJ.js";
6
+ //#region src/chart-zoom.ts
7
+ function Ne(e, t, n) {
8
+ if (n <= 0) return null;
9
+ let r = Math.max(0, Math.min(n - 1, Math.round(e))), i = Math.max(0, Math.min(n - 1, Math.round(t)));
10
+ return i < r && ([r, i] = [i, r]), r === 0 && i === n - 1 ? null : {
11
+ i0: r,
12
+ i1: i
13
+ };
14
+ }
15
+ function Pe(e, t, n, r) {
16
+ if (t <= 2) return null;
17
+ let i = e ? e.i0 : 0, a = e ? e.i1 : t - 1, o = a - i + 1, s = Math.max(2, Math.min(t, Math.round(o * r)));
18
+ if (s === o) return e;
19
+ let c = o > 1 ? (Math.max(i, Math.min(a, n)) - i) / (o - 1) : .5, l = Math.round(n - c * (s - 1));
20
+ return l = Math.max(0, Math.min(t - s, l)), Ne(l, l + s - 1, t);
21
+ }
22
+ function Fe(e, t, n) {
23
+ if (!e || !n) return e;
24
+ let r = e.i1 - e.i0, i = e.i0 + Math.round(n);
25
+ return i = Math.max(0, Math.min(t - 1 - r, i)), Ne(i, i + r, t);
26
+ }
27
+ function Ie(e, t, n, r) {
28
+ return !Number.isFinite(r) || r <= 0 ? e : Pe(e, t, n, 1 / r);
29
+ }
30
+ function Le(e, t, n) {
31
+ let r = e.length;
32
+ if (!r) return null;
33
+ let i = e.map((e) => Date.parse(e)), a = [...i].reverse().find(Number.isFinite);
34
+ if (a == null) return null;
35
+ let o = n ?? a, s = 864e5, c, l = o;
36
+ if (typeof t == "object") {
37
+ if (t.from) c = Date.parse(t.from);
38
+ else if (t.days) c = o - t.days * s;
39
+ else return null;
40
+ t.to && (l = Date.parse(t.to));
41
+ } else switch (t) {
42
+ case "1W":
43
+ c = o - 7 * s;
44
+ break;
45
+ case "1M":
46
+ c = k(o, -1);
47
+ break;
48
+ case "3M":
49
+ c = k(o, -3);
50
+ break;
51
+ case "6M":
52
+ c = k(o, -6);
53
+ break;
54
+ case "1Y":
55
+ c = k(o, -12);
56
+ break;
57
+ case "YTD": {
58
+ let e = new Date(o);
59
+ c = Date.UTC(e.getUTCFullYear(), 0, 1);
60
+ break;
61
+ }
62
+ default: return null;
63
+ }
64
+ if (!Number.isFinite(c) || !Number.isFinite(l)) return null;
65
+ let u = -1, d = -1;
66
+ for (let e = 0; e < r; e += 1) {
67
+ let t = i[e];
68
+ Number.isFinite(t) && (t >= c && u < 0 && (u = e), t <= l && (d = e));
69
+ }
70
+ return u < 0 || d < 0 || d < u ? null : Ne(u, d, r);
71
+ }
72
+ function k(e, t) {
73
+ let n = new Date(e);
74
+ return Date.UTC(n.getUTCFullYear(), n.getUTCMonth() + t, n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes());
75
+ }
76
+ function Re(e, t) {
77
+ let n = -1, r = Infinity;
78
+ for (let i = 0; i < e.length; i += 1) {
79
+ let a = Date.parse(e[i]);
80
+ if (!Number.isFinite(a)) continue;
81
+ let o = Math.abs(a - t);
82
+ o < r && (r = o, n = i);
83
+ }
84
+ return n;
85
+ }
86
+ //#endregion
87
+ //#region src/chart-sync.svelte.ts
88
+ var A = /* @__PURE__ */ new Map();
89
+ function ze(e) {
90
+ let t = A.get(e);
91
+ if (t) return t;
92
+ let n = se({
93
+ hover: null,
94
+ zoom: null
95
+ });
96
+ return A.set(e, n), n;
97
+ }
98
+ function Be(e, t) {
99
+ ze(e).hover = t;
100
+ }
101
+ function Ve(e, t, n, r, i = null) {
102
+ ze(e).zoom = {
103
+ window: t,
104
+ count: n,
105
+ from: r,
106
+ labels: i
107
+ };
108
+ }
109
+ //#endregion
110
+ //#region src/chart-motion.ts
111
+ var j = (e, t, n) => e + (t - e) * n, M = (e) => Math.round(e * 100) / 100;
112
+ function He(e, t, n) {
113
+ return n >= 1 ? t : n <= 0 && e.type === t.type ? e : e.type === t.type ? {
114
+ ...t,
115
+ bars: We(e.bars, t.bars, n, t.plot.y + t.plot.h),
116
+ lines: Ge(e.lines, t.lines, n),
117
+ candles: qe(e.candles, t.candles, n),
118
+ slices: Je(e.slices, t.slices, n),
119
+ arcs: Xe(e.arcs, t.arcs, n),
120
+ yTicks: t.yTicks.map((t) => {
121
+ let r = e.yTicks.find((e) => e.value === t.value);
122
+ return r ? {
123
+ ...t,
124
+ y: M(j(r.y, t.y, n))
125
+ } : t;
126
+ })
127
+ } : t;
128
+ }
129
+ var Ue = (e) => `${e.series}\u0000${e.label}`;
130
+ function We(e, t, n, r) {
131
+ if (!e.length && !t.length) return t;
132
+ let i = new Map(e.map((e) => [Ue(e), e])), a = /* @__PURE__ */ new Set(), o = t.map((e) => {
133
+ let t = Ue(e);
134
+ a.add(t);
135
+ let o = i.get(t);
136
+ if (!o) {
137
+ let t = j(r, e.y, n);
138
+ return {
139
+ ...e,
140
+ y: M(t),
141
+ h: M(Math.max(0, j(0, e.h, n)))
142
+ };
143
+ }
144
+ return {
145
+ ...e,
146
+ x: M(j(o.x, e.x, n)),
147
+ y: M(j(o.y, e.y, n)),
148
+ w: M(j(o.w, e.w, n)),
149
+ h: M(j(o.h, e.h, n))
150
+ };
151
+ });
152
+ for (let t of e) a.has(Ue(t)) || o.push({
153
+ ...t,
154
+ y: M(j(t.y, r, n)),
155
+ h: M(Math.max(0, j(t.h, 0, n)))
156
+ });
157
+ return o;
158
+ }
159
+ function Ge(e, t, n) {
160
+ if (!e.length) return t;
161
+ let r = new Map(e.map((e) => [e.label, e]));
162
+ return t.map((e) => {
163
+ let t = r.get(e.label);
164
+ if (!t || t.points.length !== e.points.length) return e;
165
+ let i = e.points.map((e, r) => {
166
+ let i = t.points[r];
167
+ return !e.defined || !i.defined ? e : {
168
+ ...e,
169
+ x: M(j(i.x, e.x, n)),
170
+ y: M(j(i.y, e.y, n))
171
+ };
172
+ });
173
+ return {
174
+ ...e,
175
+ points: i,
176
+ path: ge(i, !!e.smooth, { step: e.step })
177
+ };
178
+ });
179
+ }
180
+ var Ke = (e) => `${e.series}\u0000${e.label}`;
181
+ function qe(e, t, n) {
182
+ if (!e.length) return t;
183
+ let r = new Map(e.map((e) => [Ke(e), e]));
184
+ return t.map((e) => {
185
+ let t = r.get(Ke(e));
186
+ if (!t) return e;
187
+ let i = j(t.yOpen, e.yOpen, n), a = j(t.yClose, e.yClose, n);
188
+ return {
189
+ ...e,
190
+ x: M(j(t.x, e.x, n)),
191
+ xCenter: M(j(t.xCenter, e.xCenter, n)),
192
+ yOpen: M(i),
193
+ yClose: M(a),
194
+ yHigh: M(j(t.yHigh, e.yHigh, n)),
195
+ yLow: M(j(t.yLow, e.yLow, n)),
196
+ bodyY: M(Math.min(i, a)),
197
+ bodyH: M(Math.max(1, Math.abs(a - i)))
198
+ };
199
+ });
200
+ }
201
+ function Je(e, t, n) {
202
+ if (!e.length || t.some((e) => !e.arc)) return t;
203
+ let r = new Map(e.map((e) => [e.label, e]));
204
+ return t.map((e) => {
205
+ let t = r.get(e.label);
206
+ if (!t?.arc || !e.arc) return e;
207
+ let i = j(t.arc.a0, e.arc.a0, n), a = j(t.arc.a1, e.arc.a1, n), o = (i + a) / 2, s = (e.arc.r + e.arc.ir) / 2 || e.arc.r * .6;
208
+ return {
209
+ ...e,
210
+ path: ye(e.arc.cx, e.arc.cy, e.arc.ir, e.arc.r, i, a),
211
+ cx: M(e.arc.cx + s * Math.cos(o)),
212
+ cy: M(e.arc.cy + s * Math.sin(o)),
213
+ arc: {
214
+ ...e.arc,
215
+ a0: i,
216
+ a1: a
217
+ }
218
+ };
219
+ });
220
+ }
221
+ var Ye = (e) => e.nodePath ? e.nodePath.join("/") : `${e.series}\u0000${e.label}`;
222
+ function Xe(e, t, n) {
223
+ if (!e.length) return t;
224
+ let r = new Map(e.map((e) => [Ye(e), e]));
225
+ return t.map((e) => {
226
+ let t = r.get(Ye(e));
227
+ if (!t) return e;
228
+ let i = j(t.a0, e.a0, n), a = j(t.a1, e.a1, n), o = j(t.r0, e.r0, n), s = j(t.r1, e.r1, n), c = (i + a) / 2, l = (o + s) / 2;
229
+ return {
230
+ ...e,
231
+ a0: i,
232
+ a1: a,
233
+ r0: o,
234
+ r1: s,
235
+ path: ye(e.cx, e.cy, o, s, i, a),
236
+ lx: M(e.cx + l * Math.cos(c)),
237
+ ly: M(e.cy + l * Math.sin(c))
238
+ };
239
+ });
240
+ }
241
+ //#endregion
242
+ //#region src/chart-messages.ts
243
+ var Ze = {
244
+ chartLabel: "{type} chart",
245
+ dataTable: "{type} chart data",
246
+ dataTableCapped: ", first {shown} of {total} rows",
247
+ noData: "No data",
248
+ noValue: "no value",
249
+ seriesAtCategory: "{series}: {value} at {category}",
250
+ densePoints: "{count} points, {from} to {to}. Arrow keys step through values.",
251
+ drillIn: ", drill in",
252
+ sankeyNode: "{label}: in {in}, out {out}",
253
+ total: "Total",
254
+ rSquared: "R² {value}",
255
+ describeChart: "Describe chart",
256
+ describeCopied: "Description copied",
257
+ drillPath: "Drilldown path",
258
+ drillRoot: "All",
259
+ dateRange: "Date range",
260
+ showLast: "Show the last {preset}",
261
+ pan: "Pan",
262
+ panTitle: "Drag the plot to pan the zoomed window",
263
+ resetZoom: "Reset zoom",
264
+ resetZoomTitle: "Reset zoom (or double-click the plot)",
265
+ annotate: "Annotate",
266
+ annotateOnTitle: "Click the plot to pin a note, or a marker to remove it",
267
+ annotateOffTitle: "Pin notes on the chart",
268
+ drawingTools: "Drawing tools",
269
+ draw: "Draw: {tool}",
270
+ toolTrend: "Trend",
271
+ toolRay: "Ray",
272
+ toolFib: "Fib",
273
+ toolRect: "Rect",
274
+ toolArrow: "Arrow",
275
+ toolText: "Text",
276
+ drawing: "{tool} drawing",
277
+ deleteDrawing: "Delete",
278
+ deleteDrawingTitle: "Remove the selected drawing (Delete)",
279
+ clearDrawings: "Clear",
280
+ clearDrawingsTitle: "Remove every drawing",
281
+ noteText: "Note text",
282
+ removeNote: "Remove note: {label}",
283
+ png: "PNG",
284
+ downloadPng: "Download PNG",
285
+ svg: "SVG",
286
+ downloadSvg: "Download SVG",
287
+ pdf: "PDF",
288
+ downloadPdf: "Download PDF",
289
+ downloadCsv: "Download CSV",
290
+ print: "Print",
291
+ printTitle: "Print the chart",
292
+ copy: "Copy",
293
+ copied: "✓ Copied",
294
+ copyTitle: "Copy chart as image",
295
+ copyAsImage: "Copy as image",
296
+ range: "Range",
297
+ series: "Series",
298
+ showSeries: "Show",
299
+ hideSeries: "Hide",
300
+ isolateHint: "double-click to isolate",
301
+ showMore: "+{n} more",
302
+ showLess: "Show less",
303
+ rangeBrush: "Range brush",
304
+ brushRange: "{from} to {to}"
305
+ };
306
+ function Qe(e) {
307
+ return fe(Ze, e);
308
+ }
309
+ function N(e, t) {
310
+ return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e);
311
+ }
312
+ //#endregion
313
+ //#region src/SvGridChart.svelte
314
+ var $e = l("<span class=\"sv-grid-chart-crumb is-current svelte-hyytey\" aria-current=\"page\"> </span>"), et = l("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-hyytey\"> </button>"), tt = l("<span class=\"sv-grid-chart-crumb-sep svelte-hyytey\" aria-hidden=\"true\">/</span> <!>", 1), nt = l("<nav class=\"sv-grid-chart-crumbs svelte-hyytey\"><button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-hyytey\"> </button> <!></nav>"), rt = l("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-preset svelte-hyytey\"> </button>"), it = l("<span class=\"sv-grid-chart-presets svelte-hyytey\" role=\"group\"></span>"), at = l("<button type=\"button\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 9l-3 3 3 3\"></path><path d=\"M9 5l3-3 3 3\"></path><path d=\"M15 19l-3 3-3-3\"></path><path d=\"M19 9l3 3-3 3\"></path><path d=\"M2 12h20\"></path><path d=\"M12 2v20\"></path></svg> </button>"), ot = l("<button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"></path><path d=\"M21 17a9 9 0 0 0-15-6.7L3 13\"></path></svg> </button>"), st = l("<button type=\"button\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2v6\"></path><circle cx=\"12\" cy=\"11\" r=\"3\"></circle><path d=\"M12 14v8\"></path></svg> </button>"), ct = l("<button type=\"button\"> </button>"), lt = l("<button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\"> </button>", 1), ut = l("<span class=\"sv-grid-chart-drawtools svelte-hyytey\" role=\"group\"><!> <!></span>"), dt = l("<div class=\"sv-grid-chart-toolbar svelte-hyytey\" role=\"toolbar\"><!> <!> <!> <!> <!> <!> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\"> </button></div>"), ft = l("<div class=\"sv-grid-chart-toolbar is-crumbs-only svelte-hyytey\" role=\"toolbar\"><!></div>"), pt = d("<clipPath><rect></rect></clipPath>"), mt = d("<linearGradient x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\"></stop><stop offset=\"1\"></stop></linearGradient>"), ht = d("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(45)\"><rect width=\"6\" height=\"6\"></rect><rect width=\"3\" height=\"6\" fill=\"rgba(255,255,255,0.35)\"></rect></pattern>"), gt = d("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><path d=\"M0 0L6 6 M6 0L0 6\" stroke=\"rgba(255,255,255,0.45)\" stroke-width=\"1\"></path></pattern>"), _t = d("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><circle cx=\"3\" cy=\"3\" r=\"1.2\" fill=\"rgba(255,255,255,0.55)\"></circle></pattern>"), vt = d("<pattern width=\"8\" height=\"8\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(-45)\"><rect width=\"8\" height=\"8\"></rect><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"8\" stroke=\"rgba(0,0,0,0.18)\" stroke-width=\"2\"></line></pattern>"), yt = d("<defs><!><!><!></defs>"), bt = d("<text class=\"sv-grid-chart-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), xt = d("<text class=\"sv-grid-chart-subtitle svelte-hyytey\" text-anchor=\"middle\"> </text>"), St = d("<text class=\"sv-grid-chart-caption svelte-hyytey\" text-anchor=\"start\"> </text>"), Ct = d("<line class=\"sv-grid-chart-gridline svelte-hyytey\"></line>"), wt = d("<!><text class=\"sv-grid-chart-axis is-x svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), Tt = d("<line class=\"sv-grid-chart-gridline svelte-hyytey\"></line>"), Et = d("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>"), Dt = d("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), Ot = d("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), kt = d("<!><!><!><!><!>", 1), At = d("<line></line>"), jt = d("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>"), Mt = d("<!><!>", 1), Nt = d("<line class=\"sv-grid-chart-gridline svelte-hyytey\"></line>"), Pt = d("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text>"), Ft = d("<text class=\"sv-grid-chart-axis is-x svelte-hyytey\"> </text>"), It = d("<text class=\"sv-grid-chart-axis is-x svelte-hyytey\" text-anchor=\"middle\"> </text>"), Lt = d("<line class=\"sv-grid-chart-gridline svelte-hyytey\" opacity=\"0.5\"></line>"), Rt = d("<line class=\"sv-grid-chart-gridline svelte-hyytey\"></line><!><text class=\"sv-grid-chart-axis sv-grid-chart-group-label svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), zt = d("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), Bt = d("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), Vt = d("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), Ht = d("<!><!><!><!><!><!><!><!>", 1), Ut = d("<text class=\"sv-grid-chart-reflabel svelte-hyytey\" text-anchor=\"end\"> </text>"), Wt = d("<text class=\"sv-grid-chart-reflabel svelte-hyytey\" text-anchor=\"middle\"> </text>"), Gt = d("<rect class=\"sv-grid-chart-refband svelte-hyytey\"></rect><!>", 1), Kt = d("<path class=\"sv-grid-chart-band svelte-hyytey\" fill-opacity=\"0.12\" stroke=\"none\"></path>"), qt = d("<path class=\"sv-grid-chart-area svelte-hyytey\" stroke=\"none\"></path>"), Jt = d("<circle class=\"sv-grid-chart-dot is-active svelte-hyytey\" r=\"4\"></circle>"), Yt = d("<circle></circle>"), Xt = d("<path fill=\"none\" stroke-width=\"1.5\"></path>"), Zt = d("<path></path>"), Qt = d("<g class=\"svelte-hyytey\"><!><!><path class=\"sv-grid-chart-linepath svelte-hyytey\" fill=\"none\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path><!></g>"), $t = d("<rect rx=\"1\"></rect>"), en = d("<circle class=\"sv-grid-chart-dot svelte-hyytey\" fill-opacity=\"0.55\"></circle>"), tn = d("<g class=\"sv-grid-chart-stem svelte-hyytey\"><line class=\"svelte-hyytey\"></line><!><circle class=\"sv-grid-chart-dot svelte-hyytey\"></circle></g>"), nn = d("<line class=\"sv-grid-chart-ohlc svelte-hyytey\"></line><line class=\"sv-grid-chart-ohlc svelte-hyytey\"></line><line class=\"sv-grid-chart-ohlc svelte-hyytey\"></line>", 1), rn = d("<line class=\"sv-grid-chart-wick svelte-hyytey\"></line><rect class=\"sv-grid-chart-candle svelte-hyytey\"></rect>", 1), an = d("<circle class=\"sv-grid-chart-outlier svelte-hyytey\" r=\"2\" fill=\"none\"></circle>"), on = d("<line class=\"sv-grid-chart-whisker svelte-hyytey\"></line><line class=\"sv-grid-chart-whisker svelte-hyytey\"></line><line class=\"sv-grid-chart-whisker svelte-hyytey\"></line><rect class=\"sv-grid-chart-box svelte-hyytey\" fill-opacity=\"0.25\"></rect><line class=\"sv-grid-chart-median svelte-hyytey\"></line><!>", 1), sn = d("<line class=\"sv-grid-chart-errorbar svelte-hyytey\"></line><line class=\"sv-grid-chart-errorbar svelte-hyytey\"></line><line class=\"sv-grid-chart-errorbar svelte-hyytey\"></line>", 1), cn = d("<circle fill-opacity=\"0.7\"></circle>"), ln = d("<g class=\"sv-grid-chart-refpill svelte-hyytey\"><rect height=\"16\" rx=\"3\" class=\"svelte-hyytey\"></rect><text text-anchor=\"middle\" fill=\"#fff\" class=\"svelte-hyytey\"> </text></g>"), un = d("<text class=\"sv-grid-chart-reflabel svelte-hyytey\" text-anchor=\"end\"> </text>"), dn = d("<line class=\"sv-grid-chart-refline svelte-hyytey\"></line><!>", 1), fn = d("<line class=\"sv-grid-chart-refline svelte-hyytey\"></line><text class=\"sv-grid-chart-reflabel svelte-hyytey\" text-anchor=\"start\"> </text>", 1), pn = d("<path class=\"sv-grid-chart-overlay-band svelte-hyytey\" fill-opacity=\"0.1\" stroke-opacity=\"0.35\" stroke-width=\"1\"></path>"), mn = d("<!><path class=\"sv-grid-chart-overlay svelte-hyytey\" fill=\"none\" stroke-width=\"2\" stroke-dasharray=\"6 4\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path>", 1), hn = d("<line class=\"sv-grid-chart-datalabel-leader svelte-hyytey\"></line>"), gn = d("<!><text> </text>", 1), _n = d("<text class=\"sv-grid-chart-serieslabel svelte-hyytey\" text-anchor=\"start\"> </text>"), vn = d("<line stroke-width=\"1.5\"></line><rect height=\"13\" rx=\"2\"></rect><text class=\"sv-grid-chart-annotation-flagtext svelte-hyytey\" text-anchor=\"middle\" fill=\"#fff\"> </text>", 1), yn = d("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.2\"></path><text class=\"sv-grid-chart-annotation-flagtext svelte-hyytey\" text-anchor=\"middle\" fill=\"#fff\"> </text><text class=\"sv-grid-chart-annotation-label svelte-hyytey\"> </text>", 1), bn = d("<rect width=\"9\" height=\"9\" stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></rect><text class=\"sv-grid-chart-annotation-label svelte-hyytey\"> </text>", 1), xn = d("<circle stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle><text class=\"sv-grid-chart-annotation-label svelte-hyytey\"> </text>", 1), Sn = d("<g><!></g>"), Cn = d("<path class=\"svelte-hyytey\"></path>"), wn = d("<line class=\"sv-grid-chart-drawing-hit svelte-hyytey\"></line><line stroke-width=\"1.5\" class=\"svelte-hyytey\"></line><!>", 1), Tn = d("<rect fill-opacity=\"0.08\" stroke-width=\"1.2\" class=\"svelte-hyytey\"></rect>"), En = d("<line class=\"sv-grid-chart-drawing-hit svelte-hyytey\"></line><line stroke-width=\"1.2\" stroke-dasharray=\"4 3\" class=\"svelte-hyytey\"></line><text class=\"sv-grid-chart-drawing-label svelte-hyytey\" text-anchor=\"end\"> </text>", 1), Dn = d("<line stroke-width=\"1\" class=\"svelte-hyytey\"></line><text class=\"sv-grid-chart-drawing-label svelte-hyytey\"> </text>", 1), On = d("<!><rect class=\"sv-grid-chart-drawing-hit svelte-hyytey\"></rect>", 1), kn = d("<text class=\"sv-grid-chart-drawing-text svelte-hyytey\"> </text>"), An = d("<circle class=\"sv-grid-chart-drawing-handle svelte-hyytey\" r=\"5\" fill=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle>"), jn = d("<g><!><!></g>"), Mn = d("<rect fill=\"var(--sg-accent, #2563eb)\" fill-opacity=\"0.08\" stroke=\"var(--sg-accent, #2563eb)\" stroke-dasharray=\"4 3\"></rect>"), Nn = d("<line stroke=\"var(--sg-accent, #2563eb)\" stroke-width=\"1.5\" stroke-dasharray=\"4 3\"></line>"), Pn = d("<circle r=\"3.5\" fill=\"var(--sg-accent, #2563eb)\"></circle><!>", 1), Fn = d("<g class=\"sv-grid-chart-drawings\"><!><!></g>"), In = d("<line class=\"sv-grid-chart-crosshair svelte-hyytey\"></line>"), Ln = d("<g class=\"sv-grid-chart-crosshair-label svelte-hyytey\" pointer-events=\"none\"><rect height=\"15\" rx=\"3\" class=\"svelte-hyytey\"></rect><text text-anchor=\"middle\" class=\"svelte-hyytey\"> </text></g>"), Rn = d("<g class=\"sv-grid-chart-crosshair-label svelte-hyytey\" pointer-events=\"none\"><rect height=\"15\" rx=\"3\" class=\"svelte-hyytey\"></rect><text text-anchor=\"middle\" class=\"svelte-hyytey\"> </text></g><!>", 1), zn = d("<line class=\"sv-grid-chart-crosshair svelte-hyytey\"></line><!>", 1), Bn = d("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>"), Vn = d("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"middle\"> </text>"), Hn = d("<text class=\"sv-grid-chart-heatlabel svelte-hyytey\" text-anchor=\"middle\"> </text>"), Un = d("<rect class=\"sv-grid-chart-heatcell svelte-hyytey\"></rect><!>", 1), Wn = d("<stop></stop>"), Gn = d("<defs><linearGradient x1=\"0\" y1=\"1\" x2=\"0\" y2=\"0\"></linearGradient></defs><rect class=\"sv-grid-chart-heatlegend svelte-hyytey\" width=\"10\"></rect><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text>", 1), Kn = d("<!><!><!><!>", 1), qn = d("<text class=\"sv-grid-chart-funnel-label svelte-hyytey\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-funnel-value svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), Jn = d("<path class=\"sv-grid-chart-funnel-seg svelte-hyytey\"></path><!>", 1), Yn = d("<circle class=\"sv-grid-chart-radar-ring svelte-hyytey\"></circle>"), Xn = d("<line class=\"sv-grid-chart-radar-spoke svelte-hyytey\"></line><text class=\"sv-grid-chart-axis svelte-hyytey\"> </text>", 1), Zn = d("<circle class=\"sv-grid-chart-radar-dot svelte-hyytey\" r=\"3\" role=\"img\"></circle>"), Qn = d("<path class=\"sv-grid-chart-radar-poly svelte-hyytey\" fill-opacity=\"0.18\" stroke-width=\"2\"></path><!>", 1), $n = d("<!><!><!>", 1), er = d("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text>"), tr = d("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>"), nr = d("<rect rx=\"2\" role=\"img\"></rect>"), rr = d("<rect class=\"sv-grid-chart-calendar-legend svelte-hyytey\" width=\"10\" height=\"10\" rx=\"2\"></rect><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text>", 1), ir = d("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\">Less</text><!><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\">More</text>", 1), ar = d("<!><!><!><!>", 1), or = d("<line></line>"), sr = d("<path fill=\"none\" stroke-width=\"4\" stroke-linecap=\"butt\" opacity=\"0.7\"></path>"), cr = d("<line stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\" stroke-linecap=\"round\"></line>"), lr = d("<!><path fill=\"none\" stroke=\"var(--sg-border, #e2e8f0)\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path class=\"sv-grid-chart-gauge-needle svelte-hyytey\"></path><circle class=\"sv-grid-chart-gauge-hub svelte-hyytey\"></circle><circle class=\"sv-grid-chart-gauge-hub-dot svelte-hyytey\" r=\"2.5\"></circle><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-gauge-value svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), ur = d("<text class=\"sv-grid-chart-treemap-label svelte-hyytey\"> </text>"), dr = d("<text class=\"sv-grid-chart-treemap-value svelte-hyytey\" opacity=\"0.85\"> </text>"), fr = d("<rect class=\"sv-grid-chart-treemap-cell svelte-hyytey\"></rect><!><!>", 1), pr = d("<path class=\"sv-grid-chart-sankey-link svelte-hyytey\" fill=\"none\" stroke-opacity=\"0.35\" role=\"img\"></path>"), mr = d("<rect class=\"sv-grid-chart-sankey-node svelte-hyytey\" role=\"img\"></rect><text class=\"sv-grid-chart-sankey-label svelte-hyytey\"> </text>", 1), hr = d("<!><!>", 1), gr = d("<circle class=\"sv-grid-chart-gridline svelte-hyytey\" fill=\"none\"></circle>"), _r = d("<text class=\"sv-grid-chart-axis svelte-hyytey\"> </text>"), vr = d("<path class=\"sv-grid-chart-arc-track svelte-hyytey\"></path>"), yr = d("<path class=\"sv-grid-chart-ribbon svelte-hyytey\" fill-opacity=\"0.45\" stroke-opacity=\"0.6\"></path>"), br = d("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path>"), xr = d("<text class=\"sv-grid-chart-axis svelte-hyytey\"> </text>"), Sr = d("<text class=\"sv-grid-chart-datalabel on-bar svelte-hyytey\" text-anchor=\"middle\" dominant-baseline=\"middle\" pointer-events=\"none\"> </text>"), Cr = d("<!><!><!><!><!><!>", 1), wr = d("<rect></rect>"), Tr = d("<line class=\"sv-grid-chart-bullet-target\" stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\"></line>"), Er = d("<g class=\"sv-grid-chart-bullet\"><!><rect class=\"sv-grid-chart-bar svelte-hyytey\"></rect><!></g>"), Dr = d("<polyline class=\"sv-grid-chart-callout svelte-hyytey\" fill=\"none\" stroke-width=\"1\"></polyline><text class=\"sv-grid-chart-callout-label svelte-hyytey\"> </text>", 1), Or = d("<text class=\"sv-grid-chart-datalabel on-bar svelte-hyytey\" text-anchor=\"middle\" dominant-baseline=\"middle\"> </text>"), kr = d("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path><!>", 1), Ar = d("<text class=\"sv-grid-chart-donut-total svelte-hyytey\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-donut-label svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), jr = d("<rect class=\"sv-grid-chart-cat-hit svelte-hyytey\" data-dense=\"true\"></rect>"), Mr = d("<rect class=\"sv-grid-chart-cat-hit svelte-hyytey\"></rect>"), Nr = d("<rect class=\"sv-grid-chart-zoom-rect svelte-hyytey\"></rect>"), Pr = d("<path fill-opacity=\"0.10\" stroke=\"none\"></path>"), Fr = d("<!><path fill=\"none\" stroke-width=\"1.2\" opacity=\"0.75\"></path>", 1), Ir = d("<rect opacity=\"0.55\"></rect>"), Lr = l("<div class=\"sv-grid-chart-brush-host svelte-hyytey\"><svg class=\"sv-grid-chart-brush svelte-hyytey\" width=\"100%\" role=\"slider\" tabindex=\"0\" aria-orientation=\"horizontal\"><!><!><rect class=\"sv-grid-chart-brush-mask svelte-hyytey\"></rect><rect class=\"sv-grid-chart-brush-mask svelte-hyytey\"></rect><rect class=\"sv-grid-chart-brush-window svelte-hyytey\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-hyytey\" width=\"8\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-hyytey\" width=\"8\"></rect></svg></div>"), Rr = l("<div class=\"sv-grid-chart-empty svelte-hyytey\"> </div>"), zr = l("<input class=\"sv-grid-chart-textdraft svelte-hyytey\" type=\"text\"/>"), Br = l("<span class=\"sv-grid-chart-tooltip-dot svelte-hyytey\"></span>"), Vr = l("<span class=\"sv-grid-chart-tooltip-row-label svelte-hyytey\"> </span>"), Hr = l("<span class=\"sv-grid-chart-tooltip-row svelte-hyytey\"><!> <!> <span class=\"sv-grid-chart-tooltip-row-value svelte-hyytey\"> </span></span>"), Ur = l("<span class=\"sv-grid-chart-tooltip-title svelte-hyytey\"> </span> <!>", 1), Wr = l("<div role=\"tooltip\"><!></div>"), Gr = l("<span class=\"sv-grid-chart-swatch svelte-hyytey\"></span> ", 1), Kr = l("<button type=\"button\"><!></button>"), qr = l("<button type=\"button\" class=\"sv-grid-chart-legend-more svelte-hyytey\"> </button>"), Jr = l("<div><!> <!></div>"), Yr = l("<div class=\"sv-grid-chart-live sv-grid-chart-sr-only svelte-hyytey\" aria-live=\"polite\" aria-atomic=\"true\"> </div>"), Xr = l("<th> </th>"), Zr = l("<td> </td>"), Qr = l("<tr></tr>"), $r = l("<div><!> <svg width=\"100%\"><!><!><!><!><!><!><g><!><!><!><!><!><!><!><!></g><!><!><g></g><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></svg> <!> <!> <!> <!> <!> <!> <!> <div class=\"sv-grid-chart-sr-only svelte-hyytey\"><table><caption> <!><!></caption><thead><tr></tr></thead><tbody></tbody></table></div></div>"), ei = {
315
+ hash: "svelte-hyytey",
316
+ code: ".sv-grid-chart.svelte-hyytey {position:relative;display:flex;flex-direction:column;gap:8px;width:100%;background:var(--sg-chart-bg, transparent);}\n /* Legend on top: the legend row moves above the plot, the toolbar stays\n first. Left / right: a two-column grid, the legend a column of chips\n beside the plot and the brush, the toolbar spanning both. */.sv-grid-chart.is-legend-top.svelte-hyytey .sv-grid-chart-toolbar:where(.svelte-hyytey) {order:-2;}.sv-grid-chart.is-legend-top.svelte-hyytey .sv-grid-chart-legend:where(.svelte-hyytey) {order:-1;}.sv-grid-chart.is-legend-left.svelte-hyytey,\n .sv-grid-chart.is-legend-right.svelte-hyytey {display:grid;grid-template-rows:auto 1fr auto;align-items:start;}.sv-grid-chart.is-legend-left.svelte-hyytey {grid-template-columns:auto minmax(0, 1fr);grid-template-areas:'tb tb' 'lg svg' 'lg br';}.sv-grid-chart.is-legend-right.svelte-hyytey {grid-template-columns:minmax(0, 1fr) auto;grid-template-areas:'tb tb' 'svg lg' 'br lg';}.sv-grid-chart.is-legend-left.svelte-hyytey .sv-grid-chart-toolbar:where(.svelte-hyytey),\n .sv-grid-chart.is-legend-right.svelte-hyytey .sv-grid-chart-toolbar:where(.svelte-hyytey) {grid-area:tb;}.sv-grid-chart.is-legend-left.svelte-hyytey .sv-grid-chart-svg:where(.svelte-hyytey),\n .sv-grid-chart.is-legend-right.svelte-hyytey .sv-grid-chart-svg:where(.svelte-hyytey) {grid-area:svg;}.sv-grid-chart.is-legend-left.svelte-hyytey .sv-grid-chart-brush-host:where(.svelte-hyytey),\n .sv-grid-chart.is-legend-right.svelte-hyytey .sv-grid-chart-brush-host:where(.svelte-hyytey) {grid-area:br;}.sv-grid-chart-brush-host.svelte-hyytey {display:block;min-width:0;}.sv-grid-chart.is-legend-left.svelte-hyytey .sv-grid-chart-legend:where(.svelte-hyytey),\n .sv-grid-chart.is-legend-right.svelte-hyytey .sv-grid-chart-legend:where(.svelte-hyytey) {grid-area:lg;}.sv-grid-chart-legend.is-vertical.svelte-hyytey {flex-direction:column;align-items:flex-start;gap:4px;max-width:180px;padding-top:6px;}\n /* Autosize: the SVG is laid out at the pixel size the host actually has\n (see the dimension bindings in the script), so it needs no aspect-ratio\n scaling of its own. The host takes its height from a flex or grid parent\n that stretches it, never from a percentage: `height: 100%` inside a parent\n with other content over-measures by that content, the SVG grows into the\n gap, and the next measurement grows again, without end. */.sv-grid-chart.is-autosize.svelte-hyytey {min-height:0;}.sv-grid-chart.is-autosize.svelte-hyytey .sv-grid-chart-svg:where(.svelte-hyytey) {flex:none;min-height:0;}.sv-grid-chart-svg.svelte-hyytey {display:block;width:100%;height:auto;}.sv-grid-chart-title.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:calc(14px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;}.sv-grid-chart-subtitle.svelte-hyytey {fill:var(--sg-muted, #64748b);font-size:calc(11.5px * var(--sg-chart-font-scale, 1));font-family:inherit;}.sv-grid-chart-caption.svelte-hyytey {fill:var(--sg-muted, #64748b);font-size:calc(10px * var(--sg-chart-font-scale, 1));font-family:inherit;}.sv-grid-chart-refband.svelte-hyytey {pointer-events:none;}\n /* Enter effects. Fade is the per-mark keyframe every mark already has;\n wipe animates the plot clip's width from 0 (a keyframe with only `from`\n ends at the element's own value); grow scales bars up from their base. */.sv-grid-chart-wipe.svelte-hyytey {\n animation: svelte-hyytey-sv-grid-chart-wipe 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;}\n @keyframes svelte-hyytey-sv-grid-chart-wipe {\n from { width: 0; }\n }.sv-grid-chart-marks.is-enter-grow.svelte-hyytey .sv-grid-chart-bar:where(.svelte-hyytey) {transform-box:fill-box;transform-origin:50% 100%;\n animation: svelte-hyytey-sv-grid-chart-grow 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;}\n @keyframes svelte-hyytey-sv-grid-chart-grow {\n from { transform: scaleY(0.02); }\n }.sv-grid-chart-marks.is-enter-none.svelte-hyytey :where(.svelte-hyytey),\n .sv-grid-chart-marks.is-enter-none.svelte-hyytey {\n animation: none !important;}.sv-grid-chart-svg.is-pannable.svelte-hyytey {cursor:grab;}.sv-grid-chart-svg.is-pannable.svelte-hyytey:active {cursor:grabbing;}.sv-grid-chart-presets.svelte-hyytey {display:inline-flex;gap:2px;margin-right:6px;}.sv-grid-chart-crumbs.svelte-hyytey {display:inline-flex;align-items:center;gap:2px;margin-right:8px;font-size:calc(11.5px * var(--sg-chart-font-scale, 1));}.sv-grid-chart-crumb.is-current.svelte-hyytey {font-weight:600;color:var(--sg-fg, #0f172a);padding:0 4px;}.sv-grid-chart-crumb-sep.svelte-hyytey {color:var(--sg-muted, #64748b);}.sv-grid-chart-arc.is-drillable.svelte-hyytey,\n .sv-grid-chart-slice.is-drillable.svelte-hyytey {cursor:zoom-in;}.sv-grid-chart-bar.is-selected.svelte-hyytey,\n .sv-grid-chart-slice.is-selected.svelte-hyytey,\n .sv-grid-chart-arc.is-selected.svelte-hyytey {stroke:var(--sg-fg, #0f172a);stroke-width:2;}.sv-grid-chart-dot.is-selected.svelte-hyytey {stroke:var(--sg-fg, #0f172a);stroke-width:2;r:5;}.sv-grid-chart-scatter.is-selected.svelte-hyytey {stroke:var(--sg-fg, #0f172a);stroke-width:2;fill-opacity:1;}.sv-grid-chart-preset.svelte-hyytey {padding-inline:6px;}.sv-grid-chart-arc-track.svelte-hyytey {fill:var(--sg-border, #e2e8f0);opacity:0.45;pointer-events:none;}.sv-grid-chart-arc.svelte-hyytey {transition:opacity 0.1s ease;\n animation: svelte-hyytey-sv-grid-chart-in 0.3s ease both;}.sv-grid-chart-ribbon.svelte-hyytey {transition:opacity 0.1s ease;}.sv-grid-chart-stem.svelte-hyytey line:where(.svelte-hyytey) {stroke-linecap:round;}.sv-grid-chart-dot.is-stroked.svelte-hyytey {fill:none;}.sv-grid-chart-tooltip.is-custom.svelte-hyytey {padding:0;background:transparent;color:inherit;border:0;box-shadow:none;}.sv-grid-chart-gridline.svelte-hyytey {stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-gridline.is-zero.svelte-hyytey {stroke:var(--sg-muted, #94a3b8);opacity:0.9;}.sv-grid-chart-axis.svelte-hyytey {fill:var(--sg-muted, #64748b);font-size:calc(10px * var(--sg-chart-font-scale, 1));font-family:inherit;}.sv-grid-chart-axis-title.svelte-hyytey {fill:var(--sg-muted, #64748b);font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;}.sv-grid-chart-group-label.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-weight:600;}.sv-grid-chart-crosshair.svelte-hyytey {stroke:var(--sg-accent, #2563eb);stroke-width:1;stroke-dasharray:3 3;opacity:0.65;pointer-events:none;}.sv-grid-chart-callout.svelte-hyytey {opacity:0.8;pointer-events:none;}.sv-grid-chart-callout-label.svelte-hyytey {font-size:calc(10.5px * var(--sg-chart-font-scale, 1));font-family:inherit;fill:var(--sg-fg, #0f172a);pointer-events:none;}.sv-grid-chart-crosshair-label.svelte-hyytey rect:where(.svelte-hyytey) {fill:var(--sg-fg, #0f172a);opacity:0.85;}.sv-grid-chart-crosshair-label.svelte-hyytey text:where(.svelte-hyytey) {fill:var(--sg-bg, #fff);font-size:calc(9.5px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;}.sv-grid-chart-refline.svelte-hyytey {stroke-width:1.5;opacity:0.9;pointer-events:none;}.sv-grid-chart-reflabel.svelte-hyytey {font-size:calc(9.5px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-overlay.svelte-hyytey {opacity:0.85;pointer-events:none;}.sv-grid-chart-annotation-marker.svelte-hyytey {pointer-events:none;}.sv-grid-chart-annotation-marker.has-text.svelte-hyytey {pointer-events:auto;cursor:help;}.sv-grid-chart-annotation-marker.svelte-hyytey:focus-visible {outline:2px solid var(--sg-accent, #2563eb);outline-offset:2px;}.sv-grid-chart-annotation-label.svelte-hyytey {font-size:calc(10px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-serieslabel.svelte-hyytey {font-size:calc(10.5px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;}.sv-grid-chart-annotation-flagtext.svelte-hyytey {font-size:calc(9px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-refpill.svelte-hyytey text:where(.svelte-hyytey) {font-size:calc(9.5px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}\n /* Drawings. The hit line is a fat invisible stroke so a 1.5px trend line\n can be clicked; handles only exist on the selected drawing. */.sv-grid-chart-drawing-hit.svelte-hyytey {stroke:transparent;stroke-width:10;fill:transparent;pointer-events:stroke;}.sv-grid-chart-drawing.is-fib.svelte-hyytey .sv-grid-chart-drawing-hit:where(.svelte-hyytey),\n .sv-grid-chart-drawing.is-rect.svelte-hyytey rect:where(.svelte-hyytey),\n .sv-grid-chart-drawing.is-text.svelte-hyytey text:where(.svelte-hyytey) {pointer-events:all;}.sv-grid-chart-drawing[role='button'].svelte-hyytey {cursor:pointer;}.sv-grid-chart-drawing.svelte-hyytey:focus-visible {outline:none;}.sv-grid-chart-drawing.is-selected.svelte-hyytey line:where(.svelte-hyytey),\n .sv-grid-chart-drawing.is-selected.svelte-hyytey rect:where(.svelte-hyytey),\n .sv-grid-chart-drawing.svelte-hyytey:focus-visible line:where(.svelte-hyytey),\n .sv-grid-chart-drawing.svelte-hyytey:focus-visible rect:where(.svelte-hyytey) {filter:drop-shadow(0 0 2px var(--sg-accent, #2563eb));}.sv-grid-chart-drawing-label.svelte-hyytey {font-size:calc(9px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;}.sv-grid-chart-drawing-text.svelte-hyytey {font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;}.sv-grid-chart-drawing-handle.svelte-hyytey {cursor:move;}.sv-grid-chart-textdraft.svelte-hyytey {position:absolute;z-index:11;transform:translate(0, -50%);width:160px;font:inherit;font-size:calc(12px * var(--sg-chart-font-scale, 1));padding:3px 6px;border:1px solid var(--sg-accent, #2563eb);border-radius:4px;background:var(--sg-bg, #fff);color:var(--sg-fg, #0f172a);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);}.sv-grid-chart-svg.is-drawing.svelte-hyytey {cursor:crosshair;}.sv-grid-chart-drawtools.svelte-hyytey {display:inline-flex;gap:2px;padding-right:6px;margin-right:2px;border-right:1px solid var(--sg-border, #e2e8f0);}\n /* Heatmap cells. Stroke uses the border token (not bg) so the cell\n separators stay visible in BOTH light and dark themes - on dark mode\n a bg-colored stroke disappeared into the navy cells. */.sv-grid-chart-heatcell.svelte-hyytey {stroke:var(--sg-border, #cbd5e1);stroke-width:1;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-hyytey .sv-grid-chart-heatcell:where(.svelte-hyytey) {cursor:pointer;}.sv-grid-chart-heatcell.svelte-hyytey:hover {opacity:0.85;}.sv-grid-chart-heatlabel.svelte-hyytey {font-size:calc(10px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;user-select:none;}\n /* Legend gradient bar gets a visible outline + axis labels next to it\n pull from the regular axis class so they follow the theme. */.sv-grid-chart-heatlegend.svelte-hyytey {stroke:var(--sg-border, #cbd5e1);stroke-width:1;}\n /* Funnel segments + labels. */.sv-grid-chart-funnel-seg.svelte-hyytey {stroke:var(--sg-bg, #ffffff);stroke-width:2;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-hyytey .sv-grid-chart-funnel-seg:where(.svelte-hyytey) {cursor:pointer;}.sv-grid-chart-funnel-seg.svelte-hyytey:hover {opacity:0.88;}.sv-grid-chart-funnel-label.svelte-hyytey {font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-funnel-value.svelte-hyytey {font-size:calc(10px * var(--sg-chart-font-scale, 1));font-family:inherit;opacity:0.85;pointer-events:none;}\n /* Radar grid + polygons. */.sv-grid-chart-radar-ring.svelte-hyytey {fill:none;stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-radar-spoke.svelte-hyytey {stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-radar-poly.svelte-hyytey {transition:opacity 100ms ease;pointer-events:none;}.sv-grid-chart-radar-dot.svelte-hyytey {transition:r 100ms ease;cursor:default;}.sv-grid-chart-radar-dot.svelte-hyytey:hover {r:4.5;}\n /* Calendar heatmap cells. Blank cells get a faint outline so the grid\n still reads on days with no data. */.sv-grid-chart-calendar-cell.svelte-hyytey {stroke:var(--sg-border, #e2e8f0);stroke-width:0.5;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-calendar-cell.is-blank.svelte-hyytey {stroke-opacity:0.5;}.sv-grid-chart-calendar-cell.svelte-hyytey:hover {opacity:0.85;}.sv-grid-chart-calendar-legend.svelte-hyytey {stroke:var(--sg-border, #cbd5e1);stroke-width:0.5;}\n /* Gauge centre readout. */.sv-grid-chart-gauge-value.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:calc(22px * var(--sg-chart-font-scale, 1));font-weight:800;font-family:inherit;pointer-events:none;}\n /* Gauge tick marks: faint minors, stronger majors. */.sv-grid-chart-gauge-tick.svelte-hyytey {stroke:var(--sg-muted, #94a3b8);stroke-width:1;opacity:0.4;}.sv-grid-chart-gauge-tick.is-major.svelte-hyytey {stroke-width:2;opacity:0.7;}\n /* Pointer needle + hub. */.sv-grid-chart-gauge-needle.svelte-hyytey {fill:var(--sg-fg, #0f172a);\n /* A hairline of the background colour around the needle keeps it legible\n where it crosses the value arc, which is the same weight and often a\n similar tone. */stroke:var(--sg-bg, #ffffff);stroke-width:0.75;stroke-linejoin:round;}.sv-grid-chart-gauge-hub.svelte-hyytey {fill:var(--sg-fg, #0f172a);stroke:var(--sg-bg, #ffffff);stroke-width:2;}.sv-grid-chart-gauge-hub-dot.svelte-hyytey {fill:var(--sg-bg, #ffffff);}\n /* Tree-map cells. White separators give the squarified rects breathing\n room without distracting from the data. */.sv-grid-chart-treemap-cell.svelte-hyytey {stroke:var(--sg-bg, #ffffff);stroke-width:1;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-hyytey .sv-grid-chart-treemap-cell:where(.svelte-hyytey) {cursor:pointer;}.sv-grid-chart-treemap-cell.svelte-hyytey:hover {opacity:0.88;}.sv-grid-chart-treemap-label.svelte-hyytey {font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;}.sv-grid-chart-treemap-value.svelte-hyytey {font-size:calc(10px * var(--sg-chart-font-scale, 1));font-family:inherit;pointer-events:none;}\n /* Sankey nodes + links. Links use stroke not fill so per-ribbon width\n comes from stroke-width directly. */.sv-grid-chart-sankey-node.svelte-hyytey {transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-sankey-node.svelte-hyytey:hover {opacity:0.88;}.sv-grid-chart-sankey-link.svelte-hyytey {transition:stroke-opacity 100ms ease;cursor:default;}.sv-grid-chart-sankey-link.svelte-hyytey:hover {stroke-opacity:0.6;}.sv-grid-chart-sankey-label.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;}\n /* Brush mini-map: a compact secondary chart with a draggable window. */.sv-grid-chart-brush.svelte-hyytey {display:block;width:100%;height:auto;margin-top:4px;border-top:1px solid var(--sg-border, #e2e8f0);user-select:none;touch-action:none;}.sv-grid-chart-brush-mask.svelte-hyytey {fill:var(--sg-bg, #ffffff);fill-opacity:0.65;pointer-events:none;}.sv-grid-chart-brush-window.svelte-hyytey {fill:var(--sg-accent, #2563eb);fill-opacity:0.10;stroke:var(--sg-accent, #2563eb);stroke-width:1;cursor:grab;}.sv-grid-chart-brush-window.svelte-hyytey:active {cursor:grabbing;}.sv-grid-chart-brush-handle.svelte-hyytey {fill:var(--sg-accent, #2563eb);fill-opacity:0.4;cursor:ew-resize;}.sv-grid-chart-brush-handle.svelte-hyytey:hover {fill-opacity:0.7;}.sv-grid-chart-scatter.svelte-hyytey {transition:opacity 0.2s ease;stroke-width:1;}.is-clickable.svelte-hyytey .sv-grid-chart-scatter:where(.svelte-hyytey),\n .sv-grid-chart-scatter.svelte-hyytey:hover {cursor:pointer;}.sv-grid-chart-cat-hit.svelte-hyytey {fill:transparent;}.sv-grid-chart-cat-hit.svelte-hyytey:focus-visible,\n .sv-grid-chart-slice.svelte-hyytey:focus-visible,\n .sv-grid-chart-arc.svelte-hyytey:focus-visible,\n .sv-grid-chart-heatcell.svelte-hyytey:focus-visible,\n .sv-grid-chart-funnel-seg.svelte-hyytey:focus-visible,\n .sv-grid-chart-treemap-cell.svelte-hyytey:focus-visible,\n .sv-grid-chart-sankey-node.svelte-hyytey:focus-visible,\n .sv-grid-chart-sankey-link.svelte-hyytey:focus-visible,\n .sv-grid-chart-calendar-cell.svelte-hyytey:focus-visible,\n .sv-grid-chart-radar-dot.svelte-hyytey:focus-visible,\n .sv-grid-chart-scatter.svelte-hyytey:focus-visible,\n .sv-grid-chart-brush.svelte-hyytey:focus-visible {outline:2px solid var(--sg-accent, #2563eb);outline-offset:1px;}.sv-grid-chart-datalabel.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:calc(9.5px * var(--sg-chart-font-scale, 1));font-weight:600;font-variant-numeric:tabular-nums;pointer-events:none;}.sv-grid-chart-datalabel-leader.svelte-hyytey {stroke:var(--sg-muted, #64748b);stroke-width:1;pointer-events:none;}.sv-grid-chart-datalabel.on-bar.svelte-hyytey {fill:#fff;}.sv-grid-chart-donut-total.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:calc(16px * var(--sg-chart-font-scale, 1));font-weight:800;font-variant-numeric:tabular-nums;}.sv-grid-chart-donut-label.svelte-hyytey {fill:var(--sg-muted, #64748b);font-size:calc(10px * var(--sg-chart-font-scale, 1));}.sv-grid-chart-bar.svelte-hyytey {transition:x 0.3s ease, y 0.3s ease, width 0.3s ease, height 0.3s ease;}.sv-grid-chart-dot.svelte-hyytey {transition:cx 0.3s ease, cy 0.3s ease;}.sv-grid-chart-candle.svelte-hyytey {stroke-width:1;transition:x 0.3s ease, y 0.3s ease, width 0.3s ease, height 0.3s ease;}.sv-grid-chart-wick.svelte-hyytey,\n .sv-grid-chart-ohlc.svelte-hyytey {stroke-width:1;shape-rendering:crispEdges;}.sv-grid-chart-box.svelte-hyytey {stroke-width:1;transition:x 0.3s ease, y 0.3s ease, width 0.3s ease, height 0.3s ease;}.sv-grid-chart-whisker.svelte-hyytey,\n .sv-grid-chart-errorbar.svelte-hyytey {stroke-width:1;shape-rendering:crispEdges;}\n /* The median is the number people read off a box plot, so it gets the\n weight. Everything else on the mark is 1px. */.sv-grid-chart-median.svelte-hyytey {stroke-width:2;shape-rendering:crispEdges;}.sv-grid-chart-outlier.svelte-hyytey {stroke-width:1;}.is-clickable.svelte-hyytey .sv-grid-chart-cat-hit:where(.svelte-hyytey),\n .is-clickable.svelte-hyytey .sv-grid-chart-slice:where(.svelte-hyytey) {cursor:pointer;}.sv-grid-chart-empty.svelte-hyytey {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--sg-muted, #94a3b8);font-size:calc(13px * var(--sg-chart-font-scale, 1));pointer-events:none;}\n\n /* Toolbar above the chart: reset-zoom, PNG / SVG / Copy. */.sv-grid-chart-toolbar.svelte-hyytey {display:flex;justify-content:flex-end;gap:4px;flex-wrap:wrap;}.sv-grid-chart-tool.svelte-hyytey {display:inline-flex;align-items:center;gap:4px;border:1px solid var(--sg-border, #cbd5e1);background:var(--sg-bg, #ffffff);color:var(--sg-fg, #1e293b);font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:500;padding:3px 8px;border-radius:4px;cursor:pointer;transition:background-color 100ms ease, border-color 100ms ease;}.sv-grid-chart-tool.svelte-hyytey:hover {background:var(--sg-row-hover-bg, #f1f5f9);border-color:var(--sg-accent, #2563eb);}\n\n /* Annotate mode: the toggle reads as pressed, the plot as a target, and a\n marker as something you can click to take away. */.sv-grid-chart-tool.is-on.svelte-hyytey {background:var(--sg-accent, #2563eb);border-color:var(--sg-accent, #2563eb);color:var(--sg-on-accent, #fff);}.sv-grid-chart-svg.is-annotating.svelte-hyytey {cursor:copy;}.sv-grid-chart-annotation-marker.is-removable.svelte-hyytey {cursor:pointer;}\n\n /* Drag-to-zoom: translucent accent rectangle over the plot. */.sv-grid-chart-svg.is-zoomable.svelte-hyytey {cursor:crosshair;}.sv-grid-chart-svg.is-dragging.svelte-hyytey {cursor:crosshair;user-select:none;}.sv-grid-chart-zoom-rect.svelte-hyytey {fill:var(--sg-accent, #2563eb);fill-opacity:0.12;stroke:var(--sg-accent, #2563eb);stroke-width:1;stroke-dasharray:3 3;pointer-events:none;}.sv-grid-chart-tooltip.svelte-hyytey {position:absolute;z-index:10;transform:translate(-50%, calc(-100% - 12px));pointer-events:none;white-space:nowrap;padding:6px 9px;border-radius:6px;background:var(--sg-fg, #0f172a);color:var(--sg-bg, #fff);font-size:calc(11.5px * var(--sg-chart-font-scale, 1));line-height:1.4;box-shadow:0 6px 18px rgba(0, 0, 0, 0.28);display:flex;flex-direction:column;gap:1px;}.sv-grid-chart-tooltip.is-below.svelte-hyytey {transform:translate(-50%, 16px);}\n /* A corner tooltip anchors its own corner to the plot's, no flipping. */.sv-grid-chart-tooltip.is-fixed.svelte-hyytey {transform:none;}.sv-grid-chart-tooltip.is-fixed.is-right.svelte-hyytey {transform:translate(-100%, 0);}.sv-grid-chart-tooltip.is-fixed.is-bottom.svelte-hyytey {transform:translate(0, -100%);}.sv-grid-chart-tooltip.is-fixed.is-right.is-bottom.svelte-hyytey {transform:translate(-100%, -100%);}\n /* Pinned: selectable text, and a ring so a reader sees it is held. */.sv-grid-chart-tooltip.is-pinned.svelte-hyytey {pointer-events:auto;user-select:text;box-shadow:0 0 0 2px var(--sg-accent, #2563eb), 0 6px 18px rgba(0, 0, 0, 0.28);}.sv-grid-chart-tooltip-title.svelte-hyytey {opacity:0.75;font-size:calc(10.5px * var(--sg-chart-font-scale, 1));margin-bottom:1px;}.sv-grid-chart-tooltip-row.svelte-hyytey {display:flex;align-items:center;gap:6px;}.sv-grid-chart-tooltip-dot.svelte-hyytey {width:8px;height:8px;border-radius:2px;flex-shrink:0;}.sv-grid-chart-tooltip-row-label.svelte-hyytey {opacity:0.85;}.sv-grid-chart-tooltip-row-value.svelte-hyytey {margin-left:auto;padding-left:10px;font-weight:700;font-variant-numeric:tabular-nums;}.sv-grid-chart-legend.svelte-hyytey {display:flex;flex-wrap:wrap;gap:6px 12px;font-size:calc(12px * var(--sg-chart-font-scale, 1));color:var(--sg-fg, #0f172a);}.sv-grid-chart-legend-item.svelte-hyytey {display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:inherit;font:inherit;padding:1px 2px;border-radius:4px;cursor:pointer;}.sv-grid-chart-legend-item.svelte-hyytey:disabled {cursor:default;}.sv-grid-chart-legend-item.is-off.svelte-hyytey {color:var(--sg-muted, #94a3b8);text-decoration:line-through;}.sv-grid-chart-legend-item.is-isolated.svelte-hyytey {background:var(--sg-header-bg, #f1f5f9);font-weight:700;}.sv-grid-chart-legend-more.svelte-hyytey {border:1px dashed var(--sg-border, #cbd5e1);background:transparent;color:var(--sg-muted, #64748b);font:inherit;font-size:calc(11px * var(--sg-chart-font-scale, 1));padding:1px 7px;border-radius:999px;cursor:pointer;}.sv-grid-chart-legend-more.svelte-hyytey:hover {color:var(--sg-fg, #0f172a);border-color:var(--sg-accent, #2563eb);}.sv-grid-chart-sr-only.svelte-hyytey {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}.sv-grid-chart-swatch.svelte-hyytey {width:12px;height:12px;border-radius:3px;border:1.5px solid transparent;display:inline-block;box-sizing:border-box;}\n\n /* Enter animation. Marks fade in when they are first created; the position\n transitions above then handle everything after that, so a chart appears\n smoothly and moves smoothly rather than popping into place and then\n animating.\n\n A fade rather than the wipe you would normally reach for. A wipe needs a\n clip-path over all the marks, and the marks here are direct children of the\n <svg> - grouping them is a large edit across every chart type, for a nicer\n version of something already pleasant. Noted rather than done.\n\n `both` matters: it holds the from-state before the animation starts, so a\n mark cannot flash at full opacity for a frame first. It also means that\n when `animation: none` applies below, the rule stops applying entirely and\n the mark is simply painted - not stuck invisible. */\n @keyframes svelte-hyytey-sv-grid-chart-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }.sv-grid-chart-bar.svelte-hyytey,\n .sv-grid-chart-linepath.svelte-hyytey,\n .sv-grid-chart-area.svelte-hyytey,\n .sv-grid-chart-slice.svelte-hyytey,\n .sv-grid-chart-candle.svelte-hyytey,\n .sv-grid-chart-box.svelte-hyytey,\n .sv-grid-chart-funnel-seg.svelte-hyytey,\n .sv-grid-chart-heatcell.svelte-hyytey,\n .sv-grid-chart-treemap-cell.svelte-hyytey {\n animation: svelte-hyytey-sv-grid-chart-in 0.3s ease-out both;}\n\n /* Reduced motion. Every other animated component in the kit honours this\n (SvCard, SvCircularProgress, SvCollapsible); the chart never did, so a\n reader who has asked the OS for less movement still got every bar, dot,\n candle and box sliding on each re-aggregation - and a chart re-aggregates\n on every filter keystroke, which is the worst case for it. */\n @media (prefers-reduced-motion: reduce) {.sv-grid-chart-bar.svelte-hyytey,\n .sv-grid-chart-dot.svelte-hyytey,\n .sv-grid-chart-candle.svelte-hyytey,\n .sv-grid-chart-box.svelte-hyytey {transition:none;}.sv-grid-chart-bar.svelte-hyytey,\n .sv-grid-chart-linepath.svelte-hyytey,\n .sv-grid-chart-area.svelte-hyytey,\n .sv-grid-chart-slice.svelte-hyytey,\n .sv-grid-chart-candle.svelte-hyytey,\n .sv-grid-chart-box.svelte-hyytey,\n .sv-grid-chart-funnel-seg.svelte-hyytey,\n .sv-grid-chart-heatcell.svelte-hyytey,\n .sv-grid-chart-treemap-cell.svelte-hyytey {\n animation: none;}\n }\n\n /* ---- Forced colors (Windows High Contrast) ---------------------------\n The UA forces fill and stroke along with color and background, which\n would paint every series the same. Colour carries the data, so the\n marks keep theirs (forced-color-adjust: none, the one case the spec\n allows it for). Everything that is chrome rather than data takes the\n system palette instead: text, gridlines, the crosshair and its pills,\n focus rings, the legend's swatches and the tooltip. */\n @media (forced-colors: active) {.sv-grid-chart-svg.svelte-hyytey,\n .sv-grid-chart-brush.svelte-hyytey,\n .sv-grid-chart-swatch.svelte-hyytey {forced-color-adjust:none;}.sv-grid-chart-axis.svelte-hyytey,\n .sv-grid-chart-axis-title.svelte-hyytey,\n .sv-grid-chart-title.svelte-hyytey,\n .sv-grid-chart-subtitle.svelte-hyytey,\n .sv-grid-chart-caption.svelte-hyytey,\n .sv-grid-chart-datalabel.svelte-hyytey,\n .sv-grid-chart-callout-label.svelte-hyytey,\n .sv-grid-chart-donut-total.svelte-hyytey,\n .sv-grid-chart-donut-label.svelte-hyytey,\n .sv-grid-chart-sankey-label.svelte-hyytey,\n .sv-grid-chart-annotation-label.svelte-hyytey {fill:CanvasText;}.sv-grid-chart-gridline.svelte-hyytey {stroke:GrayText;opacity:1;}.sv-grid-chart-crosshair.svelte-hyytey {stroke:Highlight;opacity:1;}.sv-grid-chart-crosshair-label.svelte-hyytey rect:where(.svelte-hyytey),\n .sv-grid-chart-refpill.svelte-hyytey rect:where(.svelte-hyytey) {fill:Highlight;opacity:1;}.sv-grid-chart-crosshair-label.svelte-hyytey text:where(.svelte-hyytey),\n .sv-grid-chart-refpill.svelte-hyytey text:where(.svelte-hyytey) {fill:HighlightText;}.sv-grid-chart-cat-hit.svelte-hyytey:focus-visible,\n .sv-grid-chart-slice.svelte-hyytey:focus-visible,\n .sv-grid-chart-arc.svelte-hyytey:focus-visible,\n .sv-grid-chart-heatcell.svelte-hyytey:focus-visible,\n .sv-grid-chart-funnel-seg.svelte-hyytey:focus-visible,\n .sv-grid-chart-treemap-cell.svelte-hyytey:focus-visible,\n .sv-grid-chart-sankey-node.svelte-hyytey:focus-visible,\n .sv-grid-chart-sankey-link.svelte-hyytey:focus-visible,\n .sv-grid-chart-calendar-cell.svelte-hyytey:focus-visible,\n .sv-grid-chart-radar-dot.svelte-hyytey:focus-visible,\n .sv-grid-chart-scatter.svelte-hyytey:focus-visible,\n .sv-grid-chart-brush.svelte-hyytey:focus-visible,\n .sv-grid-chart-annotation-marker.svelte-hyytey:focus-visible {outline:3px solid Highlight;}.sv-grid-chart-slice.is-selected.svelte-hyytey,\n .sv-grid-chart-arc.is-selected.svelte-hyytey {stroke:Highlight;stroke-width:3;}.sv-grid-chart-brush-mask.svelte-hyytey {fill:Canvas;fill-opacity:0.7;}.sv-grid-chart-brush-window.svelte-hyytey {stroke:Highlight;fill:Highlight;fill-opacity:0.2;}.sv-grid-chart-brush-handle.svelte-hyytey {fill:Highlight;}.sv-grid-chart-tooltip.svelte-hyytey {border:1px solid CanvasText;}.sv-grid-chart-legend-item.is-off.svelte-hyytey .sv-grid-chart-swatch:where(.svelte-hyytey) {forced-color-adjust:auto;}\n }"
317
+ };
318
+ function ti(l, d) {
319
+ le(d, !0), de(l, ei);
320
+ let p = E(d, "legend", 3, !0), fe = E(d, "interactive", 3, !0), ge = E(d, "tooltipMode", 3, "shared"), ye = E(d, "tooltipPosition", 3, "follow"), Ne = E(d, "tooltipSticky", 3, !1), k = E(d, "zoomable", 3, !1), A = E(d, "zoom", 15, null), j = E(d, "rangePresets", 3, !1), M = E(d, "contextMenu", 3, !1), Ue = E(d, "animate", 3, !1), We = E(d, "drillable", 3, !1), Ge = E(d, "drillPath", 31, () => se([])), Ke = E(d, "selectable", 3, !1), qe = E(d, "selected", 31, () => se([])), Je = E(d, "announce", 3, !0), Ye = E(d, "describe", 3, !0), Xe = E(d, "live", 3, !1), Ze = E(d, "hoverHighlight", 3, !0), ti = E(d, "crosshairLabels", 3, !0), ni = E(d, "brush", 3, !1), ri = E(d, "brushHeight", 3, 88), ii = E(d, "autosize", 3, !1), ai = E(d, "annotatable", 3, !1), oi = E(d, "drawable", 3, !1), P = T(() => Qe(d.localeText)), si = v("");
321
+ m(() => {
322
+ if (!Ye()) {
323
+ x(si, "");
324
+ return;
325
+ }
326
+ let e = i(V), t = !0;
327
+ return import("./chart-summary-BJW_tg_X.js").then((e) => e.n).then(({ chartSummary: n }) => {
328
+ t && x(si, n(e), !0);
329
+ }), () => {
330
+ t = !1;
331
+ };
332
+ });
333
+ async function ci() {
334
+ if (i(si)) {
335
+ try {
336
+ await navigator.clipboard?.writeText(i(si));
337
+ } catch {}
338
+ x(Go, `${i(P).describeCopied}. ${i(si)}`);
339
+ }
340
+ }
341
+ let li = v(0), ui = v(0), di = T(() => d.width ?? (ii() && i(li) > 24 ? i(li) : d.spec.width ?? 520)), fi = T(() => d.height ?? (ii() && i(ui) > 24 ? i(ui) : d.spec.height ?? 300)), pi = T(() => {
342
+ if (!d.spec.responsive?.length) return;
343
+ let e;
344
+ for (let t of Oe(d.spec.responsive, i(di), i(fi))) t.legend !== void 0 && (e = t.legend);
345
+ return e;
346
+ }), F = T(() => {
347
+ if (!d.spec.responsive?.length) return d.spec;
348
+ let { responsive: e, ...t } = xe(d.spec, i(di), i(fi));
349
+ return t;
350
+ }), mi = T(() => i(pi) ?? p()), hi = T(() => i(mi) === !0 ? "bottom" : i(mi) === !1 ? null : i(mi)), gi = T(() => i(hi) === "left" || i(hi) === "right"), _i = v(0), vi = v(0), yi = v(0), bi = v(0), xi = T(() => {
351
+ if (!ii() || i(li) <= 24) return null;
352
+ let e = i(Di) ? i(_i) : 0, t = i(hi) ? i(yi) : 0, n = i(hi) ? i(vi) : 0, r = ni() && !Ra.has(d.spec.type) ? i(bi) : 0, a = Math.max(120, Math.round(i(li) - (i(gi) ? n + 8 : 0))), o = e + (i(gi) ? 0 : t) + r, s = i(gi) ? 16 : (e ? 8 : 0) + (t ? 8 : 0) + (r ? 8 : 0);
353
+ return {
354
+ width: a,
355
+ height: i(ui) > 24 ? Math.max(120, Math.round(i(ui) - o - s)) : void 0
356
+ };
357
+ }), Si = T(() => d.width ?? i(xi)?.width), Ci = T(() => d.height ?? i(xi)?.height), wi = T(() => typeof d.dataLabels == "object" ? {
358
+ show: !0,
359
+ ...d.dataLabels
360
+ } : d.dataLabels === void 0 ? i(F).dataLabels ? {
361
+ show: i(F).dataLabels.show !== !1,
362
+ ...i(F).dataLabels
363
+ } : { show: !1 } : { show: !!d.dataLabels }), Ti = T(() => k() ? k() === !0 ? {
364
+ drag: !0,
365
+ wheel: !1,
366
+ pinch: !1,
367
+ pan: !1,
368
+ axis: "x"
369
+ } : {
370
+ drag: k().drag !== !1,
371
+ wheel: k().wheel ?? !1,
372
+ pinch: k().pinch ?? !!k().wheel,
373
+ pan: k().pan ?? !1,
374
+ axis: k().axis ?? "x"
375
+ } : null), Ei = v(!1), Di = T(() => d.toolbar ?? (!!k() || !!d.onDrill || ai() || !!j() || We() || !!oi())), Oi = v(!1), I = (e) => d.formatValue ? d.formatValue(e) : i(F).valueFormat ? pe(e, i(F).valueFormat, i(F)) : Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e), ki = T(() => {
376
+ let e = i(F).y2Axis;
377
+ return d.formatValue ? d.formatValue : e?.formatter ? (t) => e.formatter(t, -1) : e?.format ? (t) => pe(t, e.format, i(F)) : (e) => Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e);
378
+ }), Ai = T(() => new Set(i(F).series.filter((e) => e.axis === "right").map((e) => e.label))), ji = (e) => e && i(Ai).has(e) ? i(ki) : I, Mi = v(se(new Set(d.spec.series.filter((e) => e.visible === !1).map((e) => e.label)))), Ni = v(null), Pi = v(null), Fi = v(null), Ii = T(() => i(F).palette ?? i(Pi) ?? De), Li = `svgc-${Math.random().toString(36).slice(2, 8)}`, Ri = T(() => i(F).series.map((e, t) => ({
379
+ ...e,
380
+ color: e.color ?? i(Ii)[t % i(Ii).length]
381
+ }))), zi = T(() => i(F).series.map((e, t) => e.pattern ? e.pattern : i(F).patternFallback ? [
382
+ "stripe",
383
+ "crosshatch",
384
+ "dots",
385
+ "diagonal"
386
+ ][t % 4] : "solid")), Bi = T(() => {
387
+ let e = {};
388
+ return i(Ri).forEach((t, n) => {
389
+ let r = i(zi)[n];
390
+ e[t.label] = r === "solid" || !r ? t.color : `url(#${Li}-pat-${n})`;
391
+ }), e;
392
+ }), Vi = T(() => i(Ri).map((e, t) => ({
393
+ id: `${Li}-pat-${t}`,
394
+ color: e.color,
395
+ kind: i(zi)[t] ?? "solid"
396
+ })).filter((e) => e.kind !== "solid")), Hi = T(() => {
397
+ if (i(Ni) == null) return i(Mi);
398
+ let e = i(F).type === "pie" ? i($a) : i(F).series.map((e) => e.label);
399
+ return new Set(e.filter((e) => e !== i(Ni)));
400
+ }), Ui = T(() => A() !== null);
401
+ function Wi(e) {
402
+ if (!(e === null && A() === null || e !== null && A() !== null && e.i0 === A().i0 && e.i1 === A().i1 && (e.y?.min ?? null) === (A().y?.min ?? null) && (e.y?.max ?? null) === (A().y?.max ?? null)) && (A(e), d.onZoom?.(e), d.syncGroup && !Ki)) {
403
+ let t = i(F).categories.length;
404
+ Ve(d.syncGroup, e, t, Gi, e ? [i(F).categories[e.i0] ?? "", i(F).categories[e.i1] ?? ""] : null);
405
+ }
406
+ }
407
+ let Gi = Symbol("svchart"), Ki = !1, qi = T(() => d.syncGroup ? ze(d.syncGroup) : null), Ji = v(!1);
408
+ function Yi(e) {
409
+ Wi(e);
410
+ }
411
+ function Xi() {
412
+ Wi(null);
413
+ }
414
+ function Zi(e, t) {
415
+ let n = Po(e, t);
416
+ return n == null ? null : (A() ? A().i0 : 0) + n;
417
+ }
418
+ function Qi(e) {
419
+ if (!i(Ti)?.wheel || !i(W) || i(Oi) || i(Ti).wheel === "modifier" && !(e.ctrlKey || e.metaKey)) return;
420
+ let t = oa(e);
421
+ if (!t || t.x < i(H).plot.x || t.x > i(H).plot.x + i(H).plot.w) return;
422
+ e.preventDefault();
423
+ let n = Zi(e.clientX, e.currentTarget) ?? 0, r = e.deltaY > 0 ? 1.25 : .8;
424
+ Wi(Pe(A(), i(F).categories.length, n, r));
425
+ }
426
+ let $i = /* @__PURE__ */ new Map(), ea = null, ta = null, na = (e) => !!i(Ti)?.pan && i(Ui) && (i(Ei) || (i(Ti).pan === "shift" || i(Ti).pan === !0) && e.shiftKey), L = v(null), ra = v(null), ia = v(null), aa = T(() => {
427
+ if (!i(ra) || !i(ia)) return null;
428
+ let e = Math.min(i(ra).x, i(ia).x), t = Math.min(i(ra).y, i(ia).y), n = Math.abs(i(ia).x - i(ra).x), r = Math.abs(i(ia).y - i(ra).y);
429
+ return n > 4 && r > 4 ? {
430
+ x: e,
431
+ y: t,
432
+ w: n,
433
+ h: r
434
+ } : null;
435
+ });
436
+ function oa(e) {
437
+ if (!i(L)) return null;
438
+ let t = i(L).getBoundingClientRect();
439
+ return {
440
+ x: (e.clientX - t.left) / t.width * i(H).width,
441
+ y: (e.clientY - t.top) / t.height * i(H).height
442
+ };
443
+ }
444
+ function sa(e) {
445
+ let t = i(G) ? e.y - i(H).plot.y : e.x - i(H).plot.x, n = Math.floor(t / i(Oo));
446
+ return Math.max(0, Math.min(i(V).categories.length - 1, n));
447
+ }
448
+ function ca(e) {
449
+ if (i(Oi) || i(R) || i(ba) || !i(Ti) || !i(W)) return;
450
+ let t = oa(e);
451
+ if (t && !(t.x < i(H).plot.x || t.x > i(H).plot.x + i(H).plot.w || t.y < i(H).plot.y || t.y > i(H).plot.y + i(H).plot.h)) {
452
+ if (e.target.setPointerCapture?.(e.pointerId), i(Ti).pinch && ($i.set(e.pointerId, t), $i.size === 2)) {
453
+ let [e, t] = [...$i.values()];
454
+ ea = {
455
+ dist: Math.hypot(e.x - t.x, e.y - t.y) || 1,
456
+ mid: sa({
457
+ x: (e.x + t.x) / 2,
458
+ y: (e.y + t.y) / 2
459
+ }) + (A() ? A().i0 : 0),
460
+ start: A()
461
+ }, x(ra, null), x(ia, null);
462
+ return;
463
+ }
464
+ if (na(e)) {
465
+ ta = {
466
+ startIndex: sa(t),
467
+ start: A()
468
+ };
469
+ return;
470
+ }
471
+ i(Ti).drag && (x(ra, t, !0), x(ia, t, !0));
472
+ }
473
+ }
474
+ function la(e) {
475
+ if (ea && $i.has(e.pointerId)) {
476
+ let t = oa(e);
477
+ t && $i.set(e.pointerId, t);
478
+ let [n, r] = [...$i.values()];
479
+ if (n && r) {
480
+ let e = Math.hypot(n.x - r.x, n.y - r.y) || 1;
481
+ Wi(Ie(ea.start, i(F).categories.length, ea.mid, e / ea.dist));
482
+ }
483
+ return;
484
+ }
485
+ if (ta) {
486
+ let t = oa(e);
487
+ if (!t) return;
488
+ let n = ta.startIndex - sa(t);
489
+ Wi(Fe(ta.start, i(F).categories.length, n));
490
+ return;
491
+ }
492
+ i(ra) && x(ia, oa(e), !0);
493
+ }
494
+ function ua(e) {
495
+ if (e && $i.delete(e.pointerId), ea) {
496
+ $i.size < 2 && (ea = null);
497
+ return;
498
+ }
499
+ if (ta) {
500
+ ta = null;
501
+ return;
502
+ }
503
+ if (!i(ra) || !i(ia)) {
504
+ x(ra, null), x(ia, null);
505
+ return;
506
+ }
507
+ let t = i(aa);
508
+ if (t) {
509
+ let e = i(Ti)?.axis ?? "x", n = sa({
510
+ x: t.x,
511
+ y: t.y
512
+ }), r = sa({
513
+ x: t.x + t.w,
514
+ y: t.y + t.h
515
+ }), a = A() ? A().i0 : 0, o = e === "y" ? A()?.i0 ?? 0 : a + Math.min(n, r), s = e === "y" ? A()?.i1 ?? i(F).categories.length - 1 : a + Math.max(n, r), c;
516
+ if (e !== "x" && i(U) && !i(G)) {
517
+ let e = i(U).yInvert(t.y), n = i(U).yInvert(t.y + t.h);
518
+ Number.isFinite(e) && Number.isFinite(n) && e !== n && (c = {
519
+ min: Math.min(e, n),
520
+ max: Math.max(e, n)
521
+ });
522
+ }
523
+ (s > o || c) && Wi({
524
+ i0: o,
525
+ i1: Math.max(o, s),
526
+ ...c ? { y: c } : {}
527
+ });
528
+ }
529
+ x(ra, null), x(ia, null);
530
+ }
531
+ function da() {
532
+ k() && i(Ui) && Xi();
533
+ }
534
+ let fa = [
535
+ "trend",
536
+ "hray",
537
+ "fib",
538
+ "rect",
539
+ "arrow",
540
+ "text"
541
+ ], pa = T(() => ({
542
+ trend: i(P).toolTrend,
543
+ hray: i(P).toolRay,
544
+ fib: i(P).toolFib,
545
+ rect: i(P).toolRect,
546
+ arrow: i(P).toolArrow,
547
+ text: i(P).toolText
548
+ })), ma = T(() => oi() ? oi() === !0 ? fa : oi() : []), R = v(null), z = v(null), ha = v(null), ga = v(null), _a = v(null), va = v("");
549
+ function ya() {
550
+ let e = i(_a), t = i(va).trim();
551
+ x(_a, null), x(va, ""), !(!e || !t) && Ta([...Sa(), {
552
+ id: `d${Date.now().toString(36)}${xa++}`,
553
+ kind: "text",
554
+ points: [{
555
+ x: e.x,
556
+ y: e.y
557
+ }],
558
+ text: t
559
+ }]);
560
+ }
561
+ let ba = v(null), xa = 0, Sa = () => i(F).drawings ?? [];
562
+ function Ca(e) {
563
+ if (!i(U)) return null;
564
+ let t = i(H).axes?.x;
565
+ if (t?.type === "number") return i(U).xInvertValue(e);
566
+ if (t?.type === "time") return new Date(i(U).xInvertValue(e)).toISOString();
567
+ let n = Math.round(i(U).xInvert(e));
568
+ return i(V).categories[n] ?? null;
569
+ }
570
+ function wa(e) {
571
+ let t = oa(e);
572
+ if (!t || !i(U) || t.x < i(H).plot.x || t.x > i(H).plot.x + i(H).plot.w || t.y < i(H).plot.y || t.y > i(H).plot.y + i(H).plot.h) return null;
573
+ let n = Ca(t.x);
574
+ if (n == null) return null;
575
+ let r = i(U).yInvert(t.y);
576
+ return Number.isFinite(r) ? {
577
+ x: n,
578
+ y: Math.round(r * 1e3) / 1e3,
579
+ px: t.x,
580
+ py: t.y
581
+ } : null;
582
+ }
583
+ function Ta(e) {
584
+ d.onDrawingsChange?.(e);
585
+ }
586
+ function Ea(e) {
587
+ x(R, i(R) === e ? null : e, !0), x(z, null), x(ha, null), x(_a, null);
588
+ }
589
+ function Da(e) {
590
+ if (!i(R)) return;
591
+ let t = wa(e);
592
+ if (!t) return;
593
+ if (i(R) === "text") {
594
+ let n = i(ds)?.getBoundingClientRect();
595
+ x(va, ""), x(_a, {
596
+ x: t.x,
597
+ y: t.y,
598
+ left: n ? e.clientX - n.left : 0,
599
+ top: n ? e.clientY - n.top : 0
600
+ }, !0);
601
+ return;
602
+ }
603
+ if (i(R) === "hray") {
604
+ Ta([...Sa(), {
605
+ id: `d${Date.now().toString(36)}${xa++}`,
606
+ kind: i(R),
607
+ points: [{
608
+ x: t.x,
609
+ y: t.y
610
+ }]
611
+ }]);
612
+ return;
613
+ }
614
+ if (!i(z)) {
615
+ x(z, t, !0), x(ha, {
616
+ x: t.px,
617
+ y: t.py
618
+ }, !0);
619
+ return;
620
+ }
621
+ let n = i(z);
622
+ x(z, null), x(ha, null), Ta([...Sa(), {
623
+ id: `d${Date.now().toString(36)}${xa++}`,
624
+ kind: i(R),
625
+ points: [{
626
+ x: n.x,
627
+ y: n.y
628
+ }, {
629
+ x: t.x,
630
+ y: t.y
631
+ }]
632
+ }]);
633
+ }
634
+ function Oa(e) {
635
+ if (i(ba)) {
636
+ let t = wa(e);
637
+ if (!t) return;
638
+ let { id: n, index: r } = i(ba);
639
+ Ta(Sa().map((e) => e.id === n ? {
640
+ ...e,
641
+ points: e.points.map((e, n) => n === r ? {
642
+ x: t.x,
643
+ y: t.y
644
+ } : e)
645
+ } : e));
646
+ return;
647
+ }
648
+ if (i(z)) {
649
+ let t = oa(e);
650
+ t && x(ha, t, !0);
651
+ }
652
+ }
653
+ function ka(e) {
654
+ Ta(Sa().filter((t) => t.id !== e)), i(ga) === e && x(ga, null);
655
+ }
656
+ function Aa(e, t) {
657
+ (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), ka(t));
658
+ }
659
+ function ja(e) {
660
+ if (e.key === "Escape") {
661
+ if (i(ps)) {
662
+ Ma();
663
+ return;
664
+ }
665
+ i(R) && (i(z) ? (x(z, null), x(ha, null)) : x(R, null));
666
+ }
667
+ }
668
+ function Ma() {
669
+ x(ps, null), Z();
670
+ }
671
+ function Na(e) {
672
+ if (!(!Ne() || !i(Y))) {
673
+ if (i(ps) && i(ps).index === e) {
674
+ Ma();
675
+ return;
676
+ }
677
+ x(ps, {
678
+ index: e,
679
+ series: i(Y).ctx.series ?? null
680
+ }, !0);
681
+ }
682
+ }
683
+ m(() => {
684
+ if (!i(ps) || typeof document > "u") return;
685
+ let e = (e) => {
686
+ i(ds) && e.target instanceof Node && i(ds).contains(e.target) || Ma();
687
+ };
688
+ return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
689
+ });
690
+ let Pa = (e) => {
691
+ e.focus();
692
+ }, Fa = T(() => i(F).type === "candlestick" || i(F).type === "ohlc"), Ia = T(() => i(F).type === "ohlc"), La = T(() => Math.max(50, (i(Si) ?? i(F).width ?? 520) - 60)), Ra = /* @__PURE__ */ new Set([
693
+ "pie",
694
+ "heatmap",
695
+ "funnel",
696
+ "radar",
697
+ "calendar",
698
+ "gauge",
699
+ "treemap",
700
+ "sankey",
701
+ "sunburst",
702
+ "radial-bar",
703
+ "radial-column",
704
+ "nightingale",
705
+ "chord",
706
+ "bullet"
707
+ ]), za = /* @__PURE__ */ new Set([
708
+ "lollipop",
709
+ "dumbbell",
710
+ "range-area",
711
+ "range-bar",
712
+ "stream",
713
+ "pareto"
714
+ ]), Ba = T(() => ni() && !Ra.has(i(F).type)), Va = T(() => ({
715
+ ...i(F),
716
+ width: i(Si) ?? i(F).width,
717
+ height: ri(),
718
+ title: void 0,
719
+ subtitle: void 0,
720
+ caption: void 0,
721
+ yAxisTitle: void 0,
722
+ y2AxisTitle: void 0,
723
+ xAxisTitle: void 0,
724
+ xAxis: {
725
+ ...i(F).xAxis,
726
+ title: void 0,
727
+ labels: !1
728
+ },
729
+ yAxis: {
730
+ ...i(F).yAxis,
731
+ title: void 0,
732
+ labels: !1
733
+ },
734
+ y2Axis: {
735
+ ...i(F).y2Axis,
736
+ title: void 0,
737
+ labels: !1
738
+ },
739
+ referenceLines: void 0,
740
+ referenceBands: void 0,
741
+ annotations: void 0,
742
+ drawings: void 0,
743
+ seriesLabels: void 0,
744
+ dataLabels: { show: !1 },
745
+ type: i(Fa) || i(F).type === "boxplot" || za.has(i(F).type) ? "line" : i(F).type === "histogram" ? "bar" : i(F).type,
746
+ stackOffset: void 0,
747
+ series: i(Ri).filter((e) => !i(Hi).has(e.label)).map((e) => e.ohlc || e.boxes ? {
748
+ ...e,
749
+ ohlc: void 0,
750
+ boxes: void 0,
751
+ errors: void 0,
752
+ type: "line"
753
+ } : e.errors || e.type && za.has(e.type) || e.type === "scatter" ? {
754
+ ...e,
755
+ errors: void 0,
756
+ type: e.type && (za.has(e.type) || e.type === "scatter") ? "line" : e.type
757
+ } : e)
758
+ })), B = T(() => i(Ba) ? ke(be(i(Va), i(La))) : null), Ha = T(() => {
759
+ let e = i(F).categories.length;
760
+ return !A() || e === 0 ? {
761
+ t0: 0,
762
+ t1: 1
763
+ } : {
764
+ t0: A().i0 / e,
765
+ t1: (A().i1 + 1) / e
766
+ };
767
+ }), Ua = v(null);
768
+ function Wa(e, t) {
769
+ let n = t.getBoundingClientRect();
770
+ return i(B) ? (e.clientX - n.left) / n.width * i(B).width : 0;
771
+ }
772
+ function Ga(e, t) {
773
+ if (!i(B)) return;
774
+ let n = e.currentTarget, r = Wa(e, n.ownerSVGElement ?? n);
775
+ x(Ua, {
776
+ mode: t,
777
+ startX: r,
778
+ startT0: i(Ha).t0,
779
+ startT1: i(Ha).t1
780
+ }, !0), e.currentTarget.setPointerCapture?.(e.pointerId), e.stopPropagation();
781
+ }
782
+ function Ka(e) {
783
+ if (!i(Ua) || !i(B)) return;
784
+ let t = (Wa(e, e.currentTarget.ownerSVGElement ?? e.currentTarget) - i(Ua).startX) / i(B).plot.w, n = i(F).categories.length;
785
+ if (n === 0) return;
786
+ let r = i(Ua).startT0, a = i(Ua).startT1;
787
+ if (i(Ua).mode === "move") {
788
+ let e = a - r;
789
+ r = Math.max(0, Math.min(1 - e, r + t)), a = r + e;
790
+ } else i(Ua).mode === "left" ? r = Math.max(0, Math.min(a - 1 / n, r + t)) : a = Math.min(1, Math.max(r + 1 / n, a + t));
791
+ let o = Math.max(0, Math.floor(r * n)), s = Math.min(n - 1, Math.ceil(a * n) - 1);
792
+ o === 0 && s === n - 1 ? Wi(null) : Wi({
793
+ i0: o,
794
+ i1: Math.max(o, s),
795
+ ...A()?.y ? { y: A().y } : {}
796
+ });
797
+ }
798
+ function qa(e) {
799
+ x(Ua, null), e.currentTarget.releasePointerCapture?.(e.pointerId);
800
+ }
801
+ let Ja = T(() => i(F).tree ?? i(F).treemap ?? null), Ya = T(() => We() && !!i(Ja) && (i(F).type === "sunburst" || i(F).type === "treemap" || i(F).type === "pie")), Xa = T(() => i(Ya) && Ge().length ? me(i(Ja), Ge()) : i(Ja)), Za = (e) => e.value ?? (e.children ?? []).reduce((e, t) => e + Za(t), 0), Qa = T(() => i(F).type === "pie" && i(Ya) && i(Xa) ? i(Xa) : null), $a = T(() => i(Qa) ? (i(Qa).children ?? []).map((e) => e.name) : i(F).categories), eo = (e) => !!i(Qa) && !!i(Qa).children?.find((t) => t.name === e)?.children?.length;
802
+ function to(e) {
803
+ Ge(e);
804
+ }
805
+ function no(e) {
806
+ return !i(Ya) || !e || !i(Ja) || !me(i(Ja), e)?.children?.length ? !1 : (to(e), !0);
807
+ }
808
+ let V = T(() => {
809
+ if (i(Qa)) {
810
+ let e = i(Qa).children ?? [], t = i(F).series[0]?.label ?? i(Qa).name, n = e.map((e) => i(Hi).has(e.name) ? 0 : Za(e)), r = e.map((e) => e.color ?? null);
811
+ return {
812
+ ...i(F),
813
+ categories: i($a),
814
+ series: [{
815
+ label: t,
816
+ values: n,
817
+ ...r.some(Boolean) ? { colors: r } : {}
818
+ }]
819
+ };
820
+ }
821
+ if (i(Ya) && i(Xa) && Ge().length) {
822
+ let e = {
823
+ ...i(F),
824
+ tree: i(Xa),
825
+ treemap: i(Xa)
826
+ };
827
+ return i(F).type === "treemap" ? e : {
828
+ ...e,
829
+ series: i(Ri)
830
+ };
831
+ }
832
+ if (i(F).type === "pie" || i(yo)) {
833
+ let e = i(Ri)[0];
834
+ if (!e) return i(F);
835
+ let t = e.values.map((e, t) => i(Hi).has(i(F).categories[t] ?? String(t)) ? 0 : e);
836
+ return {
837
+ ...i(F),
838
+ series: [{
839
+ ...e,
840
+ values: t
841
+ }]
842
+ };
843
+ }
844
+ let e = i(Ri).filter((e) => !i(Hi).has(e.label)), t = A() ? Ce({
845
+ ...i(F),
846
+ series: e
847
+ }, A().i0, A().i1) : {
848
+ ...i(F),
849
+ series: e
850
+ };
851
+ if (A()?.y) {
852
+ let e = A().y.axis === "right" ? "y2Axis" : "yAxis";
853
+ t = {
854
+ ...t,
855
+ [e]: {
856
+ ...t[e] ?? {},
857
+ min: A().y.min,
858
+ max: A().y.max,
859
+ nice: !1
860
+ }
861
+ };
862
+ }
863
+ return be(t, i(La));
864
+ }), ro = v(!1), io = T(() => ke({
865
+ ...i(V),
866
+ palette: i(Ii),
867
+ ...i(Si) || i(Ci) ? {
868
+ width: i(Si),
869
+ height: i(Ci)
870
+ } : {},
871
+ ...d.dataLabels === void 0 ? {} : { dataLabels: i(wi) }
872
+ }, i(ro) ? "dark" : "light")), ao = T(() => Ue() ? Ue() === !0 ? {
873
+ duration: 400,
874
+ enter: "fade",
875
+ update: !0
876
+ } : {
877
+ duration: Ue().duration ?? 400,
878
+ enter: Ue().enter ?? "fade",
879
+ update: Ue().update ?? !0
880
+ } : null), oo = v(!1);
881
+ m(() => {
882
+ if (typeof matchMedia != "function") return;
883
+ let e = matchMedia("(prefers-reduced-motion: reduce)");
884
+ x(oo, e.matches, !0);
885
+ let t = () => x(oo, e.matches, !0);
886
+ return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
887
+ });
888
+ let so = v(null), H = T(() => i(so) && i(so).t < 1 ? He(i(so).from, i(io), i(so).t) : i(io)), co = null, lo = 0;
889
+ m(() => {
890
+ let e = i(io);
891
+ oe(() => {
892
+ let t = co;
893
+ if (co = e, !t || !i(ao)?.update || i(oo) || i(ao).duration <= 0 || Xe() || e.bars.length + e.arcs.length > 600 || e.lines.some((e) => e.points.length > 600) || t.type !== e.type) return;
894
+ let n = i(so) && i(so).t < 1 ? He(i(so).from, t, i(so).t) : t;
895
+ cancelAnimationFrame(lo);
896
+ let r = performance.now(), a = i(ao).duration;
897
+ x(so, {
898
+ from: n,
899
+ t: 0
900
+ }, !0);
901
+ let o = (e) => {
902
+ let t = Math.min(1, (e - r) / a), i = 1 - (1 - t) ** 3;
903
+ x(so, t >= 1 ? null : {
904
+ from: n,
905
+ t: i
906
+ }, !0), t < 1 && (lo = requestAnimationFrame(o));
907
+ };
908
+ lo = requestAnimationFrame(o);
909
+ });
910
+ });
911
+ let uo = T(() => i(oo) || Xe() ? "none" : i(ao)?.enter ?? "fade"), fo = T(() => i(H).lines.flatMap((e, t) => e.style?.gradient ? [{
912
+ id: `${Li}-grad-${t}`,
913
+ ...e.style.gradient
914
+ }] : [])), po = T(() => i(F).yAxis?.title ?? i(F).yAxisTitle), mo = T(() => i(F).y2Axis?.title ?? i(F).y2AxisTitle), ho = T(() => i(F).xAxis?.title ?? i(F).xAxisTitle), U = T(() => Se(i(H))), go = T(() => ({
915
+ geo: i(H),
916
+ scales: i(U),
917
+ xOf: i(U)?.xOf ?? null,
918
+ yOf: i(U)?.yOf ?? null
919
+ })), W = T(() => !Ra.has(i(F).type)), _o = T(() => i(F).type === "sunburst" || i(F).type === "radial-bar" || i(F).type === "radial-column" || i(F).type === "nightingale" || i(F).type === "chord"), vo = T(() => i(F).type === "bullet"), yo = T(() => (i(F).type === "radial-bar" || i(F).type === "radial-column" || i(F).type === "nightingale") && i(F).series.length === 1), bo = T(() => i(F).type === "scatter"), xo = T(() => i(F).type === "heatmap"), So = T(() => i(F).type === "funnel"), Co = T(() => i(F).type === "radar"), wo = T(() => i(F).type === "calendar"), To = T(() => i(F).type === "gauge"), Eo = T(() => i(F).type === "treemap"), Do = T(() => i(F).type === "sankey"), G = T(() => i(H).orientation === "horizontal"), Oo = T(() => (i(G) ? i(H).plot.h : i(H).plot.w) / Math.max(1, i(V).categories.length)), ko = T(() => i(W) && !i(bo) && !i(G) && i(Oo) < 4 && i(V).categories.length > 1), Ao = T(() => A() ? A().i1 - A().i0 + 1 : i(F).categories.length), jo = T(() => i(wi).show && i(W) && !i(bo) ? he(i(H), i(wi), (e, t) => ji(t)(e), {
920
+ stacked: !!(i(F).stacked || i(F).stacked100),
921
+ dense: i(ko),
922
+ share: !!i(F).stacked100
923
+ }) : []), Mo = 1e3;
924
+ function No(e, t, n) {
925
+ let r = n.ownerSVGElement ?? n;
926
+ if (!r || typeof r.getBoundingClientRect != "function") return null;
927
+ let i = r.getBoundingClientRect();
928
+ if (!i.width || !i.height) return null;
929
+ let a = r.viewBox?.baseVal, o = a && a.width ? a.width / i.width : 1, s = a && a.height ? a.height / i.height : 1;
930
+ return {
931
+ x: (e - i.left) * o + (a ? a.x : 0),
932
+ y: (t - i.top) * s + (a ? a.y : 0)
933
+ };
934
+ }
935
+ function Po(e, t) {
936
+ let n = No(e, 0, t);
937
+ if (!n) return null;
938
+ let r = n.x, a = i(H).lines[0]?.points, o = i(V).categories.length;
939
+ if (!a || a.length !== o) {
940
+ let e = Math.floor((r - i(H).plot.x) / i(Oo));
941
+ return e >= 0 && e < o ? e : null;
942
+ }
943
+ let s = 0, c = a.length - 1;
944
+ for (; s < c;) {
945
+ let e = s + c >> 1;
946
+ a[e].x < r ? s = e + 1 : c = e;
947
+ }
948
+ return s > 0 && Math.abs(a[s - 1].x - r) <= Math.abs(a[s].x - r) && --s, s;
949
+ }
950
+ let Fo = v(0);
951
+ function Io(e) {
952
+ if (Ys(e, i(Fo)) || Hs(e, i(Fo))) return;
953
+ let t = i(V).categories.length - 1, n = Math.max(1, Math.floor(t / 10)), r = i(Fo);
954
+ switch (e.key) {
955
+ case "ArrowRight":
956
+ case "ArrowDown":
957
+ r = Math.min(t, i(Fo) + 1);
958
+ break;
959
+ case "ArrowLeft":
960
+ case "ArrowUp":
961
+ r = Math.max(0, i(Fo) - 1);
962
+ break;
963
+ case "Home":
964
+ r = 0;
965
+ break;
966
+ case "End":
967
+ r = t;
968
+ break;
969
+ case "PageDown":
970
+ r = Math.min(t, i(Fo) + n);
971
+ break;
972
+ case "PageUp":
973
+ r = Math.max(0, i(Fo) - n);
974
+ break;
975
+ case "Enter":
976
+ case " ":
977
+ e.preventDefault(), Ps(e, i(Fo));
978
+ return;
979
+ default: return;
980
+ }
981
+ e.preventDefault(), x(Fo, r, !0), ws(e.currentTarget, r);
982
+ }
983
+ let Lo = v(null), Ro = T(() => i(Fi) ?? (Ze() ? i(Lo) : null)), K = (e) => i(Ro) && i(Ro) !== e ? .18 : 1, zo = null;
984
+ function Bo(e) {
985
+ d.onHover && (e === zo || e !== null && zo !== null && e.category === zo.category && e.index === zo.index && e.series === zo.series && e.value === zo.value || (zo = e, d.onHover(e)));
986
+ }
987
+ let q = T(() => Ke() === "multi" ? "multi" : Ke() ? "single" : null), Vo = (e, t, n, r) => e.category === t && e.series === n && (e.index === void 0 || r === void 0 || e.index === r), Ho = (e, t, n) => qe().some((r) => Vo(r, e, t, n)), Uo = (e, t, n) => i(q) && qe().length && !Ho(e, t, n) ? .35 : 1;
988
+ function Wo(e, t, n, r) {
989
+ if (!i(q)) return;
990
+ let a = r === void 0 ? {
991
+ category: e,
992
+ series: t
993
+ } : {
994
+ category: e,
995
+ series: t,
996
+ index: r
997
+ }, o = i(q) === "multi" || !!(n && (n.ctrlKey || n.metaKey || n.shiftKey)), s;
998
+ s = Ho(e, t, r) ? o ? qe().filter((n) => !Vo(n, e, t, r)) : [] : o ? [...qe(), a] : [a], qe(s), d.onSelectionChange?.(s);
999
+ }
1000
+ let J = v(null), Go = v(""), Ko = T(() => i(F).type === "heatmap" || i(F).type === "calendar" || i(F).type === "gauge" ? [] : i(F).type === "pie" || i(yo) ? i($a).map((e, t) => ({
1001
+ label: e,
1002
+ color: i(F).categoryColors?.[e] ?? i(V).series[0]?.colors?.[t] ?? i(Ii)[t % i(Ii).length],
1003
+ off: i(Mi).has(e)
1004
+ })) : i(F).type === "sunburst" || i(F).type === "chord" ? i(H).legend.map((e) => ({
1005
+ label: e.label,
1006
+ color: e.color,
1007
+ off: !1
1008
+ })) : i(Ri).map((e) => ({
1009
+ label: e.label,
1010
+ color: e.color,
1011
+ off: i(Mi).has(e.label)
1012
+ }))), qo = T(() => j() ? j() === !0 ? [
1013
+ "1W",
1014
+ "1M",
1015
+ "3M",
1016
+ "6M",
1017
+ "YTD",
1018
+ "1Y",
1019
+ "All"
1020
+ ] : j() : []), Jo = T(() => i(qo).length > 0 && i(W) && (i(F).xType === "time" || i(F).xType === "ordinal-time" || i(F).xAxis?.type === "time" || i(F).xAxis?.type === "ordinal-time")), Yo = (e) => typeof e == "string" ? e : e.label;
1021
+ function Xo(e) {
1022
+ Wi(Le(i(F).categories, e));
1023
+ }
1024
+ let Zo = T(() => i(F).type !== "sunburst" && i(F).type !== "chord"), Qo = v(!1), $o = T(() => i(Ko).length > 10), es = T(() => i($o) && !i(Qo) ? i(Ko).slice(0, 10) : i(Ko)), ts = T(() => i(F).type === "pie" ? i(H).slices.every((e) => e.value <= 0) : i(F).type === "scatter" ? i(H).scatterPoints.length === 0 : i(F).type === "heatmap" ? i(H).heatmapCells.length === 0 : i(F).type === "funnel" ? i(H).funnelSegments.length === 0 : i(F).type === "radar" ? i(H).radarSeries.length === 0 : i(F).type === "calendar" ? i(H).calendarCells.length === 0 : i(F).type === "gauge" ? !i(H).gauge : i(F).type === "treemap" ? i(H).treemapCells.length === 0 : i(F).type === "sankey" ? i(H).sankeyNodes.length === 0 : i(Fa) ? i(H).candles.length === 0 : i(F).type === "boxplot" ? i(H).boxes.length === 0 : i(_o) ? i(H).arcs.length === 0 : i(vo) ? i(H).bullets.length === 0 : i(H).bars.length === 0 && i(H).stems.length === 0 && i(H).lines.every((e) => e.points.every((e) => !e.defined))), ns = null;
1025
+ function rs(e) {
1026
+ if (!fe() || !i(Zo)) return;
1027
+ if (i(Ni) != null) {
1028
+ ns = {
1029
+ label: i(Ni),
1030
+ at: Date.now()
1031
+ }, x(Ni, null);
1032
+ return;
1033
+ }
1034
+ let t = new Set(i(Mi));
1035
+ t.has(e) ? t.delete(e) : t.add(e), x(Mi, t, !0);
1036
+ }
1037
+ function is(e) {
1038
+ if (!fe() || !i(Zo)) return;
1039
+ let t = ns;
1040
+ ns = null;
1041
+ let n = new Set(i(Mi));
1042
+ if (n.delete(e), t && t.label === e && Date.now() - t.at < 600) {
1043
+ x(Mi, n, !0);
1044
+ return;
1045
+ }
1046
+ x(Mi, n, !0), x(Ni, i(Ni) === e ? null : e, !0);
1047
+ }
1048
+ let as = (e, t) => Number.isFinite(e) ? ji(t)(e) : "", os = T(() => {
1049
+ if (i(F).type === "pie") {
1050
+ let e = i(Qa) ? i(V).series[0] : i(Ri)[0];
1051
+ return {
1052
+ cols: ["Category", "Value"],
1053
+ rows: i($a).map((t, n) => [t, as(e?.values[n])])
1054
+ };
1055
+ }
1056
+ if (i(bo)) {
1057
+ let e = [];
1058
+ for (let t of i(Ri)) for (let n of t.points ?? []) e.push([
1059
+ t.label,
1060
+ I(n.x),
1061
+ I(n.y),
1062
+ n.r == null ? "" : I(n.r)
1063
+ ]);
1064
+ return {
1065
+ cols: [
1066
+ "Series",
1067
+ "X",
1068
+ "Y",
1069
+ "Size"
1070
+ ],
1071
+ rows: e
1072
+ };
1073
+ }
1074
+ if (i(_o)) return {
1075
+ cols: [
1076
+ i(F).type === "chord" ? "Group" : "Category",
1077
+ "Series",
1078
+ "Value"
1079
+ ],
1080
+ rows: i(H).arcs.map((e) => [
1081
+ e.nodePath ? e.nodePath.join(" / ") : e.label,
1082
+ e.series,
1083
+ I(e.value)
1084
+ ])
1085
+ };
1086
+ if (i(vo)) return {
1087
+ cols: [
1088
+ "Category",
1089
+ "Value",
1090
+ "Target"
1091
+ ],
1092
+ rows: i(H).bullets.map((e) => [
1093
+ e.label,
1094
+ I(e.value),
1095
+ e.target == null ? "" : I(e.target)
1096
+ ])
1097
+ };
1098
+ if (i(Fa)) {
1099
+ let e = [];
1100
+ for (let t of i(Ri)) (t.ohlc ?? []).forEach((n, r) => {
1101
+ n && e.push([
1102
+ i(F).categories[r] ?? String(r),
1103
+ t.label,
1104
+ I(n.o),
1105
+ I(n.h),
1106
+ I(n.l),
1107
+ I(n.c)
1108
+ ]);
1109
+ });
1110
+ return {
1111
+ cols: [
1112
+ "Date",
1113
+ "Series",
1114
+ "Open",
1115
+ "High",
1116
+ "Low",
1117
+ "Close"
1118
+ ],
1119
+ rows: e
1120
+ };
1121
+ }
1122
+ if (i(F).type === "waterfall") {
1123
+ let e = i(Ri)[0];
1124
+ return {
1125
+ cols: ["Category", e?.label ?? "Value"],
1126
+ rows: i(F).categories.map((t, n) => {
1127
+ let r = i(H).bars.find((e) => e.index === n);
1128
+ return [t, r ? I(r.value) : as(e?.values[n])];
1129
+ })
1130
+ };
1131
+ }
1132
+ return {
1133
+ cols: ["Category", ...i(Ri).map((e) => e.label)],
1134
+ rows: i(F).categories.map((e, t) => [e, ...i(Ri).map((e) => as(e.values[t], e.label))])
1135
+ };
1136
+ }), ss = T(() => i(os).rows.length > Mo), cs = T(() => i(ss) ? i(os).rows.slice(0, Mo) : i(os).rows);
1137
+ function ls(e, t = 12) {
1138
+ return e.length > t ? e.slice(0, t - 1) + "…" : e;
1139
+ }
1140
+ let us = (e, t) => d.formatValue ? d.formatValue(e) : t, ds = v(null);
1141
+ function fs(e) {
1142
+ if (!e) return !1;
1143
+ let t = 0, n = 0, r = 0, i = e.trim().startsWith("#") ? e.trim().slice(1) : "";
1144
+ if (i.length === 6) t = parseInt(i.slice(0, 2), 16), n = parseInt(i.slice(2, 4), 16), r = parseInt(i.slice(4, 6), 16);
1145
+ else {
1146
+ let i = /rgba?\(([^)]+)\)/.exec(e);
1147
+ if (!i) return !1;
1148
+ let a = i[1].split(",").map((e) => parseFloat(e));
1149
+ t = a[0] ?? 0, n = a[1] ?? 0, r = a[2] ?? 0;
1150
+ }
1151
+ return .299 * t + .587 * n + .114 * r < 128;
1152
+ }
1153
+ m(() => {
1154
+ if (!i(ds) || typeof window > "u") return;
1155
+ let e = i(ds), t = () => {
1156
+ let t = getComputedStyle(e);
1157
+ x(ro, fs(t.getPropertyValue("--sg-bg")), !0);
1158
+ let n = [];
1159
+ for (let e = 1; e <= 8; e += 1) {
1160
+ let r = t.getPropertyValue(`--sg-chart-${e}`).trim();
1161
+ n.push(r || De[e - 1]);
1162
+ }
1163
+ (!i(Pi) || n.some((e, t) => e !== i(Pi)[t])) && x(Pi, n.some((e, t) => e !== De[t]) ? n : null, !0);
1164
+ };
1165
+ t();
1166
+ let n = new MutationObserver(t);
1167
+ return n.observe(document.documentElement, {
1168
+ attributes: !0,
1169
+ attributeFilter: [
1170
+ "data-theme",
1171
+ "class",
1172
+ "style"
1173
+ ]
1174
+ }), () => n.disconnect();
1175
+ });
1176
+ let Y = v(null), ps = v(null), ms = v(null);
1177
+ function X(e, t, n, r, a) {
1178
+ if (!fe() || !i(ds) || r.length === 0 || i(ps) && i(Y)) return;
1179
+ let o = i(ds).getBoundingClientRect(), s = {
1180
+ category: n,
1181
+ index: -1,
1182
+ rows: r,
1183
+ ...a
1184
+ }, c = d.tooltipFormat?.(s), l = ye() !== "follow", u, f;
1185
+ if (l && i(L)) {
1186
+ let e = i(L).getBoundingClientRect(), t = e.width / (i(H).width || 1), n = e.height / (i(H).height || 1), r = ye() === "top-right" || ye() === "bottom-right", a = ye() === "bottom-left" || ye() === "bottom-right";
1187
+ u = e.left - o.left + (r ? (i(H).plot.x + i(H).plot.w) * t - 8 : i(H).plot.x * t + 8), f = e.top - o.top + (a ? (i(H).plot.y + i(H).plot.h) * n - 8 : i(H).plot.y * n + 8);
1188
+ } else u = Math.max(70, Math.min(o.width - 70, e - o.left)), f = t - o.top;
1189
+ x(Y, {
1190
+ left: u,
1191
+ top: f,
1192
+ below: !l && f < 44,
1193
+ fixed: l,
1194
+ title: c?.title ?? n,
1195
+ rows: c?.rows ?? r,
1196
+ ctx: s
1197
+ }, !0), Bo({
1198
+ category: s.category,
1199
+ index: s.index,
1200
+ series: s.series ?? null,
1201
+ value: s.value ?? null
1202
+ });
1203
+ }
1204
+ function hs(e, t) {
1205
+ let n = null, r = Infinity;
1206
+ for (let a of i(H).lines) {
1207
+ let i = a.points[e];
1208
+ if (!i?.defined) continue;
1209
+ let o = Math.abs(i.y - t);
1210
+ o < r && (r = o, n = a.label);
1211
+ }
1212
+ for (let a of i(H).bars) {
1213
+ if (a.label !== i(V).categories[e]) continue;
1214
+ let o = t < a.y ? a.y - t : t > a.y + a.h ? t - (a.y + a.h) : 0;
1215
+ o < r && (r = o, n = a.series);
1216
+ }
1217
+ for (let a of i(H).candles) {
1218
+ if (a.label !== i(V).categories[e]) continue;
1219
+ let o = t < a.yHigh ? a.yHigh - t : t > a.yLow ? t - a.yLow : 0;
1220
+ o < r && (r = o, n = a.series);
1221
+ }
1222
+ return n === null ? null : {
1223
+ label: n,
1224
+ distance: r
1225
+ };
1226
+ }
1227
+ function gs(e) {
1228
+ let t = [];
1229
+ if (i(F).type === "waterfall") {
1230
+ let n = i(H).bars.find((t) => t.index === e), r = i(V).series[0];
1231
+ return n && r && t.push({
1232
+ label: r.label,
1233
+ color: n.color,
1234
+ value: I(n.value)
1235
+ }), t;
1236
+ }
1237
+ for (let n of i(V).series) {
1238
+ let r = n.color, i = n.ohlc?.[e];
1239
+ if (i) {
1240
+ t.push({
1241
+ label: `${n.label} O`,
1242
+ color: r,
1243
+ value: I(i.o)
1244
+ }), t.push({
1245
+ label: `${n.label} H`,
1246
+ value: I(i.h)
1247
+ }), t.push({
1248
+ label: `${n.label} L`,
1249
+ value: I(i.l)
1250
+ }), t.push({
1251
+ label: `${n.label} C`,
1252
+ value: I(i.c)
1253
+ });
1254
+ continue;
1255
+ }
1256
+ let a = n.boxes?.[e];
1257
+ if (a) {
1258
+ t.push({
1259
+ label: `${n.label} max`,
1260
+ color: r,
1261
+ value: I(a.max)
1262
+ }), t.push({
1263
+ label: `${n.label} Q3`,
1264
+ value: I(a.q3)
1265
+ }), t.push({
1266
+ label: `${n.label} median`,
1267
+ value: I(a.median)
1268
+ }), t.push({
1269
+ label: `${n.label} Q1`,
1270
+ value: I(a.q1)
1271
+ }), t.push({
1272
+ label: `${n.label} min`,
1273
+ value: I(a.min)
1274
+ }), a.outliers?.length && t.push({
1275
+ label: `${n.label} outliers`,
1276
+ value: String(a.outliers.length)
1277
+ });
1278
+ continue;
1279
+ }
1280
+ let o = n.values[e], s = ji(n.label), c = n.lowValues?.[e];
1281
+ if (Number.isFinite(o) && Number.isFinite(c)) {
1282
+ t.push({
1283
+ label: n.label,
1284
+ color: r,
1285
+ value: `${s(c)} to ${s(o)}`
1286
+ });
1287
+ continue;
1288
+ }
1289
+ let l = n.targets?.[e];
1290
+ if (Number.isFinite(o) && Number.isFinite(l)) {
1291
+ t.push({
1292
+ label: n.label,
1293
+ color: r,
1294
+ value: s(o)
1295
+ }), t.push({
1296
+ label: `${n.label} target`,
1297
+ value: s(l)
1298
+ });
1299
+ continue;
1300
+ }
1301
+ if (Number.isFinite(o)) {
1302
+ t.push({
1303
+ label: n.label,
1304
+ color: r,
1305
+ value: s(o)
1306
+ });
1307
+ let i = n.errors?.[e];
1308
+ if (i != null) {
1309
+ let e = typeof i == "number" ? o - Math.abs(i) : Math.min(i.lo, i.hi), r = typeof i == "number" ? o + Math.abs(i) : Math.max(i.lo, i.hi);
1310
+ Number.isFinite(e) && Number.isFinite(r) && t.push({
1311
+ label: `${n.label} range`,
1312
+ value: `${s(e)} - ${s(r)}`
1313
+ });
1314
+ }
1315
+ }
1316
+ }
1317
+ for (let n of i(H).overlays) {
1318
+ let r = n.points[e];
1319
+ if (!r?.defined) continue;
1320
+ let a = i(V).series.find((e) => e.overlay && n.label === `${e.label} (${e.overlay})`);
1321
+ if (!a?.overlay) continue;
1322
+ let o = n.r2 === void 0 ? "" : ` (${N(i(P).rSquared, { value: n.r2.toFixed(2) })})`;
1323
+ t.push({
1324
+ label: `${a.label} ${_e(a.overlay)}`,
1325
+ color: n.color,
1326
+ value: `${ji(a.label)(r.value)}${o}`
1327
+ });
1328
+ }
1329
+ return t;
1330
+ }
1331
+ let _s = v(null);
1332
+ function vs(e) {
1333
+ let t = i(H).axes?.y, n = t ? Math.abs(t.max - t.min) : 100, r = n >= 100 ? 0 : n >= 10 ? 1 : n >= 1 ? 2 : 3, a = Number(e.toFixed(r)), o = i(F).yAxis;
1334
+ return o?.formatter ? o.formatter(a, -1) : o?.format ? pe(a, o.format, i(F)) : us(a, I(a));
1335
+ }
1336
+ let ys = T(() => i(F).xType === "time" || i(F).xType === "ordinal-time" || i(F).xAxis?.type === "time" || i(F).xAxis?.type === "ordinal-time"), bs = T(() => i(ys) ? Te(i(V).categories.map((e) => Date.parse(e))) : "day"), xs = (e) => {
1337
+ let t = Date.parse(e);
1338
+ return Number.isFinite(t) ? we(t) : e;
1339
+ };
1340
+ function Ss(e) {
1341
+ let t = i(V).categories[e] ?? "";
1342
+ if (!i(ys)) return t;
1343
+ let n = Date.parse(t);
1344
+ return Number.isFinite(n) ? i(F).xAxis?.formatter ? i(F).xAxis.formatter(n, e) : we(n, i(bs)) : t;
1345
+ }
1346
+ function Cs(e, t, n, r) {
1347
+ x(ms, n, !0);
1348
+ let a = oa({
1349
+ clientX: e,
1350
+ clientY: t
1351
+ })?.y;
1352
+ x(_s, a != null && Number.isFinite(a) && a >= i(H).plot.y && a <= i(H).plot.y + i(H).plot.h ? a : null, !0);
1353
+ let o = i(V).categories[n] ?? "", s = gs(n), c, l, u = i(J) && i(V).series.some((e) => e.label === i(J)) ? i(J) : null;
1354
+ if (u) c = u, l = i(V).series.find((e) => e.label === u)?.values[n], s = s.filter((e) => e.label === u || e.label?.startsWith(u + " "));
1355
+ else {
1356
+ let a = r ? No(e, t, r) : oa({
1357
+ clientX: e,
1358
+ clientY: t
1359
+ }), o = a && Number.isFinite(a.y) ? hs(n, a.y) : null;
1360
+ x(Lo, o && o.distance <= 18 ? o.label : null, !0), ge() === "single" && o && r && (c = o.label, l = i(V).series.find((e) => e.label === o.label)?.values[n], s = s.filter((e) => e.label === o.label || e.label?.startsWith(o.label + " ")));
1361
+ }
1362
+ if (X(e, t, Ss(n), s, {
1363
+ category: o,
1364
+ index: n,
1365
+ series: c,
1366
+ value: l
1367
+ }), d.syncGroup && !i(Ji)) {
1368
+ let e = Date.parse(o);
1369
+ Be(d.syncGroup, {
1370
+ label: o,
1371
+ index: (A() ? A().i0 : 0) + n,
1372
+ time: Number.isFinite(e) ? e : null,
1373
+ from: Gi
1374
+ });
1375
+ }
1376
+ }
1377
+ function ws(e, t) {
1378
+ let n = e.getBoundingClientRect();
1379
+ if (Cs(n.left + n.width / 2, n.top + 12, t), !Je()) return;
1380
+ let r = Ss(t);
1381
+ if (i(J)) {
1382
+ let e = i(V).series.find((e) => e.label === i(J))?.values[t];
1383
+ x(Go, N(i(P).seriesAtCategory, {
1384
+ series: i(J),
1385
+ value: Number.isFinite(e) ? ji(i(J))(e) : i(P).noValue,
1386
+ category: r
1387
+ }), !0);
1388
+ } else x(Go, `${r}: ${gs(t).map((e) => `${e.label ?? ""} ${e.value}`).join(", ")}`);
1389
+ }
1390
+ function Z() {
1391
+ i(ps) || (x(ms, null), x(_s, null), x(Lo, null), x(Y, null), Bo(null), d.syncGroup && !i(Ji) && i(qi)?.hover?.from === Gi && Be(d.syncGroup, null));
1392
+ }
1393
+ m(() => {
1394
+ if (!i(qi)) return;
1395
+ let e = i(qi).hover;
1396
+ oe(() => {
1397
+ if (!e) {
1398
+ i(Ji) && (x(Ji, !1), x(ms, null), x(Y, null));
1399
+ return;
1400
+ }
1401
+ if (e.from === Gi) return;
1402
+ let t = i(V).categories.indexOf(e.label);
1403
+ if (t < 0 && e.time != null && (t = Re(i(V).categories, e.time)), t < 0 || !i(L) || !i(U)) return;
1404
+ x(Ji, !0);
1405
+ let n = i(L).getBoundingClientRect(), r = n.width / i(H).width, a = n.height / i(H).height, o = i(U).xOf(t);
1406
+ Cs(n.left + o * r, n.top + (i(H).plot.y + 12) * a, t), x(Ji, !0);
1407
+ });
1408
+ }), m(() => {
1409
+ if (!i(qi)) return;
1410
+ let e = i(qi).zoom;
1411
+ oe(() => {
1412
+ if (!e || e.from === Gi) return;
1413
+ let t = i(F).categories.length, n = e.window;
1414
+ if (n && e.count !== t) {
1415
+ if (!e.labels) return;
1416
+ let r = Re(i(F).categories, Date.parse(e.labels[0])), a = Re(i(F).categories, Date.parse(e.labels[1]));
1417
+ if (r < 0 || a < 0) return;
1418
+ n = r === 0 && a === t - 1 ? null : {
1419
+ i0: Math.min(r, a),
1420
+ i1: Math.max(r, a)
1421
+ };
1422
+ }
1423
+ Ki = !0;
1424
+ try {
1425
+ Wi(n);
1426
+ } finally {
1427
+ Ki = !1;
1428
+ }
1429
+ });
1430
+ });
1431
+ function Ts(e, t, n, r, i) {
1432
+ X(e, t, n, [{ value: `${I(r)} · ${i.toFixed(1)}%` }], {
1433
+ series: n,
1434
+ value: r
1435
+ });
1436
+ }
1437
+ function Es(e, t, n) {
1438
+ x(Lo, n.series, !0);
1439
+ let r = [{
1440
+ label: "x",
1441
+ value: I(n.x)
1442
+ }, {
1443
+ label: "y",
1444
+ value: I(n.y)
1445
+ }], a = i(V).series.find((e) => e.label === n.series && e.overlay), o = a?.overlay ? i(H).overlays.find((e) => e.label === `${a.label} (${a.overlay})`) : void 0;
1446
+ if (a?.overlay && o) {
1447
+ let e = o.r2 === void 0 ? "" : ` (${N(i(P).rSquared, { value: o.r2.toFixed(2) })})`;
1448
+ r.push({
1449
+ label: _e(a.overlay),
1450
+ color: o.color,
1451
+ value: `${o.equation ?? ""}${e}`
1452
+ });
1453
+ }
1454
+ X(e, t, n.label || n.series, r, {
1455
+ series: n.series,
1456
+ value: n.y
1457
+ });
1458
+ }
1459
+ function Ds(e, t, n) {
1460
+ X(e, t, `${n.rowLabel} · ${n.colLabel}`, [{
1461
+ color: n.color,
1462
+ value: I(n.value)
1463
+ }]);
1464
+ }
1465
+ function Os(e, t, n) {
1466
+ let r = [{ value: I(n.value) }, {
1467
+ label: "conversion",
1468
+ value: `${(n.conversion * 100).toFixed(1)}%`
1469
+ }];
1470
+ n.dropoff > 0 && r.push({
1471
+ label: "drop-off",
1472
+ value: `${(n.dropoff * 100).toFixed(1)}%`
1473
+ }), X(e, t, n.label, r, { value: n.value });
1474
+ }
1475
+ function ks(e, t, n) {
1476
+ x(Lo, i(yo) || i(F).type === "sunburst" || i(F).type === "chord" ? n.label : n.series, !0), X(e, t, n.series ? `${n.label} \u00b7 ${n.series}` : n.label, [{
1477
+ color: n.color,
1478
+ value: I(n.value)
1479
+ }], {
1480
+ category: n.label,
1481
+ series: n.series || void 0,
1482
+ value: n.value
1483
+ });
1484
+ }
1485
+ function As(e, t, n) {
1486
+ X(e, t, `${n.source} \u2192 ${n.target}`, [{
1487
+ color: n.color,
1488
+ value: I(n.value)
1489
+ }], {
1490
+ category: n.source,
1491
+ series: n.target,
1492
+ value: n.value
1493
+ });
1494
+ }
1495
+ function js(e, t, n) {
1496
+ x(Lo, n.series, !0);
1497
+ let r = [{
1498
+ color: n.color,
1499
+ label: n.series,
1500
+ value: I(n.value)
1501
+ }];
1502
+ n.target != null && r.push({
1503
+ label: "target",
1504
+ value: I(n.target)
1505
+ }), X(e, t, n.label, r, {
1506
+ category: n.label,
1507
+ series: n.series,
1508
+ value: n.value
1509
+ });
1510
+ }
1511
+ function Ms(e, t, n) {
1512
+ x(Lo, n.series, !0);
1513
+ let r = [{
1514
+ color: n.color,
1515
+ label: n.series,
1516
+ value: n.dumbbell && n.value2 != null ? `${I(n.value2)} to ${I(n.value)}` : I(n.value)
1517
+ }];
1518
+ X(e, t, n.label, r, {
1519
+ category: n.label,
1520
+ series: n.series,
1521
+ value: n.value
1522
+ });
1523
+ }
1524
+ function Ns(e, t, n, r, i, a) {
1525
+ x(Lo, n, !0), X(e, t, `${n} · ${r}`, [{
1526
+ color: a,
1527
+ value: I(i)
1528
+ }], {
1529
+ category: r,
1530
+ series: n,
1531
+ value: i
1532
+ });
1533
+ }
1534
+ function Ps(e, t) {
1535
+ if (i(R)) return;
1536
+ Ne() && "clientX" in e && !i(Oi) && (i(ps) && i(ps).index === t ? Ma() : (x(ps, null), Cs(e.clientX, e.clientY, t, e.currentTarget), Na(t)));
1537
+ let n = i(V).categories[t] ?? "";
1538
+ if (!i(q)) {
1539
+ Q(n, "", 0, t, e);
1540
+ return;
1541
+ }
1542
+ let r = "clientX" in e ? oa(e) : null, a = r ? hs(t, r.y) : null, o = i(J) ?? a?.label ?? (i(V).series.length === 1 ? i(V).series[0].label : "");
1543
+ Q(n, o, i(V).series.find((e) => e.label === o)?.values[t] ?? 0, t, e);
1544
+ }
1545
+ function Q(e, t, n, r, a) {
1546
+ if (Wo(e, t, a, r), i(Oi) && d.onAnnotate && r !== void 0) {
1547
+ let a = t ? n : i(V).series[0]?.values[r];
1548
+ d.onAnnotate({
1549
+ category: e,
1550
+ index: r,
1551
+ value: Number.isFinite(a) ? a : 0
1552
+ });
1553
+ return;
1554
+ }
1555
+ let o;
1556
+ if (r !== void 0) {
1557
+ let e = [];
1558
+ for (let n of i(V).series) {
1559
+ if (!n.rowIds || t && n.label !== t) continue;
1560
+ let i = n.rowIds[r];
1561
+ i?.length && e.push(i);
1562
+ }
1563
+ e.length && (o = e.flat());
1564
+ }
1565
+ let s = {
1566
+ category: e,
1567
+ series: t,
1568
+ value: n,
1569
+ rowIds: o
1570
+ };
1571
+ d.onSelect?.(s), o && o.length && d.onDrill?.(s);
1572
+ }
1573
+ function Fs(e, t) {
1574
+ let n = e.ownerSVGElement ?? e.closest("svg");
1575
+ if (!n) return;
1576
+ let r = n.querySelector(`[data-cat-index="${t}"]`);
1577
+ r && (r.focus?.(), ws(r, t));
1578
+ }
1579
+ function Is(e, t) {
1580
+ if (Ys(e, t)) return;
1581
+ let n = i(V).categories.length - 1, r = e.currentTarget;
1582
+ if (Hs(e, t)) return;
1583
+ let a = i(G) ? "ArrowDown" : "ArrowRight", o = i(G) ? "ArrowUp" : "ArrowLeft", s = i(G) ? "ArrowRight" : "ArrowUp", c = i(G) ? "ArrowLeft" : "ArrowDown";
1584
+ switch (e.key) {
1585
+ case a:
1586
+ e.preventDefault(), Fs(r, Math.min(n, t + 1));
1587
+ return;
1588
+ case o:
1589
+ e.preventDefault(), Fs(r, Math.max(0, t - 1));
1590
+ return;
1591
+ case s:
1592
+ case c: {
1593
+ e.preventDefault();
1594
+ let n = i(V).series.map((e) => e.label);
1595
+ if (!n.length) return;
1596
+ let a = (i(J) ? n.indexOf(i(J)) : -1) + (e.key === c ? 1 : -1);
1597
+ x(J, a < 0 || a >= n.length ? null : n[a], !0), x(Fi, i(J), !0), ws(r, t);
1598
+ return;
1599
+ }
1600
+ case "Home":
1601
+ e.preventDefault(), Fs(r, 0);
1602
+ return;
1603
+ case "End":
1604
+ e.preventDefault(), Fs(r, n);
1605
+ return;
1606
+ case "PageDown":
1607
+ e.preventDefault(), Fs(r, Math.min(n, t + Math.max(1, Math.floor(n / 10))));
1608
+ return;
1609
+ case "PageUp":
1610
+ e.preventDefault(), Fs(r, Math.max(0, t - Math.max(1, Math.floor(n / 10))));
1611
+ return;
1612
+ case "Enter":
1613
+ case " ":
1614
+ if (!d.onSelect && !i(q)) return;
1615
+ e.preventDefault(), Ps(e, t);
1616
+ return;
1617
+ case "Escape":
1618
+ i(J) && (x(J, null), x(Fi, null), ws(r, t));
1619
+ return;
1620
+ }
1621
+ }
1622
+ let Ls = v(se({
1623
+ sel: "",
1624
+ i: 0
1625
+ })), Rs = (e, t) => fe() ? (i(Ls).sel === e ? i(Ls).i : 0) === t ? 0 : -1 : void 0;
1626
+ function zs(e, t) {
1627
+ (i(Ls).sel !== e || i(Ls).i !== t) && x(Ls, {
1628
+ sel: e,
1629
+ i: t
1630
+ }, !0);
1631
+ }
1632
+ function Bs(e, t, n, r, i) {
1633
+ if (e.key === "Enter" || e.key === " ") {
1634
+ r && (e.preventDefault(), r());
1635
+ return;
1636
+ }
1637
+ let a = e.currentTarget, o = a.ownerSVGElement ?? a.closest("svg");
1638
+ if (!o) return;
1639
+ let s = o.querySelectorAll(t), c = s.length;
1640
+ if (!c) return;
1641
+ let l = i && i.colMajor ? i.cols : 1, u = i ? i.colMajor ? 1 : i.cols : 1, d;
1642
+ switch (e.key) {
1643
+ case "ArrowRight":
1644
+ d = n + l;
1645
+ break;
1646
+ case "ArrowLeft":
1647
+ d = n - l;
1648
+ break;
1649
+ case "ArrowDown":
1650
+ d = n + u;
1651
+ break;
1652
+ case "ArrowUp":
1653
+ d = n - u;
1654
+ break;
1655
+ case "Home":
1656
+ d = 0;
1657
+ break;
1658
+ case "End":
1659
+ d = c - 1;
1660
+ break;
1661
+ case "PageDown":
1662
+ d = n + Math.max(1, Math.floor(c / 10));
1663
+ break;
1664
+ case "PageUp":
1665
+ d = n - Math.max(1, Math.floor(c / 10));
1666
+ break;
1667
+ default: return;
1668
+ }
1669
+ e.preventDefault(), d = Math.max(0, Math.min(c - 1, d)), d !== n && (x(Ls, {
1670
+ sel: t,
1671
+ i: d
1672
+ }, !0), s[d].focus?.());
1673
+ }
1674
+ let Vs = (e) => {
1675
+ let t = e.getBoundingClientRect();
1676
+ return {
1677
+ x: t.left + t.width / 2,
1678
+ y: t.top
1679
+ };
1680
+ };
1681
+ function Hs(e, t) {
1682
+ if (!i(Ti) || !i(W)) return !1;
1683
+ let n = i(F).categories.length, r = (A()?.i0 ?? 0) + t, a, o = i(G) ? "ArrowDown" : "ArrowRight", s = i(G) ? "ArrowUp" : "ArrowLeft";
1684
+ if (e.key === "+" || e.key === "=") a = Pe(A(), n, r, .8);
1685
+ else if (e.key === "-" || e.key === "_") a = Pe(A(), n, r, 1.25);
1686
+ else if (e.key === "0") a = null;
1687
+ else if (e.shiftKey && A() && (e.key === o || e.key === s)) {
1688
+ let t = A().i1 - A().i0 + 1;
1689
+ a = Fe(A(), n, (e.key === o ? 1 : -1) * Math.max(1, Math.floor(t / 10)));
1690
+ }
1691
+ if (a === void 0) return !1;
1692
+ e.preventDefault(), Wi(a);
1693
+ let l = Math.max(0, Math.min(a ? a.i1 - a.i0 : n - 1, r - (a?.i0 ?? 0)));
1694
+ return c().then(() => {
1695
+ let e = i(L)?.querySelector(i(ko) ? "[data-dense=\"true\"]" : `[data-cat-index="${l}"]`);
1696
+ e && (e.focus?.(), i(ko) && x(Fo, l, !0), ws(e, l));
1697
+ }), !0;
1698
+ }
1699
+ function Us(e) {
1700
+ let t = i(F).categories.length;
1701
+ if (!t) return;
1702
+ let n = A() ?? {
1703
+ i0: 0,
1704
+ i1: t - 1
1705
+ }, r = n.i1 - n.i0 + 1, a = (n.i0 + n.i1) / 2, o = e.shiftKey ? r : Math.max(1, Math.floor(r / 10)), s;
1706
+ switch (e.key) {
1707
+ case "ArrowRight":
1708
+ s = Fe(A(), t, o);
1709
+ break;
1710
+ case "ArrowLeft":
1711
+ s = Fe(A(), t, -o);
1712
+ break;
1713
+ case "ArrowUp":
1714
+ case "+":
1715
+ case "=":
1716
+ s = Pe(A(), t, a, .8);
1717
+ break;
1718
+ case "ArrowDown":
1719
+ case "-":
1720
+ case "_":
1721
+ s = Pe(A(), t, a, 1.25);
1722
+ break;
1723
+ case "Home":
1724
+ s = A() ? {
1725
+ ...A(),
1726
+ i0: 0,
1727
+ i1: r - 1
1728
+ } : null;
1729
+ break;
1730
+ case "End":
1731
+ s = A() ? {
1732
+ ...A(),
1733
+ i0: t - r,
1734
+ i1: t - 1
1735
+ } : null;
1736
+ break;
1737
+ case "0":
1738
+ case "Escape":
1739
+ s = null;
1740
+ break;
1741
+ default: return;
1742
+ }
1743
+ e.preventDefault(), Wi(s);
1744
+ }
1745
+ let Ws = v("idle"), Gs = v(null), Ks = v(null);
1746
+ function qs(e) {
1747
+ if (!M()) return;
1748
+ e.preventDefault();
1749
+ let t = i(W) && !i(bo) ? Po(e.clientX, e.currentTarget) : null;
1750
+ Js(e.clientX, e.clientY, t);
1751
+ }
1752
+ function Js(e, t, n) {
1753
+ let r = n == null ? {} : {
1754
+ category: i(V).categories[n],
1755
+ index: (A() ? A().i0 : 0) + n,
1756
+ ...i(J) ? {
1757
+ series: i(J),
1758
+ value: i(V).series.find((e) => e.label === i(J))?.values[n]
1759
+ } : {}
1760
+ }, a = () => x(Gs, {
1761
+ x: e,
1762
+ y: t,
1763
+ target: r
1764
+ }, !0);
1765
+ i(Ks) ? a() : import("./SvChartMenu-Bl6PBbkT.js").then((e) => {
1766
+ x(Ks, e.default, !0), a();
1767
+ });
1768
+ }
1769
+ function Ys(e, t) {
1770
+ if (!M() || !(e.key === "ContextMenu" || e.key === "F10" && e.shiftKey)) return !1;
1771
+ e.preventDefault();
1772
+ let n = e.currentTarget.getBoundingClientRect();
1773
+ return Js(n.left + n.width / 2, n.top + Math.min(n.height / 2, 24), t), !0;
1774
+ }
1775
+ let Xs = T(() => {
1776
+ if (!i(Gs)) return [];
1777
+ let e = [
1778
+ {
1779
+ label: i(P).downloadPng,
1780
+ onSelect: () => {
1781
+ ec("png");
1782
+ }
1783
+ },
1784
+ {
1785
+ label: i(P).downloadSvg,
1786
+ onSelect: () => {
1787
+ ec("svg");
1788
+ }
1789
+ },
1790
+ {
1791
+ label: i(P).downloadPdf,
1792
+ onSelect: () => {
1793
+ tc();
1794
+ }
1795
+ },
1796
+ ...Me(i(F)) ? [{
1797
+ label: i(P).downloadCsv,
1798
+ onSelect: () => {
1799
+ je(i(F));
1800
+ }
1801
+ }] : [],
1802
+ {
1803
+ label: i(P).copyAsImage,
1804
+ onSelect: () => {
1805
+ rc();
1806
+ }
1807
+ },
1808
+ {
1809
+ label: i(P).print,
1810
+ onSelect: () => {
1811
+ nc();
1812
+ }
1813
+ },
1814
+ ...Ye() && i(si) ? [{
1815
+ label: i(P).describeChart,
1816
+ onSelect: () => {
1817
+ ci();
1818
+ }
1819
+ }] : []
1820
+ ];
1821
+ k() && i(Ui) && e.push({ separator: !0 }, {
1822
+ label: i(P).resetZoom,
1823
+ onSelect: Xi
1824
+ }), i(Jo) && e.push({ separator: !0 }, {
1825
+ label: i(P).range,
1826
+ children: i(qo).map((e) => ({
1827
+ label: Yo(e),
1828
+ onSelect: () => Xo(e)
1829
+ }))
1830
+ }), i(Zo) && i(Ko).length > 1 && e.push({ separator: !0 }, {
1831
+ label: i(P).series,
1832
+ children: i(Ko).map((e) => ({
1833
+ label: `${e.off ? " " : "✓"} ${e.label}`,
1834
+ onSelect: () => rs(e.label)
1835
+ }))
1836
+ });
1837
+ let t = typeof M() == "function" ? M()(i(Gs).target) : Array.isArray(M()) ? M() : [];
1838
+ return t.length && e.push({ separator: !0 }, ...t), e;
1839
+ });
1840
+ function Zs() {
1841
+ if (!i(L)) return null;
1842
+ let e = i(L).cloneNode(!0);
1843
+ e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.removeAttribute("class");
1844
+ let t = i(L).getBoundingClientRect();
1845
+ t.width && e.setAttribute("width", String(Math.round(t.width))), t.height && e.setAttribute("height", String(Math.round(t.height)));
1846
+ let n = document.createElement("style"), r = Array.from(document.styleSheets), a = [];
1847
+ for (let e of r) try {
1848
+ for (let t of Array.from(e.cssRules ?? [])) {
1849
+ let e = t.cssText;
1850
+ e.includes(".sv-grid-chart") && a.push(e);
1851
+ }
1852
+ } catch {}
1853
+ if (n.textContent = a.join("\n"), e.insertBefore(n, e.firstChild), i(ds) && typeof getComputedStyle == "function") {
1854
+ let t = getComputedStyle(i(ds)), n = [
1855
+ "--sg-bg",
1856
+ "--sg-fg",
1857
+ "--sg-muted",
1858
+ "--sg-border",
1859
+ "--sg-accent",
1860
+ "--sg-chart-bg",
1861
+ "--sg-chart-font-scale"
1862
+ ].map((e) => {
1863
+ let n = t.getPropertyValue(e).trim();
1864
+ return n ? `${e}:${n}` : "";
1865
+ }).filter(Boolean);
1866
+ t.fontFamily && n.push(`font-family:${t.fontFamily}`), n.length && e.setAttribute("style", n.join(";"));
1867
+ }
1868
+ return new XMLSerializer().serializeToString(e);
1869
+ }
1870
+ function Qs(e, t) {
1871
+ let n = URL.createObjectURL(e), r = document.createElement("a");
1872
+ r.href = n, r.download = t, document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
1873
+ }
1874
+ async function $s(e) {
1875
+ return new Promise((t) => {
1876
+ let n = i(L)?.getBoundingClientRect(), r = Math.max(1, Math.round(n?.width ?? i(H).width)), a = Math.max(1, Math.round(n?.height ?? i(H).height)), o = window.devicePixelRatio || 1, s = document.createElement("canvas");
1877
+ s.width = r * o, s.height = a * o;
1878
+ let c = s.getContext("2d");
1879
+ if (!c) {
1880
+ t(null);
1881
+ return;
1882
+ }
1883
+ let l = new Image();
1884
+ l.onload = () => {
1885
+ c.scale(o, o), c.drawImage(l, 0, 0, r, a), s.toBlob((e) => t(e), "image/png");
1886
+ }, l.onerror = () => t(null), l.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(e);
1887
+ });
1888
+ }
1889
+ async function ec(e) {
1890
+ let t = Zs();
1891
+ if (!t) return;
1892
+ let n = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
1893
+ if (e === "svg") {
1894
+ Qs(new Blob([t], { type: "image/svg+xml" }), `chart-${n}.svg`);
1895
+ return;
1896
+ }
1897
+ let r = await $s(t);
1898
+ r && Qs(r, `chart-${n}.png`);
1899
+ }
1900
+ async function tc() {
1901
+ if (!i(ds)) return;
1902
+ let e = await import("./chart-export-pdf-DONFUnNY.js").then((e) => e.r), t = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
1903
+ await e.downloadChartPdf(i(ds), `chart-${t}.pdf`, {
1904
+ title: i(F).title,
1905
+ subtitle: i(F).subtitle,
1906
+ caption: i(F).caption
1907
+ });
1908
+ }
1909
+ async function nc() {
1910
+ i(ds) && (await import("./chart-export-pdf-DONFUnNY.js").then((e) => e.r)).printChart(i(ds), { title: i(F).title });
1911
+ }
1912
+ async function rc() {
1913
+ let e = Zs();
1914
+ if (!e) {
1915
+ x(Ws, "err");
1916
+ return;
1917
+ }
1918
+ try {
1919
+ let t = await $s(e);
1920
+ if (!t) throw Error("rasterize failed");
1921
+ let n = window.ClipboardItem;
1922
+ n && navigator.clipboard?.write ? await navigator.clipboard.write([new n({ "image/png": t })]) : await navigator.clipboard.writeText(e), x(Ws, "ok");
1923
+ } catch {
1924
+ x(Ws, "err");
1925
+ }
1926
+ setTimeout(() => x(Ws, "idle"), 1500);
1927
+ }
1928
+ var ic = {
1929
+ zoomTo: Yi,
1930
+ resetZoom: Xi
1931
+ }, ac = $r();
1932
+ let oc;
1933
+ {
1934
+ let c = (e) => {
1935
+ var o = nt(), s = b(o), c = b(s, !0);
1936
+ w(s);
1937
+ var l = C(s, 2);
1938
+ n(l, 17, Ge, t, (e, t, n) => {
1939
+ var o = tt(), s = C(D(o), 2), c = (e) => {
1940
+ var n = $e(), a = b(n, !0);
1941
+ w(n), h(() => u(a, i(t))), r(e, n);
1942
+ }, l = (e) => {
1943
+ var o = et(), s = b(o, !0);
1944
+ w(o), h(() => u(s, i(t))), a("click", o, () => to(Ge().slice(0, n + 1))), r(e, o);
1945
+ };
1946
+ S(s, (e) => {
1947
+ n === Ge().length - 1 ? e(c) : e(l, -1);
1948
+ }), r(e, o);
1949
+ }), w(o), h(() => {
1950
+ y(o, "aria-label", i(P).drillPath), u(c, i(Ja)?.name || i(P).drillRoot);
1951
+ }), a("click", s, () => to([])), r(e, o);
1952
+ };
1953
+ var sc = b(ac), cc = (e) => {
1954
+ var t = dt(), o = b(t), s = (e) => {
1955
+ c(e);
1956
+ };
1957
+ S(o, (e) => {
1958
+ i(Ya) && Ge().length && e(s);
1959
+ });
1960
+ var l = C(o, 2), d = (e) => {
1961
+ var t = it();
1962
+ n(t, 21, () => i(qo), (e) => Yo(e), (e, t) => {
1963
+ var n = rt(), o = b(n, !0);
1964
+ w(n), h((e, t) => {
1965
+ y(n, "title", e), u(o, t);
1966
+ }, [() => N(i(P).showLast, { preset: Yo(i(t)) }), () => Yo(i(t))]), a("click", n, () => Xo(i(t))), r(e, n);
1967
+ }), w(t), h(() => y(t, "aria-label", i(P).dateRange)), r(e, t);
1968
+ };
1969
+ S(l, (e) => {
1970
+ i(Jo) && e(d);
1971
+ });
1972
+ var f = C(l, 2), p = (e) => {
1973
+ var t = at();
1974
+ let n;
1975
+ var o = C(b(t));
1976
+ w(t), h(() => {
1977
+ n = O(t, 1, "sv-grid-chart-tool svelte-hyytey", null, n, { "is-on": i(Ei) }), y(t, "aria-pressed", i(Ei)), y(t, "title", i(P).panTitle), u(o, ` ${i(P).pan ?? ""}`);
1978
+ }), a("click", t, () => x(Ei, !i(Ei))), r(e, t);
1979
+ };
1980
+ S(f, (e) => {
1981
+ i(Ti) && (i(Ti).pan === "mode" || i(Ti).pan === !0) && i(Ui) && e(p);
1982
+ });
1983
+ var m = C(f, 2), g = (e) => {
1984
+ var t = ot(), n = C(b(t));
1985
+ w(t), h(() => {
1986
+ y(t, "title", i(P).resetZoomTitle), u(n, ` ${i(P).resetZoom ?? ""}`);
1987
+ }), a("click", t, Xi), r(e, t);
1988
+ };
1989
+ S(m, (e) => {
1990
+ k() && i(Ui) && e(g);
1991
+ });
1992
+ var v = C(m, 2), ee = (e) => {
1993
+ var t = st();
1994
+ let n;
1995
+ var o = C(b(t));
1996
+ w(t), h(() => {
1997
+ n = O(t, 1, "sv-grid-chart-tool svelte-hyytey", null, n, { "is-on": i(Oi) }), y(t, "aria-pressed", i(Oi)), y(t, "title", i(Oi) ? i(P).annotateOnTitle : i(P).annotateOffTitle), u(o, ` ${i(P).annotate ?? ""}`);
1998
+ }), a("click", t, () => x(Oi, !i(Oi))), r(e, t);
1999
+ };
2000
+ S(v, (e) => {
2001
+ ai() && e(ee);
2002
+ });
2003
+ var te = C(v, 2), ne = (e) => {
2004
+ var t = ut(), o = b(t);
2005
+ n(o, 16, () => i(ma), (e) => e, (e, t) => {
2006
+ var n = ct();
2007
+ let o;
2008
+ var s = b(n, !0);
2009
+ w(n), h((e) => {
2010
+ o = O(n, 1, "sv-grid-chart-tool sv-grid-chart-drawtool svelte-hyytey", null, o, { "is-on": i(R) === t }), y(n, "aria-pressed", i(R) === t), y(n, "title", e), u(s, i(pa)[t]);
2011
+ }, [() => N(i(P).draw, { tool: i(pa)[t] })]), a("click", n, () => Ea(t)), r(e, n);
2012
+ });
2013
+ var s = C(o, 2), c = (e) => {
2014
+ var t = lt(), n = D(t), o = b(n, !0);
2015
+ w(n);
2016
+ var s = C(n, 2), c = b(s, !0);
2017
+ w(s), h(() => {
2018
+ n.disabled = !i(ga), y(n, "title", i(P).deleteDrawingTitle), u(o, i(P).deleteDrawing), y(s, "title", i(P).clearDrawingsTitle), u(c, i(P).clearDrawings);
2019
+ }), a("click", n, () => i(ga) && ka(i(ga))), a("click", s, () => Ta([])), r(e, t);
2020
+ }, l = T(() => Sa().length);
2021
+ S(s, (e) => {
2022
+ i(l) && e(c);
2023
+ }), w(t), h(() => y(t, "aria-label", i(P).drawingTools)), r(e, t);
2024
+ };
2025
+ S(te, (e) => {
2026
+ i(ma).length && i(W) && e(ne);
2027
+ });
2028
+ var re = C(te, 2), ie = b(re, !0);
2029
+ w(re);
2030
+ var ae = C(re, 2), oe = b(ae, !0);
2031
+ w(ae);
2032
+ var se = C(ae, 2), E = b(se, !0);
2033
+ w(se);
2034
+ var ce = C(se, 2), le = b(ce, !0);
2035
+ w(ce);
2036
+ var ue = C(ce, 2), de = b(ue, !0);
2037
+ w(ue), w(t), h(() => {
2038
+ y(re, "title", i(P).downloadPng), u(ie, i(P).png), y(ae, "title", i(P).downloadSvg), u(oe, i(P).svg), y(se, "title", i(P).downloadPdf), u(E, i(P).pdf), y(ce, "title", i(P).printTitle), u(le, i(P).print), y(ue, "title", i(P).copyTitle), u(de, i(Ws) === "ok" ? i(P).copied : i(P).copy);
2039
+ }), a("click", re, () => ec("png")), a("click", ae, () => ec("svg")), a("click", se, tc), a("click", ce, nc), a("click", ue, rc), _(t, "clientHeight", (e) => x(_i, e)), r(e, t);
2040
+ }, lc = (e) => {
2041
+ var t = ft(), n = b(t);
2042
+ c(n), w(t), _(t, "clientHeight", (e) => x(_i, e)), r(e, t);
2043
+ };
2044
+ S(sc, (e) => {
2045
+ i(Di) ? e(cc) : i(Ya) && Ge().length && e(lc, 1);
2046
+ });
2047
+ var $ = C(sc, 2);
2048
+ let l, p;
2049
+ var uc = b($), dc = (e) => {
2050
+ var t = yt(), a = b(t), s = (e) => {
2051
+ var t = pt(), n = b(t);
2052
+ let a;
2053
+ w(t), h(() => {
2054
+ y(t, "id", `${Li}-plot`), y(n, "x", i(H).plot.x - 4), y(n, "y", i(H).plot.y - 4), y(n, "width", i(H).plot.w + 8), y(n, "height", i(H).plot.h + 8), a = O(n, 0, "svelte-hyytey", null, a, { "sv-grid-chart-wipe": i(uo) === "wipe" });
2055
+ }), r(e, t);
2056
+ };
2057
+ S(a, (e) => {
2058
+ i(W) && e(s);
2059
+ });
2060
+ var c = C(a);
2061
+ n(c, 17, () => i(fo), (e) => e.id, (e, t) => {
2062
+ var n = mt(), a = b(n), o = C(a);
2063
+ w(n), h(() => {
2064
+ y(n, "id", i(t).id), y(a, "stop-color", i(t).from), y(o, "stop-color", i(t).to === "transparent" ? i(t).from : i(t).to), y(o, "stop-opacity", i(t).to === "transparent" ? 0 : 1);
2065
+ }), r(e, n);
2066
+ });
2067
+ var l = C(c);
2068
+ n(l, 17, () => i(Vi), (e) => e.id, (e, t) => {
2069
+ var n = o(), a = D(n), s = (e) => {
2070
+ var n = ht(), a = b(n);
2071
+ te(), w(n), h(() => {
2072
+ y(n, "id", i(t).id), y(a, "fill", i(t).color);
2073
+ }), r(e, n);
2074
+ }, c = (e) => {
2075
+ var n = gt(), a = b(n);
2076
+ te(), w(n), h(() => {
2077
+ y(n, "id", i(t).id), y(a, "fill", i(t).color);
2078
+ }), r(e, n);
2079
+ }, l = (e) => {
2080
+ var n = _t(), a = b(n);
2081
+ te(), w(n), h(() => {
2082
+ y(n, "id", i(t).id), y(a, "fill", i(t).color);
2083
+ }), r(e, n);
2084
+ }, u = (e) => {
2085
+ var n = vt(), a = b(n);
2086
+ te(), w(n), h(() => {
2087
+ y(n, "id", i(t).id), y(a, "fill", i(t).color);
2088
+ }), r(e, n);
2089
+ };
2090
+ S(a, (e) => {
2091
+ i(t).kind === "stripe" ? e(s) : i(t).kind === "crosshatch" ? e(c, 1) : i(t).kind === "dots" ? e(l, 2) : i(t).kind === "diagonal" && e(u, 3);
2092
+ }), r(e, n);
2093
+ }), w(t), r(e, t);
2094
+ };
2095
+ S(uc, (e) => {
2096
+ (i(Vi).length || i(fo).length || i(W)) && e(dc);
2097
+ });
2098
+ var fc = C(uc), pc = (e) => {
2099
+ var t = bt(), n = b(t, !0);
2100
+ w(t), h(() => {
2101
+ y(t, "x", i(H).frame.title.x), y(t, "y", i(H).frame.title.y), u(n, i(H).frame.title.text);
2102
+ }), r(e, t);
2103
+ };
2104
+ S(fc, (e) => {
2105
+ i(H).frame.title && e(pc);
2106
+ });
2107
+ var mc = C(fc), hc = (e) => {
2108
+ var t = xt(), n = b(t, !0);
2109
+ w(t), h(() => {
2110
+ y(t, "x", i(H).frame.subtitle.x), y(t, "y", i(H).frame.subtitle.y), u(n, i(H).frame.subtitle.text);
2111
+ }), r(e, t);
2112
+ };
2113
+ S(mc, (e) => {
2114
+ i(H).frame.subtitle && e(hc);
2115
+ });
2116
+ var gc = C(mc), _c = (e) => {
2117
+ var t = St(), n = b(t, !0);
2118
+ w(t), h(() => {
2119
+ y(t, "x", i(H).frame.caption.x), y(t, "y", i(H).frame.caption.y), u(n, i(H).frame.caption.text);
2120
+ }), r(e, t);
2121
+ };
2122
+ S(gc, (e) => {
2123
+ i(H).frame.caption && e(_c);
2124
+ });
2125
+ var vc = C(gc), yc = (e) => {
2126
+ var t = kt(), a = D(t);
2127
+ n(a, 17, () => i(H).valueTicks, (e) => e.label + e.x, (e, t, n, a) => {
2128
+ var o = wt(), s = D(o), c = (e) => {
2129
+ var n = Ct();
2130
+ h(() => {
2131
+ y(n, "x1", i(t).x), y(n, "y1", i(H).plot.y), y(n, "x2", i(t).x), y(n, "y2", i(H).plot.y + i(H).plot.h);
2132
+ }), r(e, n);
2133
+ };
2134
+ S(s, (e) => {
2135
+ i(H).grid.x && e(c);
2136
+ });
2137
+ var l = C(s), d = b(l, !0);
2138
+ w(l), h(() => {
2139
+ y(l, "x", i(t).x), y(l, "y", i(H).plot.y + i(H).plot.h + 14), u(d, i(t).label);
2140
+ }), r(e, o);
2141
+ });
2142
+ var s = C(a), c = (e) => {
2143
+ var t = o(), a = D(t);
2144
+ n(a, 17, () => i(H).catTicks, (e) => e.value, (e, t, n, a) => {
2145
+ var o = Tt();
2146
+ h(() => {
2147
+ y(o, "x1", i(H).plot.x), y(o, "y1", i(t).y), y(o, "x2", i(H).plot.x + i(H).plot.w), y(o, "y2", i(t).y);
2148
+ }), r(e, o);
2149
+ }), r(e, t);
2150
+ };
2151
+ S(s, (e) => {
2152
+ i(H).grid.y && e(c);
2153
+ });
2154
+ var l = C(s);
2155
+ n(l, 17, () => i(H).catTicks, (e) => e.value, (e, t, n, a) => {
2156
+ var o = Et(), s = b(o, !0);
2157
+ w(o), h((e) => {
2158
+ y(o, "x", i(H).plot.x - 6), y(o, "y", i(t).y + 3), u(s, e);
2159
+ }, [() => ls(i(t).label, 18)]), r(e, o);
2160
+ });
2161
+ var d = C(l), f = (e) => {
2162
+ var t = Dt();
2163
+ y(t, "x", 13);
2164
+ var n = b(t, !0);
2165
+ w(t), h(() => {
2166
+ y(t, "y", i(H).plot.y + i(H).plot.h / 2), y(t, "transform", `rotate(-90 13 ${i(H).plot.y + i(H).plot.h / 2})`), u(n, i(po));
2167
+ }), r(e, t);
2168
+ };
2169
+ S(d, (e) => {
2170
+ i(po) && e(f);
2171
+ });
2172
+ var p = C(d), m = (e) => {
2173
+ var t = Ot(), n = b(t, !0);
2174
+ w(t), h(() => {
2175
+ y(t, "x", i(H).plot.x + i(H).plot.w / 2), y(t, "y", i(H).height - 3 - i(H).frame.bottom), u(n, i(ho));
2176
+ }), r(e, t);
2177
+ };
2178
+ S(p, (e) => {
2179
+ i(ho) && e(m);
2180
+ }), r(e, t);
2181
+ }, bc = (e) => {
2182
+ var t = Ht(), a = D(t);
2183
+ n(a, 17, () => i(H).yTicks, (e) => e.value, (e, t, n, a) => {
2184
+ var o = Mt(), s = D(o), c = (e) => {
2185
+ var n = At();
2186
+ let a;
2187
+ h(() => {
2188
+ a = O(n, 0, "sv-grid-chart-gridline svelte-hyytey", null, a, { "is-zero": i(t).value === 0 }), y(n, "x1", i(H).plot.x), y(n, "y1", i(t).y), y(n, "x2", i(H).plot.x + i(H).plot.w), y(n, "y2", i(t).y);
2189
+ }), r(e, n);
2190
+ };
2191
+ S(s, (e) => {
2192
+ (i(H).grid.y || i(t).value === 0) && e(c);
2193
+ });
2194
+ var l = C(s), d = (e) => {
2195
+ var n = jt(), a = b(n, !0);
2196
+ w(n), h((e) => {
2197
+ y(n, "x", i(H).plot.x - 6), y(n, "y", i(t).y + 3), u(a, e);
2198
+ }, [() => us(i(t).value, i(t).label)]), r(e, n);
2199
+ };
2200
+ S(l, (e) => {
2201
+ i(t).label && e(d);
2202
+ }), r(e, o);
2203
+ });
2204
+ var s = C(a), c = (e) => {
2205
+ var t = o(), a = D(t);
2206
+ n(a, 17, () => i(H).xTicks, (e) => e.label + e.x, (e, t, n, a) => {
2207
+ var o = Nt();
2208
+ h(() => {
2209
+ y(o, "x1", i(t).x), y(o, "y1", i(H).plot.y), y(o, "x2", i(t).x), y(o, "y2", i(H).plot.y + i(H).plot.h);
2210
+ }), r(e, o);
2211
+ }), r(e, t);
2212
+ };
2213
+ S(s, (e) => {
2214
+ i(H).grid.x && e(c);
2215
+ });
2216
+ var l = C(s), d = (e) => {
2217
+ var t = o(), a = D(t);
2218
+ n(a, 17, () => i(H).y2Ticks, (e) => e.value, (e, t, n, a) => {
2219
+ var s = o(), c = D(s), l = (e) => {
2220
+ var n = Pt(), a = b(n, !0);
2221
+ w(n), h((e) => {
2222
+ y(n, "x", i(H).plot.x + i(H).plot.w + 6), y(n, "y", i(t).y + 3), u(a, e);
2223
+ }, [() => us(i(t).value, i(t).label)]), r(e, n);
2224
+ };
2225
+ S(c, (e) => {
2226
+ i(t).label && e(l);
2227
+ }), r(e, s);
2228
+ }), r(e, t);
2229
+ };
2230
+ S(l, (e) => {
2231
+ i(H).hasRightAxis && e(d);
2232
+ });
2233
+ var f = C(l);
2234
+ n(f, 17, () => i(H).xTicks, (e) => e.label + e.x, (e, t, n, a) => {
2235
+ var s = o(), c = D(s), l = (e) => {}, d = (e) => {
2236
+ var n = Ft(), a = b(n, !0);
2237
+ w(n), h((e) => {
2238
+ y(n, "x", i(t).x), y(n, "y", i(H).plot.y + i(H).plot.h + 12), y(n, "text-anchor", i(H).xLabelAngle < 0 ? "end" : "start"), y(n, "transform", `rotate(${i(H).xLabelAngle} ${i(t).x} ${i(H).plot.y + i(H).plot.h + 12})`), u(a, e);
2239
+ }, [() => ls(i(t).label, Math.abs(i(H).xLabelAngle) >= 60 ? 18 : 12)]), r(e, n);
2240
+ }, f = (e) => {
2241
+ var n = It(), a = b(n, !0);
2242
+ w(n), h((e) => {
2243
+ y(n, "x", i(t).x), y(n, "y", i(H).plot.y + i(H).plot.h + 16), u(a, e);
2244
+ }, [() => ls(i(t).label, 16)]), r(e, n);
2245
+ };
2246
+ S(c, (e) => {
2247
+ i(t).label ? i(H).xLabelRotated ? e(d, 1) : e(f, -1) : e(l);
2248
+ }), r(e, s);
2249
+ });
2250
+ var p = C(f);
2251
+ n(p, 17, () => i(H).categoryGroupTicks, (e) => e.label + e.x0, (e, t) => {
2252
+ let n = T(() => i(H).plot.y + i(H).plot.h + (i(H).xLabelRotated ? 46 : 32));
2253
+ var a = Rt(), o = D(a), s = C(o), c = (e) => {
2254
+ var a = Lt();
2255
+ h(() => {
2256
+ y(a, "x1", i(t).x0), y(a, "y1", i(H).plot.y + i(H).plot.h), y(a, "x2", i(t).x0), y(a, "y2", i(n) - 9);
2257
+ }), r(e, a);
2258
+ };
2259
+ S(s, (e) => {
2260
+ i(t).x0 > i(H).plot.x + 1 && e(c);
2261
+ });
2262
+ var l = C(s), d = b(l, !0);
2263
+ w(l), h((e) => {
2264
+ y(o, "x1", i(t).x0 + 3), y(o, "y1", i(n) - 9), y(o, "x2", i(t).x1 - 3), y(o, "y2", i(n) - 9), y(l, "x", i(t).xCenter), y(l, "y", i(n)), u(d, e);
2265
+ }, [() => ls(i(t).label, Math.max(4, Math.floor((i(t).x1 - i(t).x0) / 7)))]), r(e, a);
2266
+ });
2267
+ var m = C(p), g = (e) => {
2268
+ var t = zt();
2269
+ y(t, "x", 13);
2270
+ var n = b(t, !0);
2271
+ w(t), h(() => {
2272
+ y(t, "y", i(H).plot.y + i(H).plot.h / 2), y(t, "transform", `rotate(-90 13 ${i(H).plot.y + i(H).plot.h / 2})`), u(n, i(po));
2273
+ }), r(e, t);
2274
+ };
2275
+ S(m, (e) => {
2276
+ i(po) && e(g);
2277
+ });
2278
+ var _ = C(m), v = (e) => {
2279
+ var t = Bt(), n = b(t, !0);
2280
+ w(t), h(() => {
2281
+ y(t, "x", i(H).width - 12), y(t, "y", i(H).plot.y + i(H).plot.h / 2), y(t, "transform", `rotate(90 ${i(H).width - 12} ${i(H).plot.y + i(H).plot.h / 2})`), u(n, i(mo));
2282
+ }), r(e, t);
2283
+ };
2284
+ S(_, (e) => {
2285
+ i(mo) && e(v);
2286
+ });
2287
+ var ee = C(_), te = (e) => {
2288
+ var t = Vt(), n = b(t, !0);
2289
+ w(t), h(() => {
2290
+ y(t, "x", i(H).plot.x + i(H).plot.w / 2), y(t, "y", i(H).height - 3 - i(H).frame.bottom), u(n, i(ho));
2291
+ }), r(e, t);
2292
+ };
2293
+ S(ee, (e) => {
2294
+ i(ho) && e(te);
2295
+ }), r(e, t);
2296
+ };
2297
+ S(vc, (e) => {
2298
+ i(G) ? e(yc) : i(W) && e(bc, 1);
2299
+ });
2300
+ var xc = C(vc);
2301
+ n(xc, 17, () => i(H).referenceBands, t, (e, t) => {
2302
+ var n = Gt(), a = D(n), s = C(a), c = (e) => {
2303
+ var n = o(), a = D(n), s = (e) => {
2304
+ var n = Ut(), a = b(n, !0);
2305
+ w(n), h(() => {
2306
+ y(n, "x", i(t).x + i(t).w - 3), y(n, "y", i(t).y + 10), y(n, "fill", i(t).color), u(a, i(t).label);
2307
+ }), r(e, n);
2308
+ }, c = (e) => {
2309
+ var n = Wt(), a = b(n, !0);
2310
+ w(n), h(() => {
2311
+ y(n, "x", i(t).x + i(t).w / 2), y(n, "y", i(t).y + 10), y(n, "fill", i(t).color), u(a, i(t).label);
2312
+ }), r(e, n);
2313
+ };
2314
+ S(a, (e) => {
2315
+ i(t).axis === "y" ? e(s) : e(c, -1);
2316
+ }), r(e, n);
2317
+ };
2318
+ S(s, (e) => {
2319
+ i(t).label && e(c);
2320
+ }), h(() => {
2321
+ y(a, "x", i(t).x), y(a, "y", i(t).y), y(a, "width", i(t).w), y(a, "height", i(t).h), y(a, "fill", i(t).color), y(a, "fill-opacity", i(t).opacity);
2322
+ }), r(e, n);
2323
+ });
2324
+ var Sc = C(xc);
2325
+ let m;
2326
+ var Cc = b(Sc);
2327
+ n(Cc, 19, () => i(H).lines, (e, t) => e.label + t, (e, a, s) => {
2328
+ let c = T(() => i(a).style?.gradient ? `${Li}-grad-${i(s)}` : null);
2329
+ var l = Qt(), u = b(l), d = (e) => {
2330
+ var t = Kt();
2331
+ h(() => {
2332
+ y(t, "d", i(a).bandPath), y(t, "fill", i(a).color);
2333
+ }), r(e, t);
2334
+ };
2335
+ S(u, (e) => {
2336
+ i(a).bandPath && e(d);
2337
+ });
2338
+ var f = C(u), p = (e) => {
2339
+ var t = qt();
2340
+ h(() => {
2341
+ y(t, "d", i(a).areaPath), y(t, "fill", i(c) ? `url(#${i(c)})` : i(Bi)[i(a).label] ?? i(a).color), y(t, "fill-opacity", i(c) ? .6 : i(a).range ? .35 : .15);
2342
+ }), r(e, t);
2343
+ };
2344
+ S(f, (e) => {
2345
+ i(a).areaPath && e(p);
2346
+ });
2347
+ var m = C(f), _ = C(m), v = (e) => {
2348
+ let t = T(() => i(a).points[i(ms) ?? -1]);
2349
+ var n = o(), s = D(n), c = (e) => {
2350
+ var n = Jt();
2351
+ h(() => {
2352
+ y(n, "cx", i(t).x), y(n, "cy", i(t).y), y(n, "fill", i(t).marker?.color ?? i(a).color);
2353
+ }), r(e, n);
2354
+ };
2355
+ S(s, (e) => {
2356
+ i(t)?.defined && e(c);
2357
+ }), r(e, n);
2358
+ }, ee = (e) => {
2359
+ var s = o(), c = D(s);
2360
+ n(c, 17, () => i(a).points, t, (e, t, n) => {
2361
+ var s = o(), c = D(s), l = (e) => {
2362
+ let s = T(() => i(t).marker?.shape ?? "circle"), c = T(() => (i(t).marker?.size ?? 3) + +(i(ms) === n)), l = T(() => i(t).marker?.color ?? i(a).color);
2363
+ var u = o(), d = D(u), f = (e) => {
2364
+ var o = Yt();
2365
+ let s;
2366
+ h((e, n) => {
2367
+ s = O(o, 0, "sv-grid-chart-dot svelte-hyytey", null, s, e), y(o, "cx", i(t).x), y(o, "cy", i(t).y), y(o, "r", i(c)), y(o, "fill", i(l)), g(o, n);
2368
+ }, [() => ({
2369
+ "is-active": i(ms) === n,
2370
+ "is-selected": Ho(i(t).label, i(a).label)
2371
+ }), () => `opacity:${Uo(i(t).label, i(a).label)}`]), r(e, o);
2372
+ }, p = (e) => {
2373
+ var a = Xt();
2374
+ let o;
2375
+ h((e) => {
2376
+ o = O(a, 0, "sv-grid-chart-dot is-stroked svelte-hyytey", null, o, { "is-active": i(ms) === n }), y(a, "d", e), y(a, "stroke", i(l));
2377
+ }, [() => ve(i(s), i(t).x, i(t).y, i(c))]), r(e, a);
2378
+ }, m = (e) => {
2379
+ var a = Zt();
2380
+ let o;
2381
+ h((e) => {
2382
+ o = O(a, 0, "sv-grid-chart-dot svelte-hyytey", null, o, { "is-active": i(ms) === n }), y(a, "d", e), y(a, "fill", i(l));
2383
+ }, [() => ve(i(s), i(t).x, i(t).y, i(c))]), r(e, a);
2384
+ };
2385
+ S(d, (e) => {
2386
+ i(s) === "circle" ? e(f) : i(s) === "cross" ? e(p, 1) : e(m, -1);
2387
+ }), r(e, u);
2388
+ };
2389
+ S(c, (e) => {
2390
+ i(t).defined && i(t).marker?.shape !== "none" && e(l);
2391
+ }), r(e, s);
2392
+ }), r(e, s);
2393
+ };
2394
+ S(_, (e) => {
2395
+ i(ko) ? e(v) : e(ee, -1);
2396
+ }), w(l), h((e) => {
2397
+ g(l, e), y(m, "d", i(a).path), y(m, "stroke", i(a).color), y(m, "stroke-width", i(a).style?.strokeWidth ?? (i(a).range ? 1 : 2)), y(m, "stroke-dasharray", i(a).style?.dash);
2398
+ }, [() => `opacity:${K(i(a).label) * (i(a).style?.opacity ?? 1)}`]), r(e, l);
2399
+ });
2400
+ var wc = C(Cc), Tc = (e) => {
2401
+ var t = o(), n = D(t);
2402
+ re(n, () => d.underlay, () => i(go)), r(e, t);
2403
+ };
2404
+ S(wc, (e) => {
2405
+ d.underlay && e(Tc);
2406
+ });
2407
+ var Ec = C(wc);
2408
+ n(Ec, 17, () => i(H).bars, t, (e, t) => {
2409
+ var n = $t();
2410
+ let o;
2411
+ h((e, r, a) => {
2412
+ o = O(n, 0, "sv-grid-chart-bar svelte-hyytey", null, o, e), y(n, "x", i(t).x), y(n, "y", i(t).y), y(n, "width", i(t).w), y(n, "height", i(t).h), y(n, "fill", r), g(n, a);
2413
+ }, [
2414
+ () => ({ "is-selected": Ho(i(t).label, i(t).series, i(t).index) }),
2415
+ () => i(Bi)[i(t).series]?.startsWith("url(") ? i(Bi)[i(t).series] : i(t).color,
2416
+ () => `opacity:${K(i(t).series) * (i(t).opacity ?? 1) * Uo(i(t).label, i(t).series, i(t).index)}`
2417
+ ]), a("click", n, function(...e) {
2418
+ (i(q) ? (e) => {
2419
+ e.stopPropagation(), Q(i(t).label, i(t).series, i(t).value, i(t).index, e);
2420
+ } : void 0)?.apply(this, e);
2421
+ }), r(e, n);
2422
+ });
2423
+ var Dc = C(Ec);
2424
+ n(Dc, 17, () => i(H).stems, t, (e, t) => {
2425
+ var n = tn(), o = b(n), s = C(o), c = (e) => {
2426
+ var n = en();
2427
+ h(() => {
2428
+ y(n, "cx", i(t).xCenter), y(n, "cy", i(t).y0), y(n, "r", i(t).r), y(n, "fill", i(t).color2 ?? i(t).color), y(n, "stroke", i(t).color2 ?? i(t).color);
2429
+ }), r(e, n);
2430
+ };
2431
+ S(s, (e) => {
2432
+ i(t).dumbbell && e(c);
2433
+ });
2434
+ var l = C(s);
2435
+ w(n), h((e) => {
2436
+ g(n, e), y(o, "x1", i(t).xCenter), y(o, "y1", i(t).y0), y(o, "x2", i(t).xCenter), y(o, "y2", i(t).y1), y(o, "stroke", i(t).dumbbell ? "var(--sg-muted, #94a3b8)" : i(t).color), y(o, "stroke-width", i(t).dumbbell ? 2 : 1.5), y(l, "cx", i(t).xCenter), y(l, "cy", i(t).y1), y(l, "r", i(t).r), y(l, "fill", i(t).color);
2437
+ }, [() => `opacity:${K(i(t).series)}`]), a("mousemove", n, (e) => Ms(e.clientX, e.clientY, i(t))), f("mouseleave", n, Z), r(e, n);
2438
+ });
2439
+ var Oc = C(Dc);
2440
+ n(Oc, 17, () => i(H).candles, t, (e, t) => {
2441
+ var n = o(), a = D(n), s = (e) => {
2442
+ var n = nn(), a = D(n), o = C(a), s = C(o);
2443
+ h((e, n, r) => {
2444
+ y(a, "x1", i(t).xCenter), y(a, "y1", i(t).yHigh), y(a, "x2", i(t).xCenter), y(a, "y2", i(t).yLow), y(a, "stroke", i(t).color), g(a, e), y(o, "x1", i(t).x), y(o, "y1", i(t).yOpen), y(o, "x2", i(t).xCenter), y(o, "y2", i(t).yOpen), y(o, "stroke", i(t).color), g(o, n), y(s, "x1", i(t).xCenter), y(s, "y1", i(t).yClose), y(s, "x2", i(t).x + i(t).w), y(s, "y2", i(t).yClose), y(s, "stroke", i(t).color), g(s, r);
2445
+ }, [
2446
+ () => `opacity:${K(i(t).series)}`,
2447
+ () => `opacity:${K(i(t).series)}`,
2448
+ () => `opacity:${K(i(t).series)}`
2449
+ ]), r(e, n);
2450
+ }, c = (e) => {
2451
+ var n = rn(), a = D(n), o = C(a);
2452
+ h((e, n) => {
2453
+ y(a, "x1", i(t).xCenter), y(a, "y1", i(t).yHigh), y(a, "x2", i(t).xCenter), y(a, "y2", i(t).yLow), y(a, "stroke", i(t).color), g(a, e), y(o, "x", i(t).x), y(o, "y", i(t).bodyY), y(o, "width", i(t).w), y(o, "height", i(t).bodyH), y(o, "fill", i(t).hollow ? "none" : i(t).color), y(o, "stroke", i(t).color), g(o, n);
2454
+ }, [() => `opacity:${K(i(t).series)}`, () => `opacity:${K(i(t).series)}`]), r(e, n);
2455
+ };
2456
+ S(a, (e) => {
2457
+ i(Ia) ? e(s) : e(c, -1);
2458
+ }), r(e, n);
2459
+ });
2460
+ var kc = C(Oc);
2461
+ n(kc, 17, () => i(H).boxes, t, (e, a) => {
2462
+ var o = on(), s = D(o), c = C(s), l = C(c), u = C(l), d = C(u), f = C(d);
2463
+ n(f, 17, () => i(a).outliers, t, (e, t) => {
2464
+ var n = an();
2465
+ h((e) => {
2466
+ y(n, "cx", i(a).xCenter), y(n, "cy", i(t).y), y(n, "stroke", i(a).color), g(n, e);
2467
+ }, [() => `opacity:${K(i(a).series)}`]), r(e, n);
2468
+ }), h((e, t, n, r, o) => {
2469
+ y(s, "x1", i(a).xCenter), y(s, "y1", i(a).yMax), y(s, "x2", i(a).xCenter), y(s, "y2", i(a).yMin), y(s, "stroke", i(a).color), g(s, e), y(c, "x1", i(a).x + i(a).w * .25), y(c, "y1", i(a).yMax), y(c, "x2", i(a).x + i(a).w * .75), y(c, "y2", i(a).yMax), y(c, "stroke", i(a).color), g(c, t), y(l, "x1", i(a).x + i(a).w * .25), y(l, "y1", i(a).yMin), y(l, "x2", i(a).x + i(a).w * .75), y(l, "y2", i(a).yMin), y(l, "stroke", i(a).color), g(l, n), y(u, "x", i(a).x), y(u, "y", i(a).boxY), y(u, "width", i(a).w), y(u, "height", i(a).boxH), y(u, "fill", i(a).color), y(u, "stroke", i(a).color), g(u, r), y(d, "x1", i(a).x), y(d, "y1", i(a).yMedian), y(d, "x2", i(a).x + i(a).w), y(d, "y2", i(a).yMedian), y(d, "stroke", i(a).color), g(d, o);
2470
+ }, [
2471
+ () => `opacity:${K(i(a).series)}`,
2472
+ () => `opacity:${K(i(a).series)}`,
2473
+ () => `opacity:${K(i(a).series)}`,
2474
+ () => `opacity:${K(i(a).series)}`,
2475
+ () => `opacity:${K(i(a).series)}`
2476
+ ]), r(e, o);
2477
+ });
2478
+ var Ac = C(kc);
2479
+ n(Ac, 17, () => i(H).errorBars, t, (e, t) => {
2480
+ var n = sn(), a = D(n), o = C(a), s = C(o);
2481
+ h((e, n, r) => {
2482
+ y(a, "x1", i(t).xCenter), y(a, "y1", i(t).yHi), y(a, "x2", i(t).xCenter), y(a, "y2", i(t).yLo), y(a, "stroke", i(t).color), g(a, e), y(o, "x1", i(t).xCenter - i(t).cap), y(o, "y1", i(t).yHi), y(o, "x2", i(t).xCenter + i(t).cap), y(o, "y2", i(t).yHi), y(o, "stroke", i(t).color), g(o, n), y(s, "x1", i(t).xCenter - i(t).cap), y(s, "y1", i(t).yLo), y(s, "x2", i(t).xCenter + i(t).cap), y(s, "y2", i(t).yLo), y(s, "stroke", i(t).color), g(s, r);
2483
+ }, [
2484
+ () => `opacity:${K(i(t).series)}`,
2485
+ () => `opacity:${K(i(t).series)}`,
2486
+ () => `opacity:${K(i(t).series)}`
2487
+ ]), r(e, n);
2488
+ });
2489
+ var jc = C(Ac);
2490
+ n(jc, 17, () => i(H).scatterPoints, t, (e, t, n) => {
2491
+ var o = cn();
2492
+ let s;
2493
+ h((e, n, r, a) => {
2494
+ s = O(o, 0, "sv-grid-chart-scatter svelte-hyytey", null, s, e), y(o, "cx", i(t).cx), y(o, "cy", i(t).cy), y(o, "r", i(t).r), y(o, "fill", i(t).color), y(o, "stroke", i(t).color), g(o, n), y(o, "role", i(q) || d.onSelect ? "button" : "img"), y(o, "tabindex", r), y(o, "aria-label", a);
2495
+ }, [
2496
+ () => ({ "is-selected": Ho(i(t).label || i(t).series, i(t).series, n) }),
2497
+ () => `opacity:${K(i(t).series) * Uo(i(t).label || i(t).series, i(t).series, n)}`,
2498
+ () => Rs(".sv-grid-chart-scatter", n),
2499
+ () => `${i(t).label || i(t).series}: ${I(i(t).x)}, ${I(i(t).y)}`
2500
+ ]), a("mousemove", o, (e) => Es(e.clientX, e.clientY, i(t))), f("mouseleave", o, Z), a("click", o, function(...e) {
2501
+ (i(q) || d.onSelect ? (e) => {
2502
+ e.stopPropagation(), Q(i(t).label || i(t).series, i(t).series, i(t).y, n, e);
2503
+ } : void 0)?.apply(this, e);
2504
+ }), f("focus", o, (e) => {
2505
+ zs(".sv-grid-chart-scatter", n);
2506
+ let r = Vs(e.currentTarget);
2507
+ Es(r.x, r.y, i(t));
2508
+ }), f("blur", o, Z), a("keydown", o, (e) => Bs(e, ".sv-grid-chart-scatter", n, i(q) || d.onSelect ? () => Q(i(t).label || i(t).series, i(t).series, i(t).y, n, e) : null)), r(e, o);
2509
+ }), w(Sc);
2510
+ var Mc = C(Sc);
2511
+ n(Mc, 17, () => i(H).referenceLines, t, (e, t) => {
2512
+ var n = dn(), a = D(n), o = C(a), s = (e) => {
2513
+ let n = T(() => Math.max(28, i(t).label.length * 6.4 + 10));
2514
+ var a = ln(), o = b(a), s = C(o), c = b(s, !0);
2515
+ w(s), w(a), h(() => {
2516
+ y(o, "x", i(H).plot.x + i(H).plot.w - i(n)), y(o, "y", i(t).y - 8), y(o, "width", i(n)), y(o, "fill", i(t).color), y(s, "x", i(H).plot.x + i(H).plot.w - i(n) / 2), y(s, "y", i(t).y + 3.5), u(c, i(t).label);
2517
+ }), r(e, a);
2518
+ }, c = (e) => {
2519
+ var n = un(), a = b(n, !0);
2520
+ w(n), h(() => {
2521
+ y(n, "x", i(H).plot.x + i(H).plot.w - 3), y(n, "y", i(t).y - 3), y(n, "fill", i(t).color), u(a, i(t).label);
2522
+ }), r(e, n);
2523
+ };
2524
+ S(o, (e) => {
2525
+ i(t).pill ? e(s) : e(c, -1);
2526
+ }), h(() => {
2527
+ y(a, "x1", i(H).plot.x), y(a, "y1", i(t).y), y(a, "x2", i(H).plot.x + i(H).plot.w), y(a, "y2", i(t).y), y(a, "stroke", i(t).color), y(a, "stroke-dasharray", i(t).dashed ? "5 4" : void 0);
2528
+ }), r(e, n);
2529
+ });
2530
+ var Nc = C(Mc);
2531
+ n(Nc, 17, () => i(H).referenceLinesV, t, (e, t) => {
2532
+ var n = fn(), a = D(n), o = C(a), s = b(o, !0);
2533
+ w(o), h(() => {
2534
+ y(a, "x1", i(t).x), y(a, "y1", i(H).plot.y), y(a, "x2", i(t).x), y(a, "y2", i(H).plot.y + i(H).plot.h), y(a, "stroke", i(t).color), y(a, "stroke-dasharray", i(t).dashed ? "5 4" : void 0), y(o, "x", i(t).x + 3), y(o, "y", i(H).plot.y + 9), y(o, "fill", i(t).color), u(s, i(t).label);
2535
+ }), r(e, n);
2536
+ });
2537
+ var Pc = C(Nc);
2538
+ let v;
2539
+ n(Pc, 23, () => i(H).overlays, (e, t) => e.label + t, (e, t) => {
2540
+ var n = mn(), a = D(n), o = (e) => {
2541
+ var n = pn();
2542
+ h(() => {
2543
+ y(n, "d", i(t).bandPath), y(n, "fill", i(t).color), y(n, "stroke", i(t).color);
2544
+ }), r(e, n);
2545
+ };
2546
+ S(a, (e) => {
2547
+ i(t).bandPath && e(o);
2548
+ });
2549
+ var s = C(a);
2550
+ h(() => {
2551
+ y(s, "d", i(t).path), y(s, "stroke", i(t).color);
2552
+ }), r(e, n);
2553
+ }), w(Pc);
2554
+ var Fc = C(Pc);
2555
+ n(Fc, 17, () => i(jo), t, (e, t) => {
2556
+ var n = gn(), a = D(n), o = (e) => {
2557
+ var n = hn();
2558
+ h((e) => {
2559
+ y(n, "x1", i(t).leader.x1), y(n, "y1", i(t).leader.y1), y(n, "x2", i(t).leader.x2), y(n, "y2", i(t).leader.y2), g(n, e);
2560
+ }, [() => `opacity:${K(i(t).series)}`]), r(e, n);
2561
+ };
2562
+ S(a, (e) => {
2563
+ i(t).leader && e(o);
2564
+ });
2565
+ var s = C(a);
2566
+ let c;
2567
+ var l = b(s, !0);
2568
+ w(s), h((e) => {
2569
+ c = O(s, 0, "sv-grid-chart-datalabel svelte-hyytey", null, c, { "on-bar": i(t).onBar }), y(s, "x", i(t).x), y(s, "y", i(t).y), y(s, "text-anchor", i(t).anchor), y(s, "transform", i(t).angle ? `rotate(${i(t).angle} ${i(t).x} ${i(t).y})` : void 0), g(s, e), u(l, i(t).text);
2570
+ }, [() => `opacity:${K(i(t).series)}`]), r(e, n);
2571
+ });
2572
+ var Ic = C(Fc);
2573
+ n(Ic, 17, () => i(H).seriesLabels, (e) => e.series, (e, t) => {
2574
+ var n = _n(), a = b(n, !0);
2575
+ w(n), h((e) => {
2576
+ y(n, "x", i(t).x), y(n, "y", i(t).y + 3.5), y(n, "fill", i(t).color), g(n, e), u(a, i(t).text);
2577
+ }, [() => `opacity:${K(i(t).series)}`]), r(e, n);
2578
+ });
2579
+ var Lc = C(Ic), Rc = (e) => {
2580
+ var t = o(), n = D(t);
2581
+ re(n, () => d.overlay, () => i(go)), r(e, t);
2582
+ };
2583
+ S(Lc, (e) => {
2584
+ d.overlay && e(Rc);
2585
+ });
2586
+ var zc = C(Lc);
2587
+ n(zc, 19, () => i(H).annotations, (e, t) => e.label + t, (e, t, n) => {
2588
+ let o = T(() => i(t).placement === "left" ? -8 : i(t).placement === "right" ? 8 : 0), s = T(() => i(t).placement === "bottom" ? 14 : i(t).placement === "top" ? -8 : 0), c = T(() => i(t).placement === "left" ? "end" : i(t).placement === "right" ? "start" : "middle"), l = T(() => i(Oi) && !!d.onAnnotationRemove), p = T(() => Math.max(14, i(t).label.length * 6.2 + 8));
2589
+ var m = Sn();
2590
+ let g;
2591
+ var _ = b(m), v = (e) => {
2592
+ var n = vn(), a = D(n), o = C(a), s = C(o), c = b(s, !0);
2593
+ w(s), h(() => {
2594
+ y(a, "x1", i(t).x), y(a, "y1", i(t).y), y(a, "x2", i(t).x), y(a, "y2", i(t).y - 24), y(a, "stroke", i(t).color), y(o, "x", i(t).x), y(o, "y", i(t).y - 24), y(o, "width", i(p)), y(o, "fill", i(t).color), y(s, "x", i(t).x + i(p) / 2), y(s, "y", i(t).y - 14.5), u(c, i(t).label);
2595
+ }), r(e, n);
2596
+ }, ee = (e) => {
2597
+ var n = yn(), a = D(n), l = C(a), d = b(l, !0);
2598
+ w(l);
2599
+ var f = C(l), p = b(f, !0);
2600
+ w(f), h((e) => {
2601
+ y(a, "d", `M${i(t).x},${i(t).y} c-7,-9 -8,-13 -8,-16 a8,8 0 1,1 16,0 c0,3 -1,7 -8,16 z`), y(a, "fill", i(t).color), y(l, "x", i(t).x), y(l, "y", i(t).y - 12.5), u(d, e), y(f, "x", i(t).x + i(o)), y(f, "y", i(t).y + i(s)), y(f, "text-anchor", i(c)), y(f, "fill", i(t).color), u(p, i(t).label);
2602
+ }, [() => i(t).label.slice(0, 1)]), r(e, n);
2603
+ }, te = (e) => {
2604
+ var n = bn(), a = D(n), l = C(a), d = b(l, !0);
2605
+ w(l), h(() => {
2606
+ y(a, "x", i(t).x - 4.5), y(a, "y", i(t).y - 4.5), y(a, "fill", i(t).color), y(l, "x", i(t).x + i(o)), y(l, "y", i(t).y + i(s)), y(l, "text-anchor", i(c)), y(l, "fill", i(t).color), u(d, i(t).label);
2607
+ }), r(e, n);
2608
+ }, ne = (e) => {
2609
+ var n = xn(), a = D(n), d = C(a), f = b(d, !0);
2610
+ w(d), h(() => {
2611
+ y(a, "cx", i(t).x), y(a, "cy", i(t).y), y(a, "r", i(l) ? 6 : 4), y(a, "fill", i(t).color), y(d, "x", i(t).x + i(o)), y(d, "y", i(t).y + i(s)), y(d, "text-anchor", i(c)), y(d, "fill", i(t).color), u(f, i(t).label);
2612
+ }), r(e, n);
2613
+ };
2614
+ S(_, (e) => {
2615
+ i(t).shape === "flag" ? e(v) : i(t).shape === "pin" ? e(ee, 1) : i(t).shape === "square" ? e(te, 2) : e(ne, -1);
2616
+ }), w(m), h((e) => {
2617
+ g = O(m, 0, "sv-grid-chart-annotation-marker svelte-hyytey", null, g, {
2618
+ "is-removable": i(l),
2619
+ "has-text": !!i(t).text
2620
+ }), y(m, "role", i(l) ? "button" : i(t).text ? "img" : void 0), y(m, "tabindex", i(l) || i(t).text ? 0 : void 0), y(m, "aria-label", e);
2621
+ }, [() => i(l) ? N(i(P).removeNote, { label: i(t).label }) : i(t).text ? `${i(t).label}: ${i(t).text}` : void 0]), a("click", m, (e) => {
2622
+ !i(Oi) || !d.onAnnotationRemove || (e.stopPropagation(), d.onAnnotationRemove(i(n)));
2623
+ }), a("keydown", m, (e) => {
2624
+ !i(Oi) || !d.onAnnotationRemove || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), d.onAnnotationRemove(i(n)));
2625
+ }), f("mouseenter", m, (e) => {
2626
+ i(t).text && X(e.clientX, e.clientY, i(t).label, [{ value: i(t).text }]);
2627
+ }), f("mouseleave", m, () => {
2628
+ i(t).text && x(Y, null);
2629
+ }), f("focus", m, () => {
2630
+ if (!i(t).text || !i(L)) return;
2631
+ let e = i(L).getBoundingClientRect();
2632
+ X(e.left + i(t).x * e.width / i(H).width, e.top + i(t).y * e.height / i(H).height, i(t).label, [{ value: i(t).text }]);
2633
+ }), f("blur", m, () => {
2634
+ i(t).text && x(Y, null);
2635
+ }), r(e, m);
2636
+ });
2637
+ var Bc = C(zc), Vc = (e) => {
2638
+ var s = Fn(), c = b(s);
2639
+ n(c, 17, () => i(H).drawings, (e) => e.id, (e, s) => {
2640
+ let c = T(() => i(s).points[0]), l = T(() => i(s).points[1]), d = T(() => i(ga) === i(s).id);
2641
+ var f = jn();
2642
+ let p;
2643
+ var m = b(f), g = (e) => {
2644
+ let t = T(() => Math.atan2(i(l).y - i(c).y, i(l).x - i(c).x));
2645
+ var n = wn(), a = D(n), o = C(a), u = C(o), d = (e) => {
2646
+ var n = Cn();
2647
+ h((e) => {
2648
+ y(n, "d", e), y(n, "fill", i(s).color);
2649
+ }, [() => `M${i(l).x},${i(l).y} L${i(l).x - 10 * Math.cos(i(t) - .45)},${i(l).y - 10 * Math.sin(i(t) - .45)} L${i(l).x - 10 * Math.cos(i(t) + .45)},${i(l).y - 10 * Math.sin(i(t) + .45)} Z`]), r(e, n);
2650
+ };
2651
+ S(u, (e) => {
2652
+ i(s).kind === "arrow" && e(d);
2653
+ }), h(() => {
2654
+ y(a, "x1", i(c).x), y(a, "y1", i(c).y), y(a, "x2", i(l).x), y(a, "y2", i(l).y), y(o, "x1", i(c).x), y(o, "y1", i(c).y), y(o, "x2", i(l).x), y(o, "y2", i(l).y), y(o, "stroke", i(s).color);
2655
+ }), r(e, n);
2656
+ }, _ = (e) => {
2657
+ var t = Tn();
2658
+ h((e, n, r, a) => {
2659
+ y(t, "x", e), y(t, "y", n), y(t, "width", r), y(t, "height", a), y(t, "fill", i(s).color), y(t, "stroke", i(s).color);
2660
+ }, [
2661
+ () => Math.min(i(c).x, i(l).x),
2662
+ () => Math.min(i(c).y, i(l).y),
2663
+ () => Math.abs(i(l).x - i(c).x),
2664
+ () => Math.abs(i(l).y - i(c).y)
2665
+ ]), r(e, t);
2666
+ }, v = (e) => {
2667
+ var t = En(), n = D(t), a = C(n), o = C(a), l = b(o, !0);
2668
+ w(o), h(() => {
2669
+ y(n, "x1", i(c).x), y(n, "y1", i(c).y), y(n, "x2", i(H).plot.x + i(H).plot.w), y(n, "y2", i(c).y), y(a, "x1", i(c).x), y(a, "y1", i(c).y), y(a, "x2", i(H).plot.x + i(H).plot.w), y(a, "y2", i(c).y), y(a, "stroke", i(s).color), y(o, "x", i(H).plot.x + i(H).plot.w - 3), y(o, "y", i(c).y - 3), y(o, "fill", i(s).color), u(l, i(s).label);
2670
+ }), r(e, t);
2671
+ }, ee = (e) => {
2672
+ let t = T(() => Math.min(i(c).x, i(l).x)), a = T(() => Math.max(i(c).x, i(l).x));
2673
+ var o = On(), d = D(o);
2674
+ n(d, 17, () => i(s).levels, (e) => e.ratio, (e, n) => {
2675
+ var o = Dn(), c = D(o), l = C(c), d = b(l, !0);
2676
+ w(l), h(() => {
2677
+ y(c, "x1", i(t)), y(c, "y1", i(n).y), y(c, "x2", i(a)), y(c, "y2", i(n).y), y(c, "stroke", i(s).color), y(c, "stroke-dasharray", i(n).ratio === 0 || i(n).ratio === 1 ? void 0 : "3 3"), y(l, "x", i(t) + 3), y(l, "y", i(n).y - 2), y(l, "fill", i(s).color), u(d, i(n).label);
2678
+ }), r(e, o);
2679
+ });
2680
+ var f = C(d);
2681
+ h((e, n) => {
2682
+ y(f, "x", i(t)), y(f, "y", e), y(f, "width", i(a) - i(t)), y(f, "height", n);
2683
+ }, [() => Math.min(i(c).y, i(l).y), () => Math.abs(i(l).y - i(c).y)]), r(e, o);
2684
+ }, te = (e) => {
2685
+ var t = kn(), n = b(t, !0);
2686
+ w(t), h(() => {
2687
+ y(t, "x", i(c).x), y(t, "y", i(c).y), y(t, "fill", i(s).color), u(n, i(s).text ?? "");
2688
+ }), r(e, t);
2689
+ };
2690
+ S(m, (e) => {
2691
+ (i(s).kind === "trend" || i(s).kind === "arrow") && i(l) ? e(g) : i(s).kind === "rect" && i(l) ? e(_, 1) : i(s).kind === "hray" ? e(v, 2) : i(s).kind === "fib" && i(l) && i(s).levels ? e(ee, 3) : i(s).kind === "text" && e(te, 4);
2692
+ });
2693
+ var ne = C(m), re = (e) => {
2694
+ var c = o(), l = D(c);
2695
+ n(l, 17, () => i(s).points, t, (e, t, n) => {
2696
+ var o = An();
2697
+ h(() => {
2698
+ y(o, "cx", i(t).x), y(o, "cy", i(t).y), y(o, "stroke", i(s).color);
2699
+ }), a("pointerdown", o, (e) => {
2700
+ e.stopPropagation(), e.preventDefault(), x(ba, {
2701
+ id: i(s).id,
2702
+ index: n
2703
+ }, !0), i(L)?.setPointerCapture?.(e.pointerId);
2704
+ }), r(e, o);
2705
+ }), r(e, c);
2706
+ };
2707
+ S(ne, (e) => {
2708
+ i(d) && oi() && e(re);
2709
+ }), w(f), h((e) => {
2710
+ p = O(f, 0, `sv-grid-chart-drawing is-${i(s).kind}`, "svelte-hyytey", p, { "is-selected": i(d) }), y(f, "role", oi() ? "button" : void 0), y(f, "tabindex", oi() ? 0 : void 0), y(f, "aria-label", e);
2711
+ }, [() => oi() ? `${N(i(P).drawing, { tool: i(pa)[i(s).kind] })}${i(s).text ? `: ${i(s).text}` : ""}` : void 0]), a("click", f, (e) => {
2712
+ oi() && !i(R) && (e.stopPropagation(), x(ga, i(d) ? null : i(s).id, !0));
2713
+ }), a("keydown", f, (e) => {
2714
+ oi() && Aa(e, i(s).id);
2715
+ }), r(e, f);
2716
+ });
2717
+ var l = C(c), d = (e) => {
2718
+ var t = Pn(), n = D(t), a = C(n), o = (e) => {
2719
+ var t = Mn();
2720
+ h((e, n, r, i) => {
2721
+ y(t, "x", e), y(t, "y", n), y(t, "width", r), y(t, "height", i);
2722
+ }, [
2723
+ () => Math.min(i(z).px, i(ha).x),
2724
+ () => Math.min(i(z).py, i(ha).y),
2725
+ () => Math.abs(i(ha).x - i(z).px),
2726
+ () => Math.abs(i(ha).y - i(z).py)
2727
+ ]), r(e, t);
2728
+ }, s = (e) => {
2729
+ var t = Nn();
2730
+ h(() => {
2731
+ y(t, "x1", i(z).px), y(t, "y1", i(z).py), y(t, "x2", i(ha).x), y(t, "y2", i(ha).y);
2732
+ }), r(e, t);
2733
+ };
2734
+ S(a, (e) => {
2735
+ i(R) === "rect" ? e(o) : e(s, -1);
2736
+ }), h(() => {
2737
+ y(n, "cx", i(z).px), y(n, "cy", i(z).py);
2738
+ }), r(e, t);
2739
+ };
2740
+ S(l, (e) => {
2741
+ i(z) && i(ha) && e(d);
2742
+ }), w(s), h(() => y(s, "clip-path", `url(#${Li}-plot)`)), r(e, s);
2743
+ };
2744
+ S(Bc, (e) => {
2745
+ (i(H).drawings.length || i(z)) && e(Vc);
2746
+ });
2747
+ var Hc = C(Bc), Uc = (e) => {
2748
+ var t = o(), n = D(t), a = (e) => {
2749
+ let t = T(() => i(H).plot.y + i(Oo) * i(ms) + i(Oo) / 2);
2750
+ var n = In();
2751
+ h(() => {
2752
+ y(n, "x1", i(H).plot.x), y(n, "y1", i(t)), y(n, "x2", i(H).plot.x + i(H).plot.w), y(n, "y2", i(t));
2753
+ }), r(e, n);
2754
+ }, s = (e) => {
2755
+ let t = T(() => i(H).lines[0]?.points[i(ms)]), n = T(() => i(t) && Number.isFinite(i(t).x) ? i(t).x : i(H).plot.x + i(Oo) * i(ms) + i(Oo) / 2);
2756
+ var a = zn(), o = D(a), s = C(o), c = (e) => {
2757
+ let t = T(() => ls(i(Y)?.title ?? i(V).categories[i(ms)] ?? "", 16)), a = T(() => Math.max(24, i(t).length * 6.2 + 10));
2758
+ var o = Rn(), s = D(o), c = b(s), l = C(c), d = b(l, !0);
2759
+ w(l), w(s);
2760
+ var f = C(s), p = (e) => {
2761
+ let t = T(() => vs(i(U).yInvert(i(_s)))), n = T(() => Math.max(24, i(t).length * 6.2 + 10));
2762
+ var a = Ln(), o = b(a), s = C(o), c = b(s, !0);
2763
+ w(s), w(a), h((e, r) => {
2764
+ y(o, "x", e), y(o, "y", i(_s) - 7.5), y(o, "width", i(n)), y(s, "x", r), y(s, "y", i(_s) + 3.5), u(c, i(t));
2765
+ }, [() => Math.max(0, i(H).plot.x - i(n) - 2), () => Math.max(i(n) / 2, i(H).plot.x - 2 - i(n) / 2)]), r(e, a);
2766
+ };
2767
+ S(f, (e) => {
2768
+ i(_s) != null && i(U) && i(H).axes && e(p);
2769
+ }), h((e, n) => {
2770
+ y(c, "x", e), y(c, "y", i(H).plot.y + i(H).plot.h + 2), y(c, "width", i(a)), y(l, "x", n), y(l, "y", i(H).plot.y + i(H).plot.h + 13), u(d, i(t));
2771
+ }, [() => Math.max(0, Math.min(i(H).width - i(a), i(n) - i(a) / 2)), () => Math.max(i(a) / 2, Math.min(i(H).width - i(a) / 2, i(n)))]), r(e, o);
2772
+ };
2773
+ S(s, (e) => {
2774
+ ti() && e(c);
2775
+ }), h(() => {
2776
+ y(o, "x1", i(n)), y(o, "y1", i(H).plot.y), y(o, "x2", i(n)), y(o, "y2", i(H).plot.y + i(H).plot.h);
2777
+ }), r(e, a);
2778
+ };
2779
+ S(n, (e) => {
2780
+ i(G) ? e(a) : e(s, -1);
2781
+ }), r(e, t);
2782
+ };
2783
+ S(Hc, (e) => {
2784
+ i(W) && i(ms) !== null && e(Uc);
2785
+ });
2786
+ var Wc = C(Hc), Gc = (e) => {
2787
+ var o = Kn(), s = D(o);
2788
+ n(s, 17, () => i(H).heatmapRowTicks, (e) => e.value, (e, t, n, a) => {
2789
+ var o = Bn(), s = b(o, !0);
2790
+ w(o), h((e) => {
2791
+ y(o, "x", i(H).plot.x - 8), y(o, "y", i(t).y + 3), u(s, e);
2792
+ }, [() => ls(i(t).label, 22)]), r(e, o);
2793
+ });
2794
+ var c = C(s);
2795
+ n(c, 19, () => i(H).heatmapColTicks, (e, t) => e.label + t, (e, t, n, a) => {
2796
+ var o = Vn(), s = b(o, !0);
2797
+ w(o), h((e) => {
2798
+ y(o, "x", i(t).x), y(o, "y", i(H).plot.y + i(H).plot.h + 14), u(s, e);
2799
+ }, [() => ls(i(t).label, 14)]), r(e, o);
2800
+ });
2801
+ var l = C(c);
2802
+ n(l, 17, () => i(H).heatmapCells, t, (e, t, n) => {
2803
+ var o = Un(), s = D(o), c = C(s), l = (e) => {
2804
+ var n = Hn(), a = b(n, !0);
2805
+ w(n), h((e) => {
2806
+ y(n, "x", i(t).x + i(t).w / 2), y(n, "y", i(t).y + i(t).h / 2 + 3), y(n, "fill", i(t).textColor), u(a, e);
2807
+ }, [() => I(i(t).value)]), r(e, n);
2808
+ };
2809
+ S(c, (e) => {
2810
+ i(wi).show && i(t).w > 22 && i(t).h > 14 && e(l);
2811
+ }), h((e, n) => {
2812
+ y(s, "x", i(t).x), y(s, "y", i(t).y), y(s, "width", i(t).w), y(s, "height", i(t).h), y(s, "fill", i(t).color), y(s, "role", d.onSelect || i(q) ? "button" : "img"), y(s, "tabindex", e), y(s, "aria-label", n);
2813
+ }, [() => Rs(".sv-grid-chart-heatcell", n), () => `${i(t).rowLabel} ${i(t).colLabel}: ${I(i(t).value)}`]), a("mousemove", s, (e) => Ds(e.clientX, e.clientY, i(t))), f("mouseleave", s, Z), f("focus", s, (e) => {
2814
+ zs(".sv-grid-chart-heatcell", n);
2815
+ let r = Vs(e.currentTarget);
2816
+ Ds(r.x, r.y, i(t));
2817
+ }), f("blur", s, Z), a("click", s, () => Q(i(t).colLabel, i(t).rowLabel, i(t).value)), a("keydown", s, (e) => Bs(e, ".sv-grid-chart-heatcell", n, d.onSelect || i(q) ? () => Q(i(t).colLabel, i(t).rowLabel, i(t).value) : null, { cols: i(H).heatmapColTicks.length })), r(e, o);
2818
+ });
2819
+ var p = C(l), m = (e) => {
2820
+ let a = T(() => i(H).plot.x + i(H).plot.w + 14), o = T(() => i(H).plot.h - 20), s = T(() => i(H).heatmapLegend);
2821
+ var c = Gn(), l = D(c), d = b(l);
2822
+ n(d, 21, () => i(s), t, (e, t, n) => {
2823
+ var a = Wn();
2824
+ h(() => {
2825
+ y(a, "offset", `${n / (i(s).length - 1) * 100}%`), y(a, "stop-color", i(t).color);
2826
+ }), r(e, a);
2827
+ }), w(d), w(l);
2828
+ var f = C(l), p = C(f), m = b(p, !0);
2829
+ w(p);
2830
+ var g = C(p), _ = b(g, !0);
2831
+ w(g), h(() => {
2832
+ y(d, "id", `${Li}-heatscale`), y(f, "x", i(a)), y(f, "y", i(H).plot.y + 10), y(f, "height", i(o)), y(f, "fill", `url(#${Li}-heatscale)`), y(p, "x", i(a) + 14), y(p, "y", i(H).plot.y + 14), u(m, i(s)[i(s).length - 1].label), y(g, "x", i(a) + 14), y(g, "y", i(H).plot.y + 10 + i(o)), u(_, i(s)[0].label);
2833
+ }), r(e, c);
2834
+ };
2835
+ S(p, (e) => {
2836
+ i(H).heatmapLegend.length && e(m);
2837
+ }), r(e, o);
2838
+ };
2839
+ S(Wc, (e) => {
2840
+ i(xo) && e(Gc);
2841
+ });
2842
+ var Kc = C(Wc), qc = (e) => {
2843
+ var s = o(), c = D(s);
2844
+ n(c, 17, () => i(H).funnelSegments, t, (e, t, n) => {
2845
+ var o = Jn(), s = D(o), c = C(s), l = (e) => {
2846
+ var n = qn(), a = D(n), o = b(a, !0);
2847
+ w(a);
2848
+ var s = C(a), c = b(s);
2849
+ w(s), h((e, n, r) => {
2850
+ y(a, "x", i(t).cx), y(a, "y", i(t).cy - 3), y(a, "fill", i(t).textColor), u(o, e), y(s, "x", i(t).cx), y(s, "y", i(t).cy + 11), y(s, "fill", i(t).textColor), u(c, `${n ?? ""} · ${r ?? ""}%`);
2851
+ }, [
2852
+ () => ls(i(t).label, 24),
2853
+ () => I(i(t).value),
2854
+ () => (i(t).conversion * 100).toFixed(0)
2855
+ ]), r(e, n);
2856
+ }, p = T(() => i(H).plot.h / Math.max(1, i(H).funnelSegments.length) >= 26);
2857
+ S(c, (e) => {
2858
+ i(p) && e(l);
2859
+ }), h((e, n) => {
2860
+ y(s, "d", i(t).path), y(s, "fill", i(t).color), y(s, "role", d.onSelect || i(q) ? "button" : "img"), y(s, "tabindex", e), y(s, "aria-label", n);
2861
+ }, [() => Rs(".sv-grid-chart-funnel-seg", n), () => `${i(t).label}: ${I(i(t).value)}`]), a("mousemove", s, (e) => Os(e.clientX, e.clientY, i(t))), f("mouseleave", s, Z), f("focus", s, (e) => {
2862
+ zs(".sv-grid-chart-funnel-seg", n);
2863
+ let r = Vs(e.currentTarget);
2864
+ Os(r.x, r.y, i(t));
2865
+ }), f("blur", s, Z), a("click", s, () => Q(i(t).label, i(t).label, i(t).value, n)), a("keydown", s, (e) => Bs(e, ".sv-grid-chart-funnel-seg", n, d.onSelect || i(q) ? () => Q(i(t).label, i(t).label, i(t).value, n) : null)), r(e, o);
2866
+ }), r(e, s);
2867
+ };
2868
+ S(Kc, (e) => {
2869
+ i(So) && e(qc);
2870
+ });
2871
+ var Jc = C(Kc), Yc = (e) => {
2872
+ let o = T(() => i(H).radarCenter);
2873
+ var s = $n(), c = D(s);
2874
+ n(c, 17, () => i(H).radarRings, t, (e, t, n) => {
2875
+ let a = T(() => i(o).r * ((n + 1) / i(H).radarRings.length));
2876
+ var s = Yn();
2877
+ h(() => {
2878
+ y(s, "cx", i(o).cx), y(s, "cy", i(o).cy), y(s, "r", i(a));
2879
+ }), r(e, s);
2880
+ });
2881
+ var l = C(c);
2882
+ n(l, 17, () => i(H).radarAxes, t, (e, t) => {
2883
+ let n = T(() => i(t).x - i(o).cx), a = T(() => i(t).y - i(o).cy), s = T(() => i(o).cx + i(n) * 1.08), c = T(() => i(o).cy + i(a) * 1.08);
2884
+ var l = Xn(), d = D(l), f = C(d), p = b(f, !0);
2885
+ w(f), h((e) => {
2886
+ y(d, "x1", i(o).cx), y(d, "y1", i(o).cy), y(d, "x2", i(t).x), y(d, "y2", i(t).y), y(f, "x", i(s)), y(f, "y", i(c) + 3), y(f, "text-anchor", e), u(p, i(t).label);
2887
+ }, [() => Math.abs(i(n)) < 1 ? "middle" : i(n) > 0 ? "start" : "end"]), r(e, l);
2888
+ });
2889
+ var d = C(l);
2890
+ n(d, 17, () => i(H).radarSeries, t, (e, o, s) => {
2891
+ var c = Qn(), l = D(c), u = C(l);
2892
+ n(u, 17, () => i(o).points, t, (e, t, n) => {
2893
+ let c = T(() => s * i(o).points.length + n);
2894
+ var l = Zn();
2895
+ h((e, n) => {
2896
+ y(l, "cx", i(t).x), y(l, "cy", i(t).y), y(l, "fill", i(o).color), y(l, "tabindex", e), y(l, "aria-label", n);
2897
+ }, [() => Rs(".sv-grid-chart-radar-dot", i(c)), () => `${i(o).label} ${i(t).axis}: ${I(i(t).value)}`]), a("mousemove", l, (e) => Ns(e.clientX, e.clientY, i(o).label, i(t).axis, i(t).value, i(o).color)), f("mouseleave", l, Z), f("focus", l, (e) => {
2898
+ zs(".sv-grid-chart-radar-dot", i(c));
2899
+ let n = Vs(e.currentTarget);
2900
+ Ns(n.x, n.y, i(o).label, i(t).axis, i(t).value, i(o).color);
2901
+ }), f("blur", l, Z), a("keydown", l, (e) => Bs(e, ".sv-grid-chart-radar-dot", i(c))), r(e, l);
2902
+ }), h((e) => {
2903
+ y(l, "d", i(o).path), y(l, "fill", i(o).color), y(l, "stroke", i(o).color), g(l, e);
2904
+ }, [() => `opacity:${K(i(o).label)}`]), r(e, c);
2905
+ }), r(e, s);
2906
+ };
2907
+ S(Jc, (e) => {
2908
+ i(Co) && i(H).radarCenter && e(Yc);
2909
+ });
2910
+ var Xc = C(Jc), Zc = (e) => {
2911
+ var s = ar(), c = D(s);
2912
+ n(c, 17, () => i(H).calendarMonthTicks, t, (e, t, n, a) => {
2913
+ var o = er(), s = b(o, !0);
2914
+ w(o), h(() => {
2915
+ y(o, "x", i(t).x), y(o, "y", i(H).plot.y - 8), u(s, i(t).label);
2916
+ }), r(e, o);
2917
+ });
2918
+ var l = C(c);
2919
+ n(l, 16, () => [
2920
+ "Mon",
2921
+ "Wed",
2922
+ "Fri"
2923
+ ], t, (e, t, n) => {
2924
+ let a = T(() => [
2925
+ 1,
2926
+ 3,
2927
+ 5
2928
+ ][n]), s = T(() => i(H).calendarCells[i(a)]);
2929
+ var c = o(), l = D(c), d = (e) => {
2930
+ var n = tr(), a = b(n, !0);
2931
+ w(n), h(() => {
2932
+ y(n, "x", i(H).plot.x - 6), y(n, "y", i(s).y + i(s).size / 2 + 3), u(a, t);
2933
+ }), r(e, n);
2934
+ };
2935
+ S(l, (e) => {
2936
+ i(s) && e(d);
2937
+ }), r(e, c);
2938
+ });
2939
+ var d = C(l);
2940
+ n(d, 17, () => i(H).calendarCells, t, (e, t, n) => {
2941
+ var o = nr();
2942
+ let s;
2943
+ h((e, n) => {
2944
+ s = O(o, 0, "sv-grid-chart-calendar-cell svelte-hyytey", null, s, { "is-blank": !i(t).defined }), y(o, "x", i(t).x + 1), y(o, "y", i(t).y + 1), y(o, "width", i(t).size - 2), y(o, "height", i(t).size - 2), y(o, "fill", i(t).defined ? i(t).color : "transparent"), y(o, "tabindex", e), y(o, "aria-label", n);
2945
+ }, [() => Rs(".sv-grid-chart-calendar-cell", n), () => `${xs(i(t).date)}: ${i(t).defined ? I(i(t).value) : i(P).noValue}`]), a("mousemove", o, (e) => i(t).defined && X(e.clientX, e.clientY, xs(i(t).date), [{
2946
+ color: i(t).color,
2947
+ value: I(i(t).value)
2948
+ }])), f("mouseleave", o, Z), f("focus", o, (e) => {
2949
+ if (zs(".sv-grid-chart-calendar-cell", n), i(t).defined) {
2950
+ let n = Vs(e.currentTarget);
2951
+ X(n.x, n.y, xs(i(t).date), [{
2952
+ color: i(t).color,
2953
+ value: I(i(t).value)
2954
+ }]);
2955
+ }
2956
+ }), f("blur", o, Z), a("keydown", o, (e) => Bs(e, ".sv-grid-chart-calendar-cell", n, null, {
2957
+ cols: 7,
2958
+ colMajor: !0
2959
+ })), r(e, o);
2960
+ });
2961
+ var p = C(d), m = (e) => {
2962
+ let a = T(() => i(H).plot.x + i(H).plot.w + 12), o = T(() => i(H).plot.y + 4);
2963
+ var s = ir(), c = D(s), l = C(c);
2964
+ n(l, 17, () => i(H).calendarLegend, t, (e, t, n) => {
2965
+ var s = rr(), c = D(s), l = C(c), d = b(l, !0);
2966
+ w(l), h(() => {
2967
+ y(c, "x", i(a)), y(c, "y", i(o) + 6 + n * 13), y(c, "fill", i(t).color), y(l, "x", i(a) + 14), y(l, "y", i(o) + 14 + n * 13), u(d, i(t).label);
2968
+ }), r(e, s);
2969
+ });
2970
+ var d = C(l);
2971
+ h(() => {
2972
+ y(c, "x", i(a)), y(c, "y", i(o)), y(d, "x", i(a)), y(d, "y", i(o) + 12 + i(H).calendarLegend.length * 13);
2973
+ }), r(e, s);
2974
+ };
2975
+ S(p, (e) => {
2976
+ i(H).calendarLegend.length && e(m);
2977
+ }), r(e, s);
2978
+ };
2979
+ S(Xc, (e) => {
2980
+ i(wo) && e(Zc);
2981
+ });
2982
+ var Qc = C(Xc), $c = (e) => {
2983
+ let a = T(() => i(H).gauge);
2984
+ var o = lr(), s = D(o);
2985
+ n(s, 17, () => i(a).ticks, t, (e, t) => {
2986
+ var n = or();
2987
+ let a;
2988
+ h(() => {
2989
+ a = O(n, 0, "sv-grid-chart-gauge-tick svelte-hyytey", null, a, { "is-major": i(t).major }), y(n, "x1", i(t).x1), y(n, "y1", i(t).y1), y(n, "x2", i(t).x2), y(n, "y2", i(t).y2);
2990
+ }), r(e, n);
2991
+ });
2992
+ var c = C(s), l = C(c);
2993
+ n(l, 17, () => i(a).rangePaths, t, (e, t) => {
2994
+ var n = sr();
2995
+ h(() => {
2996
+ y(n, "d", i(t).path), y(n, "stroke", i(t).color);
2997
+ }), r(e, n);
2998
+ });
2999
+ var d = C(l), f = C(d), p = (e) => {
3000
+ var t = cr();
3001
+ h(() => {
3002
+ y(t, "x1", i(a).target.x1), y(t, "y1", i(a).target.y1), y(t, "x2", i(a).target.x2), y(t, "y2", i(a).target.y2);
3003
+ }), r(e, t);
3004
+ };
3005
+ S(f, (e) => {
3006
+ i(a).target && e(p);
3007
+ });
3008
+ var m = C(f), g = C(m), _ = C(g), v = C(_), ee = b(v, !0);
3009
+ w(v);
3010
+ var te = C(v), ne = b(te, !0);
3011
+ w(te);
3012
+ var x = C(te), re = b(x);
3013
+ w(x), h((e, t, n, r) => {
3014
+ y(c, "d", i(a).trackPath), y(d, "d", i(a).valuePath), y(d, "stroke", i(a).valueColor ?? "var(--sg-accent, #2563eb)"), y(m, "d", i(a).needle.path), y(g, "cx", i(a).cx), y(g, "cy", i(a).cy), y(g, "r", i(a).needle.hubR), y(_, "cx", i(a).cx), y(_, "cy", i(a).cy), y(v, "x", i(a).minLabel.x), y(v, "y", i(a).minLabel.y), u(ee, e), y(te, "x", i(a).maxLabel.x), y(te, "y", i(a).maxLabel.y), u(ne, t), y(x, "x", i(a).cx), y(x, "y", i(a).cy + 38), u(re, `${n ?? ""}${r ?? ""}`);
3015
+ }, [
3016
+ () => I(i(a).min),
3017
+ () => I(i(a).max),
3018
+ () => I(i(a).value),
3019
+ () => i(a).unit ? /^[%°′″]/.test(i(a).unit) ? i(a).unit : ` ${i(a).unit}` : ""
3020
+ ]), r(e, o);
3021
+ };
3022
+ S(Qc, (e) => {
3023
+ i(To) && i(H).gauge && e($c);
3024
+ });
3025
+ var el = C(Qc), tl = (e) => {
3026
+ var s = o(), c = D(s);
3027
+ n(c, 17, () => i(H).treemapCells, t, (e, t, n) => {
3028
+ var o = fr(), s = D(o), c = C(s), l = (e) => {
3029
+ var n = ur(), a = b(n, !0);
3030
+ w(n), h((e) => {
3031
+ y(n, "x", i(t).x + 4), y(n, "y", i(t).y + 12), y(n, "fill", i(t).textColor), u(a, e);
3032
+ }, [() => ls(i(t).name, Math.max(3, Math.floor(i(t).w / 7)))]), r(e, n);
3033
+ };
3034
+ S(c, (e) => {
3035
+ i(t).w > 36 && i(t).h > 18 && e(l);
3036
+ });
3037
+ var p = C(c), m = (e) => {
3038
+ var n = dr(), a = b(n, !0);
3039
+ w(n), h((e) => {
3040
+ y(n, "x", i(t).x + 4), y(n, "y", i(t).y + 24), y(n, "fill", i(t).textColor), u(a, e);
3041
+ }, [() => I(i(t).value)]), r(e, n);
3042
+ };
3043
+ S(p, (e) => {
3044
+ i(t).w > 60 && i(t).h > 30 && e(m);
3045
+ }), h((e, n) => {
3046
+ y(s, "x", i(t).x), y(s, "y", i(t).y), y(s, "width", i(t).w), y(s, "height", i(t).h), y(s, "fill", i(t).color), y(s, "role", d.onSelect || i(q) || i(Ya) ? "button" : "img"), y(s, "tabindex", e), y(s, "aria-label", n);
3047
+ }, [() => Rs(".sv-grid-chart-treemap-cell", n), () => `${i(t).name}: ${I(i(t).value)}`]), a("mousemove", s, (e) => X(e.clientX, e.clientY, i(t).name, [{
3048
+ color: i(t).color,
3049
+ value: I(i(t).value)
3050
+ }])), f("mouseleave", s, Z), f("focus", s, (e) => {
3051
+ zs(".sv-grid-chart-treemap-cell", n);
3052
+ let r = Vs(e.currentTarget);
3053
+ X(r.x, r.y, i(t).name, [{
3054
+ color: i(t).color,
3055
+ value: I(i(t).value)
3056
+ }]);
3057
+ }), f("blur", s, Z), a("click", s, (e) => {
3058
+ i(Ya) && no([...Ge(), ...Ae(i(Xa), i(t).name) ?? []]) || Q(i(t).name, "", i(t).value, void 0, e);
3059
+ }), a("keydown", s, (e) => Bs(e, ".sv-grid-chart-treemap-cell", n, () => {
3060
+ i(Ya) && no([...Ge(), ...Ae(i(Xa), i(t).name) ?? []]) || (d.onSelect || i(q)) && Q(i(t).name, "", i(t).value, void 0, e);
3061
+ })), r(e, o);
3062
+ }), r(e, s);
3063
+ };
3064
+ S(el, (e) => {
3065
+ i(Eo) && e(tl);
3066
+ });
3067
+ var nl = C(el), rl = (e) => {
3068
+ var o = hr(), s = D(o);
3069
+ n(s, 17, () => i(H).sankeyLinks, t, (e, t, n) => {
3070
+ var o = pr();
3071
+ h((e, n) => {
3072
+ y(o, "d", i(t).path), y(o, "stroke", i(t).color), y(o, "stroke-width", i(t).width), y(o, "tabindex", e), y(o, "aria-label", n);
3073
+ }, [() => Rs(".sv-grid-chart-sankey-link", n), () => `${i(t).source} → ${i(t).target}: ${I(i(t).value)}`]), a("mousemove", o, (e) => X(e.clientX, e.clientY, `${i(t).source} → ${i(t).target}`, [{
3074
+ color: i(t).color,
3075
+ value: I(i(t).value)
3076
+ }])), f("mouseleave", o, Z), f("focus", o, (e) => {
3077
+ zs(".sv-grid-chart-sankey-link", n);
3078
+ let r = Vs(e.currentTarget);
3079
+ X(r.x, r.y, `${i(t).source} → ${i(t).target}`, [{
3080
+ color: i(t).color,
3081
+ value: I(i(t).value)
3082
+ }]);
3083
+ }), f("blur", o, Z), a("keydown", o, (e) => Bs(e, ".sv-grid-chart-sankey-link", n)), r(e, o);
3084
+ });
3085
+ var c = C(s);
3086
+ n(c, 17, () => i(H).sankeyNodes, t, (e, t, n) => {
3087
+ var o = mr(), s = D(o), c = C(s), l = b(c, !0);
3088
+ w(c), h((e, n) => {
3089
+ y(s, "x", i(t).x), y(s, "y", i(t).y), y(s, "width", i(t).w), y(s, "height", i(t).h), y(s, "fill", i(t).color), y(s, "tabindex", e), y(s, "aria-label", n), y(c, "x", i(t).column === 0 ? i(t).x + i(t).w + 4 : i(t).x - 4), y(c, "y", i(t).y + i(t).h / 2 + 3), y(c, "text-anchor", i(t).column === 0 ? "start" : "end"), u(l, i(t).label);
3090
+ }, [() => Rs(".sv-grid-chart-sankey-node", n), () => N(i(P).sankeyNode, {
3091
+ label: i(t).label,
3092
+ in: I(i(t).totalIn),
3093
+ out: I(i(t).totalOut)
3094
+ })]), a("mousemove", s, (e) => X(e.clientX, e.clientY, i(t).label, [{
3095
+ label: "in",
3096
+ value: I(i(t).totalIn)
3097
+ }, {
3098
+ label: "out",
3099
+ value: I(i(t).totalOut)
3100
+ }])), f("mouseleave", s, Z), f("focus", s, (e) => {
3101
+ zs(".sv-grid-chart-sankey-node", n);
3102
+ let r = Vs(e.currentTarget);
3103
+ X(r.x, r.y, i(t).label, [{
3104
+ label: "in",
3105
+ value: I(i(t).totalIn)
3106
+ }, {
3107
+ label: "out",
3108
+ value: I(i(t).totalOut)
3109
+ }]);
3110
+ }), f("blur", s, Z), a("keydown", s, (e) => Bs(e, ".sv-grid-chart-sankey-node", n)), r(e, o);
3111
+ }), r(e, o);
3112
+ };
3113
+ S(nl, (e) => {
3114
+ i(Do) && e(rl);
3115
+ });
3116
+ var il = C(nl), al = (e) => {
3117
+ var s = Cr(), c = D(s), l = (e) => {
3118
+ var a = o(), s = D(a);
3119
+ n(s, 17, () => i(H).polarRings, t, (e, t) => {
3120
+ var n = gr();
3121
+ h(() => {
3122
+ y(n, "cx", i(H).radarCenter.cx), y(n, "cy", i(H).radarCenter.cy), y(n, "r", i(t));
3123
+ }), r(e, n);
3124
+ }), r(e, a);
3125
+ };
3126
+ S(c, (e) => {
3127
+ i(H).radarCenter && i(H).polarRings.length && e(l);
3128
+ });
3129
+ var p = C(c);
3130
+ n(p, 17, () => i(H).polarAxes, t, (e, t) => {
3131
+ var n = _r(), a = b(n, !0);
3132
+ w(n), h((e) => {
3133
+ y(n, "x", i(t).x), y(n, "y", i(t).y + 3), y(n, "text-anchor", i(t).x < (i(H).radarCenter?.cx ?? 0) - 2 ? "end" : i(t).x > (i(H).radarCenter?.cx ?? 0) + 2 ? "start" : "middle"), u(a, e);
3134
+ }, [() => ls(i(t).label, 14)]), r(e, n);
3135
+ });
3136
+ var m = C(p);
3137
+ n(m, 17, () => i(H).arcs, t, (e, t) => {
3138
+ var n = o(), a = D(n), s = (e) => {
3139
+ var n = vr();
3140
+ h(() => y(n, "d", i(t).trackPath)), r(e, n);
3141
+ };
3142
+ S(a, (e) => {
3143
+ i(t).trackPath && e(s);
3144
+ }), r(e, n);
3145
+ });
3146
+ var _ = C(m);
3147
+ n(_, 17, () => i(H).chordRibbons, t, (e, t) => {
3148
+ var n = yr();
3149
+ h((e) => {
3150
+ y(n, "d", i(t).path), y(n, "fill", i(t).color), y(n, "stroke", i(t).color), g(n, e);
3151
+ }, [() => `opacity:${K(i(t).source) === 1 && K(i(t).target) === 1 ? 1 : .18}`]), a("mousemove", n, (e) => As(e.clientX, e.clientY, i(t))), f("mouseleave", n, Z), r(e, n);
3152
+ });
3153
+ var v = C(_);
3154
+ n(v, 17, () => i(H).arcs, t, (e, t, n) => {
3155
+ var o = br();
3156
+ let s;
3157
+ h((e, n, r, a) => {
3158
+ s = O(o, 0, "sv-grid-chart-arc svelte-hyytey", null, s, e), y(o, "d", i(t).path), y(o, "fill", i(t).color), g(o, n), y(o, "role", d.onSelect || i(q) || i(Ya) && i(t).nodePath ? "button" : "img"), y(o, "tabindex", r), y(o, "aria-label", a);
3159
+ }, [
3160
+ () => ({
3161
+ "is-selected": Ho(i(t).label, i(t).series),
3162
+ "is-drillable": i(Ya) && !!i(t).nodePath && !!me(i(Ja), i(t).nodePath)?.children?.length
3163
+ }),
3164
+ () => `opacity:${K(i(yo) || i(F).type === "sunburst" || i(F).type === "chord" ? i(t).label : i(t).series)}`,
3165
+ () => Rs(".sv-grid-chart-arc", n),
3166
+ () => `${i(t).nodePath ? i(t).nodePath.join(" / ") : i(t).label}${i(t).series ? ` ${i(t).series}` : ""}: ${I(i(t).value)}`
3167
+ ]), a("mousemove", o, (e) => ks(e.clientX, e.clientY, i(t))), f("mouseleave", o, Z), f("focus", o, (e) => {
3168
+ zs(".sv-grid-chart-arc", n);
3169
+ let r = Vs(e.currentTarget);
3170
+ ks(r.x, r.y, i(t));
3171
+ }), f("blur", o, Z), a("click", o, (e) => {
3172
+ i(t).nodePath && no(i(t).nodePath) || Q(i(t).label, i(t).series, i(t).value, void 0, e);
3173
+ }), a("keydown", o, (e) => Bs(e, ".sv-grid-chart-arc", n, () => {
3174
+ i(t).nodePath && no(i(t).nodePath) || (d.onSelect || i(q)) && Q(i(t).label, i(t).series, i(t).value, void 0, e);
3175
+ })), r(e, o);
3176
+ });
3177
+ var ee = C(v);
3178
+ n(ee, 17, () => i(H).arcs, t, (e, t) => {
3179
+ var n = o(), a = D(n), s = (e) => {
3180
+ var n = o(), a = D(n), s = (e) => {
3181
+ var n = xr(), a = b(n, !0);
3182
+ w(n), h((e) => {
3183
+ y(n, "x", i(t).lx), y(n, "y", i(t).ly + 3), y(n, "text-anchor", i(t).lx < i(t).cx - 2 ? "end" : i(t).lx > i(t).cx + 2 ? "start" : "middle"), u(a, e);
3184
+ }, [() => ls(i(t).label, 14)]), r(e, n);
3185
+ };
3186
+ S(a, (e) => {
3187
+ i(t).a1 - i(t).a0 > .12 && i(F).xAxis?.labels !== !1 && e(s);
3188
+ }), r(e, n);
3189
+ }, c = (e) => {
3190
+ var n = Sr(), a = b(n, !0);
3191
+ w(n), h((e) => {
3192
+ y(n, "x", i(t).lx), y(n, "y", i(t).ly), y(n, "fill", i(t).textColor), u(a, e);
3193
+ }, [() => ls(i(wi).show && i(F).type !== "sunburst" ? I(i(t).value) : i(t).label, 12)]), r(e, n);
3194
+ };
3195
+ S(a, (e) => {
3196
+ i(F).type === "chord" ? e(s) : (i(t).a1 - i(t).a0) * (i(t).r0 + i(t).r1) / 2 > 34 && i(t).r1 - i(t).r0 > 12 && (i(F).type === "sunburst" || i(wi).show) && e(c, 1);
3197
+ }), r(e, n);
3198
+ }), r(e, s);
3199
+ };
3200
+ S(il, (e) => {
3201
+ i(_o) && e(al);
3202
+ });
3203
+ var ol = C(il), sl = (e) => {
3204
+ var s = o(), c = D(s);
3205
+ n(c, 17, () => i(H).bullets, t, (e, o) => {
3206
+ var s = Er(), c = b(s);
3207
+ n(c, 17, () => i(o).ranges, t, (e, t) => {
3208
+ var n = wr();
3209
+ h(() => {
3210
+ y(n, "x", i(t).x), y(n, "y", i(o).y), y(n, "width", i(t).w), y(n, "height", i(o).h), y(n, "fill", i(t).color);
3211
+ }), r(e, n);
3212
+ });
3213
+ var l = C(c), u = C(l), d = (e) => {
3214
+ var t = Tr();
3215
+ h(() => {
3216
+ y(t, "x1", i(o).targetX), y(t, "y1", i(o).y + i(o).h * .15), y(t, "x2", i(o).targetX), y(t, "y2", i(o).y + i(o).h * .85);
3217
+ }), r(e, t);
3218
+ };
3219
+ S(u, (e) => {
3220
+ i(o).targetX != null && e(d);
3221
+ }), w(s), h(() => {
3222
+ y(l, "x", i(o).x), y(l, "y", i(o).y + i(o).h * .3), y(l, "width", i(o).measureW), y(l, "height", i(o).h * .4), y(l, "fill", i(o).color);
3223
+ }), a("mousemove", s, (e) => js(e.clientX, e.clientY, i(o))), f("mouseleave", s, Z), r(e, s);
3224
+ }), r(e, s);
3225
+ };
3226
+ S(ol, (e) => {
3227
+ i(vo) && e(sl);
3228
+ });
3229
+ var cl = C(ol);
3230
+ n(cl, 17, () => i(H).slices, t, (e, t, n) => {
3231
+ var o = kr(), s = D(o);
3232
+ let c;
3233
+ var l = C(s), p = (e) => {
3234
+ var n = Dr(), a = D(n), o = C(a), s = b(o, !0);
3235
+ w(o), h((e) => {
3236
+ y(a, "points", `${i(t).callout.x1},${i(t).callout.y1} ${i(t).callout.x2},${i(t).callout.y2} ${i(t).callout.x3},${i(t).callout.y2}`), y(a, "stroke", i(t).color), y(o, "x", i(t).callout.tx), y(o, "y", i(t).callout.ty + 3.5), y(o, "text-anchor", i(t).callout.anchor), u(s, e);
3237
+ }, [() => i(wi).formatter ? i(wi).formatter(i(t).value, {
3238
+ category: i(t).label,
3239
+ series: i(t).label
3240
+ }) : `${ls(i(t).label, Math.min(18, i(t).callout.maxChars))} ${i(t).percent.toFixed(0)}%`]), r(e, n);
3241
+ }, m = (e) => {
3242
+ var n = Or(), a = b(n);
3243
+ w(n), h((e) => {
3244
+ y(n, "x", i(t).cx), y(n, "y", i(t).cy), u(a, `${e ?? ""}%`);
3245
+ }, [() => i(t).percent.toFixed(0)]), r(e, n);
3246
+ };
3247
+ S(l, (e) => {
3248
+ i(t).callout ? e(p) : i(wi).show && i(wi).placement !== "outside" && i(t).percent >= 6 && e(m, 1);
3249
+ }), h((e, n, r, a, o) => {
3250
+ c = O(s, 0, "sv-grid-chart-slice svelte-hyytey", null, c, e), y(s, "d", i(t).path), y(s, "fill", i(t).color), g(s, n), y(s, "role", r), y(s, "tabindex", a), y(s, "aria-label", o);
3251
+ }, [
3252
+ () => ({
3253
+ "is-selected": Ho(i(t).label, i(t).label),
3254
+ "is-drillable": eo(i(t).label)
3255
+ }),
3256
+ () => `opacity:${Uo(i(t).label, i(t).label)}`,
3257
+ () => d.onSelect || i(q) || eo(i(t).label) ? "button" : "img",
3258
+ () => Rs(".sv-grid-chart-slice", n),
3259
+ () => `${i(t).label}: ${I(i(t).value)}, ${i(t).percent.toFixed(1)}%${eo(i(t).label) ? i(P).drillIn : ""}`
3260
+ ]), a("mousemove", s, (e) => Ts(e.clientX, e.clientY, i(t).label, i(t).value, i(t).percent)), f("mouseleave", s, Z), f("focus", s, (e) => {
3261
+ zs(".sv-grid-chart-slice", n);
3262
+ let r = Vs(e.currentTarget);
3263
+ Ts(r.x, r.y, i(t).label, i(t).value, i(t).percent);
3264
+ }), f("blur", s, Z), a("click", s, (e) => {
3265
+ eo(i(t).label) && no([...Ge(), i(t).label]) || Q(i(t).label, i(t).label, i(t).value, n, e);
3266
+ }), a("keydown", s, (e) => {
3267
+ Ys(e, n) || Bs(e, ".sv-grid-chart-slice", n, () => {
3268
+ eo(i(t).label) && no([...Ge(), i(t).label]) || (d.onSelect || i(q)) && Q(i(t).label, i(t).label, i(t).value, n, e);
3269
+ });
3270
+ }), r(e, o);
3271
+ });
3272
+ var ll = C(cl), ul = (e) => {
3273
+ var t = Ar(), n = D(t), a = b(n, !0);
3274
+ w(n);
3275
+ var o = C(n), s = b(o, !0);
3276
+ w(o), h((e) => {
3277
+ y(n, "x", i(H).donut.cx), y(n, "y", i(H).donut.cy - 4), u(a, e), y(o, "x", i(H).donut.cx), y(o, "y", i(H).donut.cy + 11), u(s, i(P).total);
3278
+ }, [() => I(i(H).donut.total)]), r(e, t);
3279
+ };
3280
+ S(ll, (e) => {
3281
+ i(H).donut && e(ul);
3282
+ });
3283
+ var dl = C(ll), fl = (e) => {
3284
+ var t = o(), s = D(t), c = (e) => {
3285
+ var t = jr();
3286
+ h((e) => {
3287
+ y(t, "x", i(H).plot.x), y(t, "y", i(H).plot.y), y(t, "width", i(H).plot.w), y(t, "height", i(H).plot.h), y(t, "role", d.onSelect ? "button" : "img"), y(t, "tabindex", fe() ? 0 : void 0), y(t, "data-cat-index", i(Fo)), y(t, "aria-label", e);
3288
+ }, [() => N(i(P).densePoints, {
3289
+ count: i(Ao),
3290
+ from: i(V).categories[0] ?? "",
3291
+ to: i(V).categories[i(V).categories.length - 1] ?? ""
3292
+ })]), a("mousemove", t, (e) => {
3293
+ let t = Po(e.clientX, e.currentTarget);
3294
+ t != null && (x(Fo, t, !0), Cs(e.clientX, e.clientY, t));
3295
+ }), f("mouseleave", t, Z), f("focus", t, (e) => ws(e.currentTarget, i(Fo))), f("blur", t, Z), a("click", t, (e) => Ps(e, i(Fo))), a("keydown", t, Io), r(e, t);
3296
+ }, l = (e) => {
3297
+ var t = o(), s = D(t);
3298
+ n(s, 19, () => i(V).categories, (e, t) => e + t, (e, t, n) => {
3299
+ let o = T(() => i(H).lines[0]?.points), s = T(() => i(o)?.[i(n)]?.x), c = T(() => !i(G) && i(o) && i(o).length === i(V).categories.length && Number.isFinite(i(s))), l = T(() => i(c) && i(n) > 0 ? i(o)[i(n) - 1].x : null), u = T(() => i(c) && i(n) < i(o).length - 1 ? i(o)[i(n) + 1].x : null), p = T(() => i(c) ? i(l) == null ? i(H).plot.x : (i(l) + i(s)) / 2 : i(H).plot.x + i(Oo) * i(n)), m = T(() => i(c) ? i(u) == null ? i(H).plot.x + i(H).plot.w : (i(s) + i(u)) / 2 : i(H).plot.x + i(Oo) * (i(n) + 1));
3300
+ var g = Mr();
3301
+ h((e, t) => {
3302
+ y(g, "x", i(G) ? i(H).plot.x : i(p)), y(g, "y", i(G) ? i(H).plot.y + i(Oo) * i(n) : i(H).plot.y), y(g, "width", e), y(g, "height", i(G) ? i(Oo) : i(H).plot.h), y(g, "role", d.onSelect ? "button" : "img"), y(g, "tabindex", fe() ? i(n) === 0 ? 0 : -1 : void 0), y(g, "data-cat-index", i(n)), y(g, "aria-label", t);
3303
+ }, [() => i(G) ? i(H).plot.w : Math.max(0, i(m) - i(p)), () => `${i(t)}: ${gs(i(n)).map((e) => `${e.label} ${e.value}`).join(", ")}`]), a("mousemove", g, (e) => Cs(e.clientX, e.clientY, i(n), e.currentTarget)), f("mouseleave", g, Z), f("focus", g, (e) => ws(e.currentTarget, i(n))), f("blur", g, Z), a("click", g, (e) => Ps(e, i(n))), a("keydown", g, (e) => Is(e, i(n))), r(e, g);
3304
+ }), r(e, t);
3305
+ };
3306
+ S(s, (e) => {
3307
+ i(ko) ? e(c) : e(l, -1);
3308
+ }), r(e, t);
3309
+ };
3310
+ S(dl, (e) => {
3311
+ i(W) && !i(bo) && e(fl);
3312
+ });
3313
+ var pl = C(dl), ml = (e) => {
3314
+ var t = Nr();
3315
+ h(() => {
3316
+ y(t, "x", i(aa).x), y(t, "y", i(aa).y), y(t, "width", i(aa).w), y(t, "height", i(aa).h);
3317
+ }), r(e, t);
3318
+ };
3319
+ S(pl, (e) => {
3320
+ i(aa) && e(ml);
3321
+ }), w($), ne($, (e) => x(L, e), () => i(L));
3322
+ var hl = C($, 2), gl = (e) => {
3323
+ let o = T(() => i(B).plot.x + i(Ha).t0 * i(B).plot.w), s = T(() => (i(Ha).t1 - i(Ha).t0) * i(B).plot.w);
3324
+ var c = Lr(), l = b(c);
3325
+ y(l, "aria-valuemin", 0);
3326
+ var u = b(l);
3327
+ n(u, 17, () => i(B).lines, t, (e, t) => {
3328
+ var n = Fr(), a = D(n), o = (e) => {
3329
+ var n = Pr();
3330
+ h(() => {
3331
+ y(n, "d", i(t).areaPath), y(n, "fill", i(t).color);
3332
+ }), r(e, n);
3333
+ };
3334
+ S(a, (e) => {
3335
+ i(t).areaPath && e(o);
3336
+ });
3337
+ var s = C(a);
3338
+ h(() => {
3339
+ y(s, "d", i(t).path), y(s, "stroke", i(t).color);
3340
+ }), r(e, n);
3341
+ });
3342
+ var d = C(u);
3343
+ n(d, 17, () => i(B).bars, t, (e, t) => {
3344
+ var n = Ir();
3345
+ h(() => {
3346
+ y(n, "x", i(t).x), y(n, "y", i(t).y), y(n, "width", i(t).w), y(n, "height", i(t).h), y(n, "fill", i(t).color);
3347
+ }), r(e, n);
3348
+ });
3349
+ var p = C(d), m = C(p), g = C(m), v = C(g), ee = C(v);
3350
+ w(l), w(c), h((e, t) => {
3351
+ y(l, "viewBox", `0 0 ${i(B).width} ${i(B).height}`), y(l, "aria-label", i(P).rangeBrush), y(l, "aria-valuemax", e), y(l, "aria-valuenow", A()?.i0 ?? 0), y(l, "aria-valuetext", t), y(p, "x", i(B).plot.x), y(p, "y", i(B).plot.y), y(p, "width", i(o) - i(B).plot.x), y(p, "height", i(B).plot.h), y(m, "x", i(o) + i(s)), y(m, "y", i(B).plot.y), y(m, "width", i(B).plot.x + i(B).plot.w - (i(o) + i(s))), y(m, "height", i(B).plot.h), y(g, "x", i(o)), y(g, "y", i(B).plot.y), y(g, "width", i(s)), y(g, "height", i(B).plot.h), y(v, "x", i(o) - 4), y(v, "y", i(B).plot.y), y(v, "height", i(B).plot.h), y(ee, "x", i(o) + i(s) - 4), y(ee, "y", i(B).plot.y), y(ee, "height", i(B).plot.h);
3352
+ }, [() => Math.max(0, i(F).categories.length - 1), () => N(i(P).brushRange, {
3353
+ from: i(F).categories[A()?.i0 ?? 0] ?? "",
3354
+ to: i(F).categories[A()?.i1 ?? i(F).categories.length - 1] ?? ""
3355
+ })]), a("pointermove", l, Ka), a("keydown", l, Us), a("pointerdown", g, (e) => Ga(e, "move")), a("pointerup", g, qa), f("pointercancel", g, qa), a("pointerdown", v, (e) => Ga(e, "left")), a("pointerup", v, qa), f("pointercancel", v, qa), a("pointerdown", ee, (e) => Ga(e, "right")), a("pointerup", ee, qa), f("pointercancel", ee, qa), _(c, "clientHeight", (e) => x(bi, e)), r(e, c);
3356
+ };
3357
+ S(hl, (e) => {
3358
+ i(Ba) && i(B) && e(gl);
3359
+ });
3360
+ var _l = C(hl, 2), vl = (e) => {
3361
+ var t = Rr(), n = b(t, !0);
3362
+ w(t), h(() => u(n, i(P).noData)), r(e, t);
3363
+ };
3364
+ S(_l, (e) => {
3365
+ i(ts) && e(vl);
3366
+ });
3367
+ var yl = C(_l, 2), bl = (e) => {
3368
+ var t = o(), n = D(t);
3369
+ ue(n, () => i(Ks), (e, t) => {
3370
+ t(e, {
3371
+ get items() {
3372
+ return i(Xs);
3373
+ },
3374
+ get x() {
3375
+ return i(Gs).x;
3376
+ },
3377
+ get y() {
3378
+ return i(Gs).y;
3379
+ },
3380
+ onClose: () => x(Gs, null)
3381
+ });
3382
+ }), r(e, t);
3383
+ };
3384
+ S(yl, (e) => {
3385
+ i(Gs) && i(Ks) && e(bl);
3386
+ });
3387
+ var xl = C(yl, 2), Sl = (e) => {
3388
+ var t = zr();
3389
+ ce(t), s(() => ae(t, () => i(va), (e) => x(va, e))), ee(t, (e) => Pa?.(e)), h(() => {
3390
+ y(t, "placeholder", i(P).noteText), y(t, "aria-label", i(P).noteText), g(t, `left:${i(_a).left}px; top:${i(_a).top}px;`);
3391
+ }), a("keydown", t, (e) => {
3392
+ e.key === "Enter" ? (e.preventDefault(), ya()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), x(_a, null), x(va, ""));
3393
+ }), f("blur", t, ya), r(e, t);
3394
+ };
3395
+ S(xl, (e) => {
3396
+ i(_a) && e(Sl);
3397
+ });
3398
+ var Cl = C(xl, 2), wl = (e) => {
3399
+ var a = Wr();
3400
+ let s;
3401
+ var c = b(a), l = (e) => {
3402
+ var t = o(), n = D(t);
3403
+ re(n, () => d.tooltip, () => i(Y).ctx), r(e, t);
3404
+ }, f = (e) => {
3405
+ var a = Ur(), o = D(a), s = b(o, !0);
3406
+ w(o);
3407
+ var c = C(o, 2);
3408
+ n(c, 17, () => i(Y).rows, t, (e, t) => {
3409
+ var n = Hr(), a = b(n), o = (e) => {
3410
+ var n = Br();
3411
+ h(() => g(n, `background:${i(t).color}`)), r(e, n);
3412
+ };
3413
+ S(a, (e) => {
3414
+ i(t).color && e(o);
3415
+ });
3416
+ var s = C(a, 2), c = (e) => {
3417
+ var n = Vr(), a = b(n, !0);
3418
+ w(n), h(() => u(a, i(t).label)), r(e, n);
3419
+ };
3420
+ S(s, (e) => {
3421
+ i(t).label && e(c);
3422
+ });
3423
+ var l = C(s, 2), d = b(l, !0);
3424
+ w(l), w(n), h(() => u(d, i(t).value)), r(e, n);
3425
+ }), h(() => u(s, i(Y).title)), r(e, a);
3426
+ };
3427
+ S(c, (e) => {
3428
+ d.tooltip ? e(l) : e(f, -1);
3429
+ }), w(a), h(() => {
3430
+ s = O(a, 1, "sv-grid-chart-tooltip svelte-hyytey", null, s, {
3431
+ "is-below": i(Y).below,
3432
+ "is-custom": !!d.tooltip,
3433
+ "is-fixed": i(Y).fixed,
3434
+ "is-right": ye() === "top-right" || ye() === "bottom-right",
3435
+ "is-bottom": ye() === "bottom-left" || ye() === "bottom-right",
3436
+ "is-pinned": !!i(ps)
3437
+ }), g(a, `left:${i(Y).left}px; top:${i(Y).top}px;`);
3438
+ }), r(e, a);
3439
+ };
3440
+ S(Cl, (e) => {
3441
+ i(Y) && e(wl);
3442
+ });
3443
+ var Tl = C(Cl, 2), El = (e) => {
3444
+ var t = Jr();
3445
+ let s;
3446
+ var c = b(t);
3447
+ n(c, 19, () => i(es), (e) => e.label, (e, t, n) => {
3448
+ var s = Kr();
3449
+ let c;
3450
+ var l = b(s), p = (e) => {
3451
+ var a = o(), s = D(a);
3452
+ re(s, () => d.legendItem, () => ({
3453
+ label: i(t).label,
3454
+ color: i(t).color,
3455
+ off: i(t).off,
3456
+ index: i(n)
3457
+ })), r(e, a);
3458
+ }, m = (e) => {
3459
+ var n = Gr(), a = D(n), o = C(a);
3460
+ h(() => {
3461
+ g(a, `background:${i(t).off ? "transparent" : i(t).color}; border-color:${i(t).color}`), u(o, ` ${i(t).label ?? ""}`);
3462
+ }), r(e, n);
3463
+ };
3464
+ S(l, (e) => {
3465
+ d.legendItem ? e(p) : e(m, -1);
3466
+ }), w(s), h(() => {
3467
+ c = O(s, 1, "sv-grid-chart-legend-item svelte-hyytey", null, c, {
3468
+ "is-off": i(t).off,
3469
+ "is-isolated": i(Ni) === i(t).label
3470
+ }), s.disabled = !fe() || !i(Zo), y(s, "aria-pressed", i(Zo) ? !i(t).off : void 0), y(s, "title", fe() ? `${i(t).off ? i(P).showSeries : i(P).hideSeries} ${i(t).label} \u00b7 ${i(P).isolateHint}` : i(t).label);
3471
+ }), a("click", s, () => rs(i(t).label)), a("dblclick", s, () => is(i(t).label)), f("pointerenter", s, () => fe() && x(Fi, i(t).label, !0)), f("pointerleave", s, () => x(Fi, null)), r(e, s);
3472
+ });
3473
+ var l = C(c, 2), p = (e) => {
3474
+ var t = qr(), n = b(t, !0);
3475
+ w(t), h((e) => u(n, e), [() => i(Qo) ? i(P).showLess : N(i(P).showMore, { n: i(Ko).length - 10 })]), a("click", t, () => x(Qo, !i(Qo))), r(e, t);
3476
+ };
3477
+ S(l, (e) => {
3478
+ i($o) && e(p);
3479
+ }), w(t), h(() => s = O(t, 1, "sv-grid-chart-legend svelte-hyytey", null, s, { "is-vertical": i(gi) })), _(t, "clientWidth", (e) => x(vi, e)), _(t, "clientHeight", (e) => x(yi, e)), r(e, t);
3480
+ };
3481
+ S(Tl, (e) => {
3482
+ i(hi) && i(Ko).length && e(El);
3483
+ });
3484
+ var Dl = C(Tl, 2), Ol = (e) => {
3485
+ var t = Yr(), n = b(t, !0);
3486
+ w(t), h(() => u(n, i(Go))), r(e, t);
3487
+ };
3488
+ S(Dl, (e) => {
3489
+ Je() && e(Ol);
3490
+ });
3491
+ var kl = C(Dl, 2), Al = b(kl), jl = b(Al), Ml = b(jl, !0), Nl = C(Ml), Pl = (t) => {
3492
+ var n = e();
3493
+ h((e) => u(n, e), [() => N(i(P).dataTableCapped, {
3494
+ shown: Mo,
3495
+ total: i(os).rows.length
3496
+ })]), r(t, n);
3497
+ };
3498
+ S(Nl, (e) => {
3499
+ i(ss) && e(Pl);
3500
+ });
3501
+ var Fl = C(Nl), Il = (t) => {
3502
+ var n = e();
3503
+ h(() => u(n, `. ${i(si) ?? ""}`)), r(t, n);
3504
+ };
3505
+ S(Fl, (e) => {
3506
+ Ye() && i(si) && e(Il);
3507
+ }), w(jl);
3508
+ var Ll = C(jl), Rl = b(Ll);
3509
+ n(Rl, 20, () => i(os).cols, (e) => e, (e, t) => {
3510
+ var n = Xr(), i = b(n, !0);
3511
+ w(n), h(() => u(i, t)), r(e, n);
3512
+ }), w(Rl), w(Ll);
3513
+ var zl = C(Ll);
3514
+ n(zl, 21, () => i(cs), t, (e, a) => {
3515
+ var o = Qr();
3516
+ n(o, 21, () => i(a), t, (e, t) => {
3517
+ var n = Zr(), a = b(n, !0);
3518
+ w(n), h(() => u(a, i(t))), r(e, n);
3519
+ }), w(o), r(e, o);
3520
+ }), w(zl), w(Al), w(kl), w(ac), ne(ac, (e) => x(ds, e), () => i(ds)), h((e, t, n) => {
3521
+ l = O($, 0, "sv-grid-chart-svg svelte-hyytey", null, l, {
3522
+ "is-interactive": fe(),
3523
+ "is-clickable": !!d.onSelect || !!d.onDrill,
3524
+ "is-zoomable": !!i(Ti)?.drag && i(W) && !i(Oi) && !i(Ei),
3525
+ "is-pannable": !!i(Ti)?.pan && i(W) && i(Ui) && i(Ei),
3526
+ "is-annotating": i(Oi),
3527
+ "is-dragging": !!i(ra),
3528
+ "is-drawing": !!i(R)
3529
+ }), y($, "viewBox", `0 0 ${i(H).width} ${i(H).height}`), y($, "role", fe() ? "group" : "img"), y($, "aria-label", t), y($, "aria-description", Ye() && i(si) ? i(si) : void 0), y($, "aria-describedby", `${Li}-table`), p = g($, "", p, { height: ii() ? `${i(Ci) ?? i(F).height ?? 300}px` : null }), m = O(Sc, 0, "sv-grid-chart-marks svelte-hyytey", null, m, {
3530
+ "is-enter-grow": i(uo) === "grow",
3531
+ "is-enter-none": i(uo) === "none"
3532
+ }), y(Sc, "clip-path", i(W) ? `url(#${Li}-plot)` : void 0), v = O(Pc, 0, "sv-grid-chart-marks svelte-hyytey", null, v, {
3533
+ "is-enter-grow": i(uo) === "grow",
3534
+ "is-enter-none": i(uo) === "none"
3535
+ }), y(Pc, "clip-path", i(W) ? `url(#${Li}-plot)` : void 0), y(Al, "id", `${Li}-table`), u(Ml, n);
3536
+ }, [
3537
+ () => Ee(i(F).style) || void 0,
3538
+ () => N(i(P).chartLabel, { type: i(F).type }),
3539
+ () => N(i(P).dataTable, { type: i(F).type })
3540
+ ]), a("pointerdown", $, ca), a("pointermove", $, (e) => {
3541
+ la(e), Oa(e);
3542
+ }), a("pointerup", $, (e) => {
3543
+ ua(e), x(ba, null);
3544
+ }), f("pointercancel", $, (e) => {
3545
+ ua(e), x(ba, null);
3546
+ }), a("click", $, Da), a("keydown", $, ja), f("wheel", $, Qi), a("contextmenu", $, qs), a("dblclick", $, da), _(ac, "clientWidth", (e) => x(li, e)), _(ac, "clientHeight", (e) => x(ui, e));
3547
+ }
3548
+ return h((e, t, n) => {
3549
+ oc = O(ac, 1, "sv-grid-chart svelte-hyytey", null, oc, {
3550
+ "is-autosize": ii(),
3551
+ "is-legend-top": i(hi) === "top",
3552
+ "is-legend-left": i(hi) === "left",
3553
+ "is-legend-right": i(hi) === "right"
3554
+ }), g(ac, e);
3555
+ }, [
3556
+ () => Ee(i(F).style) || void 0,
3557
+ () => N(i(P).chartLabel, { type: i(F).type }),
3558
+ () => N(i(P).dataTable, { type: i(F).type })
3559
+ ]), r(l, ac), ie(ic);
3560
+ }
3561
+ p([
3562
+ "click",
3563
+ "pointerdown",
3564
+ "pointermove",
3565
+ "pointerup",
3566
+ "keydown",
3567
+ "contextmenu",
3568
+ "dblclick",
3569
+ "mousemove"
3570
+ ]);
3571
+ //#endregion
3572
+ export { He as a, ze as c, Ie as d, Le as f, Qe as i, Re as l, N as n, Be as o, Pe as p, Ze as r, Ve as s, ti as t, Fe as u };