@undp/data-viz 2.5.1 → 2.5.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.
Files changed (43) hide show
  1. package/dist/BiVariateChoroplethMap.cjs +1 -1
  2. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  3. package/dist/BiVariateChoroplethMap.js +297 -289
  4. package/dist/BiVariateChoroplethMap.js.map +1 -1
  5. package/dist/ChoroplethMap.cjs +1 -1
  6. package/dist/ChoroplethMap.cjs.map +1 -1
  7. package/dist/ChoroplethMap.js +307 -299
  8. package/dist/ChoroplethMap.js.map +1 -1
  9. package/dist/CopyTextButton.cjs +1 -1
  10. package/dist/CopyTextButton.cjs.map +1 -1
  11. package/dist/CopyTextButton.js +281 -279
  12. package/dist/CopyTextButton.js.map +1 -1
  13. package/dist/CsvDownloadButton.cjs +4 -4
  14. package/dist/CsvDownloadButton.cjs.map +1 -1
  15. package/dist/CsvDownloadButton.js +268 -266
  16. package/dist/CsvDownloadButton.js.map +1 -1
  17. package/dist/DotDensityMap.cjs +1 -1
  18. package/dist/DotDensityMap.cjs.map +1 -1
  19. package/dist/DotDensityMap.js +277 -269
  20. package/dist/DotDensityMap.js.map +1 -1
  21. package/dist/ExcelDownloadButton.cjs +1 -1
  22. package/dist/ExcelDownloadButton.cjs.map +1 -1
  23. package/dist/ExcelDownloadButton.js +21 -19
  24. package/dist/ExcelDownloadButton.js.map +1 -1
  25. package/dist/HybridMap.cjs +1 -1
  26. package/dist/HybridMap.cjs.map +1 -1
  27. package/dist/HybridMap.js +299 -291
  28. package/dist/HybridMap.js.map +1 -1
  29. package/dist/ImageDownloadButton.cjs +1 -1
  30. package/dist/ImageDownloadButton.cjs.map +1 -1
  31. package/dist/ImageDownloadButton.js +19 -17
  32. package/dist/ImageDownloadButton.js.map +1 -1
  33. package/dist/SVGDownloadButton.cjs +1 -1
  34. package/dist/SVGDownloadButton.cjs.map +1 -1
  35. package/dist/SVGDownloadButton.js +20 -18
  36. package/dist/SVGDownloadButton.js.map +1 -1
  37. package/dist/ScatterPlot.cjs +1 -1
  38. package/dist/ScatterPlot.cjs.map +1 -1
  39. package/dist/ScatterPlot.d.ts +1 -1
  40. package/dist/ScatterPlot.js +107 -107
  41. package/dist/ScatterPlot.js.map +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/package.json +1 -1
@@ -1,443 +1,448 @@
1
1
  import { j as t, m as Pt, c as Wt } from "./index-CHPV5EwG-BzibaIRc.js";
2
- import { useMemo as wt, useState as k, useRef as We, useEffect as Pe, useEffectEvent as Ct } from "react";
2
+ import { useMemo as wt, useState as j, useRef as _e, useEffect as We, useEffectEvent as Ct } from "react";
3
3
  import { g as _t, N as At } from "./getSliderMarks-X-_goqH9.js";
4
4
  import { w as Ft } from "./Spinner-B2IIKg9r.js";
5
5
  import { f as Lt, p as Tt } from "./parse-Dv4of-PN.js";
6
6
  import { i as $t } from "./index-Bwrro8-q.js";
7
7
  import { i as Nt, z as Ht, a as Gt, g as Ut, b as Vt, c as Rt, d as qt, e as Xt, f as Yt } from "./index-CKpKc9DR.js";
8
- import { _ as Mt } from "./Typography-BO0gQDIT.js";
8
+ import { _ as St } from "./Typography-BO0gQDIT.js";
9
9
  import { i as Zt } from "./index-DCsFBfJ_.js";
10
10
  import { n as Jt } from "./numberFormattingFunction-BUUV_luR.js";
11
11
  import { T as Kt } from "./Tooltip-3EYDVa3w.js";
12
12
  import { c as Qt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
13
- import { X as eo, E as to, P as oo, e as ro } from "./index-ApTBN0kp.js";
14
- import { D as ao } from "./DetailsModal-GqEbGHY2.js";
13
+ import { X as eo, E as to, P as oo, e as ao } from "./index-ApTBN0kp.js";
14
+ import { D as ro } from "./DetailsModal-GqEbGHY2.js";
15
15
  import { ImageDownloadButton as no } from "./ImageDownloadButton.js";
16
- import { o as io } from "./ordinal-CHaxGJ_l.js";
17
- import { t as so } from "./threshold-DFfqcDMa.js";
18
- import { s as kt } from "./select-DKy99ogv.js";
16
+ import { CsvDownloadButton as io } from "./CsvDownloadButton.js";
17
+ import { o as so } from "./ordinal-CHaxGJ_l.js";
18
+ import { t as lo } from "./threshold-DFfqcDMa.js";
19
+ import { s as jt } from "./select-DKy99ogv.js";
19
20
  import { m as lt } from "./proxy-BsxtcZKa.js";
20
- import { u as lo } from "./use-in-view-KOXq5Kmc.js";
21
- import { A as co } from "./index-Cv_5q6Rb.js";
22
- import { GraphFooter as mo } from "./GraphFooter.js";
23
- import { GraphHeader as po } from "./GraphHeader.js";
21
+ import { u as co } from "./use-in-view-KOXq5Kmc.js";
22
+ import { A as mo } from "./index-Cv_5q6Rb.js";
23
+ import { GraphFooter as po } from "./GraphFooter.js";
24
+ import { GraphHeader as uo } from "./GraphHeader.js";
24
25
  import { Colors as ct } from "./Colors.js";
25
- import { f as St } from "./fetchAndParseData-BAXhgTDM.js";
26
- import { g as uo } from "./getUniqValue-DsqSii6M.js";
27
- import { g as ho } from "./getJenks-DTCcQSDi.js";
28
- import { a as fo, G as go } from "./GraphContainer-B8ZqOzKI.js";
29
- function yo(m) {
26
+ import { f as Mt } from "./fetchAndParseData-BAXhgTDM.js";
27
+ import { g as ho } from "./getUniqValue-DsqSii6M.js";
28
+ import { g as fo } from "./getJenks-DTCcQSDi.js";
29
+ import { a as go, G as yo } from "./GraphContainer-B8ZqOzKI.js";
30
+ function vo(m) {
30
31
  const {
31
32
  data: e,
32
- colorDomain: a,
33
+ colorDomain: n,
33
34
  colors: i,
34
- mapData: A,
35
- colorLegendTitle: C,
36
- categorical: F,
35
+ mapData: L,
36
+ colorLegendTitle: w,
37
+ categorical: T,
37
38
  height: v,
38
- width: p,
39
- scale: h,
40
- centerPoint: L,
41
- tooltip: te,
42
- mapBorderWidth: q,
43
- mapBorderColor: oe,
44
- mapNoDataColor: fe,
45
- onSeriesMouseOver: re,
46
- showColorScale: ge,
47
- zoomScaleExtend: _e,
48
- zoomTranslateExtend: Ae,
49
- highlightedIds: j,
39
+ width: u,
40
+ scale: g,
41
+ centerPoint: $,
42
+ tooltip: ee,
43
+ mapBorderWidth: R,
44
+ mapBorderColor: te,
45
+ mapNoDataColor: be,
46
+ onSeriesMouseOver: oe,
47
+ showColorScale: De,
48
+ zoomScaleExtend: Ae,
49
+ zoomTranslateExtend: Fe,
50
+ highlightedIds: b,
50
51
  onSeriesMouseClick: ae,
51
- mapProperty: f,
52
- resetSelectionOnDoubleClick: ye,
53
- detailsOnClick: X,
54
- styles: Fe,
55
- classNames: ne,
52
+ mapProperty: y,
53
+ resetSelectionOnDoubleClick: je,
54
+ detailsOnClick: q,
55
+ styles: Le,
56
+ classNames: re,
56
57
  mapProjection: O,
57
58
  zoomInteraction: E,
58
- animate: N,
59
+ animate: C,
59
60
  dimmedOpacity: B,
60
- customLayers: ie,
61
- collapseColorScaleByDefault: ve,
62
- zoomAndCenterByHighlightedIds: xe,
63
- projectionRotate: T,
64
- rewindCoordinatesInMapData: Y,
65
- overlayMapData: Z,
66
- overlayMapBorderColor: Le,
67
- overlayMapBorderWidth: Te,
68
- numberDisplayOptions: J,
69
- graphDownload: be
70
- } = m, x = wt(() => Y ? Nt(A, {
61
+ customLayers: ne,
62
+ collapseColorScaleByDefault: ke,
63
+ zoomAndCenterByHighlightedIds: we,
64
+ projectionRotate: H,
65
+ rewindCoordinatesInMapData: X,
66
+ overlayMapData: Y,
67
+ overlayMapBorderColor: Te,
68
+ overlayMapBorderWidth: $e,
69
+ numberDisplayOptions: Z,
70
+ graphDownload: ie,
71
+ dataDownload: I
72
+ } = m, r = wt(() => X ? Nt(L, {
71
73
  reverse: !0
72
- }) : A, [A, Y]), u = wt(() => !Y || !Z ? Z : Nt(Z, {
74
+ }) : L, [L, X]), h = wt(() => !X || !Y ? Y : Nt(Y, {
73
75
  reverse: !0
74
- }), [Z, Y]), [s, I] = k(void 0), se = We(null), [$e, De] = k(ve === void 0 ? !(p < 680) : !ve), [$, H] = k(void 0), [G, U] = k(void 0), [je, le] = k(void 0), [g, K] = k(void 0), b = We(null), Q = lo(b, {
75
- once: N.once,
76
- amount: N.amount
77
- }), M = We(null), ke = F ? io().domain(a).range(i) : so().domain(a).range(i);
78
- Pe(() => {
79
- const o = kt(M.current), r = kt(b.current), D = (n) => {
76
+ }), [Y, X]), [N, z] = j(void 0), se = _e(null), [He, J] = j(ke === void 0 ? !(u < 680) : !ke), [G, K] = j(void 0), [P, le] = j(void 0), [Ce, f] = j(void 0), [ce, D] = j(void 0), S = _e(null), M = co(S, {
77
+ once: C.once,
78
+ amount: C.amount
79
+ }), de = _e(null), Ne = T ? so().domain(n).range(i) : lo().domain(n).range(i);
80
+ We(() => {
81
+ const o = jt(de.current), a = jt(S.current), p = (c) => {
80
82
  if (E === "noZoom") return !1;
81
- if (E === "button") return !n.type.includes("wheel");
82
- const Se = n.type === "wheel", Oe = n.type.startsWith("touch"), Ee = n.type === "mousedown" || n.type === "mousemove";
83
- return Oe ? !0 : Se ? E === "scroll" ? !0 : n.ctrlKey : Ee && !n.button && !n.ctrlKey;
84
- }, y = Ht().scaleExtent(_e).translateExtent(Ae || [[-20, -20], [p + 20, v + 20]]).filter(D).on("zoom", ({
85
- transform: n
83
+ if (E === "button") return !c.type.includes("wheel");
84
+ const Ee = c.type === "wheel", Be = c.type.startsWith("touch"), he = c.type === "mousedown" || c.type === "mousemove";
85
+ return Be ? !0 : Ee ? E === "scroll" ? !0 : c.ctrlKey : he && !c.button && !c.ctrlKey;
86
+ }, x = Ht().scaleExtent(Ae).translateExtent(Fe || [[-20, -20], [u + 20, v + 20]]).filter(p).on("zoom", ({
87
+ transform: c
86
88
  }) => {
87
- o.attr("transform", n);
89
+ o.attr("transform", c);
88
90
  });
89
- r.call(y), se.current = y;
90
- }, [v, p, E]);
91
- const V = Gt({
92
- ...x,
93
- features: xe ? x.features.filter(
91
+ a.call(x), se.current = x;
92
+ }, [v, u, E]);
93
+ const U = Gt({
94
+ ...r,
95
+ features: we ? r.features.filter(
94
96
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
- (o) => (j || []).length === 0 || j?.indexOf(o.properties[f]) !== -1
96
- ) : x.features
97
- }), z = Zt({
98
- ...x,
99
- features: xe ? x.features.filter(
97
+ (o) => (b || []).length === 0 || b?.indexOf(o.properties[y]) !== -1
98
+ ) : r.features
99
+ }), W = Zt({
100
+ ...r,
101
+ features: we ? r.features.filter(
100
102
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
101
- (o) => (j || []).length === 0 || j?.indexOf(o.properties[f]) !== -1
102
- ) : x.features
103
- }), we = (V[2] - V[0]) * 1.15, Ce = (V[3] - V[1]) * 1.15, ce = p * 190 / 960 * 360 / we, Ne = v * 190 / 678 * 180 / Ce, S = h * Math.min(ce, Ne), Me = O === "mercator" ? Ut().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S) : O === "equalEarth" ? Vt().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S) : O === "naturalEarth" ? Rt().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S) : O === "orthographic" ? qt().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S) : Xt().rotate(T).center(L || z.geometry.coordinates).translate([p / 2, v / 2]).scale(S), R = Yt().projection(Me), P = (o) => {
104
- if (!b.current || !se.current) return;
105
- kt(b.current).call(se.current.scaleBy, o === "in" ? 1.2 : 1 / 1.2);
103
+ (o) => (b || []).length === 0 || b?.indexOf(o.properties[y]) !== -1
104
+ ) : r.features
105
+ }), Se = (U[2] - U[0]) * 1.15, me = (U[3] - U[1]) * 1.15, Me = u * 190 / 960 * 360 / Se, pe = v * 190 / 678 * 180 / me, _ = g * Math.min(Me, pe), Oe = O === "mercator" ? Ut().rotate(H).center($ || W.geometry.coordinates).translate([u / 2, v / 2]).scale(_) : O === "equalEarth" ? Vt().rotate(H).center($ || W.geometry.coordinates).translate([u / 2, v / 2]).scale(_) : O === "naturalEarth" ? Rt().rotate(H).center($ || W.geometry.coordinates).translate([u / 2, v / 2]).scale(_) : O === "orthographic" ? qt().rotate(H).center($ || W.geometry.coordinates).translate([u / 2, v / 2]).scale(_) : Xt().rotate(H).center($ || W.geometry.coordinates).translate([u / 2, v / 2]).scale(_), V = Yt().projection(Oe), ue = (o) => {
106
+ if (!S.current || !se.current) return;
107
+ jt(S.current).call(se.current.scaleBy, o === "in" ? 1.2 : 1 / 1.2);
106
108
  };
107
109
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
108
110
  /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
109
- /* @__PURE__ */ t.jsx(lt.svg, { width: `${p}px`, height: `${v}px`, viewBox: `0 0 ${p} ${v}`, ref: b, direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { ref: M, children: [
110
- ie.filter((o) => o.position === "before").map((o) => o.layer),
111
- x.features.map((o, r) => {
112
- if (!o.properties?.[f]) return null;
113
- const D = R(o);
114
- return D ? /* @__PURE__ */ t.jsx(lt.g, { opacity: s ? B : j ? j.indexOf(o.properties[f]) !== -1 ? 1 : B : 1, children: /* @__PURE__ */ t.jsx("path", { d: D, style: {
115
- stroke: oe,
116
- strokeWidth: q,
117
- fill: fe,
111
+ /* @__PURE__ */ t.jsx(lt.svg, { width: `${u}px`, height: `${v}px`, viewBox: `0 0 ${u} ${v}`, ref: S, direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { ref: de, children: [
112
+ ne.filter((o) => o.position === "before").map((o) => o.layer),
113
+ r.features.map((o, a) => {
114
+ if (!o.properties?.[y]) return null;
115
+ const p = V(o);
116
+ return p ? /* @__PURE__ */ t.jsx(lt.g, { opacity: N ? B : b ? b.indexOf(o.properties[y]) !== -1 ? 1 : B : 1, children: /* @__PURE__ */ t.jsx("path", { d: p, style: {
117
+ stroke: te,
118
+ strokeWidth: R,
119
+ fill: be,
118
120
  vectorEffect: "non-scaling-stroke"
119
- } }) }, r) : null;
121
+ } }) }, a) : null;
120
122
  }),
121
- /* @__PURE__ */ t.jsx(co, { children: e.map((o) => {
122
- const r = x.features.findIndex(
123
+ /* @__PURE__ */ t.jsx(mo, { children: e.map((o) => {
124
+ const a = r.features.findIndex(
123
125
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
124
- (n) => o.id === n.properties[f]
126
+ (c) => o.id === c.properties[y]
125
127
  );
126
- if (r === -1) return null;
127
- const D = R(x.features[r]);
128
- if (!D) return null;
129
- const y = Qt(o.x) ? fe : (
128
+ if (a === -1) return null;
129
+ const p = V(r.features[a]);
130
+ if (!p) return null;
131
+ const x = Qt(o.x) ? be : (
130
132
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
- ke(o.x)
133
+ Ne(o.x)
132
134
  );
133
135
  return /* @__PURE__ */ t.jsx(lt.g, { className: "undp-map-shapes", variants: {
134
136
  initial: {
135
137
  opacity: 0
136
138
  },
137
139
  whileInView: {
138
- opacity: s ? s === y && (!j || j.indexOf(o.id) !== -1) ? 1 : B : j ? j.indexOf(o.id) !== -1 ? 1 : B : 1,
140
+ opacity: N ? N === x && (!b || b.indexOf(o.id) !== -1) ? 1 : B : b ? b.indexOf(o.id) !== -1 ? 1 : B : 1,
139
141
  transition: {
140
- duration: N.duration
142
+ duration: C.duration
141
143
  }
142
144
  }
143
- }, initial: "initial", animate: Q ? "whileInView" : "initial", exit: {
145
+ }, initial: "initial", animate: M ? "whileInView" : "initial", exit: {
144
146
  opacity: 0,
145
147
  transition: {
146
- duration: N.duration
148
+ duration: C.duration
147
149
  }
148
- }, onMouseEnter: (n) => {
149
- U(o), K(n.clientY), le(n.clientX), re?.(o);
150
- }, onMouseMove: (n) => {
151
- U(o), K(n.clientY), le(n.clientX);
150
+ }, onMouseEnter: (c) => {
151
+ le(o), D(c.clientY), f(c.clientX), oe?.(o);
152
+ }, onMouseMove: (c) => {
153
+ le(o), D(c.clientY), f(c.clientX);
152
154
  }, onMouseLeave: () => {
153
- U(void 0), le(void 0), K(void 0), re?.(void 0);
155
+ le(void 0), f(void 0), D(void 0), oe?.(void 0);
154
156
  }, onClick: () => {
155
- (ae || X) && ($t($, o) && ye ? (H(void 0), ae?.(void 0)) : (H(o), ae?.(o)));
156
- }, children: /* @__PURE__ */ t.jsx(lt.path, { d: D, variants: {
157
+ (ae || q) && ($t(G, o) && je ? (K(void 0), ae?.(void 0)) : (K(o), ae?.(o)));
158
+ }, children: /* @__PURE__ */ t.jsx(lt.path, { d: p, variants: {
157
159
  initial: {
158
- fill: y,
160
+ fill: x,
159
161
  opacity: 0
160
162
  },
161
163
  whileInView: {
162
- fill: y,
164
+ fill: x,
163
165
  opacity: 1,
164
166
  transition: {
165
- duration: N.duration
167
+ duration: C.duration
166
168
  }
167
169
  }
168
- }, initial: "initial", animate: Q ? "whileInView" : "initial", exit: {
170
+ }, initial: "initial", animate: M ? "whileInView" : "initial", exit: {
169
171
  opacity: 0,
170
172
  transition: {
171
- duration: N.duration
173
+ duration: C.duration
172
174
  }
173
175
  }, style: {
174
- stroke: oe,
175
- strokeWidth: q,
176
+ stroke: te,
177
+ strokeWidth: R,
176
178
  vectorEffect: "non-scaling-stroke"
177
179
  } }, `${o.id}`) }, o.id);
178
180
  }) }),
179
- G ? x.features.filter(
181
+ P ? r.features.filter(
180
182
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
181
- (o) => o.properties[f] === G.id
182
- ).map((o, r) => /* @__PURE__ */ t.jsx("path", { d: R(o) || "", className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
183
+ (o) => o.properties[y] === P.id
184
+ ).map((o, a) => /* @__PURE__ */ t.jsx("path", { d: V(o) || "", className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
183
185
  fill: "none",
184
186
  fillOpacity: 0,
185
187
  strokeWidth: "0.5",
186
188
  vectorEffect: "non-scaling-stroke"
187
- } }, r)) : null,
188
- u?.features.map((o, r) => {
189
- const D = R(o);
190
- return D ? /* @__PURE__ */ t.jsx("g", { children: /* @__PURE__ */ t.jsx("path", { d: D, style: {
191
- stroke: Le || oe,
192
- strokeWidth: Te || q + 1,
189
+ } }, a)) : null,
190
+ h?.features.map((o, a) => {
191
+ const p = V(o);
192
+ return p ? /* @__PURE__ */ t.jsx("g", { children: /* @__PURE__ */ t.jsx("path", { d: p, style: {
193
+ stroke: Te || te,
194
+ strokeWidth: $e || R + 1,
193
195
  fill: "none",
194
196
  pointerEvents: "none",
195
197
  vectorEffect: "non-scaling-stroke"
196
- } }) }, r) : null;
198
+ } }) }, a) : null;
197
199
  }),
198
- ie.filter((o) => o.position === "after").map((o) => o.layer)
200
+ ne.filter((o) => o.position === "after").map((o) => o.layer)
199
201
  ] }) }),
200
- ge === !1 ? null : /* @__PURE__ */ t.jsx("div", { className: Pt("absolute left-4 bottom-4 map-color-legend", ne?.colorLegend), children: $e ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
202
+ De === !1 ? null : /* @__PURE__ */ t.jsx("div", { className: Pt("absolute left-4 bottom-4 map-color-legend", re?.colorLegend), children: He ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
201
203
  /* @__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: () => {
202
- De(!1);
204
+ J(!1);
203
205
  }, children: /* @__PURE__ */ t.jsx(eo, {}) }),
204
206
  /* @__PURE__ */ t.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
205
- width: F ? void 0 : "340px"
207
+ width: T ? void 0 : "340px"
206
208
  }, children: [
207
- C && C !== "" ? /* @__PURE__ */ t.jsx(Mt, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
209
+ w && w !== "" ? /* @__PURE__ */ t.jsx(St, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
208
210
  display: "-webkit-box",
209
211
  WebkitLineClamp: "1",
210
212
  WebkitBoxOrient: "vertical"
211
- }, children: C }) : null,
212
- F ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: a.map((o, r) => /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
213
- I(i[r % i.length]);
213
+ }, children: w }) : null,
214
+ T ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: n.map((o, a) => /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
215
+ z(i[a % i.length]);
214
216
  }, onMouseLeave: () => {
215
- I(void 0);
217
+ z(void 0);
216
218
  }, children: [
217
219
  /* @__PURE__ */ t.jsx("div", { className: "w-2 h-2 rounded-full", style: {
218
- backgroundColor: i[r % i.length]
220
+ backgroundColor: i[a % i.length]
219
221
  } }),
220
- /* @__PURE__ */ t.jsx(Mt, { size: "sm", marginBottom: "none", leading: "none", children: o })
221
- ] }, r)) }) : /* @__PURE__ */ t.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { children: [
222
- a.map((o, r) => /* @__PURE__ */ t.jsxs("g", { onMouseOver: () => {
223
- I(i[r]);
222
+ /* @__PURE__ */ t.jsx(St, { size: "sm", marginBottom: "none", leading: "none", children: o })
223
+ ] }, a)) }) : /* @__PURE__ */ t.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { children: [
224
+ n.map((o, a) => /* @__PURE__ */ t.jsxs("g", { onMouseOver: () => {
225
+ z(i[a]);
224
226
  }, onMouseLeave: () => {
225
- I(void 0);
227
+ z(void 0);
226
228
  }, className: "cursor-pointer", children: [
227
- /* @__PURE__ */ t.jsx("rect", { x: r * 320 / i.length + 1, y: 1, width: 320 / i.length - 2, height: 8, className: s === i[r] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "", style: {
228
- fill: i[r],
229
- ...s === i[r] ? {} : {
230
- stroke: i[r]
229
+ /* @__PURE__ */ t.jsx("rect", { x: a * 320 / i.length + 1, y: 1, width: 320 / i.length - 2, height: 8, className: N === i[a] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "", style: {
230
+ fill: i[a],
231
+ ...N === i[a] ? {} : {
232
+ stroke: i[a]
231
233
  }
232
234
  } }),
233
- /* @__PURE__ */ t.jsx("text", { x: (r + 1) * 320 / i.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
235
+ /* @__PURE__ */ t.jsx("text", { x: (a + 1) * 320 / i.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
234
236
  textAnchor: "middle"
235
- }, children: Jt(o, "NA", J?.precision ?? 2, void 0, void 0, J?.locale || "en", J?.padZeros || !1) })
236
- ] }, r)),
237
+ }, children: Jt(o, "NA", Z?.precision ?? 2, void 0, void 0, Z?.locale || "en", Z?.padZeros || !1) })
238
+ ] }, a)),
237
239
  /* @__PURE__ */ t.jsx("g", { children: /* @__PURE__ */ t.jsx("rect", { onMouseOver: () => {
238
- I(i[a.length]);
240
+ z(i[n.length]);
239
241
  }, onMouseLeave: () => {
240
- I(void 0);
241
- }, x: a.length * 320 / i.length + 1, y: 1, width: 320 / i.length - 2, height: 8, className: `cursor-pointer ${s === i[a.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`, style: {
242
- fill: i[a.length],
243
- ...s === i[a.length] ? {} : {
244
- stroke: i[a.length]
242
+ z(void 0);
243
+ }, x: n.length * 320 / i.length + 1, y: 1, width: 320 / i.length - 2, height: 8, className: `cursor-pointer ${N === i[n.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`, style: {
244
+ fill: i[n.length],
245
+ ...N === i[n.length] ? {} : {
246
+ stroke: i[n.length]
245
247
  }
246
248
  } }) })
247
249
  ] }) })
248
250
  ] })
249
251
  ] }) : /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button", onClick: () => {
250
- De(!0);
252
+ J(!0);
251
253
  }, children: /* @__PURE__ */ t.jsx(to, {}) }) }),
252
254
  E === "button" && /* @__PURE__ */ t.jsxs("div", { className: "absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons", children: [
253
- /* @__PURE__ */ t.jsx("button", { onClick: () => P("in"), className: "leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "+" }),
254
- /* @__PURE__ */ t.jsx("button", { onClick: () => P("out"), className: "leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "–" })
255
+ /* @__PURE__ */ t.jsx("button", { onClick: () => ue("in"), className: "leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "+" }),
256
+ /* @__PURE__ */ t.jsx("button", { onClick: () => ue("out"), className: "leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "–" })
255
257
  ] }),
256
- be && /* @__PURE__ */ t.jsx("div", { className: "absolute right-4 top-4 flex flex-col image-download-button", children: /* @__PURE__ */ t.jsx(no, { nodeID: be, buttonSmall: !0 }) })
258
+ (ie || I) && /* @__PURE__ */ t.jsxs("div", { className: "absolute right-4 top-4 flex flex-col image-download-button gap-2", children: [
259
+ ie && /* @__PURE__ */ t.jsx(no, { nodeID: ie, buttonSmall: !0, className: "p-1" }),
260
+ I && I.length > 0 && /* @__PURE__ */ t.jsx(io, { csvData: I, buttonSmall: !0, headers: Object.keys(I[0]).map((o) => ({
261
+ label: o,
262
+ key: o
263
+ })), className: "p-1" })
264
+ ] })
257
265
  ] }),
258
- X && $ !== void 0 ? /* @__PURE__ */ t.jsx(ao, { body: X, data: $, setData: H, className: ne?.modal }) : null,
259
- G && te && je && g ? /* @__PURE__ */ t.jsx(Kt, { data: G, body: te, xPos: je, yPos: g, backgroundStyle: Fe?.tooltip, className: ne?.tooltip }) : null
266
+ q && G !== void 0 ? /* @__PURE__ */ t.jsx(ro, { body: q, data: G, setData: K, className: re?.modal }) : null,
267
+ P && ee && Ce && ce ? /* @__PURE__ */ t.jsx(Kt, { data: P, body: ee, xPos: Ce, yPos: ce, backgroundStyle: Le?.tooltip, className: re?.tooltip }) : null
260
268
  ] });
261
269
  }
262
- function tr(m) {
263
- const e = Wt.c(135), {
264
- data: a,
270
+ function aa(m) {
271
+ const e = Wt.c(133), {
272
+ data: n,
265
273
  mapData: i,
266
- graphTitle: A,
267
- colors: C,
268
- sources: F,
274
+ graphTitle: L,
275
+ colors: w,
276
+ sources: T,
269
277
  graphDescription: v,
270
- height: p,
271
- width: h,
272
- footNote: L,
273
- colorDomain: te,
274
- colorLegendTitle: q,
275
- scaleType: oe,
276
- scale: fe,
277
- centerPoint: re,
278
- padding: ge,
279
- mapBorderWidth: _e,
280
- mapNoDataColor: Ae,
281
- backgroundColor: j,
278
+ height: u,
279
+ width: g,
280
+ footNote: $,
281
+ colorDomain: ee,
282
+ colorLegendTitle: R,
283
+ scaleType: te,
284
+ scale: be,
285
+ centerPoint: oe,
286
+ padding: De,
287
+ mapBorderWidth: Ae,
288
+ mapNoDataColor: Fe,
289
+ backgroundColor: b,
282
290
  mapBorderColor: ae,
283
- relativeHeight: f,
284
- tooltip: ye,
285
- onSeriesMouseOver: X,
286
- isWorldMap: Fe,
287
- showColorScale: ne,
291
+ relativeHeight: y,
292
+ tooltip: je,
293
+ onSeriesMouseOver: q,
294
+ isWorldMap: Le,
295
+ showColorScale: re,
288
296
  zoomScaleExtend: O,
289
297
  zoomTranslateExtend: E,
290
- graphID: N,
298
+ graphID: C,
291
299
  highlightedIds: B,
292
- onSeriesMouseClick: ie,
293
- mapProperty: ve,
294
- graphDownload: xe,
295
- dataDownload: T,
296
- showAntarctica: Y,
297
- language: Z,
298
- minHeight: Le,
299
- theme: Te,
300
- ariaLabel: J,
301
- resetSelectionOnDoubleClick: be,
302
- detailsOnClick: x,
303
- styles: u,
304
- classNames: s,
305
- mapProjection: I,
306
- zoomInteraction: se,
307
- animate: $e,
308
- dimmedOpacity: De,
309
- customLayers: $,
310
- timeline: H,
311
- collapseColorScaleByDefault: G,
312
- projectionRotate: U,
313
- zoomAndCenterByHighlightedIds: je,
314
- rewindCoordinatesInMapData: le,
315
- mapOverlay: g,
316
- numberDisplayOptions: K
317
- } = m, b = i === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json" : i, Q = L === 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." : L, M = oe === void 0 ? "threshold" : oe, ke = fe === void 0 ? 0.95 : fe, V = _e === void 0 ? 0.5 : _e, z = Ae === void 0 ? ct.light.graphNoData : Ae, we = j === void 0 ? !1 : j, Ce = ae === void 0 ? ct.light.grays["gray-500"] : ae, ce = Fe === void 0 ? !0 : Fe, Ne = ne === void 0 ? !0 : ne;
318
- let S;
319
- e[0] !== O ? (S = O === void 0 ? [0.8, 6] : O, e[0] = O, e[1] = S) : S = e[1];
320
- const Me = S, R = ve === void 0 ? "ISO3" : ve, P = xe === void 0 ? !1 : xe, o = T === void 0 ? !1 : T, r = Y === void 0 ? !1 : Y, D = Z === void 0 ? "en" : Z, y = Le === void 0 ? 0 : Le, n = Te === void 0 ? "light" : Te, Se = be === void 0 ? !0 : be, Oe = I === void 0 ? "naturalEarth" : I, Ee = se === void 0 ? "button" : se, He = $e === void 0 ? !1 : $e, dt = De === void 0 ? 0.3 : De;
300
+ onSeriesMouseClick: ne,
301
+ mapProperty: ke,
302
+ graphDownload: we,
303
+ dataDownload: H,
304
+ showAntarctica: X,
305
+ language: Y,
306
+ minHeight: Te,
307
+ theme: $e,
308
+ ariaLabel: Z,
309
+ resetSelectionOnDoubleClick: ie,
310
+ detailsOnClick: I,
311
+ styles: r,
312
+ classNames: h,
313
+ mapProjection: N,
314
+ zoomInteraction: z,
315
+ animate: se,
316
+ dimmedOpacity: He,
317
+ customLayers: J,
318
+ timeline: G,
319
+ collapseColorScaleByDefault: K,
320
+ projectionRotate: P,
321
+ zoomAndCenterByHighlightedIds: le,
322
+ rewindCoordinatesInMapData: Ce,
323
+ mapOverlay: f,
324
+ numberDisplayOptions: ce
325
+ } = m, D = i === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json" : i, S = $ === 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." : $, M = te === void 0 ? "threshold" : te, de = be === void 0 ? 0.95 : be, Ne = Ae === void 0 ? 0.5 : Ae, U = Fe === void 0 ? ct.light.graphNoData : Fe, W = b === void 0 ? !1 : b, Se = ae === void 0 ? ct.light.grays["gray-500"] : ae, me = Le === void 0 ? !0 : Le, Me = re === void 0 ? !0 : re;
326
+ let pe;
327
+ e[0] !== O ? (pe = O === void 0 ? [0.8, 6] : O, e[0] = O, e[1] = pe) : pe = e[1];
328
+ const _ = pe, Oe = ke === void 0 ? "ISO3" : ke, V = we === void 0 ? !1 : we, ue = H === void 0 ? !1 : H, o = X === void 0 ? !1 : X, a = Y === void 0 ? "en" : Y, p = Te === void 0 ? 0 : Te, x = $e === void 0 ? "light" : $e, c = ie === void 0 ? !0 : ie, Ee = N === void 0 ? "naturalEarth" : N, Be = z === void 0 ? "button" : z, he = se === void 0 ? !1 : se, dt = He === void 0 ? 0.3 : He;
321
329
  let Ge;
322
- e[2] !== $ ? (Ge = $ === void 0 ? [] : $, e[2] = $, e[3] = Ge) : Ge = e[3];
330
+ e[2] !== J ? (Ge = J === void 0 ? [] : J, e[2] = J, e[3] = Ge) : Ge = e[3];
323
331
  const mt = Ge;
324
332
  let Ue;
325
- e[4] !== H ? (Ue = H === void 0 ? {
333
+ e[4] !== G ? (Ue = G === void 0 ? {
326
334
  enabled: !1,
327
335
  autoplay: !1,
328
336
  showOnlyActiveDate: !0
329
- } : H, e[4] = H, e[5] = Ue) : Ue = e[5];
330
- const l = Ue;
337
+ } : G, e[4] = G, e[5] = Ue) : Ue = e[5];
338
+ const s = Ue;
331
339
  let Ve;
332
- e[6] !== U ? (Ve = U === void 0 ? [0, 0] : U, e[6] = U, e[7] = Ve) : Ve = e[7];
333
- const pt = Ve, ut = je === void 0 ? !1 : je, ht = le === void 0 ? !0 : le, [ee, Ot] = k(0), [Be, Et] = k(0), [W, Bt] = k(l.autoplay);
334
- let Ie;
335
- if (e[8] !== a || e[9] !== l.dateFormat) {
336
- let c;
337
- e[11] !== l.dateFormat ? (c = (w) => Tt(`${w.date}`, l.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), e[11] = l.dateFormat, e[12] = c) : c = e[12], Ie = [...new Set(a.filter(No).map(c))], Ie.sort(Co), e[8] = a, e[9] = l.dateFormat, e[10] = Ie;
340
+ e[6] !== P ? (Ve = P === void 0 ? [0, 0] : P, e[6] = P, e[7] = Ve) : Ve = e[7];
341
+ const pt = Ve, ut = le === void 0 ? !1 : le, ht = Ce === void 0 ? !0 : Ce, [Q, Ot] = j(0), [Ie, Et] = j(0), [A, Bt] = j(s.autoplay);
342
+ let ze;
343
+ if (e[8] !== n || e[9] !== s.dateFormat) {
344
+ let l;
345
+ e[11] !== s.dateFormat ? (l = (k) => Tt(`${k.date}`, s.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), e[11] = s.dateFormat, e[12] = l) : l = e[12], ze = [...new Set(n.filter(So).map(l))], ze.sort(No), e[8] = n, e[9] = s.dateFormat, e[10] = ze;
338
346
  } else
339
- Ie = e[10];
340
- const d = Ie, [_, ft] = k(l.autoplay ? 0 : d.length - 1), [de, It] = k(void 0), [gt, zt] = k(void 0), yt = We(null), vt = We(null);
347
+ ze = e[10];
348
+ const d = ze, [F, ft] = j(s.autoplay ? 0 : d.length - 1), [fe, It] = j(void 0), [gt, zt] = j(void 0), yt = _e(null), kt = _e(null);
341
349
  let Re, qe;
342
350
  e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Re = () => {
343
- const c = new ResizeObserver((w) => {
344
- Ot(w[0].target.clientWidth || 620), Et(w[0].target.clientHeight || 480);
351
+ const l = new ResizeObserver((k) => {
352
+ Ot(k[0].target.clientWidth || 620), Et(k[0].target.clientHeight || 480);
345
353
  });
346
- return yt.current && c.observe(yt.current), () => c.disconnect();
347
- }, qe = [], e[13] = Re, e[14] = qe) : (Re = e[13], qe = e[14]), Pe(Re, qe);
354
+ return yt.current && l.observe(yt.current), () => l.disconnect();
355
+ }, qe = [], e[13] = Re, e[14] = qe) : (Re = e[13], qe = e[14]), We(Re, qe);
348
356
  let Xe;
349
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Xe = (c) => {
350
- It(c);
357
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Xe = (l) => {
358
+ It(l);
351
359
  }, e[15] = Xe) : Xe = e[15];
352
360
  const Ye = Ct(Xe);
353
361
  let Ze;
354
- e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ze = (c) => {
355
- zt(c);
362
+ e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ze = (l) => {
363
+ zt(l);
356
364
  }, e[16] = Ze) : Ze = e[16];
357
- const ze = Ct(Ze);
365
+ const Pe = Ct(Ze);
358
366
  let Je;
359
- e[17] !== b || e[18] !== Ye ? (Je = () => {
360
- typeof b == "string" ? St(b).then((w) => {
361
- Ye(w);
362
- }) : Ye(b);
363
- }, e[17] = b, e[18] = Ye, e[19] = Je) : Je = e[19];
367
+ e[17] !== D || e[18] !== Ye ? (Je = () => {
368
+ typeof D == "string" ? Mt(D).then((k) => {
369
+ Ye(k);
370
+ }) : Ye(D);
371
+ }, e[17] = D, e[18] = Ye, e[19] = Je) : Je = e[19];
364
372
  let Ke;
365
- e[20] !== b ? (Ke = [b], e[20] = b, e[21] = Ke) : Ke = e[21], Pe(Je, Ke);
373
+ e[20] !== D ? (Ke = [D], e[20] = D, e[21] = Ke) : Ke = e[21], We(Je, Ke);
366
374
  let Qe;
367
- e[22] !== g?.mapData || e[23] !== ze ? (Qe = () => {
368
- g?.mapData || ze(void 0), typeof g?.mapData == "string" ? St(g?.mapData).then((w) => {
369
- ze(w);
370
- }) : ze(g?.mapData);
371
- }, e[22] = g?.mapData, e[23] = ze, e[24] = Qe) : Qe = e[24];
372
- const xt = g?.mapData;
375
+ e[22] !== f?.mapData || e[23] !== Pe ? (Qe = () => {
376
+ f?.mapData || Pe(void 0), typeof f?.mapData == "string" ? Mt(f?.mapData).then((k) => {
377
+ Pe(k);
378
+ }) : Pe(f?.mapData);
379
+ }, e[22] = f?.mapData, e[23] = Pe, e[24] = Qe) : Qe = e[24];
380
+ const vt = f?.mapData;
373
381
  let et;
374
- e[25] !== xt ? (et = [xt], e[25] = xt, e[26] = et) : et = e[26], Pe(Qe, et);
382
+ e[25] !== vt ? (et = [vt], e[25] = vt, e[26] = et) : et = e[26], We(Qe, et);
375
383
  let tt;
376
- e[27] !== te || e[28] !== C?.length || e[29] !== a || e[30] !== M ? (tt = te || (M === "categorical" ? uo(a, "x") : ho(a.map(wo), C?.length || 4)), e[27] = te, e[28] = C?.length, e[29] = a, e[30] = M, e[31] = tt) : tt = e[31];
384
+ e[27] !== ee || e[28] !== w?.length || e[29] !== n || e[30] !== M ? (tt = ee || (M === "categorical" ? ho(n, "x") : fo(n.map(Co), w?.length || 4)), e[27] = ee, e[28] = w?.length, e[29] = n, e[30] = M, e[31] = tt) : tt = e[31];
377
385
  const ot = tt;
378
- let rt, at;
379
- e[32] !== W || e[33] !== l.speed || e[34] !== d ? (rt = () => {
380
- const c = setInterval(() => {
381
- ft((w) => w < d.length - 1 ? w + 1 : 0);
382
- }, (l.speed || 2) * 1e3);
383
- return W || clearInterval(c), () => clearInterval(c);
384
- }, at = [d, W, l.speed], e[32] = W, e[33] = l.speed, e[34] = d, e[35] = rt, e[36] = at) : (rt = e[35], at = e[36]), Pe(rt, at);
385
- const bt = l.dateFormat || "yyyy";
386
+ let at, rt;
387
+ e[32] !== A || e[33] !== s.speed || e[34] !== d ? (at = () => {
388
+ const l = setInterval(() => {
389
+ ft((k) => k < d.length - 1 ? k + 1 : 0);
390
+ }, (s.speed || 2) * 1e3);
391
+ return A || clearInterval(l), () => clearInterval(l);
392
+ }, rt = [d, A, s.speed], e[32] = A, e[33] = s.speed, e[34] = d, e[35] = at, e[36] = rt) : (at = e[35], rt = e[36]), We(at, rt);
393
+ const xt = s.dateFormat || "yyyy";
386
394
  let nt;
387
- e[37] !== _ || e[38] !== bt || e[39] !== l.showOnlyActiveDate || e[40] !== d ? (nt = _t(d, _, l.showOnlyActiveDate, bt), e[37] = _, e[38] = bt, e[39] = l.showOnlyActiveDate, e[40] = d, e[41] = nt) : nt = e[41];
388
- const it = nt, Dt = s?.graphContainer, jt = u?.graphContainer;
389
- let me;
390
- e[42] !== s?.description || e[43] !== s?.title || e[44] !== a || e[45] !== o || e[46] !== v || e[47] !== P || e[48] !== A || e[49] !== u?.description || e[50] !== u?.title || e[51] !== h ? (me = A || v || o ? /* @__PURE__ */ t.jsx(po, { styles: {
391
- title: u?.title,
392
- description: u?.description
395
+ e[37] !== F || e[38] !== xt || e[39] !== s.showOnlyActiveDate || e[40] !== d ? (nt = _t(d, F, s.showOnlyActiveDate, xt), e[37] = F, e[38] = xt, e[39] = s.showOnlyActiveDate, e[40] = d, e[41] = nt) : nt = e[41];
396
+ const it = nt, bt = h?.graphContainer, Dt = r?.graphContainer;
397
+ let ge;
398
+ e[42] !== h?.description || e[43] !== h?.title || e[44] !== v || e[45] !== L || e[46] !== r?.description || e[47] !== r?.title || e[48] !== g ? (ge = L || v ? /* @__PURE__ */ t.jsx(uo, { styles: {
399
+ title: r?.title,
400
+ description: r?.description
393
401
  }, classNames: {
394
- title: s?.title,
395
- description: s?.description
396
- }, graphTitle: A, graphDescription: v, width: h, graphDownload: P ? vt : void 0, dataDownload: o ? a.map(ko).filter(jo).length > 0 ? a.map(Do).filter(bo) : a.filter(xo) : null }) : null, e[42] = s?.description, e[43] = s?.title, e[44] = a, e[45] = o, e[46] = v, e[47] = P, e[48] = A, e[49] = u?.description, e[50] = u?.title, e[51] = h, e[52] = me) : me = e[52];
397
- let pe;
398
- e[53] !== _ || e[54] !== it || e[55] !== W || e[56] !== l.enabled || e[57] !== d ? (pe = l.enabled && d.length > 0 && it ? /* @__PURE__ */ t.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
402
+ title: h?.title,
403
+ description: h?.description
404
+ }, graphTitle: L, graphDescription: v, width: g }) : null, e[42] = h?.description, e[43] = h?.title, e[44] = v, e[45] = L, e[46] = r?.description, e[47] = r?.title, e[48] = g, e[49] = ge) : ge = e[49];
405
+ let ye;
406
+ e[50] !== F || e[51] !== it || e[52] !== A || e[53] !== s.enabled || e[54] !== d ? (ye = s.enabled && d.length > 0 && it ? /* @__PURE__ */ t.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
399
407
  /* @__PURE__ */ t.jsx("button", { type: "button", onClick: () => {
400
- Bt(!W);
401
- }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": W ? "Click to pause animation" : "Click to play animation", children: W ? /* @__PURE__ */ t.jsx(oo, {}) : /* @__PURE__ */ t.jsx(ro, {}) }),
402
- /* @__PURE__ */ t.jsx(At, { min: d[0], max: d[d.length - 1], marks: it, step: null, defaultValue: d[d.length - 1], value: d[_], onChangeComplete: (c) => {
403
- ft(d.indexOf(c));
404
- }, onChange: (c) => {
405
- ft(d.indexOf(c));
408
+ Bt(!A);
409
+ }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": A ? "Click to pause animation" : "Click to play animation", children: A ? /* @__PURE__ */ t.jsx(oo, {}) : /* @__PURE__ */ t.jsx(ao, {}) }),
410
+ /* @__PURE__ */ t.jsx(At, { min: d[0], max: d[d.length - 1], marks: it, step: null, defaultValue: d[d.length - 1], value: d[F], onChangeComplete: (l) => {
411
+ ft(d.indexOf(l));
412
+ }, onChange: (l) => {
413
+ ft(d.indexOf(l));
406
414
  }, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
407
- ] }) : null, e[53] = _, e[54] = it, e[55] = W, e[56] = l.enabled, e[57] = d, e[58] = pe) : pe = e[58];
408
- let ue;
409
- e[59] !== He || e[60] !== re || e[61] !== s || e[62] !== G || e[63] !== q || e[64] !== C || e[65] !== mt || e[66] !== a || e[67] !== x || e[68] !== dt || e[69] !== ot || e[70] !== P || e[71] !== p || e[72] !== B || e[73] !== _ || e[74] !== ce || e[75] !== Ce || e[76] !== V || e[77] !== z || e[78] !== g?.mapBorderColor || e[79] !== g?.mapBorderWidth || e[80] !== Oe || e[81] !== R || e[82] !== de || e[83] !== y || e[84] !== K || e[85] !== ie || e[86] !== X || e[87] !== gt || e[88] !== pt || e[89] !== f || e[90] !== Se || e[91] !== ht || e[92] !== ke || e[93] !== M || e[94] !== r || e[95] !== Ne || e[96] !== u || e[97] !== Be || e[98] !== ee || e[99] !== n || e[100] !== l.dateFormat || e[101] !== l.enabled || e[102] !== ye || e[103] !== d || e[104] !== h || e[105] !== ut || e[106] !== Ee || e[107] !== Me || e[108] !== E ? (ue = /* @__PURE__ */ t.jsx(fo, { ref: yt, children: ee && Be && de ? /* @__PURE__ */ t.jsx(yo, { data: a.filter((c) => l.enabled ? `${c.date}` === Lt(new Date(d[_]), l.dateFormat || "yyyy") : c), mapData: r ? de : {
410
- ...de,
411
- features: de.features.filter(vo)
412
- }, colorDomain: ot, width: ee, height: Be, scale: ke, centerPoint: re, colors: C || (M === "categorical" ? ct[n].categoricalColors.colors : ct[n].sequentialColors[`neutralColorsx0${ot.length + 1}`]), colorLegendTitle: q, mapBorderWidth: V, mapNoDataColor: z, categorical: M === "categorical", mapBorderColor: Ce, tooltip: ye, onSeriesMouseOver: X, isWorldMap: ce, showColorScale: Ne, zoomScaleExtend: Me, zoomTranslateExtend: E, onSeriesMouseClick: ie, mapProperty: R, highlightedIds: B, resetSelectionOnDoubleClick: Se, styles: u, overlayMapData: gt, overlayMapBorderColor: g?.mapBorderColor, overlayMapBorderWidth: g?.mapBorderWidth, classNames: s, detailsOnClick: x, mapProjection: Oe || (ce ? "naturalEarth" : "mercator"), zoomInteraction: Ee, dimmedOpacity: dt, animate: He === !0 ? {
415
+ ] }) : null, e[50] = F, e[51] = it, e[52] = A, e[53] = s.enabled, e[54] = d, e[55] = ye) : ye = e[55];
416
+ let ve;
417
+ e[56] !== he || e[57] !== oe || e[58] !== h || e[59] !== K || e[60] !== R || e[61] !== w || e[62] !== mt || e[63] !== n || e[64] !== ue || e[65] !== I || e[66] !== dt || e[67] !== ot || e[68] !== V || e[69] !== u || e[70] !== B || e[71] !== F || e[72] !== me || e[73] !== Se || e[74] !== Ne || e[75] !== U || e[76] !== f?.mapBorderColor || e[77] !== f?.mapBorderWidth || e[78] !== Ee || e[79] !== Oe || e[80] !== fe || e[81] !== p || e[82] !== ce || e[83] !== ne || e[84] !== q || e[85] !== gt || e[86] !== pt || e[87] !== y || e[88] !== c || e[89] !== ht || e[90] !== de || e[91] !== M || e[92] !== o || e[93] !== Me || e[94] !== r || e[95] !== Ie || e[96] !== Q || e[97] !== x || e[98] !== s.dateFormat || e[99] !== s.enabled || e[100] !== je || e[101] !== d || e[102] !== g || e[103] !== ut || e[104] !== Be || e[105] !== _ || e[106] !== E ? (ve = /* @__PURE__ */ t.jsx(go, { ref: yt, children: Q && Ie && fe ? /* @__PURE__ */ t.jsx(vo, { data: n.filter((l) => s.enabled ? `${l.date}` === Lt(new Date(d[F]), s.dateFormat || "yyyy") : l), mapData: o ? fe : {
418
+ ...fe,
419
+ features: fe.features.filter(wo)
420
+ }, colorDomain: ot, width: Q, height: Ie, scale: de, centerPoint: oe, colors: w || (M === "categorical" ? ct[x].categoricalColors.colors : ct[x].sequentialColors[`neutralColorsx0${ot.length + 1}`]), colorLegendTitle: R, mapBorderWidth: Ne, mapNoDataColor: U, categorical: M === "categorical", mapBorderColor: Se, tooltip: je, onSeriesMouseOver: q, isWorldMap: me, showColorScale: Me, zoomScaleExtend: _, zoomTranslateExtend: E, onSeriesMouseClick: ne, mapProperty: Oe, highlightedIds: B, resetSelectionOnDoubleClick: c, styles: r, overlayMapData: gt, overlayMapBorderColor: f?.mapBorderColor, overlayMapBorderWidth: f?.mapBorderWidth, classNames: h, detailsOnClick: I, mapProjection: Ee || (me ? "naturalEarth" : "mercator"), zoomInteraction: Be, dimmedOpacity: dt, animate: he === !0 ? {
413
421
  duration: 0.5,
414
422
  once: !0,
415
423
  amount: 0.5
416
- } : He || {
424
+ } : he || {
417
425
  duration: 0,
418
426
  once: !0,
419
427
  amount: 0
420
- }, customLayers: mt, zoomAndCenterByHighlightedIds: ut, collapseColorScaleByDefault: G, projectionRotate: pt, rewindCoordinatesInMapData: ht, numberDisplayOptions: K, graphDownload: P ? vt : void 0 }) : /* @__PURE__ */ t.jsx("div", { style: {
421
- height: `${Math.max(y, p || (f ? y ? (h || ee) * f > y ? (h || ee) * f : y : (h || ee) * f : Be))}px`
422
- }, className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(Ft, { "aria-label": "Loading graph" }) }) }), e[59] = He, e[60] = re, e[61] = s, e[62] = G, e[63] = q, e[64] = C, e[65] = mt, e[66] = a, e[67] = x, e[68] = dt, e[69] = ot, e[70] = P, e[71] = p, e[72] = B, e[73] = _, e[74] = ce, e[75] = Ce, e[76] = V, e[77] = z, e[78] = g?.mapBorderColor, e[79] = g?.mapBorderWidth, e[80] = Oe, e[81] = R, e[82] = de, e[83] = y, e[84] = K, e[85] = ie, e[86] = X, e[87] = gt, e[88] = pt, e[89] = f, e[90] = Se, e[91] = ht, e[92] = ke, e[93] = M, e[94] = r, e[95] = Ne, e[96] = u, e[97] = Be, e[98] = ee, e[99] = n, e[100] = l.dateFormat, e[101] = l.enabled, e[102] = ye, e[103] = d, e[104] = h, e[105] = ut, e[106] = Ee, e[107] = Me, e[108] = E, e[109] = ue) : ue = e[109];
423
- let he;
424
- e[110] !== s?.footnote || e[111] !== s?.source || e[112] !== Q || e[113] !== F || e[114] !== u?.footnote || e[115] !== u?.source || e[116] !== h ? (he = F || Q ? /* @__PURE__ */ t.jsx(mo, { styles: {
425
- footnote: u?.footnote,
426
- source: u?.source
428
+ }, customLayers: mt, zoomAndCenterByHighlightedIds: ut, collapseColorScaleByDefault: K, projectionRotate: pt, rewindCoordinatesInMapData: ht, numberDisplayOptions: ce, graphDownload: V ? kt : void 0, dataDownload: ue ? n.map(ko).filter(jo).length > 0 ? n.map(Do).filter(bo) : n.filter(xo) : null }) : /* @__PURE__ */ t.jsx("div", { style: {
429
+ height: `${Math.max(p, u || (y ? p ? (g || Q) * y > p ? (g || Q) * y : p : (g || Q) * y : Ie))}px`
430
+ }, className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(Ft, { "aria-label": "Loading graph" }) }) }), e[56] = he, e[57] = oe, e[58] = h, e[59] = K, e[60] = R, e[61] = w, e[62] = mt, e[63] = n, e[64] = ue, e[65] = I, e[66] = dt, e[67] = ot, e[68] = V, e[69] = u, e[70] = B, e[71] = F, e[72] = me, e[73] = Se, e[74] = Ne, e[75] = U, e[76] = f?.mapBorderColor, e[77] = f?.mapBorderWidth, e[78] = Ee, e[79] = Oe, e[80] = fe, e[81] = p, e[82] = ce, e[83] = ne, e[84] = q, e[85] = gt, e[86] = pt, e[87] = y, e[88] = c, e[89] = ht, e[90] = de, e[91] = M, e[92] = o, e[93] = Me, e[94] = r, e[95] = Ie, e[96] = Q, e[97] = x, e[98] = s.dateFormat, e[99] = s.enabled, e[100] = je, e[101] = d, e[102] = g, e[103] = ut, e[104] = Be, e[105] = _, e[106] = E, e[107] = ve) : ve = e[107];
431
+ let xe;
432
+ e[108] !== h?.footnote || e[109] !== h?.source || e[110] !== S || e[111] !== T || e[112] !== r?.footnote || e[113] !== r?.source || e[114] !== g ? (xe = T || S ? /* @__PURE__ */ t.jsx(po, { styles: {
433
+ footnote: r?.footnote,
434
+ source: r?.source
427
435
  }, classNames: {
428
- footnote: s?.footnote,
429
- source: s?.source
430
- }, sources: F, footNote: Q, width: h }) : null, e[110] = s?.footnote, e[111] = s?.source, e[112] = Q, e[113] = F, e[114] = u?.footnote, e[115] = u?.source, e[116] = h, e[117] = he) : he = e[117];
436
+ footnote: h?.footnote,
437
+ source: h?.source
438
+ }, sources: T, footNote: S, width: g }) : null, e[108] = h?.footnote, e[109] = h?.source, e[110] = S, e[111] = T, e[112] = r?.footnote, e[113] = r?.source, e[114] = g, e[115] = xe) : xe = e[115];
431
439
  let st;
432
- return e[118] !== J || e[119] !== we || e[120] !== N || e[121] !== p || e[122] !== D || e[123] !== y || e[124] !== ge || e[125] !== f || e[126] !== Dt || e[127] !== jt || e[128] !== me || e[129] !== pe || e[130] !== ue || e[131] !== he || e[132] !== n || e[133] !== h ? (st = /* @__PURE__ */ t.jsxs(go, { className: Dt, style: jt, id: N, ref: vt, "aria-label": J, backgroundColor: we, theme: n, language: D, minHeight: y, width: h, height: p, relativeHeight: f, padding: ge, children: [
433
- me,
434
- pe,
435
- ue,
436
- he
437
- ] }), e[118] = J, e[119] = we, e[120] = N, e[121] = p, e[122] = D, e[123] = y, e[124] = ge, e[125] = f, e[126] = Dt, e[127] = jt, e[128] = me, e[129] = pe, e[130] = ue, e[131] = he, e[132] = n, e[133] = h, e[134] = st) : st = e[134], st;
438
- }
439
- function vo(m) {
440
- return m.properties?.NAME !== "Antarctica";
440
+ return e[116] !== Z || e[117] !== W || e[118] !== C || e[119] !== u || e[120] !== a || e[121] !== p || e[122] !== De || e[123] !== y || e[124] !== bt || e[125] !== Dt || e[126] !== ge || e[127] !== ye || e[128] !== ve || e[129] !== xe || e[130] !== x || e[131] !== g ? (st = /* @__PURE__ */ t.jsxs(yo, { className: bt, style: Dt, id: C, ref: kt, "aria-label": Z, backgroundColor: W, theme: x, language: a, minHeight: p, width: g, height: u, relativeHeight: y, padding: De, children: [
441
+ ge,
442
+ ye,
443
+ ve,
444
+ xe
445
+ ] }), e[116] = Z, e[117] = W, e[118] = C, e[119] = u, e[120] = a, e[121] = p, e[122] = De, e[123] = y, e[124] = bt, e[125] = Dt, e[126] = ge, e[127] = ye, e[128] = ve, e[129] = xe, e[130] = x, e[131] = g, e[132] = st) : st = e[132], st;
441
446
  }
442
447
  function xo(m) {
443
448
  return m !== void 0;
@@ -455,15 +460,18 @@ function ko(m) {
455
460
  return m.data;
456
461
  }
457
462
  function wo(m) {
463
+ return m.properties?.NAME !== "Antarctica";
464
+ }
465
+ function Co(m) {
458
466
  return m.x;
459
467
  }
460
- function Co(m, e) {
468
+ function No(m, e) {
461
469
  return m - e;
462
470
  }
463
- function No(m) {
471
+ function So(m) {
464
472
  return m.date;
465
473
  }
466
474
  export {
467
- tr as ChoroplethMap
475
+ aa as ChoroplethMap
468
476
  };
469
477
  //# sourceMappingURL=ChoroplethMap.js.map