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