@undp/data-viz 2.5.0 → 2.5.1

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