@svgrid/grid-wc 3.0.48 → 3.0.50

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 (82) hide show
  1. package/dist/GridFind-B5zpfGlk.js +39 -0
  2. package/dist/GridFooter-CSzuZWPH.js +142 -0
  3. package/dist/GridMenus-DGR1VkZL.js +1480 -0
  4. package/dist/PinSplitter-BbQwf4Eh.js +178 -0
  5. package/dist/{SvChartMenu-B6kpmwUv.js → SvChartMenu-CFvrEIJf.js} +133 -133
  6. package/dist/{SvDateRangeInput-ByR-LFgf.js → SvDateRangeInput-B8uPcD0z.js} +107 -107
  7. package/dist/{SvDateTimePicker-BCxhFb5c.js → SvDateTimePicker-D9MnooXn.js} +317 -317
  8. package/dist/{SvField-CtzxdF7J.js → SvField--1Px2j7E.js} +105 -105
  9. package/dist/SvGridCellEditor-BzLvoGRp.js +594 -0
  10. package/dist/SvGridChart-rvB4vvCB.js +3684 -0
  11. package/dist/{SvGridChartBuilder-BCQ3W8TY.js → SvGridChartBuilder-C0HbpZhw.js} +386 -386
  12. package/dist/SvGridChartPanel-CftDsgLi.js +1689 -0
  13. package/dist/{SvGridChartView-DWxEFzdM.js → SvGridChartView-BMJf1fCo.js} +13 -13
  14. package/dist/SvGridDropdown-CZRv-0Cw.js +258 -0
  15. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +4 -2
  16. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
  17. package/dist/angular/types/svgrid-grid-wc-angular.d.ts +2 -1
  18. package/dist/chart/{SvChartMenu-NxEyX5kU.js → SvChartMenu-C7EDkoh8.js} +98 -91
  19. package/dist/chart/sv-chart-element.js +25 -21
  20. package/dist/{chart-Cwv61lx6.js → chart-CVOJXX1_.js} +24 -20
  21. package/dist/{shadow/chart-export-pdf-BZy6f5QB.js → chart-export-pdf-CFq7Y-pq.js} +1 -1
  22. package/dist/{shadow/chart-summary-D02rGO0c.js → chart-summary-B52586F9.js} +1 -1
  23. package/dist/{client-OtsRxGjS.js → client-DeNKZvIV.js} +593 -581
  24. package/dist/{date-format-DngG1HJ5.js → date-format-B1XMOxlA.js} +309 -309
  25. package/dist/dismissable-CuL0k6PX.js +52 -0
  26. package/dist/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
  27. package/dist/{shadow/range-commit-C6Rogxem.js → range-commit-BriJZw_M.js} +1 -1
  28. package/dist/react/index.d.ts +3 -1
  29. package/dist/react/index.js +1 -1
  30. package/dist/{row-drag-DLQMyiV3.js → row-drag-DevACK09.js} +1 -1
  31. package/dist/shadow/GridFind-CVqPCjPK.js +39 -0
  32. package/dist/shadow/GridFooter-DY9numnH.js +142 -0
  33. package/dist/shadow/GridMenus-Bl11jIy6.js +1480 -0
  34. package/dist/shadow/PinSplitter-DNjnUtbi.js +178 -0
  35. package/dist/shadow/{SvChartMenu-C74rWwjU.js → SvChartMenu-Ca2hVFUA.js} +133 -133
  36. package/dist/shadow/{SvDateRangeInput-9Wq4E64y.js → SvDateRangeInput-CNXId95j.js} +107 -107
  37. package/dist/shadow/{SvDateTimePicker-y9jPLR19.js → SvDateTimePicker-B6lwKYFq.js} +317 -317
  38. package/dist/shadow/{SvField-DGPj2clt.js → SvField-1OiD5dJA.js} +105 -105
  39. package/dist/shadow/SvGridCellEditor-CRImfWTE.js +594 -0
  40. package/dist/shadow/SvGridChart-_GY1Mgr4.js +3684 -0
  41. package/dist/shadow/{SvGridChartBuilder-VUKgOcp7.js → SvGridChartBuilder-Ci_GlCg3.js} +386 -386
  42. package/dist/shadow/SvGridChartPanel-BHczMJAe.js +1689 -0
  43. package/dist/shadow/{SvGridChartView-DQmJahyT.js → SvGridChartView-BJEpaO8h.js} +13 -13
  44. package/dist/shadow/SvGridDropdown-giyKVcC0.js +258 -0
  45. package/dist/shadow/{chart-Cwv61lx6.js → chart-CVOJXX1_.js} +24 -20
  46. package/dist/{chart-export-pdf-DyuVs1gO.js → shadow/chart-export-pdf-Ne0ET-JM.js} +1 -1
  47. package/dist/{chart-summary-D02rGO0c.js → shadow/chart-summary-B52586F9.js} +1 -1
  48. package/dist/shadow/{client-OtsRxGjS.js → client-DeNKZvIV.js} +593 -581
  49. package/dist/shadow/{date-format-C9UkbCig.js → date-format-VCW-gATr.js} +309 -309
  50. package/dist/shadow/dismissable-CuL0k6PX.js +52 -0
  51. package/dist/shadow/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
  52. package/dist/{range-commit-C6Rogxem.js → shadow/range-commit-BriJZw_M.js} +1 -1
  53. package/dist/shadow/{row-drag-DLQMyiV3.js → row-drag-DevACK09.js} +1 -1
  54. package/dist/shadow/sv-grid-scrollbar-yHMClECS.js +228 -0
  55. package/dist/shadow/sv-grid-shadow-element.d.ts +2 -0
  56. package/dist/shadow/sv-grid-shadow-element.js +5686 -5829
  57. package/dist/{svelte-virtualizer.svelte-DWvD9wvL.js → shadow/svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
  58. package/dist/sv-grid-element.d.ts +2 -0
  59. package/dist/sv-grid-element.js +5668 -5811
  60. package/dist/sv-grid-scrollbar-yHMClECS.js +228 -0
  61. package/dist/{shadow/svelte-virtualizer.svelte-DWvD9wvL.js → svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
  62. package/dist/vue/index.d.ts +2 -1
  63. package/dist/vue/index.js +1 -1
  64. package/package.json +3 -3
  65. package/dist/GridFind-C1YbloFh.js +0 -39
  66. package/dist/GridFooter-DOR8m9GQ.js +0 -142
  67. package/dist/GridMenus-Da8XGbc6.js +0 -1461
  68. package/dist/PinSplitter-Du4ZF8T3.js +0 -178
  69. package/dist/SvGridCellEditor-BUdVD7xM.js +0 -594
  70. package/dist/SvGridChart-DkKI8-bj.js +0 -3684
  71. package/dist/SvGridChartPanel-uqul044E.js +0 -1689
  72. package/dist/SvGridDropdown-CnCQuXaI.js +0 -258
  73. package/dist/dismissable-CQ6XFXsk.js +0 -45
  74. package/dist/shadow/GridFind-CcoKoisE.js +0 -39
  75. package/dist/shadow/GridFooter-CDq71ytl.js +0 -142
  76. package/dist/shadow/GridMenus-RAp-E3hp.js +0 -1461
  77. package/dist/shadow/PinSplitter-BAYTAZtm.js +0 -178
  78. package/dist/shadow/SvGridCellEditor-CzeBp9lp.js +0 -594
  79. package/dist/shadow/SvGridChart-zTsB6F3Y.js +0 -3684
  80. package/dist/shadow/SvGridChartPanel-DkjEUB7t.js +0 -1689
  81. package/dist/shadow/SvGridDropdown-B_5kqHQE.js +0 -258
  82. package/dist/shadow/dismissable-CQ6XFXsk.js +0 -45
@@ -0,0 +1,1689 @@
1
+ (function(){try{var c=".sv-chart-panes.svelte-14dx6di{flex-direction:column;gap:2px;min-width:0;display:flex}.sv-chart-pane.svelte-14dx6di{min-width:0;position:relative}.sv-chart-pane-title.svelte-14dx6di{z-index:1;color:var(--sg-muted,#64748b);pointer-events:none;font-size:10px;font-weight:600;position:absolute;top:2px}\n",g=globalThis;if(typeof g!=='undefined'){var f=(g.__SVGRID_WC_ADD_CSS_BY_BUILD__||{})["shadow"];if(typeof f==='function')f(c);else{var q=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__||{};(q["shadow"]=q["shadow"]||[]).push(c);}}if(typeof document==='undefined')return;var x=document.querySelectorAll('style[data-svgrid-grid-wc-chunk]');for(var i=0;i<x.length;i++)if(x[i].getAttribute('data-svgrid-grid-wc-chunk')==="shadow:SvGridChartPanel-BHczMJAe.js"||x[i].textContent===c)return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"shadow:SvGridChartPanel-BHczMJAe.js");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
2
+ import { S as e, h as t } from "./chart-CVOJXX1_.js";
3
+ import { $ as n, A as r, B as i, C as a, G as o, I as s, J as c, L as l, M as u, N as d, O as f, P as p, R as m, S as h, T as g, W as _, X as v, Y as y, Z as b, _ as x, at as S, b as C, c as w, ct as T, et as E, f as D, g as O, i as k, j as A, m as j, n as M, nt as N, o as ee, ot as te, p as P, r as ne, s as re, v as F, w as ie, y as ae, z as oe } from "./client-DeNKZvIV.js";
4
+ import { a as I } from "./editor-contract-peBDxir_.js";
5
+ import { t as se } from "./menu-focus-lmTebXyL.js";
6
+ import { a as ce, n as le, o as ue, r as de, s as fe, t as pe } from "./SvGridChart-_GY1Mgr4.js";
7
+ import "./sv-grid-shadow-element.js";
8
+ //#region ../../node_modules/.pnpm/svelte@5.57.3_@typescript-eslint+types@8.67.0/node_modules/svelte/src/transition/index.js
9
+ function L(e) {
10
+ let t = e - 1;
11
+ return t * t * t + 1;
12
+ }
13
+ function me(e) {
14
+ let t = typeof e == "string" && e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
15
+ return t ? [parseFloat(t[1]), t[2] || "px"] : [e, "px"];
16
+ }
17
+ function he(e, { delay: t = 0, duration: n = 400, easing: r = L, x: i = 0, y: a = 0, opacity: o = 0 } = {}) {
18
+ let s = getComputedStyle(e), c = +s.opacity, l = s.transform === "none" ? "" : s.transform, u = c * (1 - o), [d, f] = me(i), [p, m] = me(a);
19
+ return {
20
+ delay: t,
21
+ duration: n,
22
+ easing: r,
23
+ css: (e, t) => `
24
+ transform: ${l} translate(${(1 - e) * d}${f}, ${(1 - e) * p}${m});
25
+ opacity: ${c - u * t}`
26
+ };
27
+ }
28
+ //#endregion
29
+ //#region ../../node_modules/.pnpm/svelte@5.57.3_@typescript-eslint+types@8.67.0/node_modules/svelte/src/easing/index.js
30
+ function ge(e) {
31
+ let t = e - 1;
32
+ return t * t * t + 1;
33
+ }
34
+ //#endregion
35
+ //#region ../grid/dist/SvChartPanes.svelte
36
+ var R = /* @__PURE__ */ new Set([
37
+ "$$slots",
38
+ "$$events",
39
+ "$$legacy",
40
+ "spec",
41
+ "indicators",
42
+ "syncGroup",
43
+ "axisWidth",
44
+ "zoom",
45
+ "onZoom",
46
+ "zoomable",
47
+ "legend",
48
+ "toolbar"
49
+ ]), _e = d("<div class=\"sv-chart-pane is-indicator svelte-14dx6di\"><span class=\"sv-chart-pane-title svelte-14dx6di\"> </span> <!></div>"), z = d("<div class=\"sv-chart-panes svelte-14dx6di\"><div class=\"sv-chart-pane is-main svelte-14dx6di\"><!></div> <!></div>");
50
+ function ve(t, a) {
51
+ te(a, !0);
52
+ let o = M(a, "indicators", 19, () => []), s = M(a, "axisWidth", 3, 56), l = M(a, "zoom", 15, null), u = ne(a, R), d = `svcp-${Math.random().toString(36).slice(2, 8)}`, f = N(() => a.syncGroup ?? d), p = E(0), m = (e) => i(p) > 0 && !e.width ? { width: Math.round(i(p)) } : {}, h = N(() => ({
53
+ ...a.spec,
54
+ ...m(a.spec),
55
+ xAxis: {
56
+ ...a.spec.xAxis,
57
+ ...o().length ? { labels: !1 } : {}
58
+ },
59
+ yAxis: {
60
+ ...a.spec.yAxis,
61
+ width: s()
62
+ },
63
+ ...a.spec.y2Axis || a.spec.series.some((e) => e.axis === "right") ? { y2Axis: {
64
+ ...a.spec.y2Axis,
65
+ width: s()
66
+ } } : {}
67
+ })), y = N(() => o().map((t, n) => {
68
+ let { title: r, ...i } = e(a.spec, t);
69
+ return {
70
+ title: r ?? t.kind,
71
+ spec: {
72
+ ...i,
73
+ ...m(i),
74
+ xAxis: {
75
+ ...i.xAxis,
76
+ labels: n === o().length - 1
77
+ },
78
+ yAxis: {
79
+ ...i.yAxis,
80
+ width: s()
81
+ }
82
+ }
83
+ };
84
+ }));
85
+ var x = z(), C = c(x), w = c(C);
86
+ pe(w, k({
87
+ get spec() {
88
+ return i(h);
89
+ },
90
+ get syncGroup() {
91
+ return i(f);
92
+ },
93
+ get onZoom() {
94
+ return a.onZoom;
95
+ },
96
+ get zoomable() {
97
+ return a.zoomable;
98
+ },
99
+ get legend() {
100
+ return a.legend;
101
+ },
102
+ get toolbar() {
103
+ return a.toolbar;
104
+ }
105
+ }, () => u, {
106
+ get zoom() {
107
+ return l();
108
+ },
109
+ set zoom(e) {
110
+ l(e);
111
+ }
112
+ })), T(C);
113
+ var D = b(C, 2);
114
+ g(D, 19, () => i(y), (e, t) => `${o()[t]?.kind}-${t}`, (e, t, n) => {
115
+ var l = _e(), u = c(l);
116
+ let d;
117
+ var p = v(u, !0), m = b(u, 2);
118
+ {
119
+ let e = N(() => a.zoomable ? {
120
+ drag: !1,
121
+ wheel: typeof a.zoomable == "object" && a.zoomable.wheel,
122
+ pan: typeof a.zoomable == "object" && a.zoomable.pan
123
+ } : !1);
124
+ pe(m, {
125
+ get spec() {
126
+ return i(t).spec;
127
+ },
128
+ get syncGroup() {
129
+ return i(f);
130
+ },
131
+ get zoomable() {
132
+ return i(e);
133
+ },
134
+ legend: !1,
135
+ toolbar: !1,
136
+ interactive: !0,
137
+ get localeText() {
138
+ return a.localeText;
139
+ }
140
+ });
141
+ }
142
+ T(l), _(() => {
143
+ P(l, "data-indicator", o()[i(n)]?.kind), d = ae(u, "", d, { left: `${s() + 6}px` }), r(p, i(t).title);
144
+ }), A(e, l);
145
+ }), T(x), re(x, "clientWidth", (e) => n(p, e)), A(t, x), S();
146
+ }
147
+ //#endregion
148
+ //#region ../grid/dist/SvGridChartPickers.svelte
149
+ var B = [
150
+ {
151
+ value: "bar",
152
+ label: "chartTypeBar",
153
+ group: "chartGroupCompare"
154
+ },
155
+ {
156
+ value: "line",
157
+ label: "chartTypeLine",
158
+ group: "chartGroupCompare"
159
+ },
160
+ {
161
+ value: "area",
162
+ label: "chartTypeArea",
163
+ group: "chartGroupCompare"
164
+ },
165
+ {
166
+ value: "lollipop",
167
+ label: "chartTypeLollipop",
168
+ group: "chartGroupCompare"
169
+ },
170
+ {
171
+ value: "pareto",
172
+ label: "chartTypePareto",
173
+ group: "chartGroupCompare"
174
+ },
175
+ {
176
+ value: "range-bar",
177
+ label: "chartTypeRangeBar",
178
+ group: "chartGroupCompare",
179
+ needs: (e) => e.measures.length >= 2
180
+ },
181
+ {
182
+ value: "range-area",
183
+ label: "chartTypeRangeArea",
184
+ group: "chartGroupCompare",
185
+ needs: (e) => e.measures.length >= 2
186
+ },
187
+ {
188
+ value: "dumbbell",
189
+ label: "chartTypeDumbbell",
190
+ group: "chartGroupCompare",
191
+ needs: (e) => e.measures.length >= 2
192
+ },
193
+ {
194
+ value: "radial-column",
195
+ label: "chartTypeRadialColumn",
196
+ group: "chartGroupCompare"
197
+ },
198
+ {
199
+ value: "radial-bar",
200
+ label: "chartTypeRadialBar",
201
+ group: "chartGroupCompare"
202
+ },
203
+ {
204
+ value: "nightingale",
205
+ label: "chartTypeNightingale",
206
+ group: "chartGroupCompare"
207
+ },
208
+ {
209
+ value: "pie",
210
+ label: "chartTypePie",
211
+ group: "chartGroupPartOfWhole"
212
+ },
213
+ {
214
+ value: "treemap",
215
+ label: "chartTypeTreemap",
216
+ group: "chartGroupPartOfWhole"
217
+ },
218
+ {
219
+ value: "sunburst",
220
+ label: "chartTypeSunburst",
221
+ group: "chartGroupPartOfWhole"
222
+ },
223
+ {
224
+ value: "funnel",
225
+ label: "chartTypeFunnel",
226
+ group: "chartGroupFlow"
227
+ },
228
+ {
229
+ value: "waterfall",
230
+ label: "chartTypeWaterfall",
231
+ group: "chartGroupFlow"
232
+ },
233
+ {
234
+ value: "sankey",
235
+ label: "chartTypeSankey",
236
+ group: "chartGroupFlow",
237
+ needs: (e) => e.dims.length >= 2
238
+ },
239
+ {
240
+ value: "chord",
241
+ label: "chartTypeChord",
242
+ group: "chartGroupFlow",
243
+ needs: (e) => e.dims.length >= 2
244
+ },
245
+ {
246
+ value: "radar",
247
+ label: "chartTypeRadar",
248
+ group: "chartGroupDistribution"
249
+ },
250
+ {
251
+ value: "heatmap",
252
+ label: "chartTypeHeatmap",
253
+ group: "chartGroupDistribution",
254
+ needs: (e) => e.dims.length >= 2
255
+ },
256
+ {
257
+ value: "scatter",
258
+ label: "chartTypeScatter",
259
+ group: "chartGroupDistribution",
260
+ needs: (e) => e.measures.length >= 2
261
+ },
262
+ {
263
+ value: "boxplot",
264
+ label: "chartTypeBoxplot",
265
+ group: "chartGroupDistribution"
266
+ },
267
+ {
268
+ value: "histogram",
269
+ label: "chartTypeHistogram",
270
+ group: "chartGroupDistribution"
271
+ },
272
+ {
273
+ value: "gauge",
274
+ label: "chartTypeGauge",
275
+ group: "chartGroupSingleValue"
276
+ },
277
+ {
278
+ value: "bullet",
279
+ label: "chartTypeBullet",
280
+ group: "chartGroupSingleValue"
281
+ },
282
+ {
283
+ value: "calendar",
284
+ label: "chartTypeCalendar",
285
+ group: "chartGroupOverTime",
286
+ needs: (e) => e.dates.length >= 1
287
+ },
288
+ {
289
+ value: "stream",
290
+ label: "chartTypeStream",
291
+ group: "chartGroupOverTime",
292
+ needs: (e) => e.dims.length >= 2
293
+ },
294
+ {
295
+ value: "candlestick",
296
+ label: "chartTypeCandlestick",
297
+ group: "chartGroupOverTime",
298
+ needs: (e) => e.dates.length >= 1 && e.measures.length >= 4
299
+ },
300
+ {
301
+ value: "ohlc",
302
+ label: "chartTypeOhlc",
303
+ group: "chartGroupOverTime",
304
+ needs: (e) => e.dates.length >= 1 && e.measures.length >= 4
305
+ }
306
+ ];
307
+ function ye(e, t) {
308
+ return B.filter((t) => !t.needs || t.needs(e)).map((e) => ({
309
+ value: e.value,
310
+ label: t[e.label],
311
+ group: t[e.group]
312
+ }));
313
+ }
314
+ function V(e) {
315
+ return [
316
+ {
317
+ value: "sum",
318
+ label: e.chartReduceSum
319
+ },
320
+ {
321
+ value: "avg",
322
+ label: e.chartReduceAvg
323
+ },
324
+ {
325
+ value: "count",
326
+ label: e.chartReduceCount
327
+ },
328
+ {
329
+ value: "min",
330
+ label: e.chartReduceMin
331
+ },
332
+ {
333
+ value: "max",
334
+ label: e.chartReduceMax
335
+ },
336
+ {
337
+ value: "median",
338
+ label: e.chartReduceMedian
339
+ },
340
+ {
341
+ value: "p90",
342
+ label: e.chartReduceP90
343
+ },
344
+ {
345
+ value: "first",
346
+ label: e.chartReduceFirst
347
+ },
348
+ {
349
+ value: "last",
350
+ label: e.chartReduceLast
351
+ },
352
+ {
353
+ value: "countDistinct",
354
+ label: e.chartReduceCountDistinct
355
+ }
356
+ ];
357
+ }
358
+ var H = [
359
+ {
360
+ key: "theme",
361
+ label: "chartPaletteTheme",
362
+ colors: null
363
+ },
364
+ {
365
+ key: "ocean",
366
+ label: "chartPaletteOcean",
367
+ colors: [
368
+ "#0ea5e9",
369
+ "#14b8a6",
370
+ "#6366f1",
371
+ "#8b5cf6",
372
+ "#06b6d4"
373
+ ]
374
+ },
375
+ {
376
+ key: "sunset",
377
+ label: "chartPaletteSunset",
378
+ colors: [
379
+ "#f59e0b",
380
+ "#ef4444",
381
+ "#ec4899",
382
+ "#8b5cf6",
383
+ "#f97316"
384
+ ]
385
+ },
386
+ {
387
+ key: "forest",
388
+ label: "chartPaletteForest",
389
+ colors: [
390
+ "#16a34a",
391
+ "#65a30d",
392
+ "#0d9488",
393
+ "#4d7c0f",
394
+ "#0891b2"
395
+ ]
396
+ },
397
+ {
398
+ key: "slate",
399
+ label: "chartPaletteSlate",
400
+ colors: [
401
+ "#475569",
402
+ "#0ea5e9",
403
+ "#64748b",
404
+ "#38bdf8",
405
+ "#94a3b8"
406
+ ]
407
+ }
408
+ ], be = [
409
+ {
410
+ value: "volume",
411
+ label: "chartIndVolume",
412
+ title: "chartIndVolumeTitle"
413
+ },
414
+ {
415
+ value: "rsi",
416
+ label: "chartIndRsi",
417
+ title: "chartIndRsiTitle"
418
+ },
419
+ {
420
+ value: "macd",
421
+ label: "chartIndMacd",
422
+ title: "chartIndMacdTitle"
423
+ },
424
+ {
425
+ value: "stochastic",
426
+ label: "chartIndStochastic",
427
+ title: "chartIndStochasticTitle"
428
+ },
429
+ {
430
+ value: "atr",
431
+ label: "chartIndAtr",
432
+ title: "chartIndAtrTitle"
433
+ },
434
+ {
435
+ value: "obv",
436
+ label: "chartIndObv",
437
+ title: "chartIndObvTitle"
438
+ },
439
+ {
440
+ value: "sma",
441
+ label: "chartIndSma",
442
+ title: "chartIndSmaTitle"
443
+ },
444
+ {
445
+ value: "ema",
446
+ label: "chartIndEma",
447
+ title: "chartIndEmaTitle"
448
+ },
449
+ {
450
+ value: "bb",
451
+ label: "chartIndBb",
452
+ title: "chartIndBbTitle"
453
+ },
454
+ {
455
+ value: "vwap",
456
+ label: "chartIndVwap",
457
+ title: "chartIndVwapTitle"
458
+ }
459
+ ], xe = [
460
+ "sma",
461
+ "ema",
462
+ "bb",
463
+ "vwap"
464
+ ], Se = [
465
+ {
466
+ key: "open",
467
+ label: "chartOpen"
468
+ },
469
+ {
470
+ key: "high",
471
+ label: "chartHigh"
472
+ },
473
+ {
474
+ key: "low",
475
+ label: "chartLow"
476
+ },
477
+ {
478
+ key: "close",
479
+ label: "chartClosePrice"
480
+ },
481
+ {
482
+ key: "volume",
483
+ label: "chartVolume"
484
+ }
485
+ ], Ce = [
486
+ "bar",
487
+ "line",
488
+ "area",
489
+ "lollipop",
490
+ "pareto",
491
+ "range-bar",
492
+ "range-area",
493
+ "dumbbell",
494
+ "stream"
495
+ ], we = [
496
+ "range-bar",
497
+ "range-area",
498
+ "dumbbell"
499
+ ], Te = [
500
+ {
501
+ value: "",
502
+ label: "chartBucketExact"
503
+ },
504
+ {
505
+ value: "day",
506
+ label: "chartBucketDay"
507
+ },
508
+ {
509
+ value: "week",
510
+ label: "chartBucketWeek"
511
+ },
512
+ {
513
+ value: "month",
514
+ label: "chartBucketMonth"
515
+ },
516
+ {
517
+ value: "quarter",
518
+ label: "chartBucketQuarter"
519
+ },
520
+ {
521
+ value: "year",
522
+ label: "chartBucketYear"
523
+ }
524
+ ], U = d("<option> </option>"), Ee = d("<optgroup></optgroup>"), De = d("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label>"), Oe = d("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><!><!></select></label>"), ke = d("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label> <!>", 1), W = d("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><option> </option><!></select></label>"), Ae = d("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <input class=\"sv-grid-chart-num\" type=\"number\" min=\"1\" max=\"200\"/></label>"), je = d("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><option> </option><option> </option><option> </option></select></label>"), Me = d("<button type=\"button\"> </button>"), Ne = d("<span class=\"sv-grid-chart-ctl sv-grid-chart-indicators\" role=\"group\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <span class=\"sv-grid-chart-chips\"></span></span>"), Pe = d("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label> <label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label>", 1), Fe = d("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label>"), G = d("<p class=\"sv-grid-chart-hint sv-grid-chart-pivot-hint\" role=\"note\"> </p>"), Ie = d("<p class=\"sv-grid-chart-hint\" role=\"note\"> </p>"), Le = d("<div><!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><option> </option><option> </option><option> </option></select></label> <!> <!> <!> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label> <!> <!> <!> <!> <!></div>");
525
+ function Re(e, n) {
526
+ te(n, !0);
527
+ let a = M(n, "ctrl", 7), o = M(n, "scope", 3, "panel"), s = N(() => a().chartableColumns), l = N(() => a().pivotResult != null), u = N(() => ye(i(s), n.messages).filter((e) => !i(l) || t(e.value) === e.value)), d = N(() => [...new Set(i(u).map((e) => e.group))]), p = N(() => V(n.messages));
528
+ function h(e) {
529
+ let t = a().chartIndicators.includes(e), n = xe.includes(e) ? a().chartIndicators.filter((e) => !xe.includes(e)) : a().chartIndicators;
530
+ a().chartIndicators = t ? n.filter((t) => t !== e) : [...n, e];
531
+ }
532
+ let w = N(() => H.find((e) => e.colors && a().chartPalette && e.colors.join() === a().chartPalette.join())?.key ?? "theme"), E = N(() => a().chartType === "bar"), k = N(() => a().chartType === "pie" || a().chartType === "sunburst"), ee = N(() => !i(l) && a().chartType !== "gauge" && a().chartType !== "histogram"), ne = N(() => !i(l) && i(s).dims.length > 1 && ![
533
+ "pie",
534
+ "gauge",
535
+ "waterfall",
536
+ "funnel",
537
+ "calendar",
538
+ "bullet",
539
+ "pareto",
540
+ "radial-bar"
541
+ ].includes(a().chartType)), re = N(() => [
542
+ "bar",
543
+ "line",
544
+ "area",
545
+ "radial-column"
546
+ ].includes(a().chartType)), ie = N(() => Ce.includes(a().chartType) || a().chartType === "scatter" || a().chartType === "boxplot" || a().chartType === "histogram"), ae = N(() => ![
547
+ "gauge",
548
+ "sankey",
549
+ "calendar",
550
+ "treemap",
551
+ "scatter",
552
+ "boxplot",
553
+ "chord",
554
+ "sunburst",
555
+ "stream"
556
+ ].includes(a().chartType)), oe = N(() => !i(l) && (a().chartType === "scatter" || we.includes(a().chartType) || a().chartType === "bullet")), I = N(() => a().chartType === "scatter" ? n.messages.chartY : a().chartType === "bullet" ? n.messages.chartTarget : n.messages.chartHigh), se = N(() => a().chartType === "funnel"), ce = N(() => a().chartType === "candlestick"), le = N(() => !i(l) && a().chartIsOhlc), ue = N(() => !i(l) && a().chartType === "histogram"), de = N(() => !i(l) && !a().chartIsOhlc), fe = N(() => !i(l) && a().chartType !== "scatter" && a().chartType !== "boxplot" && a().chartType !== "histogram" && !a().chartIsOhlc), pe = N(() => {
557
+ let e = a().chartType, t = a().chartSpec?.categories.length ?? 0;
558
+ if (e === "heatmap" && !a().chartSeriesId && i(s).dims.length > 1) return n.messages.chartIssueHeatmap;
559
+ if (e === "sankey" && !a().chartSeriesId) return n.messages.chartIssueSankey;
560
+ if (e === "radar" && t > 0 && t < 3) return n.messages.chartIssueRadar;
561
+ if (e === "funnel" && t === 1) return n.messages.chartIssueFunnel;
562
+ if (e === "chord" && !a().chartSeriesId) return n.messages.chartIssueChord;
563
+ if (e === "stream" && !a().chartSeriesId) return n.messages.chartIssueStream;
564
+ if (we.includes(e) && !a().effectiveChartMeasure2Id) return n.messages.chartIssueSecondMeasure;
565
+ if (a().chartIsOhlc) {
566
+ let e = a().chartOhlc;
567
+ if (!a().chartOhlcDateId) return n.messages.chartIssueOhlcDate;
568
+ if (!e.open || !e.high || !e.low || !e.close) return n.messages.chartIssueOhlcColumns;
569
+ }
570
+ return null;
571
+ });
572
+ var L = Le();
573
+ let me;
574
+ var he = c(L), ge = (e) => {
575
+ var t = De(), o = c(t), s = v(o, !0), l = b(o, 2);
576
+ g(l, 20, () => i(d), (e) => e, (e, t) => {
577
+ var n = Ee();
578
+ g(n, 21, () => i(u).filter((e) => e.group === t), (e) => e.value, (e, t) => {
579
+ var n = U(), a = v(n, !0), o = {};
580
+ _(() => {
581
+ r(a, i(t).label), o !== (o = i(t).value) && (n.value = (n.__value = o) ?? "");
582
+ }), A(e, n);
583
+ }), T(n), _(() => P(n, "label", t)), A(e, n);
584
+ }), T(l);
585
+ var f;
586
+ x(l), T(t), _(() => {
587
+ r(s, n.messages.chartType), f !== (f = a().chartType) && (l.value = (l.__value = f) ?? "", F(l, f));
588
+ }), m("change", l, (e) => a().chartType = e.currentTarget.value), A(e, t);
589
+ };
590
+ f(he, (e) => {
591
+ o() === "panel" && e(ge);
592
+ });
593
+ var R = b(he, 2), _e = (e) => {
594
+ var t = ke(), o = y(t), l = c(o), u = v(l, !0), d = b(l, 2);
595
+ g(d, 21, () => i(s).dates, (e) => e.id, (e, t) => {
596
+ var n = U(), a = v(n, !0), o = {};
597
+ _(() => {
598
+ r(a, i(t).label), o !== (o = i(t).id) && (n.value = (n.__value = o) ?? "");
599
+ }), A(e, n);
600
+ }), T(d);
601
+ var p;
602
+ x(d), T(o);
603
+ var h = b(o, 2);
604
+ g(h, 17, () => Se, (e) => e.key, (e, t) => {
605
+ var o = Oe(), l = c(o), u = v(l, !0), d = b(l, 2), p = c(d), h = (e) => {
606
+ var t = U(), i = v(t, !0);
607
+ t.value = t.__value = "", _(() => r(i, n.messages.chartNone)), A(e, t);
608
+ };
609
+ f(p, (e) => {
610
+ i(t).key === "volume" && e(h);
611
+ });
612
+ var y = b(p);
613
+ g(y, 17, () => i(s).measures, (e) => e.id, (e, t) => {
614
+ var n = U(), a = v(n, !0), o = {};
615
+ _(() => {
616
+ r(a, i(t).label), o !== (o = i(t).id) && (n.value = (n.__value = o) ?? "");
617
+ }), A(e, n);
618
+ }), T(d);
619
+ var S;
620
+ x(d), T(o), _(() => {
621
+ r(u, n.messages[i(t).label]), S !== (S = a().chartOhlc[i(t).key] ?? "") && (d.value = (d.__value = S) ?? "", F(d, S));
622
+ }), m("change", d, (e) => a().chartOhlc = {
623
+ ...a().chartOhlc,
624
+ [i(t).key]: e.currentTarget.value || null
625
+ }), A(e, o);
626
+ }), _(() => {
627
+ r(u, n.messages.chartDate), p !== (p = a().chartOhlcDateId ?? "") && (d.value = (d.__value = p) ?? "", F(d, p));
628
+ }), m("change", d, (e) => a().chartDimensionId = e.currentTarget.value || null), A(e, t);
629
+ }, z = (e) => {
630
+ var t = De(), o = c(t), l = v(o, !0), u = b(o, 2);
631
+ g(u, 21, () => i(s).dims, (e) => e.id, (e, t) => {
632
+ var n = U(), a = v(n, !0), o = {};
633
+ _(() => {
634
+ r(a, i(t).label), o !== (o = i(t).id) && (n.value = (n.__value = o) ?? "");
635
+ }), A(e, n);
636
+ }), T(u);
637
+ var d;
638
+ x(u), T(t), _(() => {
639
+ r(l, a().chartType === "sankey" ? n.messages.chartFrom : a().chartType === "heatmap" ? n.messages.chartColumns : n.messages.chartGroupBy), d !== (d = a().chartDimensionId ?? "") && (u.value = (u.__value = d) ?? "", F(u, d));
640
+ }), m("change", u, (e) => a().chartDimensionId = e.currentTarget.value || null), A(e, t);
641
+ };
642
+ f(R, (e) => {
643
+ i(le) ? e(_e) : i(ee) && e(z, 1);
644
+ });
645
+ var ve = b(R, 2), B = (e) => {
646
+ var t = W(), o = c(t), l = v(o, !0), u = b(o, 2), d = c(u), f = v(d, !0);
647
+ d.value = d.__value = "";
648
+ var p = b(d);
649
+ g(p, 17, () => i(s).dims, (e) => e.id, (e, t) => {
650
+ var n = U(), a = v(n, !0), o = {};
651
+ _(() => {
652
+ r(a, i(t).label), o !== (o = i(t).id) && (n.value = (n.__value = o) ?? "");
653
+ }), A(e, n);
654
+ }), T(u);
655
+ var h;
656
+ x(u), T(t), _(() => {
657
+ r(l, a().chartType === "sankey" ? n.messages.chartTo : a().chartType === "heatmap" ? n.messages.chartRows : n.messages.chartSplitBy), r(f, n.messages.chartNone), h !== (h = a().chartSeriesId ?? "") && (u.value = (u.__value = h) ?? "", F(u, h));
658
+ }), m("change", u, (e) => a().chartSeriesId = e.currentTarget.value || null), A(e, t);
659
+ };
660
+ f(ve, (e) => {
661
+ i(ne) && e(B);
662
+ });
663
+ var Re = b(ve, 2), ze = (e) => {
664
+ var t = De(), o = c(t), l = v(o, !0), u = b(o, 2);
665
+ g(u, 21, () => i(s).measures, (e) => e.id, (e, t) => {
666
+ var n = U(), a = v(n, !0), o = {};
667
+ _(() => {
668
+ r(a, i(t).label), o !== (o = i(t).id) && (n.value = (n.__value = o) ?? "");
669
+ }), A(e, n);
670
+ }), T(u);
671
+ var d;
672
+ x(u), T(t), _((e) => {
673
+ r(l, e), d !== (d = a().chartMeasureId ?? "") && (u.value = (u.__value = d) ?? "", F(u, d));
674
+ }, [() => a().chartType === "scatter" ? n.messages.chartX : we.includes(a().chartType) ? n.messages.chartLow : a().chartType === "gauge" ? n.messages.chartMetric : n.messages.chartValue]), m("change", u, (e) => a().chartMeasureId = e.currentTarget.value || null), A(e, t);
675
+ };
676
+ f(Re, (e) => {
677
+ i(de) && e(ze);
678
+ });
679
+ var Be = b(Re, 2), Ve = (e) => {
680
+ var t = De(), n = c(t), o = v(n, !0), l = b(n, 2);
681
+ g(l, 21, () => i(s).measures, (e) => e.id, (e, t) => {
682
+ var n = U(), a = v(n, !0), o = {};
683
+ _(() => {
684
+ r(a, i(t).label), o !== (o = i(t).id) && (n.value = (n.__value = o) ?? "");
685
+ }), A(e, n);
686
+ }), T(l);
687
+ var u;
688
+ x(l), T(t), _(() => {
689
+ r(o, i(I)), u !== (u = a().effectiveChartMeasure2Id ?? "") && (l.value = (l.__value = u) ?? "", F(l, u));
690
+ }), m("change", l, (e) => a().chartMeasure2Id = e.currentTarget.value || null), A(e, t);
691
+ };
692
+ f(Be, (e) => {
693
+ i(oe) && e(Ve);
694
+ });
695
+ var He = b(Be, 2), Ue = (e) => {
696
+ var t = De(), o = c(t), s = v(o, !0), l = b(o, 2);
697
+ g(l, 21, () => i(p), (e) => e.value, (e, t) => {
698
+ var n = U(), a = v(n, !0), o = {};
699
+ _(() => {
700
+ r(a, i(t).label), o !== (o = i(t).value) && (n.value = (n.__value = o) ?? "");
701
+ }), A(e, n);
702
+ }), T(l);
703
+ var u;
704
+ x(l), T(t), _(() => {
705
+ r(s, n.messages.chartAggregate), u !== (u = a().chartReduce) && (l.value = (l.__value = u) ?? "", F(l, u));
706
+ }), m("change", l, (e) => a().chartReduce = e.currentTarget.value), A(e, t);
707
+ };
708
+ f(He, (e) => {
709
+ i(fe) && e(Ue);
710
+ });
711
+ var We = b(He, 2), Ge = (e) => {
712
+ var t = Ae(), i = c(t), o = v(i, !0), s = b(i, 2);
713
+ D(s), T(t), _(() => {
714
+ P(t, "title", n.messages.chartBinsTitle), r(o, n.messages.chartBins), O(s, a().chartBins ?? ""), P(s, "placeholder", n.messages.chartBuilderAuto);
715
+ }), m("change", s, (e) => a().chartBins = e.currentTarget.value ? Number(e.currentTarget.value) : null), A(e, t);
716
+ };
717
+ f(We, (e) => {
718
+ i(ue) && e(Ge);
719
+ });
720
+ var Ke = b(We, 2), qe = (e) => {
721
+ var t = je(), i = c(t), o = v(i, !0), s = b(i, 2), l = c(s), u = v(l, !0);
722
+ l.value = l.__value = "trapezoid";
723
+ var d = b(l), f = v(d, !0);
724
+ d.value = d.__value = "pyramid";
725
+ var p = b(d), h = v(p, !0);
726
+ p.value = p.__value = "cone", T(s);
727
+ var g;
728
+ x(s), T(t), _(() => {
729
+ r(o, n.messages.chartShape), r(u, n.messages.chartShapeFunnel), r(f, n.messages.chartShapePyramid), r(h, n.messages.chartShapeCone), g !== (g = a().chartFunnelShape ?? "trapezoid") && (s.value = (s.__value = g) ?? "", F(s, g));
730
+ }), m("change", s, (e) => a().chartFunnelShape = e.currentTarget.value), A(e, t);
731
+ };
732
+ f(Ke, (e) => {
733
+ i(se) && e(qe);
734
+ });
735
+ var Je = b(Ke, 2), Ye = (e) => {
736
+ var t = je(), i = c(t), o = v(i, !0), s = b(i, 2), l = c(s), u = v(l, !0);
737
+ l.value = l.__value = "classic";
738
+ var d = b(l), f = v(d, !0);
739
+ d.value = d.__value = "hollow";
740
+ var p = b(d), h = v(p, !0);
741
+ p.value = p.__value = "heikin-ashi", T(s);
742
+ var g;
743
+ x(s), T(t), _(() => {
744
+ r(o, n.messages.chartCandles), r(u, n.messages.chartCandlesClassic), r(f, n.messages.chartCandlesHollow), r(h, n.messages.chartCandlesHeikinAshi), g !== (g = a().chartCandleStyle ?? "classic") && (s.value = (s.__value = g) ?? "", F(s, g));
745
+ }), m("change", s, (e) => a().chartCandleStyle = e.currentTarget.value), A(e, t);
746
+ };
747
+ f(Je, (e) => {
748
+ i(ce) && e(Ye);
749
+ });
750
+ var Xe = b(Je, 2), Ze = (e) => {
751
+ var t = Ne(), o = c(t), s = v(o, !0), l = b(o, 2);
752
+ g(l, 21, () => be, (e) => e.value, (e, t) => {
753
+ var o = Me();
754
+ let s;
755
+ var c = v(o, !0);
756
+ _((e, a) => {
757
+ s = C(o, 1, "sv-grid-chart-chip", null, s, { "is-on": e }), P(o, "aria-pressed", a), P(o, "title", n.messages[i(t).title]), r(c, n.messages[i(t).label]);
758
+ }, [() => a().chartIndicators.includes(i(t).value), () => a().chartIndicators.includes(i(t).value)]), m("click", o, () => h(i(t).value)), A(e, o);
759
+ }), T(l), T(t), _(() => {
760
+ P(t, "aria-label", n.messages.chartIndicators), r(s, n.messages.chartIndicators);
761
+ }), A(e, t);
762
+ };
763
+ f(Xe, (e) => {
764
+ i(le) && e(Ze);
765
+ });
766
+ var Qe = b(Xe, 2), $e = c(Qe), et = v($e, !0), K = b($e, 2), tt = c(K), nt = v(tt, !0);
767
+ tt.value = tt.__value = "number";
768
+ var rt = b(tt), it = v(rt, !0);
769
+ rt.value = rt.__value = "currency";
770
+ var at = b(rt), ot = v(at, !0);
771
+ at.value = at.__value = "percent", T(K);
772
+ var st;
773
+ x(K), T(Qe);
774
+ var ct = b(Qe, 2), lt = (e) => {
775
+ var t = Pe(), i = y(t), o = c(i);
776
+ D(o);
777
+ var s = b(o);
778
+ T(i);
779
+ var l = b(i, 2), u = c(l);
780
+ D(u);
781
+ var d = b(u);
782
+ T(l), _(() => {
783
+ j(o, a().chartStacked), r(s, ` ${n.messages.chartStacked ?? ""}`), P(l, "title", n.messages.chartStacked100Title), j(u, a().chartStacked100), r(d, ` ${n.messages.chartStacked100 ?? ""}`);
784
+ }), m("change", o, (e) => a().chartStacked = e.currentTarget.checked), m("change", u, (e) => a().chartStacked100 = e.currentTarget.checked), A(e, t);
785
+ };
786
+ f(ct, (e) => {
787
+ i(re) && e(lt);
788
+ });
789
+ var ut = b(ct, 2), dt = (e) => {
790
+ var t = Fe(), i = c(t);
791
+ D(i);
792
+ var o = b(i);
793
+ T(t), _(() => {
794
+ P(t, "title", n.messages.chartHorizontalTitle), j(i, a().chartOrientation === "horizontal"), r(o, ` ${n.messages.chartHorizontal ?? ""}`);
795
+ }), m("change", i, (e) => a().chartOrientation = e.currentTarget.checked ? "horizontal" : "vertical"), A(e, t);
796
+ };
797
+ f(ut, (e) => {
798
+ i(E) && e(dt);
799
+ });
800
+ var ft = b(ut, 2), pt = (e) => {
801
+ var t = Fe(), i = c(t);
802
+ D(i);
803
+ var o = b(i);
804
+ T(t), _(() => {
805
+ j(i, a().chartDonut), r(o, ` ${n.messages.chartDonut ?? ""}`);
806
+ }), m("change", i, (e) => a().chartDonut = e.currentTarget.checked), A(e, t);
807
+ };
808
+ f(ft, (e) => {
809
+ i(k) && e(pt);
810
+ });
811
+ var mt = b(ft, 2), ht = c(mt), gt = v(ht, !0), q = b(ht, 2);
812
+ g(q, 21, () => H, (e) => e.key, (e, t) => {
813
+ var a = U(), o = v(a, !0), s = {};
814
+ _(() => {
815
+ r(o, n.messages[i(t).label]), s !== (s = i(t).key) && (a.value = (a.__value = s) ?? "");
816
+ }), A(e, a);
817
+ }), T(q);
818
+ var _t;
819
+ x(q), T(mt);
820
+ var J = b(mt, 2), vt = (e) => {
821
+ var t = Fe(), i = c(t);
822
+ D(i);
823
+ var o = b(i);
824
+ T(t), _(() => {
825
+ j(i, a().chartDataLabels), r(o, ` ${n.messages.chartLabels ?? ""}`);
826
+ }), m("change", i, (e) => a().chartDataLabels = e.currentTarget.checked), A(e, t);
827
+ };
828
+ f(J, (e) => {
829
+ i(ae) && e(vt);
830
+ });
831
+ var yt = b(J, 2), bt = (e) => {
832
+ var t = Fe(), i = c(t);
833
+ D(i);
834
+ var o = b(i);
835
+ T(t), _(() => {
836
+ P(t, "title", n.messages.chartLogScaleTitle), j(i, a().chartLogScale), r(o, ` ${n.messages.chartLogScale ?? ""}`);
837
+ }), m("change", i, (e) => a().chartLogScale = e.currentTarget.checked), A(e, t);
838
+ };
839
+ f(yt, (e) => {
840
+ i(ie) && e(bt);
841
+ });
842
+ var xt = b(yt, 2), St = (e) => {
843
+ var t = De(), o = c(t), s = v(o, !0), l = b(o, 2);
844
+ g(l, 21, () => Te, (e) => e.value, (e, t) => {
845
+ var a = U(), o = v(a, !0), s = {};
846
+ _(() => {
847
+ r(o, n.messages[i(t).label]), s !== (s = i(t).value) && (a.value = (a.__value = s) ?? "");
848
+ }), A(e, a);
849
+ }), T(l);
850
+ var u;
851
+ x(l), T(t), _(() => {
852
+ P(t, "title", n.messages.chartBucketTitle), r(s, n.messages.chartBucket), u !== (u = a().chartBucket ?? "") && (l.value = (l.__value = u) ?? "", F(l, u));
853
+ }), m("change", l, (e) => a().chartBucket = e.currentTarget.value || null), A(e, t);
854
+ };
855
+ f(xt, (e) => {
856
+ a().chartDimensionIsDate && i(ee) && e(St);
857
+ });
858
+ var Ct = b(xt, 2), wt = (e) => {
859
+ var t = Fe(), i = c(t);
860
+ D(i);
861
+ var o = b(i);
862
+ T(t), _(() => {
863
+ P(t, "title", n.messages.chartDateAxisTitle), j(i, a().chartTimeAxis), r(o, ` ${n.messages.chartDateAxis ?? ""}`);
864
+ }), m("change", i, (e) => a().chartTimeAxis = e.currentTarget.checked), A(e, t);
865
+ }, Tt = N(() => a().chartDimensionIsDate && Ce.includes(a().chartType));
866
+ f(Ct, (e) => {
867
+ i(Tt) && e(wt);
868
+ });
869
+ var Y = b(Ct, 2), X = (e) => {
870
+ var t = G(), i = v(t, !0);
871
+ _(() => r(i, n.messages.chartPivotHint)), A(e, t);
872
+ }, Z = (e) => {
873
+ var t = Ie(), n = v(t, !0);
874
+ _(() => r(n, i(pe))), A(e, t);
875
+ };
876
+ f(Y, (e) => {
877
+ i(l) ? e(X) : i(pe) && e(Z, 1);
878
+ }), T(L), _(() => {
879
+ me = C(L, 1, "sv-grid-chart-controls", null, me, { "is-form": o() === "builder" }), P(L, "data-scope", o()), r(et, n.messages.chartFormat), r(nt, n.messages.chartFormatNumber), r(it, n.messages.chartFormatCurrency), r(ot, n.messages.chartFormatPercent), st !== (st = a().chartValueFormat) && (K.value = (K.__value = st) ?? "", F(K, st)), r(gt, n.messages.chartColours), _t !== (_t = i(w)) && (q.value = (q.__value = _t) ?? "", F(q, _t));
880
+ }), m("change", K, (e) => a().chartValueFormat = e.currentTarget.value), m("change", q, (e) => a().chartPalette = H.find((t) => t.key === e.currentTarget.value)?.colors ?? null), A(e, L), S();
881
+ }
882
+ l(["change", "click"]);
883
+ //#endregion
884
+ //#region ../grid/dist/chart-panel-messages.js
885
+ var ze = {
886
+ chartPanelTitle: "Chart",
887
+ chartClearFilter: "Clear filter",
888
+ chartExport: "Export",
889
+ chartExportLabel: "Export chart",
890
+ chartExportPng: "PNG image",
891
+ chartExportSvg: "SVG vector",
892
+ chartExportPdf: "PDF document",
893
+ chartExportPdfCannotDraw: "No PDF: its font cannot draw \"{text}\". Download PNG or SVG.",
894
+ chartExportCsv: "CSV data",
895
+ chartExportCsvNone: "This chart has no table of values to save as CSV.",
896
+ chartExportCopy: "Copy to clipboard",
897
+ chartExportPrint: "Print",
898
+ chartExportDescribe: "Describe chart",
899
+ chartAi: "AI",
900
+ chartAiLabel: "Chart with AI",
901
+ chartAiPlaceholder: "Describe a chart, e.g. revenue by region stacked by product",
902
+ chartAiRun: "Chart it",
903
+ chartAiThinking: "Thinking...",
904
+ chartAiExplain: "Explain",
905
+ chartAiExplainTitle: "Explain this chart in plain words",
906
+ chartAiNoChart: "Couldn't build a chart from that request.",
907
+ chartAiNoExplanation: "Couldn't explain this chart.",
908
+ chartAiFailed: "Something went wrong.",
909
+ chartBuild: "Build",
910
+ chartBuildLabel: "Open the chart builder",
911
+ chartBuildTitle: "Chart builder: type gallery, data and format",
912
+ chartLinkBack: "Link the chart back to the grid",
913
+ chartUnlink: "Unlink the chart from the grid",
914
+ chartLinkedTitle: "Linked: the chart follows the grid's rows. Click to freeze it.",
915
+ chartUnlinkedTitle: "Unlinked: the chart keeps the data it has. Click to follow the grid again.",
916
+ chartAdd: "Add chart",
917
+ chartSave: "Save",
918
+ chartSaveLabel: "Saved charts",
919
+ chartSavedTitle: "Saved charts",
920
+ chartSaveName: "Save this chart as",
921
+ chartSaveNamePlaceholder: "Name",
922
+ chartSaveApply: "Apply",
923
+ chartPivotHint: "Charting the pivot: its row groups are the categories and its column groups the series.",
924
+ chartSaveRemove: "Remove",
925
+ chartSavedEmpty: "No saved charts yet.",
926
+ chartMaximize: "Maximize",
927
+ chartRestore: "Restore",
928
+ chartDock: "Dock",
929
+ chartDockLabel: "Dock chart",
930
+ chartPopOut: "Pop out",
931
+ chartPopOutLabel: "Pop out chart",
932
+ chartClose: "Close chart",
933
+ chartResize: "Resize chart panel",
934
+ chartResizeWindow: "Resize chart window",
935
+ chartTabs: "Charts",
936
+ chartRemoveTab: "Remove {title}",
937
+ chartRemove: "Remove",
938
+ chartEmptyColumns: "Charting needs at least one text column (to group by) and one numeric column (to measure).",
939
+ chartEmptyData: "No data to chart.",
940
+ chartType: "Type",
941
+ chartDate: "Date",
942
+ chartGroupBy: "Group by",
943
+ chartFrom: "From",
944
+ chartColumns: "Columns",
945
+ chartSplitBy: "Split by",
946
+ chartTo: "To",
947
+ chartRows: "Rows",
948
+ chartNone: "(none)",
949
+ chartValue: "Value",
950
+ chartX: "X",
951
+ chartY: "Y",
952
+ chartLow: "Low",
953
+ chartHigh: "High",
954
+ chartOpen: "Open",
955
+ chartClosePrice: "Close",
956
+ chartVolume: "Volume",
957
+ chartMetric: "Metric",
958
+ chartTarget: "Target",
959
+ chartAggregate: "Aggregate",
960
+ chartReduceSum: "Sum",
961
+ chartReduceAvg: "Average",
962
+ chartReduceCount: "Count",
963
+ chartReduceMin: "Min",
964
+ chartReduceMax: "Max",
965
+ chartReduceMedian: "Median",
966
+ chartReduceP90: "90th percentile",
967
+ chartReduceFirst: "First",
968
+ chartReduceLast: "Last",
969
+ chartReduceCountDistinct: "Distinct count",
970
+ chartBins: "Bins",
971
+ chartBinsTitle: "How many bins the sample is split into",
972
+ chartShape: "Shape",
973
+ chartShapeFunnel: "Funnel",
974
+ chartShapePyramid: "Pyramid",
975
+ chartShapeCone: "Cone",
976
+ chartCandles: "Candles",
977
+ chartCandlesClassic: "Classic",
978
+ chartCandlesHollow: "Hollow",
979
+ chartCandlesHeikinAshi: "Heikin-Ashi",
980
+ chartIndicators: "Indicators",
981
+ chartIndVolume: "Volume",
982
+ chartIndVolumeTitle: "Volume bars under the price",
983
+ chartIndRsi: "RSI",
984
+ chartIndRsiTitle: "Relative strength index, 14 bars",
985
+ chartIndMacd: "MACD",
986
+ chartIndMacdTitle: "MACD 12 / 26 / 9",
987
+ chartIndStochastic: "Stoch",
988
+ chartIndStochasticTitle: "Stochastic oscillator 14 / 3",
989
+ chartIndAtr: "ATR",
990
+ chartIndAtrTitle: "Average true range, 14 bars",
991
+ chartIndObv: "OBV",
992
+ chartIndObvTitle: "On-balance volume",
993
+ chartIndSma: "SMA 20",
994
+ chartIndSmaTitle: "20-bar simple moving average on the price",
995
+ chartIndEma: "EMA 20",
996
+ chartIndEmaTitle: "20-bar exponential moving average on the price",
997
+ chartIndBb: "Bollinger",
998
+ chartIndBbTitle: "Bollinger bands 20 / 2 on the price",
999
+ chartIndVwap: "VWAP",
1000
+ chartIndVwapTitle: "Volume-weighted average price on the price",
1001
+ chartFormat: "Format",
1002
+ chartFormatNumber: "Number",
1003
+ chartFormatCurrency: "Currency",
1004
+ chartFormatPercent: "Percent",
1005
+ chartStacked: "Stacked",
1006
+ chartStacked100: "100%",
1007
+ chartStacked100Title: "Normalise each category to 100 percent",
1008
+ chartHorizontal: "Horizontal",
1009
+ chartHorizontalTitle: "Bars grow rightwards - suits long category labels",
1010
+ chartDonut: "Donut",
1011
+ chartColours: "Colours",
1012
+ chartPaletteTheme: "Theme",
1013
+ chartPaletteOcean: "Ocean",
1014
+ chartPaletteSunset: "Sunset",
1015
+ chartPaletteForest: "Forest",
1016
+ chartPaletteSlate: "Slate",
1017
+ chartLabels: "Labels",
1018
+ chartLogScale: "Log scale",
1019
+ chartLogScaleTitle: "Logarithmic value axis - flattens wide-range data",
1020
+ chartBucket: "Bucket",
1021
+ chartBucketTitle: "Group the dates by calendar unit: one bar per month instead of one per day",
1022
+ chartBucketExact: "Exact",
1023
+ chartBucketDay: "Day",
1024
+ chartBucketWeek: "Week",
1025
+ chartBucketMonth: "Month",
1026
+ chartBucketQuarter: "Quarter",
1027
+ chartBucketYear: "Year",
1028
+ chartDateAxis: "Date axis",
1029
+ chartDateAxisTitle: "Space points by actual date - real time ticks and proportional gaps",
1030
+ chartGroupCompare: "Compare",
1031
+ chartGroupPartOfWhole: "Part of a whole",
1032
+ chartGroupFlow: "Flow",
1033
+ chartGroupDistribution: "Distribution",
1034
+ chartGroupSingleValue: "Single value",
1035
+ chartGroupOverTime: "Over time",
1036
+ chartTypeBar: "Bar",
1037
+ chartTypeLine: "Line",
1038
+ chartTypeArea: "Area",
1039
+ chartTypeLollipop: "Lollipop",
1040
+ chartTypePareto: "Pareto",
1041
+ chartTypeRangeBar: "Range bar",
1042
+ chartTypeRangeArea: "Range area",
1043
+ chartTypeDumbbell: "Dumbbell",
1044
+ chartTypeRadialColumn: "Radial column",
1045
+ chartTypeRadialBar: "Radial bar",
1046
+ chartTypeNightingale: "Nightingale",
1047
+ chartTypePie: "Pie",
1048
+ chartTypeTreemap: "Tree map",
1049
+ chartTypeSunburst: "Sunburst",
1050
+ chartTypeFunnel: "Funnel",
1051
+ chartTypeWaterfall: "Waterfall",
1052
+ chartTypeSankey: "Sankey",
1053
+ chartTypeChord: "Chord",
1054
+ chartTypeRadar: "Radar",
1055
+ chartTypeHeatmap: "Heat map",
1056
+ chartTypeScatter: "Scatter",
1057
+ chartTypeBoxplot: "Box plot",
1058
+ chartTypeHistogram: "Histogram",
1059
+ chartTypeGauge: "Gauge",
1060
+ chartTypeBullet: "Bullet",
1061
+ chartTypeCalendar: "Calendar",
1062
+ chartTypeStream: "Stream",
1063
+ chartTypeCandlestick: "Candlestick",
1064
+ chartTypeOhlc: "OHLC bars",
1065
+ chartIssueHeatmap: "Heat map needs a Split by column for its rows.",
1066
+ chartIssueSankey: "Sankey needs a Split by column: Group by is the source, Split by the target.",
1067
+ chartIssueRadar: "Radar needs at least 3 groups.",
1068
+ chartIssueFunnel: "Funnel needs at least 2 stages.",
1069
+ chartIssueChord: "Chord needs a Split by column: Group by and Split by are the two ends of each flow.",
1070
+ chartIssueStream: "Stream needs a Split by column: each split becomes a layer.",
1071
+ chartIssueSecondMeasure: "Pick a second measure for the high end of the range.",
1072
+ chartIssueOhlcDate: "Candlesticks need a date column.",
1073
+ chartIssueOhlcColumns: "Pick the Open, High, Low and Close columns.",
1074
+ chartBuilderTitle: "Chart builder",
1075
+ chartBuilderTabType: "Type",
1076
+ chartBuilderTabData: "Data",
1077
+ chartBuilderTabFormat: "Format",
1078
+ chartBuilderLinked: "Linked to the grid",
1079
+ chartBuilderFrozenAt: "Frozen at {time}; edits, filters and new rows no longer change it.",
1080
+ chartBuilderFollows: "The chart follows the grid's rows, filters and edits.",
1081
+ chartBuilderTitleField: "Title",
1082
+ chartBuilderSubtitle: "Subtitle",
1083
+ chartBuilderCaption: "Caption",
1084
+ chartBuilderLegend: "Legend",
1085
+ chartLegendBottom: "Bottom",
1086
+ chartLegendTop: "Top",
1087
+ chartLegendLeft: "Left",
1088
+ chartLegendRight: "Right",
1089
+ chartLegendHidden: "Hidden",
1090
+ chartBuilderDataLabels: "Data labels",
1091
+ chartBuilderPanelSetting: "Panel setting",
1092
+ chartLabelsTop: "Top",
1093
+ chartLabelsOutside: "Outside",
1094
+ chartLabelsInside: "Inside",
1095
+ chartLabelsCenter: "Center",
1096
+ chartLabelsHidden: "Hidden",
1097
+ chartBuilderSeriesLabels: "Series labels",
1098
+ chartBuilderCrosshairLabels: "Crosshair labels",
1099
+ chartBuilderCompactBelow: "Compact under",
1100
+ chartBuilderCompactBelowTitle: "Below this width in px the chart drops its series and data labels, turns the category labels vertical and hides the legend",
1101
+ chartBuilderValueAxis: "Value axis",
1102
+ chartBuilderRightAxis: "Right axis",
1103
+ chartBuilderCategoryAxis: "Category axis",
1104
+ chartBuilderMin: "Min",
1105
+ chartBuilderMax: "Max",
1106
+ chartBuilderAuto: "auto",
1107
+ chartBuilderOff: "off",
1108
+ chartBuilderGridLines: "Grid lines",
1109
+ chartBuilderAxisLabels: "Labels",
1110
+ chartBuilderLabelsAuto: "Auto",
1111
+ chartBuilderLabelsHorizontal: "Horizontal",
1112
+ chartBuilderLabelsTilted: "Tilted",
1113
+ chartBuilderLabelsVertical: "Vertical",
1114
+ chartBuilderSeries: "Series",
1115
+ chartBuilderColor: "Color",
1116
+ chartBuilderSeriesType: "Type",
1117
+ chartBuilderAxis: "Axis",
1118
+ chartBuilderMarker: "Marker",
1119
+ chartBuilderWidth: "Width",
1120
+ chartBuilderStack: "Stack",
1121
+ chartBuilderStackPlaceholder: "own",
1122
+ chartBuilderSeriesColorLabel: "{series} colour",
1123
+ chartBuilderSeriesTypeLabel: "{series} type",
1124
+ chartBuilderSeriesAxisLabel: "{series} axis",
1125
+ chartBuilderSeriesMarkerLabel: "{series} marker",
1126
+ chartBuilderSeriesWidthLabel: "{series} line width",
1127
+ chartBuilderSeriesStackLabel: "{series} stack group",
1128
+ chartBuilderChartType: "Chart",
1129
+ chartBuilderBar: "Bar",
1130
+ chartBuilderLine: "Line",
1131
+ chartBuilderArea: "Area",
1132
+ chartBuilderLeft: "Left",
1133
+ chartBuilderRight: "Right",
1134
+ chartBuilderStyle: "Style",
1135
+ chartBuilderFontSize: "Font size",
1136
+ chartBuilderFontFamily: "Font",
1137
+ chartBuilderBackground: "Background",
1138
+ chartBuilderTextColor: "Text",
1139
+ chartBuilderResetFormat: "Reset format"
1140
+ };
1141
+ function Be(e) {
1142
+ return I(ze, e);
1143
+ }
1144
+ function Ve(e, t) {
1145
+ return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
1146
+ }
1147
+ //#endregion
1148
+ //#region ../grid/dist/SvGridChartPanel.svelte
1149
+ var He = d("<div role=\"separator\"></div>"), Ue = d("<button type=\"button\" class=\"sv-grid-chart-btn\"> </button>"), We = p("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg>"), Ge = p("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path><polyline points=\"7 10 12 15 17 10\"></polyline><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line></svg>"), Ke = d("<div class=\"sv-grid-chart-export-menu\" role=\"menu\" tabindex=\"-1\"><button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button></div>"), qe = d("<button type=\"button\"><svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12 2l1.9 4.6L18.5 8.5 13.9 10.4 12 15l-1.9-4.6L5.5 8.5l4.6-1.9L12 2zm6 11l1 2.4 2.4 1-2.4 1L18 21l-1-2.6-2.4-1 2.4-1L18 13zM6 14l.8 2 2 .8-2 .8L6 20l-.8-2.4-2-.8 2-.8L6 14z\"></path></svg> </button>"), Je = d("<li class=\"sv-grid-chart-saved-item\"><button type=\"button\" class=\"sv-grid-chart-saved-apply\"> </button> <button type=\"button\" class=\"sv-grid-chart-saved-x\">&times;</button></li>"), Ye = d("<ul class=\"sv-grid-chart-saved-list\"></ul>"), Xe = d("<p class=\"sv-grid-chart-saved-empty\"> </p>"), Ze = d("<div class=\"sv-grid-chart-export-menu sv-grid-chart-saved-menu\" role=\"dialog\"><form class=\"sv-grid-chart-saved-row\"><input class=\"sv-grid-chart-saved-name\" type=\"text\"/> <button type=\"submit\" class=\"sv-grid-chart-btn\"> </button></form> <!></div>"), Qe = p("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07l-1.72 1.71\"></path><path d=\"M5.17 11.75l-1.71 1.71a5 5 0 0 0 7.07 7.07l1.71-1.71\"></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\"></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\"></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\"></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\"></line></svg>"), $e = p("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"></path><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"></path></svg>"), et = d("<button type=\"button\" class=\"sv-grid-chart-btn sv-grid-chart-build-btn\" aria-haspopup=\"dialog\"><svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"></rect><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"></rect><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"></rect><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"></rect></svg> </button> <div class=\"sv-grid-chart-export sv-grid-chart-saved\"><button type=\"button\" class=\"sv-grid-chart-icon-btn sv-grid-chart-saved-btn\" aria-haspopup=\"dialog\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"></path><polyline points=\"17 21 17 13 7 13 7 21\"></polyline><polyline points=\"7 3 7 8 15 8\"></polyline></svg></button> <!></div> <button type=\"button\"><!></button> <button type=\"button\" class=\"sv-grid-chart-icon-btn\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"></line><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line></svg></button>", 1), K = p("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M8 3v3a2 2 0 0 1-2 2H3\"></path><path d=\"M21 8h-3a2 2 0 0 1-2-2V3\"></path><path d=\"M3 16h3a2 2 0 0 1 2 2v3\"></path><path d=\"M16 21v-3a2 2 0 0 1 2-2h3\"></path></svg>"), tt = p("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M8 3H5a2 2 0 0 0-2 2v3\"></path><path d=\"M21 8V5a2 2 0 0 0-2-2h-3\"></path><path d=\"M3 16v3a2 2 0 0 0 2 2h3\"></path><path d=\"M16 21h3a2 2 0 0 0 2-2v-3\"></path></svg>"), nt = d("<button type=\"button\" class=\"sv-grid-chart-icon-btn\"><!></button> <button type=\"button\" class=\"sv-grid-chart-icon-btn\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"></rect><line x1=\"15\" y1=\"3\" x2=\"15\" y2=\"21\"></line></svg></button>", 1), rt = d("<button type=\"button\" class=\"sv-grid-chart-icon-btn\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M15 3h6v6\"></path><path d=\"M10 14 21 3\"></path><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path></svg></button>"), it = d("<div><button type=\"button\" class=\"sv-grid-chart-tab-label\" role=\"tab\"> </button> <button type=\"button\" class=\"sv-grid-chart-tab-x\">&times;</button></div>"), at = d("<div class=\"sv-grid-chart-tabs\" role=\"tablist\"></div>"), ot = d("<button type=\"button\" class=\"sv-grid-chart-btn sv-grid-chart-explain-btn\"> </button>"), st = d("<p class=\"sv-grid-chart-ai-msg is-error\"> </p>"), ct = d("<p class=\"sv-grid-chart-ai-msg\"> </p>"), lt = d("<div class=\"sv-grid-chart-ai\"><form class=\"sv-grid-chart-ai-row\"><input class=\"sv-grid-chart-ai-input\" type=\"text\"/> <button type=\"submit\" class=\"sv-grid-chart-btn\"> </button> <!></form> <!></div>"), ut = d("<div class=\"sv-grid-chart-panes-host\"><!></div>"), dt = d("<p class=\"sv-grid-chart-empty\"><!></p>"), ft = d("<div class=\"sv-grid-chart-float-resizer\" role=\"separator\"></div>"), pt = d("<section><!> <header class=\"sv-grid-chart-panel-head\"><div><svg class=\"sv-grid-chart-title-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"20\" x2=\"12\" y2=\"10\"></line><line x1=\"18\" y1=\"20\" x2=\"18\" y2=\"4\"></line><line x1=\"6\" y1=\"20\" x2=\"6\" y2=\"16\"></line></svg> <span class=\"sv-grid-chart-title\"> </span> <div class=\"sv-grid-chart-actions\"><!> <div class=\"sv-grid-chart-export\"><button type=\"button\" class=\"sv-grid-chart-icon-btn\"><!></button> <!></div> <!> <!> <!> <button type=\"button\" class=\"sv-grid-chart-close\">&times;</button></div></div> <!> <!> <!></header> <div class=\"sv-grid-chart-panel-body\"><!></div> <!> <!></section>");
1150
+ function mt(e, t) {
1151
+ te(t, !0);
1152
+ let l = E(null), d = E(!1);
1153
+ function p() {
1154
+ if (i(l)) {
1155
+ n(d, !0);
1156
+ return;
1157
+ }
1158
+ import("./SvGridChartBuilder-Ci_GlCg3.js").then((e) => {
1159
+ n(l, e.default, !0), n(d, !0);
1160
+ });
1161
+ }
1162
+ let x = M(t, "ctrl", 7), O = N(() => Be(x().localizationText)), k = N(() => x().chartingConfig), j = N(() => x().chartCfg), ne = N(() => x().chartFormat?.legend === void 0 || x().chartFormat.legend), re = N(() => x().chartFormat?.dataLabels === void 0 ? x().chartDataLabels : x().chartFormat.dataLabels !== null && { placement: x().chartFormat.dataLabels }), F = N(() => x().chartFormat?.crosshairLabels !== !1), I = N(() => x().chartIsCustom), L = N(() => i(k)?.position ?? "bottom"), me = N(() => i(k)?.crossFilter !== !1), R = N(() => x().chartSpec), _e = N(() => x().chartableColumns), z = N(() => x().chartSize ?? (i(L) === "right" ? i(k)?.width ?? 340 : i(k)?.height ?? 260)), B = N(() => x().chartFloating), V = N(() => x().chartMaximized), H = N(() => x().chartFloatRect), be = E(null);
1163
+ function xe() {
1164
+ let e = i(be)?.offsetParent;
1165
+ return {
1166
+ w: e?.clientWidth ?? 800,
1167
+ h: e?.clientHeight ?? 520
1168
+ };
1169
+ }
1170
+ function Se() {
1171
+ if (!x().chartFloatRect) {
1172
+ let { w: e, h: t } = xe(), n = Math.min(600, Math.max(360, e - 80)), r = Math.min(430, Math.max(260, t - 90));
1173
+ x().chartFloatRect = {
1174
+ x: Math.round((e - n) / 2),
1175
+ y: Math.round((t - r) / 2),
1176
+ w: n,
1177
+ h: r
1178
+ };
1179
+ }
1180
+ x().chartFloating = !0;
1181
+ }
1182
+ function Ce() {
1183
+ x().chartFloating = !1, x().chartMaximized = !1;
1184
+ }
1185
+ let we = () => x().chartMaximized = !x().chartMaximized;
1186
+ function Te(e) {
1187
+ if (!i(B) || i(V) || e.target?.closest("button")) return;
1188
+ let t = x().chartFloatRect;
1189
+ if (!t) return;
1190
+ e.preventDefault();
1191
+ let n = e.clientX, r = e.clientY, { w: a, h: o } = xe(), s = (e) => {
1192
+ let i = Math.max(0, Math.min(a - t.w, t.x + e.clientX - n)), s = Math.max(0, Math.min(o - t.h, t.y + e.clientY - r));
1193
+ x().chartFloatRect = {
1194
+ x: i,
1195
+ y: s,
1196
+ w: t.w,
1197
+ h: t.h
1198
+ };
1199
+ }, c = () => {
1200
+ window.removeEventListener("pointermove", s), window.removeEventListener("pointerup", c);
1201
+ };
1202
+ window.addEventListener("pointermove", s), window.addEventListener("pointerup", c);
1203
+ }
1204
+ function U(e) {
1205
+ let t = x().chartFloatRect;
1206
+ if (!t) return;
1207
+ e.preventDefault(), e.stopPropagation();
1208
+ let n = e.clientX, r = e.clientY;
1209
+ e.target.setPointerCapture?.(e.pointerId);
1210
+ let i = (e) => {
1211
+ x().chartFloatRect = {
1212
+ x: t.x,
1213
+ y: t.y,
1214
+ w: Math.max(300, t.w + e.clientX - n),
1215
+ h: Math.max(220, t.h + e.clientY - r)
1216
+ };
1217
+ }, a = () => {
1218
+ window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", a);
1219
+ };
1220
+ window.addEventListener("pointermove", i), window.addEventListener("pointerup", a);
1221
+ }
1222
+ let Ee = N(() => i(B) ? i(V) ? "left:12px; top:12px; right:12px; bottom:12px; width:auto; height:auto;" : i(H) ? `left:${i(H).x}px; top:${i(H).y}px; width:${i(H).w}px; height:${i(H).h}px;` : "" : i(L) === "right" ? `width:${i(z)}px` : `height:${i(z)}px`), De = N(() => ye(i(_e), i(O)));
1223
+ function Oe(e) {
1224
+ i(me) && e.category != null && x().applyChartCrossFilter(String(e.category));
1225
+ }
1226
+ let ke = E(null), W = E(!1), Ae = E(!1), je = () => i(ke)?.querySelector("svg") ?? null, Me = N(() => !!i(R) && le(i(R)));
1227
+ function Ne() {
1228
+ let e = je();
1229
+ e && ue(e, "chart.png"), n(W, !1);
1230
+ }
1231
+ function Pe() {
1232
+ let e = je();
1233
+ e && fe(e, "chart.svg"), n(W, !1);
1234
+ }
1235
+ function Fe() {
1236
+ i(R) && ce(i(R), "chart.csv"), n(W, !1);
1237
+ }
1238
+ let G = E(null), Ie = () => i(R)?.title ?? x().charts[x().activeChartIndex]?.title, Le = N(() => {
1239
+ let e = i(G)?.pdfUndrawable(Ie());
1240
+ return e ? Ve(i(O).chartExportPdfCannotDraw, { text: e }) : "";
1241
+ });
1242
+ o(() => {
1243
+ i(W) && !i(G) && import("./chart-export-pdf-Ne0ET-JM.js").then((e) => n(G, e, !0));
1244
+ });
1245
+ async function ze() {
1246
+ let e = je(), t = n(G, i(G) ?? await import("./chart-export-pdf-Ne0ET-JM.js"), !0);
1247
+ i(Le) || !e || (n(W, !1), await t.downloadChartPdf(e, "chart.pdf", { title: Ie() }));
1248
+ }
1249
+ async function mt() {
1250
+ let e = je();
1251
+ n(W, !1), e && n(G, i(G) ?? await import("./chart-export-pdf-Ne0ET-JM.js"), !0).printChart(e, { title: Ie() });
1252
+ }
1253
+ async function ht() {
1254
+ let e = je();
1255
+ if (n(W, !1), !(!e || typeof ClipboardItem > "u" || !navigator.clipboard?.write)) try {
1256
+ let t = await de(e);
1257
+ await navigator.clipboard.write([new ClipboardItem({ "image/png": t })]), n(Ae, !0), setTimeout(() => n(Ae, !1), 1400);
1258
+ } catch {}
1259
+ }
1260
+ let gt = E(null), q = E(null);
1261
+ function _t(e, t, n) {
1262
+ let r = (n) => {
1263
+ n.target?.closest(e) || t();
1264
+ }, i = (e) => {
1265
+ e.key === "Escape" && (e.stopPropagation(), t(), n()?.focus());
1266
+ };
1267
+ return window.addEventListener("pointerdown", r), window.addEventListener("keydown", i, !0), () => {
1268
+ window.removeEventListener("pointerdown", r), window.removeEventListener("keydown", i, !0);
1269
+ };
1270
+ }
1271
+ o(() => {
1272
+ if (i(W)) return _t(".sv-grid-chart-export", () => n(W, !1), () => i(gt));
1273
+ });
1274
+ let J = E(!1), vt = E("");
1275
+ function yt() {
1276
+ let e = i(vt).trim();
1277
+ e && (x().saveChart(e), n(vt, ""));
1278
+ }
1279
+ o(() => {
1280
+ if (i(J)) return _t(".sv-grid-chart-saved", () => n(J, !1), () => i(q));
1281
+ });
1282
+ async function bt() {
1283
+ if (n(W, !1), !i(R)) return;
1284
+ let { chartSummary: e } = await import("./chart-summary-B52586F9.js"), t = e(i(R));
1285
+ try {
1286
+ await navigator.clipboard?.writeText(t);
1287
+ } catch {}
1288
+ n(Z, t, !0);
1289
+ }
1290
+ let xt = N(() => !!x().chartAiHandler), St = N(() => !!x().chartExplainHandler);
1291
+ async function Ct() {
1292
+ let e = x().chartExplainHandler;
1293
+ if (!(!e || i(Y))) {
1294
+ n(Y, !0), n(X, ""), n(Z, "");
1295
+ try {
1296
+ let t = await e();
1297
+ n(Z, t ? [t.summary, ...t.insights].filter(Boolean).join(" ") : "", !0), t || n(X, i(O).chartAiNoExplanation, !0);
1298
+ } catch (e) {
1299
+ n(X, e instanceof Error ? e.message : i(O).chartAiFailed, !0);
1300
+ } finally {
1301
+ n(Y, !1);
1302
+ }
1303
+ }
1304
+ }
1305
+ let wt = E(!1), Tt = E(""), Y = E(!1), X = E(""), Z = E("");
1306
+ async function Et() {
1307
+ let e = x().chartAiHandler, t = i(Tt).trim();
1308
+ if (!(!e || !t || i(Y))) {
1309
+ n(Y, !0), n(X, ""), n(Z, "");
1310
+ try {
1311
+ let r = await e(t);
1312
+ r ? (x().applyChartConfig(r), n(Z, typeof r.rationale == "string" ? r.rationale : "", !0)) : n(X, i(O).chartAiNoChart, !0);
1313
+ } catch (e) {
1314
+ n(X, e instanceof Error ? e.message : i(O).chartAiFailed, !0);
1315
+ } finally {
1316
+ n(Y, !1);
1317
+ }
1318
+ }
1319
+ }
1320
+ let Dt = E(!1);
1321
+ function Ot(e) {
1322
+ e.preventDefault(), n(Dt, !0);
1323
+ let t = i(L) === "right" ? e.clientX : e.clientY, r = i(z);
1324
+ e.target.setPointerCapture?.(e.pointerId);
1325
+ let a = (e) => {
1326
+ let n = i(L) === "right" ? t - e.clientX : t - e.clientY;
1327
+ x().chartSize = Math.max(160, Math.min(720, r + n));
1328
+ }, o = () => {
1329
+ n(Dt, !1), window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
1330
+ };
1331
+ window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
1332
+ }
1333
+ var Q = pt();
1334
+ let kt;
1335
+ var At = c(Q), jt = (e) => {
1336
+ var t = He();
1337
+ let n;
1338
+ _(() => {
1339
+ n = C(t, 1, "sv-grid-chart-resizer", null, n, { "is-dragging": i(Dt) }), P(t, "aria-orientation", i(L) === "right" ? "vertical" : "horizontal"), P(t, "aria-label", i(O).chartResize);
1340
+ }), m("pointerdown", t, Ot), A(e, t);
1341
+ };
1342
+ f(At, (e) => {
1343
+ i(B) || e(jt);
1344
+ });
1345
+ var Mt = b(At, 2), Nt = c(Mt);
1346
+ let Pt;
1347
+ var Ft = b(c(Nt), 2), It = v(Ft, !0), Lt = b(Ft, 2), Rt = c(Lt), zt = (e) => {
1348
+ var t = Ue(), n = v(t, !0);
1349
+ _(() => r(n, i(O).chartClearFilter)), m("click", t, () => x().clearChartCrossFilter()), A(e, t);
1350
+ };
1351
+ f(Rt, (e) => {
1352
+ i(me) && !i(I) && e(zt);
1353
+ });
1354
+ var Bt = b(Rt, 2), $ = c(Bt), Vt = c($), Ht = (e) => {
1355
+ var t = We();
1356
+ A(e, t);
1357
+ }, Ut = (e) => {
1358
+ var t = Ge();
1359
+ A(e, t);
1360
+ };
1361
+ f(Vt, (e) => {
1362
+ i(Ae) ? e(Ht) : e(Ut, -1);
1363
+ }), T($), ee($, (e) => n(gt, e), () => i(gt));
1364
+ var Wt = b($, 2), Gt = (e) => {
1365
+ var t = Ke(), a = c(t), o = v(a, !0), s = b(a, 2), l = v(s, !0), u = b(s, 2);
1366
+ let d;
1367
+ var f = v(u, !0), p = b(u, 2);
1368
+ let g;
1369
+ var y = v(p, !0), x = b(p, 2), S = v(x, !0), w = b(x, 2), E = v(w, !0), D = b(w, 2), k = v(D, !0);
1370
+ T(t), h(t, (e, t) => se?.(e, t), () => ({
1371
+ close: () => n(W, !1),
1372
+ returnTo: () => i(gt)
1373
+ })), _(() => {
1374
+ P(t, "aria-label", i(O).chartExportLabel), r(o, i(O).chartExportPng), r(l, i(O).chartExportSvg), P(u, "aria-disabled", i(Le) ? "true" : void 0), d = C(u, 1, "", null, d, { "is-off": !!i(Le) }), r(f, i(Le) || i(O).chartExportPdf), P(p, "aria-disabled", i(Me) ? void 0 : "true"), P(p, "title", i(Me) ? void 0 : i(O).chartExportCsvNone), g = C(p, 1, "", null, g, { "is-off": !i(Me) }), r(y, i(O).chartExportCsv), r(S, i(O).chartExportCopy), r(E, i(O).chartExportPrint), r(k, i(O).chartExportDescribe);
1375
+ }), m("click", a, Ne), m("click", s, Pe), m("click", u, ze), m("click", p, () => i(Me) && Fe()), m("click", x, ht), m("click", w, mt), m("click", D, bt), A(e, t);
1376
+ };
1377
+ f(Wt, (e) => {
1378
+ i(W) && e(Gt);
1379
+ }), T(Bt);
1380
+ var Kt = b(Bt, 2), qt = (e) => {
1381
+ var t = qe();
1382
+ let a;
1383
+ var o = b(c(t));
1384
+ T(t), _(() => {
1385
+ a = C(t, 1, "sv-grid-chart-btn sv-grid-chart-ai-btn", null, a, { "is-active": i(wt) }), P(t, "aria-label", i(O).chartAiLabel), P(t, "title", i(O).chartAiLabel), P(t, "aria-expanded", i(wt)), r(o, ` ${i(O).chartAi ?? ""}`);
1386
+ }), m("click", t, () => n(wt, !i(wt))), A(e, t);
1387
+ };
1388
+ f(Kt, (e) => {
1389
+ i(xt) && !i(I) && e(qt);
1390
+ });
1391
+ var Jt = b(Kt, 2), Yt = (e) => {
1392
+ var t = et(), a = y(t), o = b(c(a));
1393
+ T(a);
1394
+ var s = b(a, 2), l = c(s);
1395
+ ee(l, (e) => n(q, e), () => i(q));
1396
+ var u = b(l, 2), d = (e) => {
1397
+ var t = Ze(), a = c(t), o = c(a);
1398
+ D(o);
1399
+ var s = b(o, 2), l = v(s, !0);
1400
+ T(a);
1401
+ var u = b(a, 2), d = (e) => {
1402
+ var t = Ye();
1403
+ g(t, 21, () => x().savedCharts, (e) => e.name, (e, t) => {
1404
+ var a = Je(), o = c(a), s = v(o, !0), l = b(o, 2);
1405
+ T(a), _(() => {
1406
+ P(o, "title", i(O).chartSaveApply), r(s, i(t).name), P(l, "aria-label", `${i(O).chartSaveRemove}: ${i(t).name}`), P(l, "title", i(O).chartSaveRemove);
1407
+ }), m("click", o, () => {
1408
+ x().applySavedChart(i(t).name), n(J, !1);
1409
+ }), m("click", l, () => x().removeSavedChart(i(t).name)), A(e, a);
1410
+ }), T(t), A(e, t);
1411
+ }, p = (e) => {
1412
+ var t = Xe(), n = v(t, !0);
1413
+ _(() => r(n, i(O).chartSavedEmpty)), A(e, t);
1414
+ };
1415
+ f(u, (e) => {
1416
+ x().savedCharts.length ? e(d) : e(p, -1);
1417
+ }), T(t), _((e) => {
1418
+ P(t, "aria-label", i(O).chartSavedTitle), P(o, "aria-label", i(O).chartSaveName), P(o, "placeholder", i(O).chartSaveNamePlaceholder), s.disabled = e, r(l, i(O).chartSave);
1419
+ }, [() => !i(vt).trim()]), oe("submit", a, (e) => {
1420
+ e.preventDefault(), yt();
1421
+ }), w(o, () => i(vt), (e) => n(vt, e)), A(e, t);
1422
+ };
1423
+ f(u, (e) => {
1424
+ i(J) && e(d);
1425
+ }), T(s);
1426
+ var h = b(s, 2);
1427
+ let S;
1428
+ var E = c(h), k = (e) => {
1429
+ var t = Qe();
1430
+ A(e, t);
1431
+ }, j = (e) => {
1432
+ var t = $e();
1433
+ A(e, t);
1434
+ };
1435
+ f(E, (e) => {
1436
+ x().chartFrozen ? e(k) : e(j, -1);
1437
+ }), T(h);
1438
+ var M = b(h, 2);
1439
+ _(() => {
1440
+ P(a, "aria-label", i(O).chartBuildLabel), P(a, "title", i(O).chartBuildTitle), r(o, ` ${i(O).chartBuild ?? ""}`), P(l, "aria-label", i(O).chartSaveLabel), P(l, "title", i(O).chartSavedTitle), P(l, "aria-expanded", i(J)), S = C(h, 1, "sv-grid-chart-icon-btn sv-grid-chart-link-btn", null, S, { "is-unlinked": !!x().chartFrozen }), P(h, "aria-label", x().chartFrozen ? i(O).chartLinkBack : i(O).chartUnlink), P(h, "aria-pressed", !!x().chartFrozen), P(h, "title", x().chartFrozen ? i(O).chartUnlinkedTitle : i(O).chartLinkedTitle), P(M, "aria-label", i(O).chartAdd), P(M, "title", i(O).chartAdd);
1441
+ }), m("click", a, p), m("click", l, () => n(J, !i(J))), m("click", h, () => x().chartFrozen ? x().unfreezeChart() : x().freezeChart()), m("click", M, () => x().addChart()), A(e, t);
1442
+ };
1443
+ f(Jt, (e) => {
1444
+ i(I) || e(Yt);
1445
+ });
1446
+ var Xt = b(Jt, 2), Zt = (e) => {
1447
+ var t = nt(), n = y(t), r = c(n), a = (e) => {
1448
+ var t = K();
1449
+ A(e, t);
1450
+ }, o = (e) => {
1451
+ var t = tt();
1452
+ A(e, t);
1453
+ };
1454
+ f(r, (e) => {
1455
+ i(V) ? e(a) : e(o, -1);
1456
+ }), T(n);
1457
+ var s = b(n, 2);
1458
+ _(() => {
1459
+ P(n, "aria-label", i(V) ? i(O).chartRestore : i(O).chartMaximize), P(n, "title", i(V) ? i(O).chartRestore : i(O).chartMaximize), P(s, "aria-label", i(O).chartDockLabel), P(s, "title", i(O).chartDock);
1460
+ }), m("click", n, we), m("click", s, Ce), A(e, t);
1461
+ }, Qt = (e) => {
1462
+ var t = rt();
1463
+ _(() => {
1464
+ P(t, "aria-label", i(O).chartPopOutLabel), P(t, "title", i(O).chartPopOut);
1465
+ }), m("click", t, Se), A(e, t);
1466
+ };
1467
+ f(Xt, (e) => {
1468
+ i(B) ? e(Zt) : e(Qt, -1);
1469
+ });
1470
+ var $t = b(Xt, 2);
1471
+ T(Lt), T(Nt);
1472
+ var en = b(Nt, 2), tn = (e) => {
1473
+ var t = at();
1474
+ g(t, 23, () => x().charts, (e) => e.id, (e, t, n) => {
1475
+ var a = it();
1476
+ let o;
1477
+ var s = c(a), l = v(s, !0), u = b(s, 2);
1478
+ T(a), _((e) => {
1479
+ o = C(a, 1, "sv-grid-chart-tab", null, o, { "is-active": i(n) === x().activeChartIndex }), P(s, "aria-selected", i(n) === x().activeChartIndex), r(l, i(t).title), P(u, "aria-label", e), P(u, "title", i(O).chartRemove);
1480
+ }, [() => Ve(i(O).chartRemoveTab, { title: i(t).title })]), m("click", s, () => x().activeChartIndex = i(n)), m("click", u, () => x().removeChart(i(n))), A(e, a);
1481
+ }), T(t), _(() => P(t, "aria-label", i(O).chartTabs)), A(e, t);
1482
+ };
1483
+ f(en, (e) => {
1484
+ !i(I) && x().charts.length > 1 && e(tn);
1485
+ });
1486
+ var nn = b(en, 2), rn = (e) => {
1487
+ var t = lt(), a = c(t), o = c(a);
1488
+ D(o);
1489
+ var s = b(o, 2), l = v(s, !0), u = b(s, 2), d = (e) => {
1490
+ var t = ot(), n = v(t, !0);
1491
+ _(() => {
1492
+ t.disabled = i(Y) || !i(R), P(t, "title", i(O).chartAiExplainTitle), r(n, i(O).chartAiExplain);
1493
+ }), m("click", t, Ct), A(e, t);
1494
+ };
1495
+ f(u, (e) => {
1496
+ i(St) && e(d);
1497
+ }), T(a);
1498
+ var p = b(a, 2), h = (e) => {
1499
+ var t = st(), n = v(t, !0);
1500
+ _(() => r(n, i(X))), A(e, t);
1501
+ }, g = (e) => {
1502
+ var t = ct(), n = v(t, !0);
1503
+ _(() => r(n, i(Z))), A(e, t);
1504
+ };
1505
+ f(p, (e) => {
1506
+ i(X) ? e(h) : i(Z) && e(g, 1);
1507
+ }), T(t), _((e) => {
1508
+ P(o, "placeholder", i(O).chartAiPlaceholder), o.disabled = i(Y), s.disabled = e, r(l, i(Y) ? i(O).chartAiThinking : i(O).chartAiRun);
1509
+ }, [() => i(Y) || !i(Tt).trim()]), oe("submit", a, (e) => {
1510
+ e.preventDefault(), Et();
1511
+ }), w(o, () => i(Tt), (e) => n(Tt, e)), A(e, t);
1512
+ };
1513
+ f(nn, (e) => {
1514
+ i(xt) && i(wt) && !i(I) && e(rn);
1515
+ });
1516
+ var an = b(nn, 2), on = (e) => {
1517
+ Re(e, {
1518
+ get ctrl() {
1519
+ return x();
1520
+ },
1521
+ get messages() {
1522
+ return i(O);
1523
+ }
1524
+ });
1525
+ };
1526
+ f(an, (e) => {
1527
+ i(I) || e(on);
1528
+ }), T(Mt);
1529
+ var sn = b(Mt, 2), cn = c(sn), ln = (e) => {
1530
+ var t = ut(), n = c(t);
1531
+ {
1532
+ let e = N(() => i(j)?.zoom ?? !1), t = N(() => i(j)?.rangePresets), r = N(() => i(j)?.syncGroup), a = N(() => i(j)?.contextMenu), o = N(() => i(j)?.animate), s = N(() => i(j)?.localeText), c = N(() => i(j)?.export === !0 || void 0);
1533
+ ve(n, {
1534
+ get spec() {
1535
+ return i(R);
1536
+ },
1537
+ get indicators() {
1538
+ return x().chartIndicatorPanes;
1539
+ },
1540
+ onSelect: Oe,
1541
+ interactive: !0,
1542
+ legend: !1,
1543
+ get zoomable() {
1544
+ return i(e);
1545
+ },
1546
+ get rangePresets() {
1547
+ return i(t);
1548
+ },
1549
+ get syncGroup() {
1550
+ return i(r);
1551
+ },
1552
+ get contextMenu() {
1553
+ return i(a);
1554
+ },
1555
+ get animate() {
1556
+ return i(o);
1557
+ },
1558
+ get localeText() {
1559
+ return i(s);
1560
+ },
1561
+ get crosshairLabels() {
1562
+ return i(F);
1563
+ },
1564
+ get toolbar() {
1565
+ return i(c);
1566
+ },
1567
+ get zoom() {
1568
+ return x().chartZoom;
1569
+ },
1570
+ set zoom(e) {
1571
+ x().chartZoom = e;
1572
+ }
1573
+ });
1574
+ }
1575
+ T(t), A(e, t);
1576
+ }, un = (e) => {
1577
+ {
1578
+ let t = N(() => i(j)?.zoom ?? !1), n = N(() => i(j)?.brush === !0), r = N(() => i(j)?.rangePresets), a = N(() => i(j)?.syncGroup), o = N(() => i(j)?.contextMenu), s = N(() => i(j)?.animate), c = N(() => i(j)?.localeText), l = N(() => i(j)?.export === !0 || void 0);
1579
+ pe(e, {
1580
+ get spec() {
1581
+ return i(R);
1582
+ },
1583
+ autosize: !0,
1584
+ onSelect: Oe,
1585
+ interactive: !0,
1586
+ get legend() {
1587
+ return i(ne);
1588
+ },
1589
+ get dataLabels() {
1590
+ return i(re);
1591
+ },
1592
+ get zoomable() {
1593
+ return i(t);
1594
+ },
1595
+ get brush() {
1596
+ return i(n);
1597
+ },
1598
+ get rangePresets() {
1599
+ return i(r);
1600
+ },
1601
+ get syncGroup() {
1602
+ return i(a);
1603
+ },
1604
+ get contextMenu() {
1605
+ return i(o);
1606
+ },
1607
+ get animate() {
1608
+ return i(s);
1609
+ },
1610
+ get localeText() {
1611
+ return i(c);
1612
+ },
1613
+ get crosshairLabels() {
1614
+ return i(F);
1615
+ },
1616
+ get toolbar() {
1617
+ return i(l);
1618
+ },
1619
+ get zoom() {
1620
+ return x().chartZoom;
1621
+ },
1622
+ set zoom(e) {
1623
+ x().chartZoom = e;
1624
+ }
1625
+ });
1626
+ }
1627
+ }, dn = (e) => {
1628
+ var t = dt(), n = c(t), a = (e) => {
1629
+ var t = s();
1630
+ _(() => r(t, i(O).chartEmptyColumns)), A(e, t);
1631
+ }, o = (e) => {
1632
+ var t = s();
1633
+ _(() => r(t, i(O).chartEmptyData)), A(e, t);
1634
+ };
1635
+ f(n, (e) => {
1636
+ !i(_e).dims.length || !i(_e).measures.length ? e(a) : e(o, -1);
1637
+ }), T(t), A(e, t);
1638
+ };
1639
+ f(cn, (e) => {
1640
+ i(R) && x().chartIndicatorPanes.length && i(R).series[0]?.ohlc ? e(ln) : i(R) && (i(R).series.length || i(R).gaugeValue != null || i(I)) ? e(un, 1) : e(dn, -1);
1641
+ }), T(sn), ee(sn, (e) => n(ke, e), () => i(ke));
1642
+ var fn = b(sn, 2), pn = (e) => {
1643
+ var t = u(), r = y(t);
1644
+ ie(r, () => i(l), (e, t) => {
1645
+ t(e, {
1646
+ get ctrl() {
1647
+ return x();
1648
+ },
1649
+ get types() {
1650
+ return i(De);
1651
+ },
1652
+ get messages() {
1653
+ return i(O);
1654
+ },
1655
+ get open() {
1656
+ return i(d);
1657
+ },
1658
+ set open(e) {
1659
+ n(d, e, !0);
1660
+ }
1661
+ });
1662
+ }), A(e, t);
1663
+ };
1664
+ f(fn, (e) => {
1665
+ i(l) && e(pn);
1666
+ });
1667
+ var mn = b(fn, 2), hn = (e) => {
1668
+ var t = ft();
1669
+ _(() => P(t, "aria-label", i(O).chartResizeWindow)), m("pointerdown", t, U), A(e, t);
1670
+ };
1671
+ f(mn, (e) => {
1672
+ i(B) && !i(V) && e(hn);
1673
+ }), T(Q), ee(Q, (e) => n(be, e), () => i(be)), _(() => {
1674
+ kt = C(Q, 1, "sv-grid-chart-panel", null, kt, {
1675
+ "is-right": i(L) === "right" && !i(B),
1676
+ "is-bottom": i(L) === "bottom" && !i(B),
1677
+ "is-floating": i(B),
1678
+ "is-maximized": i(B) && i(V)
1679
+ }), ae(Q, i(Ee)), P(Q, "aria-label", i(O).chartPanelTitle), Pt = C(Nt, 1, "sv-grid-chart-drawer-title", null, Pt, { "is-drag-handle": i(B) && !i(V) }), r(It, i(O).chartPanelTitle), P($, "aria-label", i(O).chartExportLabel), P($, "title", i(O).chartExport), P($, "aria-expanded", i(W)), P($t, "aria-label", i(O).chartClose);
1680
+ }), m("pointerdown", Nt, Te), m("click", $, () => n(W, !i(W))), m("click", $t, () => x().chartPanelOpen = !1), a(3, Q, () => he, () => ({
1681
+ x: !i(B) && i(L) === "right" ? i(z) : 0,
1682
+ y: !i(B) && i(L) === "bottom" ? i(z) : 0,
1683
+ duration: 180,
1684
+ easing: ge
1685
+ })), A(e, Q), S();
1686
+ }
1687
+ l(["pointerdown", "click"]);
1688
+ //#endregion
1689
+ export { mt as default, Re as n, Ve as t };