@undp/data-viz 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,29 @@
1
- import { j as i, m as dt, c as pt } from "./index-CHPV5EwG-BzibaIRc.js";
2
- import { useState as I, useRef as tt, useEffect as G, useCallback as ht, useEffectEvent as mt } from "react";
3
- import { w as ut } from "./Spinner-B2IIKg9r.js";
4
- import gt from "react-globe.gl";
5
- import { i as ft } from "./index-Bwrro8-q.js";
1
+ import { j as i, m as lt, c as ct } from "./index-CHPV5EwG-BzibaIRc.js";
2
+ import { useState as I, useRef as Qe, useEffect as G, useCallback as dt, useEffectEvent as pt } from "react";
3
+ import { w as ht } from "./Spinner-B2IIKg9r.js";
4
+ import mt from "react-globe.gl";
5
+ import { i as ut } from "./index-Bwrro8-q.js";
6
6
  import * as H from "three";
7
- import { _ as ot } from "./Typography-BO0gQDIT.js";
8
- import { g as vt } from "./_commonjsHelpers-ByX85dGu.js";
9
- import { T as yt } from "./Tooltip-Bj-s__cI.js";
10
- import { n as bt } from "./numberFormattingFunction-DqMf_v1m.js";
11
- import { X as xt, E as wt } from "./index-ApTBN0kp.js";
12
- import { g as Ct } from "./getCentroidCoordinates-s0OOUjLF.js";
13
- import { D as Dt } from "./DetailsModal-B2XBWR7w.js";
14
- import { o as St } from "./ordinal-CHaxGJ_l.js";
15
- import { t as jt } from "./threshold-DFfqcDMa.js";
16
- import { GraphHeader as Nt } from "./GraphHeader.js";
17
- import { GraphFooter as Rt } from "./GraphFooter.js";
18
- import { f as kt } from "./fetchAndParseData-BAXhgTDM.js";
19
- import { Colors as re } from "./Colors.js";
20
- import { g as Ot } from "./getUniqValue-DsqSii6M.js";
21
- import { g as Et } from "./getJenks-DTCcQSDi.js";
22
- import { a as Lt, G as Pt } from "./GraphContainer-B8ZqOzKI.js";
23
- var et, rt;
24
- function zt() {
25
- if (rt) return et;
26
- rt = 1;
7
+ import { _ as et } from "./Typography-BO0gQDIT.js";
8
+ import { g as gt } from "./_commonjsHelpers-ByX85dGu.js";
9
+ import { T as ft } from "./Tooltip-Bj-s__cI.js";
10
+ import { n as vt } from "./numberFormattingFunction-DqMf_v1m.js";
11
+ import { X as yt, E as bt } from "./index-ApTBN0kp.js";
12
+ import { g as xt } from "./getCentroidCoordinates-s0OOUjLF.js";
13
+ import { D as wt } from "./DetailsModal-B2XBWR7w.js";
14
+ import { o as Ct } from "./ordinal-CHaxGJ_l.js";
15
+ import { t as Dt } from "./threshold-DFfqcDMa.js";
16
+ import { GraphHeader as St } from "./GraphHeader.js";
17
+ import { GraphFooter as jt } from "./GraphFooter.js";
18
+ import { f as Nt } from "./fetchAndParseData-BAXhgTDM.js";
19
+ import { Colors as oe } from "./Colors.js";
20
+ import { g as Rt } from "./getUniqValue-DsqSii6M.js";
21
+ import { g as kt } from "./getJenks-DTCcQSDi.js";
22
+ import { a as Ot, G as Et } from "./GraphContainer-B8ZqOzKI.js";
23
+ var Ke, tt;
24
+ function Lt() {
25
+ if (tt) return Ke;
26
+ tt = 1;
27
27
  var t = function(o) {
28
28
  return o.charAt(0) === "#" ? o.slice(1) : o;
29
29
  }, e = function(o) {
@@ -53,11 +53,11 @@ function zt() {
53
53
  var f = t(o), s = e(f), w = b(s);
54
54
  return D(w, n);
55
55
  };
56
- return et = g, et;
56
+ return Ke = g, Ke;
57
57
  }
58
- var Mt = zt();
59
- const at = /* @__PURE__ */ vt(Mt);
60
- function Tt(t) {
58
+ var Pt = Lt();
59
+ const ot = /* @__PURE__ */ gt(Pt);
60
+ function zt(t) {
61
61
  let e;
62
62
  switch (t.type) {
63
63
  case "ambient":
@@ -77,7 +77,7 @@ function Tt(t) {
77
77
  }
78
78
  return e;
79
79
  }
80
- function At(t) {
80
+ function Mt(t) {
81
81
  const {
82
82
  width: e,
83
83
  autoRotate: d,
@@ -95,10 +95,10 @@ function At(t) {
95
95
  tooltip: L,
96
96
  styles: be,
97
97
  classNames: $,
98
- mapNoDataColor: ae,
98
+ mapNoDataColor: re,
99
99
  colorLegendTitle: C,
100
- showColorScale: ie,
101
- hoverStrokeColor: se,
100
+ showColorScale: ae,
101
+ hoverStrokeColor: ie,
102
102
  detailsOnClick: W,
103
103
  onSeriesMouseClick: V,
104
104
  onSeriesMouseOver: xe,
@@ -109,26 +109,26 @@ function At(t) {
109
109
  polygonAltitude: u,
110
110
  centerLng: Z,
111
111
  centerLat: _,
112
- atmosphereAltitude: ne,
112
+ atmosphereAltitude: se,
113
113
  globeCurvatureResolution: J,
114
114
  fogSettings: M,
115
115
  lights: T,
116
- highlightedAltitude: le,
116
+ highlightedAltitude: ne,
117
117
  selectedId: v,
118
118
  collapseColorScaleByDefault: X,
119
119
  dimmedOpacity: A,
120
- locale: Y
121
- } = t, [ce, Ce] = I(!1), p = tt(void 0), [R, U] = I(void 0), [De, de] = I(X === void 0 ? !(e < 680) : !X), [K, Q] = I({
120
+ locale: le
121
+ } = t, [ce, Ce] = I(!1), p = Qe(void 0), [R, U] = I(void 0), [De, de] = I(X === void 0 ? !(e < 680) : !X), [Y, K] = I({
122
122
  x: 0,
123
123
  y: 0
124
- }), [N, pe] = I(void 0), he = D ? St().domain(g).range(l) : jt().domain(g).range(l);
124
+ }), [N, pe] = I(void 0), he = D ? Ct().domain(g).range(l) : Dt().domain(g).range(l);
125
125
  G(() => {
126
126
  p.current && (p.current.controls().enableZoom = x);
127
127
  }, [x]), G(() => {
128
128
  p.current && (N || v ? p.current.controls().autoRotate = !1 : (p.current.controls().autoRotate = d !== 0, p.current.controls().autoRotateSpeed = d));
129
129
  }, [N, v, d]), G(() => {
130
130
  if (p.current && v) {
131
- const r = f.find((y) => y.properties[s] === v), [a, c] = Ct(r);
131
+ const r = f.find((y) => y.properties[s] === v), [a, c] = xt(r);
132
132
  p.current.pointOfView({
133
133
  lat: c,
134
134
  lng: a,
@@ -139,7 +139,7 @@ function At(t) {
139
139
  const r = p.current?.renderer().domElement;
140
140
  if (!r) return;
141
141
  const a = (c) => {
142
- Q({
142
+ K({
143
143
  x: c.clientX,
144
144
  y: c.clientY
145
145
  });
@@ -154,13 +154,13 @@ function At(t) {
154
154
  }, [z, Z, _]);
155
155
  const S = o || new H.MeshBasicMaterial({
156
156
  color: "#FFF"
157
- }), B = ht(() => {
157
+ }), B = dt(() => {
158
158
  if (!p.current) return;
159
159
  const r = p.current.scene(), a = p.current.camera();
160
160
  let c = [];
161
161
  r.traverse((h) => {
162
162
  h instanceof H.Light && c.push(h);
163
- }), c = [...c, ...a.children], c.forEach((h) => h.parent?.remove(h)), T.map((h) => Tt(h)).forEach((h, j) => {
163
+ }), c = [...c, ...a.children], c.forEach((h) => h.parent?.remove(h)), T.map((h) => zt(h)).forEach((h, j) => {
164
164
  T[j].type !== "ambient" && T[j].position === "camera" ? (a.add(h), T[j].type !== "point" && a.add(h.target)) : r.add(h);
165
165
  }), M && (r.fog = new H.Fog(M.color, M.near, M.far));
166
166
  }, [T, M]), k = () => {
@@ -169,21 +169,21 @@ function At(t) {
169
169
  return G(() => {
170
170
  ce && B();
171
171
  }, [ce, B]), /* @__PURE__ */ i.jsxs("div", { className: "relative", children: [
172
- /* @__PURE__ */ i.jsx(gt, { ref: p, height: n, width: e, globeOffset: m, lineHoverPrecision: 0, polygonsData: f, polygonAltitude: (r) => P?.includes(r?.properties?.[s]) || r?.properties?.[s] === v || r?.properties?.[s] === N?.id || r?.properties?.[s] === R?.id ? le : u, polygonCapColor: (r) => {
173
- const a = v ? r?.properties?.[s] === v ? 1 : A : P ? P.includes(r?.properties?.[s]) ? 1 : A : 1, c = r?.properties?.[s], y = b.find((j) => j.id === c)?.x, h = y != null ? he(y) : ae;
174
- return at(h, `${a}`);
172
+ /* @__PURE__ */ i.jsx(mt, { ref: p, height: n, width: e, globeOffset: m, lineHoverPrecision: 0, polygonsData: f, polygonAltitude: (r) => P?.includes(r?.properties?.[s]) || r?.properties?.[s] === v || r?.properties?.[s] === N?.id || r?.properties?.[s] === R?.id ? ne : u, polygonCapColor: (r) => {
173
+ const a = v ? r?.properties?.[s] === v ? 1 : A : P ? P.includes(r?.properties?.[s]) ? 1 : A : 1, c = r?.properties?.[s], y = b.find((j) => j.id === c)?.x, h = y != null ? he(y) : re;
174
+ return ot(h, `${a}`);
175
175
  }, polygonSideColor: (r) => {
176
- const a = r?.properties?.[s], c = b.find((j) => j.id === a)?.x, y = v ? r?.properties?.[s] === v ? 1 : A : P ? P.includes(r?.properties?.[s]) ? 1 : A : 1, h = c != null ? he(c) : ae;
177
- return at(h, `${y}`);
178
- }, polygonStrokeColor: (r) => r?.properties?.[s] === N?.id ? se : w, onGlobeClick: () => {
176
+ const a = r?.properties?.[s], c = b.find((j) => j.id === a)?.x, y = v ? r?.properties?.[s] === v ? 1 : A : P ? P.includes(r?.properties?.[s]) ? 1 : A : 1, h = c != null ? he(c) : re;
177
+ return ot(h, `${y}`);
178
+ }, polygonStrokeColor: (r) => r?.properties?.[s] === N?.id ? ie : w, onGlobeClick: () => {
179
179
  U(void 0);
180
180
  }, onPolygonClick: (r) => {
181
181
  const a = r?.properties?.[s] ? b.find((c) => c.id === r?.properties?.[s]) : void 0;
182
- (V || W) && (ft(R, a) && we && a ? (U(void 0), V?.(void 0)) : (U(a), V?.(a)));
182
+ (V || W) && (ut(R, a) && we && a ? (U(void 0), V?.(void 0)) : (U(a), V?.(a)));
183
183
  }, onPolygonHover: (r) => {
184
184
  const a = r?.properties?.[s] ? b.find((c) => c.id === r?.properties?.[s]) : void 0;
185
185
  pe(a), xe?.(a);
186
- }, atmosphereColor: E, atmosphereAltitude: ne, globeCurvatureResolution: J, globeMaterial: S, backgroundColor: "rgba(0, 0, 0, 0)", polygonsTransitionDuration: 100, onGlobeReady: () => {
186
+ }, atmosphereColor: E, atmosphereAltitude: se, globeCurvatureResolution: J, globeMaterial: S, backgroundColor: "rgba(0, 0, 0, 0)", polygonsTransitionDuration: 100, onGlobeReady: () => {
187
187
  if (p.current) {
188
188
  p.current.pointOfView({
189
189
  lat: _,
@@ -200,14 +200,14 @@ function At(t) {
200
200
  r.add(a), k();
201
201
  }
202
202
  } }),
203
- ie === !1 ? null : /* @__PURE__ */ i.jsx("div", { className: dt("absolute left-4 bottom-4 map-color-legend", $?.colorLegend), children: De ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
203
+ ae === !1 ? null : /* @__PURE__ */ i.jsx("div", { className: lt("absolute left-4 bottom-4 map-color-legend", $?.colorLegend), children: De ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
204
204
  /* @__PURE__ */ i.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: () => {
205
205
  de(!1);
206
- }, children: /* @__PURE__ */ i.jsx(xt, {}) }),
206
+ }, children: /* @__PURE__ */ i.jsx(yt, {}) }),
207
207
  /* @__PURE__ */ i.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
208
208
  width: D ? void 0 : "340px"
209
209
  }, children: [
210
- C && C !== "" ? /* @__PURE__ */ i.jsx(ot, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
210
+ C && C !== "" ? /* @__PURE__ */ i.jsx(et, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
211
211
  display: "-webkit-box",
212
212
  WebkitLineClamp: "1",
213
213
  WebkitBoxOrient: "vertical"
@@ -216,7 +216,7 @@ function At(t) {
216
216
  /* @__PURE__ */ i.jsx("div", { className: "w-2 h-2 rounded-full", style: {
217
217
  backgroundColor: l[a % l.length]
218
218
  } }),
219
- /* @__PURE__ */ i.jsx(ot, { size: "sm", marginBottom: "none", leading: "none", children: r })
219
+ /* @__PURE__ */ i.jsx(et, { size: "sm", marginBottom: "none", leading: "none", children: r })
220
220
  ] }, a)) }) : /* @__PURE__ */ i.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ i.jsxs("g", { children: [
221
221
  g.map((r, a) => /* @__PURE__ */ i.jsxs("g", { className: "cursor-pointer", children: [
222
222
  /* @__PURE__ */ i.jsx("rect", { x: a * 320 / l.length + 1, y: 1, width: 320 / l.length - 2, height: 8, style: {
@@ -225,7 +225,7 @@ function At(t) {
225
225
  } }),
226
226
  /* @__PURE__ */ i.jsx("text", { x: (a + 1) * 320 / l.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
227
227
  textAnchor: "middle"
228
- }, children: bt(r, void 0, void 0, void 0, void 0, Y) })
228
+ }, children: vt(r, void 0, void 0, void 0, void 0, le) })
229
229
  ] }, a)),
230
230
  /* @__PURE__ */ i.jsx("g", { children: /* @__PURE__ */ i.jsx("rect", { x: g.length * 320 / l.length + 1, y: 1, width: 320 / l.length - 2, height: 8, style: {
231
231
  fill: l[g.length],
@@ -235,13 +235,13 @@ function At(t) {
235
235
  ] })
236
236
  ] }) : /* @__PURE__ */ i.jsx("button", { type: "button", className: "p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button", onClick: () => {
237
237
  de(!0);
238
- }, children: /* @__PURE__ */ i.jsx(wt, {}) }) }),
239
- N && L ? /* @__PURE__ */ i.jsx(yt, { data: N, body: L, xPos: K.x, yPos: K.y, backgroundStyle: be?.tooltip, className: $?.tooltip }) : null,
240
- W && R !== void 0 ? /* @__PURE__ */ i.jsx(Dt, { body: W, data: R, setData: U, className: $?.modal }) : null
238
+ }, children: /* @__PURE__ */ i.jsx(bt, {}) }) }),
239
+ N && L ? /* @__PURE__ */ i.jsx(ft, { data: N, body: L, xPos: Y.x, yPos: Y.y, backgroundStyle: be?.tooltip, className: $?.tooltip }) : null,
240
+ W && R !== void 0 ? /* @__PURE__ */ i.jsx(wt, { body: W, data: R, setData: U, className: $?.modal }) : null
241
241
  ] });
242
242
  }
243
- function ho(t) {
244
- const e = pt.c(98), {
243
+ function co(t) {
244
+ const e = ct.c(96), {
245
245
  data: d,
246
246
  mapData: b,
247
247
  graphTitle: x,
@@ -257,10 +257,10 @@ function ho(t) {
257
257
  padding: L,
258
258
  mapNoDataColor: be,
259
259
  backgroundColor: $,
260
- mapBorderColor: ae,
260
+ mapBorderColor: re,
261
261
  relativeHeight: C,
262
- tooltip: ie,
263
- graphID: se,
262
+ tooltip: ae,
263
+ graphID: ie,
264
264
  mapProperty: W,
265
265
  dataDownload: V,
266
266
  language: xe,
@@ -271,15 +271,15 @@ function ho(t) {
271
271
  classNames: u,
272
272
  autoRotate: Z,
273
273
  enableZoom: _,
274
- globeMaterial: ne,
274
+ globeMaterial: se,
275
275
  centerPoint: J,
276
276
  atmosphereColor: M,
277
277
  showColorScale: T,
278
- resetSelectionOnDoubleClick: le,
278
+ resetSelectionOnDoubleClick: ne,
279
279
  detailsOnClick: v,
280
280
  onSeriesMouseOver: X,
281
281
  onSeriesMouseClick: A,
282
- highlightedIds: Y,
282
+ highlightedIds: le,
283
283
  highlightedAltitude: ce,
284
284
  dimmedOpacity: Ce,
285
285
  scale: p,
@@ -287,23 +287,20 @@ function ho(t) {
287
287
  polygonAltitude: U,
288
288
  globeCurvatureResolution: De,
289
289
  atmosphereAltitude: de,
290
- fogSettings: K,
291
- lights: Q,
290
+ fogSettings: Y,
291
+ lights: K,
292
292
  selectedId: N,
293
293
  collapseColorScaleByDefault: pe,
294
294
  locale: he
295
- } = t, S = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json" : b, B = f === 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." : f, k = E === void 0 ? "threshold" : E, r = be === void 0 ? re.light.graphNoData : be, a = $ === void 0 ? !1 : $, c = ae === void 0 ? re.light.grays["gray-500"] : ae, y = W === void 0 ? "ISO3" : W, h = V === void 0 ? !1 : V, j = xe === void 0 ? "en" : xe, O = we === void 0 ? 0 : we, F = P === void 0 ? "light" : P, me = Z === void 0 ? !0 : Z, Be = _ === void 0 ? !0 : _;
295
+ } = t, S = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json" : b, B = f === 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." : f, k = E === void 0 ? "threshold" : E, r = be === void 0 ? oe.light.graphNoData : be, a = $ === void 0 ? !1 : $, c = re === void 0 ? oe.light.grays["gray-500"] : re, y = W === void 0 ? "ISO3" : W, h = V === void 0 ? !1 : V, j = xe === void 0 ? "en" : xe, O = we === void 0 ? 0 : we, F = P === void 0 ? "light" : P, me = Z === void 0 ? !0 : Z, Ae = _ === void 0 ? !0 : _;
296
296
  let Se;
297
297
  e[0] !== J ? (Se = J === void 0 ? [0, 0] : J, e[0] = J, e[1] = Se) : Se = e[1];
298
- const je = Se, Fe = M === void 0 ? "#999" : M, Ge = T === void 0 ? !0 : T, Ie = le === void 0 ? !0 : le;
298
+ const je = Se, Be = M === void 0 ? "#999" : M, Fe = T === void 0 ? !0 : T, Ge = ne === void 0 ? !0 : ne, Ie = ce === void 0 ? 0.1 : ce, Ue = Ce === void 0 ? 0.3 : Ce, qe = p === void 0 ? 1 : p;
299
299
  let Ne;
300
- e[2] !== Y ? (Ne = Y === void 0 ? [] : Y, e[2] = Y, e[3] = Ne) : Ne = e[3];
301
- const Ue = Ne, qe = ce === void 0 ? 0.1 : ce, He = Ce === void 0 ? 0.3 : Ce, $e = p === void 0 ? 1 : p;
300
+ e[2] !== R ? (Ne = R === void 0 ? [0, 0] : R, e[2] = R, e[3] = Ne) : Ne = e[3];
301
+ const He = Ne, $e = U === void 0 ? 0.01 : U, We = De === void 0 ? 4 : De, Ve = de === void 0 ? 0.15 : de;
302
302
  let Re;
303
- e[4] !== R ? (Re = R === void 0 ? [0, 0] : R, e[4] = R, e[5] = Re) : Re = e[5];
304
- const We = Re, Ve = U === void 0 ? 0.01 : U, Ze = De === void 0 ? 4 : De, _e = de === void 0 ? 0.15 : de;
305
- let ke;
306
- e[6] !== Q ? (ke = Q === void 0 ? [{
303
+ e[4] !== K ? (Re = K === void 0 ? [{
307
304
  type: "ambient",
308
305
  color: 4210752,
309
306
  intensity: 0.4
@@ -316,81 +313,81 @@ function ho(t) {
316
313
  y: 10,
317
314
  z: 5
318
315
  }
319
- }] : Q, e[6] = Q, e[7] = ke) : ke = e[7];
320
- const Je = ke, Xe = he === void 0 ? "en" : he, [Oe, it] = I(void 0), [q, st] = I(0), [ue, nt] = I(0), Ye = tt(null), lt = tt(null);
321
- let Ee, Le;
322
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ee = () => {
316
+ }] : K, e[4] = K, e[5] = Re) : Re = e[5];
317
+ const Ze = Re, _e = he === void 0 ? "en" : he, [ke, rt] = I(void 0), [q, at] = I(0), [ue, it] = I(0), Je = Qe(null), st = Qe(null);
318
+ let Oe, Ee;
319
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Oe = () => {
323
320
  const ve = new ResizeObserver((ye) => {
324
- st(ye[0].target.clientWidth || 620), nt(ye[0].target.clientHeight || 480);
321
+ at(ye[0].target.clientWidth || 620), it(ye[0].target.clientHeight || 480);
325
322
  });
326
- return Ye.current && ve.observe(Ye.current), () => ve.disconnect();
327
- }, Le = [], e[8] = Ee, e[9] = Le) : (Ee = e[8], Le = e[9]), G(Ee, Le);
323
+ return Je.current && ve.observe(Je.current), () => ve.disconnect();
324
+ }, Ee = [], e[6] = Oe, e[7] = Ee) : (Oe = e[6], Ee = e[7]), G(Oe, Ee);
325
+ let Le;
326
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Le = (ve) => {
327
+ rt(ve);
328
+ }, e[8] = Le) : Le = e[8];
329
+ const ge = pt(Le);
328
330
  let Pe;
329
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Pe = (ve) => {
330
- it(ve);
331
- }, e[10] = Pe) : Pe = e[10];
332
- const ge = mt(Pe);
333
- let ze;
334
- e[11] !== S || e[12] !== ge ? (ze = () => {
335
- typeof S == "string" ? kt(S).then((ye) => {
331
+ e[9] !== S || e[10] !== ge ? (Pe = () => {
332
+ typeof S == "string" ? Nt(S).then((ye) => {
336
333
  if (S === "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json") {
337
- const ct = ye.features.map(Ht);
338
- ge(ct);
334
+ const nt = ye.features.map(Ut);
335
+ ge(nt);
339
336
  } else
340
337
  ge(ye.features);
341
338
  }) : ge(S.features);
342
- }, e[11] = S, e[12] = ge, e[13] = ze) : ze = e[13];
339
+ }, e[9] = S, e[10] = ge, e[11] = Pe) : Pe = e[11];
340
+ let ze;
341
+ e[12] !== S ? (ze = [S], e[12] = S, e[13] = ze) : ze = e[13], G(Pe, ze);
343
342
  let Me;
344
- e[14] !== S ? (Me = [S], e[14] = S, e[15] = Me) : Me = e[15], G(ze, Me);
345
- let Te;
346
- e[16] !== s || e[17] !== D?.length || e[18] !== d || e[19] !== k ? (Te = s || (k === "categorical" ? Ot(d, "x") : Et(d.map(qt), D?.length || 4)), e[16] = s, e[17] = D?.length, e[18] = d, e[19] = k, e[20] = Te) : Te = e[20];
347
- const fe = Te, Ke = u?.graphContainer, Qe = m?.graphContainer;
348
- let ee;
349
- e[21] !== u?.description || e[22] !== u?.title || e[23] !== d || e[24] !== h || e[25] !== l || e[26] !== x || e[27] !== m?.description || e[28] !== m?.title || e[29] !== n ? (ee = x || l || h ? /* @__PURE__ */ i.jsx(Nt, { styles: {
343
+ e[14] !== s || e[15] !== D?.length || e[16] !== d || e[17] !== k ? (Me = s || (k === "categorical" ? Rt(d, "x") : kt(d.map(It), D?.length || 4)), e[14] = s, e[15] = D?.length, e[16] = d, e[17] = k, e[18] = Me) : Me = e[18];
344
+ const fe = Me, Xe = u?.graphContainer, Ye = m?.graphContainer;
345
+ let Q;
346
+ e[19] !== u?.description || e[20] !== u?.title || e[21] !== d || e[22] !== h || e[23] !== l || e[24] !== x || e[25] !== m?.description || e[26] !== m?.title || e[27] !== n ? (Q = x || l || h ? /* @__PURE__ */ i.jsx(St, { styles: {
350
347
  title: m?.title,
351
348
  description: m?.description
352
349
  }, classNames: {
353
350
  title: u?.title,
354
351
  description: u?.description
355
- }, graphTitle: x, graphDescription: l, width: n, graphDownload: void 0, dataDownload: h ? d.map(Ut).filter(It).length > 0 ? d.map(Gt).filter(Ft) : d.filter(Bt) : null }) : null, e[21] = u?.description, e[22] = u?.title, e[23] = d, e[24] = h, e[25] = l, e[26] = x, e[27] = m?.description, e[28] = m?.title, e[29] = n, e[30] = ee) : ee = e[30];
356
- let te;
357
- e[31] !== _e || e[32] !== Fe || e[33] !== me || e[34] !== je || e[35] !== u || e[36] !== pe || e[37] !== w || e[38] !== D || e[39] !== d || e[40] !== v || e[41] !== He || e[42] !== fe || e[43] !== Be || e[44] !== K || e[45] !== Ze || e[46] !== ne || e[47] !== We || e[48] !== o || e[49] !== qe || e[50] !== Ue || e[51] !== Je || e[52] !== Xe || e[53] !== c || e[54] !== r || e[55] !== y || e[56] !== Oe || e[57] !== O || e[58] !== A || e[59] !== X || e[60] !== Ve || e[61] !== C || e[62] !== Ie || e[63] !== $e || e[64] !== k || e[65] !== N || e[66] !== Ge || e[67] !== m || e[68] !== ue || e[69] !== q || e[70] !== F || e[71] !== ie || e[72] !== n ? (te = /* @__PURE__ */ i.jsx(Lt, { ref: Ye, children: q && ue && Oe ? /* @__PURE__ */ i.jsx(At, { data: d, globeOffset: We, polygonData: Oe, colorDomain: fe, width: q, height: ue, colors: D || (k === "categorical" ? re[F].sequentialColors[`neutralColorsx0${fe.length}`] : re[F].sequentialColors[`neutralColorsx0${fe.length + 1}`]), mapNoDataColor: r, categorical: k === "categorical", mapBorderColor: c, tooltip: ie, mapProperty: y, styles: m, classNames: u, autoRotate: me === !0 ? 1.5 : me === !1 ? 0 : me, enableZoom: Be, globeMaterial: ne, atmosphereColor: Fe, colorLegendTitle: w, showColorScale: Ge, hoverStrokeColor: F === "light" ? re.light.grays["gray-700"] : re.light.grays["gray-300"], highlightedIds: Ue, resetSelectionOnDoubleClick: Ie, detailsOnClick: v, onSeriesMouseOver: X, onSeriesMouseClick: A, scale: $e, polygonAltitude: Ve, centerLat: je[0], centerLng: je[1], atmosphereAltitude: _e, globeCurvatureResolution: Ze, fogSettings: K, lights: Je, highlightedAltitude: qe, selectedId: N, collapseColorScaleByDefault: pe, dimmedOpacity: He, locale: Xe }) : /* @__PURE__ */ i.jsx("div", { style: {
352
+ }, graphTitle: x, graphDescription: l, width: n, graphDownload: void 0, dataDownload: h ? d.map(Gt).filter(Ft).length > 0 ? d.map(Bt).filter(At) : d.filter(Tt) : null }) : null, e[19] = u?.description, e[20] = u?.title, e[21] = d, e[22] = h, e[23] = l, e[24] = x, e[25] = m?.description, e[26] = m?.title, e[27] = n, e[28] = Q) : Q = e[28];
353
+ let ee;
354
+ e[29] !== Ve || e[30] !== Be || e[31] !== me || e[32] !== je || e[33] !== u || e[34] !== pe || e[35] !== w || e[36] !== D || e[37] !== d || e[38] !== v || e[39] !== Ue || e[40] !== fe || e[41] !== Ae || e[42] !== Y || e[43] !== We || e[44] !== se || e[45] !== He || e[46] !== o || e[47] !== Ie || e[48] !== le || e[49] !== Ze || e[50] !== _e || e[51] !== c || e[52] !== r || e[53] !== y || e[54] !== ke || e[55] !== O || e[56] !== A || e[57] !== X || e[58] !== $e || e[59] !== C || e[60] !== Ge || e[61] !== qe || e[62] !== k || e[63] !== N || e[64] !== Fe || e[65] !== m || e[66] !== ue || e[67] !== q || e[68] !== F || e[69] !== ae || e[70] !== n ? (ee = /* @__PURE__ */ i.jsx(Ot, { ref: Je, children: q && ue && ke ? /* @__PURE__ */ i.jsx(Mt, { data: d, globeOffset: He, polygonData: ke, colorDomain: fe, width: q, height: ue, colors: D || (k === "categorical" ? oe[F].sequentialColors[`neutralColorsx0${fe.length}`] : oe[F].sequentialColors[`neutralColorsx0${fe.length + 1}`]), mapNoDataColor: r, categorical: k === "categorical", mapBorderColor: c, tooltip: ae, mapProperty: y, styles: m, classNames: u, autoRotate: me === !0 ? 1.5 : me === !1 ? 0 : me, enableZoom: Ae, globeMaterial: se, atmosphereColor: Be, colorLegendTitle: w, showColorScale: Fe, hoverStrokeColor: F === "light" ? oe.light.grays["gray-700"] : oe.light.grays["gray-300"], highlightedIds: le, resetSelectionOnDoubleClick: Ge, detailsOnClick: v, onSeriesMouseOver: X, onSeriesMouseClick: A, scale: qe, polygonAltitude: $e, centerLat: je[0], centerLng: je[1], atmosphereAltitude: Ve, globeCurvatureResolution: We, fogSettings: Y, lights: Ze, highlightedAltitude: Ie, selectedId: N, collapseColorScaleByDefault: pe, dimmedOpacity: Ue, locale: _e }) : /* @__PURE__ */ i.jsx("div", { style: {
358
355
  height: `${Math.max(O, o || (C ? O ? (n || q) * C > O ? (n || q) * C : O : (n || q) * C : ue))}px`
359
- }, className: "flex items-center justify-center", children: /* @__PURE__ */ i.jsx(ut, { "aria-label": "Loading graph" }) }) }), e[31] = _e, e[32] = Fe, e[33] = me, e[34] = je, e[35] = u, e[36] = pe, e[37] = w, e[38] = D, e[39] = d, e[40] = v, e[41] = He, e[42] = fe, e[43] = Be, e[44] = K, e[45] = Ze, e[46] = ne, e[47] = We, e[48] = o, e[49] = qe, e[50] = Ue, e[51] = Je, e[52] = Xe, e[53] = c, e[54] = r, e[55] = y, e[56] = Oe, e[57] = O, e[58] = A, e[59] = X, e[60] = Ve, e[61] = C, e[62] = Ie, e[63] = $e, e[64] = k, e[65] = N, e[66] = Ge, e[67] = m, e[68] = ue, e[69] = q, e[70] = F, e[71] = ie, e[72] = n, e[73] = te) : te = e[73];
360
- let oe;
361
- e[74] !== u?.footnote || e[75] !== u?.source || e[76] !== B || e[77] !== g || e[78] !== m?.footnote || e[79] !== m?.source || e[80] !== n ? (oe = g || B ? /* @__PURE__ */ i.jsx(Rt, { styles: {
356
+ }, className: "flex items-center justify-center", children: /* @__PURE__ */ i.jsx(ht, { "aria-label": "Loading graph" }) }) }), e[29] = Ve, e[30] = Be, e[31] = me, e[32] = je, e[33] = u, e[34] = pe, e[35] = w, e[36] = D, e[37] = d, e[38] = v, e[39] = Ue, e[40] = fe, e[41] = Ae, e[42] = Y, e[43] = We, e[44] = se, e[45] = He, e[46] = o, e[47] = Ie, e[48] = le, e[49] = Ze, e[50] = _e, e[51] = c, e[52] = r, e[53] = y, e[54] = ke, e[55] = O, e[56] = A, e[57] = X, e[58] = $e, e[59] = C, e[60] = Ge, e[61] = qe, e[62] = k, e[63] = N, e[64] = Fe, e[65] = m, e[66] = ue, e[67] = q, e[68] = F, e[69] = ae, e[70] = n, e[71] = ee) : ee = e[71];
357
+ let te;
358
+ e[72] !== u?.footnote || e[73] !== u?.source || e[74] !== B || e[75] !== g || e[76] !== m?.footnote || e[77] !== m?.source || e[78] !== n ? (te = g || B ? /* @__PURE__ */ i.jsx(jt, { styles: {
362
359
  footnote: m?.footnote,
363
360
  source: m?.source
364
361
  }, classNames: {
365
362
  footnote: u?.footnote,
366
363
  source: u?.source
367
- }, sources: g, footNote: B, width: n }) : null, e[74] = u?.footnote, e[75] = u?.source, e[76] = B, e[77] = g, e[78] = m?.footnote, e[79] = m?.source, e[80] = n, e[81] = oe) : oe = e[81];
368
- let Ae;
369
- return e[82] !== z || e[83] !== a || e[84] !== se || e[85] !== o || e[86] !== j || e[87] !== O || e[88] !== L || e[89] !== C || e[90] !== Ke || e[91] !== Qe || e[92] !== ee || e[93] !== te || e[94] !== oe || e[95] !== F || e[96] !== n ? (Ae = /* @__PURE__ */ i.jsxs(Pt, { className: Ke, style: Qe, id: se, ref: lt, "aria-label": z, backgroundColor: a, theme: F, language: j, minHeight: O, width: n, height: o, relativeHeight: C, padding: L, children: [
364
+ }, sources: g, footNote: B, width: n }) : null, e[72] = u?.footnote, e[73] = u?.source, e[74] = B, e[75] = g, e[76] = m?.footnote, e[77] = m?.source, e[78] = n, e[79] = te) : te = e[79];
365
+ let Te;
366
+ return e[80] !== z || e[81] !== a || e[82] !== ie || e[83] !== o || e[84] !== j || e[85] !== O || e[86] !== L || e[87] !== C || e[88] !== Xe || e[89] !== Ye || e[90] !== Q || e[91] !== ee || e[92] !== te || e[93] !== F || e[94] !== n ? (Te = /* @__PURE__ */ i.jsxs(Et, { className: Xe, style: Ye, id: ie, ref: st, "aria-label": z, backgroundColor: a, theme: F, language: j, minHeight: O, width: n, height: o, relativeHeight: C, padding: L, children: [
367
+ Q,
370
368
  ee,
371
- te,
372
- oe
373
- ] }), e[82] = z, e[83] = a, e[84] = se, e[85] = o, e[86] = j, e[87] = O, e[88] = L, e[89] = C, e[90] = Ke, e[91] = Qe, e[92] = ee, e[93] = te, e[94] = oe, e[95] = F, e[96] = n, e[97] = Ae) : Ae = e[97], Ae;
369
+ te
370
+ ] }), e[80] = z, e[81] = a, e[82] = ie, e[83] = o, e[84] = j, e[85] = O, e[86] = L, e[87] = C, e[88] = Xe, e[89] = Ye, e[90] = Q, e[91] = ee, e[92] = te, e[93] = F, e[94] = n, e[95] = Te) : Te = e[95], Te;
374
371
  }
375
- function Bt(t) {
372
+ function Tt(t) {
376
373
  return t !== void 0;
377
374
  }
378
- function Ft(t) {
375
+ function At(t) {
379
376
  return t !== void 0;
380
377
  }
381
- function Gt(t) {
378
+ function Bt(t) {
382
379
  return t.data;
383
380
  }
384
- function It(t) {
381
+ function Ft(t) {
385
382
  return t !== void 0;
386
383
  }
387
- function Ut(t) {
384
+ function Gt(t) {
388
385
  return t.data;
389
386
  }
390
- function qt(t) {
387
+ function It(t) {
391
388
  return t.x;
392
389
  }
393
- function Ht(t) {
390
+ function Ut(t) {
394
391
  if (t.geometry.type === "Polygon") {
395
392
  const b = [...t.geometry.coordinates[0]].reverse(), x = {
396
393
  ...t.geometry,
@@ -416,6 +413,6 @@ function Ht(t) {
416
413
  };
417
414
  }
418
415
  export {
419
- ho as ThreeDGlobe
416
+ co as ThreeDGlobe
420
417
  };
421
418
  //# sourceMappingURL=ThreeDGlobe.js.map