@cfasim-ui/charts 0.6.1 → 0.6.3

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.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, toHandlers as ee, toRaw as S, unref as C, useSlots as w, useTemplateRef as T, watch as E, withCtx as D } from "vue";
2
- import { formatNumber as te } from "@cfasim-ui/shared";
3
- import { DropdownMenuContent as O, DropdownMenuItem as k, DropdownMenuPortal as ne, DropdownMenuRoot as A, DropdownMenuTrigger as j, PopoverAnchor as M, PopoverContent as re, PopoverPortal as ie, PopoverRoot as N } from "reka-ui";
4
- import { geoAlbersUsa as ae, geoPath as P } from "d3-geo";
5
- import { zoom as oe, zoomIdentity as se } from "d3-zoom";
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, toHandlers as ee, toRaw as S, unref as C, useSlots as te, useTemplateRef as w, watch as T, withCtx as E } from "vue";
2
+ import { formatNumber as ne } from "@cfasim-ui/shared";
3
+ import { DropdownMenuContent as D, DropdownMenuItem as O, DropdownMenuPortal as k, DropdownMenuRoot as A, DropdownMenuTrigger as re, PopoverAnchor as j, PopoverContent as M, PopoverPortal as N, PopoverRoot as ie } from "reka-ui";
4
+ import { geoAlbersUsa as ae, geoMercator as P, geoPath as oe } from "d3-geo";
5
+ import { zoom as F, zoomIdentity as se } from "d3-zoom";
6
6
  import { select as ce } from "d3-selection";
7
7
  import "d3-transition";
8
- import { feature as F, merge as le, mesh as ue } from "topojson-client";
8
+ import { feature as le, merge as I, mesh as ue } from "topojson-client";
9
9
  //#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
10
- var de = ["aria-label"], I = /* @__PURE__ */ l({
10
+ var de = ["aria-label"], fe = /* @__PURE__ */ l({
11
11
  __name: "ChartMenu",
12
12
  props: {
13
13
  items: {},
@@ -41,11 +41,11 @@ var de = ["aria-label"], I = /* @__PURE__ */ l({
41
41
  key: 2,
42
42
  modal: !1
43
43
  }, {
44
- default: D(() => [c(C(j), {
44
+ default: E(() => [c(C(re), {
45
45
  class: "chart-menu-button",
46
46
  "aria-label": "Chart options"
47
47
  }, {
48
- default: D(() => [...i[4] ||= [o("svg", {
48
+ default: E(() => [...i[4] ||= [o("svg", {
49
49
  width: "16",
50
50
  height: "16",
51
51
  viewBox: "0 0 16 16",
@@ -69,19 +69,19 @@ var de = ["aria-label"], I = /* @__PURE__ */ l({
69
69
  })
70
70
  ], -1)]]),
71
71
  _: 1
72
- }), c(C(ne), null, {
73
- default: D(() => [c(C(O), {
72
+ }), c(C(k), null, {
73
+ default: E(() => [c(C(D), {
74
74
  class: "chart-menu-content",
75
75
  "side-offset": 4,
76
76
  align: "end"
77
77
  }, {
78
- default: D(() => [(_(!0), a(e, null, y(t.items, (e) => (_(), r(C(k), {
78
+ default: E(() => [(_(!0), a(e, null, y(t.items, (e) => (_(), r(C(O), {
79
79
  key: e.label,
80
80
  class: "chart-menu-item",
81
81
  "aria-pressed": e.ariaPressed,
82
82
  onSelect: e.action
83
83
  }, {
84
- default: D(() => [s(x(e.label), 1)]),
84
+ default: E(() => [s(x(e.label), 1)]),
85
85
  _: 2
86
86
  }, 1032, ["aria-pressed", "onSelect"]))), 128))]),
87
87
  _: 1
@@ -110,38 +110,38 @@ var de = ["aria-label"], I = /* @__PURE__ */ l({
110
110
  let n = e.__vccOpts || e;
111
111
  for (let [e, r] of t) n[e] = r;
112
112
  return n;
113
- }, fe = /* @__PURE__ */ L(I, [["__scopeId", "data-v-f5743494"]]);
113
+ }, pe = /* @__PURE__ */ L(fe, [["__scopeId", "data-v-f5743494"]]);
114
114
  //#endregion
115
115
  //#region src/_shared/axes.ts
116
116
  function R(e) {
117
117
  return Math.round(e) + .5;
118
118
  }
119
- function z(e, t) {
119
+ function me(e, t) {
120
120
  let n = e / t, r = 10 ** Math.floor(Math.log10(n)), i = n / r, a;
121
121
  return a = i <= 1.5 ? 1 : i <= 3 ? 2 : i <= 7 ? 5 : 10, a * r;
122
122
  }
123
- function B(e, t, n) {
123
+ function he(e, t, n) {
124
124
  if (!(n > 0) || !isFinite(n)) return [];
125
125
  let r = [], i = Math.ceil(e / n) * n;
126
126
  for (let e = 0, a = i; a <= t + 1e-9 && e < 1e3; e++, a = i + e * n) r.push(a);
127
127
  return r;
128
128
  }
129
- var pe = new Intl.NumberFormat();
130
- function me(e) {
131
- return Math.abs(e) >= 1e3 ? pe.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
129
+ var z = new Intl.NumberFormat();
130
+ function B(e) {
131
+ return Math.abs(e) >= 1e3 ? z.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
132
132
  }
133
133
  //#endregion
134
134
  //#region src/_shared/computeTicks.ts
135
- function he(e) {
135
+ function ge(e) {
136
136
  let { min: t, max: n, ticks: r } = e;
137
137
  if (t === n) return [];
138
138
  let i = e.displayOffset ?? 0;
139
139
  if (Array.isArray(r)) return r.map((e) => e - i).filter((e) => e >= t && e <= n);
140
- if (typeof r == "number") return B(t + i, n + i, r).map((e) => e - i);
141
- let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = z(n - t, a);
142
- return B(t + i, n + i, o).map((e) => e - i);
140
+ if (typeof r == "number") return he(t + i, n + i, r).map((e) => e - i);
141
+ let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = me(n - t, a);
142
+ return he(t + i, n + i, o).map((e) => e - i);
143
143
  }
144
- function ge(e, t, n, r) {
144
+ function _e(e, t, n, r) {
145
145
  if (r === "log") {
146
146
  let r = Math.log10(t), i = Math.log10(n) - r || 1;
147
147
  return (Math.log10(e > 0 ? e : t) - r) / i;
@@ -149,7 +149,7 @@ function ge(e, t, n, r) {
149
149
  let i = n - t || 1;
150
150
  return (e - t) / i;
151
151
  }
152
- function _e(e, t, n, r) {
152
+ function ve(e, t, n, r) {
153
153
  if (n !== "log") return {
154
154
  min: e,
155
155
  max: t
@@ -160,7 +160,7 @@ function _e(e, t, n, r) {
160
160
  max: t > 0 ? Math.max(t, i) : i
161
161
  };
162
162
  }
163
- function ve(e) {
163
+ function ye(e) {
164
164
  let { min: t, max: n, ticks: r } = e;
165
165
  if (!(t > 0) || !(n > 0) || t === n) return [];
166
166
  if (Array.isArray(r)) return r.filter((e) => e > 0 && e >= t && e <= n);
@@ -173,7 +173,7 @@ function ve(e) {
173
173
  }
174
174
  //#endregion
175
175
  //#region src/_shared/useChartSize.ts
176
- function ye(e = {}) {
176
+ function be(e = {}) {
177
177
  let t = v(null), n = v(0), r = v(0), i = null, a = null;
178
178
  return h(() => {
179
179
  t.value && (n.value = t.value.clientWidth, r.value = t.value.clientHeight, i = new ResizeObserver((t) => {
@@ -192,8 +192,8 @@ function ye(e = {}) {
192
192
  measuredHeight: r
193
193
  };
194
194
  }
195
- var V = .6, be = 8;
196
- function xe(e, t) {
195
+ var xe = .6, Se = 8;
196
+ function V(e, t) {
197
197
  return {
198
198
  fontSize: e?.fontSize ?? t.fontSize,
199
199
  fill: e?.color ?? "currentColor",
@@ -201,8 +201,8 @@ function xe(e, t) {
201
201
  fillOpacity: e?.color == null ? t.fillOpacity : void 0
202
202
  };
203
203
  }
204
- var Se = 7, Ce = 18, we = 16;
205
- function Te(e) {
204
+ var Ce = 7, we = 18, Te = 16;
205
+ function Ee(e) {
206
206
  return e == null ? {
207
207
  top: 0,
208
208
  right: 0,
@@ -220,12 +220,12 @@ function Te(e) {
220
220
  left: e.left ?? 0
221
221
  };
222
222
  }
223
- function Ee(e) {
224
- return Ce + e.length * Se;
225
- }
226
223
  function De(e) {
224
+ return we + e.length * Ce;
225
+ }
226
+ function Oe(e) {
227
227
  let t = n(() => {
228
- let t = Te(e.extraPadding?.());
228
+ let t = Ee(e.extraPadding?.());
229
229
  return {
230
230
  left: (e.yLabel() ? 56 : 50) + t.left,
231
231
  right: 10 + t.right
@@ -238,11 +238,11 @@ function De(e) {
238
238
  };
239
239
  let n = Math.max(0, r.value), i = [], a = 0, o = 0;
240
240
  for (let e of t) {
241
- let t = Ee(e);
241
+ let t = De(e);
242
242
  o > 0 && o + t > n && (a++, o = 0), i.push({
243
243
  x: o,
244
244
  row: a
245
- }), o += t + we;
245
+ }), o += t + Te;
246
246
  }
247
247
  return {
248
248
  positions: i,
@@ -252,9 +252,9 @@ function De(e) {
252
252
  let t = e.title();
253
253
  if (!t) return 10;
254
254
  let n = e.titleStyle?.()?.lineHeight ?? 18;
255
- return t.split("\n").length * n + be;
255
+ return t.split("\n").length * n + Se;
256
256
  }), o = n(() => {
257
- let n = Te(e.extraPadding?.()), r = i.value.rowCount;
257
+ let n = Ee(e.extraPadding?.()), r = i.value.rowCount;
258
258
  return {
259
259
  top: a.value + r * 20 + n.top,
260
260
  bottom: (e.xLabel() ? 38 : 30) + n.bottom,
@@ -283,10 +283,10 @@ function De(e) {
283
283
  }
284
284
  //#endregion
285
285
  //#region src/tooltip-position.ts
286
- var Oe = 16, ke = 8;
287
- function Ae(e, t, n, r, i, a) {
286
+ var ke = 16, Ae = 8;
287
+ function je(e, t, n, r, i, a) {
288
288
  if (i === "none") return {
289
- left: e + Oe,
289
+ left: e + ke,
290
290
  top: t
291
291
  };
292
292
  let o = i === "chart" && a ? {
@@ -299,15 +299,15 @@ function Ae(e, t, n, r, i, a) {
299
299
  right: window.innerWidth,
300
300
  top: 0,
301
301
  bottom: window.innerHeight
302
- }, s = e + Oe + n > o.right - ke ? e - Oe - n : e + Oe, c = r / 2;
302
+ }, s = e + ke + n > o.right - Ae ? e - ke - n : e + ke, c = r / 2;
303
303
  return {
304
304
  left: s,
305
- top: Math.min(Math.max(t, o.top + ke + c), o.bottom - ke - c)
305
+ top: Math.min(Math.max(t, o.top + Ae + c), o.bottom - Ae - c)
306
306
  };
307
307
  }
308
308
  //#endregion
309
309
  //#region src/_shared/useChartTooltip.ts
310
- function H(e) {
310
+ function Me(e) {
311
311
  let t = e.touchYOffset ?? 50, n = v(null), r = v(!1), i = v(null), a = v(null), o = v(null), s = null, c = "pending";
312
312
  function l(e) {
313
313
  return "touches" in e ? e.touches[0] ?? null : e;
@@ -321,14 +321,14 @@ function H(e) {
321
321
  clientY: r.clientY
322
322
  }, e.onHover?.({ index: i }));
323
323
  }
324
- E([a, n], () => {
324
+ T([a, n], () => {
325
325
  if (n.value === null || !a.value) {
326
326
  o.value = null;
327
327
  return;
328
328
  }
329
329
  let s = i.value, c = e.containerRef.value;
330
330
  if (!s || !c) return;
331
- let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = Ae(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
331
+ let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = je(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
332
332
  o.value = {
333
333
  left: f - l.left,
334
334
  top: p - l.top
@@ -395,69 +395,69 @@ function H(e) {
395
395
  }
396
396
  //#endregion
397
397
  //#region src/ChartMenu/download.ts
398
- function je(e, t) {
398
+ function H(e, t) {
399
399
  let n = URL.createObjectURL(e), r = document.createElement("a");
400
400
  r.href = n, r.download = t, r.click(), URL.revokeObjectURL(n);
401
401
  }
402
- var Me = [
402
+ var Ne = [
403
403
  "color",
404
404
  "font-family",
405
405
  "font-size",
406
406
  "font-weight"
407
- ], U = ["fill", "stroke"];
408
- function W(e) {
407
+ ], Pe = ["fill", "stroke"];
408
+ function U(e) {
409
409
  let t = e.match(/^\s*var\(\s*(--[\w-]+)\s*(?:,\s*([^)]*?)\s*)?\)\s*$/);
410
410
  if (!t) return e;
411
411
  let [, n, r] = t;
412
412
  return window.getComputedStyle(document.documentElement).getPropertyValue(n).trim() || (r ? r.trim() : e);
413
413
  }
414
- function Ne(e) {
414
+ function W(e) {
415
415
  let t = e.cloneNode(!0);
416
416
  t.setAttribute("xmlns", "http://www.w3.org/2000/svg");
417
417
  let n = window.getComputedStyle(e), r = [];
418
- for (let e of Me) {
418
+ for (let e of Ne) {
419
419
  let t = n.getPropertyValue(e);
420
420
  t && r.push(`${e}: ${t}`);
421
421
  }
422
422
  let i = t.getAttribute("style") ?? "";
423
423
  t.setAttribute("style", [i, ...r].filter(Boolean).join("; "));
424
- for (let e of t.querySelectorAll("*")) for (let t of U) {
424
+ for (let e of t.querySelectorAll("*")) for (let t of Pe) {
425
425
  let n = e.getAttribute(t);
426
- !n || !n.includes("var(") || e.setAttribute(t, W(n));
426
+ !n || !n.includes("var(") || e.setAttribute(t, U(n));
427
427
  }
428
428
  return t;
429
429
  }
430
- function G(e, t) {
431
- let n = Ne(e), r = new XMLSerializer().serializeToString(n);
432
- je(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
430
+ function Fe(e, t) {
431
+ let n = W(e), r = new XMLSerializer().serializeToString(n);
432
+ H(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
433
433
  }
434
- function K(e, t) {
435
- let n = Ne(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
434
+ function G(e, t) {
435
+ let n = W(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
436
436
  o.onload = () => {
437
437
  let e = document.createElement("canvas");
438
438
  e.width = s * 2, e.height = c * 2;
439
439
  let n = e.getContext("2d");
440
440
  n.scale(2, 2), n.drawImage(o, 0, 0, s, c), e.toBlob((e) => {
441
- e && je(e, `${t}.png`);
441
+ e && H(e, `${t}.png`);
442
442
  }), URL.revokeObjectURL(a);
443
443
  }, o.src = a;
444
444
  }
445
- function Pe(e, t) {
446
- je(new Blob([e], { type: "text/csv" }), `${t}.csv`);
445
+ function K(e, t) {
446
+ H(new Blob([e], { type: "text/csv" }), `${t}.csv`);
447
447
  }
448
448
  //#endregion
449
449
  //#region src/_shared/useChartFullscreen.ts
450
- var q = 0, Fe = "";
451
- function Ie() {
452
- typeof document > "u" || (q === 0 && (Fe = document.body.style.overflow, document.body.style.overflow = "hidden"), q++);
450
+ var Ie = 0, Le = "";
451
+ function Re() {
452
+ typeof document > "u" || (Ie === 0 && (Le = document.body.style.overflow, document.body.style.overflow = "hidden"), Ie++);
453
453
  }
454
- function Le() {
455
- typeof document > "u" || q !== 0 && (q--, q === 0 && (document.body.style.overflow = Fe));
454
+ function ze() {
455
+ typeof document > "u" || Ie !== 0 && (Ie--, Ie === 0 && (document.body.style.overflow = Le));
456
456
  }
457
- function Re(e = {}) {
457
+ function Be(e = {}) {
458
458
  let t = v(!1), r = !1;
459
459
  function i(e) {
460
- e !== t.value && (t.value = e, e && !r ? (Ie(), r = !0) : !e && r && (Le(), r = !1));
460
+ e !== t.value && (t.value = e, e && !r ? (Re(), r = !0) : !e && r && (ze(), r = !1));
461
461
  }
462
462
  function a(e) {
463
463
  if (e.key !== "Escape" || !t.value) return;
@@ -476,7 +476,7 @@ function Re(e = {}) {
476
476
  return h(() => {
477
477
  typeof document > "u" || document.addEventListener("keydown", a);
478
478
  }), g(() => {
479
- typeof document > "u" || (document.removeEventListener("keydown", a), r &&= (Le(), !1));
479
+ typeof document > "u" || (document.removeEventListener("keydown", a), r &&= (ze(), !1));
480
480
  }), {
481
481
  isFullscreen: t,
482
482
  toggle: c,
@@ -504,7 +504,7 @@ function Re(e = {}) {
504
504
  }
505
505
  //#endregion
506
506
  //#region src/_shared/useChartMenu.ts
507
- function ze(e) {
507
+ function Ve(e) {
508
508
  let t = v(null);
509
509
  function r() {
510
510
  let t = e.filename();
@@ -512,23 +512,23 @@ function ze(e) {
512
512
  let n = e.legacyMenuLabel();
513
513
  return typeof n == "string" ? n : "chart";
514
514
  }
515
- let i = e.fullscreen ? Re({ target: e.fullscreenTarget }) : null, a = n(() => {
515
+ let i = e.fullscreen ? Be({ target: e.fullscreenTarget }) : null, a = n(() => {
516
516
  let n = r(), a = [];
517
517
  i && a.push(i.menuItem.value), a.push({
518
518
  label: "Save as SVG",
519
519
  action: () => {
520
- t.value && G(t.value, n);
520
+ t.value && Fe(t.value, n);
521
521
  }
522
522
  }, {
523
523
  label: "Save as PNG",
524
524
  action: () => {
525
- t.value && K(t.value, n);
525
+ t.value && G(t.value, n);
526
526
  }
527
527
  });
528
528
  let o = e.downloadButton?.();
529
529
  return !e.downloadLink() && !o && a.push({
530
530
  label: "Download CSV",
531
- action: () => Pe(e.getCsv(), n)
531
+ action: () => K(e.getCsv(), n)
532
532
  }), a;
533
533
  }), o = n(() => {
534
534
  if (e.downloadButton?.()) return null;
@@ -539,7 +539,7 @@ function ze(e) {
539
539
  return t ? typeof t == "string" ? t : "Download data (CSV)" : null;
540
540
  });
541
541
  function l() {
542
- Pe(e.getCsv(), r());
542
+ K(e.getCsv(), r());
543
543
  }
544
544
  return {
545
545
  svgRef: t,
@@ -557,7 +557,7 @@ function ze(e) {
557
557
  }
558
558
  //#endregion
559
559
  //#region src/_shared/seriesCsv.ts
560
- function Be(e) {
560
+ function He(e) {
561
561
  if (e.length === 0) return "";
562
562
  let t = 0;
563
563
  for (let n of e) n.data.length > t && (t = n.data.length);
@@ -569,43 +569,43 @@ function Be(e) {
569
569
  }
570
570
  return i.join("\n");
571
571
  }
572
- function Ve(e, t, n = "category") {
572
+ function Ue(e, t, n = "category") {
573
573
  if (t.length === 0 || e.length === 0) return "";
574
574
  let r = [(t.length === 1 ? [n, t[0].label || "value"] : [n, ...t.map((e, t) => e.label || `series_${t}`)]).join(",")];
575
575
  for (let n = 0; n < e.length; n++) {
576
- let i = [He(e[n])];
576
+ let i = [We(e[n])];
577
577
  for (let e of t) i.push(n < e.data.length ? String(e.data[n]) : "");
578
578
  r.push(i.join(","));
579
579
  }
580
580
  return r.join("\n");
581
581
  }
582
- function He(e) {
582
+ function We(e) {
583
583
  return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
584
584
  }
585
585
  //#endregion
586
586
  //#region src/_shared/ChartAnnotations.vue?vue&type=script&setup=true&lang.ts
587
- var Ue = {
587
+ var Ge = {
588
588
  class: "chart-annotations",
589
589
  "pointer-events": "none"
590
- }, We = ["stroke", "stroke-width"], Ge = [
590
+ }, Ke = ["stroke", "stroke-width"], qe = [
591
591
  "d",
592
592
  "stroke",
593
593
  "stroke-width"
594
- ], Ke = [
594
+ ], Je = [
595
595
  "fill",
596
596
  "stroke",
597
597
  "stroke-width",
598
598
  "transform"
599
- ], J = [
599
+ ], Ye = [
600
600
  "stroke",
601
601
  "stroke-width",
602
602
  "stroke-dasharray"
603
- ], qe = [
603
+ ], q = [
604
604
  "d",
605
605
  "stroke",
606
606
  "stroke-width",
607
607
  "stroke-dasharray"
608
- ], Y = ["fill", "transform"], X = [
608
+ ], Xe = ["fill", "transform"], J = [
609
609
  "x",
610
610
  "y",
611
611
  "text-anchor",
@@ -614,7 +614,7 @@ var Ue = {
614
614
  "fill",
615
615
  "stroke",
616
616
  "stroke-width"
617
- ], Je = ["x", "dy"], Z = ["font-weight", "font-style"], Q = 13, Ye = "normal", Xe = 700, Ze = "var(--color-bg-0, #fff)", Qe = 3, $e = 1, et = 4, tt = 6, nt = 1.2, rt = .35, it = /* @__PURE__ */ l({
617
+ ], Y = ["x", "dy"], Ze = ["font-weight", "font-style"], X = 13, Z = "normal", Qe = 700, $e = "var(--color-bg-0, #fff)", et = 3, tt = 1, nt = 4, rt = 6, it = 1.2, at = .35, ot = /* @__PURE__ */ l({
618
618
  __name: "ChartAnnotations",
619
619
  props: {
620
620
  annotations: { default: () => [] },
@@ -651,35 +651,35 @@ var Ue = {
651
651
  if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
652
652
  let i = t.pointer ?? "curved", a = i.startsWith("rule");
653
653
  if (a && !r.bounds) continue;
654
- let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? Q, g = t.fontWeight ?? Ye, _ = t.outlineColor ?? Ze, v = t.outlineWidth ?? Qe, y = t.lineColor ?? m, b = t.lineWidth ?? $e, x = s(t.lineDash), ee = {
654
+ let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? X, g = t.fontWeight ?? Z, _ = t.outlineColor ?? $e, v = t.outlineWidth ?? et, y = t.lineColor ?? m, b = t.lineWidth ?? tt, x = s(t.lineDash), ee = {
655
655
  left: "start",
656
656
  center: "middle",
657
657
  right: "end"
658
- }[t.align ?? (o > 0 ? "left" : o < 0 ? "right" : "center")], S, C = "", w, T = !a && (t.arrow ?? !0);
659
- if (a && r.bounds) S = u(i, n.x, n.y, r.bounds);
658
+ }[t.align ?? (o > 0 ? "left" : o < 0 ? "right" : "center")], S = t.text.split("\n").map(c), C, te = "", w, T = !a && (t.arrow ?? !0);
659
+ if (a && r.bounds) C = u(i, n.x, n.y, r.bounds);
660
660
  else {
661
- let e = f(n.x, n.y, d, p, h, i);
662
- C = e.path, T && e.arrow && (w = e.arrow);
661
+ let e = f(n.x, n.y, d, p, h, S.length, i);
662
+ te = e.path, T && e.arrow && (w = e.arrow);
663
663
  }
664
664
  e.push({
665
- lines: t.text.split("\n").map(c),
665
+ lines: S,
666
666
  textX: d,
667
667
  textY: p,
668
668
  textAnchor: ee,
669
- dy: h * nt,
669
+ dy: h * it,
670
670
  fontSize: h,
671
671
  fontWeight: g,
672
672
  color: m,
673
673
  outlineColor: _,
674
674
  outlineWidth: v,
675
- pointerPath: C,
675
+ pointerPath: te,
676
676
  lineColor: y,
677
677
  lineWidth: b,
678
678
  lineDash: x,
679
679
  arrow: T,
680
680
  arrowTip: w,
681
681
  arrowTransform: w ? `translate(${w.x} ${w.y}) rotate(${w.angle})` : "",
682
- rule: S
682
+ rule: C
683
683
  });
684
684
  }
685
685
  return e;
@@ -730,13 +730,13 @@ var Ue = {
730
730
  };
731
731
  }
732
732
  }
733
- function f(e, t, n, r, i, a) {
734
- if (a === "none") return { path: "" };
735
- let o = n - e, s = r - t, c = r - i * rt;
736
- if (o === 0 || s === 0 || a === "straight") {
737
- let i = s === 0 ? r : c, a = n - e, o = i - t, l = Math.hypot(a, o);
738
- if (l <= 10) return { path: "" };
739
- let u = a / l, d = o / l, f = e + u * et, p = t + d * et, m = n - u * tt, h = i - d * tt, g = Math.atan2(-d, -u) * 180 / Math.PI;
733
+ function f(e, t, n, r, i, a, o) {
734
+ if (o === "none") return { path: "" };
735
+ let s = n - e, c = r - t, l = i * it, u = (c < 0 ? r + (a - 1) * l : r) - i * at;
736
+ if (s === 0 || c === 0 || o === "straight") {
737
+ let i = c === 0 ? r : u, a = n - e, o = i - t, s = Math.hypot(a, o);
738
+ if (s <= 10) return { path: "" };
739
+ let l = a / s, d = o / s, f = e + l * nt, p = t + d * nt, m = n - l * rt, h = i - d * rt, g = Math.atan2(-d, -l) * 180 / Math.PI;
740
740
  return {
741
741
  path: `M${f},${p} L${m},${h}`,
742
742
  arrow: {
@@ -746,19 +746,19 @@ var Ue = {
746
746
  }
747
747
  };
748
748
  }
749
- let l = c - t;
750
- if (Math.abs(l) <= et || Math.abs(o) <= tt) return { path: "" };
751
- let u = Math.sign(o), d = Math.sign(l), f = e, p = t + d * et, m = n - u * tt, h = c, g = d > 0 ? -90 : 90;
749
+ let d = u - t;
750
+ if (Math.abs(d) <= nt || Math.abs(s) <= rt) return { path: "" };
751
+ let f = Math.sign(s), p = Math.sign(d), m = e, h = t + p * nt, g = n - f * rt, _ = u, v = p > 0 ? -90 : 90;
752
752
  return {
753
- path: `M${f},${p} Q${f},${c} ${m},${h}`,
753
+ path: `M${m},${h} Q${m},${u} ${g},${_}`,
754
754
  arrow: {
755
- x: f,
756
- y: p,
757
- angle: g
755
+ x: m,
756
+ y: h,
757
+ angle: v
758
758
  }
759
759
  };
760
760
  }
761
- return (t, n) => (_(), a("g", Ue, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
761
+ return (t, n) => (_(), a("g", Ge, [(_(!0), a(e, null, y(l.value, (t, n) => (_(), a(e, { key: n }, [
762
762
  t.rule && t.outlineWidth > 0 ? (_(), a("line", d({
763
763
  key: 0,
764
764
  ref_for: !0
@@ -767,7 +767,7 @@ var Ue = {
767
767
  stroke: t.outlineColor,
768
768
  "stroke-width": t.lineWidth + t.outlineWidth,
769
769
  "stroke-linecap": "round"
770
- }), null, 16, We)) : i("", !0),
770
+ }), null, 16, Ke)) : i("", !0),
771
771
  t.pointerPath && t.outlineWidth > 0 ? (_(), a("path", {
772
772
  key: 1,
773
773
  d: t.pointerPath,
@@ -776,7 +776,7 @@ var Ue = {
776
776
  stroke: t.outlineColor,
777
777
  "stroke-width": t.lineWidth + t.outlineWidth,
778
778
  "stroke-linecap": "round"
779
- }, null, 8, Ge)) : i("", !0),
779
+ }, null, 8, qe)) : i("", !0),
780
780
  t.arrowTip && t.outlineWidth > 0 ? (_(), a("polygon", {
781
781
  key: 2,
782
782
  points: "0,0 -6,-3 -6,3",
@@ -786,7 +786,7 @@ var Ue = {
786
786
  "stroke-width": t.outlineWidth,
787
787
  "stroke-linejoin": "round",
788
788
  transform: t.arrowTransform
789
- }, null, 8, Ke)) : i("", !0),
789
+ }, null, 8, Je)) : i("", !0),
790
790
  t.rule ? (_(), a("line", d({
791
791
  key: 3,
792
792
  ref_for: !0
@@ -795,7 +795,7 @@ var Ue = {
795
795
  "stroke-width": t.lineWidth,
796
796
  "stroke-dasharray": t.lineDash,
797
797
  "stroke-linecap": "round"
798
- }), null, 16, J)) : i("", !0),
798
+ }), null, 16, Ye)) : i("", !0),
799
799
  t.pointerPath ? (_(), a("path", {
800
800
  key: 4,
801
801
  d: t.pointerPath,
@@ -804,13 +804,13 @@ var Ue = {
804
804
  "stroke-width": t.lineWidth,
805
805
  "stroke-dasharray": t.lineDash,
806
806
  "stroke-linecap": "round"
807
- }, null, 8, qe)) : i("", !0),
807
+ }, null, 8, q)) : i("", !0),
808
808
  t.arrowTip ? (_(), a("polygon", {
809
809
  key: 5,
810
810
  points: "0,0 -6,-3 -6,3",
811
811
  fill: t.lineColor,
812
812
  transform: t.arrowTransform
813
- }, null, 8, Y)) : i("", !0),
813
+ }, null, 8, Xe)) : i("", !0),
814
814
  o("text", {
815
815
  x: t.textX,
816
816
  y: t.textY,
@@ -828,14 +828,14 @@ var Ue = {
828
828
  dy: r === 0 ? 0 : t.dy
829
829
  }, [(_(!0), a(e, null, y(n, (e, t) => (_(), a("tspan", {
830
830
  key: t,
831
- "font-weight": e.bold ? Xe : void 0,
831
+ "font-weight": e.bold ? Qe : void 0,
832
832
  "font-style": e.italic ? "italic" : void 0
833
- }, x(e.text), 9, Z))), 128))], 8, Je))), 128))], 8, X)
833
+ }, x(e.text), 9, Ze))), 128))], 8, Y))), 128))], 8, J)
834
834
  ], 64))), 128))]));
835
835
  }
836
- }), at = 400, ot = 200;
837
- function st(e) {
838
- let { containerRef: t, measuredWidth: r, measuredHeight: i } = ye({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, downloadButtonText: l, triggerCsvDownload: u, resolvedFilename: d, isFullscreen: f, fullscreenStyle: p, teleportTarget: m, exitFullscreen: h } = ze({
836
+ }), st = 400, ct = 200;
837
+ function lt(e) {
838
+ let { containerRef: t, measuredWidth: r, measuredHeight: i } = be({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, downloadButtonText: l, triggerCsvDownload: u, resolvedFilename: d, isFullscreen: f, fullscreenStyle: p, teleportTarget: m, exitFullscreen: h } = Ve({
839
839
  filename: e.filename,
840
840
  legacyMenuLabel: e.menu,
841
841
  getCsv: e.getCsv,
@@ -843,13 +843,13 @@ function st(e) {
843
843
  downloadButton: e.downloadButton,
844
844
  fullscreen: !0,
845
845
  fullscreenTarget: e.fullscreenTarget
846
- }), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || at)), _ = n(() => {
846
+ }), g = n(() => f.value && r.value > 0 ? r.value : e.width() ?? (r.value || st)), _ = n(() => {
847
847
  if (f.value && i.value > 0) {
848
848
  let t = e.extraBelowHeight?.() ?? 0;
849
849
  return i.value - t;
850
850
  }
851
- return e.height() ?? ot;
852
- }), { padding: v, legendY: y, inlineLegendLayout: b, innerW: x, innerH: ee, bounds: S } = De({
851
+ return e.height() ?? ct;
852
+ }), { padding: v, legendY: y, inlineLegendLayout: b, innerW: x, innerH: ee, bounds: S } = Oe({
853
853
  title: e.title,
854
854
  titleStyle: e.titleStyle,
855
855
  xLabel: e.xLabel,
@@ -858,7 +858,7 @@ function st(e) {
858
858
  width: () => g.value,
859
859
  height: () => _.value,
860
860
  extraPadding: e.chartPadding
861
- }), { hoverIndex: C, tooltipRef: w, tooltipPos: T, handlers: E } = H({
861
+ }), { hoverIndex: C, tooltipRef: te, tooltipPos: w, handlers: T } = Me({
862
862
  enabled: e.hasTooltipSlot,
863
863
  trigger: e.tooltipTrigger,
864
864
  clamp: () => e.tooltipClamp() ?? "chart",
@@ -879,9 +879,9 @@ function st(e) {
879
879
  innerH: ee,
880
880
  bounds: S,
881
881
  hoverIndex: C,
882
- tooltipRef: w,
883
- tooltipPos: T,
884
- tooltipHandlers: E,
882
+ tooltipRef: te,
883
+ tooltipPos: w,
884
+ tooltipHandlers: T,
885
885
  menuItems: o,
886
886
  downloadLinkText: s,
887
887
  csvHref: c,
@@ -895,17 +895,17 @@ function st(e) {
895
895
  measuredHeight: i
896
896
  };
897
897
  }
898
- function ct(e, t) {
898
+ function ut(e, t) {
899
899
  return (n) => {
900
900
  let r = e();
901
- if (r !== void 0) return te(n, r);
901
+ if (r !== void 0) return ne(n, r);
902
902
  let i = t();
903
- return i === void 0 ? me(n) : te(n, i);
903
+ return i === void 0 ? B(n) : ne(n, i);
904
904
  };
905
905
  }
906
906
  //#endregion
907
907
  //#region src/_shared/contrast.ts
908
- function lt(e) {
908
+ function dt(e) {
909
909
  let t = e.trim();
910
910
  if (t.startsWith("#")) {
911
911
  let e = t.slice(1);
@@ -932,201 +932,201 @@ function lt(e) {
932
932
  }
933
933
  return null;
934
934
  }
935
- function ut([e, t, n]) {
935
+ function ft([e, t, n]) {
936
936
  let r = (e) => {
937
937
  let t = e / 255;
938
938
  return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
939
939
  };
940
940
  return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
941
941
  }
942
- var dt = null, ft = /* @__PURE__ */ new Map();
943
- function pt(e) {
944
- let t = lt(e);
942
+ var pt = null, mt = /* @__PURE__ */ new Map();
943
+ function ht(e) {
944
+ let t = dt(e);
945
945
  if (t) return t;
946
- if (ft.has(e)) return ft.get(e) ?? null;
946
+ if (mt.has(e)) return mt.get(e) ?? null;
947
947
  if (typeof document > "u") return null;
948
- dt || (dt = document.createElement("span"), dt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(dt)), dt.style.color = "", dt.style.color = e;
949
- let n = getComputedStyle(dt).color, r = lt(n);
950
- return ft.set(e, r), r;
948
+ pt || (pt = document.createElement("span"), pt.style.cssText = "position:absolute;width:0;height:0;visibility:hidden;pointer-events:none", document.body.appendChild(pt)), pt.style.color = "", pt.style.color = e;
949
+ let n = getComputedStyle(pt).color, r = dt(n);
950
+ return mt.set(e, r), r;
951
951
  }
952
- function mt(e, t = "#ffffff", n = "#1a1a1a") {
953
- let r = pt(e);
954
- return r && ut(r) > .179 ? n : t;
952
+ function gt(e, t = "#ffffff", n = "#1a1a1a") {
953
+ let r = ht(e);
954
+ return r && ft(r) > .179 ? n : t;
955
955
  }
956
956
  //#endregion
957
957
  //#region src/_shared/dateAxis.ts
958
- var ht = /^(\d{4})-(\d{2})-(\d{2})$/, gt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, _t = 1e3, vt = 60 * _t, yt = 60 * vt, bt = 24 * yt, xt = 7 * bt, St = 30 * bt, Ct = 365 * bt, wt = [
958
+ var _t = /^(\d{4})-(\d{2})-(\d{2})$/, vt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, yt = 1e3, Q = 60 * yt, bt = 60 * Q, xt = 24 * bt, St = 7 * xt, Ct = 30 * xt, wt = 365 * xt, Tt = [
959
959
  {
960
960
  unit: "second",
961
961
  step: 1,
962
- ms: 1 * _t
962
+ ms: 1 * yt
963
963
  },
964
964
  {
965
965
  unit: "second",
966
966
  step: 5,
967
- ms: 5 * _t
967
+ ms: 5 * yt
968
968
  },
969
969
  {
970
970
  unit: "second",
971
971
  step: 15,
972
- ms: 15 * _t
972
+ ms: 15 * yt
973
973
  },
974
974
  {
975
975
  unit: "second",
976
976
  step: 30,
977
- ms: 30 * _t
977
+ ms: 30 * yt
978
978
  },
979
979
  {
980
980
  unit: "minute",
981
981
  step: 1,
982
- ms: 1 * vt
982
+ ms: 1 * Q
983
983
  },
984
984
  {
985
985
  unit: "minute",
986
986
  step: 5,
987
- ms: 5 * vt
987
+ ms: 5 * Q
988
988
  },
989
989
  {
990
990
  unit: "minute",
991
991
  step: 15,
992
- ms: 15 * vt
992
+ ms: 15 * Q
993
993
  },
994
994
  {
995
995
  unit: "minute",
996
996
  step: 30,
997
- ms: 30 * vt
997
+ ms: 30 * Q
998
998
  },
999
999
  {
1000
1000
  unit: "hour",
1001
1001
  step: 1,
1002
- ms: 1 * yt
1002
+ ms: 1 * bt
1003
1003
  },
1004
1004
  {
1005
1005
  unit: "hour",
1006
1006
  step: 3,
1007
- ms: 3 * yt
1007
+ ms: 3 * bt
1008
1008
  },
1009
1009
  {
1010
1010
  unit: "hour",
1011
1011
  step: 6,
1012
- ms: 6 * yt
1012
+ ms: 6 * bt
1013
1013
  },
1014
1014
  {
1015
1015
  unit: "hour",
1016
1016
  step: 12,
1017
- ms: 12 * yt
1017
+ ms: 12 * bt
1018
1018
  },
1019
1019
  {
1020
1020
  unit: "day",
1021
1021
  step: 1,
1022
- ms: 1 * bt
1022
+ ms: 1 * xt
1023
1023
  },
1024
1024
  {
1025
1025
  unit: "day",
1026
1026
  step: 2,
1027
- ms: 2 * bt
1027
+ ms: 2 * xt
1028
1028
  },
1029
1029
  {
1030
1030
  unit: "week",
1031
1031
  step: 1,
1032
- ms: 1 * xt
1032
+ ms: 1 * St
1033
1033
  },
1034
1034
  {
1035
1035
  unit: "month",
1036
1036
  step: 1,
1037
- ms: 1 * St
1037
+ ms: 1 * Ct
1038
1038
  },
1039
1039
  {
1040
1040
  unit: "month",
1041
1041
  step: 3,
1042
- ms: 3 * St
1042
+ ms: 3 * Ct
1043
1043
  },
1044
1044
  {
1045
1045
  unit: "month",
1046
1046
  step: 6,
1047
- ms: 6 * St
1047
+ ms: 6 * Ct
1048
1048
  },
1049
1049
  {
1050
1050
  unit: "year",
1051
1051
  step: 1,
1052
- ms: 1 * Ct
1052
+ ms: 1 * wt
1053
1053
  },
1054
1054
  {
1055
1055
  unit: "year",
1056
1056
  step: 2,
1057
- ms: 2 * Ct
1057
+ ms: 2 * wt
1058
1058
  },
1059
1059
  {
1060
1060
  unit: "year",
1061
1061
  step: 5,
1062
- ms: 5 * Ct
1062
+ ms: 5 * wt
1063
1063
  },
1064
1064
  {
1065
1065
  unit: "year",
1066
1066
  step: 10,
1067
- ms: 10 * Ct
1067
+ ms: 10 * wt
1068
1068
  },
1069
1069
  {
1070
1070
  unit: "year",
1071
1071
  step: 25,
1072
- ms: 25 * Ct
1072
+ ms: 25 * wt
1073
1073
  },
1074
1074
  {
1075
1075
  unit: "year",
1076
1076
  step: 50,
1077
- ms: 50 * Ct
1077
+ ms: 50 * wt
1078
1078
  },
1079
1079
  {
1080
1080
  unit: "year",
1081
1081
  step: 100,
1082
- ms: 100 * Ct
1082
+ ms: 100 * wt
1083
1083
  }
1084
- ], Tt = 1e3;
1085
- function Et(e, t) {
1084
+ ], Et = 1e3;
1085
+ function Dt(e, t) {
1086
1086
  if (e instanceof Date) {
1087
1087
  let t = e.getTime();
1088
1088
  return Number.isFinite(t) ? t : null;
1089
1089
  }
1090
1090
  if (typeof e != "string") return null;
1091
- let n = ht.exec(e);
1091
+ let n = _t.exec(e);
1092
1092
  if (n) {
1093
1093
  let e = +n[1], r = n[2] - 1, i = +n[3];
1094
1094
  return t === "utc" ? Date.UTC(e, r, i) : new Date(e, r, i).getTime();
1095
1095
  }
1096
- let r = gt.exec(e);
1096
+ let r = vt.exec(e);
1097
1097
  if (r) {
1098
1098
  let e = +r[1], n = r[2] - 1, i = +r[3], a = +r[4], o = +r[5], s = r[6] ? +r[6] : 0, c = r[7] ? Number("0." + r[7]) * 1e3 : 0, l = r[8];
1099
1099
  if (l) {
1100
1100
  if (l === "Z" || l === "z") return Date.UTC(e, n, i, a, o, s, c);
1101
- let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * vt;
1101
+ let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * Q;
1102
1102
  return Date.UTC(e, n, i, a, o, s, c) - d;
1103
1103
  }
1104
1104
  return t === "utc" ? Date.UTC(e, n, i, a, o, s, c) : new Date(e, n, i, a, o, s, c).getTime();
1105
1105
  }
1106
1106
  return null;
1107
1107
  }
1108
- function Dt(e) {
1109
- return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? ht.test(e) || gt.test(e) : !1;
1108
+ function Ot(e) {
1109
+ return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? _t.test(e) || vt.test(e) : !1;
1110
1110
  }
1111
- function Ot(e, t) {
1111
+ function kt(e, t) {
1112
1112
  if (e.length === 0) return !1;
1113
1113
  for (let n = 0; n < e.length; n++) {
1114
1114
  let r = e[n];
1115
- if (!Dt(r) || Et(r, t) === null) return !1;
1115
+ if (!Ot(r) || Dt(r, t) === null) return !1;
1116
1116
  }
1117
1117
  return !0;
1118
1118
  }
1119
- function kt(e, t) {
1119
+ function At(e, t) {
1120
1120
  let n = e / Math.max(1, t);
1121
- for (let e of wt) if (n <= e.ms) return e;
1122
- return wt[wt.length - 1];
1121
+ for (let e of Tt) if (n <= e.ms) return e;
1122
+ return Tt[Tt.length - 1];
1123
1123
  }
1124
- function At(e, t, n) {
1124
+ function jt(e, t, n) {
1125
1125
  let r = new Date(e);
1126
1126
  if (n === "utc") switch (t) {
1127
- case "second": return Math.floor(e / _t) * _t;
1128
- case "minute": return Math.floor(e / vt) * vt;
1129
- case "hour": return Math.floor(e / yt) * yt;
1127
+ case "second": return Math.floor(e / yt) * yt;
1128
+ case "minute": return Math.floor(e / Q) * Q;
1129
+ case "hour": return Math.floor(e / bt) * bt;
1130
1130
  case "day": return Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate());
1131
1131
  case "week": {
1132
1132
  let e = (r.getUTCDay() + 6) % 7;
@@ -1136,8 +1136,8 @@ function At(e, t, n) {
1136
1136
  case "year": return Date.UTC(r.getUTCFullYear(), 0, 1);
1137
1137
  }
1138
1138
  switch (t) {
1139
- case "second": return Math.floor(e / _t) * _t;
1140
- case "minute": return Math.floor(e / vt) * vt;
1139
+ case "second": return Math.floor(e / yt) * yt;
1140
+ case "minute": return Math.floor(e / Q) * Q;
1141
1141
  case "hour": return new Date(r.getFullYear(), r.getMonth(), r.getDate(), r.getHours()).getTime();
1142
1142
  case "day": return new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime();
1143
1143
  case "week": {
@@ -1148,11 +1148,11 @@ function At(e, t, n) {
1148
1148
  case "year": return new Date(r.getFullYear(), 0, 1).getTime();
1149
1149
  }
1150
1150
  }
1151
- function jt(e, t, n, r) {
1152
- if (t === "second") return e + n * _t;
1153
- if (t === "minute") return e + n * vt;
1154
- if (t === "hour" && r === "utc") return e + n * yt;
1155
- if (t === "week" && r === "utc") return e + n * xt;
1151
+ function Mt(e, t, n, r) {
1152
+ if (t === "second") return e + n * yt;
1153
+ if (t === "minute") return e + n * Q;
1154
+ if (t === "hour" && r === "utc") return e + n * bt;
1155
+ if (t === "week" && r === "utc") return e + n * St;
1156
1156
  let i = new Date(e);
1157
1157
  if (r === "utc") switch (t) {
1158
1158
  case "day": return Date.UTC(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate() + n, i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds());
@@ -1168,21 +1168,21 @@ function jt(e, t, n, r) {
1168
1168
  }
1169
1169
  return e;
1170
1170
  }
1171
- function Mt(e, t, n, r) {
1171
+ function Nt(e, t, n, r) {
1172
1172
  if (!Number.isFinite(e) || !Number.isFinite(t) || e >= t || n < 1) return {
1173
1173
  values: [],
1174
1174
  unit: "day"
1175
1175
  };
1176
- let { unit: i, step: a } = kt(t - e, n), o = At(e, i, r), s = 0;
1177
- for (; o < e && s < Tt;) o = jt(o, i, a, r), s++;
1176
+ let { unit: i, step: a } = At(t - e, n), o = jt(e, i, r), s = 0;
1177
+ for (; o < e && s < Et;) o = Mt(o, i, a, r), s++;
1178
1178
  let c = [];
1179
- for (let e = 0; e < Tt && o <= t; e++) c.push(o), o = jt(o, i, a, r);
1179
+ for (let e = 0; e < Et && o <= t; e++) c.push(o), o = Mt(o, i, a, r);
1180
1180
  return {
1181
1181
  values: c,
1182
1182
  unit: i
1183
1183
  };
1184
1184
  }
1185
- var Nt = {
1185
+ var Pt = {
1186
1186
  iso: {
1187
1187
  year: "numeric",
1188
1188
  month: "2-digit",
@@ -1220,7 +1220,7 @@ var Nt = {
1220
1220
  hourCycle: "h23"
1221
1221
  },
1222
1222
  medium: { dateStyle: "medium" }
1223
- }, Pt = {
1223
+ }, Ft = {
1224
1224
  year: "year",
1225
1225
  month: "month-year",
1226
1226
  week: "month-day",
@@ -1232,27 +1232,27 @@ var Nt = {
1232
1232
  function $(e) {
1233
1233
  return e < 10 ? "0" + e : String(e);
1234
1234
  }
1235
- function Ft(e, t) {
1235
+ function It(e, t) {
1236
1236
  let n = new Date(e);
1237
1237
  return t === "utc" ? `${n.getUTCFullYear()}-${$(n.getUTCMonth() + 1)}-${$(n.getUTCDate())}` : `${n.getFullYear()}-${$(n.getMonth() + 1)}-${$(n.getDate())}`;
1238
1238
  }
1239
- function It(e, t) {
1239
+ function Lt(e, t) {
1240
1240
  let n = new Date(e);
1241
1241
  return t === "utc" ? `${n.getUTCFullYear()}-${$(n.getUTCMonth() + 1)}-${$(n.getUTCDate())}T${$(n.getUTCHours())}:${$(n.getUTCMinutes())}:${$(n.getUTCSeconds())}Z` : `${n.getFullYear()}-${$(n.getMonth() + 1)}-${$(n.getDate())}T${$(n.getHours())}:${$(n.getMinutes())}:${$(n.getSeconds())}`;
1242
1242
  }
1243
- function Lt(e) {
1244
- return e in Nt;
1243
+ function Rt(e) {
1244
+ return e in Pt;
1245
1245
  }
1246
- function Rt(e, t, n, r) {
1246
+ function zt(e, t, n, r) {
1247
1247
  if (typeof t == "function") return t(e, r);
1248
1248
  let i = null, a;
1249
- if (t === void 0) i = r ? Pt[r] : "iso", a = Nt[i];
1249
+ if (t === void 0) i = r ? Ft[r] : "iso", a = Pt[i];
1250
1250
  else if (typeof t == "string") {
1251
- if (!Lt(t)) throw Error(`Unknown date format preset: "${t}"`);
1252
- i = t, a = Nt[i];
1251
+ if (!Rt(t)) throw Error(`Unknown date format preset: "${t}"`);
1252
+ i = t, a = Pt[i];
1253
1253
  } else a = t;
1254
- if (i === "iso") return Ft(e, n);
1255
- if (i === "iso-datetime") return It(e, n);
1254
+ if (i === "iso") return It(e, n);
1255
+ if (i === "iso-datetime") return Lt(e, n);
1256
1256
  let o = n === "utc" ? {
1257
1257
  ...a,
1258
1258
  timeZone: "UTC"
@@ -1261,68 +1261,68 @@ function Rt(e, t, n, r) {
1261
1261
  }
1262
1262
  //#endregion
1263
1263
  //#region src/LineChart/LineChart.vue?vue&type=script&setup=true&lang.ts
1264
- var zt = {
1264
+ var Bt = ["role", "aria-label"], Vt = {
1265
1265
  class: "chart-sr-only",
1266
1266
  "aria-live": "polite"
1267
- }, Bt = ["width", "height"], Vt = [
1267
+ }, Ht = ["width", "height"], Ut = [
1268
1268
  "x",
1269
1269
  "y",
1270
1270
  "text-anchor",
1271
1271
  "font-size",
1272
1272
  "font-weight",
1273
1273
  "fill"
1274
- ], Ht = ["x", "dy"], Ut = { key: 1 }, Wt = [
1274
+ ], Wt = ["x", "dy"], Gt = { key: 1 }, Kt = [
1275
1275
  "x1",
1276
1276
  "y1",
1277
1277
  "x2",
1278
1278
  "y2",
1279
1279
  "stroke",
1280
1280
  "stroke-dasharray"
1281
- ], Gt = [
1281
+ ], qt = [
1282
1282
  "cx",
1283
1283
  "cy",
1284
1284
  "fill",
1285
1285
  "fill-opacity",
1286
1286
  "stroke"
1287
- ], Kt = [
1287
+ ], Jt = [
1288
1288
  "x",
1289
1289
  "y",
1290
1290
  "font-size",
1291
1291
  "fill",
1292
1292
  "font-weight"
1293
- ], qt = [
1293
+ ], Yt = [
1294
1294
  "x1",
1295
1295
  "y1",
1296
1296
  "x2",
1297
1297
  "y2"
1298
- ], Jt = [
1298
+ ], Xt = [
1299
1299
  "x1",
1300
1300
  "y1",
1301
1301
  "x2",
1302
1302
  "y2"
1303
- ], Yt = [
1303
+ ], Zt = [
1304
1304
  "x1",
1305
1305
  "y1",
1306
1306
  "x2",
1307
1307
  "y2"
1308
- ], Xt = [
1308
+ ], Qt = [
1309
1309
  "x1",
1310
1310
  "y1",
1311
1311
  "x2",
1312
1312
  "y2"
1313
- ], Zt = [
1313
+ ], $t = [
1314
1314
  "x",
1315
1315
  "y",
1316
1316
  "font-size",
1317
1317
  "fill",
1318
1318
  "font-weight",
1319
1319
  "fill-opacity"
1320
- ], Qt = [
1320
+ ], en = [
1321
1321
  "transform",
1322
1322
  "font-size",
1323
1323
  "fill",
1324
1324
  "font-weight"
1325
- ], $t = [
1325
+ ], tn = [
1326
1326
  "x",
1327
1327
  "y",
1328
1328
  "text-anchor",
@@ -1330,43 +1330,43 @@ var zt = {
1330
1330
  "fill",
1331
1331
  "font-weight",
1332
1332
  "fill-opacity"
1333
- ], en = [
1333
+ ], nn = [
1334
1334
  "x",
1335
1335
  "y",
1336
1336
  "font-size",
1337
1337
  "fill",
1338
1338
  "font-weight"
1339
- ], tn = [
1339
+ ], rn = [
1340
1340
  "d",
1341
1341
  "fill",
1342
1342
  "fill-opacity"
1343
- ], nn = [
1343
+ ], an = [
1344
1344
  "d",
1345
1345
  "stroke",
1346
1346
  "stroke-width"
1347
- ], rn = [
1347
+ ], on = [
1348
1348
  "d",
1349
1349
  "stroke",
1350
1350
  "stroke-width",
1351
1351
  "stroke-opacity",
1352
1352
  "stroke-dasharray"
1353
- ], an = [
1353
+ ], sn = [
1354
1354
  "cx",
1355
1355
  "cy",
1356
1356
  "r",
1357
1357
  "fill",
1358
1358
  "fill-opacity",
1359
1359
  "stroke"
1360
- ], on = [
1360
+ ], cn = [
1361
1361
  "d",
1362
1362
  "fill",
1363
1363
  "fill-opacity"
1364
- ], sn = [
1364
+ ], ln = [
1365
1365
  "d",
1366
1366
  "stroke",
1367
1367
  "stroke-width",
1368
1368
  "stroke-dasharray"
1369
- ], cn = [
1369
+ ], un = [
1370
1370
  "x1",
1371
1371
  "y1",
1372
1372
  "x2",
@@ -1374,7 +1374,7 @@ var zt = {
1374
1374
  "stroke",
1375
1375
  "stroke-width",
1376
1376
  "stroke-dasharray"
1377
- ], ln = [
1377
+ ], dn = [
1378
1378
  "x1",
1379
1379
  "y1",
1380
1380
  "x2",
@@ -1382,53 +1382,53 @@ var zt = {
1382
1382
  "stroke",
1383
1383
  "stroke-width",
1384
1384
  "stroke-dasharray"
1385
- ], un = [
1385
+ ], fn = [
1386
1386
  "x1",
1387
1387
  "y1",
1388
1388
  "x2",
1389
1389
  "y2"
1390
- ], dn = [
1390
+ ], pn = [
1391
1391
  "x1",
1392
1392
  "y1",
1393
1393
  "x2",
1394
1394
  "y2"
1395
- ], fn = [
1395
+ ], mn = [
1396
1396
  "x1",
1397
1397
  "y1",
1398
1398
  "x2",
1399
1399
  "y2"
1400
- ], pn = [
1400
+ ], hn = [
1401
1401
  "cx",
1402
1402
  "cy",
1403
1403
  "fill"
1404
- ], mn = [
1404
+ ], gn = [
1405
1405
  "x",
1406
1406
  "y",
1407
1407
  "width",
1408
1408
  "height"
1409
- ], hn = [
1409
+ ], _n = [
1410
1410
  "cx",
1411
1411
  "cy",
1412
1412
  "fill",
1413
1413
  "fill-opacity",
1414
1414
  "stroke"
1415
- ], gn = [
1415
+ ], vn = [
1416
1416
  "x",
1417
1417
  "y",
1418
1418
  "font-size",
1419
1419
  "font-weight",
1420
1420
  "fill"
1421
- ], _n = [
1421
+ ], yn = [
1422
1422
  "x",
1423
1423
  "y",
1424
1424
  "font-size",
1425
1425
  "font-weight",
1426
1426
  "fill",
1427
1427
  "fill-opacity"
1428
- ], vn = { class: "line-chart-tooltip" }, yn = {
1428
+ ], bn = { class: "line-chart-tooltip" }, xn = {
1429
1429
  key: 0,
1430
1430
  class: "line-chart-tooltip-label"
1431
- }, bn = ["href", "download"], xn = 36, Sn = 12, Cn = 7, wn = 16, Tn = /* @__PURE__ */ L(/* @__PURE__ */ l({
1431
+ }, Sn = ["href", "download"], Cn = 36, wn = 12, Tn = 7, En = 16, Dn = /* @__PURE__ */ L(/* @__PURE__ */ l({
1432
1432
  inheritAttrs: !1,
1433
1433
  __name: "LineChart",
1434
1434
  props: {
@@ -1454,6 +1454,8 @@ var zt = {
1454
1454
  height: {},
1455
1455
  title: {},
1456
1456
  titleStyle: {},
1457
+ role: {},
1458
+ ariaLabel: {},
1457
1459
  axisLabelStyle: {},
1458
1460
  tickLabelStyle: {},
1459
1461
  legendStyle: {},
@@ -1478,22 +1480,22 @@ var zt = {
1478
1480
  },
1479
1481
  emits: ["hover"],
1480
1482
  setup(c, { emit: l }) {
1481
- let f = c, h = l, g = [];
1482
- function* v(e) {
1483
+ let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "figure" : void 0)), v = l, S = [];
1484
+ function* te(e) {
1483
1485
  if (e.x && e.x.length > 0 && (yield e.x), e.series) for (let t of e.series) t.x && t.x.length > 0 && (yield t.x);
1484
1486
  if (e.areas) for (let t of e.areas) t.x && t.x.length > 0 && (yield t.x);
1485
1487
  }
1486
- function S(e, t, n) {
1488
+ function w(e, t, n) {
1487
1489
  if (!e) return;
1488
1490
  if (!t) return e;
1489
1491
  let r = new Float64Array(e.length);
1490
- for (let t = 0; t < e.length; t++) r[t] = Et(e[t], n) ?? NaN;
1492
+ for (let t = 0; t < e.length; t++) r[t] = Dt(e[t], n) ?? NaN;
1491
1493
  return r;
1492
1494
  }
1493
- let w = ct(() => f.tooltipValueFormat, () => f.yTickFormat), T = n(() => f.timezone ?? "utc"), E = n(() => {
1494
- let e = T.value, t = !1, n = !1;
1495
- for (let r of v(f)) {
1496
- if (n = !0, !Ot(r, e)) {
1495
+ let T = ut(() => f.tooltipValueFormat, () => f.yTickFormat), E = n(() => f.timezone ?? "utc"), D = n(() => {
1496
+ let e = E.value, t = !1, n = !1;
1497
+ for (let r of te(f)) {
1498
+ if (n = !0, !kt(r, e)) {
1497
1499
  t = !1;
1498
1500
  break;
1499
1501
  }
@@ -1502,45 +1504,45 @@ var zt = {
1502
1504
  n || (t = !1);
1503
1505
  let r = f.series && f.series.length > 0 ? f.series.map((n) => ({
1504
1506
  ...n,
1505
- data: n.y ?? n.data ?? g,
1506
- x: S(n.x, t, e)
1507
+ data: n.y ?? n.data ?? S,
1508
+ x: w(n.x, t, e)
1507
1509
  })) : (() => {
1508
1510
  let n = f.y ?? f.data;
1509
1511
  return n ? [{
1510
1512
  data: n,
1511
- x: S(f.x, t, e)
1513
+ x: w(f.x, t, e)
1512
1514
  }] : [];
1513
1515
  })(), i = (f.areas ?? []).map((n) => ({
1514
1516
  ...n,
1515
- x: S(n.x, t, e)
1517
+ x: w(n.x, t, e)
1516
1518
  }));
1517
1519
  return {
1518
1520
  isDate: t,
1519
1521
  series: r,
1520
1522
  areas: i
1521
1523
  };
1522
- }), D = n(() => E.value.isDate), O = n(() => E.value.series), k = n(() => E.value.areas), ne = n(() => {
1524
+ }), O = n(() => D.value.isDate), k = n(() => D.value.series), A = n(() => D.value.areas), re = n(() => {
1523
1525
  let e = 0;
1524
- for (let t of O.value) t.data.length > e && (e = t.data.length);
1525
- for (let t of k.value) t.upper.length > e && (e = t.upper.length), t.lower.length > e && (e = t.lower.length);
1526
+ for (let t of k.value) t.data.length > e && (e = t.data.length);
1527
+ for (let t of A.value) t.upper.length > e && (e = t.upper.length), t.lower.length > e && (e = t.lower.length);
1526
1528
  return e;
1527
- }), A = n(() => O.value.some((e) => e.x != null) || k.value.some((e) => e.x != null));
1528
- function j(e, t) {
1529
+ }), j = n(() => k.value.some((e) => e.x != null) || A.value.some((e) => e.x != null));
1530
+ function M(e, t) {
1529
1531
  return e.x ? Number(e.x[t]) : t;
1530
1532
  }
1531
- function M(e, t) {
1533
+ function N(e, t) {
1532
1534
  return e.x ? Number(e.x[t]) : t;
1533
1535
  }
1534
- let re = n(() => A.value ? 0 : f.xMin ?? 0), ie = n(() => {
1536
+ let ie = n(() => j.value ? 0 : f.xMin ?? 0), ae = n(() => {
1535
1537
  let e = Infinity, t = -Infinity;
1536
- for (let n of O.value) for (let r = 0; r < n.data.length; r++) {
1537
- let i = j(n, r);
1538
+ for (let n of k.value) for (let r = 0; r < n.data.length; r++) {
1539
+ let i = M(n, r);
1538
1540
  isFinite(i) && (i < e && (e = i), i > t && (t = i));
1539
1541
  }
1540
- for (let n of k.value) {
1542
+ for (let n of A.value) {
1541
1543
  let r = Math.max(n.upper.length, n.lower.length);
1542
1544
  for (let i = 0; i < r; i++) {
1543
- let r = M(n, i);
1545
+ let r = N(n, i);
1544
1546
  isFinite(r) && (r < e && (e = r), r > t && (t = r));
1545
1547
  }
1546
1548
  }
@@ -1552,16 +1554,16 @@ var zt = {
1552
1554
  max: 0
1553
1555
  };
1554
1556
  });
1555
- function N(e) {
1556
- let { min: t, max: n } = ie.value, r = n - t || 1;
1557
+ function P(e) {
1558
+ let { min: t, max: n } = ae.value, r = n - t || 1;
1557
1559
  return U.value.left + (e - t) / r * G.value;
1558
1560
  }
1559
- let ae = n(() => {
1561
+ let oe = n(() => {
1560
1562
  let e = Infinity, t = -Infinity, n = Infinity, r = (r) => {
1561
1563
  isFinite(r) && (r < e && (e = r), r > t && (t = r), r > 0 && r < n && (n = r));
1562
1564
  };
1563
- for (let e of O.value) for (let t of e.data) r(t);
1564
- for (let e of k.value) {
1565
+ for (let e of k.value) for (let t of e.data) r(t);
1566
+ for (let e of A.value) {
1565
1567
  for (let t of e.upper) r(t);
1566
1568
  for (let t of e.lower) r(t);
1567
1569
  }
@@ -1571,77 +1573,77 @@ var zt = {
1571
1573
  range: 1
1572
1574
  };
1573
1575
  f.yMin != null && f.yMin < e && (e = f.yMin);
1574
- let i = _e(e, t, f.yScaleType, n);
1576
+ let i = ve(e, t, f.yScaleType, n);
1575
1577
  return {
1576
1578
  min: i.min,
1577
1579
  max: i.max,
1578
1580
  range: i.max - i.min || 1
1579
1581
  };
1580
1582
  });
1581
- function P(e) {
1582
- let { min: t, max: n } = ae.value;
1583
- return U.value.top + K.value - ge(e, t, n, f.yScaleType) * K.value;
1583
+ function F(e) {
1584
+ let { min: t, max: n } = oe.value;
1585
+ return U.value.top + K.value - _e(e, t, n, f.yScaleType) * K.value;
1584
1586
  }
1585
- function oe(e) {
1587
+ function se(e) {
1586
1588
  let t = e.data;
1587
1589
  if (t.length === 0) return "";
1588
1590
  let n = "", r = !1;
1589
1591
  for (let i = 0; i < t.length; i++) {
1590
- let a = j(e, i);
1592
+ let a = M(e, i);
1591
1593
  if (!isFinite(t[i]) || !isFinite(a)) {
1592
1594
  r = !1;
1593
1595
  continue;
1594
1596
  }
1595
- let o = N(a), s = P(t[i]);
1597
+ let o = P(a), s = F(t[i]);
1596
1598
  n += r ? `L${o},${s}` : `M${o},${s}`, r = !0;
1597
1599
  }
1598
1600
  return n;
1599
1601
  }
1600
- function se(e) {
1602
+ function ce(e) {
1601
1603
  let t = e.data, n = [];
1602
1604
  for (let r = 0; r < t.length; r++) {
1603
- let i = j(e, r);
1605
+ let i = M(e, r);
1604
1606
  !isFinite(t[r]) || !isFinite(i) || n.push({
1605
- x: N(i),
1606
- y: P(t[r])
1607
+ x: P(i),
1608
+ y: F(t[r])
1607
1609
  });
1608
1610
  }
1609
1611
  return n;
1610
1612
  }
1611
- function ce(e) {
1613
+ function le(e) {
1612
1614
  let t = Math.min(e.upper.length, e.lower.length);
1613
1615
  if (t === 0) return "";
1614
1616
  let n = [], r = [];
1615
- for (let i = 0; i < t; i++) isFinite(e.upper[i]) && isFinite(e.lower[i]) && isFinite(M(e, i)) ? r.push(i) : r.length && (n.push(r), r = []);
1617
+ for (let i = 0; i < t; i++) isFinite(e.upper[i]) && isFinite(e.lower[i]) && isFinite(N(e, i)) ? r.push(i) : r.length && (n.push(r), r = []);
1616
1618
  r.length && n.push(r);
1617
1619
  let i = "";
1618
1620
  for (let t of n) {
1619
- i += `M${N(M(e, t[0]))},${P(e.upper[t[0]])}`;
1620
- for (let n = 1; n < t.length; n++) i += `L${N(M(e, t[n]))},${P(e.upper[t[n]])}`;
1621
- for (let n = t.length - 1; n >= 0; n--) i += `L${N(M(e, t[n]))},${P(e.lower[t[n]])}`;
1621
+ i += `M${P(N(e, t[0]))},${F(e.upper[t[0]])}`;
1622
+ for (let n = 1; n < t.length; n++) i += `L${P(N(e, t[n]))},${F(e.upper[t[n]])}`;
1623
+ for (let n = t.length - 1; n >= 0; n--) i += `L${P(N(e, t[n]))},${F(e.lower[t[n]])}`;
1622
1624
  i += "Z";
1623
1625
  }
1624
1626
  return i;
1625
1627
  }
1626
- function F(e, t) {
1627
- let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && O.value[e.seriesIndex] || O.value[0];
1628
- return N(r ? j(r, n) : n);
1628
+ function I(e, t) {
1629
+ let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && k.value[e.seriesIndex] || k.value[0];
1630
+ return P(r ? M(r, n) : n);
1629
1631
  }
1630
- function le(e, t = !0) {
1632
+ function ue(e, t = !0) {
1631
1633
  let n = U.value.top + K.value;
1632
1634
  if (e.seriesIndex == null) {
1633
- let t = F(e, "start"), r = F(e, "end");
1635
+ let t = I(e, "start"), r = I(e, "end");
1634
1636
  return t > r ? "" : `M${t},${U.value.top}L${r},${U.value.top}L${r},${n}L${t},${n}Z`;
1635
1637
  }
1636
- let r = O.value[e.seriesIndex];
1638
+ let r = k.value[e.seriesIndex];
1637
1639
  if (!r) return "";
1638
1640
  let i = Math.max(0, e.startIndex), a = Math.min(r.data.length - 1, e.endIndex);
1639
1641
  if (i > a) return "";
1640
- let o = `M${N(j(r, i))},${P(r.data[i])}`;
1641
- for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${N(j(r, e))},${P(r.data[e])}`);
1642
- return t && (o += `L${N(j(r, a))},${n}`, o += `L${N(j(r, i))},${n}`, o += "Z"), o;
1642
+ let o = `M${P(M(r, i))},${F(r.data[i])}`;
1643
+ for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${P(M(r, e))},${F(r.data[e])}`);
1644
+ return t && (o += `L${P(M(r, a))},${n}`, o += `L${P(M(r, i))},${n}`, o += "Z"), o;
1643
1645
  }
1644
- let ue = n(() => {
1646
+ let de = n(() => {
1645
1647
  let e = f.areaSections;
1646
1648
  if (!e?.length) return {
1647
1649
  labels: [],
@@ -1650,11 +1652,11 @@ var zt = {
1650
1652
  let t = [], n = U.value.left + G.value;
1651
1653
  for (let r of e) {
1652
1654
  if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
1653
- let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Cn, o = F(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : O.value[r.seriesIndex]?.color ?? "currentColor"), u = xe({
1655
+ let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Tn, o = I(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : k.value[r.seriesIndex]?.color ?? "currentColor"), u = V({
1654
1656
  color: l,
1655
1657
  fontWeight: 600,
1656
1658
  ...r.inlineLabelStyle
1657
- }, { fontSize: 11 }), d = xe(r.inlineDescriptionStyle, {
1659
+ }, { fontSize: 11 }), d = V(r.inlineDescriptionStyle, {
1658
1660
  fontSize: 11,
1659
1661
  fillOpacity: .6
1660
1662
  });
@@ -1674,7 +1676,7 @@ var zt = {
1674
1676
  let r = [];
1675
1677
  for (let e of t) {
1676
1678
  let t = e.cx - e.textWidth / 2, n = 0;
1677
- for (; n < r.length && !(t >= r[n] + wn);) n++;
1679
+ for (; n < r.length && !(t >= r[n] + En);) n++;
1678
1680
  e.row = n;
1679
1681
  let i = e.cx + e.textWidth / 2;
1680
1682
  r[n] = Math.max(r[n] ?? -Infinity, i);
@@ -1684,11 +1686,11 @@ var zt = {
1684
1686
  extraHeight: 0
1685
1687
  } : {
1686
1688
  labels: t,
1687
- extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * xn + Sn
1689
+ extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Cn + wn
1688
1690
  };
1689
- }), de = n(() => {
1691
+ }), fe = n(() => {
1690
1692
  let e = [];
1691
- for (let t of O.value) !t.legend || t.showInLegend === !1 || e.push({
1693
+ for (let t of k.value) !t.legend || t.showInLegend === !1 || e.push({
1692
1694
  label: t.legend,
1693
1695
  color: t.color ?? "currentColor",
1694
1696
  type: "series",
@@ -1697,7 +1699,7 @@ var zt = {
1697
1699
  let t = f.areaSections;
1698
1700
  if (t) for (let n of t) {
1699
1701
  if (n.legend !== "inline" || !n.label && !n.description) continue;
1700
- let t = [n.label, n.description].filter(Boolean).join(" "), r = n.color ?? (n.seriesIndex == null ? "#999" : O.value[n.seriesIndex]?.color ?? "currentColor");
1702
+ let t = [n.label, n.description].filter(Boolean).join(" "), r = n.color ?? (n.seriesIndex == null ? "#999" : k.value[n.seriesIndex]?.color ?? "currentColor");
1701
1703
  e.push({
1702
1704
  label: t,
1703
1705
  color: r,
@@ -1706,47 +1708,47 @@ var zt = {
1706
1708
  });
1707
1709
  }
1708
1710
  return e;
1709
- }), I = n(() => de.value.map((e) => e.label)), L = n(() => Me.value + ue.value.extraHeight), z = n(() => U.value.top + K.value + U.value.bottom + Sn), B = n(() => {
1710
- let { min: e, max: t } = ae.value, n = (e) => f.yTickFormat === void 0 ? me(e) : te(e, f.yTickFormat);
1711
+ }), L = n(() => fe.value.map((e) => e.label)), me = n(() => Pe.value + de.value.extraHeight), he = n(() => U.value.top + K.value + U.value.bottom + wn), z = n(() => {
1712
+ let { min: e, max: t } = oe.value, n = (e) => f.yTickFormat === void 0 ? B(e) : ne(e, f.yTickFormat);
1711
1713
  return e === t ? [{
1712
1714
  value: n(e),
1713
1715
  y: R(U.value.top + K.value / 2)
1714
- }] : (f.yScaleType === "log" ? ve({
1716
+ }] : (f.yScaleType === "log" ? ye({
1715
1717
  min: e,
1716
1718
  max: t,
1717
1719
  ticks: f.yTicks
1718
- }) : he({
1720
+ }) : ge({
1719
1721
  min: e,
1720
1722
  max: t,
1721
1723
  ticks: f.yTicks,
1722
1724
  targetTickCount: K.value / 50
1723
1725
  })).map((e) => ({
1724
1726
  value: n(e),
1725
- y: R(P(e))
1727
+ y: R(F(e))
1726
1728
  }));
1727
1729
  });
1728
- function pe(e, t, n) {
1730
+ function be(e, t, n) {
1729
1731
  let r = f.xTickFormat;
1730
- if (D.value) return typeof r == "function" ? r(e, t) : Rt(e, r, T.value, n);
1731
- let i = e + re.value;
1732
- return r === void 0 ? !A.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : me(i) : typeof r == "function" ? r(i, t) : te(i, r);
1732
+ if (O.value) return typeof r == "function" ? r(e, t) : zt(e, r, E.value, n);
1733
+ let i = e + ie.value;
1734
+ return r === void 0 ? !j.value && f.xLabels && Number.isInteger(e) && e >= 0 && e < f.xLabels.length ? f.xLabels[e] : B(i) : typeof r == "function" ? r(i, t) : ne(i, r);
1733
1735
  }
1734
- let ye = n(() => {
1735
- let { min: e, max: t } = ie.value;
1736
+ let Se = n(() => {
1737
+ let { min: e, max: t } = ae.value;
1736
1738
  if (e === t) return [];
1737
- let n = D.value, r = n ? 0 : re.value, i = ne.value, a = G.value / 80, o, s;
1739
+ let n = O.value, r = n ? 0 : ie.value, i = re.value, a = G.value / 80, o, s;
1738
1740
  if (n) {
1739
- let n = Mt(e, t, a, T.value);
1740
- s = n.unit, o = he({
1741
+ let n = Nt(e, t, a, E.value);
1742
+ s = n.unit, o = ge({
1741
1743
  min: e,
1742
1744
  max: t,
1743
1745
  ticks: n.values
1744
1746
  });
1745
- } else if (f.xTicks == null && !A.value && f.xLabels && f.xLabels.length === i) {
1747
+ } else if (f.xTicks == null && !j.value && f.xLabels && f.xLabels.length === i) {
1746
1748
  let e = Math.max(3, Math.floor(a)), t = Math.max(1, Math.round((i - 1) / e));
1747
1749
  o = [];
1748
1750
  for (let e = 0; e < i; e += t) o.push(e);
1749
- } else o = he({
1751
+ } else o = ge({
1750
1752
  min: e,
1751
1753
  max: t,
1752
1754
  ticks: f.xTicks,
@@ -1755,57 +1757,57 @@ var zt = {
1755
1757
  });
1756
1758
  let c = U.value.left, l = U.value.left + G.value;
1757
1759
  return o.map((e, t) => {
1758
- let n = R(N(e)), r = "middle";
1760
+ let n = R(P(e)), r = "middle";
1759
1761
  return n - c <= 1 ? r = "start" : l - n <= 1 && (r = "end"), {
1760
- value: pe(e, t, s),
1762
+ value: be(e, t, s),
1761
1763
  x: n,
1762
1764
  anchor: r
1763
1765
  };
1764
1766
  });
1765
1767
  });
1766
- function be() {
1767
- return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : Be(O.value);
1768
+ function Ce() {
1769
+ return typeof f.csv == "function" ? f.csv() : typeof f.csv == "string" ? f.csv : He(k.value);
1768
1770
  }
1769
- let Se = n(() => !!f.tooltipData || !!f.tooltipTrigger), Ce = n(() => {
1770
- let e = q.value, t = O.value[0];
1771
- return e === null || !t ? null : j(t, e);
1772
- }), we = n(() => Ce.value === null ? 0 : N(Ce.value));
1773
- function Te(e, t) {
1771
+ let we = n(() => !!f.tooltipData || !!f.tooltipTrigger), Te = n(() => {
1772
+ let e = Le.value, t = k.value[0];
1773
+ return e === null || !t ? null : M(t, e);
1774
+ }), Ee = n(() => Te.value === null ? 0 : P(Te.value));
1775
+ function De(e, t) {
1774
1776
  let n = e.data.length;
1775
1777
  if (n === 0) return null;
1776
1778
  let r = 0, i = Infinity;
1777
1779
  for (let a = 0; a < n; a++) {
1778
- let n = j(e, a);
1780
+ let n = M(e, a);
1779
1781
  if (!isFinite(n)) continue;
1780
1782
  let o = Math.abs(n - t);
1781
1783
  o < i && (i = o, r = a);
1782
1784
  }
1783
1785
  return i === Infinity ? null : r;
1784
1786
  }
1785
- let Ee = n(() => {
1786
- let e = Ce.value;
1787
+ let Oe = n(() => {
1788
+ let e = Te.value;
1787
1789
  if (e === null) return [];
1788
1790
  let t = [];
1789
- for (let n of O.value) {
1791
+ for (let n of k.value) {
1790
1792
  if (n.showInTooltip === !1) continue;
1791
- let r = Te(n, e);
1793
+ let r = De(n, e);
1792
1794
  if (r === null) continue;
1793
1795
  let i = n.data[r];
1794
1796
  isFinite(i) && t.push({
1795
- x: N(j(n, r)),
1796
- y: P(i),
1797
+ x: P(M(n, r)),
1798
+ y: F(i),
1797
1799
  color: n.color ?? "currentColor"
1798
1800
  });
1799
1801
  }
1800
1802
  return t;
1801
- }), De = n(() => {
1802
- let e = q.value, t = Ce.value;
1803
+ }), ke = n(() => {
1804
+ let e = Le.value, t = Te.value;
1803
1805
  if (e === null || t === null) return null;
1804
- let n = pe(t, e), r = O.value, i = [];
1806
+ let n = be(t, e), r = k.value, i = [];
1805
1807
  for (let e = 0; e < r.length; e++) {
1806
1808
  let n = r[e];
1807
1809
  if (n.showInTooltip === !1) continue;
1808
- let a = Te(n, t);
1810
+ let a = De(n, t);
1809
1811
  i.push({
1810
1812
  value: a === null ? NaN : Number(n.data[a]),
1811
1813
  color: n.color ?? "currentColor",
@@ -1819,21 +1821,21 @@ var zt = {
1819
1821
  data: f.tooltipData?.[e] ?? null
1820
1822
  };
1821
1823
  });
1822
- function Oe(e, t) {
1824
+ function Ae(e, t) {
1823
1825
  return !isFinite(e) || !isFinite(t) ? null : {
1824
- x: N(e - re.value),
1825
- y: P(t)
1826
+ x: P(e - ie.value),
1827
+ y: F(t)
1826
1828
  };
1827
1829
  }
1828
- function ke(e) {
1829
- let t = Ae.value?.getBoundingClientRect();
1830
+ function je(e) {
1831
+ let t = Me.value?.getBoundingClientRect();
1830
1832
  if (!t) return null;
1831
- let n = O.value[0];
1833
+ let n = k.value[0];
1832
1834
  if (!n || n.data.length === 0) return null;
1833
- let { min: r, max: i } = ie.value, a = i - r || 1;
1834
- return Te(n, r + (e - t.left - U.value.left) / G.value * a);
1835
+ let { min: r, max: i } = ae.value, a = i - r || 1;
1836
+ return De(n, r + (e - t.left - U.value.left) / G.value * a);
1835
1837
  }
1836
- let { containerRef: Ae, svgRef: H, width: je, height: Me, padding: U, legendY: W, inlineLegendLayout: Ne, innerW: G, innerH: K, bounds: Pe, hoverIndex: q, tooltipRef: Fe, tooltipPos: Ie, tooltipHandlers: Le, menuItems: Re, downloadLinkText: ze, csvHref: Ve, downloadButtonText: He, triggerCsvDownload: Ue, menuFilename: We, isFullscreen: Ge, fullscreenStyle: Ke, teleportTarget: J, exitFullscreen: qe } = st({
1838
+ let { containerRef: Me, svgRef: H, width: Ne, height: Pe, padding: U, legendY: W, inlineLegendLayout: Fe, innerW: G, innerH: K, bounds: Ie, hoverIndex: Le, tooltipRef: Re, tooltipPos: ze, tooltipHandlers: Be, menuItems: Ve, downloadLinkText: Ue, csvHref: We, downloadButtonText: Ge, triggerCsvDownload: Ke, menuFilename: qe, isFullscreen: Je, fullscreenStyle: Ye, teleportTarget: q, exitFullscreen: Xe } = lt({
1837
1839
  width: () => f.width,
1838
1840
  height: () => f.height,
1839
1841
  title: () => f.title,
@@ -1849,17 +1851,17 @@ var zt = {
1849
1851
  downloadButton: () => f.downloadButton,
1850
1852
  fullscreenTarget: () => f.fullscreenTarget,
1851
1853
  chartPadding: () => f.chartPadding,
1852
- inlineLegendLabels: () => I.value,
1853
- hasTooltipSlot: () => Se.value,
1854
- getCsv: be,
1855
- pointerToIndex: ke,
1856
- onHover: (e) => h("hover", e),
1857
- extraBelowHeight: () => ue.value.extraHeight
1858
- }), Y = n(() => xe(f.axisLabelStyle, { fontSize: 13 })), X = n(() => xe(f.tickLabelStyle, {
1854
+ inlineLegendLabels: () => L.value,
1855
+ hasTooltipSlot: () => we.value,
1856
+ getCsv: Ce,
1857
+ pointerToIndex: je,
1858
+ onHover: (e) => v("hover", e),
1859
+ extraBelowHeight: () => de.value.extraHeight
1860
+ }), J = n(() => V(f.axisLabelStyle, { fontSize: 13 })), Y = n(() => V(f.tickLabelStyle, {
1859
1861
  fontSize: 10,
1860
- fillOpacity: V
1861
- })), Je = n(() => xe(f.legendStyle, { fontSize: 11 })), Z = n(() => {
1862
- let e = f.titleStyle, t = e?.align ?? "left", n = Pe.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
1862
+ fillOpacity: xe
1863
+ })), Ze = n(() => V(f.legendStyle, { fontSize: 11 })), X = n(() => {
1864
+ let e = f.titleStyle, t = e?.align ?? "left", n = Ie.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
1863
1865
  return {
1864
1866
  lines: (f.title ?? "").split("\n"),
1865
1867
  fontSize: e?.fontSize ?? 14,
@@ -1869,9 +1871,9 @@ var zt = {
1869
1871
  x: r,
1870
1872
  anchor: i
1871
1873
  };
1872
- }), Q = n(() => {
1873
- let e = Ne.value.positions, t = U.value.left, n = W.value;
1874
- return de.value.map((r, i) => {
1874
+ }), Z = n(() => {
1875
+ let e = Fe.value.positions, t = U.value.left, n = W.value;
1876
+ return fe.value.map((r, i) => {
1875
1877
  let a = e[i];
1876
1878
  return {
1877
1879
  ...r,
@@ -1881,46 +1883,48 @@ var zt = {
1881
1883
  });
1882
1884
  });
1883
1885
  return (n, l) => (_(), r(t, {
1884
- to: C(J),
1885
- disabled: !C(Ge)
1886
+ to: C(q),
1887
+ disabled: !C(Je)
1886
1888
  }, [o("div", d({
1887
1889
  ref_key: "containerRef",
1888
- ref: Ae
1890
+ ref: Me
1889
1891
  }, n.$attrs, {
1890
- class: ["line-chart-wrapper", { "is-fullscreen": C(Ge) }],
1891
- style: C(Ke)
1892
+ class: ["line-chart-wrapper", { "is-fullscreen": C(Je) }],
1893
+ style: C(Ye),
1894
+ role: g.value || void 0,
1895
+ "aria-label": h.value || void 0
1892
1896
  }), [
1893
- c.menu ? (_(), r(fe, {
1897
+ c.menu ? (_(), r(pe, {
1894
1898
  key: 0,
1895
- items: C(Re),
1896
- "is-fullscreen": C(Ge),
1897
- onClose: C(qe)
1899
+ items: C(Ve),
1900
+ "is-fullscreen": C(Je),
1901
+ onClose: C(Xe)
1898
1902
  }, null, 8, [
1899
1903
  "items",
1900
1904
  "is-fullscreen",
1901
1905
  "onClose"
1902
1906
  ])) : i("", !0),
1903
- o("div", zt, x(C(Ge) ? "Chart expanded to fill window" : ""), 1),
1907
+ o("div", Vt, x(C(Je) ? "Chart expanded to fill window" : ""), 1),
1904
1908
  (_(), a("svg", {
1905
1909
  ref_key: "svgRef",
1906
1910
  ref: H,
1907
- width: C(je),
1908
- height: L.value
1911
+ width: C(Ne),
1912
+ height: me.value
1909
1913
  }, [
1910
1914
  c.title ? (_(), a("text", {
1911
1915
  key: 0,
1912
- x: Z.value.x,
1913
- y: Z.value.lineHeight,
1914
- "text-anchor": Z.value.anchor,
1915
- "font-size": Z.value.fontSize,
1916
- "font-weight": Z.value.fontWeight,
1917
- fill: Z.value.color
1918
- }, [(_(!0), a(e, null, y(Z.value.lines, (e, t) => (_(), a("tspan", {
1916
+ x: X.value.x,
1917
+ y: X.value.lineHeight,
1918
+ "text-anchor": X.value.anchor,
1919
+ "font-size": X.value.fontSize,
1920
+ "font-weight": X.value.fontWeight,
1921
+ fill: X.value.color
1922
+ }, [(_(!0), a(e, null, y(X.value.lines, (e, t) => (_(), a("tspan", {
1919
1923
  key: t,
1920
- x: Z.value.x,
1921
- dy: t === 0 ? 0 : Z.value.lineHeight
1922
- }, x(e), 9, Ht))), 128))], 8, Vt)) : i("", !0),
1923
- Q.value.length > 0 ? (_(), a("g", Ut, [(_(!0), a(e, null, y(Q.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
1924
+ x: X.value.x,
1925
+ dy: t === 0 ? 0 : X.value.lineHeight
1926
+ }, x(e), 9, Wt))), 128))], 8, Ut)) : i("", !0),
1927
+ Z.value.length > 0 ? (_(), a("g", Gt, [(_(!0), a(e, null, y(Z.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
1924
1928
  key: 0,
1925
1929
  x1: t.x,
1926
1930
  y1: t.y,
@@ -1929,7 +1933,7 @@ var zt = {
1929
1933
  stroke: t.color,
1930
1934
  "stroke-width": "2",
1931
1935
  "stroke-dasharray": t.dashed ? "4 2" : void 0
1932
- }, null, 8, Wt)) : (_(), a("circle", {
1936
+ }, null, 8, Kt)) : (_(), a("circle", {
1933
1937
  key: 1,
1934
1938
  cx: t.x + 4,
1935
1939
  cy: t.y,
@@ -1938,13 +1942,13 @@ var zt = {
1938
1942
  "fill-opacity": t.fillOpacity,
1939
1943
  stroke: t.color,
1940
1944
  "stroke-width": "1.5"
1941
- }, null, 8, Gt)), o("text", {
1945
+ }, null, 8, qt)), o("text", {
1942
1946
  x: t.x + 18,
1943
1947
  y: t.y + 4,
1944
- "font-size": Je.value.fontSize,
1945
- fill: Je.value.fill,
1946
- "font-weight": Je.value.fontWeight
1947
- }, x(t.label), 9, Kt)], 64))), 128))])) : i("", !0),
1948
+ "font-size": Ze.value.fontSize,
1949
+ fill: Ze.value.fill,
1950
+ "font-weight": Ze.value.fontWeight
1951
+ }, x(t.label), 9, Jt)], 64))), 128))])) : i("", !0),
1948
1952
  o("line", {
1949
1953
  x1: C(R)(C(U).left),
1950
1954
  y1: C(R)(C(U).top),
@@ -1952,7 +1956,7 @@ var zt = {
1952
1956
  y2: C(R)(C(U).top + C(K)),
1953
1957
  stroke: "currentColor",
1954
1958
  "stroke-opacity": "0.3"
1955
- }, null, 8, qt),
1959
+ }, null, 8, Yt),
1956
1960
  o("line", {
1957
1961
  x1: C(R)(C(U).left),
1958
1962
  y1: C(R)(C(U).top + C(K)),
@@ -1960,8 +1964,8 @@ var zt = {
1960
1964
  y2: C(R)(C(U).top + C(K)),
1961
1965
  stroke: "currentColor",
1962
1966
  "stroke-opacity": "0.3"
1963
- }, null, 8, Jt),
1964
- c.yGrid ? (_(!0), a(e, { key: 2 }, y(B.value, (e, t) => (_(), a("line", {
1967
+ }, null, 8, Xt),
1968
+ c.yGrid ? (_(!0), a(e, { key: 2 }, y(z.value, (e, t) => (_(), a("line", {
1965
1969
  key: "yg" + t,
1966
1970
  x1: C(U).left,
1967
1971
  y1: e.y,
@@ -1969,8 +1973,8 @@ var zt = {
1969
1973
  y2: e.y,
1970
1974
  stroke: "currentColor",
1971
1975
  "stroke-opacity": "0.1"
1972
- }, null, 8, Yt))), 128)) : i("", !0),
1973
- c.xGrid ? (_(!0), a(e, { key: 3 }, y(ye.value, (e, t) => (_(), a("line", {
1976
+ }, null, 8, Zt))), 128)) : i("", !0),
1977
+ c.xGrid ? (_(!0), a(e, { key: 3 }, y(Se.value, (e, t) => (_(), a("line", {
1974
1978
  key: "xg" + t,
1975
1979
  x1: e.x,
1976
1980
  y1: C(U).top,
@@ -1978,79 +1982,79 @@ var zt = {
1978
1982
  y2: C(U).top + C(K),
1979
1983
  stroke: "currentColor",
1980
1984
  "stroke-opacity": "0.1"
1981
- }, null, 8, Xt))), 128)) : i("", !0),
1982
- (_(!0), a(e, null, y(B.value, (e, t) => (_(), a("text", {
1985
+ }, null, 8, Qt))), 128)) : i("", !0),
1986
+ (_(!0), a(e, null, y(z.value, (e, t) => (_(), a("text", {
1983
1987
  key: "y" + t,
1984
1988
  "data-testid": "y-tick",
1985
1989
  x: C(U).left - 6,
1986
1990
  y: e.y,
1987
1991
  "text-anchor": "end",
1988
1992
  "dominant-baseline": "middle",
1989
- "font-size": X.value.fontSize,
1990
- fill: X.value.fill,
1991
- "font-weight": X.value.fontWeight,
1992
- "fill-opacity": X.value.fillOpacity
1993
- }, x(e.value), 9, Zt))), 128)),
1993
+ "font-size": Y.value.fontSize,
1994
+ fill: Y.value.fill,
1995
+ "font-weight": Y.value.fontWeight,
1996
+ "fill-opacity": Y.value.fillOpacity
1997
+ }, x(e.value), 9, $t))), 128)),
1994
1998
  c.yLabel ? (_(), a("text", {
1995
1999
  key: 4,
1996
2000
  x: 0,
1997
2001
  y: 0,
1998
2002
  transform: `translate(14, ${C(U).top + C(K) / 2}) rotate(-90)`,
1999
2003
  "text-anchor": "middle",
2000
- "font-size": Y.value.fontSize,
2001
- fill: Y.value.fill,
2002
- "font-weight": Y.value.fontWeight
2003
- }, x(c.yLabel), 9, Qt)) : i("", !0),
2004
- (_(!0), a(e, null, y(ye.value, (e, t) => (_(), a("text", {
2004
+ "font-size": J.value.fontSize,
2005
+ fill: J.value.fill,
2006
+ "font-weight": J.value.fontWeight
2007
+ }, x(c.yLabel), 9, en)) : i("", !0),
2008
+ (_(!0), a(e, null, y(Se.value, (e, t) => (_(), a("text", {
2005
2009
  key: "x" + t,
2006
2010
  "data-testid": "x-tick",
2007
2011
  x: e.x,
2008
2012
  y: C(U).top + C(K) + 16,
2009
2013
  "text-anchor": e.anchor,
2010
- "font-size": X.value.fontSize,
2011
- fill: X.value.fill,
2012
- "font-weight": X.value.fontWeight,
2013
- "fill-opacity": X.value.fillOpacity
2014
- }, x(e.value), 9, $t))), 128)),
2014
+ "font-size": Y.value.fontSize,
2015
+ fill: Y.value.fill,
2016
+ "font-weight": Y.value.fontWeight,
2017
+ "fill-opacity": Y.value.fillOpacity
2018
+ }, x(e.value), 9, tn))), 128)),
2015
2019
  c.xLabel ? (_(), a("text", {
2016
2020
  key: 5,
2017
2021
  x: C(U).left + C(G) / 2,
2018
- y: C(Me) - 4,
2022
+ y: C(Pe) - 4,
2019
2023
  "text-anchor": "middle",
2020
- "font-size": Y.value.fontSize,
2021
- fill: Y.value.fill,
2022
- "font-weight": Y.value.fontWeight
2023
- }, x(c.xLabel), 9, en)) : i("", !0),
2024
- (_(!0), a(e, null, y(k.value, (e, t) => (_(), a("path", {
2024
+ "font-size": J.value.fontSize,
2025
+ fill: J.value.fill,
2026
+ "font-weight": J.value.fontWeight
2027
+ }, x(c.xLabel), 9, nn)) : i("", !0),
2028
+ (_(!0), a(e, null, y(A.value, (e, t) => (_(), a("path", {
2025
2029
  key: "area" + t,
2026
- d: ce(e),
2030
+ d: le(e),
2027
2031
  fill: e.color ?? "currentColor",
2028
2032
  "fill-opacity": e.opacity ?? .2,
2029
2033
  stroke: "none",
2030
2034
  style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
2031
- }, null, 12, tn))), 128)),
2032
- (_(!0), a(e, null, y(O.value, (t, n) => (_(), a(e, { key: n }, [
2035
+ }, null, 12, rn))), 128)),
2036
+ (_(!0), a(e, null, y(k.value, (t, n) => (_(), a(e, { key: n }, [
2033
2037
  t.line !== !1 && t.outline ? (_(), a("path", {
2034
2038
  key: 0,
2035
- d: oe(t),
2039
+ d: se(t),
2036
2040
  fill: "none",
2037
2041
  stroke: t.outlineColor ?? "var(--color-bg-0, #fff)",
2038
2042
  "stroke-width": (t.strokeWidth ?? 1.5) + (t.outlineWidth ?? 4),
2039
2043
  "stroke-linecap": "round",
2040
2044
  "stroke-linejoin": "round",
2041
2045
  "data-testid": "line-outline"
2042
- }, null, 8, nn)) : i("", !0),
2046
+ }, null, 8, an)) : i("", !0),
2043
2047
  t.line === !1 ? i("", !0) : (_(), a("path", {
2044
2048
  key: 1,
2045
- d: oe(t),
2049
+ d: se(t),
2046
2050
  fill: "none",
2047
2051
  stroke: t.color ?? "currentColor",
2048
2052
  "stroke-width": t.strokeWidth ?? 1.5,
2049
2053
  "stroke-opacity": t.lineOpacity ?? t.opacity ?? c.lineOpacity,
2050
2054
  "stroke-dasharray": t.dashed ? "6 3" : void 0,
2051
2055
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2052
- }, null, 12, rn)),
2053
- t.dots ? (_(!0), a(e, { key: 2 }, y(se(t), (e, n) => (_(), a("circle", {
2056
+ }, null, 12, on)),
2057
+ t.dots ? (_(!0), a(e, { key: 2 }, y(ce(t), (e, n) => (_(), a("circle", {
2054
2058
  key: n,
2055
2059
  cx: e.x,
2056
2060
  cy: e.y,
@@ -2059,69 +2063,69 @@ var zt = {
2059
2063
  "fill-opacity": t.dotOpacity ?? t.opacity ?? c.lineOpacity,
2060
2064
  stroke: t.dotStroke ?? "none",
2061
2065
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2062
- }, null, 12, an))), 128)) : i("", !0)
2066
+ }, null, 12, sn))), 128)) : i("", !0)
2063
2067
  ], 64))), 128)),
2064
2068
  (_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
2065
2069
  o("path", {
2066
- d: le(t),
2067
- fill: t.color ?? (t.seriesIndex == null ? "#999" : O.value[t.seriesIndex]?.color ?? "currentColor"),
2070
+ d: ue(t),
2071
+ fill: t.color ?? (t.seriesIndex == null ? "#999" : k.value[t.seriesIndex]?.color ?? "currentColor"),
2068
2072
  "fill-opacity": t.opacity ?? .15,
2069
2073
  stroke: "none"
2070
- }, null, 8, on),
2074
+ }, null, 8, cn),
2071
2075
  t.seriesIndex == null ? i("", !0) : (_(), a("path", {
2072
2076
  key: 0,
2073
- d: le(t, !1),
2077
+ d: ue(t, !1),
2074
2078
  fill: "none",
2075
- stroke: t.color ?? O.value[t.seriesIndex]?.color ?? "currentColor",
2079
+ stroke: t.color ?? k.value[t.seriesIndex]?.color ?? "currentColor",
2076
2080
  "stroke-width": t.strokeWidth ?? 2,
2077
2081
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2078
- }, null, 8, sn)),
2082
+ }, null, 8, ln)),
2079
2083
  t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
2080
- x1: C(R)(F(t, "start")),
2084
+ x1: C(R)(I(t, "start")),
2081
2085
  y1: C(U).top,
2082
- x2: C(R)(F(t, "start")),
2086
+ x2: C(R)(I(t, "start")),
2083
2087
  y2: C(U).top + C(K),
2084
2088
  stroke: t.color ?? "#999",
2085
2089
  "stroke-width": t.strokeWidth ?? 2,
2086
2090
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2087
- }, null, 8, cn), o("line", {
2088
- x1: C(R)(F(t, "end")),
2091
+ }, null, 8, un), o("line", {
2092
+ x1: C(R)(I(t, "end")),
2089
2093
  y1: C(U).top,
2090
- x2: C(R)(F(t, "end")),
2094
+ x2: C(R)(I(t, "end")),
2091
2095
  y2: C(U).top + C(K),
2092
2096
  stroke: t.color ?? "#999",
2093
2097
  "stroke-width": t.strokeWidth ?? 2,
2094
2098
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2095
- }, null, 8, ln)], 64)) : i("", !0),
2099
+ }, null, 8, dn)], 64)) : i("", !0),
2096
2100
  o("line", {
2097
- x1: C(R)(F(t, "start")),
2101
+ x1: C(R)(I(t, "start")),
2098
2102
  y1: C(U).top + C(K) - 4,
2099
- x2: C(R)(F(t, "start")),
2103
+ x2: C(R)(I(t, "start")),
2100
2104
  y2: C(U).top + C(K) + 4,
2101
2105
  stroke: "currentColor",
2102
2106
  "stroke-opacity": "0.4"
2103
- }, null, 8, un),
2107
+ }, null, 8, fn),
2104
2108
  o("line", {
2105
- x1: C(R)(F(t, "end")),
2109
+ x1: C(R)(I(t, "end")),
2106
2110
  y1: C(U).top + C(K) - 4,
2107
- x2: C(R)(F(t, "end")),
2111
+ x2: C(R)(I(t, "end")),
2108
2112
  y2: C(U).top + C(K) + 4,
2109
2113
  stroke: "currentColor",
2110
2114
  "stroke-opacity": "0.4"
2111
- }, null, 8, dn)
2115
+ }, null, 8, pn)
2112
2116
  ], 64))), 128)),
2113
- Se.value && C(q) !== null ? (_(), a("line", {
2117
+ we.value && C(Le) !== null ? (_(), a("line", {
2114
2118
  key: 6,
2115
- x1: C(R)(we.value),
2119
+ x1: C(R)(Ee.value),
2116
2120
  y1: C(U).top,
2117
- x2: C(R)(we.value),
2121
+ x2: C(R)(Ee.value),
2118
2122
  y2: C(U).top + C(K),
2119
2123
  stroke: "currentColor",
2120
2124
  "stroke-opacity": "0.3",
2121
2125
  "stroke-dasharray": "4 2",
2122
2126
  "pointer-events": "none"
2123
- }, null, 8, fn)) : i("", !0),
2124
- (_(!0), a(e, null, y(Ee.value, (e, t) => (_(), a("circle", {
2127
+ }, null, 8, mn)) : i("", !0),
2128
+ (_(!0), a(e, null, y(Oe.value, (e, t) => (_(), a("circle", {
2125
2129
  key: "hd" + t,
2126
2130
  cx: e.x,
2127
2131
  cy: e.y,
@@ -2130,8 +2134,8 @@ var zt = {
2130
2134
  stroke: "var(--color-bg-0, #fff)",
2131
2135
  "stroke-width": "2",
2132
2136
  "pointer-events": "none"
2133
- }, null, 8, pn))), 128)),
2134
- Se.value ? (_(), a("rect", d({
2137
+ }, null, 8, hn))), 128)),
2138
+ we.value ? (_(), a("rect", d({
2135
2139
  key: 7,
2136
2140
  x: C(U).left,
2137
2141
  y: C(U).top,
@@ -2142,150 +2146,150 @@ var zt = {
2142
2146
  cursor: "crosshair",
2143
2147
  "touch-action": "pan-y"
2144
2148
  }
2145
- }, ee(C(Le), !0)), null, 16, mn)) : i("", !0),
2146
- c.annotations && c.annotations.length > 0 ? (_(), r(C(it), {
2149
+ }, ee(C(Be), !0)), null, 16, gn)) : i("", !0),
2150
+ c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
2147
2151
  key: 8,
2148
2152
  annotations: c.annotations,
2149
- project: Oe,
2150
- bounds: C(Pe)
2153
+ project: Ae,
2154
+ bounds: C(Ie)
2151
2155
  }, null, 8, ["annotations", "bounds"])) : i("", !0),
2152
- (_(!0), a(e, null, y(ue.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2156
+ (_(!0), a(e, null, y(de.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2153
2157
  o("circle", {
2154
2158
  cx: e.cx - e.textWidth / 2 - 2,
2155
- cy: z.value + e.row * xn + 4,
2159
+ cy: he.value + e.row * Cn + 4,
2156
2160
  r: "4",
2157
2161
  fill: e.color,
2158
2162
  "fill-opacity": e.fillOpacity,
2159
2163
  stroke: e.color,
2160
2164
  "stroke-width": "1.5"
2161
- }, null, 8, hn),
2165
+ }, null, 8, _n),
2162
2166
  e.labelText ? (_(), a("text", {
2163
2167
  key: 0,
2164
2168
  x: e.cx - e.textWidth / 2 + 8,
2165
- y: z.value + e.row * xn + 8,
2169
+ y: he.value + e.row * Cn + 8,
2166
2170
  "font-size": e.labelStyle.fontSize,
2167
2171
  "font-weight": e.labelStyle.fontWeight,
2168
2172
  fill: e.labelStyle.fill
2169
- }, x(e.labelText), 9, gn)) : i("", !0),
2173
+ }, x(e.labelText), 9, vn)) : i("", !0),
2170
2174
  e.descText ? (_(), a("text", {
2171
2175
  key: 1,
2172
2176
  x: e.cx - e.textWidth / 2 + 8,
2173
- y: z.value + e.row * xn + 22,
2177
+ y: he.value + e.row * Cn + 22,
2174
2178
  "font-size": e.descStyle.fontSize,
2175
2179
  "font-weight": e.descStyle.fontWeight,
2176
2180
  fill: e.descStyle.fill,
2177
2181
  "fill-opacity": e.descStyle.fillOpacity
2178
- }, x(e.descText), 9, _n)) : i("", !0)
2182
+ }, x(e.descText), 9, yn)) : i("", !0)
2179
2183
  ]))), 128))
2180
- ], 8, Bt)),
2181
- Se.value && C(q) !== null && De.value ? (_(), a("div", {
2184
+ ], 8, Ht)),
2185
+ we.value && C(Le) !== null && ke.value ? (_(), a("div", {
2182
2186
  key: 1,
2183
2187
  ref_key: "tooltipRef",
2184
- ref: Fe,
2188
+ ref: Re,
2185
2189
  class: "chart-tooltip-content",
2186
2190
  style: m({
2187
2191
  position: "absolute",
2188
2192
  top: "0",
2189
2193
  left: "0",
2190
2194
  willChange: "transform",
2191
- transform: C(Ie) ? `translate3d(${C(Ie).left}px, ${C(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2192
- visibility: C(Ie) ? "visible" : "hidden"
2195
+ transform: C(ze) ? `translate3d(${C(ze).left}px, ${C(ze).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2196
+ visibility: C(ze) ? "visible" : "hidden"
2193
2197
  })
2194
- }, [b(n.$slots, "tooltip", p(u(De.value)), () => [o("div", vn, [De.value.xLabel ? (_(), a("div", yn, x(De.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(De.value.values, (e) => (_(), a("div", {
2198
+ }, [b(n.$slots, "tooltip", p(u(ke.value)), () => [o("div", bn, [ke.value.xLabel ? (_(), a("div", xn, x(ke.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(ke.value.values, (e) => (_(), a("div", {
2195
2199
  key: e.seriesIndex,
2196
2200
  class: "line-chart-tooltip-row"
2197
2201
  }, [o("span", {
2198
2202
  class: "line-chart-tooltip-swatch",
2199
2203
  style: m({ background: e.color })
2200
- }, null, 4), s(" " + x(isFinite(e.value) ? C(w)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
2201
- C(ze) ? (_(), a("a", {
2204
+ }, null, 4), s(" " + x(isFinite(e.value) ? C(T)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
2205
+ C(Ue) ? (_(), a("a", {
2202
2206
  key: 2,
2203
2207
  class: "line-chart-download-link",
2204
- href: C(Ve),
2205
- download: `${C(We)()}.csv`
2206
- }, x(C(ze)), 9, bn)) : i("", !0),
2207
- C(He) ? (_(), a("button", {
2208
+ href: C(We),
2209
+ download: `${C(qe)()}.csv`
2210
+ }, x(C(Ue)), 9, Sn)) : i("", !0),
2211
+ C(Ge) ? (_(), a("button", {
2208
2212
  key: 3,
2209
2213
  type: "button",
2210
2214
  class: "line-chart-download-button",
2211
- onClick: l[0] ||= (...e) => C(Ue) && C(Ue)(...e)
2212
- }, x(C(He)), 1)) : i("", !0)
2213
- ], 16)], 8, ["to", "disabled"]));
2215
+ onClick: l[0] ||= (...e) => C(Ke) && C(Ke)(...e)
2216
+ }, x(C(Ge)), 1)) : i("", !0)
2217
+ ], 16, Bt)], 8, ["to", "disabled"]));
2214
2218
  }
2215
- }), [["__scopeId", "data-v-e96123bd"]]), En = {
2219
+ }), [["__scopeId", "data-v-0cf7b0c7"]]), On = ["role", "aria-label"], kn = {
2216
2220
  class: "chart-sr-only",
2217
2221
  "aria-live": "polite"
2218
- }, Dn = ["width", "height"], On = [
2222
+ }, An = ["width", "height"], jn = [
2219
2223
  "x",
2220
2224
  "y",
2221
2225
  "text-anchor",
2222
2226
  "font-size",
2223
2227
  "font-weight",
2224
2228
  "fill"
2225
- ], kn = ["x", "dy"], An = [
2229
+ ], Mn = ["x", "dy"], Nn = [
2226
2230
  "data-testid",
2227
2231
  "x",
2228
2232
  "y",
2229
2233
  "text-anchor",
2230
2234
  "font-size",
2231
2235
  "fill"
2232
- ], jn = { key: 1 }, Mn = [
2236
+ ], Pn = { key: 1 }, Fn = [
2233
2237
  "x",
2234
2238
  "y",
2235
2239
  "fill"
2236
- ], Nn = [
2240
+ ], In = [
2237
2241
  "x1",
2238
2242
  "y1",
2239
2243
  "x2",
2240
2244
  "y2",
2241
2245
  "stroke",
2242
2246
  "stroke-dasharray"
2243
- ], Pn = [
2247
+ ], Ln = [
2244
2248
  "x",
2245
2249
  "y",
2246
2250
  "font-size",
2247
2251
  "fill",
2248
2252
  "font-weight"
2249
- ], Fn = [
2253
+ ], Rn = [
2250
2254
  "x1",
2251
2255
  "y1",
2252
2256
  "x2",
2253
2257
  "y2"
2254
- ], In = [
2258
+ ], zn = [
2255
2259
  "x1",
2256
2260
  "y1",
2257
2261
  "x2",
2258
2262
  "y2"
2259
- ], Ln = [
2263
+ ], Bn = [
2260
2264
  "x1",
2261
2265
  "y1",
2262
2266
  "x2",
2263
2267
  "y2"
2264
- ], Rn = [
2268
+ ], Vn = [
2265
2269
  "x",
2266
2270
  "y",
2267
2271
  "width",
2268
2272
  "height"
2269
- ], zn = [
2273
+ ], Hn = [
2270
2274
  "x",
2271
2275
  "y",
2272
2276
  "font-size",
2273
2277
  "fill",
2274
2278
  "font-weight",
2275
2279
  "fill-opacity"
2276
- ], Bn = [
2280
+ ], Un = [
2277
2281
  "x",
2278
2282
  "y",
2279
2283
  "font-size",
2280
2284
  "fill",
2281
2285
  "font-weight",
2282
2286
  "fill-opacity"
2283
- ], Vn = [
2287
+ ], Wn = [
2284
2288
  "transform",
2285
2289
  "font-size",
2286
2290
  "fill",
2287
2291
  "font-weight"
2288
- ], Hn = [
2292
+ ], Gn = [
2289
2293
  "x",
2290
2294
  "y",
2291
2295
  "text-anchor",
@@ -2293,7 +2297,7 @@ var zt = {
2293
2297
  "fill",
2294
2298
  "font-weight",
2295
2299
  "fill-opacity"
2296
- ], Un = [
2300
+ ], Kn = [
2297
2301
  "x",
2298
2302
  "y",
2299
2303
  "text-anchor",
@@ -2301,13 +2305,13 @@ var zt = {
2301
2305
  "fill",
2302
2306
  "font-weight",
2303
2307
  "fill-opacity"
2304
- ], Wn = [
2308
+ ], qn = [
2305
2309
  "x",
2306
2310
  "y",
2307
2311
  "font-size",
2308
2312
  "fill",
2309
2313
  "font-weight"
2310
- ], Gn = [
2314
+ ], Jn = [
2311
2315
  "data-category",
2312
2316
  "data-series",
2313
2317
  "x",
@@ -2316,34 +2320,34 @@ var zt = {
2316
2320
  "height",
2317
2321
  "fill",
2318
2322
  "fill-opacity"
2319
- ], Kn = [
2323
+ ], Yn = [
2320
2324
  "x",
2321
2325
  "y",
2322
2326
  "text-anchor",
2323
2327
  "font-size",
2324
2328
  "font-weight",
2325
2329
  "fill"
2326
- ], qn = [
2330
+ ], Xn = [
2327
2331
  "d",
2328
2332
  "stroke",
2329
2333
  "stroke-width",
2330
2334
  "stroke-opacity",
2331
2335
  "stroke-dasharray"
2332
- ], Jn = [
2336
+ ], Zn = [
2333
2337
  "cx",
2334
2338
  "cy",
2335
2339
  "r",
2336
2340
  "fill",
2337
2341
  "fill-opacity"
2338
- ], Yn = [
2342
+ ], Qn = [
2339
2343
  "x",
2340
2344
  "y",
2341
2345
  "width",
2342
2346
  "height"
2343
- ], Xn = { class: "bar-chart-tooltip" }, Zn = {
2347
+ ], $n = { class: "bar-chart-tooltip" }, er = {
2344
2348
  key: 0,
2345
2349
  class: "bar-chart-tooltip-label"
2346
- }, Qn = ["href", "download"], $n = 22, er = 2, tr = 11, nr = .6, rr = 4, ir = 4, ar = /* @__PURE__ */ L(/* @__PURE__ */ l({
2350
+ }, tr = ["href", "download"], nr = 22, rr = 2, ir = 11, ar = .6, or = 4, sr = 4, cr = /* @__PURE__ */ L(/* @__PURE__ */ l({
2347
2351
  inheritAttrs: !1,
2348
2352
  __name: "BarChart",
2349
2353
  props: {
@@ -2378,6 +2382,8 @@ var zt = {
2378
2382
  height: {},
2379
2383
  title: {},
2380
2384
  titleStyle: {},
2385
+ role: {},
2386
+ ariaLabel: {},
2381
2387
  axisLabelStyle: {},
2382
2388
  tickLabelStyle: {},
2383
2389
  legendStyle: {},
@@ -2402,10 +2408,10 @@ var zt = {
2402
2408
  },
2403
2409
  emits: ["hover"],
2404
2410
  setup(c, { emit: l }) {
2405
- let f = c, h = l, g = [];
2406
- function v(e) {
2411
+ let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "figure" : void 0)), v = l, S = [];
2412
+ function te(e) {
2407
2413
  return {
2408
- data: e.y ?? e.data ?? g,
2414
+ data: e.y ?? e.data ?? S,
2409
2415
  color: e.color,
2410
2416
  opacity: e.opacity,
2411
2417
  blendMode: e.blendMode,
@@ -2414,79 +2420,79 @@ var zt = {
2414
2420
  showInTooltip: e.showInTooltip
2415
2421
  };
2416
2422
  }
2417
- let S = n(() => {
2418
- if (f.series && f.series.length > 0) return f.series.map(v);
2423
+ let w = n(() => {
2424
+ if (f.series && f.series.length > 0) return f.series.map(te);
2419
2425
  let e = f.y ?? f.data;
2420
2426
  return e ? [{ data: e }] : [];
2421
- }), w = n(() => {
2427
+ }), T = n(() => {
2422
2428
  let e = f.categories?.length ?? 0;
2423
- for (let t of S.value) t.data.length > e && (e = t.data.length);
2429
+ for (let t of w.value) t.data.length > e && (e = t.data.length);
2424
2430
  return e;
2425
- }), T = n(() => {
2426
- let e = w.value, t = Array(e);
2431
+ }), E = n(() => {
2432
+ let e = T.value, t = Array(e);
2427
2433
  for (let n = 0; n < e; n++) {
2428
2434
  let e = f.categories?.[n];
2429
2435
  e instanceof Date ? t[n] = e.toISOString().slice(0, 10) : t[n] = e ?? String(n);
2430
2436
  }
2431
2437
  return t;
2432
- }), E = n(() => {
2438
+ }), D = n(() => {
2433
2439
  let e = f.categories;
2434
- if (!e || e.length === 0 || !Ot(e, "utc")) return null;
2440
+ if (!e || e.length === 0 || !kt(e, "utc")) return null;
2435
2441
  let t = Array(e.length);
2436
- for (let n = 0; n < e.length; n++) t[n] = Et(e[n], "utc") ?? NaN;
2442
+ for (let n = 0; n < e.length; n++) t[n] = Dt(e[n], "utc") ?? NaN;
2437
2443
  return t;
2438
- }), D = n(() => f.orientation === "vertical"), O = n(() => {
2444
+ }), O = n(() => f.orientation === "vertical"), k = n(() => {
2439
2445
  let e = Infinity, t = -Infinity, n = Infinity, r = (e) => {
2440
2446
  e > 0 && e < n && (n = e);
2441
2447
  };
2442
2448
  if (f.layout === "stacked") {
2443
- let n = w.value;
2449
+ let n = T.value;
2444
2450
  for (let i = 0; i < n; i++) {
2445
2451
  let n = 0, a = 0;
2446
- for (let e of S.value) {
2452
+ for (let e of w.value) {
2447
2453
  if (i >= e.data.length) continue;
2448
2454
  let t = Number(e.data[i]);
2449
2455
  isFinite(t) && (r(t), t >= 0 ? n += t : a += t);
2450
2456
  }
2451
2457
  n > t && (t = n), a < e && (e = a);
2452
2458
  }
2453
- } else for (let n of S.value) for (let i of n.data) {
2459
+ } else for (let n of w.value) for (let i of n.data) {
2454
2460
  let n = Number(i);
2455
2461
  isFinite(n) && (r(n), n < e && (e = n), n > t && (t = n));
2456
2462
  }
2457
2463
  isFinite(e) || (e = 0), isFinite(t) || (t = 0);
2458
2464
  let i = f.valueMin ?? 0;
2459
2465
  f.valueScaleType === "log" ? i > 0 && i < e && (e = i) : i < e && (e = i);
2460
- let a = _e(e, t, f.valueScaleType, n);
2466
+ let a = ve(e, t, f.valueScaleType, n);
2461
2467
  return {
2462
2468
  min: a.min,
2463
2469
  max: a.max,
2464
2470
  range: a.max - a.min || 1
2465
2471
  };
2466
- }), k = n(() => D.value ? U.value : W.value), ne = n(() => D.value ? W.value : U.value), A = n(() => {
2467
- let e = w.value;
2468
- return e > 0 ? k.value / e : 0;
2469
- }), j = n(() => A.value * (1 - f.barPadding)), M = n(() => {
2470
- let e = S.value.length;
2472
+ }), A = n(() => O.value ? U.value : W.value), re = n(() => O.value ? W.value : U.value), j = n(() => {
2473
+ let e = T.value;
2474
+ return e > 0 ? A.value / e : 0;
2475
+ }), M = n(() => j.value * (1 - f.barPadding)), N = n(() => {
2476
+ let e = w.value.length;
2471
2477
  if (e === 0) return 0;
2472
- if (f.layout === "stacked" || e === 1) return j.value;
2478
+ if (f.layout === "stacked" || e === 1) return M.value;
2473
2479
  let t = f.groupGap * (e - 1);
2474
- return Math.max(1, (j.value - t) / e);
2480
+ return Math.max(1, (M.value - t) / e);
2475
2481
  });
2476
- function re(e) {
2477
- return (D.value ? H.value.left : H.value.top) + e * A.value;
2482
+ function ie(e) {
2483
+ return (O.value ? H.value.left : H.value.top) + e * j.value;
2478
2484
  }
2479
- let ie = n(() => {
2480
- let { min: e, max: t } = O.value, n = f.valueMin ?? 0;
2481
- return N(Math.max(e, Math.min(t, n)));
2485
+ let ae = n(() => {
2486
+ let { min: e, max: t } = k.value, n = f.valueMin ?? 0;
2487
+ return P(Math.max(e, Math.min(t, n)));
2482
2488
  });
2483
- function N(e) {
2484
- let { min: t, max: n } = O.value, r = ge(e, t, n, f.valueScaleType);
2485
- return D.value ? H.value.top + W.value - r * W.value : H.value.left + r * U.value;
2489
+ function P(e) {
2490
+ let { min: t, max: n } = k.value, r = _e(e, t, n, f.valueScaleType);
2491
+ return O.value ? H.value.top + W.value - r * W.value : H.value.left + r * U.value;
2486
2492
  }
2487
- function ae(e, t, n, r, i, a, o, s, c, l) {
2493
+ function oe(e, t, n, r, i, a, o, s, c, l) {
2488
2494
  let u = Math.min(e, t), d = Math.abs(e - t);
2489
- return D.value ? {
2495
+ return O.value ? {
2490
2496
  x: n,
2491
2497
  y: u,
2492
2498
  w: r,
@@ -2510,34 +2516,34 @@ var zt = {
2510
2516
  seriesIndex: l
2511
2517
  };
2512
2518
  }
2513
- let P = n(() => {
2514
- let e = [], t = S.value, n = t.length;
2519
+ let F = n(() => {
2520
+ let e = [], t = w.value, n = t.length;
2515
2521
  if (n === 0) return e;
2516
- let r = w.value, i = A.value, a = j.value, o = M.value, s = (i - a) / 2, c = ie.value;
2522
+ let r = T.value, i = j.value, a = M.value, o = N.value, s = (i - a) / 2, c = ae.value;
2517
2523
  for (let i = 0; i < r; i++) {
2518
- let r = re(i) + s;
2524
+ let r = ie(i) + s;
2519
2525
  if (f.layout === "stacked") {
2520
2526
  let o = 0, s = 0;
2521
2527
  for (let c = 0; c < n; c++) {
2522
2528
  let n = t[c], l = Number(n.data[i] ?? NaN);
2523
2529
  if (!isFinite(l)) continue;
2524
2530
  let u = l >= 0 ? o : s, d = u + l;
2525
- e.push(ae(N(u), N(d), r, a, n.color ?? I(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2531
+ e.push(oe(P(u), P(d), r, a, n.color ?? L(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
2526
2532
  }
2527
2533
  } else if (f.layout === "overlay") for (let o = 0; o < n; o++) {
2528
2534
  let n = t[o], s = Number(n.data[i] ?? NaN);
2529
- isFinite(s) && e.push(ae(c, N(s), r, a, n.color ?? I(o), n.opacity ?? 1, n.blendMode, s, i, o));
2535
+ isFinite(s) && e.push(oe(c, P(s), r, a, n.color ?? L(o), n.opacity ?? 1, n.blendMode, s, i, o));
2530
2536
  }
2531
2537
  else for (let a = 0; a < n; a++) {
2532
2538
  let s = t[a], l = Number(s.data[i] ?? NaN);
2533
2539
  if (!isFinite(l)) continue;
2534
2540
  let u = r + (n === 1 ? 0 : a * (o + f.groupGap));
2535
- e.push(ae(c, N(l), u, o, s.color ?? I(a), s.opacity ?? 1, s.blendMode, l, i, a));
2541
+ e.push(oe(c, P(l), u, o, s.color ?? L(a), s.opacity ?? 1, s.blendMode, l, i, a));
2536
2542
  }
2537
2543
  }
2538
2544
  return e;
2539
2545
  });
2540
- function oe(e) {
2546
+ function se(e) {
2541
2547
  let t = Infinity, n = -Infinity;
2542
2548
  for (let r of e.data) {
2543
2549
  let e = Number(r);
@@ -2548,9 +2554,9 @@ var zt = {
2548
2554
  max: n
2549
2555
  };
2550
2556
  }
2551
- function se(e, t, n) {
2552
- let r = (D.value ? H.value.left : H.value.top) + (e + .5) * A.value, i = n.max - n.min || 1, a = (t - n.min) / i;
2553
- return D.value ? {
2557
+ function ce(e, t, n) {
2558
+ let r = (O.value ? H.value.left : H.value.top) + (e + .5) * j.value, i = n.max - n.min || 1, a = (t - n.min) / i;
2559
+ return O.value ? {
2554
2560
  x: r,
2555
2561
  y: H.value.top + W.value - a * W.value
2556
2562
  } : {
@@ -2558,23 +2564,23 @@ var zt = {
2558
2564
  y: r
2559
2565
  };
2560
2566
  }
2561
- let ce = n(() => {
2567
+ let le = n(() => {
2562
2568
  let e = f.summaryLines;
2563
2569
  return !e || e.length === 0 ? [] : e.map((e, t) => ({
2564
- data: e.data ?? g,
2570
+ data: e.data ?? S,
2565
2571
  x: e.x,
2566
- color: e.color ?? ue(t),
2572
+ color: e.color ?? de(t),
2567
2573
  strokeWidth: e.strokeWidth ?? 2,
2568
2574
  dashed: e.dashed ?? !1,
2569
2575
  opacity: e.opacity ?? 1,
2570
2576
  blendMode: e.blendMode,
2571
2577
  dots: e.dots ?? !1,
2572
2578
  dotRadius: e.dotRadius ?? (e.strokeWidth ?? 2) + 1,
2573
- extent: oe(e),
2579
+ extent: se(e),
2574
2580
  legend: e.legend,
2575
2581
  showInLegend: e.showInLegend !== !1
2576
2582
  }));
2577
- }), F = n(() => A.value === 0 ? [] : ce.value.map((e) => {
2583
+ }), I = n(() => j.value === 0 ? [] : le.value.map((e) => {
2578
2584
  let t = [], n = "", r = !1;
2579
2585
  for (let i = 0; i < e.data.length; i++) {
2580
2586
  let a = Number(e.data[i]), o = e.x ? Number(e.x[i]) : i;
@@ -2582,7 +2588,7 @@ var zt = {
2582
2588
  r = !1;
2583
2589
  continue;
2584
2590
  }
2585
- let s = se(o, a, e.extent);
2591
+ let s = ce(o, a, e.extent);
2586
2592
  t.push(s), n += r ? `L${s.x},${s.y}` : `M${s.x},${s.y}`, r = !0;
2587
2593
  }
2588
2594
  return {
@@ -2590,16 +2596,16 @@ var zt = {
2590
2596
  pathD: n,
2591
2597
  points: t
2592
2598
  };
2593
- })), le = [
2599
+ })), ue = [
2594
2600
  "var(--color-fg-1, #111)",
2595
2601
  "var(--color-danger, #ef4444)",
2596
2602
  "var(--color-success, #10b981)",
2597
2603
  "var(--color-info, #6366f1)"
2598
2604
  ];
2599
- function ue(e) {
2600
- return le[e % le.length];
2605
+ function de(e) {
2606
+ return ue[e % ue.length];
2601
2607
  }
2602
- let de = [
2608
+ let fe = [
2603
2609
  "var(--color-primary, #3b82f6)",
2604
2610
  "var(--color-accent, #f59e0b)",
2605
2611
  "var(--color-success, #10b981)",
@@ -2607,36 +2613,36 @@ var zt = {
2607
2613
  "var(--color-info, #6366f1)",
2608
2614
  "var(--color-warning, #d97706)"
2609
2615
  ];
2610
- function I(e) {
2611
- return de[e % de.length];
2616
+ function L(e) {
2617
+ return fe[e % fe.length];
2612
2618
  }
2613
- let L = ct(() => f.tooltipValueFormat, () => f.valueTickFormat), z = n(() => {
2614
- let { min: e, max: t } = O.value, n = (e) => f.valueTickFormat === void 0 ? me(e) : te(e, f.valueTickFormat);
2619
+ let me = ut(() => f.tooltipValueFormat, () => f.valueTickFormat), he = n(() => {
2620
+ let { min: e, max: t } = k.value, n = (e) => f.valueTickFormat === void 0 ? B(e) : ne(e, f.valueTickFormat);
2615
2621
  if (e === t) return [{
2616
2622
  value: n(e),
2617
- pos: R(N(e))
2623
+ pos: R(P(e))
2618
2624
  }];
2619
- let r = D.value ? 50 : 80;
2620
- return (f.valueScaleType === "log" ? ve({
2625
+ let r = O.value ? 50 : 80;
2626
+ return (f.valueScaleType === "log" ? ye({
2621
2627
  min: e,
2622
2628
  max: t,
2623
2629
  ticks: f.valueTicks
2624
- }) : he({
2630
+ }) : ge({
2625
2631
  min: e,
2626
2632
  max: t,
2627
2633
  ticks: f.valueTicks,
2628
- targetTickCount: ne.value / r
2634
+ targetTickCount: re.value / r
2629
2635
  })).map((e) => ({
2630
2636
  value: n(e),
2631
- pos: R(N(e))
2637
+ pos: R(P(e))
2632
2638
  }));
2633
- }), B = n(() => {
2634
- let e = w.value, t = E.value;
2639
+ }), z = n(() => {
2640
+ let e = T.value, t = D.value;
2635
2641
  if (t && t.length > 0) {
2636
2642
  let e = Infinity, n = -Infinity;
2637
2643
  for (let r of t) Number.isFinite(r) && (r < e && (e = r), r > n && (n = r));
2638
2644
  if (!Number.isFinite(e) || e === n) return [];
2639
- let r = D.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = Mt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2645
+ let r = O.value ? U.value : W.value, i = Math.max(2, Math.floor(r / 80)), a = Nt(e, n, i, "utc"), o = a.unit, s = [], c = /* @__PURE__ */ new Set();
2640
2646
  for (let e of a.values) {
2641
2647
  let n = -1, r = Infinity;
2642
2648
  for (let i = 0; i < t.length; i++) {
@@ -2645,7 +2651,7 @@ var zt = {
2645
2651
  }
2646
2652
  if (n < 0 || c.has(n)) continue;
2647
2653
  c.add(n);
2648
- let i = re(n) + A.value / 2, a = f.categoryFormat ? f.categoryFormat(T.value[n], n) : Rt(t[n], f.dateFormat, "utc", o);
2654
+ let i = ie(n) + j.value / 2, a = f.categoryFormat ? f.categoryFormat(E.value[n], n) : zt(t[n], f.dateFormat, "utc", o);
2649
2655
  s.push({
2650
2656
  label: a,
2651
2657
  pos: i,
@@ -2655,10 +2661,10 @@ var zt = {
2655
2661
  return s;
2656
2662
  }
2657
2663
  let n = [], r = (e, t) => f.categoryFormat ? f.categoryFormat(e, t) : e, i = Array(e), a = 0;
2658
- for (let t = 0; t < e; t++) i[t] = r(T.value[t], t), i[t].length > a && (a = i[t].length);
2659
- let o = f.tickLabelStyle?.fontSize ?? 10, s = D.value ? a * o * .6 + 8 : o * 1.2 + 8, c = A.value > 0 ? Math.max(1, Math.ceil(s / A.value)) : 1;
2664
+ for (let t = 0; t < e; t++) i[t] = r(E.value[t], t), i[t].length > a && (a = i[t].length);
2665
+ let o = f.tickLabelStyle?.fontSize ?? 10, s = O.value ? a * o * .6 + 8 : o * 1.2 + 8, c = j.value > 0 ? Math.max(1, Math.ceil(s / j.value)) : 1;
2660
2666
  for (let t = 0; t < e; t += c) {
2661
- let e = re(t) + A.value / 2;
2667
+ let e = ie(t) + j.value / 2;
2662
2668
  n.push({
2663
2669
  label: i[t],
2664
2670
  pos: e,
@@ -2666,15 +2672,15 @@ var zt = {
2666
2672
  });
2667
2673
  }
2668
2674
  return n;
2669
- }), pe = n(() => {
2675
+ }), be = n(() => {
2670
2676
  let e = [];
2671
- return S.value.forEach((t, n) => {
2677
+ return w.value.forEach((t, n) => {
2672
2678
  !t.legend || t.showInLegend === !1 || e.push({
2673
2679
  label: t.legend,
2674
- color: t.color ?? I(n),
2680
+ color: t.color ?? L(n),
2675
2681
  kind: "bar"
2676
2682
  });
2677
- }), ce.value.forEach((t) => {
2683
+ }), le.value.forEach((t) => {
2678
2684
  !t.legend || !t.showInLegend || e.push({
2679
2685
  label: t.legend,
2680
2686
  color: t.color,
@@ -2682,21 +2688,21 @@ var zt = {
2682
2688
  dashed: t.dashed
2683
2689
  });
2684
2690
  }), e;
2685
- }), ye = n(() => pe.value.map((e) => e.label));
2686
- function be() {
2691
+ }), Se = n(() => be.value.map((e) => e.label));
2692
+ function Ce() {
2687
2693
  if (typeof f.csv == "function") return f.csv();
2688
2694
  if (typeof f.csv == "string") return f.csv;
2689
- let e = S.value.map((e) => ({
2695
+ let e = w.value.map((e) => ({
2690
2696
  label: e.legend,
2691
2697
  data: e.data
2692
2698
  }));
2693
- return Ve(T.value, e);
2699
+ return Ue(E.value, e);
2694
2700
  }
2695
- let Se = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2696
- function Ce(e, t) {
2697
- if (!isFinite(e) || !isFinite(t) || A.value === 0) return null;
2698
- let n = (D.value ? H.value.left : H.value.top) + (e + .5) * A.value, r = N(t);
2699
- return D.value ? {
2701
+ let we = n(() => !!f.tooltipData || !!f.tooltipTrigger);
2702
+ function Te(e, t) {
2703
+ if (!isFinite(e) || !isFinite(t) || j.value === 0) return null;
2704
+ let n = (O.value ? H.value.left : H.value.top) + (e + .5) * j.value, r = P(t);
2705
+ return O.value ? {
2700
2706
  x: n,
2701
2707
  y: r
2702
2708
  } : {
@@ -2704,16 +2710,16 @@ var zt = {
2704
2710
  y: n
2705
2711
  };
2706
2712
  }
2707
- function we(e, t) {
2708
- let n = De.value?.getBoundingClientRect();
2713
+ function Ee(e, t) {
2714
+ let n = ke.value?.getBoundingClientRect();
2709
2715
  if (!n) return null;
2710
- let r = w.value;
2711
- if (r === 0 || A.value === 0) return null;
2712
- let i = D.value ? e - n.left - H.value.left : t - n.top - H.value.top;
2713
- return Math.max(0, Math.min(r - 1, Math.floor(i / A.value)));
2716
+ let r = T.value;
2717
+ if (r === 0 || j.value === 0) return null;
2718
+ let i = O.value ? e - n.left - H.value.left : t - n.top - H.value.top;
2719
+ return Math.max(0, Math.min(r - 1, Math.floor(i / j.value)));
2714
2720
  }
2715
- let Te = n(() => !!(f.categoryHeader || f.valueHeader)), Ee = n(() => {
2716
- let e = Te.value ? $n : 0, t = f.chartPadding;
2721
+ let De = n(() => !!(f.categoryHeader || f.valueHeader)), Oe = n(() => {
2722
+ let e = De.value ? nr : 0, t = f.chartPadding;
2717
2723
  return e ? t == null ? { top: e } : typeof t == "number" ? {
2718
2724
  top: t + e,
2719
2725
  right: t,
@@ -2723,7 +2729,7 @@ var zt = {
2723
2729
  ...t,
2724
2730
  top: (t.top ?? 0) + e
2725
2731
  } : t;
2726
- }), { containerRef: De, svgRef: Oe, width: ke, height: Ae, padding: H, legendY: je, inlineLegendLayout: Me, innerW: U, innerH: W, bounds: Ne, hoverIndex: G, tooltipRef: K, tooltipPos: Pe, tooltipHandlers: q, menuItems: Fe, downloadLinkText: Ie, csvHref: Le, downloadButtonText: Re, triggerCsvDownload: ze, menuFilename: Be, isFullscreen: He, fullscreenStyle: Ue, teleportTarget: We, exitFullscreen: Ge } = st({
2732
+ }), { containerRef: ke, svgRef: Ae, width: je, height: Me, padding: H, legendY: Ne, inlineLegendLayout: Pe, innerW: U, innerH: W, bounds: Fe, hoverIndex: G, tooltipRef: K, tooltipPos: Ie, tooltipHandlers: Le, menuItems: Re, downloadLinkText: ze, csvHref: Be, downloadButtonText: Ve, triggerCsvDownload: He, menuFilename: We, isFullscreen: Ge, fullscreenStyle: Ke, teleportTarget: qe, exitFullscreen: Je } = lt({
2727
2733
  width: () => f.width,
2728
2734
  height: () => f.height,
2729
2735
  title: () => f.title,
@@ -2738,18 +2744,18 @@ var zt = {
2738
2744
  downloadLink: () => f.downloadLink,
2739
2745
  downloadButton: () => f.downloadButton,
2740
2746
  fullscreenTarget: () => f.fullscreenTarget,
2741
- chartPadding: () => Ee.value,
2742
- inlineLegendLabels: () => ye.value,
2743
- hasTooltipSlot: () => Se.value,
2744
- getCsv: be,
2745
- pointerToIndex: we,
2746
- scrubAxis: () => D.value ? "x" : "y",
2747
- onHover: (e) => h("hover", e)
2748
- }), Ke = n(() => xe(f.axisLabelStyle, { fontSize: 13 })), J = n(() => xe(f.tickLabelStyle, {
2747
+ chartPadding: () => Oe.value,
2748
+ inlineLegendLabels: () => Se.value,
2749
+ hasTooltipSlot: () => we.value,
2750
+ getCsv: Ce,
2751
+ pointerToIndex: Ee,
2752
+ scrubAxis: () => O.value ? "x" : "y",
2753
+ onHover: (e) => v("hover", e)
2754
+ }), Ye = n(() => V(f.axisLabelStyle, { fontSize: 13 })), q = n(() => V(f.tickLabelStyle, {
2749
2755
  fontSize: 10,
2750
- fillOpacity: V
2751
- })), qe = n(() => xe(f.legendStyle, { fontSize: 11 })), Y = n(() => f.categoryAlign === "start" && !D.value ? er : H.value.left), X = n(() => {
2752
- let e = f.titleStyle, t = e?.align ?? "left", n = Ne.value, r = t === "left" ? Y.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2756
+ fillOpacity: xe
2757
+ })), Xe = n(() => V(f.legendStyle, { fontSize: 11 })), J = n(() => f.categoryAlign === "start" && !O.value ? rr : H.value.left), Y = n(() => {
2758
+ let e = f.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? J.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2753
2759
  return {
2754
2760
  lines: (f.title ?? "").split("\n"),
2755
2761
  fontSize: e?.fontSize ?? 14,
@@ -2759,47 +2765,47 @@ var zt = {
2759
2765
  x: r,
2760
2766
  anchor: i
2761
2767
  };
2762
- }), Je = n(() => {
2768
+ }), Ze = n(() => {
2763
2769
  let e = G.value;
2764
2770
  if (e === null) return;
2765
- let t = E.value;
2766
- return t && Number.isFinite(t[e]) ? Rt(t[e], f.dateFormat, "utc") : T.value[e];
2767
- }), Z = n(() => {
2771
+ let t = D.value;
2772
+ return t && Number.isFinite(t[e]) ? zt(t[e], f.dateFormat, "utc") : E.value[e];
2773
+ }), X = n(() => {
2768
2774
  let e = G.value;
2769
2775
  if (e === null) return null;
2770
- let t = S.value, n = [];
2776
+ let t = w.value, n = [];
2771
2777
  for (let r = 0; r < t.length; r++) {
2772
2778
  let i = t[r];
2773
2779
  i.showInTooltip !== !1 && n.push({
2774
2780
  value: Number(i.data[e] ?? NaN),
2775
- color: i.color ?? I(r),
2781
+ color: i.color ?? L(r),
2776
2782
  seriesIndex: r
2777
2783
  });
2778
2784
  }
2779
2785
  return {
2780
2786
  index: e,
2781
- category: T.value[e] ?? String(e),
2787
+ category: E.value[e] ?? String(e),
2782
2788
  values: n,
2783
2789
  data: f.tooltipData?.[e] ?? null
2784
2790
  };
2785
- }), Q = n(() => {
2791
+ }), Z = n(() => {
2786
2792
  let e = G.value;
2787
2793
  if (e === null) return null;
2788
- let t = re(e);
2789
- return D.value ? {
2794
+ let t = ie(e);
2795
+ return O.value ? {
2790
2796
  x: t,
2791
2797
  y: H.value.top,
2792
- w: A.value,
2798
+ w: j.value,
2793
2799
  h: W.value
2794
2800
  } : {
2795
2801
  x: H.value.left,
2796
2802
  y: t,
2797
2803
  w: U.value,
2798
- h: A.value
2804
+ h: j.value
2799
2805
  };
2800
- }), Ye = n(() => {
2801
- let e = Me.value.positions, t = Y.value, n = je.value;
2802
- return pe.value.map((r, i) => {
2806
+ }), Qe = n(() => {
2807
+ let e = Pe.value.positions, t = J.value, n = Ne.value;
2808
+ return be.value.map((r, i) => {
2803
2809
  let a = e[i];
2804
2810
  return {
2805
2811
  ...r,
@@ -2807,7 +2813,7 @@ var zt = {
2807
2813
  y: n + a.row * 20
2808
2814
  };
2809
2815
  });
2810
- }), Xe = n(() => {
2816
+ }), $e = n(() => {
2811
2817
  let e = f.barLabels;
2812
2818
  if (!e) return null;
2813
2819
  let t = e === !0 ? {} : e;
@@ -2818,37 +2824,37 @@ var zt = {
2818
2824
  align: t.align ?? "center",
2819
2825
  overlap: t.overlap ?? "shift",
2820
2826
  minSize: t.minSize ?? 0,
2821
- fontSize: t.fontSize ?? tr,
2827
+ fontSize: t.fontSize ?? ir,
2822
2828
  fontWeight: t.fontWeight
2823
2829
  };
2824
2830
  });
2825
- function Ze(e, t) {
2826
- let n = Xe.value?.format;
2827
- return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? me(e) : te(e, f.valueTickFormat) : te(e, n);
2831
+ function et(e, t) {
2832
+ let n = $e.value?.format;
2833
+ return typeof n == "function" ? n(e, t) : n === void 0 ? f.valueTickFormat === void 0 ? B(e) : ne(e, f.valueTickFormat) : ne(e, n);
2828
2834
  }
2829
- function Qe(e, t, n) {
2830
- for (let r = P.value.length - 1; r >= 0; r--) {
2831
- let i = P.value[r];
2835
+ function tt(e, t, n) {
2836
+ for (let r = F.value.length - 1; r >= 0; r--) {
2837
+ let i = F.value[r];
2832
2838
  if (i.categoryIndex === e && t >= i.x && t <= i.x + i.w && n >= i.y && n <= i.y + i.h) return i.color;
2833
2839
  }
2834
2840
  return null;
2835
2841
  }
2836
- let $e = n(() => {
2837
- let e = Xe.value;
2842
+ let nt = n(() => {
2843
+ let e = $e.value;
2838
2844
  if (!e) return [];
2839
- let t = D.value, n = e.fontSize, r = [];
2840
- for (let i of P.value) {
2841
- let a = Ze(i.value, {
2845
+ let t = O.value, n = e.fontSize, r = [];
2846
+ for (let i of F.value) {
2847
+ let a = et(i.value, {
2842
2848
  value: i.value,
2843
2849
  categoryIndex: i.categoryIndex,
2844
2850
  seriesIndex: i.seriesIndex,
2845
- category: T.value[i.categoryIndex] ?? String(i.categoryIndex)
2851
+ category: E.value[i.categoryIndex] ?? String(i.categoryIndex)
2846
2852
  });
2847
2853
  if (!a) continue;
2848
- let o = t ? i.h : i.w, s = a.length * n * nr, c = o >= s + 2 * rr && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
2849
- if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + rr, d = u + g, p = "start";
2850
- else if (e.align === "start") u = h + rr, d = u + g, p = "start";
2851
- else if (e.align === "end") d = m - rr, u = d - g, p = "end";
2854
+ let o = t ? i.h : i.w, s = a.length * n * ar, c = o >= s + 2 * or && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
2855
+ if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + or, d = u + g, p = "start";
2856
+ else if (e.align === "start") u = h + or, d = u + g, p = "start";
2857
+ else if (e.align === "end") d = m - or, u = d - g, p = "end";
2852
2858
  else {
2853
2859
  let e = (m + h) / 2;
2854
2860
  u = e - g / 2, d = e + g / 2, p = "middle";
@@ -2865,7 +2871,7 @@ var zt = {
2865
2871
  hidden: !1
2866
2872
  });
2867
2873
  }
2868
- let i = t ? -H.value.top : ke.value - 2, a = /* @__PURE__ */ new Map();
2874
+ let i = t ? -H.value.top : je.value - 2, a = /* @__PURE__ */ new Map();
2869
2875
  for (let e of r) {
2870
2876
  let t = a.get(e.bar.categoryIndex);
2871
2877
  t ? t.push(e) : a.set(e.bar.categoryIndex, [e]);
@@ -2874,12 +2880,12 @@ var zt = {
2874
2880
  t.sort((e, t) => e.lo - t.lo);
2875
2881
  let n = -Infinity;
2876
2882
  for (let r of t) {
2877
- if (r.lo < n + ir) {
2883
+ if (r.lo < n + sr) {
2878
2884
  if (e.overlap === "hide") {
2879
2885
  r.hidden = !0;
2880
2886
  continue;
2881
2887
  }
2882
- let t = n + ir - r.lo;
2888
+ let t = n + sr - r.lo;
2883
2889
  r.lo += t, r.hi += t, r.inside = !1, r.svgAnchor = "start";
2884
2890
  }
2885
2891
  if (r.hi > i) {
@@ -2896,10 +2902,10 @@ var zt = {
2896
2902
  t ? (r = i.cross, a = -((i.lo + i.hi) / 2), c = "middle") : (c = i.svgAnchor, r = c === "start" ? i.lo : c === "end" ? i.hi : (i.lo + i.hi) / 2, a = i.cross);
2897
2903
  let l;
2898
2904
  if (!o) l = e.color;
2899
- else if (i.inside) l = mt(i.bar.color);
2905
+ else if (i.inside) l = gt(i.bar.color);
2900
2906
  else {
2901
- let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = Qe(i.bar.categoryIndex, e, n);
2902
- l = r ? mt(r) : "currentColor";
2907
+ let e = t ? i.cross : (i.lo + i.hi) / 2, n = t ? -((i.lo + i.hi) / 2) : i.cross, r = tt(i.bar.categoryIndex, e, n);
2908
+ l = r ? gt(r) : "currentColor";
2903
2909
  }
2904
2910
  s.push({
2905
2911
  key: `${i.bar.categoryIndex}-${i.bar.seriesIndex}`,
@@ -2913,23 +2919,23 @@ var zt = {
2913
2919
  });
2914
2920
  }
2915
2921
  return s;
2916
- }), et = n(() => {
2922
+ }), rt = n(() => {
2917
2923
  let e = H.value.left - 6;
2918
2924
  switch (f.categoryAlign ?? "end") {
2919
2925
  case "start": return {
2920
2926
  anchor: "start",
2921
- x: er
2927
+ x: rr
2922
2928
  };
2923
2929
  case "center": return {
2924
2930
  anchor: "middle",
2925
- x: (er + e) / 2
2931
+ x: (rr + e) / 2
2926
2932
  };
2927
2933
  default: return {
2928
2934
  anchor: "end",
2929
2935
  x: e
2930
2936
  };
2931
2937
  }
2932
- }), tt = n(() => {
2938
+ }), it = n(() => {
2933
2939
  let e = [], t = H.value.top - 7;
2934
2940
  if (f.valueHeader && e.push({
2935
2941
  key: "vh",
@@ -2938,7 +2944,7 @@ var zt = {
2938
2944
  y: t,
2939
2945
  anchor: "start"
2940
2946
  }), f.categoryHeader) {
2941
- let n = !D.value, r = et.value;
2947
+ let n = !O.value, r = rt.value;
2942
2948
  e.push({
2943
2949
  key: "ch",
2944
2950
  text: f.categoryHeader,
@@ -2950,63 +2956,65 @@ var zt = {
2950
2956
  return e;
2951
2957
  });
2952
2958
  return (n, l) => (_(), r(t, {
2953
- to: C(We),
2954
- disabled: !C(He)
2959
+ to: C(qe),
2960
+ disabled: !C(Ge)
2955
2961
  }, [o("div", d({
2956
2962
  ref_key: "containerRef",
2957
- ref: De
2963
+ ref: ke
2958
2964
  }, n.$attrs, {
2959
- class: ["bar-chart-wrapper", { "is-fullscreen": C(He) }],
2960
- style: C(Ue)
2965
+ class: ["bar-chart-wrapper", { "is-fullscreen": C(Ge) }],
2966
+ style: C(Ke),
2967
+ role: g.value || void 0,
2968
+ "aria-label": h.value || void 0
2961
2969
  }), [
2962
- c.menu ? (_(), r(fe, {
2970
+ c.menu ? (_(), r(pe, {
2963
2971
  key: 0,
2964
- items: C(Fe),
2965
- "is-fullscreen": C(He),
2966
- onClose: C(Ge)
2972
+ items: C(Re),
2973
+ "is-fullscreen": C(Ge),
2974
+ onClose: C(Je)
2967
2975
  }, null, 8, [
2968
2976
  "items",
2969
2977
  "is-fullscreen",
2970
2978
  "onClose"
2971
2979
  ])) : i("", !0),
2972
- o("div", En, x(C(He) ? "Chart expanded to fill window" : ""), 1),
2980
+ o("div", kn, x(C(Ge) ? "Chart expanded to fill window" : ""), 1),
2973
2981
  (_(), a("svg", {
2974
2982
  ref_key: "svgRef",
2975
- ref: Oe,
2976
- width: C(ke),
2977
- height: C(Ae)
2983
+ ref: Ae,
2984
+ width: C(je),
2985
+ height: C(Me)
2978
2986
  }, [
2979
2987
  c.title ? (_(), a("text", {
2980
2988
  key: 0,
2981
- x: X.value.x,
2982
- y: X.value.lineHeight,
2983
- "text-anchor": X.value.anchor,
2984
- "font-size": X.value.fontSize,
2985
- "font-weight": X.value.fontWeight,
2986
- fill: X.value.color
2987
- }, [(_(!0), a(e, null, y(X.value.lines, (e, t) => (_(), a("tspan", {
2989
+ x: Y.value.x,
2990
+ y: Y.value.lineHeight,
2991
+ "text-anchor": Y.value.anchor,
2992
+ "font-size": Y.value.fontSize,
2993
+ "font-weight": Y.value.fontWeight,
2994
+ fill: Y.value.color
2995
+ }, [(_(!0), a(e, null, y(Y.value.lines, (e, t) => (_(), a("tspan", {
2988
2996
  key: t,
2989
- x: X.value.x,
2990
- dy: t === 0 ? 0 : X.value.lineHeight
2991
- }, x(e), 9, kn))), 128))], 8, On)) : i("", !0),
2992
- (_(!0), a(e, null, y(tt.value, (e) => (_(), a("text", {
2997
+ x: Y.value.x,
2998
+ dy: t === 0 ? 0 : Y.value.lineHeight
2999
+ }, x(e), 9, Mn))), 128))], 8, jn)) : i("", !0),
3000
+ (_(!0), a(e, null, y(it.value, (e) => (_(), a("text", {
2993
3001
  key: e.key,
2994
3002
  "data-testid": e.key === "ch" ? "category-header" : "value-header",
2995
3003
  x: e.x,
2996
3004
  y: e.y,
2997
3005
  "text-anchor": e.anchor,
2998
- "font-size": Ke.value.fontSize,
2999
- fill: Ke.value.fill,
3006
+ "font-size": Ye.value.fontSize,
3007
+ fill: Ye.value.fill,
3000
3008
  "font-weight": "600"
3001
- }, x(e.text), 9, An))), 128)),
3002
- Ye.value.length > 0 ? (_(), a("g", jn, [(_(!0), a(e, null, y(Ye.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3009
+ }, x(e.text), 9, Nn))), 128)),
3010
+ Qe.value.length > 0 ? (_(), a("g", Pn, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3003
3011
  key: 0,
3004
3012
  x: t.x,
3005
3013
  y: t.y - 5,
3006
3014
  width: "12",
3007
3015
  height: "10",
3008
3016
  fill: t.color
3009
- }, null, 8, Mn)) : (_(), a("line", {
3017
+ }, null, 8, Fn)) : (_(), a("line", {
3010
3018
  key: 1,
3011
3019
  x1: t.x,
3012
3020
  y1: t.y,
@@ -3015,14 +3023,14 @@ var zt = {
3015
3023
  stroke: t.color,
3016
3024
  "stroke-width": "2",
3017
3025
  "stroke-dasharray": t.dashed ? "4 2" : void 0
3018
- }, null, 8, Nn)), o("text", {
3026
+ }, null, 8, In)), o("text", {
3019
3027
  x: t.x + 18,
3020
3028
  y: t.y + 4,
3021
- "font-size": qe.value.fontSize,
3022
- fill: qe.value.fill,
3023
- "font-weight": qe.value.fontWeight
3024
- }, x(t.label), 9, Pn)], 64))), 128))])) : i("", !0),
3025
- !D.value || c.valueAxis ? (_(), a("line", {
3029
+ "font-size": Xe.value.fontSize,
3030
+ fill: Xe.value.fill,
3031
+ "font-weight": Xe.value.fontWeight
3032
+ }, x(t.label), 9, Ln)], 64))), 128))])) : i("", !0),
3033
+ !O.value || c.valueAxis ? (_(), a("line", {
3026
3034
  key: 2,
3027
3035
  x1: C(R)(C(H).left),
3028
3036
  y1: C(R)(C(H).top),
@@ -3030,8 +3038,8 @@ var zt = {
3030
3038
  y2: C(R)(C(H).top + C(W)),
3031
3039
  stroke: "currentColor",
3032
3040
  "stroke-opacity": "0.3"
3033
- }, null, 8, Fn)) : i("", !0),
3034
- D.value || c.valueAxis ? (_(), a("line", {
3041
+ }, null, 8, Rn)) : i("", !0),
3042
+ O.value || c.valueAxis ? (_(), a("line", {
3035
3043
  key: 3,
3036
3044
  x1: C(R)(C(H).left),
3037
3045
  y1: C(R)(C(H).top + C(W)),
@@ -3039,90 +3047,90 @@ var zt = {
3039
3047
  y2: C(R)(C(H).top + C(W)),
3040
3048
  stroke: "currentColor",
3041
3049
  "stroke-opacity": "0.3"
3042
- }, null, 8, In)) : i("", !0),
3043
- c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(z.value, (e, t) => (_(), a("line", {
3050
+ }, null, 8, zn)) : i("", !0),
3051
+ c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(he.value, (e, t) => (_(), a("line", {
3044
3052
  key: "vg" + t,
3045
- x1: D.value ? C(H).left : e.pos,
3046
- y1: D.value ? e.pos : C(H).top,
3047
- x2: D.value ? C(H).left + C(U) : e.pos,
3048
- y2: D.value ? e.pos : C(H).top + C(W),
3053
+ x1: O.value ? C(H).left : e.pos,
3054
+ y1: O.value ? e.pos : C(H).top,
3055
+ x2: O.value ? C(H).left + C(U) : e.pos,
3056
+ y2: O.value ? e.pos : C(H).top + C(W),
3049
3057
  stroke: "currentColor",
3050
3058
  "stroke-opacity": "0.1"
3051
- }, null, 8, Ln))), 128)) : i("", !0),
3052
- Q.value && Se.value ? (_(), a("rect", {
3059
+ }, null, 8, Bn))), 128)) : i("", !0),
3060
+ Z.value && we.value ? (_(), a("rect", {
3053
3061
  key: 5,
3054
- x: Q.value.x,
3055
- y: Q.value.y,
3056
- width: Q.value.w,
3057
- height: Q.value.h,
3062
+ x: Z.value.x,
3063
+ y: Z.value.y,
3064
+ width: Z.value.w,
3065
+ height: Z.value.h,
3058
3066
  fill: "currentColor",
3059
3067
  "fill-opacity": "0.06",
3060
3068
  "pointer-events": "none"
3061
- }, null, 8, Rn)) : i("", !0),
3062
- c.valueAxis && D.value ? (_(!0), a(e, { key: 6 }, y(z.value, (e, t) => (_(), a("text", {
3069
+ }, null, 8, Vn)) : i("", !0),
3070
+ c.valueAxis && O.value ? (_(!0), a(e, { key: 6 }, y(he.value, (e, t) => (_(), a("text", {
3063
3071
  key: "vt" + t,
3064
3072
  "data-testid": "value-tick",
3065
3073
  x: C(H).left - 6,
3066
3074
  y: e.pos,
3067
3075
  "text-anchor": "end",
3068
3076
  "dominant-baseline": "middle",
3069
- "font-size": J.value.fontSize,
3070
- fill: J.value.fill,
3071
- "font-weight": J.value.fontWeight,
3072
- "fill-opacity": J.value.fillOpacity
3073
- }, x(e.value), 9, zn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(z.value, (e, t) => (_(), a("text", {
3077
+ "font-size": q.value.fontSize,
3078
+ fill: q.value.fill,
3079
+ "font-weight": q.value.fontWeight,
3080
+ "fill-opacity": q.value.fillOpacity
3081
+ }, x(e.value), 9, Hn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(he.value, (e, t) => (_(), a("text", {
3074
3082
  key: "vt" + t,
3075
3083
  "data-testid": "value-tick",
3076
3084
  x: e.pos,
3077
3085
  y: C(H).top + C(W) + 16,
3078
3086
  "text-anchor": "middle",
3079
- "font-size": J.value.fontSize,
3080
- fill: J.value.fill,
3081
- "font-weight": J.value.fontWeight,
3082
- "fill-opacity": J.value.fillOpacity
3083
- }, x(e.value), 9, Bn))), 128)) : i("", !0),
3087
+ "font-size": q.value.fontSize,
3088
+ fill: q.value.fill,
3089
+ "font-weight": q.value.fontWeight,
3090
+ "fill-opacity": q.value.fillOpacity
3091
+ }, x(e.value), 9, Un))), 128)) : i("", !0),
3084
3092
  c.yLabel ? (_(), a("text", {
3085
3093
  key: 8,
3086
3094
  x: 0,
3087
3095
  y: 0,
3088
3096
  transform: `translate(14, ${C(H).top + C(W) / 2}) rotate(-90)`,
3089
3097
  "text-anchor": "middle",
3090
- "font-size": Ke.value.fontSize,
3091
- fill: Ke.value.fill,
3092
- "font-weight": Ke.value.fontWeight
3093
- }, x(c.yLabel), 9, Vn)) : i("", !0),
3094
- D.value ? (_(!0), a(e, { key: 9 }, y(B.value, (e, t) => (_(), a("text", {
3098
+ "font-size": Ye.value.fontSize,
3099
+ fill: Ye.value.fill,
3100
+ "font-weight": Ye.value.fontWeight
3101
+ }, x(c.yLabel), 9, Wn)) : i("", !0),
3102
+ O.value ? (_(!0), a(e, { key: 9 }, y(z.value, (e, t) => (_(), a("text", {
3095
3103
  key: "ct" + t,
3096
3104
  "data-testid": "category-tick",
3097
3105
  x: e.pos,
3098
3106
  y: C(H).top + C(W) + 16,
3099
3107
  "text-anchor": e.anchor,
3100
- "font-size": J.value.fontSize,
3101
- fill: J.value.fill,
3102
- "font-weight": J.value.fontWeight,
3103
- "fill-opacity": J.value.fillOpacity
3104
- }, x(e.label), 9, Hn))), 128)) : (_(!0), a(e, { key: 10 }, y(B.value, (e, t) => (_(), a("text", {
3108
+ "font-size": q.value.fontSize,
3109
+ fill: q.value.fill,
3110
+ "font-weight": q.value.fontWeight,
3111
+ "fill-opacity": q.value.fillOpacity
3112
+ }, x(e.label), 9, Gn))), 128)) : (_(!0), a(e, { key: 10 }, y(z.value, (e, t) => (_(), a("text", {
3105
3113
  key: "ct" + t,
3106
3114
  "data-testid": "category-tick",
3107
- x: et.value.x,
3115
+ x: rt.value.x,
3108
3116
  y: e.pos,
3109
- "text-anchor": et.value.anchor,
3117
+ "text-anchor": rt.value.anchor,
3110
3118
  "dominant-baseline": "middle",
3111
- "font-size": J.value.fontSize,
3112
- fill: J.value.fill,
3113
- "font-weight": J.value.fontWeight,
3114
- "fill-opacity": J.value.fillOpacity
3115
- }, x(e.label), 9, Un))), 128)),
3119
+ "font-size": q.value.fontSize,
3120
+ fill: q.value.fill,
3121
+ "font-weight": q.value.fontWeight,
3122
+ "fill-opacity": q.value.fillOpacity
3123
+ }, x(e.label), 9, Kn))), 128)),
3116
3124
  c.xLabel ? (_(), a("text", {
3117
3125
  key: 11,
3118
3126
  x: C(H).left + C(U) / 2,
3119
- y: C(Ae) - 4,
3127
+ y: C(Me) - 4,
3120
3128
  "text-anchor": "middle",
3121
- "font-size": Ke.value.fontSize,
3122
- fill: Ke.value.fill,
3123
- "font-weight": Ke.value.fontWeight
3124
- }, x(c.xLabel), 9, Wn)) : i("", !0),
3125
- (_(!0), a(e, null, y(P.value, (e, t) => (_(), a("rect", {
3129
+ "font-size": Ye.value.fontSize,
3130
+ fill: Ye.value.fill,
3131
+ "font-weight": Ye.value.fontWeight
3132
+ }, x(c.xLabel), 9, qn)) : i("", !0),
3133
+ (_(!0), a(e, null, y(F.value, (e, t) => (_(), a("rect", {
3126
3134
  key: "bar" + t,
3127
3135
  "data-testid": "bar",
3128
3136
  "data-category": e.categoryIndex,
@@ -3134,8 +3142,8 @@ var zt = {
3134
3142
  fill: e.color,
3135
3143
  "fill-opacity": e.opacity,
3136
3144
  style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
3137
- }, null, 12, Gn))), 128)),
3138
- (_(!0), a(e, null, y($e.value, (e) => (_(), a("text", {
3145
+ }, null, 12, Jn))), 128)),
3146
+ (_(!0), a(e, null, y(nt.value, (e) => (_(), a("text", {
3139
3147
  key: "blbl" + e.key,
3140
3148
  "data-testid": "bar-label",
3141
3149
  x: e.x,
@@ -3146,8 +3154,8 @@ var zt = {
3146
3154
  "font-weight": e.fontWeight,
3147
3155
  fill: e.fill,
3148
3156
  "pointer-events": "none"
3149
- }, x(e.text), 9, Kn))), 128)),
3150
- (_(!0), a(e, null, y(F.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3157
+ }, x(e.text), 9, Yn))), 128)),
3158
+ (_(!0), a(e, null, y(I.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3151
3159
  key: 0,
3152
3160
  "data-testid": "summary-line",
3153
3161
  d: t.pathD,
@@ -3159,7 +3167,7 @@ var zt = {
3159
3167
  "stroke-linecap": "round",
3160
3168
  "stroke-linejoin": "round",
3161
3169
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3162
- }, null, 12, qn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3170
+ }, null, 12, Xn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3163
3171
  key: "sld" + n + "-" + r,
3164
3172
  cx: e.x,
3165
3173
  cy: e.y,
@@ -3167,24 +3175,24 @@ var zt = {
3167
3175
  fill: t.color,
3168
3176
  "fill-opacity": t.opacity,
3169
3177
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3170
- }, null, 12, Jn))), 128)) : i("", !0)], 64))), 128)),
3171
- Se.value ? (_(), a("rect", d({
3178
+ }, null, 12, Zn))), 128)) : i("", !0)], 64))), 128)),
3179
+ we.value ? (_(), a("rect", d({
3172
3180
  key: 12,
3173
3181
  x: C(H).left,
3174
3182
  y: C(H).top,
3175
3183
  width: C(U),
3176
3184
  height: C(W),
3177
3185
  fill: "transparent",
3178
- style: `cursor: crosshair; touch-action: ${D.value ? "pan-y" : "pan-x"}`
3179
- }, ee(C(q), !0)), null, 16, Yn)) : i("", !0),
3180
- c.annotations && c.annotations.length > 0 ? (_(), r(C(it), {
3186
+ style: `cursor: crosshair; touch-action: ${O.value ? "pan-y" : "pan-x"}`
3187
+ }, ee(C(Le), !0)), null, 16, Qn)) : i("", !0),
3188
+ c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
3181
3189
  key: 13,
3182
3190
  annotations: c.annotations,
3183
- project: Ce,
3184
- bounds: C(Ne)
3191
+ project: Te,
3192
+ bounds: C(Fe)
3185
3193
  }, null, 8, ["annotations", "bounds"])) : i("", !0)
3186
- ], 8, Dn)),
3187
- Se.value && C(G) !== null && Z.value ? (_(), a("div", {
3194
+ ], 8, An)),
3195
+ we.value && C(G) !== null && X.value ? (_(), a("div", {
3188
3196
  key: 1,
3189
3197
  ref_key: "tooltipRef",
3190
3198
  ref: K,
@@ -3194,31 +3202,31 @@ var zt = {
3194
3202
  top: "0",
3195
3203
  left: "0",
3196
3204
  willChange: "transform",
3197
- transform: C(Pe) ? `translate3d(${C(Pe).left}px, ${C(Pe).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3198
- visibility: C(Pe) ? "visible" : "hidden"
3205
+ transform: C(Ie) ? `translate3d(${C(Ie).left}px, ${C(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3206
+ visibility: C(Ie) ? "visible" : "hidden"
3199
3207
  })
3200
- }, [b(n.$slots, "tooltip", p(u(Z.value)), () => [o("div", Xn, [Je.value ? (_(), a("div", Zn, x(Je.value), 1)) : i("", !0), (_(!0), a(e, null, y(Z.value.values, (e) => (_(), a("div", {
3208
+ }, [b(n.$slots, "tooltip", p(u(X.value)), () => [o("div", $n, [Ze.value ? (_(), a("div", er, x(Ze.value), 1)) : i("", !0), (_(!0), a(e, null, y(X.value.values, (e) => (_(), a("div", {
3201
3209
  key: e.seriesIndex,
3202
3210
  class: "bar-chart-tooltip-row"
3203
3211
  }, [o("span", {
3204
3212
  class: "bar-chart-tooltip-swatch",
3205
3213
  style: m({ background: e.color })
3206
- }, null, 4), s(" " + x(isFinite(e.value) ? C(L)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3207
- C(Ie) ? (_(), a("a", {
3214
+ }, null, 4), s(" " + x(isFinite(e.value) ? C(me)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
3215
+ C(ze) ? (_(), a("a", {
3208
3216
  key: 2,
3209
3217
  class: "bar-chart-download-link",
3210
- href: C(Le),
3211
- download: `${C(Be)()}.csv`
3212
- }, x(C(Ie)), 9, Qn)) : i("", !0),
3213
- C(Re) ? (_(), a("button", {
3218
+ href: C(Be),
3219
+ download: `${C(We)()}.csv`
3220
+ }, x(C(ze)), 9, tr)) : i("", !0),
3221
+ C(Ve) ? (_(), a("button", {
3214
3222
  key: 3,
3215
3223
  type: "button",
3216
3224
  class: "bar-chart-download-button",
3217
- onClick: l[0] ||= (...e) => C(ze) && C(ze)(...e)
3218
- }, x(C(Re)), 1)) : i("", !0)
3219
- ], 16)], 8, ["to", "disabled"]));
3225
+ onClick: l[0] ||= (...e) => C(He) && C(He)(...e)
3226
+ }, x(C(Ve)), 1)) : i("", !0)
3227
+ ], 16, On)], 8, ["to", "disabled"]));
3220
3228
  }
3221
- }), [["__scopeId", "data-v-67594e38"]]), or = {
3229
+ }), [["__scopeId", "data-v-5f38ef02"]]), lr = {
3222
3230
  ref: "root",
3223
3231
  class: "chart-tooltip-content",
3224
3232
  style: {
@@ -3230,10 +3238,10 @@ var zt = {
3230
3238
  "pointer-events": "none",
3231
3239
  transform: "translateY(-50%)"
3232
3240
  }
3233
- }, sr = /* @__PURE__ */ l({
3241
+ }, ur = /* @__PURE__ */ l({
3234
3242
  __name: "ChoroplethTooltip",
3235
3243
  setup(e, { expose: n }) {
3236
- let a = v(null), s = T("root");
3244
+ let a = v(null), s = w("root");
3237
3245
  return n({
3238
3246
  setData(e) {
3239
3247
  a.value = e;
@@ -3241,21 +3249,21 @@ var zt = {
3241
3249
  getEl() {
3242
3250
  return s.value;
3243
3251
  }
3244
- }), (e, n) => (_(), r(t, { to: "body" }, [o("div", or, [a.value ? b(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3252
+ }), (e, n) => (_(), r(t, { to: "body" }, [o("div", lr, [a.value ? b(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3245
3253
  }
3246
- }), cr = {
3254
+ }), dr = ["role", "aria-label"], fr = {
3247
3255
  class: "chart-sr-only",
3248
3256
  "aria-live": "polite"
3249
- }, lr = {
3257
+ }, pr = {
3250
3258
  key: 1,
3251
3259
  class: "choropleth-header"
3252
- }, ur = {
3260
+ }, mr = {
3253
3261
  key: 0,
3254
3262
  class: "choropleth-legend-title"
3255
- }, dr = {
3263
+ }, hr = {
3256
3264
  key: 2,
3257
3265
  class: "choropleth-legend-continuous"
3258
- }, fr = { class: "choropleth-legend-ticks" }, pr = ["viewBox"], mr = ["innerHTML"], hr = "http://www.w3.org/2000/svg", gr = 10, _r = 600, vr = 450, yr = 1e3, br = /* @__PURE__ */ L(/* @__PURE__ */ l({
3266
+ }, gr = { class: "choropleth-legend-ticks" }, _r = ["viewBox"], vr = ["innerHTML"], yr = "http://www.w3.org/2000/svg", br = 10, xr = 600, Sr = 450, Cr = 1e3, wr = 12, Tr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3259
3267
  inheritAttrs: !1,
3260
3268
  __name: "ChoroplethMap",
3261
3269
  props: {
@@ -3263,11 +3271,14 @@ var zt = {
3263
3271
  data: {},
3264
3272
  geoType: { default: "states" },
3265
3273
  dataGeoType: {},
3274
+ state: {},
3266
3275
  width: {},
3267
3276
  height: {},
3268
3277
  colorScale: {},
3269
3278
  title: {},
3270
3279
  titleStyle: {},
3280
+ role: {},
3281
+ ariaLabel: {},
3271
3282
  legendStyle: {},
3272
3283
  noDataColor: { default: "#ddd" },
3273
3284
  strokeColor: { default: "#fff" },
@@ -3289,12 +3300,20 @@ var zt = {
3289
3300
  type: Boolean,
3290
3301
  default: !1
3291
3302
  },
3303
+ twoFingerPan: {
3304
+ type: Boolean,
3305
+ default: !1
3306
+ },
3292
3307
  tooltipTrigger: {},
3293
3308
  tooltipFormat: {},
3294
3309
  tooltipValueFormat: {},
3295
3310
  tooltipClamp: { default: "chart" },
3296
3311
  focus: {},
3297
3312
  focusZoomLevel: { default: 4 },
3313
+ focusZoom: {
3314
+ type: Boolean,
3315
+ default: !0
3316
+ },
3298
3317
  fullscreenTarget: {}
3299
3318
  },
3300
3319
  emits: [
@@ -3303,10 +3322,10 @@ var zt = {
3303
3322
  "update:focus"
3304
3323
  ],
3305
3324
  setup(c, { emit: l }) {
3306
- let f = c, ee = l, T = (e) => e, O = v(null), k = v(null), ne = v(null), A = v(null), j = v(null), M = v(null), re = w(), ie = n(() => !!f.tooltipTrigger || !!f.tooltipFormat || !!re.tooltip), N = n(() => {
3325
+ let f = c, ee = n(() => f.ariaLabel ?? f.title), w = n(() => f.role ?? (ee.value ? "figure" : void 0)), D = l, O = (e) => e, k = v(null), A = v(null), re = v(null), j = v(null), M = v(null), N = v(null), ie = te(), de = n(() => !!f.tooltipTrigger || !!f.tooltipFormat || !!ie.tooltip), fe = n(() => {
3307
3326
  let e = f.legendStyle, t = {};
3308
3327
  return e?.fontSize != null && (t["font-size"] = `${e.fontSize}px`), e?.fontWeight != null && (t["font-weight"] = String(e.fontWeight)), e?.color != null && (t.color = e.color), t;
3309
- }), de = n(() => {
3328
+ }), L = n(() => {
3310
3329
  let e = f.titleStyle, t = {
3311
3330
  "font-size": `${e?.fontSize ?? 14}px`,
3312
3331
  "line-height": `${e?.lineHeight ?? 18}px`,
@@ -3315,55 +3334,55 @@ var zt = {
3315
3334
  width: "100%"
3316
3335
  };
3317
3336
  return e?.color && (t.color = e.color), t;
3318
- }), I = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), R = null, z = null, B = /* @__PURE__ */ new Map(), pe = /* @__PURE__ */ new Map(), me = !1, he = typeof window < "u" && "ontouchstart" in window, ge = null, _e = {
3337
+ }), R = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map(), he = null, z = null, B = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), _e = !1, ve = typeof window < "u" && "ontouchstart" in window, ye = null, be = {
3319
3338
  width: 0,
3320
3339
  height: 0
3321
- }, ve = null, ye = !1, V = null, be = v(!1), xe = 0, Se = 0, Ce = 0, we = null;
3322
- function Te() {
3323
- let e = ne.value;
3324
- e && (e.addEventListener("touchstart", St, { passive: !0 }), e.addEventListener("touchend", Ct), e.addEventListener("touchcancel", wt, { passive: !0 }), !he && (e.addEventListener("click", yt), e.addEventListener("mouseover", yt), e.addEventListener("mousemove", bt), e.addEventListener("mouseout", xt)));
3340
+ }, xe = null, Se = !1, V = null, Ce = v(!1), we = 0, Te = 0, Ee = 0, De = null;
3341
+ function Oe() {
3342
+ let e = re.value;
3343
+ e && (e.addEventListener("touchstart", Ot, { passive: !0 }), e.addEventListener("touchend", kt), e.addEventListener("touchcancel", At, { passive: !0 }), !ve && (e.addEventListener("click", Tt), e.addEventListener("mouseover", Tt), e.addEventListener("mousemove", Et), e.addEventListener("mouseout", Dt)));
3325
3344
  }
3326
- function Ee() {
3327
- let e = ne.value;
3328
- e && (e.removeEventListener("touchstart", St), e.removeEventListener("touchend", Ct), e.removeEventListener("touchcancel", wt), e.removeEventListener("click", yt), e.removeEventListener("mouseover", yt), e.removeEventListener("mousemove", bt), e.removeEventListener("mouseout", xt));
3345
+ function ke() {
3346
+ let e = re.value;
3347
+ e && (e.removeEventListener("touchstart", Ot), e.removeEventListener("touchend", kt), e.removeEventListener("touchcancel", At), e.removeEventListener("click", Tt), e.removeEventListener("mouseover", Tt), e.removeEventListener("mousemove", Et), e.removeEventListener("mouseout", Dt));
3329
3348
  }
3330
- function De() {
3331
- gt();
3349
+ function Ae() {
3350
+ St();
3332
3351
  }
3333
3352
  h(() => {
3334
- Oe(), Te(), Et(), U(), st(), window.addEventListener("scroll", De, {
3353
+ Me(), Oe(), Mt(), W(), mt(), window.addEventListener("scroll", Ae, {
3335
3354
  passive: !0,
3336
3355
  capture: !0
3337
- }), window.addEventListener("resize", De, { passive: !0 });
3356
+ }), window.addEventListener("resize", Ae, { passive: !0 });
3338
3357
  }), g(() => {
3339
- ge?.disconnect(), Ce && cancelAnimationFrame(Ce), ke(), Ee(), window.removeEventListener("scroll", De, { capture: !0 }), window.removeEventListener("resize", De);
3358
+ ye?.disconnect(), Ee && cancelAnimationFrame(Ee), H(), ke(), window.removeEventListener("scroll", Ae, { capture: !0 }), window.removeEventListener("resize", Ae);
3340
3359
  });
3341
- function Oe() {
3342
- if (!k.value || !ne.value) return;
3343
- let e = ce(k.value), t = Math.max(12, f.focusZoomLevel);
3344
- V = oe().scaleExtent([1, t]).on("start", () => {
3345
- me = !0, gt();
3360
+ function Me() {
3361
+ if (!A.value || !re.value) return;
3362
+ let e = ce(A.value), t = Math.max(12, f.focusZoomLevel);
3363
+ V = F().scaleExtent([1, t]).on("start", () => {
3364
+ _e = !0, St();
3346
3365
  }).on("zoom", (e) => {
3347
- ne.value && ne.value.setAttribute("transform", e.transform);
3366
+ re.value && re.value.setAttribute("transform", e.transform);
3348
3367
  let t = e.transform;
3349
- be.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
3368
+ Ce.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
3350
3369
  }).on("end", () => {
3351
- me = !1;
3370
+ _e = !1;
3352
3371
  }), V.filter((e) => {
3353
- let t = Y.value.length > 0, n = !!f.zoom || t, r = !!f.pan || t;
3372
+ let t = Z.value.length > 0 && f.focusZoom !== !1, n = !!f.zoom || t, r = !!f.pan || t;
3354
3373
  if (e.type === "wheel" || e.type === "dblclick") {
3355
3374
  if (!n) return !1;
3356
3375
  } else if (e.type === "mousedown" || e.type === "touchstart") {
3357
- if (!r) return !1;
3376
+ if (!r || f.twoFingerPan && e.type === "touchstart" && e.touches.length < 2) return !1;
3358
3377
  } else if (!n && !r) return !1;
3359
3378
  return (!e.ctrlKey || e.type === "wheel") && !e.button;
3360
3379
  }), e.call(V);
3361
3380
  }
3362
- function ke() {
3363
- k.value && V && (ce(k.value).on(".zoom", null), V = null);
3381
+ function H() {
3382
+ A.value && V && (ce(A.value).on(".zoom", null), V = null);
3364
3383
  }
3365
- function H(e) {
3366
- let t = X.value, n = Ke.value, r = [];
3384
+ function Ne(e) {
3385
+ let t = Qe.value, n = Y.value, r = [];
3367
3386
  for (let i of e) {
3368
3387
  let e = i.geoType ?? f.geoType, a = t.get(e);
3369
3388
  if (!a) continue;
@@ -3381,133 +3400,176 @@ var zt = {
3381
3400
  }
3382
3401
  return r;
3383
3402
  }
3384
- function je(e) {
3403
+ function Pe(e) {
3385
3404
  let t = /* @__PURE__ */ new Set();
3386
- for (let n of H(e)) n.geoType === f.geoType && t.add(String(n.feature.id));
3405
+ for (let n of Ne(e)) n.geoType === f.geoType && t.add(String(n.feature.id));
3387
3406
  return t;
3388
3407
  }
3389
- let Me = !1;
3390
- function U() {
3391
- if (!k.value || !V) return;
3392
- let e = H(Y.value), t = e.filter((e) => e.geoType === f.geoType), n = e.filter((e) => e.geoType !== f.geoType), r = /* @__PURE__ */ new Map();
3408
+ let U = !1;
3409
+ function W() {
3410
+ if (!A.value || !V) return;
3411
+ let e = Ne(Z.value), t = e.filter((e) => e.geoType === f.geoType), n = e.filter((e) => e.geoType !== f.geoType), r = /* @__PURE__ */ new Map();
3393
3412
  for (let e of t) {
3394
- let t = I.get(String(e.feature.id));
3413
+ let t = R.get(String(e.feature.id));
3395
3414
  t && r.set(t, e.item.style ?? "solid");
3396
3415
  }
3397
- for (let [e] of B) r.has(e) || e === z || mt(e);
3398
- for (let [e, t] of r) B.get(e) === t && e !== z || e !== z && pt(e, t);
3416
+ for (let [e] of B) r.has(e) || e === z || bt(e);
3417
+ for (let [e, t] of r) B.get(e) === t && e !== z || e !== z && Q(e, t);
3399
3418
  B.clear();
3400
3419
  for (let [e, t] of r) B.set(e, t);
3401
- if (W(n), e.length === 0) {
3402
- Me = !0, gt();
3420
+ if (K(n), e.length === 0) {
3421
+ U = !0, St();
3403
3422
  return;
3404
3423
  }
3405
- let i = ce(k.value);
3424
+ if (f.focusZoom === !1) {
3425
+ U = !0;
3426
+ return;
3427
+ }
3428
+ let i = ce(A.value);
3406
3429
  i.interrupt();
3407
- let a = Me;
3408
- Me = !0;
3409
- let [[o, s], [c, l]] = We.value.bounds({
3430
+ let a = U;
3431
+ U = !0;
3432
+ let [[o, s], [c, l]] = Xe.value.bounds({
3410
3433
  type: "FeatureCollection",
3411
3434
  features: e.map((e) => e.feature)
3412
- }), u = (o + c) / 2, d = (s + l) / 2, p = f.focusZoomLevel, m = se.translate(q.value / 2 - p * u, Fe.value / 2 - p * d).scale(p), h = t[0]?.feature ?? null, g = () => {
3413
- if (!ie.value || !h) return;
3414
- let e = String(h.id), t = I.get(e);
3435
+ }), u = (o + c) / 2, d = (s + l) / 2, p = f.focusZoomLevel, m = se.translate(Re.value / 2 - p * u, ze.value / 2 - p * d).scale(p), h = t[0]?.feature ?? null, g = () => {
3436
+ if (!de.value || !h) return;
3437
+ let e = String(h.id), t = R.get(e);
3415
3438
  if (!t) return;
3416
3439
  let n = t.getBoundingClientRect();
3417
- lt(e, n.left + n.width / 2, n.top + n.height / 2);
3440
+ gt(e, n.left + n.width / 2, n.top + n.height / 2);
3418
3441
  };
3419
- a ? (dt(), i.transition().duration(vr).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
3442
+ a ? (vt(), i.transition().duration(Sr).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
3420
3443
  }
3421
- function W(e) {
3422
- let t = j.value;
3444
+ function K(e) {
3445
+ let t = M.value;
3423
3446
  if (!t) return;
3424
3447
  let n = new Set(e.map((e) => e.key));
3425
- for (let [e, t] of pe) n.has(e) || (t.remove(), pe.delete(e));
3426
- let r = We.value, i = Ge.value + 1.5;
3448
+ for (let [e, t] of ge) n.has(e) || (t.remove(), ge.delete(e));
3449
+ let r = Xe.value, i = J.value + 1.5;
3427
3450
  for (let { item: n, feature: a, key: o } of e) {
3428
- let e = pe.get(o);
3429
- e || (e = document.createElementNS(hr, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), pe.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), ft(e, n.style);
3451
+ let e = ge.get(o);
3452
+ e || (e = document.createElementNS(yr, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), ge.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), yt(e, n.style);
3430
3453
  }
3431
3454
  }
3432
- function Ne() {
3433
- if (!k.value || !V) return;
3434
- Y.value.length > 0 && ee("update:focus", null);
3435
- let e = ce(k.value);
3436
- e.interrupt(), dt(), e.transition().duration(vr).call(V.transform, se);
3455
+ function Ie() {
3456
+ if (!A.value || !V) return;
3457
+ Z.value.length > 0 && D("update:focus", null);
3458
+ let e = ce(A.value);
3459
+ e.interrupt(), vt(), e.transition().duration(Sr).call(V.transform, se);
3437
3460
  }
3438
- E(() => f.focusZoomLevel, () => {
3439
- V && V.scaleExtent([1, Math.max(12, f.focusZoomLevel)]), U();
3461
+ T(() => f.focusZoomLevel, () => {
3462
+ V && V.scaleExtent([1, Math.max(12, f.focusZoomLevel)]), W();
3463
+ }), T(() => f.state, () => {
3464
+ if (!A.value || !V) return;
3465
+ let e = ce(A.value);
3466
+ e.interrupt(), V.transform(e, se);
3440
3467
  });
3441
- let Pe = n(() => f.width && f.height ? f.height / f.width : .625), q = n(() => yr), Fe = n(() => yr * Pe.value), Ie = v(null), Le = null;
3442
- function ze() {
3443
- return Le ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (Ie.value = e, e)), Le;
3468
+ let Le = n(() => f.width && f.height ? f.height / f.width : .625), Re = n(() => Cr), ze = n(() => Cr * Le.value), Ve = n(() => {
3469
+ let e = S(f.topology), t = e?.objects?.states;
3470
+ if (!t) return [];
3471
+ let n = le(e, t);
3472
+ return n.type === "FeatureCollection" ? n.features : [n];
3473
+ }), He = n(() => {
3474
+ let e = f.state?.trim();
3475
+ if (!e) return null;
3476
+ if (/^\d{1,2}$/.test(e)) return e.padStart(2, "0");
3477
+ let t = Ve.value.find((t) => t.properties?.name === e);
3478
+ return t?.id == null ? null : String(t.id).padStart(2, "0");
3479
+ }), Ue = n(() => {
3480
+ let e = He.value;
3481
+ return e ? Ve.value.find((t) => String(t.id).padStart(2, "0") === e) ?? null : null;
3482
+ });
3483
+ T(() => [f.state, He.value], ([e, t]) => {
3484
+ e && e.trim() && !t && console.warn(`[ChoroplethMap] state="${e}" matched no state name or FIPS code; rendering the full map.`);
3485
+ }, { immediate: !0 });
3486
+ let We = v(null), Ge = null;
3487
+ function Ke() {
3488
+ return Ge ||= import("./hsaMapping-BahYDmea.js").then((e) => e.n).then((e) => (We.value = e, e)), Ge;
3444
3489
  }
3445
- E(() => {
3490
+ T(() => {
3446
3491
  if (f.geoType === "hsas" || f.dataGeoType === "hsas") return !0;
3447
3492
  let e = f.focus;
3448
3493
  return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
3449
3494
  }, (e) => {
3450
- e && ze();
3495
+ e && Ke();
3451
3496
  }, { immediate: !0 });
3452
- let Be = n(() => {
3453
- let e = Ie.value;
3497
+ let qe = n(() => {
3498
+ let e = We.value;
3454
3499
  if (!e) return {
3455
3500
  type: "FeatureCollection",
3456
3501
  features: []
3457
3502
  };
3458
- let { fipsToHsa: t, hsaNames: n } = e, r = S(f.topology), i = r.objects.counties.geometries, a = /* @__PURE__ */ new Map();
3503
+ let { fipsToHsa: t, hsaNames: n } = e, r = S(f.topology), i = r.objects.counties.geometries, a = He.value, o = /* @__PURE__ */ new Map();
3459
3504
  for (let e of i) {
3460
- let n = t[String(e.id).padStart(5, "0")];
3461
- n && (a.has(n) || a.set(n, []), a.get(n).push(e));
3505
+ let n = String(e.id).padStart(5, "0");
3506
+ if (a && n.slice(0, 2) !== a) continue;
3507
+ let r = t[n];
3508
+ r && (o.has(r) || o.set(r, []), o.get(r).push(e));
3462
3509
  }
3463
- let o = [];
3464
- for (let [e, t] of a) o.push({
3510
+ let s = [];
3511
+ for (let [e, t] of o) s.push({
3465
3512
  type: "Feature",
3466
3513
  id: e,
3467
3514
  properties: { name: n[e] ?? e },
3468
- geometry: le(r, t)
3515
+ geometry: I(r, t)
3469
3516
  });
3470
3517
  return {
3471
3518
  type: "FeatureCollection",
3472
- features: o
3519
+ features: s
3473
3520
  };
3474
- }), Ve = n(() => {
3475
- if (f.geoType === "hsas") return Be.value;
3521
+ }), Je = n(() => {
3522
+ if (f.geoType === "hsas") return qe.value;
3523
+ let e = He.value;
3476
3524
  if (f.geoType === "counties") {
3477
- let e = S(f.topology);
3478
- return F(e, e.objects.counties);
3525
+ let t = S(f.topology), n = le(t, t.objects.counties);
3526
+ return e ? {
3527
+ type: "FeatureCollection",
3528
+ features: n.features.filter((t) => String(t.id).padStart(5, "0").slice(0, 2) === e)
3529
+ } : n;
3479
3530
  }
3480
- let e = S(f.topology);
3481
- return F(e, e.objects.states);
3482
- }), He = n(() => {
3531
+ let t = S(f.topology), n = le(t, t.objects.states);
3532
+ return e ? {
3533
+ type: "FeatureCollection",
3534
+ features: n.features.filter((t) => String(t.id).padStart(2, "0") === e)
3535
+ } : n;
3536
+ }), Ye = n(() => {
3483
3537
  if (f.geoType !== "counties" && f.geoType !== "hsas") return null;
3538
+ if (He.value) return Ue.value;
3484
3539
  let e = S(f.topology);
3485
3540
  return ue(e, e.objects.states, (e, t) => e !== t);
3486
- }), Ue = n(() => ae().fitExtent([[0, 0], [q.value, Fe.value]], Ve.value)), We = n(() => P(Ue.value)), Ge = n(() => f.geoType === "counties" || f.geoType === "hsas" ? f.strokeWidth * .5 : f.strokeWidth), Ke = n(() => {
3541
+ }), q = n(() => {
3542
+ let e = Ue.value;
3543
+ if (He.value && e) {
3544
+ let t = [[wr, wr], [Re.value - wr, ze.value - wr]], n = ae().fitExtent(t, e), r = oe(n).centroid(e);
3545
+ return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : P().fitExtent(t, e);
3546
+ }
3547
+ return ae().fitExtent([[0, 0], [Re.value, ze.value]], Je.value);
3548
+ }), Xe = n(() => oe(q.value)), J = n(() => f.geoType === "counties" || f.geoType === "hsas" ? f.strokeWidth * .5 : f.strokeWidth), Y = n(() => {
3487
3549
  let e = /* @__PURE__ */ new Map();
3488
- for (let [t, n] of X.value) {
3550
+ for (let [t, n] of Qe.value) {
3489
3551
  let r = /* @__PURE__ */ new Map();
3490
3552
  for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
3491
3553
  e.set(t, r);
3492
3554
  }
3493
3555
  return e;
3494
3556
  });
3495
- function J(e) {
3557
+ function Ze(e) {
3496
3558
  let t = f.dataGeoType;
3497
3559
  if (!t || t === f.geoType) return e;
3498
- if (f.geoType === "counties" && t === "hsas") return Ie.value?.fipsToHsa[e];
3560
+ if (f.geoType === "counties" && t === "hsas") return We.value?.fipsToHsa[e];
3499
3561
  if (f.geoType === "counties" && t === "states" || f.geoType === "hsas" && t === "states") return e.slice(0, 2);
3500
3562
  }
3501
- let qe = n(() => {
3563
+ let X = n(() => {
3502
3564
  let e = /* @__PURE__ */ new Map();
3503
- for (let t of Ve.value.features) t.id != null && e.set(String(t.id), t);
3565
+ for (let t of Je.value.features) t.id != null && e.set(String(t.id), t);
3504
3566
  return e;
3505
- }), Y = n(() => {
3567
+ }), Z = n(() => {
3506
3568
  let e = f.focus;
3507
3569
  return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
3508
- }), X = n(() => {
3570
+ }), Qe = n(() => {
3509
3571
  let e = /* @__PURE__ */ new Map();
3510
- e.set(f.geoType, qe.value);
3572
+ e.set(f.geoType, X.value);
3511
3573
  let t = S(f.topology), n = t?.objects;
3512
3574
  if (!n) return e;
3513
3575
  let r = (e) => {
@@ -3516,25 +3578,25 @@ var zt = {
3516
3578
  return t;
3517
3579
  };
3518
3580
  if (!e.has("states") && n.states) {
3519
- let i = F(t, n.states);
3581
+ let i = le(t, n.states);
3520
3582
  e.set("states", r(i.features));
3521
3583
  }
3522
3584
  if (!e.has("counties") && n.counties) {
3523
- let i = F(t, n.counties);
3585
+ let i = le(t, n.counties);
3524
3586
  e.set("counties", r(i.features));
3525
3587
  }
3526
- return !e.has("hsas") && n.counties && e.set("hsas", r(Be.value.features)), e;
3527
- }), Je = n(() => {
3588
+ return !e.has("hsas") && n.counties && e.set("hsas", r(qe.value.features)), e;
3589
+ }), $e = n(() => {
3528
3590
  let e = /* @__PURE__ */ new Map();
3529
3591
  if (!f.data) return e;
3530
- let t = f.dataGeoType ?? f.geoType, n = Ke.value.get(t);
3592
+ let t = f.dataGeoType ?? f.geoType, n = Y.value.get(t);
3531
3593
  for (let t of f.data) {
3532
3594
  e.set(t.id, t.value);
3533
3595
  let r = n?.get(t.id);
3534
3596
  r && e.set(r, t.value);
3535
3597
  }
3536
3598
  return e;
3537
- }), Z = n(() => {
3599
+ }), et = n(() => {
3538
3600
  if (!f.data || f.data.length === 0) return {
3539
3601
  min: 0,
3540
3602
  max: 1
@@ -3551,8 +3613,8 @@ var zt = {
3551
3613
  min: 0,
3552
3614
  max: 1
3553
3615
  };
3554
- }), Q = n(() => Array.isArray(f.colorScale) && f.colorScale.length > 0 && "value" in f.colorScale[0]), Ye = n(() => Array.isArray(f.colorScale) && !Q.value), Xe = n(() => Ye.value ? "" : f.colorScale?.min ?? "#e5f0fa"), Ze = n(() => Ye.value ? "" : f.colorScale?.max ?? "#08519c");
3555
- function Qe(e) {
3616
+ }), tt = n(() => Array.isArray(f.colorScale) && f.colorScale.length > 0 && "value" in f.colorScale[0]), nt = n(() => Array.isArray(f.colorScale) && !tt.value), rt = n(() => nt.value ? "" : f.colorScale?.min ?? "#e5f0fa"), it = n(() => nt.value ? "" : f.colorScale?.max ?? "#08519c");
3617
+ function at(e) {
3556
3618
  let t = e.replace("#", "");
3557
3619
  return [
3558
3620
  parseInt(t.slice(0, 2), 16),
@@ -3560,349 +3622,356 @@ var zt = {
3560
3622
  parseInt(t.slice(4, 6), 16)
3561
3623
  ];
3562
3624
  }
3563
- function $e(e) {
3564
- let [t, n, r] = Qe(Xe.value), [i, a, o] = Qe(Ze.value);
3625
+ function ot(e) {
3626
+ let [t, n, r] = at(rt.value), [i, a, o] = at(it.value);
3565
3627
  return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
3566
3628
  }
3567
- let et = n(() => Ye.value ? f.colorScale.slice().sort((e, t) => t.min - e.min) : null), tt = n(() => {
3568
- if (!Q.value) return null;
3629
+ let st = n(() => nt.value ? f.colorScale.slice().sort((e, t) => t.min - e.min) : null), ct = n(() => {
3630
+ if (!tt.value) return null;
3569
3631
  let e = /* @__PURE__ */ new Map();
3570
3632
  for (let t of f.colorScale) e.set(t.value, t.color);
3571
3633
  return e;
3572
3634
  });
3573
- function nt(e) {
3574
- let t = J(e);
3575
- return t == null ? void 0 : Je.value.get(t);
3635
+ function lt(e) {
3636
+ let t = Ze(e);
3637
+ return t == null ? void 0 : $e.value.get(t);
3576
3638
  }
3577
- function rt(e) {
3578
- let t = nt(e), n = f.noDataColor;
3639
+ function ut(e) {
3640
+ let t = lt(e), n = f.noDataColor;
3579
3641
  if (t == null) return n;
3580
- let r = tt.value;
3642
+ let r = ct.value;
3581
3643
  if (r) return r.get(String(t)) ?? n;
3582
- let i = et.value;
3644
+ let i = st.value;
3583
3645
  if (i) {
3584
3646
  let e = t;
3585
3647
  for (let t of i) if (e >= t.min) return t.color;
3586
3648
  return n;
3587
3649
  }
3588
- let { min: a, max: o } = Z.value;
3589
- return $e((t - a) / (o - a));
3650
+ let { min: a, max: o } = et.value;
3651
+ return ot((t - a) / (o - a));
3590
3652
  }
3591
- let it = (e) => e.properties?.name ?? String(e.id);
3592
- function at(e) {
3593
- return e == null ? "" : typeof e == "number" && f.tooltipValueFormat !== void 0 ? te(e, f.tooltipValueFormat) : String(e);
3653
+ let dt = (e) => e.properties?.name ?? String(e.id);
3654
+ function ft(e) {
3655
+ return e == null ? "" : typeof e == "number" && f.tooltipValueFormat !== void 0 ? ne(e, f.tooltipValueFormat) : String(e);
3594
3656
  }
3595
- function ot(e, t) {
3596
- return t == null ? e : `${e}: ${at(t)}`;
3657
+ function pt(e, t) {
3658
+ return t == null ? e : `${e}: ${ft(t)}`;
3597
3659
  }
3598
- function st() {
3599
- let e = M.value?.getEl();
3660
+ function mt() {
3661
+ let e = N.value?.getEl();
3600
3662
  if (!e) return;
3601
- ge?.disconnect();
3663
+ ye?.disconnect();
3602
3664
  let t = !1;
3603
- ge = new ResizeObserver((e) => {
3665
+ ye = new ResizeObserver((e) => {
3604
3666
  let n = e[0]?.contentRect;
3605
- n && (_e.width = n.width, _e.height = n.height, !t && ye && ve ? (t = !0, ct(ve.x, ve.y)) : t = !0);
3606
- }), ge.observe(e);
3667
+ n && (be.width = n.width, be.height = n.height, !t && Se && xe ? (t = !0, ht(xe.x, xe.y)) : t = !0);
3668
+ }), ye.observe(e);
3607
3669
  }
3608
- function ct(e, t) {
3609
- let n = M.value?.getEl();
3670
+ function ht(e, t) {
3671
+ let n = N.value?.getEl();
3610
3672
  if (!n) return;
3611
- let r = O.value?.getBoundingClientRect(), { left: i, top: a } = Ae(e, t, _e.width, _e.height, f.tooltipClamp, r);
3673
+ let r = k.value?.getBoundingClientRect(), { left: i, top: a } = je(e, t, be.width, be.height, f.tooltipClamp, r);
3612
3674
  n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
3613
3675
  }
3614
- function lt(e, t, n) {
3615
- let r = L.get(e);
3676
+ function gt(e, t, n) {
3677
+ let r = me.get(e);
3616
3678
  if (!r) return;
3617
- let i = M.value, a = i?.getEl();
3618
- !i || !a || (i.setData(r), ve = {
3679
+ let i = N.value, a = i?.getEl();
3680
+ !i || !a || (i.setData(r), xe = {
3619
3681
  x: t,
3620
3682
  y: n
3621
- }, ye = !0, ct(t, n), a.style.visibility = "visible");
3683
+ }, Se = !0, ht(t, n), a.style.visibility = "visible");
3622
3684
  }
3623
- function ut(e, t) {
3624
- ye && (xe = e, Se = t, !Ce && (Ce = requestAnimationFrame(() => {
3625
- Ce = 0;
3626
- let e = M.value?.getEl();
3627
- !e || !ye || (ve = {
3628
- x: xe,
3629
- y: Se
3630
- }, e.style.transform = `translate3d(${xe + 16}px, ${Se}px, 0) translateY(-50%)`);
3685
+ function _t(e, t) {
3686
+ Se && (we = e, Te = t, !Ee && (Ee = requestAnimationFrame(() => {
3687
+ Ee = 0;
3688
+ let e = N.value?.getEl();
3689
+ !e || !Se || (xe = {
3690
+ x: we,
3691
+ y: Te
3692
+ }, e.style.transform = `translate3d(${we + 16}px, ${Te}px, 0) translateY(-50%)`);
3631
3693
  })));
3632
3694
  }
3633
- function dt() {
3634
- if (!ye) return;
3635
- ye = !1, ve = null;
3636
- let e = M.value?.getEl();
3695
+ function vt() {
3696
+ if (!Se) return;
3697
+ Se = !1, xe = null;
3698
+ let e = N.value?.getEl();
3637
3699
  e && (e.style.visibility = "hidden");
3638
3700
  }
3639
- function ft(e, t) {
3701
+ function yt(e, t) {
3640
3702
  t === "dashed" ? (e.setAttribute("stroke-dasharray", "8 4"), e.removeAttribute("stroke-linecap")) : t === "dotted" ? (e.setAttribute("stroke-dasharray", "0 5"), e.setAttribute("stroke-linecap", "round")) : (e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap"));
3641
3703
  }
3642
- function pt(e, t = "solid") {
3643
- e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(Ge.value + 1)), e.setAttribute("stroke", "#555"), ft(e, t);
3704
+ function Q(e, t = "solid") {
3705
+ e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(J.value + 1)), e.setAttribute("stroke", "#555"), yt(e, t);
3644
3706
  }
3645
- function mt(e) {
3646
- e.setAttribute("stroke-width", String(Ge.value)), e.setAttribute("stroke", f.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
3707
+ function bt(e) {
3708
+ e.setAttribute("stroke-width", String(J.value)), e.setAttribute("stroke", f.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
3647
3709
  }
3648
- function ht(e) {
3649
- z !== e && (z && !B.has(z) && mt(z), z = e, pt(e, B.get(e) ?? "solid"));
3710
+ function xt(e) {
3711
+ z !== e && (z && !B.has(z) && bt(z), z = e, Q(e, B.get(e) ?? "solid"));
3650
3712
  }
3651
- function gt() {
3713
+ function St() {
3652
3714
  if (z) {
3653
3715
  let e = B.get(z);
3654
- e == null ? mt(z) : pt(z, e), z = null, ee("stateHover", null);
3716
+ e == null ? bt(z) : Q(z, e), z = null, D("stateHover", null);
3655
3717
  }
3656
- dt();
3718
+ vt();
3657
3719
  }
3658
- function _t(e) {
3720
+ function Ct(e) {
3659
3721
  let t = e;
3660
3722
  for (; t && !t.dataset?.featId;) t = t.parentElement;
3661
3723
  return t ? t.dataset.featId ?? null : null;
3662
3724
  }
3663
- function vt(e) {
3664
- ee("stateClick", {
3725
+ function wt(e) {
3726
+ D("stateClick", {
3665
3727
  id: e.id,
3666
3728
  name: e.name,
3667
3729
  value: e.value
3668
- }), ee("update:focus", je(Y.value).has(e.id) ? null : e.id);
3730
+ }), D("update:focus", Pe(Z.value).has(e.id) ? null : e.id);
3669
3731
  }
3670
- function yt(e) {
3671
- if (me) return;
3672
- let t = e, n = _t(t.target);
3732
+ function Tt(e) {
3733
+ if (_e) return;
3734
+ let t = e, n = Ct(t.target);
3673
3735
  if (!n) return;
3674
- let r = L.get(n);
3736
+ let r = me.get(n);
3675
3737
  if (!r) return;
3676
3738
  let i = {
3677
3739
  id: r.id,
3678
3740
  name: r.name,
3679
3741
  value: r.value
3680
3742
  };
3681
- e.type === "click" ? vt(r) : e.type === "mouseover" && (ht(I.get(n)), ie.value && lt(n, t.clientX, t.clientY), ee("stateHover", i));
3743
+ e.type === "click" ? wt(r) : e.type === "mouseover" && (xt(R.get(n)), de.value && gt(n, t.clientX, t.clientY), D("stateHover", i));
3682
3744
  }
3683
- function bt(e) {
3684
- me || ut(e.clientX, e.clientY);
3745
+ function Et(e) {
3746
+ _e || _t(e.clientX, e.clientY);
3685
3747
  }
3686
- function xt(e) {
3748
+ function Dt(e) {
3687
3749
  let t = e.relatedTarget;
3688
- t && ne.value?.contains(t) || gt();
3750
+ t && re.value?.contains(t) || St();
3689
3751
  }
3690
- function St(e) {
3752
+ function Ot(e) {
3691
3753
  if (e.touches.length !== 1) {
3692
- we = null;
3754
+ De = null;
3693
3755
  return;
3694
3756
  }
3695
3757
  let t = e.touches[0];
3696
- we = {
3758
+ De = {
3697
3759
  x: t.clientX,
3698
3760
  y: t.clientY,
3699
3761
  time: e.timeStamp,
3700
- featId: _t(e.target)
3762
+ featId: Ct(e.target)
3701
3763
  };
3702
3764
  }
3703
- function Ct(e) {
3704
- let t = we;
3705
- if (we = null, !t || !t.featId || e.touches.length > 0) return;
3765
+ function kt(e) {
3766
+ let t = De;
3767
+ if (De = null, !t || !t.featId || e.touches.length > 0) return;
3706
3768
  let n = e.changedTouches[0];
3707
- if (!n || Math.abs(n.clientX - t.x) > gr || Math.abs(n.clientY - t.y) > gr || e.timeStamp - t.time > _r) return;
3708
- let r = L.get(t.featId);
3709
- r && (e.preventDefault(), vt(r));
3769
+ if (!n || Math.abs(n.clientX - t.x) > br || Math.abs(n.clientY - t.y) > br || e.timeStamp - t.time > xr) return;
3770
+ let r = me.get(t.featId);
3771
+ r && (e.preventDefault(), wt(r));
3710
3772
  }
3711
- function wt() {
3712
- we = null;
3773
+ function At() {
3774
+ De = null;
3713
3775
  }
3714
- function Tt(e) {
3715
- let t = document.createElementNS(hr, "path");
3776
+ function jt(e) {
3777
+ let t = document.createElementNS(yr, "path");
3716
3778
  return e && t.setAttribute("d", e), t;
3717
3779
  }
3718
- function Et() {
3719
- let e = A.value, t = j.value;
3780
+ function Mt() {
3781
+ let e = j.value, t = M.value;
3720
3782
  if (!e || !t) return;
3721
3783
  for (; e.firstChild;) e.removeChild(e.firstChild);
3722
3784
  for (; t.firstChild;) t.removeChild(t.firstChild);
3723
- I.clear(), L.clear(), R = null, z = null, B.clear(), pe.clear();
3724
- let n = We.value, r = Ve.value.features, i = f.strokeColor, a = String(Ge.value), o = !ie.value, s = document.createDocumentFragment();
3785
+ R.clear(), me.clear(), he = null, z = null, B.clear(), ge.clear();
3786
+ let n = Xe.value, r = Je.value.features, i = f.strokeColor, a = String(J.value), o = !de.value, s = document.createDocumentFragment();
3725
3787
  for (let e of r) {
3726
- let t = String(e.id), r = it(e), c = nt(t), l = Tt(n(e));
3727
- if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill", rt(t)), l.setAttribute("stroke", i), l.setAttribute("stroke-width", a), l.setAttribute("vector-effect", "non-scaling-stroke"), o) {
3728
- let e = document.createElementNS(hr, "title");
3729
- e.textContent = ot(r, c), l.appendChild(e);
3788
+ let t = String(e.id), r = dt(e), c = lt(t), l = jt(n(e));
3789
+ if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill", ut(t)), l.setAttribute("stroke", i), l.setAttribute("stroke-width", a), l.setAttribute("vector-effect", "non-scaling-stroke"), o) {
3790
+ let e = document.createElementNS(yr, "title");
3791
+ e.textContent = pt(r, c), l.appendChild(e);
3730
3792
  }
3731
- s.appendChild(l), I.set(t, l), L.set(t, {
3793
+ s.appendChild(l), R.set(t, l), me.set(t, {
3732
3794
  id: t,
3733
3795
  name: r,
3734
3796
  value: c,
3735
3797
  feature: e
3736
3798
  });
3737
3799
  }
3738
- let c = He.value;
3800
+ let c = Ye.value;
3739
3801
  if (c) {
3740
- let e = Tt(n(c));
3741
- e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), s.appendChild(e), R = e;
3802
+ let e = jt(n(c));
3803
+ e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), s.appendChild(e), he = e;
3742
3804
  }
3743
3805
  e.appendChild(s);
3744
3806
  }
3745
- function Dt() {
3746
- let e = !ie.value;
3747
- for (let [t, n] of I) {
3748
- let r = nt(t), i = L.get(t);
3749
- if (n.setAttribute("fill", rt(t)), i && (i.value = r), e && i) {
3807
+ function Nt() {
3808
+ let e = !de.value;
3809
+ for (let [t, n] of R) {
3810
+ let r = lt(t), i = me.get(t);
3811
+ if (n.setAttribute("fill", ut(t)), i && (i.value = r), e && i) {
3750
3812
  let e = n.firstElementChild;
3751
- e && (e.textContent = ot(i.name, r));
3813
+ e && (e.textContent = pt(i.name, r));
3752
3814
  }
3753
3815
  }
3754
3816
  }
3755
- function Ot() {
3756
- for (let e of I.values()) e === z || B.has(e) || mt(e);
3757
- R && R.setAttribute("stroke", f.strokeColor);
3817
+ function Pt() {
3818
+ for (let e of R.values()) e === z || B.has(e) || bt(e);
3819
+ he && he.setAttribute("stroke", f.strokeColor);
3758
3820
  }
3759
- function kt() {
3821
+ function Ft() {
3760
3822
  return typeof f.menu == "string" ? f.menu : "choropleth";
3761
3823
  }
3762
- let At = n(() => f.legend && (Q.value || Ye.value || f.data)), jt = n(() => f.colorScale.slice().sort((e, t) => e.min - t.min)), Mt = n(() => {
3824
+ let $ = n(() => f.legend && (tt.value || nt.value || f.data)), It = n(() => f.colorScale.slice().sort((e, t) => e.min - t.min)), Lt = n(() => {
3763
3825
  let e = [];
3764
3826
  for (let t = 0; t <= 10; t++) {
3765
3827
  let n = t / 10;
3766
3828
  e.push({
3767
3829
  offset: `${(n * 100).toFixed(0)}%`,
3768
- color: $e(n)
3830
+ color: ot(n)
3769
3831
  });
3770
3832
  }
3771
3833
  return e;
3772
- }), Nt = new Intl.NumberFormat("en-US", {
3834
+ }), Rt = new Intl.NumberFormat("en-US", {
3773
3835
  notation: "compact",
3774
3836
  maximumFractionDigits: 1
3775
- }), Pt = n(() => {
3776
- let { min: e, max: t } = Z.value, n = t - e, r = [];
3837
+ }), zt = n(() => {
3838
+ let { min: e, max: t } = et.value, n = t - e, r = [];
3777
3839
  for (let t = 1; t <= 3; t++) {
3778
- let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? Nt.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
3840
+ let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? Rt.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
3779
3841
  r.push({
3780
3842
  value: o,
3781
3843
  pct: i * 100
3782
3844
  });
3783
3845
  }
3784
3846
  return r;
3785
- }), $ = n(() => {
3847
+ }), Bt = n(() => {
3786
3848
  let e = [];
3787
- if (Q.value) for (let t of f.colorScale) e.push({
3849
+ if (tt.value) for (let t of f.colorScale) e.push({
3788
3850
  key: t.value,
3789
3851
  color: t.color,
3790
3852
  label: t.value
3791
3853
  });
3792
- else if (Ye.value) for (let t of jt.value) e.push({
3854
+ else if (nt.value) for (let t of It.value) e.push({
3793
3855
  key: String(t.min),
3794
3856
  color: t.color,
3795
3857
  label: t.label ?? String(t.min)
3796
3858
  });
3797
3859
  return e;
3798
- }), Ft = n(() => `linear-gradient(to right, ${Mt.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), It = Re({ target: () => f.fullscreenTarget }), Lt = n(() => {
3799
- let e = kt();
3860
+ }), Vt = n(() => `linear-gradient(to right, ${Lt.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), Ht = Be({ target: () => f.fullscreenTarget }), Ut = n(() => {
3861
+ let e = Ft();
3800
3862
  return [
3801
- It.menuItem.value,
3863
+ Ht.menuItem.value,
3802
3864
  {
3803
3865
  label: "Save as SVG",
3804
3866
  action: () => {
3805
- k.value && G(k.value, e);
3867
+ A.value && Fe(A.value, e);
3806
3868
  }
3807
3869
  },
3808
3870
  {
3809
3871
  label: "Save as PNG",
3810
3872
  action: () => {
3811
- k.value && K(k.value, e);
3873
+ A.value && G(A.value, e);
3812
3874
  }
3813
3875
  }
3814
3876
  ];
3815
3877
  });
3816
- return E(() => [We.value, ie.value], () => Et()), E(() => [
3878
+ return T(() => [
3817
3879
  Je.value,
3880
+ Xe.value,
3881
+ de.value
3882
+ ], () => Mt()), T(() => [
3883
+ $e.value,
3818
3884
  f.colorScale,
3819
3885
  f.noDataColor,
3820
3886
  f.dataGeoType
3821
- ], () => Dt()), E(() => [f.strokeColor, Ge.value], () => Ot()), E(() => [
3822
- Y.value,
3823
- We.value,
3824
- Ie.value
3825
- ], () => U(), { flush: "post" }), (n, l) => (_(), r(t, {
3826
- to: C(It).teleportTarget.value,
3827
- disabled: !C(It).isFullscreen.value
3887
+ ], () => Nt()), T(() => [f.strokeColor, J.value], () => Pt()), T(() => [
3888
+ Z.value,
3889
+ Xe.value,
3890
+ We.value
3891
+ ], () => W(), { flush: "post" }), (n, l) => (_(), r(t, {
3892
+ to: C(Ht).teleportTarget.value,
3893
+ disabled: !C(Ht).isFullscreen.value
3828
3894
  }, [o("div", d({
3829
3895
  ref_key: "containerRef",
3830
- ref: O
3896
+ ref: k
3831
3897
  }, n.$attrs, {
3832
3898
  class: ["choropleth-wrapper", {
3833
3899
  pannable: c.pan,
3834
- "is-fullscreen": C(It).isFullscreen.value
3900
+ "is-fullscreen": C(Ht).isFullscreen.value
3835
3901
  }],
3836
- style: C(It).fullscreenStyle.value
3902
+ style: C(Ht).fullscreenStyle.value,
3903
+ role: w.value || void 0,
3904
+ "aria-label": ee.value || void 0
3837
3905
  }), [
3838
- c.menu ? (_(), r(fe, {
3906
+ c.menu ? (_(), r(pe, {
3839
3907
  key: 0,
3840
- items: Lt.value,
3841
- "is-fullscreen": C(It).isFullscreen.value,
3842
- onClose: C(It).exit
3908
+ items: Ut.value,
3909
+ "is-fullscreen": C(Ht).isFullscreen.value,
3910
+ onClose: C(Ht).exit
3843
3911
  }, null, 8, [
3844
3912
  "items",
3845
3913
  "is-fullscreen",
3846
3914
  "onClose"
3847
3915
  ])) : i("", !0),
3848
- o("div", cr, x(C(It).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
3849
- c.title || At.value ? (_(), a("div", lr, [c.title ? (_(), a("div", {
3916
+ o("div", fr, x(C(Ht).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
3917
+ c.title || $.value ? (_(), a("div", pr, [c.title ? (_(), a("div", {
3850
3918
  key: 0,
3851
3919
  class: "choropleth-title",
3852
- style: m(de.value)
3853
- }, x(c.title), 5)) : i("", !0), At.value ? (_(), a("div", {
3920
+ style: m(L.value)
3921
+ }, x(c.title), 5)) : i("", !0), $.value ? (_(), a("div", {
3854
3922
  key: 1,
3855
3923
  class: "choropleth-legend",
3856
- style: m(N.value)
3857
- }, [c.legendTitle ? (_(), a("span", ur, x(c.legendTitle), 1)) : i("", !0), Q.value || Ye.value ? (_(!0), a(e, { key: 1 }, y($.value, (e) => (_(), a("span", {
3924
+ style: m(fe.value)
3925
+ }, [c.legendTitle ? (_(), a("span", mr, x(c.legendTitle), 1)) : i("", !0), tt.value || nt.value ? (_(!0), a(e, { key: 1 }, y(Bt.value, (e) => (_(), a("span", {
3858
3926
  key: e.key,
3859
3927
  class: "choropleth-legend-item"
3860
3928
  }, [o("span", {
3861
3929
  class: "choropleth-legend-swatch",
3862
3930
  style: m({ background: e.color })
3863
- }, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", dr, [o("div", {
3931
+ }, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", hr, [o("div", {
3864
3932
  class: "choropleth-legend-gradient",
3865
- style: m({ background: Ft.value })
3866
- }, null, 4), o("div", fr, [(_(!0), a(e, null, y(Pt.value, (e) => (_(), a("span", {
3933
+ style: m({ background: Vt.value })
3934
+ }, null, 4), o("div", gr, [(_(!0), a(e, null, y(zt.value, (e) => (_(), a("span", {
3867
3935
  key: e.value,
3868
3936
  style: m({ left: e.pct + "%" })
3869
3937
  }, x(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
3870
3938
  (_(), a("svg", {
3871
3939
  ref_key: "svgRef",
3872
- ref: k,
3873
- viewBox: `0 0 ${q.value} ${Fe.value}`,
3874
- preserveAspectRatio: "xMidYMid meet"
3940
+ ref: A,
3941
+ viewBox: `0 0 ${Re.value} ${ze.value}`,
3942
+ preserveAspectRatio: "xMidYMid meet",
3943
+ style: m(c.twoFingerPan ? { touchAction: "pan-y" } : void 0)
3875
3944
  }, [o("g", {
3876
3945
  ref_key: "mapGroupRef",
3877
- ref: ne
3946
+ ref: re
3878
3947
  }, [o("g", {
3879
3948
  ref_key: "baseGroupRef",
3880
- ref: A
3949
+ ref: j
3881
3950
  }, null, 512), o("g", {
3882
3951
  ref_key: "overlayGroupRef",
3883
- ref: j
3884
- }, null, 512)], 512)], 8, pr)),
3885
- be.value ? (_(), a("button", {
3952
+ ref: M
3953
+ }, null, 512)], 512)], 12, _r)),
3954
+ Ce.value ? (_(), a("button", {
3886
3955
  key: 2,
3887
3956
  type: "button",
3888
3957
  class: "choropleth-reset",
3889
3958
  "aria-label": "Reset zoom",
3890
- onClick: Ne
3959
+ onClick: Ie
3891
3960
  }, " Reset ")) : i("", !0),
3892
- ie.value ? (_(), r(sr, {
3961
+ de.value ? (_(), r(ur, {
3893
3962
  key: 3,
3894
3963
  ref_key: "tooltipChildRef",
3895
- ref: M
3964
+ ref: N
3896
3965
  }, {
3897
- default: D((t) => [b(n.$slots, "tooltip", p(u(T(t))), () => [c.tooltipFormat ? (_(), a("span", {
3966
+ default: E((t) => [b(n.$slots, "tooltip", p(u(O(t))), () => [c.tooltipFormat ? (_(), a("span", {
3898
3967
  key: 0,
3899
3968
  innerHTML: c.tooltipFormat(t)
3900
- }, null, 8, mr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(at(t.value)), 1)], 64))], !0)]),
3969
+ }, null, 8, vr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(ft(t.value)), 1)], 64))], !0)]),
3901
3970
  _: 3
3902
3971
  }, 512)) : i("", !0)
3903
- ], 16)], 8, ["to", "disabled"]));
3972
+ ], 16, dr)], 8, ["to", "disabled"]));
3904
3973
  }
3905
- }), [["__scopeId", "data-v-96a5f36e"]]), xr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3974
+ }), [["__scopeId", "data-v-7bd9e073"]]), Er = /* @__PURE__ */ L(/* @__PURE__ */ l({
3906
3975
  __name: "ChartTooltip",
3907
3976
  props: {
3908
3977
  x: {},
@@ -3922,12 +3991,12 @@ var zt = {
3922
3991
  top: `${e.y}px`,
3923
3992
  transform: "translateY(-50%)"
3924
3993
  })
3925
- }, [b(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(C(N), {
3994
+ }, [b(t.$slots, "default", {}, void 0, !0)], 4)) : e.mode === "click" ? (_(), r(C(ie), {
3926
3995
  key: 1,
3927
3996
  open: e.open
3928
3997
  }, {
3929
- default: D(() => [c(C(M), { "as-child": "" }, {
3930
- default: D(() => [o("div", {
3998
+ default: E(() => [c(C(j), { "as-child": "" }, {
3999
+ default: E(() => [o("div", {
3931
4000
  class: "chart-tooltip-anchor",
3932
4001
  style: m({
3933
4002
  left: `${e.x}px`,
@@ -3935,8 +4004,8 @@ var zt = {
3935
4004
  })
3936
4005
  }, null, 4)]),
3937
4006
  _: 1
3938
- }), c(C(ie), null, {
3939
- default: D(() => [e.open ? (_(), r(C(re), {
4007
+ }), c(C(N), null, {
4008
+ default: E(() => [e.open ? (_(), r(C(M), {
3940
4009
  key: 0,
3941
4010
  class: "chart-tooltip-content",
3942
4011
  side: "right",
@@ -3945,7 +4014,7 @@ var zt = {
3945
4014
  onPointerDownOutside: n[0] ||= (e) => t.$emit("close"),
3946
4015
  onEscapeKeyDown: n[1] ||= (e) => t.$emit("close")
3947
4016
  }, {
3948
- default: D(() => [b(t.$slots, "default", {}, void 0, !0)]),
4017
+ default: E(() => [b(t.$slots, "default", {}, void 0, !0)]),
3949
4018
  _: 3
3950
4019
  }, 8, ["side-offset"])) : i("", !0)]),
3951
4020
  _: 3
@@ -3953,7 +4022,7 @@ var zt = {
3953
4022
  _: 3
3954
4023
  }, 8, ["open"])) : i("", !0);
3955
4024
  }
3956
- }), [["__scopeId", "data-v-44377f70"]]), Sr = { class: "TableWrapper" }, Cr = ["href", "download"], wr = /* @__PURE__ */ L(/* @__PURE__ */ l({
4025
+ }), [["__scopeId", "data-v-44377f70"]]), Dr = { class: "TableWrapper" }, Or = ["href", "download"], kr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3957
4026
  __name: "DataTable",
3958
4027
  props: {
3959
4028
  data: {},
@@ -4037,47 +4106,47 @@ var zt = {
4037
4106
  let r = c.columnConfig?.[e.name]?.format;
4038
4107
  if (r !== void 0) {
4039
4108
  if (typeof r == "function") return r(n, t);
4040
- if (typeof n == "number") return te(n, r);
4109
+ if (typeof n == "number") return ne(n, r);
4041
4110
  }
4042
4111
  return e.enumLabels && typeof n == "number" ? e.enumLabels[n] ?? String(n) : typeof n == "number" ? Number.isInteger(n) ? n.toString() : n.toFixed(4) : typeof n == "boolean" ? n ? "true" : "false" : String(n);
4043
4112
  }
4044
4113
  function C() {
4045
4114
  return c.filename ? c.filename : typeof c.menu == "string" ? c.menu : "data";
4046
4115
  }
4047
- function w(e) {
4116
+ function te(e) {
4048
4117
  return e.includes(",") || e.includes("\"") || e.includes("\n") ? `"${e.replace(/"/g, "\"\"")}"` : e;
4049
4118
  }
4050
- function T() {
4119
+ function w() {
4051
4120
  if (typeof c.csv == "function") return c.csv();
4052
4121
  if (typeof c.csv == "string") return c.csv;
4053
- let e = b.value, t = ee.value, n = [e.map((e) => w(l(e.name))).join(",")];
4122
+ let e = b.value, t = ee.value, n = [e.map((e) => te(l(e.name))).join(",")];
4054
4123
  for (let r = 0; r < t; r++) {
4055
- let t = e.map((e) => w(S(e, r)));
4124
+ let t = e.map((e) => te(S(e, r)));
4056
4125
  n.push(t.join(","));
4057
4126
  }
4058
4127
  return n.join("\n");
4059
4128
  }
4060
- function E() {
4061
- Pe(T(), C());
4129
+ function T() {
4130
+ K(w(), C());
4062
4131
  }
4063
- let D = n(() => c.downloadButton || c.downloadLink ? [] : [{
4132
+ let E = n(() => c.downloadButton || c.downloadLink ? [] : [{
4064
4133
  label: c.downloadMenuLink,
4065
- action: E
4066
- }]), O = n(() => {
4134
+ action: T
4135
+ }]), D = n(() => {
4067
4136
  if (c.downloadButton) return null;
4068
4137
  let e = c.downloadLink;
4069
4138
  return e ? typeof e == "string" ? e : "Download data (CSV)" : null;
4070
- }), k = n(() => O.value ? `data:text/csv;charset=utf-8,${encodeURIComponent(T())}` : null), ne = n(() => !!c.menu && D.value.length > 0);
4139
+ }), O = n(() => D.value ? `data:text/csv;charset=utf-8,${encodeURIComponent(w())}` : null), k = n(() => !!c.menu && E.value.length > 0);
4071
4140
  return (n, s) => (_(), a("div", { class: f(["TableOuter", {
4072
4141
  "full-width": t.fullWidth,
4073
- "has-menu": ne.value
4142
+ "has-menu": k.value
4074
4143
  }]) }, [
4075
- ne.value ? (_(), r(fe, {
4144
+ k.value ? (_(), r(pe, {
4076
4145
  key: 0,
4077
- items: D.value,
4146
+ items: E.value,
4078
4147
  "force-dropdown": ""
4079
4148
  }, null, 8, ["items"])) : i("", !0),
4080
- o("div", Sr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
4149
+ o("div", Dr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
4081
4150
  o("colgroup", null, [(_(!0), a(e, null, y(b.value, (e) => (_(), a("col", {
4082
4151
  key: e.name,
4083
4152
  style: m(u(e.name))
@@ -4097,15 +4166,15 @@ var zt = {
4097
4166
  key: 1,
4098
4167
  type: "button",
4099
4168
  class: "data-table-download-button",
4100
- onClick: E
4101
- }, x(t.downloadMenuLink), 1)) : O.value ? (_(), a("a", {
4169
+ onClick: T
4170
+ }, x(t.downloadMenuLink), 1)) : D.value ? (_(), a("a", {
4102
4171
  key: 2,
4103
4172
  class: "data-table-download-link",
4104
- href: k.value,
4173
+ href: O.value,
4105
4174
  download: `${C()}.csv`
4106
- }, x(O.value), 9, Cr)) : i("", !0)
4175
+ }, x(D.value), 9, Or)) : i("", !0)
4107
4176
  ], 2));
4108
4177
  }
4109
4178
  }), [["__scopeId", "data-v-21721f41"]]);
4110
4179
  //#endregion
4111
- export { ar as BarChart, xr as ChartTooltip, br as ChoroplethMap, wr as DataTable, Tn as LineChart };
4180
+ export { cr as BarChart, Er as ChartTooltip, Tr as ChoroplethMap, kr as DataTable, Dn as LineChart };