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