@undp/data-viz 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/ChoroplethMap.cjs +1 -1
  2. package/dist/ChoroplethMap.cjs.map +1 -1
  3. package/dist/ChoroplethMap.js +68 -68
  4. package/dist/ChoroplethMap.js.map +1 -1
  5. package/dist/GraphEl-BcKU0bG1.cjs +2 -0
  6. package/dist/GraphEl-BcKU0bG1.cjs.map +1 -0
  7. package/dist/{GraphEl-VtiYqELy.js → GraphEl-CGq1EWRn.js} +70 -8
  8. package/dist/GraphEl-CGq1EWRn.js.map +1 -0
  9. package/dist/GriddedGraphs.cjs +1 -1
  10. package/dist/GriddedGraphs.d.ts +6 -1
  11. package/dist/GriddedGraphs.js +2 -2
  12. package/dist/GriddedGraphsFromConfig.d.ts +6 -1
  13. package/dist/HybridMap.cjs +2 -0
  14. package/dist/HybridMap.cjs.map +1 -0
  15. package/dist/HybridMap.d.ts +211 -0
  16. package/dist/HybridMap.js +599 -0
  17. package/dist/HybridMap.js.map +1 -0
  18. package/dist/MultiGraphDashboard.d.ts +6 -1
  19. package/dist/MultiGraphDashboardFromConfig.d.ts +6 -1
  20. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +6 -1
  21. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +6 -1
  22. package/dist/PerformanceIntensiveScrollStory.d.ts +6 -1
  23. package/dist/ScrollStory.d.ts +6 -1
  24. package/dist/SingleGraphDashboard.cjs +1 -1
  25. package/dist/SingleGraphDashboard.d.ts +6 -1
  26. package/dist/SingleGraphDashboard.js +2 -2
  27. package/dist/SingleGraphDashboardFromConfig.d.ts +6 -1
  28. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +5 -0
  29. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +5 -0
  30. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  31. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +5 -0
  32. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  33. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +5 -0
  34. package/dist/Types.d.ts +17 -1
  35. package/dist/getSchema.cjs +1 -1
  36. package/dist/getSchema.cjs.map +1 -1
  37. package/dist/getSchema.d.ts +3 -3
  38. package/dist/getSchema.js +4 -0
  39. package/dist/getSchema.js.map +1 -1
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.d.ts +353 -220
  42. package/dist/index.js +163 -161
  43. package/dist/index.js.map +1 -1
  44. package/dist/transformData.cjs +1 -1
  45. package/dist/transformData.d.ts +1 -1
  46. package/dist/transformData.js +2 -2
  47. package/dist/{transformDataForAggregation-CE3bAlHU.js → transformDataForAggregation-CjwEAUOR.js} +62 -31
  48. package/dist/transformDataForAggregation-CjwEAUOR.js.map +1 -0
  49. package/dist/transformDataForAggregation-DAGK2BZy.cjs +2 -0
  50. package/dist/transformDataForAggregation-DAGK2BZy.cjs.map +1 -0
  51. package/dist/{transformDataForGraphFromFile-DaJHQCsL.cjs → transformDataForGraphFromFile-B1zJSPRP.cjs} +2 -2
  52. package/dist/{transformDataForGraphFromFile-DaJHQCsL.cjs.map → transformDataForGraphFromFile-B1zJSPRP.cjs.map} +1 -1
  53. package/dist/{transformDataForGraphFromFile-BExxcITV.js → transformDataForGraphFromFile-D5TMQYYd.js} +2 -2
  54. package/dist/{transformDataForGraphFromFile-BExxcITV.js.map → transformDataForGraphFromFile-D5TMQYYd.js.map} +1 -1
  55. package/dist/validateSchema.d.ts +1 -1
  56. package/package.json +6 -1
  57. package/dist/GraphEl-D5RBCD7p.cjs +0 -2
  58. package/dist/GraphEl-D5RBCD7p.cjs.map +0 -1
  59. package/dist/GraphEl-VtiYqELy.js.map +0 -1
  60. package/dist/transformDataForAggregation-CE3bAlHU.js.map +0 -1
  61. package/dist/transformDataForAggregation-KXGm6flX.cjs +0 -2
  62. package/dist/transformDataForAggregation-KXGm6flX.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { j as t, m as ct, c as dt } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { useState as S, useRef as Me, useEffect as Re, useEffectEvent as mt } from "react";
2
+ import { useState as S, useRef as Se, useEffect as Re, useEffectEvent as mt } from "react";
3
3
  import { g as pt, N as ht } from "./getSliderMarks-HIDJ0_Cd.js";
4
4
  import { w as ut } from "./Spinner-D7rnnwnA.js";
5
5
  import { p as gt, f as ft } from "./parse-DlCRUFh_.js";
@@ -17,7 +17,7 @@ import { o as Lt } from "./ordinal-P77xw8aL.js";
17
17
  import { t as zt } from "./threshold-Bgr20hik.js";
18
18
  import { s as rt } from "./select-DKy99ogv.js";
19
19
  import { u as _t } from "./use-in-view-Cxa7y1TH.js";
20
- import { m as Ue } from "./proxy-BxkFHwUw.js";
20
+ import { m as qe } from "./proxy-BxkFHwUw.js";
21
21
  import { A as Wt } from "./index-BqfRwk1n.js";
22
22
  import { GraphFooter as Bt } from "./GraphFooter.js";
23
23
  import { GraphHeader as Tt } from "./GraphHeader.js";
@@ -26,8 +26,8 @@ import { f as At } from "./fetchAndParseData-BpqkBPQL.js";
26
26
  import { g as Ft } from "./getUniqValue-BKHCm3zE.js";
27
27
  import { g as Vt } from "./getJenks-BbngDoBQ.js";
28
28
  import { u as Ht } from "./uniqBy-BHy4I8PK.js";
29
- import { a as qt, G as Gt } from "./GraphContainer-CRqzdKu2.js";
30
- import { s as Ut } from "./sort-BIvMlUH1.js";
29
+ import { a as Gt, G as Ut } from "./GraphContainer-CRqzdKu2.js";
30
+ import { s as qt } from "./sort-BIvMlUH1.js";
31
31
  import { a as Xt } from "./init-BJFW6EwE.js";
32
32
  function Rt(h) {
33
33
  const {
@@ -43,18 +43,18 @@ function Rt(h) {
43
43
  centerPoint: F,
44
44
  tooltip: re,
45
45
  mapBorderWidth: V,
46
- mapBorderColor: U,
46
+ mapBorderColor: q,
47
47
  mapNoDataColor: ae,
48
48
  onSeriesMouseOver: ie,
49
49
  showColorScale: ve,
50
- zoomScaleExtend: Ee,
51
- zoomTranslateExtend: Oe,
50
+ zoomScaleExtend: Me,
51
+ zoomTranslateExtend: Ee,
52
52
  highlightedIds: X,
53
53
  onSeriesMouseClick: ne,
54
54
  mapProperty: j,
55
55
  resetSelectionOnDoubleClick: be,
56
56
  detailsOnClick: E,
57
- styles: Pe,
57
+ styles: Oe,
58
58
  classNames: ke,
59
59
  mapProjection: I,
60
60
  zoomInteraction: L,
@@ -62,30 +62,30 @@ function Rt(h) {
62
62
  dimmedOpacity: z,
63
63
  customLayers: se,
64
64
  collapseColorScaleByDefault: je
65
- } = h, [O, _] = S(void 0), le = Me(null), [Ie, we] = S(je === void 0 ? !(g < 680) : !je), [H, R] = S(void 0), [Y, J] = S(void 0), [u, p] = S(void 0), [ce, de] = S(void 0), q = Me(null), me = _t(q, {
65
+ } = h, [O, _] = S(void 0), le = Se(null), [Pe, we] = S(je === void 0 ? !(g < 680) : !je), [H, R] = S(void 0), [Y, J] = S(void 0), [u, p] = S(void 0), [ce, de] = S(void 0), G = Se(null), me = _t(G, {
66
66
  once: N.once,
67
67
  amount: N.amount
68
- }), K = Me(null), Le = A ? Lt().domain(c).range(d) : zt().domain(c).range(d);
68
+ }), K = Se(null), Ie = A ? Lt().domain(c).range(d) : zt().domain(c).range(d);
69
69
  Re(() => {
70
- const o = rt(K.current), s = rt(q.current), f = (r) => {
70
+ const o = rt(K.current), s = rt(G.current), f = (r) => {
71
71
  if (L === "noZoom") return !1;
72
72
  if (L === "button") return !r.type.includes("wheel");
73
73
  const n = r.type === "wheel", l = r.type.startsWith("touch"), i = r.type === "mousedown" || r.type === "mousemove";
74
74
  return l ? !0 : n ? L === "scroll" ? !0 : r.ctrlKey : i && !r.button && !r.ctrlKey;
75
- }, a = xt().scaleExtent(Ee).translateExtent(Oe || [[-20, -20], [g + 20, k + 20]]).filter(f).on("zoom", ({
75
+ }, a = xt().scaleExtent(Me).translateExtent(Ee || [[-20, -20], [g + 20, k + 20]]).filter(f).on("zoom", ({
76
76
  transform: r
77
77
  }) => {
78
78
  o.attr("transform", r);
79
79
  });
80
80
  s.call(a), le.current = a;
81
81
  }, [k, g, L]);
82
- const G = vt($), w = Nt($), pe = G[2] - G[0], W = G[3] - G[1], $e = g * 190 / 960 * 360 / pe, Ce = k * 190 / 678 * 180 / W, B = v * Math.min($e, Ce), P = I === "mercator" ? bt().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B) : I === "equalEarth" ? kt().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B) : I === "naturalEarth" ? jt().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B) : I === "orthographic" ? wt().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B) : $t().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B), he = (o) => {
83
- if (!q.current || !le.current) return;
84
- rt(q.current).call(le.current.scaleBy, o === "in" ? 1.2 : 1 / 1.2);
82
+ const U = vt($), w = Nt($), pe = U[2] - U[0], W = U[3] - U[1], $e = g * 190 / 960 * 360 / pe, Ce = k * 190 / 678 * 180 / W, B = v * Math.min($e, Ce), P = I === "mercator" ? bt().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B) : I === "equalEarth" ? kt().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B) : I === "naturalEarth" ? jt().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B) : I === "orthographic" ? wt().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B) : $t().rotate([0, 0]).center(F || w.geometry.coordinates).translate([g / 2, k / 2]).scale(B), he = (o) => {
83
+ if (!G.current || !le.current) return;
84
+ rt(G.current).call(le.current.scaleBy, o === "in" ? 1.2 : 1 / 1.2);
85
85
  };
86
86
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
87
87
  /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
88
- /* @__PURE__ */ t.jsx(Ue.svg, { width: `${g}px`, height: `${k}px`, viewBox: `0 0 ${g} ${k}`, ref: q, direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { ref: K, children: [
88
+ /* @__PURE__ */ t.jsx(qe.svg, { width: `${g}px`, height: `${k}px`, viewBox: `0 0 ${g} ${k}`, ref: G, direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { ref: K, children: [
89
89
  se.filter((o) => o.position === "before").map((o) => o.layer),
90
90
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
91
91
  $.features.map((o, s) => e.findIndex((a) => a.id === o.properties[j]) !== -1 ? null : /* @__PURE__ */ t.jsx("g", { opacity: O ? z : X.length !== 0 ? X.indexOf(o.properties[j]) !== -1 ? 1 : z : 1, children: o.geometry.type === "MultiPolygon" ? (
@@ -99,7 +99,7 @@ function Rt(h) {
99
99
  D !== l.length - 1 ? i = `${i}${C[0]} ${C[1]}L` : i = `${i}${C[0]} ${C[1]}`;
100
100
  }), n += i;
101
101
  }), /* @__PURE__ */ t.jsx("path", { d: n, style: {
102
- stroke: U,
102
+ stroke: q,
103
103
  strokeWidth: V,
104
104
  fill: ae
105
105
  } }, r);
@@ -112,7 +112,7 @@ function Rt(h) {
112
112
  const m = P([l[0], l[1]]);
113
113
  i !== a.length - 1 ? n = `${n}${m[0]} ${m[1]}L` : n = `${n}${m[0]} ${m[1]}`;
114
114
  }), /* @__PURE__ */ t.jsx("path", { d: n, style: {
115
- stroke: U,
115
+ stroke: q,
116
116
  strokeWidth: V,
117
117
  fill: ae
118
118
  } }, r);
@@ -124,9 +124,9 @@ function Rt(h) {
124
124
  (a) => o.id === a.properties[j]
125
125
  ), f = Et(o.x) ? ae : (
126
126
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
127
- Le(o.x)
127
+ Ie(o.x)
128
128
  );
129
- return /* @__PURE__ */ t.jsx(Ue.g, { variants: {
129
+ return /* @__PURE__ */ t.jsx(qe.g, { variants: {
130
130
  initial: {
131
131
  opacity: 0
132
132
  },
@@ -159,7 +159,7 @@ function Rt(h) {
159
159
  const C = P([m[0], m[1]]);
160
160
  D !== l.length - 1 ? i = `${i}${C[0]} ${C[1]}L` : i = `${i}${C[0]} ${C[1]}`;
161
161
  }), n += i;
162
- }), /* @__PURE__ */ t.jsx(Ue.path, { d: n, variants: {
162
+ }), /* @__PURE__ */ t.jsx(qe.path, { d: n, variants: {
163
163
  initial: {
164
164
  fill: f,
165
165
  opacity: 0
@@ -177,7 +177,7 @@ function Rt(h) {
177
177
  duration: N.duration
178
178
  }
179
179
  }, style: {
180
- stroke: U,
180
+ stroke: q,
181
181
  strokeWidth: V
182
182
  } }, `${o.id}-${r}`);
183
183
  }
@@ -188,7 +188,7 @@ function Rt(h) {
188
188
  return a.forEach((l, i) => {
189
189
  const m = P([l[0], l[1]]);
190
190
  i !== a.length - 1 ? n = `${n}${m[0]} ${m[1]}L` : n = `${n}${m[0]} ${m[1]}`;
191
- }), /* @__PURE__ */ t.jsx(Ue.path, { d: n, variants: {
191
+ }), /* @__PURE__ */ t.jsx(qe.path, { d: n, variants: {
192
192
  initial: {
193
193
  fill: f,
194
194
  opacity: 0
@@ -206,7 +206,7 @@ function Rt(h) {
206
206
  duration: N.duration
207
207
  }
208
208
  }, style: {
209
- stroke: U,
209
+ stroke: q,
210
210
  strokeWidth: V
211
211
  } }, `${o.id}-${r}`);
212
212
  }
@@ -247,7 +247,7 @@ function Rt(h) {
247
247
  ) }, s)) : null,
248
248
  se.filter((o) => o.position === "after").map((o) => o.layer)
249
249
  ] }) }),
250
- ve === !1 ? null : /* @__PURE__ */ t.jsx("div", { className: ct("absolute left-4 bottom-4 map-color-legend", ke?.colorLegend), children: Ie ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
250
+ ve === !1 ? null : /* @__PURE__ */ t.jsx("div", { className: ct("absolute left-4 bottom-4 map-color-legend", ke?.colorLegend), children: Pe ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
251
251
  /* @__PURE__ */ t.jsx("div", { className: "color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]", onClick: () => {
252
252
  we(!1);
253
253
  }, children: /* @__PURE__ */ t.jsx(Ot, {}) }),
@@ -309,7 +309,7 @@ function Rt(h) {
309
309
  }, children: /* @__PURE__ */ t.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof E == "string" ? {
310
310
  __html: Mt(E, H)
311
311
  } : void 0, children: typeof E == "function" ? E(H) : null }) }) : null,
312
- Y && re && u && ce ? /* @__PURE__ */ t.jsx(St, { data: Y, body: re, xPos: u, yPos: ce, backgroundStyle: Pe?.tooltip, className: ke?.tooltip }) : null
312
+ Y && re && u && ce ? /* @__PURE__ */ t.jsx(St, { data: Y, body: re, xPos: u, yPos: ce, backgroundStyle: Oe?.tooltip, className: ke?.tooltip }) : null
313
313
  ] });
314
314
  }
315
315
  function zo(h) {
@@ -325,18 +325,18 @@ function zo(h) {
325
325
  footNote: F,
326
326
  colorDomain: re,
327
327
  colorLegendTitle: V,
328
- scaleType: U,
328
+ scaleType: q,
329
329
  scale: ae,
330
330
  centerPoint: ie,
331
331
  padding: ve,
332
- mapBorderWidth: Ee,
333
- mapNoDataColor: Oe,
332
+ mapBorderWidth: Me,
333
+ mapNoDataColor: Ee,
334
334
  backgroundColor: X,
335
335
  mapBorderColor: ne,
336
336
  relativeHeight: j,
337
337
  tooltip: be,
338
338
  onSeriesMouseOver: E,
339
- isWorldMap: Pe,
339
+ isWorldMap: Oe,
340
340
  showColorScale: ke,
341
341
  zoomScaleExtend: I,
342
342
  zoomTranslateExtend: L,
@@ -347,7 +347,7 @@ function zo(h) {
347
347
  graphDownload: O,
348
348
  dataDownload: _,
349
349
  showAntarctica: le,
350
- language: Ie,
350
+ language: Pe,
351
351
  minHeight: we,
352
352
  theme: H,
353
353
  ariaLabel: R,
@@ -357,55 +357,55 @@ function zo(h) {
357
357
  classNames: p,
358
358
  mapProjection: ce,
359
359
  zoomInteraction: de,
360
- animate: q,
360
+ animate: G,
361
361
  dimmedOpacity: me,
362
362
  customLayers: K,
363
- timeline: Le,
364
- collapseColorScaleByDefault: G
365
- } = h, w = d === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : d, pe = F === void 0 ? "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries." : F, W = U === void 0 ? "threshold" : U, $e = ae === void 0 ? 0.95 : ae, Ce = Ee === void 0 ? 0.5 : Ee, B = Oe === void 0 ? Xe.light.graphNoData : Oe, P = X === void 0 ? !1 : X, he = ne === void 0 ? Xe.light.grays["gray-500"] : ne, o = Pe === void 0 ? !0 : Pe, s = ke === void 0 ? !0 : ke;
363
+ timeline: Ie,
364
+ collapseColorScaleByDefault: U
365
+ } = h, w = d === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : d, pe = F === void 0 ? "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries." : F, W = q === void 0 ? "threshold" : q, $e = ae === void 0 ? 0.95 : ae, Ce = Me === void 0 ? 0.5 : Me, B = Ee === void 0 ? Xe.light.graphNoData : Ee, P = X === void 0 ? !1 : X, he = ne === void 0 ? Xe.light.grays["gray-500"] : ne, o = Oe === void 0 ? !0 : Oe, s = ke === void 0 ? !0 : ke;
366
366
  let f;
367
367
  e[0] !== I ? (f = I === void 0 ? [0.8, 6] : I, e[0] = I, e[1] = f) : f = e[1];
368
368
  const a = f;
369
369
  let r;
370
370
  e[2] !== z ? (r = z === void 0 ? [] : z, e[2] = z, e[3] = r) : r = e[3];
371
- const n = r, l = je === void 0 ? "ISO3" : je, i = O === void 0 ? !1 : O, m = _ === void 0 ? !1 : _, D = le === void 0 ? !1 : le, C = Ie === void 0 ? "en" : Ie, T = we === void 0 ? 0 : we, Z = H === void 0 ? "light" : H, Ye = Y === void 0 ? !0 : Y, Je = de === void 0 ? "button" : de, ze = q === void 0 ? !1 : q, Ke = me === void 0 ? 0.3 : me;
372
- let _e;
373
- e[4] !== K ? (_e = K === void 0 ? [] : K, e[4] = K, e[5] = _e) : _e = e[5];
374
- const Ze = _e, b = Le === void 0 ? {
371
+ const n = r, l = je === void 0 ? "ISO3" : je, i = O === void 0 ? !1 : O, m = _ === void 0 ? !1 : _, D = le === void 0 ? !1 : le, C = Pe === void 0 ? "en" : Pe, T = we === void 0 ? 0 : we, Z = H === void 0 ? "light" : H, Ye = Y === void 0 ? !0 : Y, Je = de === void 0 ? "button" : de, Le = G === void 0 ? !1 : G, Ke = me === void 0 ? 0.3 : me;
372
+ let ze;
373
+ e[4] !== K ? (ze = K === void 0 ? [] : K, e[4] = K, e[5] = ze) : ze = e[5];
374
+ const Ze = ze, b = Ie === void 0 ? {
375
375
  enabled: !1,
376
376
  autoplay: !1,
377
377
  showOnlyActiveDate: !0
378
- } : Le, [Q, nt] = S(0), [Ne, st] = S(0), [ee, Qe] = S(b.autoplay), y = Ut(Ht(c, "date", !0).map((x) => gt(`${x}`, b.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()), oo), [te, De] = S(b.autoplay ? 0 : y.length - 1), [ue, lt] = S(void 0), et = Me(null), at = Me(null);
379
- let We, Be;
380
- e[6] === Symbol.for("react.memo_cache_sentinel") ? (We = () => {
378
+ } : Ie, [Q, nt] = S(0), [Ne, st] = S(0), [ee, Qe] = S(b.autoplay), y = qt(Ht(c, "date", !0).map((x) => gt(`${x}`, b.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()), oo), [te, De] = S(b.autoplay ? 0 : y.length - 1), [ue, lt] = S(void 0), et = Se(null), at = Se(null);
379
+ let _e, We;
380
+ e[6] === Symbol.for("react.memo_cache_sentinel") ? (_e = () => {
381
381
  const x = new ResizeObserver((oe) => {
382
382
  nt(oe[0].target.clientWidth || 620), st(oe[0].target.clientHeight || 480);
383
383
  });
384
384
  return et.current && x.observe(et.current), () => x.disconnect();
385
- }, Be = [], e[6] = We, e[7] = Be) : (We = e[6], Be = e[7]), Re(We, Be);
386
- let Te;
387
- e[8] === Symbol.for("react.memo_cache_sentinel") ? (Te = (x) => {
385
+ }, We = [], e[6] = _e, e[7] = We) : (_e = e[6], We = e[7]), Re(_e, We);
386
+ let Be;
387
+ e[8] === Symbol.for("react.memo_cache_sentinel") ? (Be = (x) => {
388
388
  lt(x);
389
- }, e[8] = Te) : Te = e[8];
390
- const Ae = mt(Te);
391
- let Fe;
392
- e[9] !== w || e[10] !== Ae ? (Fe = () => {
389
+ }, e[8] = Be) : Be = e[8];
390
+ const Te = mt(Be);
391
+ let Ae;
392
+ e[9] !== w || e[10] !== Te ? (Ae = () => {
393
393
  typeof w == "string" ? At(w).then((oe) => {
394
- Ae(oe);
395
- }) : Ae(w);
396
- }, e[9] = w, e[10] = Ae, e[11] = Fe) : Fe = e[11];
394
+ Te(oe);
395
+ }) : Te(w);
396
+ }, e[9] = w, e[10] = Te, e[11] = Ae) : Ae = e[11];
397
+ let Fe;
398
+ e[12] !== w ? (Fe = [w], e[12] = w, e[13] = Fe) : Fe = e[13], Re(Ae, Fe);
397
399
  let Ve;
398
- e[12] !== w ? (Ve = [w], e[12] = w, e[13] = Ve) : Ve = e[13], Re(Fe, Ve);
399
- let He;
400
- e[14] !== re || e[15] !== M?.length || e[16] !== c || e[17] !== W ? (He = re || (W === "categorical" ? Ft(c, "x") : Vt(c.map(to), M?.length || 4)), e[14] = re, e[15] = M?.length, e[16] = c, e[17] = W, e[18] = He) : He = e[18];
401
- const Se = He;
400
+ e[14] !== re || e[15] !== M?.length || e[16] !== c || e[17] !== W ? (Ve = re || (W === "categorical" ? Ft(c, "x") : Vt(c.map(to), M?.length || 4)), e[14] = re, e[15] = M?.length, e[16] = c, e[17] = W, e[18] = Ve) : Ve = e[18];
401
+ const He = Ve;
402
402
  Re(() => {
403
403
  const x = setInterval(() => {
404
404
  De((oe) => oe < y.length - 1 ? oe + 1 : 0);
405
405
  }, (b.speed || 2) * 1e3);
406
406
  return ee || clearInterval(x), () => clearInterval(x);
407
407
  }, [y, ee, b.speed]);
408
- const qe = pt(y, te, b.showOnlyActiveDate, b.dateFormat || "yyyy"), tt = p?.graphContainer, ot = u?.graphContainer;
408
+ const Ge = pt(y, te, b.showOnlyActiveDate, b.dateFormat || "yyyy"), tt = p?.graphContainer, ot = u?.graphContainer;
409
409
  let ge;
410
410
  e[19] !== p?.description || e[20] !== p?.title || e[21] !== c || e[22] !== m || e[23] !== k || e[24] !== i || e[25] !== $ || e[26] !== u?.description || e[27] !== u?.title || e[28] !== v ? (ge = $ || k || i || m ? /* @__PURE__ */ t.jsx(Tt, { styles: {
411
411
  title: u?.title,
@@ -415,31 +415,31 @@ function zo(h) {
415
415
  description: p?.description
416
416
  }, graphTitle: $, graphDescription: k, width: v, graphDownload: i ? at : void 0, dataDownload: m ? c.map(eo).filter(Qt).length > 0 ? c.map(Zt).filter(Kt) : c.filter(Jt) : null }) : null, e[19] = p?.description, e[20] = p?.title, e[21] = c, e[22] = m, e[23] = k, e[24] = i, e[25] = $, e[26] = u?.description, e[27] = u?.title, e[28] = v, e[29] = ge) : ge = e[29];
417
417
  let fe;
418
- e[30] !== te || e[31] !== qe || e[32] !== ee || e[33] !== De || e[34] !== Qe || e[35] !== b.enabled || e[36] !== y ? (fe = b.enabled && y.length > 0 && qe ? /* @__PURE__ */ t.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
418
+ e[30] !== te || e[31] !== Ge || e[32] !== ee || e[33] !== De || e[34] !== Qe || e[35] !== b.enabled || e[36] !== y ? (fe = b.enabled && y.length > 0 && Ge ? /* @__PURE__ */ t.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
419
419
  /* @__PURE__ */ t.jsx("button", { type: "button", onClick: () => {
420
420
  Qe(!ee);
421
421
  }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": ee ? "Click to pause animation" : "Click to play animation", children: ee ? /* @__PURE__ */ t.jsx(Pt, {}) : /* @__PURE__ */ t.jsx(It, {}) }),
422
- /* @__PURE__ */ t.jsx(ht, { min: y[0], max: y[y.length - 1], marks: qe, step: null, defaultValue: y[y.length - 1], value: y[te], onChangeComplete: (x) => {
422
+ /* @__PURE__ */ t.jsx(ht, { min: y[0], max: y[y.length - 1], marks: Ge, step: null, defaultValue: y[y.length - 1], value: y[te], onChangeComplete: (x) => {
423
423
  De(y.indexOf(x));
424
424
  }, onChange: (x) => {
425
425
  De(y.indexOf(x));
426
426
  }, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
427
- ] }) : null, e[30] = te, e[31] = qe, e[32] = ee, e[33] = De, e[34] = Qe, e[35] = b.enabled, e[36] = y, e[37] = fe) : fe = e[37];
427
+ ] }) : null, e[30] = te, e[31] = Ge, e[32] = ee, e[33] = De, e[34] = Qe, e[35] = b.enabled, e[36] = y, e[37] = fe) : fe = e[37];
428
428
  let ye;
429
- e[38] !== ze || e[39] !== ie || e[40] !== p || e[41] !== G || e[42] !== V || e[43] !== M || e[44] !== Ze || e[45] !== c || e[46] !== J || e[47] !== Ke || e[48] !== Se || e[49] !== g || e[50] !== n || e[51] !== te || e[52] !== o || e[53] !== he || e[54] !== Ce || e[55] !== B || e[56] !== ce || e[57] !== l || e[58] !== ue || e[59] !== T || e[60] !== se || e[61] !== E || e[62] !== j || e[63] !== Ye || e[64] !== $e || e[65] !== W || e[66] !== D || e[67] !== s || e[68] !== u || e[69] !== Ne || e[70] !== Q || e[71] !== Z || e[72] !== b.dateFormat || e[73] !== b.enabled || e[74] !== be || e[75] !== y || e[76] !== v || e[77] !== Je || e[78] !== a || e[79] !== L ? (ye = /* @__PURE__ */ t.jsx(qt, { ref: et, children: Q && Ne && ue ? /* @__PURE__ */ t.jsx(Rt, { data: c.filter((x) => b.enabled ? x.date === ft(new Date(y[te]), b.dateFormat || "yyyy") : x), mapData: D ? ue : {
429
+ e[38] !== Le || e[39] !== ie || e[40] !== p || e[41] !== U || e[42] !== V || e[43] !== M || e[44] !== Ze || e[45] !== c || e[46] !== J || e[47] !== Ke || e[48] !== He || e[49] !== g || e[50] !== n || e[51] !== te || e[52] !== o || e[53] !== he || e[54] !== Ce || e[55] !== B || e[56] !== ce || e[57] !== l || e[58] !== ue || e[59] !== T || e[60] !== se || e[61] !== E || e[62] !== j || e[63] !== Ye || e[64] !== $e || e[65] !== W || e[66] !== D || e[67] !== s || e[68] !== u || e[69] !== Ne || e[70] !== Q || e[71] !== Z || e[72] !== b.dateFormat || e[73] !== b.enabled || e[74] !== be || e[75] !== y || e[76] !== v || e[77] !== Je || e[78] !== a || e[79] !== L ? (ye = /* @__PURE__ */ t.jsx(Gt, { ref: et, children: Q && Ne && ue ? /* @__PURE__ */ t.jsx(Rt, { data: c.filter((x) => b.enabled ? x.date === ft(new Date(y[te]), b.dateFormat || "yyyy") : x), mapData: D ? ue : {
430
430
  ...ue,
431
431
  features: ue.features.filter(Yt)
432
- }, colorDomain: Se, width: Q, height: Ne, scale: $e, centerPoint: ie, colors: M || (W === "categorical" ? Xe[Z].sequentialColors[`neutralColorsx0${Se.length}`] : Xe[Z].sequentialColors[`neutralColorsx0${Se.length + 1}`]), colorLegendTitle: V, mapBorderWidth: Ce, mapNoDataColor: B, categorical: W === "categorical", mapBorderColor: he, tooltip: be, onSeriesMouseOver: E, isWorldMap: o, showColorScale: s, zoomScaleExtend: a, zoomTranslateExtend: L, onSeriesMouseClick: se, mapProperty: l, highlightedIds: n, resetSelectionOnDoubleClick: Ye, styles: u, classNames: p, detailsOnClick: J, mapProjection: ce || (o ? "naturalEarth" : "mercator"), zoomInteraction: Je, dimmedOpacity: Ke, animate: ze === !0 ? {
432
+ }, colorDomain: He, width: Q, height: Ne, scale: $e, centerPoint: ie, colors: M || (W === "categorical" ? Xe[Z].categoricalColors.colors : Xe[Z].sequentialColors[`neutralColorsx0${He.length + 1}`]), colorLegendTitle: V, mapBorderWidth: Ce, mapNoDataColor: B, categorical: W === "categorical", mapBorderColor: he, tooltip: be, onSeriesMouseOver: E, isWorldMap: o, showColorScale: s, zoomScaleExtend: a, zoomTranslateExtend: L, onSeriesMouseClick: se, mapProperty: l, highlightedIds: n, resetSelectionOnDoubleClick: Ye, styles: u, classNames: p, detailsOnClick: J, mapProjection: ce || (o ? "naturalEarth" : "mercator"), zoomInteraction: Je, dimmedOpacity: Ke, animate: Le === !0 ? {
433
433
  duration: 0.5,
434
434
  once: !0,
435
435
  amount: 0.5
436
- } : ze || {
436
+ } : Le || {
437
437
  duration: 0,
438
438
  once: !0,
439
439
  amount: 0
440
- }, customLayers: Ze, collapseColorScaleByDefault: G }) : /* @__PURE__ */ t.jsx("div", { style: {
440
+ }, customLayers: Ze, collapseColorScaleByDefault: U }) : /* @__PURE__ */ t.jsx("div", { style: {
441
441
  height: `${Math.max(T, g || (j ? T ? (v || Q) * j > T ? (v || Q) * j : T : (v || Q) * j : Ne))}px`
442
- }, className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(ut, { "aria-label": "Loading graph" }) }) }), e[38] = ze, e[39] = ie, e[40] = p, e[41] = G, e[42] = V, e[43] = M, e[44] = Ze, e[45] = c, e[46] = J, e[47] = Ke, e[48] = Se, e[49] = g, e[50] = n, e[51] = te, e[52] = o, e[53] = he, e[54] = Ce, e[55] = B, e[56] = ce, e[57] = l, e[58] = ue, e[59] = T, e[60] = se, e[61] = E, e[62] = j, e[63] = Ye, e[64] = $e, e[65] = W, e[66] = D, e[67] = s, e[68] = u, e[69] = Ne, e[70] = Q, e[71] = Z, e[72] = b.dateFormat, e[73] = b.enabled, e[74] = be, e[75] = y, e[76] = v, e[77] = Je, e[78] = a, e[79] = L, e[80] = ye) : ye = e[80];
442
+ }, className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(ut, { "aria-label": "Loading graph" }) }) }), e[38] = Le, e[39] = ie, e[40] = p, e[41] = U, e[42] = V, e[43] = M, e[44] = Ze, e[45] = c, e[46] = J, e[47] = Ke, e[48] = He, e[49] = g, e[50] = n, e[51] = te, e[52] = o, e[53] = he, e[54] = Ce, e[55] = B, e[56] = ce, e[57] = l, e[58] = ue, e[59] = T, e[60] = se, e[61] = E, e[62] = j, e[63] = Ye, e[64] = $e, e[65] = W, e[66] = D, e[67] = s, e[68] = u, e[69] = Ne, e[70] = Q, e[71] = Z, e[72] = b.dateFormat, e[73] = b.enabled, e[74] = be, e[75] = y, e[76] = v, e[77] = Je, e[78] = a, e[79] = L, e[80] = ye) : ye = e[80];
443
443
  let xe;
444
444
  e[81] !== p?.footnote || e[82] !== p?.source || e[83] !== pe || e[84] !== A || e[85] !== u?.footnote || e[86] !== u?.source || e[87] !== v ? (xe = A || pe ? /* @__PURE__ */ t.jsx(Bt, { styles: {
445
445
  footnote: u?.footnote,
@@ -448,13 +448,13 @@ function zo(h) {
448
448
  footnote: p?.footnote,
449
449
  source: p?.source
450
450
  }, sources: A, footNote: pe, width: v }) : null, e[81] = p?.footnote, e[82] = p?.source, e[83] = pe, e[84] = A, e[85] = u?.footnote, e[86] = u?.source, e[87] = v, e[88] = xe) : xe = e[88];
451
- let Ge;
452
- return e[89] !== R || e[90] !== P || e[91] !== N || e[92] !== g || e[93] !== C || e[94] !== T || e[95] !== ve || e[96] !== j || e[97] !== tt || e[98] !== ot || e[99] !== ge || e[100] !== fe || e[101] !== ye || e[102] !== xe || e[103] !== Z || e[104] !== v ? (Ge = /* @__PURE__ */ t.jsxs(Gt, { className: tt, style: ot, id: N, ref: at, "aria-label": R, backgroundColor: P, theme: Z, language: C, minHeight: T, width: v, height: g, relativeHeight: j, padding: ve, children: [
451
+ let Ue;
452
+ return e[89] !== R || e[90] !== P || e[91] !== N || e[92] !== g || e[93] !== C || e[94] !== T || e[95] !== ve || e[96] !== j || e[97] !== tt || e[98] !== ot || e[99] !== ge || e[100] !== fe || e[101] !== ye || e[102] !== xe || e[103] !== Z || e[104] !== v ? (Ue = /* @__PURE__ */ t.jsxs(Ut, { className: tt, style: ot, id: N, ref: at, "aria-label": R, backgroundColor: P, theme: Z, language: C, minHeight: T, width: v, height: g, relativeHeight: j, padding: ve, children: [
453
453
  ge,
454
454
  fe,
455
455
  ye,
456
456
  xe
457
- ] }), e[89] = R, e[90] = P, e[91] = N, e[92] = g, e[93] = C, e[94] = T, e[95] = ve, e[96] = j, e[97] = tt, e[98] = ot, e[99] = ge, e[100] = fe, e[101] = ye, e[102] = xe, e[103] = Z, e[104] = v, e[105] = Ge) : Ge = e[105], Ge;
457
+ ] }), e[89] = R, e[90] = P, e[91] = N, e[92] = g, e[93] = C, e[94] = T, e[95] = ve, e[96] = j, e[97] = tt, e[98] = ot, e[99] = ge, e[100] = fe, e[101] = ye, e[102] = xe, e[103] = Z, e[104] = v, e[105] = Ue) : Ue = e[105], Ue;
458
458
  }
459
459
  function Yt(h) {
460
460
  return h.properties.NAME !== "Antarctica";