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