@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 +1 @@
1
- {"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-tc70JA_2.js\";\nimport { c as N } from \"./compiler-runtime-BNHg76kC.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DEx84bLj.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n mapData: FeatureCollection;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints?: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds?: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n locale: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n locale,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n className='undp-map-shapes'\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.8 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(\r\n d as number,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n locale,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n 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'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n 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'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n MapOverlayDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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.',\r\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n locale = 'en',\r\n mapOverlay,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n locale={locale}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","i","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","locale","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","properties","path","indexOf","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","pointerEvents","lat","long","labelPosMultiplier","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","ExpandIcon","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","t30","t31","t32","mapOverlay","Colors","light","graphNoData","grays","t33","t34","t35","enabled","autoplay","showOnlyActiveDate","primaryColors","t36","t37","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t38","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t39","t40","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t41","shape","onUpdateShape","useEffectEvent","t42","shape_0","onUpdateOverlayMapShape","t43","fetchAndParseJSON","then","d_2","t44","t45","d_3","t46","t47","t48","t49","speed","interval","setInterval","clearInterval","t50","t51","getSliderMarks","markObj","t52","graphContainer","t53","t54","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t55","Pause","Play","SliderUI","nextValue","nextValue_0","t56","GraphArea","d_9","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t57","footnote","source","GraphFooter","t58","GraphContainer","d_11","d_10","NAME","d_6","d_5","d_4","d_8","d_7","d_1","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAACC,GAAGC,MAAM;AAChG,QAAM,EAAE,YAAYC,GAAG,aAAaC,IAAIP,IAAG,GAAGQ,EAAC,IAAKJ,GAAGK,IAAIC,GAAEH,CAAC,IAAIA,IAAIP,IAAGW,IAAIL,IAAI,EAAE,MAAM,OAAM,IAAK,EAAE,oBAAoBG,MAAM,aAAaA,IAAI,QAAQ,MAAM,YAAW;AAC1K,SAAuBG,gBAAAA,GAAE;AAAA,IACvBC,GAAE;AAAA,IACF;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACA;AACA,CAAC;AACDH,GAAE,cAAcH;AAChB,SAASW,GAAEN,GAAG;AACZ,SAAOH,GAAE,SAASG,CAAC;AACrB;AACA,IAAIU,KAAIZ;AACR,MAAMa,KAAIC,GAAE,WAAW,CAACZ,GAAGC,MAAM;AAC/B,QAAMC,IAAIW,GAAE,EAAE,EAAE;AAChB,MAAIV,GAAGC,GAAGC,GAAGS;AACb,EAAAZ,EAAE,CAAC,MAAMF,KAAK;AAAA,IACZ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sx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-tc70JA_2.js\";\nimport { c as N } from \"./compiler-runtime-BNHg76kC.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DEx84bLj.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n mapData: FeatureCollection;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints?: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds?: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n locale: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n locale,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n className='undp-map-shapes'\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.8 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(\r\n d as number,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n locale,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n 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'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n 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'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n MapOverlayDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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.',\r\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds,\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n locale = 'en',\r\n mapOverlay,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n locale={locale}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","i","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","locale","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","properties","path","indexOf","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","pointerEvents","lat","long","labelPosMultiplier","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","ExpandIcon","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","t30","t31","mapOverlay","Colors","light","graphNoData","grays","t32","t33","t34","enabled","autoplay","showOnlyActiveDate","primaryColors","t35","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t36","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t37","t38","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t39","shape","onUpdateShape","useEffectEvent","t40","shape_0","onUpdateOverlayMapShape","t41","fetchAndParseJSON","then","d_2","t42","t43","d_3","t44","t45","t46","t47","speed","interval","setInterval","clearInterval","t48","t49","getSliderMarks","markObj","t50","graphContainer","t51","t52","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t53","Pause","Play","SliderUI","nextValue","nextValue_0","t54","GraphArea","d_9","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t55","footnote","source","GraphFooter","t56","GraphContainer","d_11","d_10","NAME","d_6","d_5","d_4","d_8","d_7","d_1","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAACC,GAAGC,MAAM;AAChG,QAAM,EAAE,YAAYC,GAAG,aAAaC,IAAIP,IAAG,GAAGQ,EAAC,IAAKJ,GAAGK,IAAIC,GAAEH,CAAC,IAAIA,IAAIP,IAAGW,IAAIL,IAAI,EAAE,MAAM,OAAM,IAAK,EAAE,oBAAoBG,MAAM,aAAaA,IAAI,QAAQ,MAAM,YAAW;AAC1K,SAAuBG,gBAAAA,GAAE;AAAA,IACvBC,GAAE;AAAA,IACF;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACA;AACA,CAAC;AACDH,GAAE,cAAcH;AAChB,SAASW,GAAEN,GAAG;AACZ,SAAOH,GAAE,SAASG,CAAC;AACrB;AACA,IAAIU,KAAIZ;AACR,MAAMa,KAAIC,GAAE,WAAW,CAACZ,GAAGC,MAAM;AAC/B,QAAMC,IAAIW,GAAE,EAAE,EAAE;AAChB,MAAIV,GAAGC,GAAGC,GAAGS;AACb,EAAAZ,EAAE,CAAC,MAAMF,KAAK;AAAA,IACZ,WAAWG;AAAA,IACX,SAASE;AAAA,IACT,aAAaS;AAAA,IACb,GAAGV;AAAA,EACP,IAAMJ,GAAGE,EAAE,CAAC,IAAIF,GAAGE,EAAE,CAAC,IAAIC,GAAGD,EAAE,CAAC,IAAIE,GAAGF,EAAE,CAAC,IAAIG,GAAGH,EAAE,CAAC,IAAIY,MAAMX,IAAID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;AAmLiB;AAzUd,SAAAN,GAAAQ,GAAA;AAAA,SA4R8EpW,KAAM;AAAI;AA5RxF,SAAA2V,GAAAU,GAAA;AAAA,SA4RqCrW,EAACW;AAAO;AA5R7C,SAAA6U,GAAA5L,GAAA;AAAA,SAwOsDA,EAAEX,YAAiBqN,SAAK;AAAY;AAxO1F,SAAAzB,GAAA0B,GAAA;AAAA,SAuL4BvW,MAAM2D;AAAS;AAvL3C,SAAAiR,GAAA4B,GAAA;AAAA,SAsL6CxW,MAAM2D;AAAS;AAtL5D,SAAAgR,GAAA8B,GAAA;AAAA,SAsLyBzW,EAACM;AAAK;AAtL/B,SAAAoU,GAAAgC,GAAA;AAAA,SAqL2C1W,MAAM2D;AAAS;AArL1D,SAAA8Q,GAAAkC,GAAA;AAAA,SAqLuB3W,EAACM;AAAK;AArL7B,SAAAqR,GAAAiF,GAAA;AAAA,SAyFiB5W,EAACR;AAA+B;AAzFjD,SAAAwR,GAAA9R,GAAA2X,GAAA;AAAA,SA2EkB3X,IAAI2X;AAAC;AA3EvB,SAAA/F,GAAA9Q,GAAA;AAAA,SAuEgBA,EAAC0Q;AAAK;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),h=require("react"),dt=require("./Spinner-WHzzloYQ.cjs"),ut=require("react-globe.gl"),pt=require("./index-DQA8q5sC.cjs"),ht=require("three"),et=require("./Typography-BqmyF1gP.cjs"),mt=require("./_commonjsHelpers-BH3jXuIh.cjs"),gt=require("./Tooltip-Hr46paWP.cjs"),xt=require("./numberFormattingFunction-Cn9R7CM9.cjs"),tt=require("./index-BhI7mBJx.cjs"),ft=require("./getCentroidCoordinates-CtBGrNC8.cjs"),vt=require("./DetailsModal-jmmKRMRM.cjs"),yt=require("./ordinal-CrsysVE-.cjs"),bt=require("./threshold-DNsSUf8Q.cjs"),wt=require("./GraphHeader.cjs"),jt=require("./GraphFooter.cjs"),Ct=require("./fetchAndParseData-QTF6tjij.cjs"),oe=require("./Colors.cjs"),Et=require("./getUniqValue-NX8DgwND.cjs"),Rt=require("./getJenks-BzJvhy_H.cjs"),ot=require("./GraphContainer-Cul9b74X.cjs");function St(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,x.get?x:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const I=St(ht);var Qe,rt;function Dt(){if(rt)return Qe;rt=1;var t=function(o){return o.charAt(0)==="#"?o.slice(1):o},e=function(o){var l=o.length===3||o.length===4,v=l?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),a=l?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),j=l?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),k=(l?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff";return{r:v,g:a,b:j,a:k}},n=function(o){return parseInt(o,16)},x=function(o){var l=o.r,v=o.g,a=o.b,j=o.a;return{r:n(l),g:n(v),b:n(a),a:+(n(j)/255).toFixed(2)}},w=function(o){return!isNaN(parseFloat(o))&&isFinite(o)},E=function(o,l){var v=o.r,a=o.g,j=o.b,k=o.a,P=w(l)?l:k;return"rgba(".concat(v,", ").concat(a,", ").concat(j,", ").concat(P,")")},f=function(o,l){var v=t(o),a=e(v),j=x(a);return E(j,l)};return Qe=f,Qe}var Nt=Dt();const st=mt.getDefaultExportFromCjs(Nt);function Ot(t){let e;switch(t.type){case"ambient":e=new I.AmbientLight(t.color,t.intensity);break;case"directional":e=new I.DirectionalLight(t.color,t.intensity),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z===void 0?-1:t.target.z),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;case"point":e=new I.PointLight(t.color,t.intensity,t.distance||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z));break;case"spot":e=new I.SpotLight(t.color,t.intensity,t.distance||0,t.angle||Math.PI/3,t.penumbra||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z||0),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;default:throw new Error("Unknown light type")}return e}function qt(t){const{width:e,autoRotate:n,data:x,enableZoom:w,categorical:E,colorDomain:f,colors:c,globeMaterial:o,height:l,polygonData:v,mapProperty:a,mapBorderColor:j,atmosphereColor:k,tooltip:P,styles:ve,classNames:_,mapNoDataColor:re,colorLegendTitle:C,showColorScale:se,hoverStrokeColor:ie,detailsOnClick:U,onSeriesMouseClick:$,onSeriesMouseOver:ye,resetSelectionOnDoubleClick:be,highlightedIds:T,scale:M,globeOffset:m,polygonAltitude:g,centerLng:V,centerLat:W,atmosphereAltitude:ae,globeCurvatureResolution:Z,fogSettings:z,lights:L,highlightedAltitude:ne,selectedId:y,collapseColorScaleByDefault:J,dimmedOpacity:A,locale:X}=t,[le,we]=h.useState(!1),u=h.useRef(void 0),[N,B]=h.useState(void 0),[je,ce]=h.useState(J===void 0?!(e<680):!J),[Y,K]=h.useState({x:0,y:0}),[D,de]=h.useState(void 0),ue=E?yt.ordinal().domain(f).range(c):bt.threshold().domain(f).range(c);h.useEffect(()=>{u.current&&(u.current.controls().enableZoom=w)},[w]),h.useEffect(()=>{u.current&&(D||y?u.current.controls().autoRotate=!1:(u.current.controls().autoRotate=n!==0,u.current.controls().autoRotateSpeed=n))},[D,y,n]),h.useEffect(()=>{if(u.current&&y){const r=v.find(b=>b.properties[a]===y),[s,d]=ft.getCentroidCoordinates(r);u.current.pointOfView({lat:d,lng:s,altitude:M},1e3)}},[y,M,v,a]),h.useEffect(()=>{const r=u.current?.renderer().domElement;if(!r)return;const s=d=>{K({x:d.clientX,y:d.clientY})};return r.addEventListener("mousemove",s),()=>r.removeEventListener("mousemove",s)},[]),h.useEffect(()=>{u.current&&u.current.pointOfView({lat:W,lng:V,altitude:M},1e3)},[M,V,W]);const R=o||new I.MeshBasicMaterial({color:"#FFF"}),G=h.useCallback(()=>{if(!u.current)return;const r=u.current.scene(),s=u.current.camera();let d=[];r.traverse(p=>{p instanceof I.Light&&d.push(p)}),d=[...d,...s.children],d.forEach(p=>p.parent?.remove(p)),L.map(p=>Ot(p)).forEach((p,S)=>{L[S].type!=="ambient"&&L[S].position==="camera"?(s.add(p),L[S].type!=="point"&&s.add(p.target)):r.add(p)}),z&&(r.fog=new I.Fog(z.color,z.near,z.far))},[L,z]),O=()=>{we(!0),G()};return h.useEffect(()=>{le&&G()},[le,G]),i.jsxRuntimeExports.jsxs("div",{className:"relative",children:[i.jsxRuntimeExports.jsx(ut,{ref:u,height:l,width:e,globeOffset:m,lineHoverPrecision:0,polygonsData:v,polygonAltitude:r=>T?.includes(r?.properties?.[a])||r?.properties?.[a]===y||r?.properties?.[a]===D?.id||r?.properties?.[a]===N?.id?ne:g,polygonCapColor:r=>{const s=y?r?.properties?.[a]===y?1:A:T?T.includes(r?.properties?.[a])?1:A:1,d=r?.properties?.[a],b=x.find(S=>S.id===d)?.x,p=b!=null?ue(b):re;return st(p,`${s}`)},polygonSideColor:r=>{const s=r?.properties?.[a],d=x.find(S=>S.id===s)?.x,b=y?r?.properties?.[a]===y?1:A:T?T.includes(r?.properties?.[a])?1:A:1,p=d!=null?ue(d):re;return st(p,`${b}`)},polygonStrokeColor:r=>r?.properties?.[a]===D?.id?ie:j,onGlobeClick:()=>{B(void 0)},onPolygonClick:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;($||U)&&(pt.isEqual(N,s)&&be&&s?(B(void 0),$?.(void 0)):(B(s),$?.(s)))},onPolygonHover:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;de(s),ye?.(s)},atmosphereColor:k,atmosphereAltitude:ae,globeCurvatureResolution:Z,globeMaterial:R,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{if(u.current){u.current.pointOfView({lat:W,lng:V});const r=u.current.scene();setTimeout(()=>{(r.children[3]?.children[0]?.children[4]?.children||[]).forEach(b=>{const p=b.children[1];p.renderOrder=2})},300);const s=u.current.camera();r.add(s),O()}}}),se===!1?null:i.jsxRuntimeExports.jsx("div",{className:i.mo("absolute left-4 bottom-4 map-color-legend",_?.colorLegend),children:je?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.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:()=>{ce(!1)},children:i.jsxRuntimeExports.jsx(tt.X,{})}),i.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:E?void 0:"340px"},children:[C&&C!==""?i.jsxRuntimeExports.jsx(et._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:C}):null,E?i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((r,s)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[s%c.length]}}),i.jsxRuntimeExports.jsx(et._,{size:"sm",marginBottom:"none",leading:"none",children:r})]},s))}):i.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:i.jsxRuntimeExports.jsxs("g",{children:[f.map((r,s)=>i.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[i.jsxRuntimeExports.jsx("rect",{x:s*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[s],stroke:c[s]}}),i.jsxRuntimeExports.jsx("text",{x:(s+1)*320/c.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:xt.numberFormattingFunction(r,void 0,void 0,void 0,void 0,X)})]},s)),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("rect",{x:f.length*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[f.length],stroke:c[f.length]}})})]})})]})]}):i.jsxRuntimeExports.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:()=>{ce(!0)},children:i.jsxRuntimeExports.jsx(tt.ExpandIcon,{})})}),D&&P?i.jsxRuntimeExports.jsx(gt.Tooltip,{data:D,body:P,xPos:Y.x,yPos:Y.y,backgroundStyle:ve?.tooltip,className:_?.tooltip}):null,U&&N!==void 0?i.jsxRuntimeExports.jsx(vt.DetailsModal,{body:U,data:N,setData:B,className:_?.modal}):null]})}function kt(t){const e=i.compilerRuntimeExports.c(98),{data:n,mapData:x,graphTitle:w,colors:E,sources:f,graphDescription:c,height:o,width:l,footNote:v,colorDomain:a,colorLegendTitle:j,scaleType:k,padding:P,mapNoDataColor:ve,backgroundColor:_,mapBorderColor:re,relativeHeight:C,tooltip:se,graphID:ie,mapProperty:U,dataDownload:$,language:ye,minHeight:be,theme:T,ariaLabel:M,styles:m,classNames:g,autoRotate:V,enableZoom:W,globeMaterial:ae,centerPoint:Z,atmosphereColor:z,showColorScale:L,resetSelectionOnDoubleClick:ne,detailsOnClick:y,onSeriesMouseOver:J,onSeriesMouseClick:A,highlightedIds:X,highlightedAltitude:le,dimmedOpacity:we,scale:u,globeOffset:N,polygonAltitude:B,globeCurvatureResolution:je,atmosphereAltitude:ce,fogSettings:Y,lights:K,selectedId:D,collapseColorScaleByDefault:de,locale:ue}=t,R=x===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json":x,G=v===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.":v,O=k===void 0?"threshold":k,r=ve===void 0?oe.Colors.light.graphNoData:ve,s=_===void 0?!1:_,d=re===void 0?oe.Colors.light.grays["gray-500"]:re,b=U===void 0?"ISO3":U,p=$===void 0?!1:$,S=ye===void 0?"en":ye,q=be===void 0?0:be,F=T===void 0?"light":T,pe=V===void 0?!0:V,Le=W===void 0?!0:W;let Ce;e[0]!==Z?(Ce=Z===void 0?[0,0]:Z,e[0]=Z,e[1]=Ce):Ce=e[1];const Ee=Ce,Ae=z===void 0?"#999":z,Ge=L===void 0?!0:L,Fe=ne===void 0?!0:ne;let Re;e[2]!==X?(Re=X===void 0?[]:X,e[2]=X,e[3]=Re):Re=e[3];const Be=Re,He=le===void 0?.1:le,Ie=we===void 0?.3:we,_e=u===void 0?1:u;let Se;e[4]!==N?(Se=N===void 0?[0,0]:N,e[4]=N,e[5]=Se):Se=e[5];const Ue=Se,$e=B===void 0?.01:B,Ve=je===void 0?4:je,We=ce===void 0?.15:ce;let De;e[6]!==K?(De=K===void 0?[{type:"ambient",color:4210752,intensity:.4},{type:"directional",color:16777215,intensity:1,position:{x:5,y:10,z:5}}]:K,e[6]=K,e[7]=De):De=e[7];const Ze=De,Je=ue===void 0?"en":ue,[Ne,it]=h.useState(void 0),[H,at]=h.useState(0),[he,nt]=h.useState(0),Xe=h.useRef(null),lt=h.useRef(null);let Oe,qe;e[8]===Symbol.for("react.memo_cache_sentinel")?(Oe=()=>{const xe=new ResizeObserver(fe=>{at(fe[0].target.clientWidth||620),nt(fe[0].target.clientHeight||480)});return Xe.current&&xe.observe(Xe.current),()=>xe.disconnect()},qe=[],e[8]=Oe,e[9]=qe):(Oe=e[8],qe=e[9]),h.useEffect(Oe,qe);let ke;e[10]===Symbol.for("react.memo_cache_sentinel")?(ke=xe=>{it(xe)},e[10]=ke):ke=e[10];const me=h.useEffectEvent(ke);let Pe;e[11]!==R||e[12]!==me?(Pe=()=>{typeof R=="string"?Ct.fetchAndParseJSON(R).then(fe=>{if(R==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const ct=fe.features.map(Gt);me(ct)}else me(fe.features)}):me(R.features)},e[11]=R,e[12]=me,e[13]=Pe):Pe=e[13];let Te;e[14]!==R?(Te=[R],e[14]=R,e[15]=Te):Te=e[15],h.useEffect(Pe,Te);let Me;e[16]!==a||e[17]!==E?.length||e[18]!==n||e[19]!==O?(Me=a||(O==="categorical"?Et.getUniqValue(n,"x"):Rt.getJenks(n.map(At),E?.length||4)),e[16]=a,e[17]=E?.length,e[18]=n,e[19]=O,e[20]=Me):Me=e[20];const ge=Me,Ye=g?.graphContainer,Ke=m?.graphContainer;let Q;e[21]!==g?.description||e[22]!==g?.title||e[23]!==n||e[24]!==p||e[25]!==c||e[26]!==w||e[27]!==m?.description||e[28]!==m?.title||e[29]!==l?(Q=w||c||p?i.jsxRuntimeExports.jsx(wt.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:g?.title,description:g?.description},graphTitle:w,graphDescription:c,width:l,graphDownload:void 0,dataDownload:p?n.map(Lt).filter(zt).length>0?n.map(Mt).filter(Tt):n.filter(Pt):null}):null,e[21]=g?.description,e[22]=g?.title,e[23]=n,e[24]=p,e[25]=c,e[26]=w,e[27]=m?.description,e[28]=m?.title,e[29]=l,e[30]=Q):Q=e[30];let ee;e[31]!==We||e[32]!==Ae||e[33]!==pe||e[34]!==Ee||e[35]!==g||e[36]!==de||e[37]!==j||e[38]!==E||e[39]!==n||e[40]!==y||e[41]!==Ie||e[42]!==ge||e[43]!==Le||e[44]!==Y||e[45]!==Ve||e[46]!==ae||e[47]!==Ue||e[48]!==o||e[49]!==He||e[50]!==Be||e[51]!==Ze||e[52]!==Je||e[53]!==d||e[54]!==r||e[55]!==b||e[56]!==Ne||e[57]!==q||e[58]!==A||e[59]!==J||e[60]!==$e||e[61]!==C||e[62]!==Fe||e[63]!==_e||e[64]!==O||e[65]!==D||e[66]!==Ge||e[67]!==m||e[68]!==he||e[69]!==H||e[70]!==F||e[71]!==se||e[72]!==l?(ee=i.jsxRuntimeExports.jsx(ot.GraphArea,{ref:Xe,children:H&&he&&Ne?i.jsxRuntimeExports.jsx(qt,{data:n,globeOffset:Ue,polygonData:Ne,colorDomain:ge,width:H,height:he,colors:E||(O==="categorical"?oe.Colors[F].sequentialColors[`neutralColorsx0${ge.length}`]:oe.Colors[F].sequentialColors[`neutralColorsx0${ge.length+1}`]),mapNoDataColor:r,categorical:O==="categorical",mapBorderColor:d,tooltip:se,mapProperty:b,styles:m,classNames:g,autoRotate:pe===!0?1.5:pe===!1?0:pe,enableZoom:Le,globeMaterial:ae,atmosphereColor:Ae,colorLegendTitle:j,showColorScale:Ge,hoverStrokeColor:F==="light"?oe.Colors.light.grays["gray-700"]:oe.Colors.light.grays["gray-300"],highlightedIds:Be,resetSelectionOnDoubleClick:Fe,detailsOnClick:y,onSeriesMouseOver:J,onSeriesMouseClick:A,scale:_e,polygonAltitude:$e,centerLat:Ee[0],centerLng:Ee[1],atmosphereAltitude:We,globeCurvatureResolution:Ve,fogSettings:Y,lights:Ze,highlightedAltitude:He,selectedId:D,collapseColorScaleByDefault:de,dimmedOpacity:Ie,locale:Je}):i.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(q,o||(C?q?(l||H)*C>q?(l||H)*C:q:(l||H)*C:he))}px`},className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(dt.w,{"aria-label":"Loading graph"})})}),e[31]=We,e[32]=Ae,e[33]=pe,e[34]=Ee,e[35]=g,e[36]=de,e[37]=j,e[38]=E,e[39]=n,e[40]=y,e[41]=Ie,e[42]=ge,e[43]=Le,e[44]=Y,e[45]=Ve,e[46]=ae,e[47]=Ue,e[48]=o,e[49]=He,e[50]=Be,e[51]=Ze,e[52]=Je,e[53]=d,e[54]=r,e[55]=b,e[56]=Ne,e[57]=q,e[58]=A,e[59]=J,e[60]=$e,e[61]=C,e[62]=Fe,e[63]=_e,e[64]=O,e[65]=D,e[66]=Ge,e[67]=m,e[68]=he,e[69]=H,e[70]=F,e[71]=se,e[72]=l,e[73]=ee):ee=e[73];let te;e[74]!==g?.footnote||e[75]!==g?.source||e[76]!==G||e[77]!==f||e[78]!==m?.footnote||e[79]!==m?.source||e[80]!==l?(te=f||G?i.jsxRuntimeExports.jsx(jt.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:f,footNote:G,width:l}):null,e[74]=g?.footnote,e[75]=g?.source,e[76]=G,e[77]=f,e[78]=m?.footnote,e[79]=m?.source,e[80]=l,e[81]=te):te=e[81];let ze;return e[82]!==M||e[83]!==s||e[84]!==ie||e[85]!==o||e[86]!==S||e[87]!==q||e[88]!==P||e[89]!==C||e[90]!==Ye||e[91]!==Ke||e[92]!==Q||e[93]!==ee||e[94]!==te||e[95]!==F||e[96]!==l?(ze=i.jsxRuntimeExports.jsxs(ot.GraphContainer,{className:Ye,style:Ke,id:ie,ref:lt,"aria-label":M,backgroundColor:s,theme:F,language:S,minHeight:q,width:l,height:o,relativeHeight:C,padding:P,children:[Q,ee,te]}),e[82]=M,e[83]=s,e[84]=ie,e[85]=o,e[86]=S,e[87]=q,e[88]=P,e[89]=C,e[90]=Ye,e[91]=Ke,e[92]=Q,e[93]=ee,e[94]=te,e[95]=F,e[96]=l,e[97]=ze):ze=e[97],ze}function Pt(t){return t!==void 0}function Tt(t){return t!==void 0}function Mt(t){return t.data}function zt(t){return t!==void 0}function Lt(t){return t.data}function At(t){return t.x}function Gt(t){if(t.geometry.type==="Polygon"){const x=[...t.geometry.coordinates[0]].reverse(),w={...t.geometry,coordinates:[x]};return{...t,geometry:w}}const e=[];t.geometry.coordinates.forEach(x=>{const w=[...x[0]].reverse();e.push([w])});const n={...t.geometry,coordinates:e};return{...t,geometry:n}}exports.ThreeDGlobe=kt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),h=require("react"),lt=require("./Spinner-WHzzloYQ.cjs"),ct=require("react-globe.gl"),dt=require("./index-DQA8q5sC.cjs"),ut=require("three"),Ke=require("./Typography-BqmyF1gP.cjs"),pt=require("./_commonjsHelpers-BH3jXuIh.cjs"),ht=require("./Tooltip-Hr46paWP.cjs"),mt=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Qe=require("./index-BhI7mBJx.cjs"),gt=require("./getCentroidCoordinates-CtBGrNC8.cjs"),xt=require("./DetailsModal-jmmKRMRM.cjs"),ft=require("./ordinal-CrsysVE-.cjs"),vt=require("./threshold-DNsSUf8Q.cjs"),yt=require("./GraphHeader.cjs"),bt=require("./GraphFooter.cjs"),wt=require("./fetchAndParseData-QTF6tjij.cjs"),te=require("./Colors.cjs"),jt=require("./getUniqValue-NX8DgwND.cjs"),Ct=require("./getJenks-BzJvhy_H.cjs"),et=require("./GraphContainer-Cul9b74X.cjs");function Et(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,x.get?x:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const I=Et(ut);var Ye,tt;function Rt(){if(tt)return Ye;tt=1;var t=function(o){return o.charAt(0)==="#"?o.slice(1):o},e=function(o){var l=o.length===3||o.length===4,v=l?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),a=l?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),j=l?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),k=(l?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff";return{r:v,g:a,b:j,a:k}},n=function(o){return parseInt(o,16)},x=function(o){var l=o.r,v=o.g,a=o.b,j=o.a;return{r:n(l),g:n(v),b:n(a),a:+(n(j)/255).toFixed(2)}},w=function(o){return!isNaN(parseFloat(o))&&isFinite(o)},E=function(o,l){var v=o.r,a=o.g,j=o.b,k=o.a,P=w(l)?l:k;return"rgba(".concat(v,", ").concat(a,", ").concat(j,", ").concat(P,")")},f=function(o,l){var v=t(o),a=e(v),j=x(a);return E(j,l)};return Ye=f,Ye}var St=Rt();const ot=pt.getDefaultExportFromCjs(St);function Dt(t){let e;switch(t.type){case"ambient":e=new I.AmbientLight(t.color,t.intensity);break;case"directional":e=new I.DirectionalLight(t.color,t.intensity),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z===void 0?-1:t.target.z),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;case"point":e=new I.PointLight(t.color,t.intensity,t.distance||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z));break;case"spot":e=new I.SpotLight(t.color,t.intensity,t.distance||0,t.angle||Math.PI/3,t.penumbra||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z||0),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;default:throw new Error("Unknown light type")}return e}function Nt(t){const{width:e,autoRotate:n,data:x,enableZoom:w,categorical:E,colorDomain:f,colors:c,globeMaterial:o,height:l,polygonData:v,mapProperty:a,mapBorderColor:j,atmosphereColor:k,tooltip:P,styles:ve,classNames:_,mapNoDataColor:oe,colorLegendTitle:C,showColorScale:re,hoverStrokeColor:se,detailsOnClick:U,onSeriesMouseClick:$,onSeriesMouseOver:ye,resetSelectionOnDoubleClick:be,highlightedIds:T,scale:M,globeOffset:m,polygonAltitude:g,centerLng:V,centerLat:W,atmosphereAltitude:ie,globeCurvatureResolution:Z,fogSettings:z,lights:L,highlightedAltitude:ae,selectedId:y,collapseColorScaleByDefault:J,dimmedOpacity:A,locale:ne}=t,[le,we]=h.useState(!1),u=h.useRef(void 0),[N,B]=h.useState(void 0),[je,ce]=h.useState(J===void 0?!(e<680):!J),[X,Y]=h.useState({x:0,y:0}),[D,de]=h.useState(void 0),ue=E?ft.ordinal().domain(f).range(c):vt.threshold().domain(f).range(c);h.useEffect(()=>{u.current&&(u.current.controls().enableZoom=w)},[w]),h.useEffect(()=>{u.current&&(D||y?u.current.controls().autoRotate=!1:(u.current.controls().autoRotate=n!==0,u.current.controls().autoRotateSpeed=n))},[D,y,n]),h.useEffect(()=>{if(u.current&&y){const r=v.find(b=>b.properties[a]===y),[s,d]=gt.getCentroidCoordinates(r);u.current.pointOfView({lat:d,lng:s,altitude:M},1e3)}},[y,M,v,a]),h.useEffect(()=>{const r=u.current?.renderer().domElement;if(!r)return;const s=d=>{Y({x:d.clientX,y:d.clientY})};return r.addEventListener("mousemove",s),()=>r.removeEventListener("mousemove",s)},[]),h.useEffect(()=>{u.current&&u.current.pointOfView({lat:W,lng:V,altitude:M},1e3)},[M,V,W]);const R=o||new I.MeshBasicMaterial({color:"#FFF"}),G=h.useCallback(()=>{if(!u.current)return;const r=u.current.scene(),s=u.current.camera();let d=[];r.traverse(p=>{p instanceof I.Light&&d.push(p)}),d=[...d,...s.children],d.forEach(p=>p.parent?.remove(p)),L.map(p=>Dt(p)).forEach((p,S)=>{L[S].type!=="ambient"&&L[S].position==="camera"?(s.add(p),L[S].type!=="point"&&s.add(p.target)):r.add(p)}),z&&(r.fog=new I.Fog(z.color,z.near,z.far))},[L,z]),O=()=>{we(!0),G()};return h.useEffect(()=>{le&&G()},[le,G]),i.jsxRuntimeExports.jsxs("div",{className:"relative",children:[i.jsxRuntimeExports.jsx(ct,{ref:u,height:l,width:e,globeOffset:m,lineHoverPrecision:0,polygonsData:v,polygonAltitude:r=>T?.includes(r?.properties?.[a])||r?.properties?.[a]===y||r?.properties?.[a]===D?.id||r?.properties?.[a]===N?.id?ae:g,polygonCapColor:r=>{const s=y?r?.properties?.[a]===y?1:A:T?T.includes(r?.properties?.[a])?1:A:1,d=r?.properties?.[a],b=x.find(S=>S.id===d)?.x,p=b!=null?ue(b):oe;return ot(p,`${s}`)},polygonSideColor:r=>{const s=r?.properties?.[a],d=x.find(S=>S.id===s)?.x,b=y?r?.properties?.[a]===y?1:A:T?T.includes(r?.properties?.[a])?1:A:1,p=d!=null?ue(d):oe;return ot(p,`${b}`)},polygonStrokeColor:r=>r?.properties?.[a]===D?.id?se:j,onGlobeClick:()=>{B(void 0)},onPolygonClick:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;($||U)&&(dt.isEqual(N,s)&&be&&s?(B(void 0),$?.(void 0)):(B(s),$?.(s)))},onPolygonHover:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;de(s),ye?.(s)},atmosphereColor:k,atmosphereAltitude:ie,globeCurvatureResolution:Z,globeMaterial:R,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{if(u.current){u.current.pointOfView({lat:W,lng:V});const r=u.current.scene();setTimeout(()=>{(r.children[3]?.children[0]?.children[4]?.children||[]).forEach(b=>{const p=b.children[1];p.renderOrder=2})},300);const s=u.current.camera();r.add(s),O()}}}),re===!1?null:i.jsxRuntimeExports.jsx("div",{className:i.mo("absolute left-4 bottom-4 map-color-legend",_?.colorLegend),children:je?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.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:()=>{ce(!1)},children:i.jsxRuntimeExports.jsx(Qe.X,{})}),i.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:E?void 0:"340px"},children:[C&&C!==""?i.jsxRuntimeExports.jsx(Ke._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:C}):null,E?i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((r,s)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[s%c.length]}}),i.jsxRuntimeExports.jsx(Ke._,{size:"sm",marginBottom:"none",leading:"none",children:r})]},s))}):i.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:i.jsxRuntimeExports.jsxs("g",{children:[f.map((r,s)=>i.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[i.jsxRuntimeExports.jsx("rect",{x:s*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[s],stroke:c[s]}}),i.jsxRuntimeExports.jsx("text",{x:(s+1)*320/c.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:mt.numberFormattingFunction(r,void 0,void 0,void 0,void 0,ne)})]},s)),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("rect",{x:f.length*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[f.length],stroke:c[f.length]}})})]})})]})]}):i.jsxRuntimeExports.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:()=>{ce(!0)},children:i.jsxRuntimeExports.jsx(Qe.ExpandIcon,{})})}),D&&P?i.jsxRuntimeExports.jsx(ht.Tooltip,{data:D,body:P,xPos:X.x,yPos:X.y,backgroundStyle:ve?.tooltip,className:_?.tooltip}):null,U&&N!==void 0?i.jsxRuntimeExports.jsx(xt.DetailsModal,{body:U,data:N,setData:B,className:_?.modal}):null]})}function Ot(t){const e=i.compilerRuntimeExports.c(96),{data:n,mapData:x,graphTitle:w,colors:E,sources:f,graphDescription:c,height:o,width:l,footNote:v,colorDomain:a,colorLegendTitle:j,scaleType:k,padding:P,mapNoDataColor:ve,backgroundColor:_,mapBorderColor:oe,relativeHeight:C,tooltip:re,graphID:se,mapProperty:U,dataDownload:$,language:ye,minHeight:be,theme:T,ariaLabel:M,styles:m,classNames:g,autoRotate:V,enableZoom:W,globeMaterial:ie,centerPoint:Z,atmosphereColor:z,showColorScale:L,resetSelectionOnDoubleClick:ae,detailsOnClick:y,onSeriesMouseOver:J,onSeriesMouseClick:A,highlightedIds:ne,highlightedAltitude:le,dimmedOpacity:we,scale:u,globeOffset:N,polygonAltitude:B,globeCurvatureResolution:je,atmosphereAltitude:ce,fogSettings:X,lights:Y,selectedId:D,collapseColorScaleByDefault:de,locale:ue}=t,R=x===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json":x,G=v===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.":v,O=k===void 0?"threshold":k,r=ve===void 0?te.Colors.light.graphNoData:ve,s=_===void 0?!1:_,d=oe===void 0?te.Colors.light.grays["gray-500"]:oe,b=U===void 0?"ISO3":U,p=$===void 0?!1:$,S=ye===void 0?"en":ye,q=be===void 0?0:be,F=T===void 0?"light":T,pe=V===void 0?!0:V,ze=W===void 0?!0:W;let Ce;e[0]!==Z?(Ce=Z===void 0?[0,0]:Z,e[0]=Z,e[1]=Ce):Ce=e[1];const Ee=Ce,Le=z===void 0?"#999":z,Ae=L===void 0?!0:L,Ge=ae===void 0?!0:ae,Fe=le===void 0?.1:le,Be=we===void 0?.3:we,He=u===void 0?1:u;let Re;e[2]!==N?(Re=N===void 0?[0,0]:N,e[2]=N,e[3]=Re):Re=e[3];const Ie=Re,_e=B===void 0?.01:B,Ue=je===void 0?4:je,$e=ce===void 0?.15:ce;let Se;e[4]!==Y?(Se=Y===void 0?[{type:"ambient",color:4210752,intensity:.4},{type:"directional",color:16777215,intensity:1,position:{x:5,y:10,z:5}}]:Y,e[4]=Y,e[5]=Se):Se=e[5];const Ve=Se,We=ue===void 0?"en":ue,[De,rt]=h.useState(void 0),[H,st]=h.useState(0),[he,it]=h.useState(0),Ze=h.useRef(null),at=h.useRef(null);let Ne,Oe;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{const xe=new ResizeObserver(fe=>{st(fe[0].target.clientWidth||620),it(fe[0].target.clientHeight||480)});return Ze.current&&xe.observe(Ze.current),()=>xe.disconnect()},Oe=[],e[6]=Ne,e[7]=Oe):(Ne=e[6],Oe=e[7]),h.useEffect(Ne,Oe);let qe;e[8]===Symbol.for("react.memo_cache_sentinel")?(qe=xe=>{rt(xe)},e[8]=qe):qe=e[8];const me=h.useEffectEvent(qe);let ke;e[9]!==R||e[10]!==me?(ke=()=>{typeof R=="string"?wt.fetchAndParseJSON(R).then(fe=>{if(R==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const nt=fe.features.map(Lt);me(nt)}else me(fe.features)}):me(R.features)},e[9]=R,e[10]=me,e[11]=ke):ke=e[11];let Pe;e[12]!==R?(Pe=[R],e[12]=R,e[13]=Pe):Pe=e[13],h.useEffect(ke,Pe);let Te;e[14]!==a||e[15]!==E?.length||e[16]!==n||e[17]!==O?(Te=a||(O==="categorical"?jt.getUniqValue(n,"x"):Ct.getJenks(n.map(zt),E?.length||4)),e[14]=a,e[15]=E?.length,e[16]=n,e[17]=O,e[18]=Te):Te=e[18];const ge=Te,Je=g?.graphContainer,Xe=m?.graphContainer;let K;e[19]!==g?.description||e[20]!==g?.title||e[21]!==n||e[22]!==p||e[23]!==c||e[24]!==w||e[25]!==m?.description||e[26]!==m?.title||e[27]!==l?(K=w||c||p?i.jsxRuntimeExports.jsx(yt.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:g?.title,description:g?.description},graphTitle:w,graphDescription:c,width:l,graphDownload:void 0,dataDownload:p?n.map(Mt).filter(Tt).length>0?n.map(Pt).filter(kt):n.filter(qt):null}):null,e[19]=g?.description,e[20]=g?.title,e[21]=n,e[22]=p,e[23]=c,e[24]=w,e[25]=m?.description,e[26]=m?.title,e[27]=l,e[28]=K):K=e[28];let Q;e[29]!==$e||e[30]!==Le||e[31]!==pe||e[32]!==Ee||e[33]!==g||e[34]!==de||e[35]!==j||e[36]!==E||e[37]!==n||e[38]!==y||e[39]!==Be||e[40]!==ge||e[41]!==ze||e[42]!==X||e[43]!==Ue||e[44]!==ie||e[45]!==Ie||e[46]!==o||e[47]!==Fe||e[48]!==ne||e[49]!==Ve||e[50]!==We||e[51]!==d||e[52]!==r||e[53]!==b||e[54]!==De||e[55]!==q||e[56]!==A||e[57]!==J||e[58]!==_e||e[59]!==C||e[60]!==Ge||e[61]!==He||e[62]!==O||e[63]!==D||e[64]!==Ae||e[65]!==m||e[66]!==he||e[67]!==H||e[68]!==F||e[69]!==re||e[70]!==l?(Q=i.jsxRuntimeExports.jsx(et.GraphArea,{ref:Ze,children:H&&he&&De?i.jsxRuntimeExports.jsx(Nt,{data:n,globeOffset:Ie,polygonData:De,colorDomain:ge,width:H,height:he,colors:E||(O==="categorical"?te.Colors[F].sequentialColors[`neutralColorsx0${ge.length}`]:te.Colors[F].sequentialColors[`neutralColorsx0${ge.length+1}`]),mapNoDataColor:r,categorical:O==="categorical",mapBorderColor:d,tooltip:re,mapProperty:b,styles:m,classNames:g,autoRotate:pe===!0?1.5:pe===!1?0:pe,enableZoom:ze,globeMaterial:ie,atmosphereColor:Le,colorLegendTitle:j,showColorScale:Ae,hoverStrokeColor:F==="light"?te.Colors.light.grays["gray-700"]:te.Colors.light.grays["gray-300"],highlightedIds:ne,resetSelectionOnDoubleClick:Ge,detailsOnClick:y,onSeriesMouseOver:J,onSeriesMouseClick:A,scale:He,polygonAltitude:_e,centerLat:Ee[0],centerLng:Ee[1],atmosphereAltitude:$e,globeCurvatureResolution:Ue,fogSettings:X,lights:Ve,highlightedAltitude:Fe,selectedId:D,collapseColorScaleByDefault:de,dimmedOpacity:Be,locale:We}):i.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(q,o||(C?q?(l||H)*C>q?(l||H)*C:q:(l||H)*C:he))}px`},className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(lt.w,{"aria-label":"Loading graph"})})}),e[29]=$e,e[30]=Le,e[31]=pe,e[32]=Ee,e[33]=g,e[34]=de,e[35]=j,e[36]=E,e[37]=n,e[38]=y,e[39]=Be,e[40]=ge,e[41]=ze,e[42]=X,e[43]=Ue,e[44]=ie,e[45]=Ie,e[46]=o,e[47]=Fe,e[48]=ne,e[49]=Ve,e[50]=We,e[51]=d,e[52]=r,e[53]=b,e[54]=De,e[55]=q,e[56]=A,e[57]=J,e[58]=_e,e[59]=C,e[60]=Ge,e[61]=He,e[62]=O,e[63]=D,e[64]=Ae,e[65]=m,e[66]=he,e[67]=H,e[68]=F,e[69]=re,e[70]=l,e[71]=Q):Q=e[71];let ee;e[72]!==g?.footnote||e[73]!==g?.source||e[74]!==G||e[75]!==f||e[76]!==m?.footnote||e[77]!==m?.source||e[78]!==l?(ee=f||G?i.jsxRuntimeExports.jsx(bt.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:f,footNote:G,width:l}):null,e[72]=g?.footnote,e[73]=g?.source,e[74]=G,e[75]=f,e[76]=m?.footnote,e[77]=m?.source,e[78]=l,e[79]=ee):ee=e[79];let Me;return e[80]!==M||e[81]!==s||e[82]!==se||e[83]!==o||e[84]!==S||e[85]!==q||e[86]!==P||e[87]!==C||e[88]!==Je||e[89]!==Xe||e[90]!==K||e[91]!==Q||e[92]!==ee||e[93]!==F||e[94]!==l?(Me=i.jsxRuntimeExports.jsxs(et.GraphContainer,{className:Je,style:Xe,id:se,ref:at,"aria-label":M,backgroundColor:s,theme:F,language:S,minHeight:q,width:l,height:o,relativeHeight:C,padding:P,children:[K,Q,ee]}),e[80]=M,e[81]=s,e[82]=se,e[83]=o,e[84]=S,e[85]=q,e[86]=P,e[87]=C,e[88]=Je,e[89]=Xe,e[90]=K,e[91]=Q,e[92]=ee,e[93]=F,e[94]=l,e[95]=Me):Me=e[95],Me}function qt(t){return t!==void 0}function kt(t){return t!==void 0}function Pt(t){return t.data}function Tt(t){return t!==void 0}function Mt(t){return t.data}function zt(t){return t.x}function Lt(t){if(t.geometry.type==="Polygon"){const x=[...t.geometry.coordinates[0]].reverse(),w={...t.geometry,coordinates:[x]};return{...t,geometry:w}}const e=[];t.geometry.coordinates.forEach(x=>{const w=[...x[0]].reverse();e.push([w])});const n={...t.geometry,coordinates:e};return{...t,geometry:n}}exports.ThreeDGlobe=Ot;
2
2
  //# sourceMappingURL=ThreeDGlobe.cjs.map