@undp/data-viz 2.5.2 → 2.5.4
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 +337 -308
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/Colors.cjs +1 -1
- package/dist/Colors.cjs.map +1 -1
- package/dist/Colors.d.ts +16 -0
- package/dist/Colors.js +16 -0
- package/dist/Colors.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 +406 -377
- 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/index.d.ts +16 -0
- package/package.json +1 -1
package/dist/HybridMap.js
CHANGED
|
@@ -1,207 +1,209 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { f as
|
|
5
|
-
import { g as
|
|
6
|
-
import { w as
|
|
7
|
-
import { i as
|
|
8
|
-
import { i as Ft, z as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { i as
|
|
1
|
+
import { _ as eo, m as Lt, a as Ut, j as a, c as to } from "./index-CHPV5EwG-BzibaIRc.js";
|
|
2
|
+
import * as oo from "react";
|
|
3
|
+
import ao, { useMemo as $t, useState as B, useRef as Ze, useEffect as Ye, useEffectEvent as Vt } from "react";
|
|
4
|
+
import { f as ro, p as io } from "./parse-Dv4of-PN.js";
|
|
5
|
+
import { g as no, N as lo } from "./getSliderMarks-X-_goqH9.js";
|
|
6
|
+
import { w as so } from "./Spinner-B2IIKg9r.js";
|
|
7
|
+
import { i as At } from "./index-Bwrro8-q.js";
|
|
8
|
+
import { i as Ft, z as co, a as mo, g as po, b as uo, c as ho, d as fo, e as go, f as yo } from "./index-CKpKc9DR.js";
|
|
9
|
+
import { _ as Xe } from "./Typography-BO0gQDIT.js";
|
|
10
|
+
import { i as vo } from "./index-DCsFBfJ_.js";
|
|
11
11
|
import { n as Tt } from "./Source-QGk8vhkS.js";
|
|
12
|
-
import { w as
|
|
13
|
-
import { T as
|
|
14
|
-
import { X as
|
|
15
|
-
import { D as
|
|
16
|
-
import { ImageDownloadButton as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
12
|
+
import { w as xo } from "./index-w64Zl8io-ihagHOdP.js";
|
|
13
|
+
import { T as bo } from "./Tooltip-3EYDVa3w.js";
|
|
14
|
+
import { X as jo, E as wo, P as ko, e as Do } from "./index-ApTBN0kp.js";
|
|
15
|
+
import { D as Co } from "./DetailsModal-GqEbGHY2.js";
|
|
16
|
+
import { ImageDownloadButton as No } from "./ImageDownloadButton.js";
|
|
17
|
+
import { CsvDownloadButton as Mo } from "./CsvDownloadButton.js";
|
|
18
|
+
import { s as So } from "./pow-BXYLJHCq.js";
|
|
19
|
+
import { o as Oo } from "./ordinal-CHaxGJ_l.js";
|
|
20
|
+
import { t as Eo } from "./threshold-DFfqcDMa.js";
|
|
20
21
|
import { s as Pt } from "./select-DKy99ogv.js";
|
|
21
22
|
import { m as se } from "./proxy-BsxtcZKa.js";
|
|
22
|
-
import { c as
|
|
23
|
-
import { n as
|
|
24
|
-
import { u as
|
|
23
|
+
import { c as xt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
24
|
+
import { n as _t } from "./numberFormattingFunction-BUUV_luR.js";
|
|
25
|
+
import { u as Bo } from "./use-in-view-KOXq5Kmc.js";
|
|
25
26
|
import { A as Io } from "./index-Cv_5q6Rb.js";
|
|
26
|
-
import { GraphFooter as
|
|
27
|
-
import { GraphHeader as
|
|
28
|
-
import { Colors as
|
|
29
|
-
import { f as
|
|
30
|
-
import { a as
|
|
31
|
-
import { g as
|
|
32
|
-
import { g as
|
|
33
|
-
var Vo = "Separator",
|
|
34
|
-
const { decorative: o, orientation:
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
|
|
27
|
+
import { GraphFooter as zo } from "./GraphFooter.js";
|
|
28
|
+
import { GraphHeader as Po } from "./GraphHeader.js";
|
|
29
|
+
import { Colors as Me } from "./Colors.js";
|
|
30
|
+
import { f as Rt } from "./fetchAndParseData-BAXhgTDM.js";
|
|
31
|
+
import { a as _o, G as Lo } from "./GraphContainer-B8ZqOzKI.js";
|
|
32
|
+
import { g as Wo } from "./getUniqValue-DsqSii6M.js";
|
|
33
|
+
import { g as $o } from "./getJenks-DTCcQSDi.js";
|
|
34
|
+
var Vo = "Separator", Gt = "horizontal", Ao = ["horizontal", "vertical"], qt = oo.forwardRef((r, e) => {
|
|
35
|
+
const { decorative: o, orientation: b = Gt, ...g } = r, i = Fo(b) ? b : Gt, y = o ? { role: "none" } : { "aria-orientation": i === "vertical" ? i : void 0, role: "separator" };
|
|
36
|
+
return /* @__PURE__ */ Ut.jsx(
|
|
37
|
+
xo.div,
|
|
37
38
|
{
|
|
38
|
-
"data-orientation":
|
|
39
|
-
...v,
|
|
39
|
+
"data-orientation": i,
|
|
40
40
|
...y,
|
|
41
|
+
...g,
|
|
41
42
|
ref: e
|
|
42
43
|
}
|
|
43
44
|
);
|
|
44
45
|
});
|
|
45
|
-
|
|
46
|
+
qt.displayName = Vo;
|
|
46
47
|
function Fo(r) {
|
|
47
|
-
return
|
|
48
|
+
return Ao.includes(r);
|
|
48
49
|
}
|
|
49
|
-
var
|
|
50
|
-
const
|
|
51
|
-
const o =
|
|
52
|
-
let
|
|
50
|
+
var Ht = qt;
|
|
51
|
+
const Xt = ao.forwardRef((r, e) => {
|
|
52
|
+
const o = eo.c(14);
|
|
53
|
+
let b, g, i, y;
|
|
53
54
|
o[0] !== r ? ({
|
|
54
|
-
className:
|
|
55
|
-
variant:
|
|
56
|
-
orientation:
|
|
57
|
-
...
|
|
58
|
-
} = r, o[0] = r, o[1] =
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
o[5] !==
|
|
62
|
-
let
|
|
63
|
-
return o[9] !== s || o[10] !==
|
|
55
|
+
className: b,
|
|
56
|
+
variant: i,
|
|
57
|
+
orientation: y,
|
|
58
|
+
...g
|
|
59
|
+
} = r, o[0] = r, o[1] = b, o[2] = g, o[3] = i, o[4] = y) : (b = o[1], g = o[2], i = o[3], y = o[4]);
|
|
60
|
+
const v = i === void 0 ? "dark" : i, s = y === void 0 ? "horizontal" : y, h = s === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", M = v === "dark" ? "bg-primary-gray-600 dark:bg-primary-gray-200" : "bg-primary-gray-400 dark:bg-primary-gray-550";
|
|
61
|
+
let C;
|
|
62
|
+
o[5] !== b || o[6] !== h || o[7] !== M ? (C = Lt(h, M, b), o[5] = b, o[6] = h, o[7] = M, o[8] = C) : C = o[8];
|
|
63
|
+
let P;
|
|
64
|
+
return o[9] !== s || o[10] !== g || o[11] !== e || o[12] !== C ? (P = /* @__PURE__ */ Ut.jsx(Ht, { ...g, ref: e, orientation: s, className: C }), o[9] = s, o[10] = g, o[11] = e, o[12] = C, o[13] = P) : P = o[13], P;
|
|
64
65
|
});
|
|
65
|
-
|
|
66
|
+
Xt.displayName = Ht.displayName;
|
|
66
67
|
function To(r) {
|
|
67
68
|
const {
|
|
68
69
|
data: e,
|
|
69
70
|
colors: o,
|
|
70
|
-
mapData:
|
|
71
|
-
mapColorLegendTitle:
|
|
72
|
-
colorDomain:
|
|
73
|
-
radius:
|
|
74
|
-
height:
|
|
71
|
+
mapData: b,
|
|
72
|
+
mapColorLegendTitle: g,
|
|
73
|
+
colorDomain: i,
|
|
74
|
+
radius: y,
|
|
75
|
+
height: v,
|
|
75
76
|
width: s,
|
|
76
|
-
scale:
|
|
77
|
-
centerPoint:
|
|
78
|
-
tooltip:
|
|
79
|
-
showLabels:
|
|
77
|
+
scale: h,
|
|
78
|
+
centerPoint: M,
|
|
79
|
+
tooltip: C,
|
|
80
|
+
showLabels: P,
|
|
80
81
|
mapBorderWidth: ce,
|
|
81
82
|
mapBorderColor: de,
|
|
82
|
-
mapNoDataColor:
|
|
83
|
-
onSeriesMouseOver:
|
|
84
|
-
showColorScale:
|
|
85
|
-
zoomScaleExtend:
|
|
86
|
-
zoomTranslateExtend:
|
|
87
|
-
highlightedDataPoints:
|
|
88
|
-
onSeriesMouseClick:
|
|
89
|
-
resetSelectionOnDoubleClick:
|
|
90
|
-
detailsOnClick:
|
|
91
|
-
styles:
|
|
92
|
-
classNames:
|
|
93
|
-
mapProjection:
|
|
94
|
-
zoomInteraction:
|
|
95
|
-
animate:
|
|
96
|
-
dimmedOpacity:
|
|
83
|
+
mapNoDataColor: Se,
|
|
84
|
+
onSeriesMouseOver: H,
|
|
85
|
+
showColorScale: Oe,
|
|
86
|
+
zoomScaleExtend: Je,
|
|
87
|
+
zoomTranslateExtend: Ke,
|
|
88
|
+
highlightedDataPoints: Ee,
|
|
89
|
+
onSeriesMouseClick: F,
|
|
90
|
+
resetSelectionOnDoubleClick: Be,
|
|
91
|
+
detailsOnClick: X,
|
|
92
|
+
styles: S,
|
|
93
|
+
classNames: Y,
|
|
94
|
+
mapProjection: ie,
|
|
95
|
+
zoomInteraction: Z,
|
|
96
|
+
animate: x,
|
|
97
|
+
dimmedOpacity: _,
|
|
97
98
|
customLayers: me,
|
|
98
|
-
maxRadiusValue:
|
|
99
|
-
categorical:
|
|
100
|
-
dotColor:
|
|
101
|
-
collapseColorScaleByDefault:
|
|
102
|
-
highlightedIds:
|
|
99
|
+
maxRadiusValue: Ie,
|
|
100
|
+
categorical: J,
|
|
101
|
+
dotColor: K,
|
|
102
|
+
collapseColorScaleByDefault: ze,
|
|
103
|
+
highlightedIds: T,
|
|
103
104
|
mapProperty: pe,
|
|
104
105
|
dotLegendTitle: ue,
|
|
105
|
-
dotBorderColor:
|
|
106
|
-
labelColor:
|
|
107
|
-
projectionRotate:
|
|
108
|
-
rewindCoordinatesInMapData:
|
|
109
|
-
overlayMapData:
|
|
110
|
-
overlayMapBorderColor:
|
|
111
|
-
overlayMapBorderWidth:
|
|
112
|
-
numberDisplayOptions:
|
|
113
|
-
graphDownload:
|
|
114
|
-
|
|
106
|
+
dotBorderColor: Pe,
|
|
107
|
+
labelColor: _e,
|
|
108
|
+
projectionRotate: Q,
|
|
109
|
+
rewindCoordinatesInMapData: ee,
|
|
110
|
+
overlayMapData: u,
|
|
111
|
+
overlayMapBorderColor: f,
|
|
112
|
+
overlayMapBorderWidth: Qe,
|
|
113
|
+
numberDisplayOptions: O,
|
|
114
|
+
graphDownload: he,
|
|
115
|
+
dataDownload: te
|
|
116
|
+
} = r, L = $t(() => ee ? Ft(b, {
|
|
115
117
|
reverse: !0
|
|
116
|
-
}) :
|
|
118
|
+
}) : b, [b, ee]), fe = $t(() => !ee || !u ? u : Ft(u, {
|
|
117
119
|
reverse: !0
|
|
118
|
-
}), [
|
|
119
|
-
once:
|
|
120
|
-
amount:
|
|
121
|
-
}),
|
|
122
|
-
|
|
123
|
-
const t = Pt(
|
|
124
|
-
if (
|
|
125
|
-
if (
|
|
126
|
-
const Te =
|
|
127
|
-
return
|
|
128
|
-
},
|
|
129
|
-
transform:
|
|
120
|
+
}), [u, ee]), [E, k] = B(void 0), [et, ge] = B(ze === void 0 ? !(s < 680) : !ze), ye = Ze(null), [oe, R] = B(void 0), [Le, I] = B(void 0), [We, W] = B(void 0), [j, w] = B(void 0), $ = Ze(null), N = Bo($, {
|
|
121
|
+
once: x.once,
|
|
122
|
+
amount: x.amount
|
|
123
|
+
}), ve = Ze(null), V = e.filter((t) => t.radius === void 0 || t.radius === null).length !== e.length ? So().domain([0, Ie]).range([0.25, y]).nice() : void 0, $e = J ? Oo().domain(i).range(o) : Eo().domain(i).range(o);
|
|
124
|
+
Ye(() => {
|
|
125
|
+
const t = Pt(ve.current), n = Pt($.current), l = (m) => {
|
|
126
|
+
if (Z === "noZoom") return !1;
|
|
127
|
+
if (Z === "button") return !m.type.includes("wheel");
|
|
128
|
+
const Te = m.type === "wheel", Re = m.type.startsWith("touch"), je = m.type === "mousedown" || m.type === "mousemove";
|
|
129
|
+
return Re ? !0 : Te ? Z === "scroll" ? !0 : m.ctrlKey : je && !m.button && !m.ctrlKey;
|
|
130
|
+
}, D = co().scaleExtent(Je).translateExtent(Ke || [[-20, -20], [s + 20, v + 20]]).filter(l).on("zoom", ({
|
|
131
|
+
transform: m
|
|
130
132
|
}) => {
|
|
131
|
-
t.attr("transform",
|
|
133
|
+
t.attr("transform", m);
|
|
132
134
|
});
|
|
133
|
-
|
|
134
|
-
}, [
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
137
|
-
Pt(
|
|
135
|
+
n.call(D), ye.current = D;
|
|
136
|
+
}, [v, s, Z]);
|
|
137
|
+
const ae = mo(L), G = vo(L), Ve = (ae[2] - ae[0]) * 1.15, Ae = (ae[3] - ae[1]) * 1.15, xe = s * 190 / 960 * 360 / Ve, Fe = v * 190 / 678 * 180 / Ae, A = h * Math.min(xe, Fe), re = ie === "mercator" ? po().rotate(Q).center(M || G.geometry.coordinates).translate([s / 2, v / 2]).scale(A) : ie === "equalEarth" ? uo().rotate(Q).center(M || G.geometry.coordinates).translate([s / 2, v / 2]).scale(A) : ie === "naturalEarth" ? ho().rotate(Q).center(M || G.geometry.coordinates).translate([s / 2, v / 2]).scale(A) : ie === "orthographic" ? fo().rotate(Q).center(M || G.geometry.coordinates).translate([s / 2, v / 2]).scale(A) : go().rotate(Q).center(M || G.geometry.coordinates).translate([s / 2, v / 2]).scale(A), ne = yo().projection(re), be = (t) => {
|
|
138
|
+
if (!$.current || !ye.current) return;
|
|
139
|
+
Pt($.current).call(ye.current.scaleBy, t === "in" ? 1.2 : 1 / 1.2);
|
|
138
140
|
};
|
|
139
141
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
140
142
|
/* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
|
|
141
|
-
/* @__PURE__ */ a.jsx(se.svg, { width: `${s}px`, height: `${
|
|
143
|
+
/* @__PURE__ */ a.jsx(se.svg, { width: `${s}px`, height: `${v}px`, viewBox: `0 0 ${s} ${v}`, ref: $, direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { ref: ve, children: [
|
|
142
144
|
me.filter((t) => t.position === "before").map((t) => t.layer),
|
|
143
|
-
|
|
145
|
+
L.features.map((t, n) => {
|
|
144
146
|
if (!t.properties?.[pe]) return null;
|
|
145
|
-
const
|
|
146
|
-
return
|
|
147
|
+
const l = ne(t);
|
|
148
|
+
return l ? /* @__PURE__ */ a.jsx(se.g, { opacity: E ? _ : T ? T.indexOf(t.properties[pe]) !== -1 ? 1 : _ : 1, children: /* @__PURE__ */ a.jsx("path", { d: l, style: {
|
|
147
149
|
stroke: de,
|
|
148
150
|
strokeWidth: ce,
|
|
149
|
-
fill:
|
|
151
|
+
fill: Se,
|
|
150
152
|
vectorEffect: "non-scaling-stroke"
|
|
151
|
-
} }) },
|
|
153
|
+
} }) }, n) : null;
|
|
152
154
|
}),
|
|
153
155
|
/* @__PURE__ */ a.jsxs(Io, { children: [
|
|
154
156
|
e.filter((t) => t.id).map((t) => {
|
|
155
|
-
const
|
|
157
|
+
const n = L.features.findIndex(
|
|
156
158
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
157
|
-
(
|
|
159
|
+
(m) => t.id === m.properties[pe]
|
|
158
160
|
);
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
162
|
-
const
|
|
161
|
+
if (n === -1) return null;
|
|
162
|
+
const l = ne(L.features[n]);
|
|
163
|
+
if (!l) return null;
|
|
164
|
+
const D = xt(t.x) ? Se : (
|
|
163
165
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
164
|
-
|
|
166
|
+
$e(t.x)
|
|
165
167
|
);
|
|
166
168
|
return /* @__PURE__ */ a.jsx(se.g, { className: "undp-map-shapes", variants: {
|
|
167
169
|
initial: {
|
|
168
170
|
opacity: 0
|
|
169
171
|
},
|
|
170
172
|
whileInView: {
|
|
171
|
-
opacity:
|
|
173
|
+
opacity: E ? E === D && (!T || T.indexOf(t.id) !== -1) ? 1 : _ : T ? T.indexOf(t.id) !== -1 ? 1 : _ : 1,
|
|
172
174
|
transition: {
|
|
173
|
-
duration:
|
|
175
|
+
duration: x.duration
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
|
-
}, initial: "initial", animate:
|
|
178
|
+
}, initial: "initial", animate: N ? "whileInView" : "initial", exit: {
|
|
177
179
|
opacity: 0,
|
|
178
180
|
transition: {
|
|
179
|
-
duration:
|
|
181
|
+
duration: x.duration
|
|
180
182
|
}
|
|
181
|
-
}, onMouseEnter: (
|
|
182
|
-
|
|
183
|
-
}, onMouseMove: (
|
|
184
|
-
|
|
183
|
+
}, onMouseEnter: (m) => {
|
|
184
|
+
I(t), w(m.clientY), W(m.clientX), H?.(t);
|
|
185
|
+
}, onMouseMove: (m) => {
|
|
186
|
+
I(t), w(m.clientY), W(m.clientX);
|
|
185
187
|
}, onMouseLeave: () => {
|
|
186
|
-
|
|
188
|
+
I(void 0), W(void 0), w(void 0), H?.(void 0);
|
|
187
189
|
}, onClick: () => {
|
|
188
|
-
(
|
|
189
|
-
}, children: /* @__PURE__ */ a.jsx(se.path, { d:
|
|
190
|
+
(F || X) && (At(oe, t) && Be ? (R(void 0), F?.(void 0)) : (R(t), F?.(t)));
|
|
191
|
+
}, children: /* @__PURE__ */ a.jsx(se.path, { d: l, variants: {
|
|
190
192
|
initial: {
|
|
191
|
-
fill:
|
|
193
|
+
fill: D,
|
|
192
194
|
opacity: 0
|
|
193
195
|
},
|
|
194
196
|
whileInView: {
|
|
195
|
-
fill:
|
|
197
|
+
fill: D,
|
|
196
198
|
opacity: 1,
|
|
197
199
|
transition: {
|
|
198
|
-
duration:
|
|
200
|
+
duration: x.duration
|
|
199
201
|
}
|
|
200
202
|
}
|
|
201
|
-
}, initial: "initial", animate:
|
|
203
|
+
}, initial: "initial", animate: N ? "whileInView" : "initial", exit: {
|
|
202
204
|
opacity: 0,
|
|
203
205
|
transition: {
|
|
204
|
-
duration:
|
|
206
|
+
duration: x.duration
|
|
205
207
|
}
|
|
206
208
|
}, style: {
|
|
207
209
|
stroke: de,
|
|
@@ -209,365 +211,389 @@ function To(r) {
|
|
|
209
211
|
vectorEffect: "non-scaling-stroke"
|
|
210
212
|
} }, `${t.id}`) }, t.id);
|
|
211
213
|
}),
|
|
212
|
-
fe?.features.map((t,
|
|
213
|
-
const
|
|
214
|
-
return
|
|
215
|
-
stroke:
|
|
216
|
-
strokeWidth:
|
|
214
|
+
fe?.features.map((t, n) => {
|
|
215
|
+
const l = ne(t);
|
|
216
|
+
return l ? /* @__PURE__ */ a.jsx("g", { children: /* @__PURE__ */ a.jsx("path", { d: l, style: {
|
|
217
|
+
stroke: f || de,
|
|
218
|
+
strokeWidth: Qe || ce + 1,
|
|
217
219
|
fill: "none",
|
|
218
220
|
pointerEvents: "none",
|
|
219
221
|
vectorEffect: "non-scaling-stroke"
|
|
220
|
-
} }) },
|
|
222
|
+
} }) }, n) : null;
|
|
221
223
|
}),
|
|
222
|
-
e.filter((t) => !
|
|
223
|
-
const
|
|
224
|
+
e.filter((t) => !xt(t.lat) && !xt(t.long)).map((t) => {
|
|
225
|
+
const n = re([t.long, t.lat])[0] > 0.8 * s ? -1 : 1;
|
|
224
226
|
return /* @__PURE__ */ a.jsxs(se.g, { className: "undp-map-dots", variants: {
|
|
225
227
|
initial: {
|
|
226
228
|
opacity: 0
|
|
227
229
|
},
|
|
228
230
|
whileInView: {
|
|
229
|
-
opacity:
|
|
231
|
+
opacity: Ee ? Ee.indexOf(t.label || "") !== -1 ? 1 : _ : 1,
|
|
230
232
|
transition: {
|
|
231
|
-
duration:
|
|
233
|
+
duration: x.duration
|
|
232
234
|
}
|
|
233
235
|
}
|
|
234
|
-
}, initial: "initial", animate:
|
|
236
|
+
}, initial: "initial", animate: N ? "whileInView" : "initial", exit: {
|
|
235
237
|
opacity: 0,
|
|
236
238
|
transition: {
|
|
237
|
-
duration:
|
|
239
|
+
duration: x.duration
|
|
238
240
|
}
|
|
239
|
-
}, onMouseEnter: (
|
|
240
|
-
|
|
241
|
-
}, onMouseMove: (
|
|
242
|
-
|
|
241
|
+
}, onMouseEnter: (l) => {
|
|
242
|
+
I(t), w(l.clientY), W(l.clientX), H?.(t);
|
|
243
|
+
}, onMouseMove: (l) => {
|
|
244
|
+
I(t), w(l.clientY), W(l.clientX);
|
|
243
245
|
}, onMouseLeave: () => {
|
|
244
|
-
|
|
246
|
+
I(void 0), W(void 0), w(void 0), H?.(void 0);
|
|
245
247
|
}, onClick: () => {
|
|
246
|
-
(
|
|
247
|
-
}, transform: `translate(${
|
|
248
|
+
(F || X) && (At(oe, t) && Be ? (R(void 0), F?.(void 0)) : (R(t), F?.(t)));
|
|
249
|
+
}, transform: `translate(${re([t.long, t.lat])[0]},${re([t.long, t.lat])[1]})`, children: [
|
|
248
250
|
/* @__PURE__ */ a.jsx(se.circle, { cx: 0, cy: 0, variants: {
|
|
249
251
|
initial: {
|
|
250
252
|
r: 0,
|
|
251
|
-
fill:
|
|
252
|
-
stroke:
|
|
253
|
+
fill: K,
|
|
254
|
+
stroke: Pe || K
|
|
253
255
|
},
|
|
254
256
|
whileInView: {
|
|
255
|
-
r:
|
|
256
|
-
fill:
|
|
257
|
-
stroke:
|
|
257
|
+
r: V ? V(t.radius || 0) : y,
|
|
258
|
+
fill: K,
|
|
259
|
+
stroke: Pe || K,
|
|
258
260
|
transition: {
|
|
259
|
-
duration:
|
|
261
|
+
duration: x.duration
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
|
-
}, initial: "initial", animate:
|
|
264
|
+
}, initial: "initial", animate: N ? "whileInView" : "initial", exit: {
|
|
263
265
|
r: 0,
|
|
264
266
|
transition: {
|
|
265
|
-
duration:
|
|
267
|
+
duration: x.duration
|
|
266
268
|
}
|
|
267
269
|
}, style: {
|
|
268
270
|
fillOpacity: 0.8,
|
|
269
271
|
vectorEffect: "non-scaling-stroke"
|
|
270
272
|
} }),
|
|
271
|
-
|
|
273
|
+
P && t.label ? /* @__PURE__ */ a.jsx(se.text, { variants: {
|
|
272
274
|
initial: {
|
|
273
275
|
opacity: 0,
|
|
274
|
-
x:
|
|
276
|
+
x: n * (V ? V(t.radius || 0) : y)
|
|
275
277
|
},
|
|
276
278
|
whileInView: {
|
|
277
279
|
opacity: 1,
|
|
278
|
-
x:
|
|
280
|
+
x: n * (V ? V(t.radius || 0) : y),
|
|
279
281
|
transition: {
|
|
280
|
-
duration:
|
|
282
|
+
duration: x.duration
|
|
281
283
|
}
|
|
282
284
|
}
|
|
283
|
-
}, initial: "initial", animate:
|
|
285
|
+
}, initial: "initial", animate: N ? "whileInView" : "initial", exit: {
|
|
284
286
|
opacity: 0,
|
|
285
287
|
transition: {
|
|
286
|
-
duration:
|
|
288
|
+
duration: x.duration
|
|
287
289
|
}
|
|
288
|
-
}, y: 0, className:
|
|
289
|
-
textAnchor:
|
|
290
|
-
fill:
|
|
290
|
+
}, y: 0, className: Lt("text-sm", Y?.graphObjectValues), style: {
|
|
291
|
+
textAnchor: n === -1 ? "end" : "start",
|
|
292
|
+
fill: _e || "#000",
|
|
291
293
|
vectorEffect: "non-scaling-stroke",
|
|
292
|
-
...
|
|
293
|
-
}, dx:
|
|
294
|
+
...S?.graphObjectValues || {}
|
|
295
|
+
}, dx: n * 4, dy: 5, children: t.label }) : null
|
|
294
296
|
] }, t.label || `${t.lat}-${t.long}`);
|
|
295
297
|
})
|
|
296
298
|
] }),
|
|
297
299
|
me.filter((t) => t.position === "after").map((t) => t.layer)
|
|
298
300
|
] }) }),
|
|
299
|
-
|
|
301
|
+
Oe === !1 ? null : /* @__PURE__ */ a.jsx("div", { className: Lt("absolute left-4 bottom-4 map-color-legend", Y?.colorLegend), children: et ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
300
302
|
/* @__PURE__ */ a.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: () => {
|
|
301
|
-
|
|
302
|
-
}, children: /* @__PURE__ */ a.jsx(
|
|
303
|
+
ge(!1);
|
|
304
|
+
}, children: /* @__PURE__ */ a.jsx(jo, {}) }),
|
|
303
305
|
/* @__PURE__ */ a.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
|
|
304
|
-
width:
|
|
306
|
+
width: J || i.length < 2 ? void 0 : "340px"
|
|
305
307
|
}, children: [
|
|
306
308
|
ue && ue !== "" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
307
309
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
308
310
|
/* @__PURE__ */ a.jsx("div", { className: "w-3 h-3 rounded-full", style: {
|
|
309
|
-
backgroundColor:
|
|
311
|
+
backgroundColor: K
|
|
310
312
|
} }),
|
|
311
|
-
/* @__PURE__ */ a.jsx(
|
|
313
|
+
/* @__PURE__ */ a.jsx(Xe, { size: "xs", marginBottom: "none", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
|
|
312
314
|
display: "-webkit-box",
|
|
313
315
|
WebkitLineClamp: "1",
|
|
314
316
|
WebkitBoxOrient: "vertical"
|
|
315
317
|
}, children: ue })
|
|
316
318
|
] }),
|
|
317
319
|
/* @__PURE__ */ a.jsx(Tt, { size: "xl" }),
|
|
318
|
-
/* @__PURE__ */ a.jsx(
|
|
320
|
+
/* @__PURE__ */ a.jsx(Xt, {}),
|
|
319
321
|
/* @__PURE__ */ a.jsx(Tt, { size: "xl" })
|
|
320
322
|
] }) : null,
|
|
321
|
-
|
|
323
|
+
g && g !== "" ? /* @__PURE__ */ a.jsx(Xe, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
|
|
322
324
|
display: "-webkit-box",
|
|
323
325
|
WebkitLineClamp: "1",
|
|
324
326
|
WebkitBoxOrient: "vertical"
|
|
325
|
-
}, children:
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
O(void 0);
|
|
330
|
-
}, children: [
|
|
331
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-2 h-2 rounded-full", style: {
|
|
332
|
-
backgroundColor: o[i % o.length]
|
|
333
|
-
} }),
|
|
334
|
-
/* @__PURE__ */ a.jsx(zt, { size: "sm", marginBottom: "none", leading: "none", children: t })
|
|
335
|
-
] }, i)) }) : /* @__PURE__ */ a.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { children: [
|
|
336
|
-
n.map((t, i) => /* @__PURE__ */ a.jsxs("g", { onMouseOver: () => {
|
|
337
|
-
O(o[i]);
|
|
327
|
+
}, children: g }) : null,
|
|
328
|
+
!J && i.length > 1 ? /* @__PURE__ */ a.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { children: [
|
|
329
|
+
i.map((t, n) => /* @__PURE__ */ a.jsxs("g", { onMouseOver: () => {
|
|
330
|
+
k(o[n]);
|
|
338
331
|
}, onMouseLeave: () => {
|
|
339
|
-
|
|
332
|
+
k(void 0);
|
|
340
333
|
}, className: "cursor-pointer", children: [
|
|
341
|
-
/* @__PURE__ */ a.jsx("rect", { x:
|
|
342
|
-
fill: o[
|
|
343
|
-
...
|
|
344
|
-
stroke: o[
|
|
334
|
+
/* @__PURE__ */ a.jsx("rect", { x: n * 320 / o.length + 1, y: 1, width: 320 / o.length - 2, height: 8, className: E === o[n] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "", style: {
|
|
335
|
+
fill: o[n],
|
|
336
|
+
...E === o[n] ? {} : {
|
|
337
|
+
stroke: o[n]
|
|
345
338
|
}
|
|
346
339
|
} }),
|
|
347
|
-
/* @__PURE__ */ a.jsx("text", { x: (
|
|
340
|
+
/* @__PURE__ */ a.jsx("text", { x: (n + 1) * 320 / o.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
|
|
348
341
|
textAnchor: "middle"
|
|
349
|
-
}, children:
|
|
350
|
-
] },
|
|
342
|
+
}, children: _t(t, void 0, O?.precision ?? 2, void 0, void 0, O?.locale || "en", O?.padZeros || !1) })
|
|
343
|
+
] }, n)),
|
|
351
344
|
/* @__PURE__ */ a.jsx("g", { children: /* @__PURE__ */ a.jsx("rect", { onMouseOver: () => {
|
|
352
|
-
|
|
345
|
+
k(o[i.length]);
|
|
353
346
|
}, onMouseLeave: () => {
|
|
354
|
-
|
|
355
|
-
}, x:
|
|
356
|
-
fill: o[
|
|
357
|
-
...
|
|
358
|
-
stroke: o[
|
|
347
|
+
k(void 0);
|
|
348
|
+
}, x: i.length * 320 / o.length + 1, y: 1, width: 320 / o.length - 2, height: 8, className: `cursor-pointer ${E === o[i.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`, style: {
|
|
349
|
+
fill: o[i.length],
|
|
350
|
+
...E === o[i.length] ? {} : {
|
|
351
|
+
stroke: o[i.length]
|
|
359
352
|
}
|
|
360
353
|
} }) })
|
|
361
|
-
] }) })
|
|
354
|
+
] }) }) : J ? /* @__PURE__ */ a.jsx("div", { className: "flex flex-col gap-3", children: i.map((t, n) => /* @__PURE__ */ a.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
|
|
355
|
+
k(o[n % o.length]);
|
|
356
|
+
}, onMouseLeave: () => {
|
|
357
|
+
k(void 0);
|
|
358
|
+
}, children: [
|
|
359
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-2 h-2 rounded-full", style: {
|
|
360
|
+
backgroundColor: o[n % o.length]
|
|
361
|
+
} }),
|
|
362
|
+
/* @__PURE__ */ a.jsx(Xe, { size: "sm", marginBottom: "none", leading: "none", children: t })
|
|
363
|
+
] }, n)) }) : /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
364
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
|
|
365
|
+
k(o[0]);
|
|
366
|
+
}, onMouseLeave: () => {
|
|
367
|
+
k(void 0);
|
|
368
|
+
}, children: [
|
|
369
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-2 h-2 rounded-full", style: {
|
|
370
|
+
backgroundColor: o[0]
|
|
371
|
+
} }),
|
|
372
|
+
/* @__PURE__ */ a.jsx(Xe, { size: "sm", marginBottom: "none", leading: "none", children: `<= ${_t(i[0], "NA", O?.precision ?? 2, void 0, void 0, O?.locale || "en", O?.padZeros || !1)}` })
|
|
373
|
+
] }),
|
|
374
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
|
|
375
|
+
k(o[1]);
|
|
376
|
+
}, onMouseLeave: () => {
|
|
377
|
+
k(void 0);
|
|
378
|
+
}, children: [
|
|
379
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-2 h-2 rounded-full", style: {
|
|
380
|
+
backgroundColor: o[1]
|
|
381
|
+
} }),
|
|
382
|
+
/* @__PURE__ */ a.jsx(Xe, { size: "sm", marginBottom: "none", leading: "none", children: `> ${_t(i[0], "NA", O?.precision ?? 2, void 0, void 0, O?.locale || "en", O?.padZeros || !1)}` })
|
|
383
|
+
] })
|
|
384
|
+
] })
|
|
362
385
|
] })
|
|
363
386
|
] }) : /* @__PURE__ */ a.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: () => {
|
|
364
|
-
|
|
387
|
+
ge(!0);
|
|
365
388
|
}, children: /* @__PURE__ */ a.jsx(wo, {}) }) }),
|
|
366
|
-
|
|
367
|
-
/* @__PURE__ */ a.jsx("button", { onClick: () =>
|
|
368
|
-
/* @__PURE__ */ a.jsx("button", { onClick: () =>
|
|
389
|
+
Z === "button" && /* @__PURE__ */ a.jsxs("div", { className: "absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons", children: [
|
|
390
|
+
/* @__PURE__ */ a.jsx("button", { onClick: () => be("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: "+" }),
|
|
391
|
+
/* @__PURE__ */ a.jsx("button", { onClick: () => be("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: "–" })
|
|
369
392
|
] }),
|
|
370
|
-
|
|
393
|
+
(he || te) && /* @__PURE__ */ a.jsxs("div", { className: "absolute right-4 top-4 flex flex-col image-download-button gap-2", children: [
|
|
394
|
+
he && /* @__PURE__ */ a.jsx(No, { nodeID: he, buttonSmall: !0, className: "p-1" }),
|
|
395
|
+
te && te.length > 0 && /* @__PURE__ */ a.jsx(Mo, { csvData: te, buttonSmall: !0, headers: Object.keys(te[0]).map((t) => ({
|
|
396
|
+
label: t,
|
|
397
|
+
key: t
|
|
398
|
+
})), className: "p-1" })
|
|
399
|
+
] })
|
|
371
400
|
] }),
|
|
372
|
-
|
|
373
|
-
|
|
401
|
+
X && oe !== void 0 ? /* @__PURE__ */ a.jsx(Co, { body: X, data: oe, setData: R, className: Y?.modal }) : null,
|
|
402
|
+
Le && C && We && j ? /* @__PURE__ */ a.jsx(bo, { data: Le, body: C, xPos: We, yPos: j, backgroundStyle: S?.tooltip, className: Y?.tooltip }) : null
|
|
374
403
|
] });
|
|
375
404
|
}
|
|
376
|
-
function
|
|
377
|
-
const e =
|
|
405
|
+
function Ia(r) {
|
|
406
|
+
const e = to.c(140), {
|
|
378
407
|
data: o,
|
|
379
|
-
mapData:
|
|
380
|
-
graphTitle:
|
|
381
|
-
colors:
|
|
382
|
-
sources:
|
|
383
|
-
graphDescription:
|
|
408
|
+
mapData: b,
|
|
409
|
+
graphTitle: g,
|
|
410
|
+
colors: i,
|
|
411
|
+
sources: y,
|
|
412
|
+
graphDescription: v,
|
|
384
413
|
height: s,
|
|
385
|
-
width:
|
|
386
|
-
footNote:
|
|
387
|
-
mapColorLegendTitle:
|
|
388
|
-
colorDomain:
|
|
414
|
+
width: h,
|
|
415
|
+
footNote: M,
|
|
416
|
+
mapColorLegendTitle: C,
|
|
417
|
+
colorDomain: P,
|
|
389
418
|
choroplethScaleType: ce,
|
|
390
419
|
radius: de,
|
|
391
|
-
scale:
|
|
392
|
-
centerPoint:
|
|
393
|
-
padding:
|
|
394
|
-
mapBorderWidth:
|
|
395
|
-
mapNoDataColor:
|
|
396
|
-
backgroundColor:
|
|
397
|
-
showLabels:
|
|
398
|
-
mapBorderColor:
|
|
399
|
-
tooltip:
|
|
400
|
-
relativeHeight:
|
|
401
|
-
onSeriesMouseOver:
|
|
402
|
-
isWorldMap:
|
|
403
|
-
showColorScale:
|
|
404
|
-
zoomScaleExtend:
|
|
405
|
-
zoomTranslateExtend:
|
|
420
|
+
scale: Se,
|
|
421
|
+
centerPoint: H,
|
|
422
|
+
padding: Oe,
|
|
423
|
+
mapBorderWidth: Je,
|
|
424
|
+
mapNoDataColor: Ke,
|
|
425
|
+
backgroundColor: Ee,
|
|
426
|
+
showLabels: F,
|
|
427
|
+
mapBorderColor: Be,
|
|
428
|
+
tooltip: X,
|
|
429
|
+
relativeHeight: S,
|
|
430
|
+
onSeriesMouseOver: Y,
|
|
431
|
+
isWorldMap: ie,
|
|
432
|
+
showColorScale: Z,
|
|
433
|
+
zoomScaleExtend: x,
|
|
434
|
+
zoomTranslateExtend: _,
|
|
406
435
|
graphID: me,
|
|
407
|
-
highlightedDataPoints:
|
|
408
|
-
onSeriesMouseClick:
|
|
409
|
-
graphDownload:
|
|
410
|
-
dataDownload:
|
|
411
|
-
showAntarctica:
|
|
436
|
+
highlightedDataPoints: Ie,
|
|
437
|
+
onSeriesMouseClick: J,
|
|
438
|
+
graphDownload: K,
|
|
439
|
+
dataDownload: ze,
|
|
440
|
+
showAntarctica: T,
|
|
412
441
|
language: pe,
|
|
413
442
|
minHeight: ue,
|
|
414
|
-
theme:
|
|
415
|
-
ariaLabel:
|
|
416
|
-
resetSelectionOnDoubleClick:
|
|
417
|
-
detailsOnClick:
|
|
418
|
-
styles:
|
|
419
|
-
classNames:
|
|
420
|
-
mapProjection:
|
|
421
|
-
zoomInteraction:
|
|
422
|
-
animate:
|
|
423
|
-
dimmedOpacity:
|
|
424
|
-
customLayers:
|
|
425
|
-
maxRadiusValue:
|
|
426
|
-
timeline:
|
|
427
|
-
collapseColorScaleByDefault:
|
|
428
|
-
dotColor:
|
|
429
|
-
highlightedIds:
|
|
430
|
-
mapProperty:
|
|
431
|
-
dotLegendTitle:
|
|
432
|
-
dotBorderColor:
|
|
433
|
-
labelColor:
|
|
434
|
-
projectionRotate:
|
|
435
|
-
rewindCoordinatesInMapData:
|
|
436
|
-
numberDisplayOptions:
|
|
437
|
-
mapOverlay:
|
|
438
|
-
} = r,
|
|
439
|
-
let
|
|
440
|
-
e[0] !==
|
|
441
|
-
const
|
|
442
|
-
let et;
|
|
443
|
-
e[2] !== fe ? (et = fe === void 0 ? [] : fe, e[2] = fe, e[3] = et) : et = e[3];
|
|
444
|
-
const bt = et;
|
|
443
|
+
theme: Pe,
|
|
444
|
+
ariaLabel: _e,
|
|
445
|
+
resetSelectionOnDoubleClick: Q,
|
|
446
|
+
detailsOnClick: ee,
|
|
447
|
+
styles: u,
|
|
448
|
+
classNames: f,
|
|
449
|
+
mapProjection: Qe,
|
|
450
|
+
zoomInteraction: O,
|
|
451
|
+
animate: he,
|
|
452
|
+
dimmedOpacity: te,
|
|
453
|
+
customLayers: L,
|
|
454
|
+
maxRadiusValue: fe,
|
|
455
|
+
timeline: E,
|
|
456
|
+
collapseColorScaleByDefault: k,
|
|
457
|
+
dotColor: et,
|
|
458
|
+
highlightedIds: ge,
|
|
459
|
+
mapProperty: ye,
|
|
460
|
+
dotLegendTitle: oe,
|
|
461
|
+
dotBorderColor: R,
|
|
462
|
+
labelColor: Le,
|
|
463
|
+
projectionRotate: I,
|
|
464
|
+
rewindCoordinatesInMapData: We,
|
|
465
|
+
numberDisplayOptions: W,
|
|
466
|
+
mapOverlay: j
|
|
467
|
+
} = r, w = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json" : b, $ = M === 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, N = ce === void 0 ? "threshold" : ce, ve = de === void 0 ? 5 : de, V = Se === void 0 ? 0.95 : Se, $e = Je === void 0 ? 0.5 : Je, ae = Ke === void 0 ? Me.light.graphNoData : Ke, G = Ee === void 0 ? !1 : Ee, Ve = F === void 0 ? !1 : F, Ae = Be === void 0 ? Me.light.grays["gray-500"] : Be, xe = ie === void 0 ? !0 : ie, Fe = Z === void 0 ? !0 : Z;
|
|
468
|
+
let A;
|
|
469
|
+
e[0] !== x ? (A = x === void 0 ? [0.8, 6] : x, e[0] = x, e[1] = A) : A = e[1];
|
|
470
|
+
const re = A, ne = K === void 0 ? !1 : K, be = ze === void 0 ? !1 : ze, t = T === void 0 ? !1 : T, n = pe === void 0 ? "en" : pe, l = ue === void 0 ? 0 : ue, D = Pe === void 0 ? "light" : Pe, m = Q === void 0 ? !0 : Q, Te = Qe === void 0 ? "naturalEarth" : Qe, Re = O === void 0 ? "button" : O, je = he === void 0 ? !1 : he, bt = te === void 0 ? 0.3 : te;
|
|
445
471
|
let tt;
|
|
446
|
-
e[
|
|
472
|
+
e[2] !== L ? (tt = L === void 0 ? [] : L, e[2] = L, e[3] = tt) : tt = e[3];
|
|
473
|
+
const jt = tt;
|
|
474
|
+
let ot;
|
|
475
|
+
e[4] !== E ? (ot = E === void 0 ? {
|
|
447
476
|
enabled: !1,
|
|
448
477
|
autoplay: !1,
|
|
449
478
|
showOnlyActiveDate: !0
|
|
450
|
-
} :
|
|
451
|
-
const c =
|
|
452
|
-
let
|
|
453
|
-
e[6] !==
|
|
454
|
-
const
|
|
479
|
+
} : E, e[4] = E, e[5] = ot) : ot = e[5];
|
|
480
|
+
const c = ot, wt = et === void 0 ? Me.primaryColors["blue-600"] : et, kt = ye === void 0 ? "ISO3" : ye, Dt = Le === void 0 ? Me.primaryColors["blue-600"] : Le;
|
|
481
|
+
let at;
|
|
482
|
+
e[6] !== I ? (at = I === void 0 ? [0, 0] : I, e[6] = I, e[7] = at) : at = e[7];
|
|
483
|
+
const Ct = at, Nt = We === void 0 ? !0 : We, [le, Yt] = B(0), [Ge, Zt] = B(0), [U, Jt] = B(c.autoplay);
|
|
455
484
|
let Ue;
|
|
456
485
|
if (e[8] !== o || e[9] !== c.dateFormat) {
|
|
457
486
|
let d;
|
|
458
|
-
e[11] !== c.dateFormat ? (d = (
|
|
487
|
+
e[11] !== c.dateFormat ? (d = (z) => io(`${z.date}`, c.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), e[11] = c.dateFormat, e[12] = d) : d = e[12], Ue = [...new Set(o.filter(Qo).map(d))], Ue.sort(Ko), e[8] = o, e[9] = c.dateFormat, e[10] = Ue;
|
|
459
488
|
} else
|
|
460
489
|
Ue = e[10];
|
|
461
|
-
const
|
|
462
|
-
let
|
|
463
|
-
e[13] !==
|
|
464
|
-
const qe =
|
|
465
|
-
let
|
|
466
|
-
e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
467
|
-
const d = new ResizeObserver((
|
|
468
|
-
|
|
490
|
+
const p = Ue, [q, Mt] = B(c.autoplay ? 0 : p.length - 1), [we, Kt] = B(void 0), [St, Qt] = B(void 0), Ot = Ze(null), Wt = Ze(null);
|
|
491
|
+
let rt;
|
|
492
|
+
e[13] !== N || e[14] !== P || e[15] !== i?.length || e[16] !== o ? (rt = P || (N === "categorical" ? Wo(o, "x") : $o(o.map(Jo), i?.length || 4)), e[13] = N, e[14] = P, e[15] = i?.length, e[16] = o, e[17] = rt) : rt = e[17];
|
|
493
|
+
const qe = rt;
|
|
494
|
+
let it, nt;
|
|
495
|
+
e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (it = () => {
|
|
496
|
+
const d = new ResizeObserver((z) => {
|
|
497
|
+
Yt(z[0].target.clientWidth || 620), Zt(z[0].target.clientHeight || 480);
|
|
469
498
|
});
|
|
470
|
-
return
|
|
471
|
-
},
|
|
472
|
-
let
|
|
473
|
-
e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
474
|
-
Jt(d);
|
|
475
|
-
}, e[20] = nt) : nt = e[20];
|
|
476
|
-
const lt = Vt(nt);
|
|
477
|
-
let st;
|
|
478
|
-
e[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (st = (d) => {
|
|
499
|
+
return Ot.current && d.observe(Ot.current), () => d.disconnect();
|
|
500
|
+
}, nt = [], e[18] = it, e[19] = nt) : (it = e[18], nt = e[19]), Ye(it, nt);
|
|
501
|
+
let lt;
|
|
502
|
+
e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (lt = (d) => {
|
|
479
503
|
Kt(d);
|
|
480
|
-
}, e[
|
|
481
|
-
const
|
|
504
|
+
}, e[20] = lt) : lt = e[20];
|
|
505
|
+
const st = Vt(lt);
|
|
482
506
|
let ct;
|
|
483
|
-
e[
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
}, e[22] = k, e[23] = lt, e[24] = ct) : ct = e[24];
|
|
507
|
+
e[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ct = (d) => {
|
|
508
|
+
Qt(d);
|
|
509
|
+
}, e[21] = ct) : ct = e[21];
|
|
510
|
+
const He = Vt(ct);
|
|
488
511
|
let dt;
|
|
489
|
-
e[
|
|
512
|
+
e[22] !== w || e[23] !== st ? (dt = () => {
|
|
513
|
+
typeof w == "string" ? Rt(w).then((z) => {
|
|
514
|
+
st(z);
|
|
515
|
+
}) : st(w);
|
|
516
|
+
}, e[22] = w, e[23] = st, e[24] = dt) : dt = e[24];
|
|
490
517
|
let mt;
|
|
491
|
-
e[
|
|
492
|
-
h?.mapData || He(void 0), typeof h?.mapData == "string" ? At(h?.mapData).then((E) => {
|
|
493
|
-
He(E);
|
|
494
|
-
}) : He(h?.mapData);
|
|
495
|
-
}, e[27] = h?.mapData, e[28] = He, e[29] = mt) : mt = e[29];
|
|
496
|
-
const Ot = h?.mapData;
|
|
518
|
+
e[25] !== w ? (mt = [w], e[25] = w, e[26] = mt) : mt = e[26], Ye(dt, mt);
|
|
497
519
|
let pt;
|
|
498
|
-
e[
|
|
499
|
-
|
|
500
|
-
|
|
520
|
+
e[27] !== j?.mapData || e[28] !== He ? (pt = () => {
|
|
521
|
+
j?.mapData || He(void 0), typeof j?.mapData == "string" ? Rt(j?.mapData).then((z) => {
|
|
522
|
+
He(z);
|
|
523
|
+
}) : He(j?.mapData);
|
|
524
|
+
}, e[27] = j?.mapData, e[28] = He, e[29] = pt) : pt = e[29];
|
|
525
|
+
const Et = j?.mapData;
|
|
526
|
+
let ut;
|
|
527
|
+
e[30] !== Et ? (ut = [Et], e[30] = Et, e[31] = ut) : ut = e[31], Ye(pt, ut);
|
|
528
|
+
let ht, ft;
|
|
529
|
+
e[32] !== U || e[33] !== c.speed || e[34] !== p ? (ht = () => {
|
|
501
530
|
const d = setInterval(() => {
|
|
502
|
-
|
|
531
|
+
Mt((z) => z < p.length - 1 ? z + 1 : 0);
|
|
503
532
|
}, (c.speed || 2) * 1e3);
|
|
504
|
-
return
|
|
505
|
-
},
|
|
506
|
-
const
|
|
507
|
-
let
|
|
508
|
-
e[37] !==
|
|
509
|
-
const
|
|
510
|
-
let
|
|
511
|
-
e[42] !==
|
|
512
|
-
title:
|
|
513
|
-
description:
|
|
533
|
+
return U || clearInterval(d), () => clearInterval(d);
|
|
534
|
+
}, ft = [p, U, c.speed], e[32] = U, e[33] = c.speed, e[34] = p, e[35] = ht, e[36] = ft) : (ht = e[35], ft = e[36]), Ye(ht, ft);
|
|
535
|
+
const Bt = c.dateFormat || "yyyy";
|
|
536
|
+
let gt;
|
|
537
|
+
e[37] !== q || e[38] !== Bt || e[39] !== c.showOnlyActiveDate || e[40] !== p ? (gt = no(p, q, c.showOnlyActiveDate, Bt), e[37] = q, e[38] = Bt, e[39] = c.showOnlyActiveDate, e[40] = p, e[41] = gt) : gt = e[41];
|
|
538
|
+
const yt = gt, It = f?.graphContainer, zt = u?.graphContainer;
|
|
539
|
+
let ke;
|
|
540
|
+
e[42] !== f?.description || e[43] !== f?.title || e[44] !== v || e[45] !== g || e[46] !== u?.description || e[47] !== u?.title || e[48] !== h ? (ke = g || v ? /* @__PURE__ */ a.jsx(Po, { styles: {
|
|
541
|
+
title: u?.title,
|
|
542
|
+
description: u?.description
|
|
514
543
|
}, classNames: {
|
|
515
|
-
title:
|
|
516
|
-
description:
|
|
517
|
-
}, graphTitle:
|
|
518
|
-
let
|
|
519
|
-
e[
|
|
544
|
+
title: f?.title,
|
|
545
|
+
description: f?.description
|
|
546
|
+
}, graphTitle: g, graphDescription: v, width: h }) : null, e[42] = f?.description, e[43] = f?.title, e[44] = v, e[45] = g, e[46] = u?.description, e[47] = u?.title, e[48] = h, e[49] = ke) : ke = e[49];
|
|
547
|
+
let De;
|
|
548
|
+
e[50] !== q || e[51] !== yt || e[52] !== U || e[53] !== c.enabled || e[54] !== p ? (De = c.enabled && p.length > 0 && yt ? /* @__PURE__ */ a.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
520
549
|
/* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => {
|
|
521
|
-
|
|
522
|
-
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label":
|
|
523
|
-
/* @__PURE__ */ a.jsx(
|
|
524
|
-
|
|
550
|
+
Jt(!U);
|
|
551
|
+
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": U ? "Click to pause animation" : "Click to play animation", children: U ? /* @__PURE__ */ a.jsx(ko, {}) : /* @__PURE__ */ a.jsx(Do, {}) }),
|
|
552
|
+
/* @__PURE__ */ a.jsx(lo, { min: p[0], max: p[p.length - 1], marks: yt, step: null, defaultValue: p[p.length - 1], value: p[q], onChangeComplete: (d) => {
|
|
553
|
+
Mt(p.indexOf(d));
|
|
525
554
|
}, onChange: (d) => {
|
|
526
|
-
|
|
555
|
+
Mt(p.indexOf(d));
|
|
527
556
|
}, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
|
|
528
|
-
] }) : null, e[
|
|
529
|
-
let
|
|
530
|
-
e[58] !==
|
|
531
|
-
...
|
|
532
|
-
features:
|
|
533
|
-
}, overlayMapData:
|
|
557
|
+
] }) : null, e[50] = q, e[51] = yt, e[52] = U, e[53] = c.enabled, e[54] = p, e[55] = De) : De = e[55];
|
|
558
|
+
let Ce;
|
|
559
|
+
e[56] !== je || e[57] !== H || e[58] !== N || e[59] !== f || e[60] !== k || e[61] !== i || e[62] !== jt || e[63] !== o || e[64] !== be || e[65] !== ee || e[66] !== bt || e[67] !== qe || e[68] !== R || e[69] !== wt || e[70] !== oe || e[71] !== ne || e[72] !== s || e[73] !== Ie || e[74] !== ge || e[75] !== q || e[76] !== xe || e[77] !== Dt || e[78] !== Ae || e[79] !== $e || e[80] !== C || e[81] !== ae || e[82] !== j?.mapBorderColor || e[83] !== j?.mapBorderWidth || e[84] !== Te || e[85] !== kt || e[86] !== we || e[87] !== fe || e[88] !== l || e[89] !== W || e[90] !== J || e[91] !== Y || e[92] !== St || e[93] !== Ct || e[94] !== ve || e[95] !== S || e[96] !== m || e[97] !== Nt || e[98] !== V || e[99] !== t || e[100] !== Fe || e[101] !== Ve || e[102] !== u || e[103] !== Ge || e[104] !== le || e[105] !== D || e[106] !== c.dateFormat || e[107] !== c.enabled || e[108] !== X || e[109] !== p || e[110] !== h || e[111] !== Re || e[112] !== re || e[113] !== _ ? (Ce = /* @__PURE__ */ a.jsx(_o, { ref: Ot, children: le && Ge && we ? /* @__PURE__ */ a.jsx(To, { dotColor: wt, data: o.filter((d) => c.enabled ? `${d.date}` === ro(new Date(p[q]), c.dateFormat || "yyyy") : d), mapData: t ? we : {
|
|
560
|
+
...we,
|
|
561
|
+
features: we.features.filter(Zo)
|
|
562
|
+
}, overlayMapData: St, overlayMapBorderColor: j?.mapBorderColor, overlayMapBorderWidth: j?.mapBorderWidth, colorDomain: qe, width: le, height: Ge, scale: V, centerPoint: H, colors: i || (N === "categorical" ? Me[D].sequentialColors[`neutralColorsx0${qe.length}`] : Me[D].sequentialColors[`neutralColorsx0${qe.length + 1}`]), mapColorLegendTitle: C, radius: ve, categorical: N === "categorical", mapBorderWidth: $e, mapNoDataColor: ae, mapBorderColor: Ae, tooltip: X, onSeriesMouseOver: Y, showLabels: Ve, isWorldMap: xe, showColorScale: Fe, zoomScaleExtend: re, zoomTranslateExtend: _, onSeriesMouseClick: J, highlightedDataPoints: Ie, resetSelectionOnDoubleClick: m, styles: u, classNames: f, zoomInteraction: Re, detailsOnClick: ee, mapProjection: Te || (xe ? "naturalEarth" : "mercator"), animate: je === !0 ? {
|
|
534
563
|
duration: 0.5,
|
|
535
564
|
once: !0,
|
|
536
565
|
amount: 0.5
|
|
537
|
-
} :
|
|
566
|
+
} : je || {
|
|
538
567
|
duration: 0,
|
|
539
568
|
once: !0,
|
|
540
569
|
amount: 0
|
|
541
|
-
}, dimmedOpacity:
|
|
542
|
-
height: `${Math.max(
|
|
543
|
-
}, className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
544
|
-
let
|
|
545
|
-
e[
|
|
546
|
-
footnote:
|
|
547
|
-
source:
|
|
570
|
+
}, dimmedOpacity: bt, customLayers: jt, maxRadiusValue: xt(fe) ? Math.max(...o.map(Yo).filter(Xo)) : fe, collapseColorScaleByDefault: k, highlightedIds: ge, mapProperty: kt, dotLegendTitle: oe, dotBorderColor: R, labelColor: Dt, projectionRotate: Ct, rewindCoordinatesInMapData: Nt, numberDisplayOptions: W, graphDownload: ne ? Wt : void 0, dataDownload: be ? o.map(Ho).filter(qo).length > 0 ? o.map(Uo).filter(Go) : o.filter(Ro) : null }) : /* @__PURE__ */ a.jsx("div", { style: {
|
|
571
|
+
height: `${Math.max(l, s || (S ? l ? (h || le) * S > l ? (h || le) * S : l : (h || le) * S : Ge))}px`
|
|
572
|
+
}, className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(so, { "aria-label": "Loading graph" }) }) }), e[56] = je, e[57] = H, e[58] = N, e[59] = f, e[60] = k, e[61] = i, e[62] = jt, e[63] = o, e[64] = be, e[65] = ee, e[66] = bt, e[67] = qe, e[68] = R, e[69] = wt, e[70] = oe, e[71] = ne, e[72] = s, e[73] = Ie, e[74] = ge, e[75] = q, e[76] = xe, e[77] = Dt, e[78] = Ae, e[79] = $e, e[80] = C, e[81] = ae, e[82] = j?.mapBorderColor, e[83] = j?.mapBorderWidth, e[84] = Te, e[85] = kt, e[86] = we, e[87] = fe, e[88] = l, e[89] = W, e[90] = J, e[91] = Y, e[92] = St, e[93] = Ct, e[94] = ve, e[95] = S, e[96] = m, e[97] = Nt, e[98] = V, e[99] = t, e[100] = Fe, e[101] = Ve, e[102] = u, e[103] = Ge, e[104] = le, e[105] = D, e[106] = c.dateFormat, e[107] = c.enabled, e[108] = X, e[109] = p, e[110] = h, e[111] = Re, e[112] = re, e[113] = _, e[114] = Ce) : Ce = e[114];
|
|
573
|
+
let Ne;
|
|
574
|
+
e[115] !== f?.footnote || e[116] !== f?.source || e[117] !== $ || e[118] !== y || e[119] !== u?.footnote || e[120] !== u?.source || e[121] !== h ? (Ne = y || $ ? /* @__PURE__ */ a.jsx(zo, { styles: {
|
|
575
|
+
footnote: u?.footnote,
|
|
576
|
+
source: u?.source
|
|
548
577
|
}, classNames: {
|
|
549
|
-
footnote:
|
|
550
|
-
source:
|
|
551
|
-
}, sources:
|
|
552
|
-
let
|
|
553
|
-
return e[124] !==
|
|
554
|
-
we,
|
|
555
|
-
je,
|
|
578
|
+
footnote: f?.footnote,
|
|
579
|
+
source: f?.source
|
|
580
|
+
}, sources: y, footNote: $, width: h }) : null, e[115] = f?.footnote, e[116] = f?.source, e[117] = $, e[118] = y, e[119] = u?.footnote, e[120] = u?.source, e[121] = h, e[122] = Ne) : Ne = e[122];
|
|
581
|
+
let vt;
|
|
582
|
+
return e[123] !== _e || e[124] !== G || e[125] !== me || e[126] !== s || e[127] !== n || e[128] !== l || e[129] !== Oe || e[130] !== S || e[131] !== It || e[132] !== zt || e[133] !== ke || e[134] !== De || e[135] !== Ce || e[136] !== Ne || e[137] !== D || e[138] !== h ? (vt = /* @__PURE__ */ a.jsxs(Lo, { className: It, style: zt, id: me, ref: Wt, "aria-label": _e, backgroundColor: G, theme: D, language: n, minHeight: l, width: h, height: s, relativeHeight: S, padding: Oe, children: [
|
|
556
583
|
ke,
|
|
557
|
-
De
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
return r != null;
|
|
584
|
+
De,
|
|
585
|
+
Ce,
|
|
586
|
+
Ne
|
|
587
|
+
] }), e[123] = _e, e[124] = G, e[125] = me, e[126] = s, e[127] = n, e[128] = l, e[129] = Oe, e[130] = S, e[131] = It, e[132] = zt, e[133] = ke, e[134] = De, e[135] = Ce, e[136] = Ne, e[137] = D, e[138] = h, e[139] = vt) : vt = e[139], vt;
|
|
562
588
|
}
|
|
563
589
|
function Ro(r) {
|
|
564
|
-
return r
|
|
590
|
+
return r !== void 0;
|
|
565
591
|
}
|
|
566
592
|
function Go(r) {
|
|
567
|
-
return r
|
|
593
|
+
return r !== void 0;
|
|
568
594
|
}
|
|
569
595
|
function Uo(r) {
|
|
570
|
-
return r
|
|
596
|
+
return r.data;
|
|
571
597
|
}
|
|
572
598
|
function qo(r) {
|
|
573
599
|
return r !== void 0;
|
|
@@ -576,21 +602,24 @@ function Ho(r) {
|
|
|
576
602
|
return r.data;
|
|
577
603
|
}
|
|
578
604
|
function Xo(r) {
|
|
579
|
-
return r
|
|
605
|
+
return r != null;
|
|
580
606
|
}
|
|
581
607
|
function Yo(r) {
|
|
582
|
-
return r.
|
|
608
|
+
return r.radius;
|
|
583
609
|
}
|
|
584
610
|
function Zo(r) {
|
|
611
|
+
return r.properties?.NAME !== "Antarctica";
|
|
612
|
+
}
|
|
613
|
+
function Jo(r) {
|
|
585
614
|
return r.x;
|
|
586
615
|
}
|
|
587
|
-
function
|
|
616
|
+
function Ko(r, e) {
|
|
588
617
|
return r - e;
|
|
589
618
|
}
|
|
590
|
-
function
|
|
619
|
+
function Qo(r) {
|
|
591
620
|
return r.date;
|
|
592
621
|
}
|
|
593
622
|
export {
|
|
594
|
-
|
|
623
|
+
Ia as HybridMap
|
|
595
624
|
};
|
|
596
625
|
//# sourceMappingURL=HybridMap.js.map
|