@undp/data-viz 2.2.3 → 2.3.0

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