@undp/data-viz 2.3.19 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +1360 -1363
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +302 -305
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +4 -4
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +591 -594
- package/dist/BulletChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +4 -4
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +255 -258
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +553 -556
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{GraphEl-Dorm_qQE.js → GraphEl-B73N4RIA.js} +2 -2
- package/dist/{GraphEl-Dorm_qQE.js.map → GraphEl-B73N4RIA.js.map} +1 -1
- package/dist/{GraphEl-D8WRC8-j.cjs → GraphEl-Lt1og0C-.cjs} +2 -2
- package/dist/{GraphEl-D8WRC8-j.cjs.map → GraphEl-Lt1og0C-.cjs.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +310 -313
- package/dist/HybridMap.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +269 -272
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +319 -322
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +3 -3
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +274 -280
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +341 -344
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +251 -254
- package/dist/SlopeChart.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +292 -295
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +3 -3
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +196 -199
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.js +274 -277
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/index-B0Awa_de.js +377 -0
- package/dist/index-B0Awa_de.js.map +1 -0
- package/dist/index-CP8cmNzt.cjs +2 -0
- package/dist/index-CP8cmNzt.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/index-Bdo_HXb_.cjs +0 -2
- package/dist/index-Bdo_HXb_.cjs.map +0 -1
- package/dist/index-CGrBpeUa.js +0 -380
- package/dist/index-CGrBpeUa.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BiVariateChoroplethMap.js","sources":["../src/Components/Graphs/Maps/BiVariateMap/Graph.tsx","../src/Components/Graphs/Maps/BiVariateMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\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 { scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n BivariateMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: BivariateMapDataType[];\r\n mapData: FeatureCollection;\r\n xDomain: number[];\r\n yDomain: number[];\r\n width: number;\r\n height: number;\r\n colors: string[][];\r\n xColorLegendTitle: string;\r\n yColorLegendTitle: string;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n scale: number;\r\n centerPoint?: [number, number];\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 zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\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 showColorScale: boolean;\r\n collapseColorScaleByDefault?: boolean;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n zoomAndCenterByHighlightedIds: boolean;\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 xDomain,\r\n mapData,\r\n xColorLegendTitle,\r\n yDomain,\r\n yColorLegendTitle,\r\n width,\r\n height,\r\n colors,\r\n scale,\r\n centerPoint,\r\n mapBorderWidth,\r\n mapNoDataColor,\r\n mapBorderColor,\r\n tooltip,\r\n onSeriesMouseOver,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n showColorScale,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\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 [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\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 zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\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({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\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\r\n const pathGenerator = geoPath().projection(projection);\r\n const xRange = Array.from({ length: xDomain.length }, (_, i) => i);\r\n\r\n const yRange = Array.from({ length: yDomain.length }, (_, i) => i);\r\n const xScale = scaleThreshold<number, number>().domain(xDomain).range(xRange);\r\n const yScale = scaleThreshold<number, number>().domain(yDomain).range(yRange);\r\n\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\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n viewBox={`0 0 ${width} ${height}`}\r\n width={`${width}px`}\r\n height={`${height}px`}\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.length !== 0\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.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 xColorCoord = !checkIfNullOrUndefined(d.x)\r\n ? xScale(d.x as number)\r\n : undefined;\r\n const yColorCoord = !checkIfNullOrUndefined(d.y)\r\n ? yScale(d.y as number)\r\n : undefined;\r\n const color =\r\n xColorCoord !== undefined && yColorCoord !== undefined\r\n ? colors[yColorCoord][xColorCoord]\r\n : mapNoDataColor;\r\n\r\n return (\r\n <motion.g\r\n className='undp-map-shapes'\r\n key={d.id}\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.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -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 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 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 >\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={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\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 </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n ))\r\n : null}\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 {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={{ width: '175px' }}\r\n >\r\n <div className='flex gap-1 items-center'>\r\n <svg width='136px' viewBox='0 0 136 136' className='shrink-0'>\r\n <g>\r\n {colors.map((d, i) => (\r\n <g key={i} transform={`translate(0,${100 - i * 25})`}>\r\n {d.map((el, j) => (\r\n <rect\r\n key={j}\r\n y={1}\r\n x={j * 25 + 1}\r\n fill={el}\r\n width={23}\r\n height={23}\r\n strokeWidth={selectedColor === el ? 2 : 0.25}\r\n style={{ cursor: 'pointer' }}\r\n onMouseOver={() => {\r\n setSelectedColor(el);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n <g transform='translate(0,125)'>\r\n {xDomain.map((el, j) => (\r\n <text key={j} y={10} x={(j + 1) * 25} fontSize={10} textAnchor='middle'>\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(\r\n el,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n locale,\r\n )}\r\n </text>\r\n ))}\r\n </g>\r\n {yDomain.map((el, j) => (\r\n <g\r\n key={j}\r\n transform={`translate(${\r\n Math.max(Math.min(xDomain.length + 1, 5), 4) * 25 + 10\r\n },${100 - j * 25})`}\r\n >\r\n <text\r\n x={0}\r\n transform='rotate(-90)'\r\n y={0}\r\n fontSize={10}\r\n textAnchor='middle'\r\n >\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(\r\n el,\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 </svg>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='leading-normal text-center shrink-0'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n writingMode: 'vertical-rl',\r\n height: '8.5rem',\r\n transform: 'rotate(180deg)',\r\n }}\r\n >\r\n {yColorLegendTitle}\r\n </P>\r\n </div>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='mt-1 leading-normal text-center'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n width: '8.5rem',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n }}\r\n >\r\n {xColorLegendTitle}\r\n </P>\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 border text-primary-gray-700 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 border text-primary-gray-700 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 {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 {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 </>\r\n );\r\n}\r\n","import { useEffect, useEffectEvent, useMemo, useRef, useState } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BivariateMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n MapOverlayDataType,\r\n} from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects. */\r\n data: BivariateMapDataType[];\r\n\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 /** Colors for the choropleth map. Array must be 5x5 */\r\n colors?: string[][];\r\n /** Title for the first color legend */\r\n xColorLegendTitle?: string;\r\n /** Title for the second color legend */\r\n yColorLegendTitle?: string;\r\n /** Domain of x-colors for the map */\r\n xDomain?: number[];\r\n /** Domain of y-colors for the map */\r\n yDomain?: number[];\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 /** 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 /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\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 /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** 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 /** Toggle visibility of color scale. */\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 /** 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 BiVariateChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n colors = Colors.light.bivariateColors.colors05x05,\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 xDomain,\r\n yDomain,\r\n xColorLegendTitle = 'X Color key',\r\n yColorLegendTitle = 'Y Color key',\r\n tooltip,\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 mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n showColorScale = true,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\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 timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds = false,\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n mapOverlay,\r\n locale = 'en',\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\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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);\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\r\n if (xDomain && yDomain)\r\n if (xDomain.length !== colors[0].length - 1 || yDomain.length !== colors.length - 1) {\r\n console.error(\"the xDomain and yDomain array length don't match to the color array length\");\r\n return null;\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 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 xDomain={\r\n xDomain ||\r\n getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors[0].length,\r\n )\r\n }\r\n yDomain={\r\n yDomain ||\r\n getJenks(\r\n data.map(d => d.y as number | null | undefined),\r\n colors.length,\r\n )\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={colors}\r\n xColorLegendTitle={xColorLegendTitle}\r\n yColorLegendTitle={yColorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n showColorScale={showColorScale}\r\n classNames={classNames}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n detailsOnClick={detailsOnClick}\r\n zoomInteraction={zoomInteraction}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\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 collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\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":["Graph","props","data","xDomain","mapData","xColorLegendTitle","yDomain","yColorLegendTitle","width","height","colors","scale","centerPoint","mapBorderWidth","mapNoDataColor","mapBorderColor","tooltip","onSeriesMouseOver","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","showColorScale","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","locale","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","showLegend","setShowLegend","useState","undefined","selectedColor","setSelectedColor","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","useRef","isInView","useInView","once","amount","mapG","zoomRef","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","xRange","Array","from","_","i","yRange","xScale","scaleThreshold","domain","range","yScale","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","path","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","index","findIndex","el","id","xColorCoord","checkIfNullOrUndefined","x","yColorCoord","y","color","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","pointerEvents","cn","colorLegend","X","j","cursor","numberFormattingFunction","max","P","display","WebkitLineClamp","WebkitBoxOrient","overflow","writingMode","ExpandIcon","Tooltip","DetailsModal","modal","BiVariateChoroplethMap","$","_c","graphTitle","t0","t1","sources","graphDescription","footNote","t2","t3","t4","t5","padding","t6","t7","backgroundColor","t8","t9","relativeHeight","isWorldMap","t10","t11","graphID","t12","t13","t14","graphDownload","t15","dataDownload","t16","showAntarctica","t17","language","t18","minHeight","t19","theme","t20","ariaLabel","t21","t22","t23","t24","t25","t26","timeline","t27","t28","t29","t30","mapOverlay","t31","Colors","light","bivariateColors","colors05x05","graphNoData","grays","t32","t33","t34","t35","enabled","autoplay","showOnlyActiveDate","t36","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t37","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t38","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t39","shape","onUpdateShape","useEffectEvent","t40","shape_0","onUpdateOverlayMapShape","t41","fetchAndParseJSON","then","d_1","t42","t43","d_2","t44","t45","t46","t47","speed","interval","setInterval","clearInterval","t48","t49","getSliderMarks","markObj","console","error","t50","graphContainer","t51","t52","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t53","Pause","Play","SliderUI","nextValue","nextValue_0","t54","GraphArea","d_8","format","_temp8","getJenks","_temp9","_temp0","Spinner","t55","footnote","source","GraphFooter","t56","GraphContainer","d_10","d_9","NAME","d_5","d_4","d_3","d_7","d_6","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,+BAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,4BAAAA;AAAAA,IAC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AAA0L,GAAAU,GAAA;AAAA,SAsOuBjQ,EAAC2D;AAA+B;AAtOvD,SAAA0L,GAAA9L,GAAA;AAAA,SAgOsDA,EAAEpD,YAAiB+P,SAAK;AAAY;AAhO1F,SAAAxB,GAAAyB,GAAA;AAAA,SAgL4BnQ,MAAM9C;AAAS;AAhL3C,SAAAuR,GAAA2B,GAAA;AAAA,SA+K6CpQ,MAAM9C;AAAS;AA/K5D,SAAAsR,GAAA6B,GAAA;AAAA,SA+KyBrQ,EAAC7F;AAAK;AA/K/B,SAAAoU,GAAA+B,GAAA;AAAA,SA8K2CtQ,MAAM9C;AAAS;AA9K1D,SAAAoR,GAAAiC,GAAA;AAAA,SA8KuBvQ,EAAC7F;AAAK;AA9K7B,SAAA4Q,GAAAyF,GAAAC,GAAA;AAAA,SAqEkBD,IAAIC;AAAC;AArEvB,SAAA5F,GAAA7K,GAAA;AAAA,SAiEgBA,EAACyK;AAAK;"}
|
|
1
|
+
{"version":3,"file":"BiVariateChoroplethMap.js","sources":["../src/Components/Graphs/Maps/BiVariateMap/Graph.tsx","../src/Components/Graphs/Maps/BiVariateMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\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 { scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n BivariateMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: BivariateMapDataType[];\r\n mapData: FeatureCollection;\r\n xDomain: number[];\r\n yDomain: number[];\r\n width: number;\r\n height: number;\r\n colors: string[][];\r\n xColorLegendTitle: string;\r\n yColorLegendTitle: string;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n scale: number;\r\n centerPoint?: [number, number];\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 zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds?: string[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\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 showColorScale: boolean;\r\n collapseColorScaleByDefault?: boolean;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n zoomAndCenterByHighlightedIds: boolean;\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 xDomain,\r\n mapData,\r\n xColorLegendTitle,\r\n yDomain,\r\n yColorLegendTitle,\r\n width,\r\n height,\r\n colors,\r\n scale,\r\n centerPoint,\r\n mapBorderWidth,\r\n mapNoDataColor,\r\n mapBorderColor,\r\n tooltip,\r\n onSeriesMouseOver,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n showColorScale,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\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 [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\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 zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\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({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds?.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds?.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\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\r\n const pathGenerator = geoPath().projection(projection);\r\n const xRange = Array.from({ length: xDomain.length }, (_, i) => i);\r\n\r\n const yRange = Array.from({ length: yDomain.length }, (_, i) => i);\r\n const xScale = scaleThreshold<number, number>().domain(xDomain).range(xRange);\r\n const yScale = scaleThreshold<number, number>().domain(yDomain).range(yRange);\r\n\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\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n viewBox={`0 0 ${width} ${height}`}\r\n width={`${width}px`}\r\n height={`${height}px`}\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.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 xColorCoord = !checkIfNullOrUndefined(d.x)\r\n ? xScale(d.x as number)\r\n : undefined;\r\n const yColorCoord = !checkIfNullOrUndefined(d.y)\r\n ? yScale(d.y as number)\r\n : undefined;\r\n const color =\r\n xColorCoord !== undefined && yColorCoord !== undefined\r\n ? colors[yColorCoord][xColorCoord]\r\n : mapNoDataColor;\r\n\r\n return (\r\n <motion.g\r\n className='undp-map-shapes'\r\n key={d.id}\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) !== -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 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 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 >\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={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\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 </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n ))\r\n : null}\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 {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={{ width: '175px' }}\r\n >\r\n <div className='flex gap-1 items-center'>\r\n <svg width='136px' viewBox='0 0 136 136' className='shrink-0'>\r\n <g>\r\n {colors.map((d, i) => (\r\n <g key={i} transform={`translate(0,${100 - i * 25})`}>\r\n {d.map((el, j) => (\r\n <rect\r\n key={j}\r\n y={1}\r\n x={j * 25 + 1}\r\n fill={el}\r\n width={23}\r\n height={23}\r\n strokeWidth={selectedColor === el ? 2 : 0.25}\r\n style={{ cursor: 'pointer' }}\r\n onMouseOver={() => {\r\n setSelectedColor(el);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n <g transform='translate(0,125)'>\r\n {xDomain.map((el, j) => (\r\n <text key={j} y={10} x={(j + 1) * 25} fontSize={10} textAnchor='middle'>\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(\r\n el,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n locale,\r\n )}\r\n </text>\r\n ))}\r\n </g>\r\n {yDomain.map((el, j) => (\r\n <g\r\n key={j}\r\n transform={`translate(${\r\n Math.max(Math.min(xDomain.length + 1, 5), 4) * 25 + 10\r\n },${100 - j * 25})`}\r\n >\r\n <text\r\n x={0}\r\n transform='rotate(-90)'\r\n y={0}\r\n fontSize={10}\r\n textAnchor='middle'\r\n >\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(\r\n el,\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 </svg>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='leading-normal text-center shrink-0'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n writingMode: 'vertical-rl',\r\n height: '8.5rem',\r\n transform: 'rotate(180deg)',\r\n }}\r\n >\r\n {yColorLegendTitle}\r\n </P>\r\n </div>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='mt-1 leading-normal text-center'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n width: '8.5rem',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n }}\r\n >\r\n {xColorLegendTitle}\r\n </P>\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 border text-primary-gray-700 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 border text-primary-gray-700 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 {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 {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 </>\r\n );\r\n}\r\n","import { useEffect, useEffectEvent, useMemo, useRef, useState } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BivariateMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n MapOverlayDataType,\r\n} from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects. */\r\n data: BivariateMapDataType[];\r\n\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 /** Colors for the choropleth map. Array must be 5x5 */\r\n colors?: string[][];\r\n /** Title for the first color legend */\r\n xColorLegendTitle?: string;\r\n /** Title for the second color legend */\r\n yColorLegendTitle?: string;\r\n /** Domain of x-colors for the map */\r\n xDomain?: number[];\r\n /** Domain of y-colors for the map */\r\n yDomain?: number[];\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 /** 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 /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\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 /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** 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 /** Toggle visibility of color scale. */\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 /** 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 BiVariateChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n colors = Colors.light.bivariateColors.colors05x05,\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 xDomain,\r\n yDomain,\r\n xColorLegendTitle = 'X Color key',\r\n yColorLegendTitle = 'Y Color key',\r\n tooltip,\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 mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n showColorScale = true,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\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 timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds = false,\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n mapOverlay,\r\n locale = 'en',\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\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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);\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\r\n if (xDomain && yDomain)\r\n if (xDomain.length !== colors[0].length - 1 || yDomain.length !== colors.length - 1) {\r\n console.error(\"the xDomain and yDomain array length don't match to the color array length\");\r\n return null;\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 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 xDomain={\r\n xDomain ||\r\n getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors[0].length,\r\n )\r\n }\r\n yDomain={\r\n yDomain ||\r\n getJenks(\r\n data.map(d => d.y as number | null | undefined),\r\n colors.length,\r\n )\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={colors}\r\n xColorLegendTitle={xColorLegendTitle}\r\n yColorLegendTitle={yColorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n showColorScale={showColorScale}\r\n classNames={classNames}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n detailsOnClick={detailsOnClick}\r\n zoomInteraction={zoomInteraction}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\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 collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\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":["Graph","props","data","xDomain","mapData","xColorLegendTitle","yDomain","yColorLegendTitle","width","height","colors","scale","centerPoint","mapBorderWidth","mapNoDataColor","mapBorderColor","tooltip","onSeriesMouseOver","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","showColorScale","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","locale","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","showLegend","setShowLegend","useState","undefined","selectedColor","setSelectedColor","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","useRef","isInView","useInView","once","amount","mapG","zoomRef","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","xRange","Array","from","_","i","yRange","xScale","scaleThreshold","domain","range","yScale","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","path","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","index","findIndex","el","id","xColorCoord","checkIfNullOrUndefined","x","yColorCoord","y","color","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","pointerEvents","cn","colorLegend","X","j","cursor","numberFormattingFunction","max","P","display","WebkitLineClamp","WebkitBoxOrient","overflow","writingMode","ExpandIcon","Tooltip","DetailsModal","modal","BiVariateChoroplethMap","$","_c","graphTitle","t0","t1","sources","graphDescription","footNote","t2","t3","t4","t5","padding","t6","t7","backgroundColor","t8","t9","relativeHeight","isWorldMap","t10","t11","graphID","t12","t13","t14","graphDownload","t15","dataDownload","t16","showAntarctica","t17","language","t18","minHeight","t19","theme","t20","ariaLabel","t21","t22","t23","t24","t25","t26","timeline","t27","t28","t29","t30","mapOverlay","t31","Colors","light","bivariateColors","colors05x05","graphNoData","grays","t32","t33","t34","t35","enabled","autoplay","showOnlyActiveDate","t36","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t37","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t38","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t39","shape","onUpdateShape","useEffectEvent","t40","shape_0","onUpdateOverlayMapShape","t41","fetchAndParseJSON","then","d_1","t42","t43","d_2","t44","t45","t46","t47","speed","interval","setInterval","clearInterval","t48","t49","getSliderMarks","markObj","console","error","t50","graphContainer","t51","t52","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t53","Pause","Play","SliderUI","nextValue","nextValue_0","t54","GraphArea","d_8","format","_temp8","getJenks","_temp9","_temp0","Spinner","t55","footnote","source","GraphFooter","t56","GraphContainer","d_10","d_9","NAME","d_5","d_4","d_3","d_7","d_6","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,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K,EAAA,GAAA,GA5KjBkK;AA4KiB;AA3Td,SAAAN,GAAAQ,GAAA;AAAA,SA6OuBhQ,EAAC6D;AAA+B;AA7OvD,SAAA0L,GAAAU,GAAA;AAAA,SAsOuBjQ,EAAC2D;AAA+B;AAtOvD,SAAA0L,GAAA9L,GAAA;AAAA,SAgOsDA,EAAEpD,YAAiB+P,SAAK;AAAY;AAhO1F,SAAAxB,GAAAyB,GAAA;AAAA,SAgL4BnQ,MAAM9C;AAAS;AAhL3C,SAAAuR,GAAA2B,GAAA;AAAA,SA+K6CpQ,MAAM9C;AAAS;AA/K5D,SAAAsR,GAAA6B,GAAA;AAAA,SA+KyBrQ,EAAC7F;AAAK;AA/K/B,SAAAoU,GAAA+B,GAAA;AAAA,SA8K2CtQ,MAAM9C;AAAS;AA9K1D,SAAAoR,GAAAiC,GAAA;AAAA,SA8KuBvQ,EAAC7F;AAAK;AA9K7B,SAAA4Q,GAAAyF,GAAAC,GAAA;AAAA,SAqEkBD,IAAIC;AAAC;AArEvB,SAAA5F,GAAA7K,GAAA;AAAA,SAiEgBA,EAACyK;AAAK;"}
|
package/dist/BulletChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-D4pAp7u0.cjs"),U=require("react"),Ke=require("./index-Cno4Q0YE.cjs"),Le=require("./parse-xYI9yrvL.cjs"),$e=require("./getSliderMarks-BzrpHrHS.cjs"),Fe=require("./index-DQA8q5sC.cjs"),Ve=require("./index-CSNtgibC.cjs"),qe=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Ue=require("./Tooltip-Hr46paWP.cjs"),y=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Be=require("./Axis-BTaS9oPQ.cjs"),Pe=require("./AxisTitle-DP_evhbe.cjs"),Qe=require("./XAxesLabels-C03jHniq.cjs"),Ge=require("./ReferenceLine-CpU4G01Y.cjs"),Ze=require("./YTicksAndGridLines-DFjm8RCc.cjs"),_e=require("./XTicksAndGridLines-C5DuC5oY.cjs"),ti=require("./YAxesLabels-DeENFC2M.cjs"),We=require("./DetailsModal-jmmKRMRM.cjs"),Xe=require("./linear-CgUCbw9F.cjs"),Ye=require("./band-VYfcZeJ2.cjs"),kt=require("./proxy-CqH8m8IQ.cjs"),He=require("./use-in-view-dnRv_qqF.cjs"),Je=require("./index-FXfr51ZM.cjs"),Ce=require("./Colors.cjs"),ei=require("./EmptyState-CFmiFPHz.cjs"),Se=require("./GraphContainer-Cul9b74X.cjs"),ii=require("./GraphFooter.cjs"),ni=require("./GraphHeader.cjs"),ai=require("./ColorLegend.cjs"),De=require("./ensureCompleteData-D9bQTiVS.cjs"),Te=require("./index-BhI7mBJx.cjs");function si(e){const t=a.compilerRuntimeExports.c(164),{data:i,width:Rt,height:ne,barColor:Yt,suffix:Ot,prefix:E,barPadding:Ht,showLabels:Jt,showValues:ae,showTicks:It,truncateBy:se,leftMargin:fe,rightMargin:Kt,topMargin:le,bottomMargin:be,tooltip:pt,onSeriesMouseOver:gt,refValues:Nt,maxValue:v,minValue:yt,highlightedDataPoints:it,onSeriesMouseClick:xt,labelOrder:R,maxBarThickness:Qt,minBarThickness:Vt,resetSelectionOnDoubleClick:Zt,detailsOnClick:mt,barAxisTitle:B,valueColor:nt,noOfTicks:Et,styles:p,classNames:o,targetStyle:m,targetColor:P,qualitativeRangeColors:at,measureBarWidthFactor:g,animate:r,dimmedOpacity:x,precision:dt,customLayers:st,naLabel:C,targetLineThickness:oe,hideAxisLine:re,locale:bt}=e,G=fe===void 0?20:fe,vt=Kt===void 0?20:Kt,he=le===void 0?20:le,pe=be===void 0?25:be,ve=U.useRef(null);let ge;t[0]!==r.amount||t[1]!==r.once?(ge={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=ge):ge=t[2];const z=He.useInView(ve,ge),I=B?G+30:G;let Ct;t[3]!==pe||t[4]!==vt||t[5]!==I||t[6]!==he?(Ct={top:he,bottom:pe,left:I,right:vt},t[3]=pe,t[4]=vt,t[5]=I,t[6]=he,t[7]=Ct):Ct=t[7];const b=Ct,[lt,wt]=U.useState(void 0),[ot,ue]=U.useState(void 0),[_t,ce]=U.useState(void 0),[te,xe]=U.useState(void 0),d=Rt-b.left-b.right,ft=ne-b.top-b.bottom;let rt;t[8]!==i?(rt=Math.max(...i.filter(Ei).map(Vi))<0?0:Math.max(...i.filter(Ni).map(Ii)),t[8]=i,t[9]=rt):rt=t[9];const ee=rt;let zt;t[10]!==i?(zt=Math.max(...i.filter(Oi).map(Ri))<0?0:Math.max(...i.filter(ki).map(Mi)),t[10]=i,t[11]=zt):zt=t[11];const Lt=zt;let qt;t[12]!==i?(qt=Math.max(...i.map(ji)),t[12]=i,t[13]=qt):qt=t[13];const $t=qt;let St;t[14]!==ee||t[15]!==v||t[16]!==$t||t[17]!==Lt?(St=y.checkIfNullOrUndefined(v)?Math.max(...[ee,Lt,$t].filter(Number.isFinite))<0?0:Math.max(...[ee,Lt,$t].filter(Number.isFinite)):v,t[14]=ee,t[15]=v,t[16]=$t,t[17]=Lt,t[18]=St):St=t[18];const Dt=St;let ie;t[19]!==i?(ie=Math.min(...i.filter(wi).map(vi))>=0?0:Math.min(...i.filter(bi).map(yi)),t[19]=i,t[20]=ie):ie=t[20];const Tt=ie;let Ft;t[21]!==i?(Ft=Math.min(...i.filter(gi).map(pi))>=0?0:Math.min(...i.filter(hi).map(fi)),t[21]=i,t[22]=Ft):Ft=t[22];const Ut=Ft;let jt;t[23]!==Tt||t[24]!==yt||t[25]!==Ut?(jt=y.checkIfNullOrUndefined(yt)?Math.min(...[Tt,Ut].filter(Number.isFinite))>=0?0:Math.min(...[Tt,Ut].filter(Number.isFinite)):yt,t[23]=Tt,t[24]=yt,t[25]=Ut,t[26]=jt):jt=t[26];const A=jt;let L;if(t[27]!==i||t[28]!==R){const u=new Set,l=i.map((et,T)=>{const k=R?`${et.label}`:`${T}`;return u.add(k),{...et,id:k}}),O=R?R.filter(et=>!u.has(et)):[];L=[...l,...O.map(di)],t[27]=i,t[28]=R,t[29]=L}else L=t[29];const ht=L;let ut;t[30]!==ht||t[31]!==R?(ut=R??ht.map(mi),t[30]=ht,t[31]=R,t[32]=ut):ut=t[32];const At=ut;let ct,q,W,X,$,Y,H,M,N,w,j,J,K,Q;if(t[33]!==r||t[34]!==B||t[35]!==Yt||t[36]!==At||t[37]!==Ht||t[38]!==o?.graphObjectValues||t[39]!==o?.xAxis?.axis||t[40]!==o?.xAxis?.labels||t[41]!==o?.yAxis?.gridLines||t[42]!==o?.yAxis?.labels||t[43]!==o?.yAxis?.title||t[44]!==st||t[45]!==ht||t[46]!==mt||t[47]!==x||t[48]!==ft||t[49]!==d||t[50]!==ne||t[51]!==re||t[52]!==it||t[53]!==z||t[54]!==G||t[55]!==bt||t[56]!==b.bottom||t[57]!==b.left||t[58]!==b.right||t[59]!==b.top||t[60]!==Qt||t[61]!==g||t[62]!==Vt||t[63]!==ot||t[64]!==C||t[65]!==Et||t[66]!==xt||t[67]!==gt||t[68]!==dt||t[69]!==E||t[70]!==at||t[71]!==Nt||t[72]!==Zt||t[73]!==Jt||t[74]!==It||t[75]!==ae||t[76]!==p?.graphObjectValues||t[77]!==p?.xAxis?.axis||t[78]!==p?.xAxis?.labels||t[79]!==p?.yAxis?.gridLines||t[80]!==p?.yAxis?.labels||t[81]!==p?.yAxis?.title||t[82]!==Ot||t[83]!==P||t[84]!==oe||t[85]!==m||t[86]!==se||t[87]!==nt||t[88]!==Rt||t[89]!==Dt||t[90]!==A){const u=Xe.linear().domain([A,Dt]).range([ft,0]).nice(),l=Ye.band().domain(At).range([0,Vt?Math.max(d,Vt*At.length):Qt?Math.min(d,Qt*At.length):d]).paddingInner(Ht),O=u.ticks(Et);q=kt.motion.svg,w=`${Rt}px`,j=`${ne}px`,J=`0 0 ${Rt} ${ne}`,K="ltr",Q=ve,$=`translate(${b.left},${b.top})`;let et;t[105]!==bt||t[106]!==C||t[107]!==dt||t[108]!==E||t[109]!==It||t[110]!==Ot||t[111]!==A?(et=It?qe.numberFormattingFunction(A<0?0:A,C,dt,E,Ot,bt):void 0,t[105]=bt,t[106]=C,t[107]=dt,t[108]=E,t[109]=It,t[110]=Ot,t[111]=A,t[112]=et):et=t[112];const T=o?.xAxis?.axis,k=o?.yAxis?.labels;let Pt;t[113]!==T||t[114]!==k?(Pt={axis:T,label:k},t[113]=T,t[114]=k,t[115]=Pt):Pt=t[115];const Gt=p?.xAxis?.axis,f=p?.yAxis?.labels;let V;t[116]!==Gt||t[117]!==f?(V={axis:Gt,label:f},t[116]=Gt,t[117]=f,t[118]=V):V=t[118],Y=a.jsxRuntimeExports.jsx(Be.Axis,{hideAxisLine:re,y1:u(A<0?0:A),y2:u(A<0?0:A),x1:0-G,x2:d+b.right,label:et,labelPos:{x:0-G,dx:0,dy:Dt<0?"1em":-5,y:u(A<0?0:A)},classNames:Pt,styles:V}),H=It?a.jsxRuntimeExports.jsx(Ze.YTicksAndGridLines,{values:O.filter(xi),y:O.filter(ci).map(s=>u(s)),x1:0-G,x2:d+b.right,styles:{gridLines:p?.yAxis?.gridLines,labels:p?.yAxis?.labels},classNames:{gridLines:o?.yAxis?.gridLines,labels:o?.yAxis?.labels},suffix:Ot,prefix:E,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:dt,locale:bt}):null;const me=0-G-15,Wt=ft/2,n=p?.yAxis?.title,F=o?.yAxis?.title;t[119]!==B||t[120]!==me||t[121]!==Wt||t[122]!==n||t[123]!==F?(M=a.jsxRuntimeExports.jsx(Pe.AxisTitle,{x:me,y:Wt,style:n,className:F,text:B,rotate90:!0}),t[119]=B,t[120]=me,t[121]=Wt,t[122]=n,t[123]=F,t[124]=M):M=t[124],t[125]!==st?(N=st.filter(ui).map(ri),t[125]=st,t[126]=N):N=t[126],ct=Je.AnimatePresence,W=ht.map(s=>y.checkIfNullOrUndefined(l(s.id))?null:a.jsxRuntimeExports.jsxs(kt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:Mt=>{wt(s),xe(Mt.clientY),ce(Mt.clientX),gt?.(s)},onClick:()=>{(xt||mt)&&(Fe.isEqual(ot,s)&&Zt?(ue(void 0),xt?.(void 0)):(ue(s),xt?.(s)))},onMouseMove:Mt=>{wt(s),xe(Mt.clientY),ce(Mt.clientX)},onMouseLeave:()=>{wt(void 0),ce(void 0),xe(void 0),gt?.(void 0)},exit:{opacity:0,transition:{duration:r.duration}},variants:{initial:{x:l(`${s.id}`),y:0,opacity:it.length!==0?it.indexOf(s.label)!==-1?.85:x:.85},whileInView:{x:l(`${s.id}`),y:0,opacity:it.length!==0?it.indexOf(s.label)!==-1?.85:x:.85,transition:{duration:r.duration}}},initial:"initial",animate:z?"whileInView":"initial",children:[s.qualitativeRange?s.qualitativeRange.map((Mt,Xt)=>a.jsxRuntimeExports.jsx(kt.motion.rect,{x:0,exit:{height:0,y:u(0),transition:{duration:r.duration}},variants:{initial:{height:0,y:u(0),fill:at[Xt]},whileInView:{height:Math.abs(u(Ve.sum(s.qualitativeRange.filter((ye,we)=>we<=Xt&&ye)))-u(Ve.sum(s.qualitativeRange.filter((ye,we)=>we<Xt&&ye)))),y:u(Ve.sum(s.qualitativeRange.filter((ye,we)=>we<=Xt&&ye))),fill:at[Xt],transition:{duration:r.duration}}},initial:"initial",animate:z?"whileInView":"initial",width:l.bandwidth()},Xt)):null,s.target&&m==="background"?a.jsxRuntimeExports.jsx(kt.motion.rect,{x:0,width:l.bandwidth(),exit:{height:0,y:u(0),fill:P,transition:{duration:r.duration}},variants:{initial:{height:0,fill:P,y:u(0)},whileInView:{height:Math.abs(u(s.target)-u(0)),fill:P,y:s.target>0?u(s.target):u(0),transition:{duration:r.duration}}},initial:"initial",animate:z?"whileInView":"initial"}):null,s.size?a.jsxRuntimeExports.jsx(kt.motion.rect,{x:l.bandwidth()*((1-g)/2),width:l.bandwidth()*g,style:{fill:Yt},exit:{height:0,y:u(0),transition:{duration:r.duration}},variants:{initial:{height:0,y:u(0)},whileInView:{height:Math.abs(u(s.size)-u(0)),y:s.size>0?u(s.size):u(0),transition:{duration:r.duration}}},initial:"initial",animate:z?"whileInView":"initial"}):null,s.target&&m==="line"?a.jsxRuntimeExports.jsx(kt.motion.rect,{x:0,width:l.bandwidth(),exit:{y:u(0),opacity:0,fill:P,transition:{duration:r.duration}},variants:{initial:{y:u(0),opacity:0,fill:P},whileInView:{y:u(s.target)-oe/2,opacity:1,fill:P,transition:{duration:r.duration}}},initial:"initial",animate:z?"whileInView":"initial",height:oe}):null,Jt?a.jsxRuntimeExports.jsx(Qe.XAxesLabels,{value:`${s.label}`.length<se?`${s.label}`:`${`${s.label}`.substring(0,se)}...`,y:(s.size||0)<0?0:u(0)+5,x:0,width:l.bandwidth(),height:(s.size||0)<0?u(0)-5:b.bottom,style:p?.xAxis?.labels,className:o?.xAxis?.labels,alignment:(s.size||0)<0?"bottom":"top",animate:r,isInView:z}):null,ae?a.jsxRuntimeExports.jsx(kt.motion.text,{x:l.bandwidth()/2,style:{textAnchor:"middle",...p?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!nt&&Yt.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",o?.graphObjectValues),dy:s.size?s.size>=0?"-5px":"1em":"-5px",exit:{opacity:0,transition:{duration:r.duration}},variants:{initial:{y:u(0),opacity:0,fill:nt||Yt},whileInView:{y:u(s.size||0),opacity:1,fill:nt||Yt,transition:{duration:r.duration}}},initial:"initial",animate:z?"whileInView":"initial",children:qe.numberFormattingFunction(s.size,C,dt,E,Ot,bt)}):null]},s.label)),X=Nt?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:Nt.map((s,Mt)=>a.jsxRuntimeExports.jsx(Ge.RefLineY,{text:s.text,color:s.color,y:u(s.value),x1:0-G,x2:d+b.right,classNames:s.classNames,styles:s.styles,animate:r,isInView:z},Mt))}):null,t[33]=r,t[34]=B,t[35]=Yt,t[36]=At,t[37]=Ht,t[38]=o?.graphObjectValues,t[39]=o?.xAxis?.axis,t[40]=o?.xAxis?.labels,t[41]=o?.yAxis?.gridLines,t[42]=o?.yAxis?.labels,t[43]=o?.yAxis?.title,t[44]=st,t[45]=ht,t[46]=mt,t[47]=x,t[48]=ft,t[49]=d,t[50]=ne,t[51]=re,t[52]=it,t[53]=z,t[54]=G,t[55]=bt,t[56]=b.bottom,t[57]=b.left,t[58]=b.right,t[59]=b.top,t[60]=Qt,t[61]=g,t[62]=Vt,t[63]=ot,t[64]=C,t[65]=Et,t[66]=xt,t[67]=gt,t[68]=dt,t[69]=E,t[70]=at,t[71]=Nt,t[72]=Zt,t[73]=Jt,t[74]=It,t[75]=ae,t[76]=p?.graphObjectValues,t[77]=p?.xAxis?.axis,t[78]=p?.xAxis?.labels,t[79]=p?.yAxis?.gridLines,t[80]=p?.yAxis?.labels,t[81]=p?.yAxis?.title,t[82]=Ot,t[83]=P,t[84]=oe,t[85]=m,t[86]=se,t[87]=nt,t[88]=Rt,t[89]=Dt,t[90]=A,t[91]=ct,t[92]=q,t[93]=W,t[94]=X,t[95]=$,t[96]=Y,t[97]=H,t[98]=M,t[99]=N,t[100]=w,t[101]=j,t[102]=J,t[103]=K,t[104]=Q}else ct=t[91],q=t[92],W=t[93],X=t[94],$=t[95],Y=t[96],H=t[97],M=t[98],N=t[99],w=t[100],j=t[101],J=t[102],K=t[103],Q=t[104];let Z;t[127]!==ct||t[128]!==W||t[129]!==X?(Z=a.jsxRuntimeExports.jsxs(ct,{children:[W,X]}),t[127]=ct,t[128]=W,t[129]=X,t[130]=Z):Z=t[130];let S;t[131]!==st?(S=st.filter(oi).map(li),t[131]=st,t[132]=S):S=t[132];let c;t[133]!==$||t[134]!==Y||t[135]!==H||t[136]!==M||t[137]!==N||t[138]!==Z||t[139]!==S?(c=a.jsxRuntimeExports.jsxs("g",{transform:$,children:[Y,H,M,N,Z,S]}),t[133]=$,t[134]=Y,t[135]=H,t[136]=M,t[137]=N,t[138]=Z,t[139]=S,t[140]=c):c=t[140];let _;t[141]!==q||t[142]!==w||t[143]!==j||t[144]!==J||t[145]!==K||t[146]!==Q||t[147]!==c?(_=a.jsxRuntimeExports.jsx(q,{width:w,height:j,viewBox:J,direction:K,ref:Q,children:c}),t[141]=q,t[142]=w,t[143]=j,t[144]=J,t[145]=K,t[146]=Q,t[147]=c,t[148]=_):_=t[148];let tt;t[149]!==o?.tooltip||t[150]!==_t||t[151]!==te||t[152]!==lt||t[153]!==p?.tooltip||t[154]!==pt?(tt=lt&&pt&&_t&&te?a.jsxRuntimeExports.jsx(Ue.Tooltip,{data:lt,body:pt,xPos:_t,yPos:te,backgroundStyle:p?.tooltip,className:o?.tooltip}):null,t[149]=o?.tooltip,t[150]=_t,t[151]=te,t[152]=lt,t[153]=p?.tooltip,t[154]=pt,t[155]=tt):tt=t[155];let D;t[156]!==o?.modal||t[157]!==mt||t[158]!==ot?(D=mt&&ot!==void 0?a.jsxRuntimeExports.jsx(We.DetailsModal,{body:mt,data:ot,setData:ue,className:o?.modal}):null,t[156]=o?.modal,t[157]=mt,t[158]=ot,t[159]=D):D=t[159];let Bt;return t[160]!==_||t[161]!==tt||t[162]!==D?(Bt=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[_,tt,D]}),t[160]=_,t[161]=tt,t[162]=D,t[163]=Bt):Bt=t[163],Bt}function li(e){return e.layer}function oi(e){return e.position==="after"}function ri(e){return e.layer}function ui(e){return e.position==="before"}function ci(e){return e!==0}function xi(e){return e!==0}function mi(e){return`${e.id}`}function di(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function fi(e){return e.target}function hi(e){return!y.checkIfNullOrUndefined(e.target)}function pi(e){return e.target}function gi(e){return!y.checkIfNullOrUndefined(e.target)}function yi(e){return e.size}function bi(e){return!y.checkIfNullOrUndefined(e.size)}function vi(e){return e.size}function wi(e){return!y.checkIfNullOrUndefined(e.size)}function ji(e){return Ve.sum((e.qualitativeRange||[]).filter(Ai))||0}function Ai(e){return!y.checkIfNullOrUndefined(e)}function Mi(e){return e.target}function ki(e){return!y.checkIfNullOrUndefined(e.size)}function Ri(e){return e.target}function Oi(e){return!y.checkIfNullOrUndefined(e.target)}function Ii(e){return e.size}function Ni(e){return!y.checkIfNullOrUndefined(e.size)}function Vi(e){return e.size}function Ei(e){return!y.checkIfNullOrUndefined(e.size)}function Ci(e){const t=a.compilerRuntimeExports.c(154),{data:i,topMargin:Rt,bottomMargin:ne,leftMargin:Yt,rightMargin:Ot,barColor:E,suffix:Ht,prefix:Jt,barPadding:ae,showValues:It,showTicks:se,truncateBy:fe,width:Kt,height:le,showLabels:be,tooltip:pt,onSeriesMouseOver:gt,refValues:Nt,highlightedDataPoints:v,maxValue:yt,minValue:it,onSeriesMouseClick:xt,labelOrder:R,rtl:Qt,maxBarThickness:Vt,minBarThickness:Zt,resetSelectionOnDoubleClick:mt,detailsOnClick:B,barAxisTitle:nt,valueColor:Et,noOfTicks:p,styles:o,classNames:m,targetStyle:P,targetColor:at,qualitativeRangeColors:g,measureBarWidthFactor:r,animate:x,dimmedOpacity:dt,precision:st,customLayers:C,naLabel:oe,targetLineThickness:re,hideAxisLine:bt,locale:G}=e,vt=Rt===void 0?25:Rt,he=ne===void 0?10:ne,pe=Yt===void 0?100:Yt,ve=Ot===void 0?40:Ot,ge=U.useRef(null);let z;t[0]!==x.amount||t[1]!==x.once?(z={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=z):z=t[2];const I=He.useInView(ge,z),[Ct,b]=U.useState(void 0),[lt,wt]=U.useState(void 0),[ot,ue]=U.useState(void 0),[_t,ce]=U.useState(void 0),te=nt?vt+25:vt;let xe;t[3]!==he||t[4]!==pe||t[5]!==ve||t[6]!==te?(xe={top:te,bottom:he,left:pe,right:ve},t[3]=he,t[4]=pe,t[5]=ve,t[6]=te,t[7]=xe):xe=t[7];const d=xe,ft=Kt-d.left-d.right,rt=le-d.top-d.bottom;let ee;t[8]!==i?(ee=Math.max(...i.filter(sn).map(an))<0?0:Math.max(...i.filter(nn).map(en)),t[8]=i,t[9]=ee):ee=t[9];const zt=ee;let Lt;t[10]!==i?(Lt=Math.max(...i.filter(tn).map(_i))<0?0:Math.max(...i.filter(Zi).map(Qi)),t[10]=i,t[11]=Lt):Lt=t[11];const qt=Lt;let $t;t[12]!==i?($t=Math.max(...i.map(Ji)),t[12]=i,t[13]=$t):$t=t[13];const St=$t;let Dt;t[14]!==zt||t[15]!==yt||t[16]!==St||t[17]!==qt?(Dt=y.checkIfNullOrUndefined(yt)?Math.max(...[zt,qt,St].filter(Number.isFinite))<0?0:Math.max(...[zt,qt,St].filter(Number.isFinite)):yt,t[14]=zt,t[15]=yt,t[16]=St,t[17]=qt,t[18]=Dt):Dt=t[18];const ie=Dt;let Tt;t[19]!==i?(Tt=Math.min(...i.filter(Hi).map(Yi))>=0?0:Math.min(...i.filter(Xi).map(Wi)),t[19]=i,t[20]=Tt):Tt=t[20];const Ft=Tt;let Ut;t[21]!==i?(Ut=Math.min(...i.filter(Gi).map(Pi))>=0?0:Math.min(...i.filter(Bi).map(Ui)),t[21]=i,t[22]=Ut):Ut=t[22];const jt=Ut;let A;t[23]!==Ft||t[24]!==it||t[25]!==jt?(A=y.checkIfNullOrUndefined(it)?Math.min(...[Ft,jt].filter(Number.isFinite))>=0?0:Math.min(...[Ft,jt].filter(Number.isFinite)):it,t[23]=Ft,t[24]=it,t[25]=jt,t[26]=A):A=t[26];const L=A;let ht;if(t[27]!==i||t[28]!==R){const l=new Set,O=i.map((T,k)=>{const Pt=R?`${T.label}`:`${k}`;return l.add(Pt),{...T,id:Pt}}),et=R?R.filter(T=>!l.has(T)):[];ht=[...O,...et.map(Fi)],t[27]=i,t[28]=R,t[29]=ht}else ht=t[29];const ut=ht;let At;t[30]!==ut||t[31]!==R?(At=R??ut.map(Ti),t[30]=ut,t[31]=R,t[32]=At):At=t[32];const ct=At;let q,W,X,$,Y,H,M,N,w,j,J,K,Q,Z;if(t[33]!==x||t[34]!==nt||t[35]!==E||t[36]!==ct||t[37]!==ae||t[38]!==m?.graphObjectValues||t[39]!==m?.xAxis?.gridLines||t[40]!==m?.xAxis?.labels||t[41]!==m?.xAxis?.title||t[42]!==m?.yAxis?.axis||t[43]!==m?.yAxis?.labels||t[44]!==C||t[45]!==ut||t[46]!==B||t[47]!==dt||t[48]!==rt||t[49]!==ft||t[50]!==le||t[51]!==bt||t[52]!==v||t[53]!==I||t[54]!==G||t[55]!==d.bottom||t[56]!==d.left||t[57]!==d.top||t[58]!==Vt||t[59]!==r||t[60]!==Zt||t[61]!==lt||t[62]!==oe||t[63]!==p||t[64]!==xt||t[65]!==gt||t[66]!==st||t[67]!==Jt||t[68]!==g||t[69]!==Nt||t[70]!==mt||t[71]!==Qt||t[72]!==be||t[73]!==se||t[74]!==It||t[75]!==o?.graphObjectValues||t[76]!==o?.xAxis?.gridLines||t[77]!==o?.xAxis?.labels||t[78]!==o?.xAxis?.title||t[79]!==o?.yAxis?.axis||t[80]!==o?.yAxis?.labels||t[81]!==Ht||t[82]!==at||t[83]!==re||t[84]!==P||t[85]!==vt||t[86]!==fe||t[87]!==Et||t[88]!==Kt||t[89]!==ie||t[90]!==L){const l=Xe.linear().domain([L,ie]).range([0,ft]).nice(),O=Ye.band().domain(ct).range([0,Zt?Math.max(rt,Zt*ct.length):Vt?Math.min(rt,Vt*ct.length):rt]).paddingInner(ae),et=l.ticks(p);W=kt.motion.svg,j=`${Kt}px`,J=`${le}px`,K=`0 0 ${Kt} ${le}`,Q="ltr",Z=ge,Y=`translate(${d.left},${d.top})`,H=se?a.jsxRuntimeExports.jsx(_e.XTicksAndGridLines,{values:et.filter(Di),x:et.filter(Si).map(n=>l(n)),y1:0-vt,y2:rt+d.bottom,styles:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},classNames:{gridLines:m?.xAxis?.gridLines,labels:m?.xAxis?.labels},suffix:Ht,prefix:Jt,labelType:"secondary",showGridLines:!0,precision:st,locale:G}):null;const T=ft/2,k=0-d.top+15,Pt=o?.xAxis?.title,Gt=m?.xAxis?.title;t[105]!==nt||t[106]!==T||t[107]!==k||t[108]!==Pt||t[109]!==Gt?(M=a.jsxRuntimeExports.jsx(Pe.AxisTitle,{x:T,y:k,style:Pt,className:Gt,text:nt}),t[105]=nt,t[106]=T,t[107]=k,t[108]=Pt,t[109]=Gt,t[110]=M):M=t[110];const f=m?.yAxis?.axis;let V;t[111]!==f?(V={axis:f},t[111]=f,t[112]=V):V=t[112];const me=o?.yAxis?.axis;let Wt;t[113]!==me?(Wt={axis:me},t[113]=me,t[114]=Wt):Wt=t[114],N=a.jsxRuntimeExports.jsx(Be.Axis,{hideAxisLine:bt,x1:l(L<0?0:L),x2:l(L<0?0:L),y1:-2.5,y2:rt+d.bottom,classNames:V,styles:Wt}),t[115]!==C?(w=C.filter($i).map(qi),t[115]=C,t[116]=w):w=t[116],q=Je.AnimatePresence,X=ut.map(n=>y.checkIfNullOrUndefined(O(n.id))?null:a.jsxRuntimeExports.jsxs(kt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:F=>{b(n),ce(F.clientY),ue(F.clientX),gt?.(n)},onClick:()=>{(xt||B)&&(Fe.isEqual(lt,n)&&mt?(wt(void 0),xt?.(void 0)):(wt(n),xt?.(n)))},onMouseMove:F=>{b(n),ce(F.clientY),ue(F.clientX)},onMouseLeave:()=>{b(void 0),ue(void 0),ce(void 0),gt?.(void 0)},exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:0,y:O(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:dt:.85},whileInView:{x:0,y:O(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:dt:.85,transition:{duration:x.duration}}},initial:"initial",animate:I?"whileInView":"initial",children:[n.qualitativeRange?n.qualitativeRange.map((F,s)=>a.jsxRuntimeExports.jsx(kt.motion.rect,{exit:{width:0,x:l(0),transition:{duration:x.duration}},variants:{initial:{x:l(0),width:0,fill:g[s]},whileInView:{x:l(s===0?0:Ve.sum(n.qualitativeRange.filter((Mt,Xt)=>Xt<s&&Mt))),width:l(F),fill:g[s],transition:{duration:x.duration}}},initial:"initial",animate:I?"whileInView":"initial",y:0,height:O.bandwidth()},s)):null,n.target&&P==="background"?a.jsxRuntimeExports.jsx(kt.motion.rect,{y:0,x:n.target>=0?l(0):l(n.target),height:O.bandwidth(),exit:{width:0,x:l(0),fill:at,transition:{duration:x.duration}},variants:{initial:{x:l(0),fill:at,width:0},whileInView:{x:n.target>=0?l(0):l(n.target),fill:at,width:n.target>=0?l(n.target)-l(0):l(0)-l(n.target),transition:{duration:x.duration}}},initial:"initial",animate:I?"whileInView":"initial"}):null,n.size?a.jsxRuntimeExports.jsx(kt.motion.rect,{y:O.bandwidth()*((1-r)/2),style:{fill:E},height:O.bandwidth()*r,exit:{width:0,x:l(0),transition:{duration:x.duration}},variants:{initial:{x:l(0),width:0},whileInView:{x:n.size>=0?l(0):l(n.size),width:n.size>=0?l(n.size)-l(0):l(0)-l(n.size),transition:{duration:x.duration}}},initial:"initial",animate:I?"whileInView":"initial"}):null,n.target&&P==="line"?a.jsxRuntimeExports.jsx(kt.motion.rect,{y:0,height:O.bandwidth(),width:re,exit:{opacity:0,x:l(0),fill:at,transition:{duration:x.duration}},variants:{initial:{x:l(0),opacity:0,fill:at},whileInView:{x:l(n.target)-re/2,opacity:1,fill:at,transition:{duration:x.duration}}},initial:"initial",animate:I?"whileInView":"initial"}):null,be?a.jsxRuntimeExports.jsx(ti.YAxesLabels,{value:`${n.label}`.length<fe?`${n.label}`:`${`${n.label}`.substring(0,fe)}...`,y:0,x:(n.size||0)<0?l(0):0-d.left,width:(n.size||0)<0?Kt-l(0):l(0)+d.left,height:O.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:o?.yAxis?.labels,className:m?.yAxis?.labels,animate:x,isInView:I}):null,It?a.jsxRuntimeExports.jsx(kt.motion.text,{y:O.bandwidth()/2,style:{textAnchor:n.size&&n.size<0?"end":"start",...o?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!Et&&E.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",m?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:l(0),opacity:0,fill:Et||E},whileInView:{x:n.size?l(n.size):l(0),opacity:1,fill:Et||E,transition:{duration:x.duration}}},initial:"initial",animate:I?"whileInView":"initial",children:qe.numberFormattingFunction(n.size,oe,st,Jt,Ht,G)}):null]},n.label)),$=Nt?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:Nt.map((n,F)=>a.jsxRuntimeExports.jsx(Ge.RefLineX,{text:n.text,color:n.color,x:l(n.value),y1:0-d.top,y2:rt+d.bottom,textSide:l(n.value)>ft*.75||Qt?"left":"right",classNames:n.classNames,styles:n.styles,animate:x,isInView:I},F))}):null,t[33]=x,t[34]=nt,t[35]=E,t[36]=ct,t[37]=ae,t[38]=m?.graphObjectValues,t[39]=m?.xAxis?.gridLines,t[40]=m?.xAxis?.labels,t[41]=m?.xAxis?.title,t[42]=m?.yAxis?.axis,t[43]=m?.yAxis?.labels,t[44]=C,t[45]=ut,t[46]=B,t[47]=dt,t[48]=rt,t[49]=ft,t[50]=le,t[51]=bt,t[52]=v,t[53]=I,t[54]=G,t[55]=d.bottom,t[56]=d.left,t[57]=d.top,t[58]=Vt,t[59]=r,t[60]=Zt,t[61]=lt,t[62]=oe,t[63]=p,t[64]=xt,t[65]=gt,t[66]=st,t[67]=Jt,t[68]=g,t[69]=Nt,t[70]=mt,t[71]=Qt,t[72]=be,t[73]=se,t[74]=It,t[75]=o?.graphObjectValues,t[76]=o?.xAxis?.gridLines,t[77]=o?.xAxis?.labels,t[78]=o?.xAxis?.title,t[79]=o?.yAxis?.axis,t[80]=o?.yAxis?.labels,t[81]=Ht,t[82]=at,t[83]=re,t[84]=P,t[85]=vt,t[86]=fe,t[87]=Et,t[88]=Kt,t[89]=ie,t[90]=L,t[91]=q,t[92]=W,t[93]=X,t[94]=$,t[95]=Y,t[96]=H,t[97]=M,t[98]=N,t[99]=w,t[100]=j,t[101]=J,t[102]=K,t[103]=Q,t[104]=Z}else q=t[91],W=t[92],X=t[93],$=t[94],Y=t[95],H=t[96],M=t[97],N=t[98],w=t[99],j=t[100],J=t[101],K=t[102],Q=t[103],Z=t[104];let S;t[117]!==q||t[118]!==X||t[119]!==$?(S=a.jsxRuntimeExports.jsxs(q,{children:[X,$]}),t[117]=q,t[118]=X,t[119]=$,t[120]=S):S=t[120];let c;t[121]!==C?(c=C.filter(Li).map(zi),t[121]=C,t[122]=c):c=t[122];let _;t[123]!==Y||t[124]!==H||t[125]!==M||t[126]!==N||t[127]!==w||t[128]!==S||t[129]!==c?(_=a.jsxRuntimeExports.jsxs("g",{transform:Y,children:[H,M,N,w,S,c]}),t[123]=Y,t[124]=H,t[125]=M,t[126]=N,t[127]=w,t[128]=S,t[129]=c,t[130]=_):_=t[130];let tt;t[131]!==W||t[132]!==j||t[133]!==J||t[134]!==K||t[135]!==Q||t[136]!==Z||t[137]!==_?(tt=a.jsxRuntimeExports.jsx(W,{width:j,height:J,viewBox:K,direction:Q,ref:Z,children:_}),t[131]=W,t[132]=j,t[133]=J,t[134]=K,t[135]=Q,t[136]=Z,t[137]=_,t[138]=tt):tt=t[138];let D;t[139]!==m?.tooltip||t[140]!==ot||t[141]!==_t||t[142]!==Ct||t[143]!==o?.tooltip||t[144]!==pt?(D=Ct&&pt&&ot&&_t?a.jsxRuntimeExports.jsx(Ue.Tooltip,{data:Ct,body:pt,xPos:ot,yPos:_t,backgroundStyle:o?.tooltip,className:m?.tooltip}):null,t[139]=m?.tooltip,t[140]=ot,t[141]=_t,t[142]=Ct,t[143]=o?.tooltip,t[144]=pt,t[145]=D):D=t[145];let Bt;t[146]!==m?.modal||t[147]!==B||t[148]!==lt?(Bt=B&<!==void 0?a.jsxRuntimeExports.jsx(We.DetailsModal,{body:B,data:lt,setData:wt,className:m?.modal}):null,t[146]=m?.modal,t[147]=B,t[148]=lt,t[149]=Bt):Bt=t[149];let u;return t[150]!==tt||t[151]!==D||t[152]!==Bt?(u=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[tt,D,Bt]}),t[150]=tt,t[151]=D,t[152]=Bt,t[153]=u):u=t[153],u}function zi(e){return e.layer}function Li(e){return e.position==="after"}function qi(e){return e.layer}function $i(e){return e.position==="before"}function Si(e){return e!==0}function Di(e){return e!==0}function Ti(e){return`${e.id}`}function Fi(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function Ui(e){return e.target}function Bi(e){return!y.checkIfNullOrUndefined(e.target)}function Pi(e){return e.target}function Gi(e){return!y.checkIfNullOrUndefined(e.target)}function Wi(e){return e.size}function Xi(e){return!y.checkIfNullOrUndefined(e.size)}function Yi(e){return e.size}function Hi(e){return!y.checkIfNullOrUndefined(e.size)}function Ji(e){return Ve.sum((e.qualitativeRange||[]).filter(Ki))||0}function Ki(e){return!y.checkIfNullOrUndefined(e)}function Qi(e){return e.target}function Zi(e){return!y.checkIfNullOrUndefined(e.target)}function _i(e){return e.target}function tn(e){return!y.checkIfNullOrUndefined(e.target)}function en(e){return e.size}function nn(e){return!y.checkIfNullOrUndefined(e.size)}function an(e){return e.size}function sn(e){return!y.checkIfNullOrUndefined(e.size)}function ln(e){const t=a.compilerRuntimeExports.c(138),{data:i,graphTitle:Rt,barColor:ne,barPadding:Yt,showTicks:Ot,leftMargin:E,rightMargin:Ht,topMargin:Jt,bottomMargin:ae,truncateBy:It,showLabels:se,showValues:fe,backgroundColor:Kt,suffix:le,prefix:be,sources:pt,graphDescription:gt,height:Nt,width:v,footNote:yt,colorDomain:it,colorLegendTitle:xt,padding:R,relativeHeight:Qt,tooltip:Vt,onSeriesMouseOver:Zt,refValues:mt,showColorScale:B,graphID:nt,maxValue:Et,minValue:p,highlightedDataPoints:o,onSeriesMouseClick:m,valueColor:P,orientation:at,styles:g,classNames:r,qualitativeRangeColors:x,targetColor:dt,filterNA:st,targetStyle:C,measureBarWidthFactor:oe,animate:re,dimmedOpacity:bt,precision:G,customLayers:vt,naLabel:he,graphDownload:pe,dataDownload:ve,language:ge,theme:z,sortData:I,labelOrder:Ct,minHeight:b,maxBarThickness:lt,maxNumberOfBars:wt,minBarThickness:ot,ariaLabel:ue,resetSelectionOnDoubleClick:_t,detailsOnClick:ce,barAxisTitle:te,noOfTicks:xe,targetLineThickness:d,timeline:ft,hideAxisLine:rt,locale:ee}=e,zt=ne===void 0?Ce.Colors.primaryColors["blue-600"]:ne,Lt=Yt===void 0?.25:Yt,qt=Ot===void 0?!0:Ot,$t=It===void 0?999:It,St=se===void 0?!0:se,Dt=fe===void 0?!0:fe,ie=Kt===void 0?!1:Kt,Tt=le===void 0?"":le,Ft=be===void 0?"":be,Ut=B===void 0?!0:B;let jt;t[0]!==o?(jt=o===void 0?[]:o,t[0]=o,t[1]=jt):jt=t[1];const A=jt,L=at===void 0?"vertical":at,ht=dt===void 0?Ce.Colors.light.grays["gray-700"]:dt,ut=st===void 0?!0:st,At=C===void 0?"line":C,ct=oe===void 0?.4:oe,q=re===void 0?!1:re,W=bt===void 0?.3:bt,X=G===void 0?2:G;let $;t[2]!==vt?($=vt===void 0?[]:vt,t[2]=vt,t[3]=$):$=t[3];const Y=$,H=he===void 0?"NA":he,M=pe===void 0?!1:pe,N=ve===void 0?!1:ve,w=ge===void 0?"en":ge,j=z===void 0?"light":z,J=b===void 0?0:b,K=_t===void 0?!0:_t,Q=xe===void 0?5:xe,Z=d===void 0?2:d;let S;t[4]!==ft?(S=ft===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:ft,t[4]=ft,t[5]=S):S=t[5];const c=S,_=rt===void 0?!1:rt,tt=ee===void 0?"en":ee,[D,Bt]=U.useState(0),[u,l]=U.useState(0),O=U.useRef(null),et=U.useRef(null),T=L==="horizontal"?Ci:si,[k,Pt]=U.useState(c.autoplay);let Gt;if(t[6]!==i||t[7]!==c.dateFormat){let h;t[9]!==c.dateFormat?(h=de=>Le.parse(`${de.date}`,c.dateFormat||"yyyy",new Date).getTime(),t[9]=c.dateFormat,t[10]=h):h=t[10],Gt=[...new Set(i.filter(fn).map(h))],Gt.sort(dn),t[6]=i,t[7]=c.dateFormat,t[8]=Gt}else Gt=t[8];const f=Gt,[V,me]=U.useState(c.autoplay?0:f.length-1);let Wt,n;t[11]===Symbol.for("react.memo_cache_sentinel")?(Wt=()=>{const h=new ResizeObserver(de=>{Bt(de[0].target.clientWidth||620),l(de[0].target.clientHeight||480)});return O.current&&h.observe(O.current),()=>h.disconnect()},n=[],t[11]=Wt,t[12]=n):(Wt=t[11],n=t[12]),U.useEffect(Wt,n);let F,s;t[13]!==k||t[14]!==c.speed||t[15]!==f?(F=()=>{const h=setInterval(()=>{me(de=>de<f.length-1?de+1:0)},(c.speed||2)*1e3);return k||clearInterval(h),()=>clearInterval(h)},s=[f,k,c.speed],t[13]=k,t[14]=c.speed,t[15]=f,t[16]=F,t[17]=s):(F=t[16],s=t[17]),U.useEffect(F,s);const Mt=c.dateFormat||"yyyy";let Xt;t[18]!==V||t[19]!==Mt||t[20]!==c.showOnlyActiveDate||t[21]!==f?(Xt=$e.getSliderMarks(f,V,c.showOnlyActiveDate,Mt),t[18]=V,t[19]=Mt,t[20]=c.showOnlyActiveDate,t[21]=f,t[22]=Xt):Xt=t[22];const ye=Xt,we=r?.graphContainer,ze=g?.graphContainer;let je;t[23]!==r?.description||t[24]!==r?.title||t[25]!==i||t[26]!==N||t[27]!==gt||t[28]!==M||t[29]!==Rt||t[30]!==g?.description||t[31]!==g?.title||t[32]!==v?(je=Rt||gt||M||N?a.jsxRuntimeExports.jsx(ni.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:r?.title,description:r?.description},graphTitle:Rt,graphDescription:gt,width:v,graphDownload:M?et:void 0,dataDownload:N?i.map(mn).filter(xn).length>0?i.map(cn).filter(un):i.filter(rn):null}):null,t[23]=r?.description,t[24]=r?.title,t[25]=i,t[26]=N,t[27]=gt,t[28]=M,t[29]=Rt,t[30]=g?.description,t[31]=g?.title,t[32]=v,t[33]=je):je=t[33];let Ae;t[34]!==V||t[35]!==ye||t[36]!==k||t[37]!==c.enabled||t[38]!==f?(Ae=c.enabled&&f.length>0&&ye?a.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[a.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Pt(!k)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":k?"Click to pause animation":"Click to play animation",children:k?a.jsxRuntimeExports.jsx(Te.Pause,{}):a.jsxRuntimeExports.jsx(Te.Play,{})}),a.jsxRuntimeExports.jsx($e.Nr,{min:f[0],max:f[f.length-1],marks:ye,step:null,defaultValue:f[f.length-1],value:f[V],onChangeComplete:h=>{me(f.indexOf(h))},onChange:h=>{me(f.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=V,t[35]=ye,t[36]=k,t[37]=c.enabled,t[38]=f,t[39]=Ae):Ae=t[39];let Me;t[40]!==r?.colorLegend||t[41]!==it||t[42]!==xt||t[43]!==i||t[44]!==x||t[45]!==Ut||t[46]!==j||t[47]!==v?(Me=Ut&&i.filter(on).length!==0&&it&&i.length>0?a.jsxRuntimeExports.jsx(ai.ColorLegend,{width:v,colorLegendTitle:xt,colors:x||Ce.Colors[j].sequentialColors.positiveColorsx10,colorDomain:it,showNAColor:!1,className:r?.colorLegend}):null,t[40]=r?.colorLegend,t[41]=it,t[42]=xt,t[43]=i,t[44]=x,t[45]=Ut,t[46]=j,t[47]=v,t[48]=Me):Me=t[48];let ke;t[49]!==i.length?(ke=i.length===0&&a.jsxRuntimeExports.jsx(ei.EmptyState,{}),t[49]=i.length,t[50]=ke):ke=t[50];let Re;t[51]!==T||t[52]!==q||t[53]!==te||t[54]!==zt||t[55]!==Lt||t[56]!==ae||t[57]!==r||t[58]!==Y||t[59]!==i||t[60]!==ce||t[61]!==W||t[62]!==ut||t[63]!==_||t[64]!==A||t[65]!==V||t[66]!==Ct||t[67]!==w||t[68]!==E||t[69]!==tt||t[70]!==lt||t[71]!==wt||t[72]!==Et||t[73]!==ct||t[74]!==ot||t[75]!==p||t[76]!==H||t[77]!==Q||t[78]!==m||t[79]!==Zt||t[80]!==L||t[81]!==X||t[82]!==Ft||t[83]!==x||t[84]!==mt||t[85]!==K||t[86]!==Ht||t[87]!==St||t[88]!==qt||t[89]!==Dt||t[90]!==I||t[91]!==g||t[92]!==Tt||t[93]!==u||t[94]!==D||t[95]!==ht||t[96]!==Z||t[97]!==At||t[98]!==j||t[99]!==c.dateFormat||t[100]!==c.enabled||t[101]!==Vt||t[102]!==Jt||t[103]!==$t||t[104]!==f||t[105]!==P?(Re=D&&u&&i.length>0?a.jsxRuntimeExports.jsx(T,{hideAxisLine:_,data:I?Ke.orderBy(De.ensureCompleteDataForBulletChart(i,c.dateFormat||"yyyy").filter(h=>c.enabled?`${h.date}`===Le.format(new Date(f[V]),c.dateFormat||"yyyy"):h).filter(h=>ut?!y.checkIfNullOrUndefined(h.size):h),[h=>h.size===void 0?I==="asc"?(L==="horizontal"?1:-1)*(1/0):(L==="horizontal"?-1:1)*(1/0):h.size],[I]).filter((h,de)=>wt?de<wt:!0):De.ensureCompleteDataForBulletChart(i,c.dateFormat||"yyyy").filter(h=>c.enabled?`${h.date}`===Le.format(new Date(f[V]),c.dateFormat||"yyyy"):h).filter(h=>ut?!y.checkIfNullOrUndefined(h.size):h).filter((h,de)=>wt?de<wt:!0),barColor:zt,targetColor:ht,width:D,refValues:mt,height:u,suffix:Tt,prefix:Ft,barPadding:Lt,showLabels:St,showValues:Dt,showTicks:qt,truncateBy:$t,leftMargin:E,rightMargin:Ht,qualitativeRangeColors:x||Ce.Colors[j].sequentialColors.positiveColorsx10,topMargin:Jt,bottomMargin:ae,tooltip:Vt,onSeriesMouseOver:Zt,maxValue:Et,minValue:p,highlightedDataPoints:A,onSeriesMouseClick:m,labelOrder:Ct,maxBarThickness:lt,minBarThickness:ot,resetSelectionOnDoubleClick:K,detailsOnClick:ce,barAxisTitle:te,noOfTicks:Q,valueColor:P,styles:g,classNames:r,targetStyle:At,dimmedOpacity:W,measureBarWidthFactor:ct,animate:q===!0?{duration:.5,once:!0,amount:.5}:q||{duration:0,once:!0,amount:0},precision:X,customLayers:Y,naLabel:H,targetLineThickness:Z,rtl:w==="ar"||w==="he",locale:tt}):null,t[51]=T,t[52]=q,t[53]=te,t[54]=zt,t[55]=Lt,t[56]=ae,t[57]=r,t[58]=Y,t[59]=i,t[60]=ce,t[61]=W,t[62]=ut,t[63]=_,t[64]=A,t[65]=V,t[66]=Ct,t[67]=w,t[68]=E,t[69]=tt,t[70]=lt,t[71]=wt,t[72]=Et,t[73]=ct,t[74]=ot,t[75]=p,t[76]=H,t[77]=Q,t[78]=m,t[79]=Zt,t[80]=L,t[81]=X,t[82]=Ft,t[83]=x,t[84]=mt,t[85]=K,t[86]=Ht,t[87]=St,t[88]=qt,t[89]=Dt,t[90]=I,t[91]=g,t[92]=Tt,t[93]=u,t[94]=D,t[95]=ht,t[96]=Z,t[97]=At,t[98]=j,t[99]=c.dateFormat,t[100]=c.enabled,t[101]=Vt,t[102]=Jt,t[103]=$t,t[104]=f,t[105]=P,t[106]=Re):Re=t[106];let Oe;t[107]!==ke||t[108]!==Re?(Oe=a.jsxRuntimeExports.jsxs(Se.GraphArea,{ref:O,children:[ke,Re]}),t[107]=ke,t[108]=Re,t[109]=Oe):Oe=t[109];let Ie;t[110]!==Me||t[111]!==Oe?(Ie=a.jsxRuntimeExports.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[Me,Oe]}),t[110]=Me,t[111]=Oe,t[112]=Ie):Ie=t[112];let Ne;t[113]!==r?.footnote||t[114]!==r?.source||t[115]!==yt||t[116]!==pt||t[117]!==g?.footnote||t[118]!==g?.source||t[119]!==v?(Ne=pt||yt?a.jsxRuntimeExports.jsx(ii.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:pt,footNote:yt,width:v}):null,t[113]=r?.footnote,t[114]=r?.source,t[115]=yt,t[116]=pt,t[117]=g?.footnote,t[118]=g?.source,t[119]=v,t[120]=Ne):Ne=t[120];let Ee;return t[121]!==ue||t[122]!==ie||t[123]!==nt||t[124]!==Nt||t[125]!==w||t[126]!==J||t[127]!==R||t[128]!==Qt||t[129]!==we||t[130]!==ze||t[131]!==je||t[132]!==Ae||t[133]!==Ie||t[134]!==Ne||t[135]!==j||t[136]!==v?(Ee=a.jsxRuntimeExports.jsxs(Se.GraphContainer,{className:we,style:ze,id:nt,ref:et,"aria-label":ue,backgroundColor:ie,theme:j,language:w,minHeight:J,width:v,height:Nt,relativeHeight:Qt,padding:R,children:[je,Ae,Ie,Ne]}),t[121]=ue,t[122]=ie,t[123]=nt,t[124]=Nt,t[125]=w,t[126]=J,t[127]=R,t[128]=Qt,t[129]=we,t[130]=ze,t[131]=je,t[132]=Ae,t[133]=Ie,t[134]=Ne,t[135]=j,t[136]=v,t[137]=Ee):Ee=t[137],Ee}function on(e){return e.qualitativeRange}function rn(e){return e!==void 0}function un(e){return e!==void 0}function cn(e){return e.data}function xn(e){return e!==void 0}function mn(e){return e.data}function dn(e,t){return e-t}function fn(e){return e.date}exports.BulletChart=ln;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-D4pAp7u0.cjs"),F=require("react"),He=require("./index-Cno4Q0YE.cjs"),Ce=require("./parse-xYI9yrvL.cjs"),Le=require("./getSliderMarks-BzrpHrHS.cjs"),Te=require("./index-DQA8q5sC.cjs"),Ne=require("./index-CSNtgibC.cjs"),ze=require("./numberFormattingFunction-Cn9R7CM9.cjs"),De=require("./Tooltip-Hr46paWP.cjs"),y=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Fe=require("./Axis-BTaS9oPQ.cjs"),Ue=require("./AxisTitle-DP_evhbe.cjs"),Je=require("./XAxesLabels-C03jHniq.cjs"),Be=require("./ReferenceLine-CpU4G01Y.cjs"),Ke=require("./YTicksAndGridLines-DFjm8RCc.cjs"),Qe=require("./XTicksAndGridLines-C5DuC5oY.cjs"),Ze=require("./YAxesLabels-DeENFC2M.cjs"),Pe=require("./DetailsModal-jmmKRMRM.cjs"),Ge=require("./linear-CgUCbw9F.cjs"),We=require("./band-VYfcZeJ2.cjs"),Rt=require("./proxy-CqH8m8IQ.cjs"),Xe=require("./use-in-view-dnRv_qqF.cjs"),Ye=require("./index-FXfr51ZM.cjs"),Ee=require("./Colors.cjs"),_e=require("./EmptyState-CFmiFPHz.cjs"),qe=require("./GraphContainer-Cul9b74X.cjs"),ti=require("./GraphFooter.cjs"),ei=require("./GraphHeader.cjs"),ii=require("./ColorLegend.cjs"),$e=require("./ensureCompleteData-D9bQTiVS.cjs"),Se=require("./index-BhI7mBJx.cjs");function ni(e){const t=a.compilerRuntimeExports.c(164),{data:i,width:Ot,height:ae,barColor:Wt,suffix:It,prefix:N,barPadding:Xt,showLabels:Yt,showValues:se,showTicks:Nt,truncateBy:le,leftMargin:he,rightMargin:Ht,topMargin:re,bottomMargin:be,tooltip:bt,onSeriesMouseOver:vt,refValues:Vt,maxValue:j,minValue:wt,highlightedDataPoints:tt,onSeriesMouseClick:ut,labelOrder:k,maxBarThickness:Jt,minBarThickness:Et,resetSelectionOnDoubleClick:Kt,detailsOnClick:ct,barAxisTitle:U,valueColor:et,noOfTicks:Ct,styles:p,classNames:r,targetStyle:d,targetColor:B,qualitativeRangeColors:it,measureBarWidthFactor:g,animate:o,dimmedOpacity:m,precision:xt,customLayers:nt,naLabel:V,targetLineThickness:oe,hideAxisLine:ue,locale:jt}=e,P=he===void 0?20:he,At=Ht===void 0?20:Ht,pe=re===void 0?20:re,ge=be===void 0?25:be,ve=F.useRef(null);let ye;t[0]!==o.amount||t[1]!==o.once?(ye={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=ye):ye=t[2];const E=Xe.useInView(ve,ye),O=U?P+30:P;let zt;t[3]!==ge||t[4]!==At||t[5]!==O||t[6]!==pe?(zt={top:pe,bottom:ge,left:O,right:At},t[3]=ge,t[4]=At,t[5]=O,t[6]=pe,t[7]=zt):zt=t[7];const b=zt,[at,Mt]=F.useState(void 0),[st,ce]=F.useState(void 0),[Qt,xe]=F.useState(void 0),[Zt,me]=F.useState(void 0),f=Ot-b.left-b.right,mt=ae-b.top-b.bottom;let lt;t[8]!==i?(lt=Math.max(...i.filter(Ni).map(Ii))<0?0:Math.max(...i.filter(Oi).map(Ri)),t[8]=i,t[9]=lt):lt=t[9];const _t=lt;let Lt;t[10]!==i?(Lt=Math.max(...i.filter(ki).map(Mi))<0?0:Math.max(...i.filter(Ai).map(ji)),t[10]=i,t[11]=Lt):Lt=t[11];const qt=Lt;let $t;t[12]!==i?($t=Math.max(...i.map(vi)),t[12]=i,t[13]=$t):$t=t[13];const St=$t;let Tt;t[14]!==_t||t[15]!==j||t[16]!==St||t[17]!==qt?(Tt=y.checkIfNullOrUndefined(j)?Math.max(...[_t,qt,St].filter(Number.isFinite))<0?0:Math.max(...[_t,qt,St].filter(Number.isFinite)):j,t[14]=_t,t[15]=j,t[16]=St,t[17]=qt,t[18]=Tt):Tt=t[18];const Dt=Tt;let te;t[19]!==i?(te=Math.min(...i.filter(bi).map(yi))>=0?0:Math.min(...i.filter(gi).map(pi)),t[19]=i,t[20]=te):te=t[20];const Ft=te;let Ut;t[21]!==i?(Ut=Math.min(...i.filter(hi).map(fi))>=0?0:Math.min(...i.filter(di).map(mi)),t[21]=i,t[22]=Ut):Ut=t[22];const Bt=Ut;let dt;t[23]!==Ft||t[24]!==wt||t[25]!==Bt?(dt=y.checkIfNullOrUndefined(wt)?Math.min(...[Ft,Bt].filter(Number.isFinite))>=0?0:Math.min(...[Ft,Bt].filter(Number.isFinite)):wt,t[23]=Ft,t[24]=wt,t[25]=Bt,t[26]=dt):dt=t[26];const M=dt;let G;if(t[27]!==i||t[28]!==k){const c=new Set,s=i.map((A,ot)=>{const T=k?`${A.label}`:`${ot}`;return c.add(T),{...A,id:T}}),R=k?k.filter(A=>!c.has(A)):[];G=[...s,...R.map(xi)],t[27]=i,t[28]=k,t[29]=G}else G=t[29];const ft=G;let ht;t[30]!==ft||t[31]!==k?(ht=k??ft.map(ci),t[30]=ft,t[31]=k,t[32]=ht):ht=t[32];const pt=ht;let rt,W,C,X,Y,z,L,v,w,I,H,J,K,q;if(t[33]!==o||t[34]!==U||t[35]!==Wt||t[36]!==pt||t[37]!==Xt||t[38]!==r?.graphObjectValues||t[39]!==r?.xAxis?.axis||t[40]!==r?.xAxis?.labels||t[41]!==r?.yAxis?.gridLines||t[42]!==r?.yAxis?.labels||t[43]!==r?.yAxis?.title||t[44]!==nt||t[45]!==ft||t[46]!==ct||t[47]!==m||t[48]!==mt||t[49]!==f||t[50]!==ae||t[51]!==ue||t[52]!==tt||t[53]!==E||t[54]!==P||t[55]!==jt||t[56]!==b.bottom||t[57]!==b.left||t[58]!==b.right||t[59]!==b.top||t[60]!==Jt||t[61]!==g||t[62]!==Et||t[63]!==st||t[64]!==V||t[65]!==Ct||t[66]!==ut||t[67]!==vt||t[68]!==xt||t[69]!==N||t[70]!==it||t[71]!==Vt||t[72]!==Kt||t[73]!==Yt||t[74]!==Nt||t[75]!==se||t[76]!==p?.graphObjectValues||t[77]!==p?.xAxis?.axis||t[78]!==p?.xAxis?.labels||t[79]!==p?.yAxis?.gridLines||t[80]!==p?.yAxis?.labels||t[81]!==p?.yAxis?.title||t[82]!==It||t[83]!==B||t[84]!==oe||t[85]!==d||t[86]!==le||t[87]!==et||t[88]!==Ot||t[89]!==Dt||t[90]!==M){const c=Ge.linear().domain([M,Dt]).range([mt,0]).nice(),s=We.band().domain(pt).range([0,Et?Math.max(f,Et*pt.length):Jt?Math.min(f,Jt*pt.length):f]).paddingInner(Xt),R=c.ticks(Ct);W=Rt.motion.svg,I=`${Ot}px`,H=`${ae}px`,J=`0 0 ${Ot} ${ae}`,K="ltr",q=ve,Y=`translate(${b.left},${b.top})`;let A;t[105]!==jt||t[106]!==V||t[107]!==xt||t[108]!==N||t[109]!==Nt||t[110]!==It||t[111]!==M?(A=Nt?ze.numberFormattingFunction(M<0?0:M,V,xt,N,It,jt):void 0,t[105]=jt,t[106]=V,t[107]=xt,t[108]=N,t[109]=Nt,t[110]=It,t[111]=M,t[112]=A):A=t[112];const ot=r?.xAxis?.axis,T=r?.yAxis?.labels;let x;t[113]!==ot||t[114]!==T?(x={axis:ot,label:T},t[113]=ot,t[114]=T,t[115]=x):x=t[115];const D=p?.xAxis?.axis,de=p?.yAxis?.labels;let kt;t[116]!==D||t[117]!==de?(kt={axis:D,label:de},t[116]=D,t[117]=de,t[118]=kt):kt=t[118],z=a.jsxRuntimeExports.jsx(Fe.Axis,{hideAxisLine:ue,y1:c(M<0?0:M),y2:c(M<0?0:M),x1:0-P,x2:f+b.right,label:A,labelPos:{x:0-P,dx:0,dy:Dt<0?"1em":-5,y:c(M<0?0:M)},classNames:x,styles:kt}),L=Nt?a.jsxRuntimeExports.jsx(Ke.YTicksAndGridLines,{values:R.filter(ui),y:R.filter(oi).map(l=>c(l)),x1:0-P,x2:f+b.right,styles:{gridLines:p?.yAxis?.gridLines,labels:p?.yAxis?.labels},classNames:{gridLines:r?.yAxis?.gridLines,labels:r?.yAxis?.labels},suffix:It,prefix:N,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:xt,locale:jt}):null;const ee=0-P-15,Gt=mt/2,n=p?.yAxis?.title,_=r?.yAxis?.title;t[119]!==U||t[120]!==ee||t[121]!==Gt||t[122]!==n||t[123]!==_?(v=a.jsxRuntimeExports.jsx(Ue.AxisTitle,{x:ee,y:Gt,style:n,className:_,text:U,rotate90:!0}),t[119]=U,t[120]=ee,t[121]=Gt,t[122]=n,t[123]=_,t[124]=v):v=t[124],t[125]!==nt?(w=nt.filter(ri).map(li),t[125]=nt,t[126]=w):w=t[126],rt=Ye.AnimatePresence,C=ft.map(l=>y.checkIfNullOrUndefined(s(l.id))?null:a.jsxRuntimeExports.jsxs(Rt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:yt=>{Mt(l),me(yt.clientY),xe(yt.clientX),vt?.(l)},onClick:()=>{(ut||ct)&&(Te.isEqual(st,l)&&Kt?(ce(void 0),ut?.(void 0)):(ce(l),ut?.(l)))},onMouseMove:yt=>{Mt(l),me(yt.clientY),xe(yt.clientX)},onMouseLeave:()=>{Mt(void 0),xe(void 0),me(void 0),vt?.(void 0)},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{x:s(`${l.id}`),y:0,opacity:tt?tt.indexOf(l.label)!==-1?.85:m:.85},whileInView:{x:s(`${l.id}`),y:0,opacity:tt?tt.indexOf(l.label)!==-1?.85:m:.85,transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial",children:[l.qualitativeRange?l.qualitativeRange.map((yt,ie)=>a.jsxRuntimeExports.jsx(Rt.motion.rect,{x:0,exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0),fill:it[ie]},whileInView:{height:Math.abs(c(Ne.sum(l.qualitativeRange.filter((we,ne)=>ne<=ie&&we)))-c(Ne.sum(l.qualitativeRange.filter((we,ne)=>ne<ie&&we)))),y:c(Ne.sum(l.qualitativeRange.filter((we,ne)=>ne<=ie&&we))),fill:it[ie],transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial",width:s.bandwidth()},ie)):null,l.target&&d==="background"?a.jsxRuntimeExports.jsx(Rt.motion.rect,{x:0,width:s.bandwidth(),exit:{height:0,y:c(0),fill:B,transition:{duration:o.duration}},variants:{initial:{height:0,fill:B,y:c(0)},whileInView:{height:Math.abs(c(l.target)-c(0)),fill:B,y:l.target>0?c(l.target):c(0),transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial"}):null,l.size?a.jsxRuntimeExports.jsx(Rt.motion.rect,{x:s.bandwidth()*((1-g)/2),width:s.bandwidth()*g,style:{fill:Wt},exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0)},whileInView:{height:Math.abs(c(l.size)-c(0)),y:l.size>0?c(l.size):c(0),transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial"}):null,l.target&&d==="line"?a.jsxRuntimeExports.jsx(Rt.motion.rect,{x:0,width:s.bandwidth(),exit:{y:c(0),opacity:0,fill:B,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:B},whileInView:{y:c(l.target)-oe/2,opacity:1,fill:B,transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial",height:oe}):null,Yt?a.jsxRuntimeExports.jsx(Je.XAxesLabels,{value:`${l.label}`.length<le?`${l.label}`:`${`${l.label}`.substring(0,le)}...`,y:(l.size||0)<0?0:c(0)+5,x:0,width:s.bandwidth(),height:(l.size||0)<0?c(0)-5:b.bottom,style:p?.xAxis?.labels,className:r?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:o,isInView:E}):null,se?a.jsxRuntimeExports.jsx(Rt.motion.text,{x:s.bandwidth()/2,style:{textAnchor:"middle",...p?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!et&&Wt.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",r?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:et||Wt},whileInView:{y:c(l.size||0),opacity:1,fill:et||Wt,transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial",children:ze.numberFormattingFunction(l.size,V,xt,N,It,jt)}):null]},l.label)),X=Vt?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:Vt.map((l,yt)=>a.jsxRuntimeExports.jsx(Be.RefLineY,{text:l.text,color:l.color,y:c(l.value),x1:0-P,x2:f+b.right,classNames:l.classNames,styles:l.styles,animate:o,isInView:E},yt))}):null,t[33]=o,t[34]=U,t[35]=Wt,t[36]=pt,t[37]=Xt,t[38]=r?.graphObjectValues,t[39]=r?.xAxis?.axis,t[40]=r?.xAxis?.labels,t[41]=r?.yAxis?.gridLines,t[42]=r?.yAxis?.labels,t[43]=r?.yAxis?.title,t[44]=nt,t[45]=ft,t[46]=ct,t[47]=m,t[48]=mt,t[49]=f,t[50]=ae,t[51]=ue,t[52]=tt,t[53]=E,t[54]=P,t[55]=jt,t[56]=b.bottom,t[57]=b.left,t[58]=b.right,t[59]=b.top,t[60]=Jt,t[61]=g,t[62]=Et,t[63]=st,t[64]=V,t[65]=Ct,t[66]=ut,t[67]=vt,t[68]=xt,t[69]=N,t[70]=it,t[71]=Vt,t[72]=Kt,t[73]=Yt,t[74]=Nt,t[75]=se,t[76]=p?.graphObjectValues,t[77]=p?.xAxis?.axis,t[78]=p?.xAxis?.labels,t[79]=p?.yAxis?.gridLines,t[80]=p?.yAxis?.labels,t[81]=p?.yAxis?.title,t[82]=It,t[83]=B,t[84]=oe,t[85]=d,t[86]=le,t[87]=et,t[88]=Ot,t[89]=Dt,t[90]=M,t[91]=rt,t[92]=W,t[93]=C,t[94]=X,t[95]=Y,t[96]=z,t[97]=L,t[98]=v,t[99]=w,t[100]=I,t[101]=H,t[102]=J,t[103]=K,t[104]=q}else rt=t[91],W=t[92],C=t[93],X=t[94],Y=t[95],z=t[96],L=t[97],v=t[98],w=t[99],I=t[100],H=t[101],J=t[102],K=t[103],q=t[104];let u;t[127]!==rt||t[128]!==C||t[129]!==X?(u=a.jsxRuntimeExports.jsxs(rt,{children:[C,X]}),t[127]=rt,t[128]=C,t[129]=X,t[130]=u):u=t[130];let Q;t[131]!==nt?(Q=nt.filter(si).map(ai),t[131]=nt,t[132]=Q):Q=t[132];let Z;t[133]!==Y||t[134]!==z||t[135]!==L||t[136]!==v||t[137]!==w||t[138]!==u||t[139]!==Q?(Z=a.jsxRuntimeExports.jsxs("g",{transform:Y,children:[z,L,v,w,u,Q]}),t[133]=Y,t[134]=z,t[135]=L,t[136]=v,t[137]=w,t[138]=u,t[139]=Q,t[140]=Z):Z=t[140];let $;t[141]!==W||t[142]!==I||t[143]!==H||t[144]!==J||t[145]!==K||t[146]!==q||t[147]!==Z?($=a.jsxRuntimeExports.jsx(W,{width:I,height:H,viewBox:J,direction:K,ref:q,children:Z}),t[141]=W,t[142]=I,t[143]=H,t[144]=J,t[145]=K,t[146]=q,t[147]=Z,t[148]=$):$=t[148];let gt;t[149]!==r?.tooltip||t[150]!==Qt||t[151]!==Zt||t[152]!==at||t[153]!==p?.tooltip||t[154]!==bt?(gt=at&&bt&&Qt&&Zt?a.jsxRuntimeExports.jsx(De.Tooltip,{data:at,body:bt,xPos:Qt,yPos:Zt,backgroundStyle:p?.tooltip,className:r?.tooltip}):null,t[149]=r?.tooltip,t[150]=Qt,t[151]=Zt,t[152]=at,t[153]=p?.tooltip,t[154]=bt,t[155]=gt):gt=t[155];let S;t[156]!==r?.modal||t[157]!==ct||t[158]!==st?(S=ct&&st!==void 0?a.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:ct,data:st,setData:ce,className:r?.modal}):null,t[156]=r?.modal,t[157]=ct,t[158]=st,t[159]=S):S=t[159];let Pt;return t[160]!==$||t[161]!==gt||t[162]!==S?(Pt=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[$,gt,S]}),t[160]=$,t[161]=gt,t[162]=S,t[163]=Pt):Pt=t[163],Pt}function ai(e){return e.layer}function si(e){return e.position==="after"}function li(e){return e.layer}function ri(e){return e.position==="before"}function oi(e){return e!==0}function ui(e){return e!==0}function ci(e){return`${e.id}`}function xi(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function mi(e){return e.target}function di(e){return!y.checkIfNullOrUndefined(e.target)}function fi(e){return e.target}function hi(e){return!y.checkIfNullOrUndefined(e.target)}function pi(e){return e.size}function gi(e){return!y.checkIfNullOrUndefined(e.size)}function yi(e){return e.size}function bi(e){return!y.checkIfNullOrUndefined(e.size)}function vi(e){return Ne.sum((e.qualitativeRange||[]).filter(wi))||0}function wi(e){return!y.checkIfNullOrUndefined(e)}function ji(e){return e.target}function Ai(e){return!y.checkIfNullOrUndefined(e.size)}function Mi(e){return e.target}function ki(e){return!y.checkIfNullOrUndefined(e.target)}function Ri(e){return e.size}function Oi(e){return!y.checkIfNullOrUndefined(e.size)}function Ii(e){return e.size}function Ni(e){return!y.checkIfNullOrUndefined(e.size)}function Vi(e){const t=a.compilerRuntimeExports.c(154),{data:i,topMargin:Ot,bottomMargin:ae,leftMargin:Wt,rightMargin:It,barColor:N,suffix:Xt,prefix:Yt,barPadding:se,showValues:Nt,showTicks:le,truncateBy:he,width:Ht,height:re,showLabels:be,tooltip:bt,onSeriesMouseOver:vt,refValues:Vt,highlightedDataPoints:j,maxValue:wt,minValue:tt,onSeriesMouseClick:ut,labelOrder:k,rtl:Jt,maxBarThickness:Et,minBarThickness:Kt,resetSelectionOnDoubleClick:ct,detailsOnClick:U,barAxisTitle:et,valueColor:Ct,noOfTicks:p,styles:r,classNames:d,targetStyle:B,targetColor:it,qualitativeRangeColors:g,measureBarWidthFactor:o,animate:m,dimmedOpacity:xt,precision:nt,customLayers:V,naLabel:oe,targetLineThickness:ue,hideAxisLine:jt,locale:P}=e,At=Ot===void 0?25:Ot,pe=ae===void 0?10:ae,ge=Wt===void 0?100:Wt,ve=It===void 0?40:It,ye=F.useRef(null);let E;t[0]!==m.amount||t[1]!==m.once?(E={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=E):E=t[2];const O=Xe.useInView(ye,E),[zt,b]=F.useState(void 0),[at,Mt]=F.useState(void 0),[st,ce]=F.useState(void 0),[Qt,xe]=F.useState(void 0),Zt=et?At+25:At;let me;t[3]!==pe||t[4]!==ge||t[5]!==ve||t[6]!==Zt?(me={top:Zt,bottom:pe,left:ge,right:ve},t[3]=pe,t[4]=ge,t[5]=ve,t[6]=Zt,t[7]=me):me=t[7];const f=me,mt=Ht-f.left-f.right,lt=re-f.top-f.bottom;let _t;t[8]!==i?(_t=Math.max(...i.filter(nn).map(en))<0?0:Math.max(...i.filter(tn).map(_i)),t[8]=i,t[9]=_t):_t=t[9];const Lt=_t;let qt;t[10]!==i?(qt=Math.max(...i.filter(Zi).map(Qi))<0?0:Math.max(...i.filter(Ki).map(Ji)),t[10]=i,t[11]=qt):qt=t[11];const $t=qt;let St;t[12]!==i?(St=Math.max(...i.map(Yi)),t[12]=i,t[13]=St):St=t[13];const Tt=St;let Dt;t[14]!==Lt||t[15]!==wt||t[16]!==Tt||t[17]!==$t?(Dt=y.checkIfNullOrUndefined(wt)?Math.max(...[Lt,$t,Tt].filter(Number.isFinite))<0?0:Math.max(...[Lt,$t,Tt].filter(Number.isFinite)):wt,t[14]=Lt,t[15]=wt,t[16]=Tt,t[17]=$t,t[18]=Dt):Dt=t[18];const te=Dt;let Ft;t[19]!==i?(Ft=Math.min(...i.filter(Xi).map(Wi))>=0?0:Math.min(...i.filter(Gi).map(Pi)),t[19]=i,t[20]=Ft):Ft=t[20];const Ut=Ft;let Bt;t[21]!==i?(Bt=Math.min(...i.filter(Bi).map(Ui))>=0?0:Math.min(...i.filter(Fi).map(Di)),t[21]=i,t[22]=Bt):Bt=t[22];const dt=Bt;let M;t[23]!==Ut||t[24]!==tt||t[25]!==dt?(M=y.checkIfNullOrUndefined(tt)?Math.min(...[Ut,dt].filter(Number.isFinite))>=0?0:Math.min(...[Ut,dt].filter(Number.isFinite)):tt,t[23]=Ut,t[24]=tt,t[25]=dt,t[26]=M):M=t[26];const G=M;let ft;if(t[27]!==i||t[28]!==k){const s=new Set,R=i.map((ot,T)=>{const x=k?`${ot.label}`:`${T}`;return s.add(x),{...ot,id:x}}),A=k?k.filter(ot=>!s.has(ot)):[];ft=[...R,...A.map(Ti)],t[27]=i,t[28]=k,t[29]=ft}else ft=t[29];const ht=ft;let pt;t[30]!==ht||t[31]!==k?(pt=k??ht.map(Si),t[30]=ht,t[31]=k,t[32]=pt):pt=t[32];const rt=pt;let W,C,X,Y,z,L,v,w,I,H,J,K,q,u;if(t[33]!==m||t[34]!==et||t[35]!==N||t[36]!==rt||t[37]!==se||t[38]!==d?.graphObjectValues||t[39]!==d?.xAxis?.gridLines||t[40]!==d?.xAxis?.labels||t[41]!==d?.xAxis?.title||t[42]!==d?.yAxis?.axis||t[43]!==d?.yAxis?.labels||t[44]!==V||t[45]!==ht||t[46]!==U||t[47]!==xt||t[48]!==lt||t[49]!==mt||t[50]!==re||t[51]!==jt||t[52]!==j||t[53]!==O||t[54]!==P||t[55]!==f.bottom||t[56]!==f.left||t[57]!==f.top||t[58]!==Et||t[59]!==o||t[60]!==Kt||t[61]!==at||t[62]!==oe||t[63]!==p||t[64]!==ut||t[65]!==vt||t[66]!==nt||t[67]!==Yt||t[68]!==g||t[69]!==Vt||t[70]!==ct||t[71]!==Jt||t[72]!==be||t[73]!==le||t[74]!==Nt||t[75]!==r?.graphObjectValues||t[76]!==r?.xAxis?.gridLines||t[77]!==r?.xAxis?.labels||t[78]!==r?.xAxis?.title||t[79]!==r?.yAxis?.axis||t[80]!==r?.yAxis?.labels||t[81]!==Xt||t[82]!==it||t[83]!==ue||t[84]!==B||t[85]!==At||t[86]!==he||t[87]!==Ct||t[88]!==Ht||t[89]!==te||t[90]!==G){const s=Ge.linear().domain([G,te]).range([0,mt]).nice(),R=We.band().domain(rt).range([0,Kt?Math.max(lt,Kt*rt.length):Et?Math.min(lt,Et*rt.length):lt]).paddingInner(se),A=s.ticks(p);C=Rt.motion.svg,H=`${Ht}px`,J=`${re}px`,K=`0 0 ${Ht} ${re}`,q="ltr",u=ye,z=`translate(${f.left},${f.top})`,L=le?a.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:A.filter($i),x:A.filter(qi).map(n=>s(n)),y1:0-At,y2:lt+f.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:d?.xAxis?.gridLines,labels:d?.xAxis?.labels},suffix:Xt,prefix:Yt,labelType:"secondary",showGridLines:!0,precision:nt,locale:P}):null;const ot=mt/2,T=0-f.top+15,x=r?.xAxis?.title,D=d?.xAxis?.title;t[105]!==et||t[106]!==ot||t[107]!==T||t[108]!==x||t[109]!==D?(v=a.jsxRuntimeExports.jsx(Ue.AxisTitle,{x:ot,y:T,style:x,className:D,text:et}),t[105]=et,t[106]=ot,t[107]=T,t[108]=x,t[109]=D,t[110]=v):v=t[110];const de=d?.yAxis?.axis;let kt;t[111]!==de?(kt={axis:de},t[111]=de,t[112]=kt):kt=t[112];const ee=r?.yAxis?.axis;let Gt;t[113]!==ee?(Gt={axis:ee},t[113]=ee,t[114]=Gt):Gt=t[114],w=a.jsxRuntimeExports.jsx(Fe.Axis,{hideAxisLine:jt,x1:s(G<0?0:G),x2:s(G<0?0:G),y1:-2.5,y2:lt+f.bottom,classNames:kt,styles:Gt}),t[115]!==V?(I=V.filter(Li).map(zi),t[115]=V,t[116]=I):I=t[116],W=Ye.AnimatePresence,X=ht.map(n=>y.checkIfNullOrUndefined(R(n.id))?null:a.jsxRuntimeExports.jsxs(Rt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:_=>{b(n),xe(_.clientY),ce(_.clientX),vt?.(n)},onClick:()=>{(ut||U)&&(Te.isEqual(at,n)&&ct?(Mt(void 0),ut?.(void 0)):(Mt(n),ut?.(n)))},onMouseMove:_=>{b(n),xe(_.clientY),ce(_.clientX)},onMouseLeave:()=>{b(void 0),ce(void 0),xe(void 0),vt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:0,y:R(`${n.id}`),opacity:j?j.indexOf(n.label)!==-1?.85:xt:.85},whileInView:{x:0,y:R(`${n.id}`),opacity:j?j.indexOf(n.label)!==-1?.85:xt:.85,transition:{duration:m.duration}}},initial:"initial",animate:O?"whileInView":"initial",children:[n.qualitativeRange?n.qualitativeRange.map((_,l)=>a.jsxRuntimeExports.jsx(Rt.motion.rect,{exit:{width:0,x:s(0),transition:{duration:m.duration}},variants:{initial:{x:s(0),width:0,fill:g[l]},whileInView:{x:s(l===0?0:Ne.sum(n.qualitativeRange.filter((yt,ie)=>ie<l&&yt))),width:s(_),fill:g[l],transition:{duration:m.duration}}},initial:"initial",animate:O?"whileInView":"initial",y:0,height:R.bandwidth()},l)):null,n.target&&B==="background"?a.jsxRuntimeExports.jsx(Rt.motion.rect,{y:0,x:n.target>=0?s(0):s(n.target),height:R.bandwidth(),exit:{width:0,x:s(0),fill:it,transition:{duration:m.duration}},variants:{initial:{x:s(0),fill:it,width:0},whileInView:{x:n.target>=0?s(0):s(n.target),fill:it,width:n.target>=0?s(n.target)-s(0):s(0)-s(n.target),transition:{duration:m.duration}}},initial:"initial",animate:O?"whileInView":"initial"}):null,n.size?a.jsxRuntimeExports.jsx(Rt.motion.rect,{y:R.bandwidth()*((1-o)/2),style:{fill:N},height:R.bandwidth()*o,exit:{width:0,x:s(0),transition:{duration:m.duration}},variants:{initial:{x:s(0),width:0},whileInView:{x:n.size>=0?s(0):s(n.size),width:n.size>=0?s(n.size)-s(0):s(0)-s(n.size),transition:{duration:m.duration}}},initial:"initial",animate:O?"whileInView":"initial"}):null,n.target&&B==="line"?a.jsxRuntimeExports.jsx(Rt.motion.rect,{y:0,height:R.bandwidth(),width:ue,exit:{opacity:0,x:s(0),fill:it,transition:{duration:m.duration}},variants:{initial:{x:s(0),opacity:0,fill:it},whileInView:{x:s(n.target)-ue/2,opacity:1,fill:it,transition:{duration:m.duration}}},initial:"initial",animate:O?"whileInView":"initial"}):null,be?a.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${n.label}`.length<he?`${n.label}`:`${`${n.label}`.substring(0,he)}...`,y:0,x:(n.size||0)<0?s(0):0-f.left,width:(n.size||0)<0?Ht-s(0):s(0)+f.left,height:R.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:r?.yAxis?.labels,className:d?.yAxis?.labels,animate:m,isInView:O}):null,Nt?a.jsxRuntimeExports.jsx(Rt.motion.text,{y:R.bandwidth()/2,style:{textAnchor:n.size&&n.size<0?"end":"start",...r?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!Ct&&N.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",d?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:s(0),opacity:0,fill:Ct||N},whileInView:{x:n.size?s(n.size):s(0),opacity:1,fill:Ct||N,transition:{duration:m.duration}}},initial:"initial",animate:O?"whileInView":"initial",children:ze.numberFormattingFunction(n.size,oe,nt,Yt,Xt,P)}):null]},n.label)),Y=Vt?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:Vt.map((n,_)=>a.jsxRuntimeExports.jsx(Be.RefLineX,{text:n.text,color:n.color,x:s(n.value),y1:0-f.top,y2:lt+f.bottom,textSide:s(n.value)>mt*.75||Jt?"left":"right",classNames:n.classNames,styles:n.styles,animate:m,isInView:O},_))}):null,t[33]=m,t[34]=et,t[35]=N,t[36]=rt,t[37]=se,t[38]=d?.graphObjectValues,t[39]=d?.xAxis?.gridLines,t[40]=d?.xAxis?.labels,t[41]=d?.xAxis?.title,t[42]=d?.yAxis?.axis,t[43]=d?.yAxis?.labels,t[44]=V,t[45]=ht,t[46]=U,t[47]=xt,t[48]=lt,t[49]=mt,t[50]=re,t[51]=jt,t[52]=j,t[53]=O,t[54]=P,t[55]=f.bottom,t[56]=f.left,t[57]=f.top,t[58]=Et,t[59]=o,t[60]=Kt,t[61]=at,t[62]=oe,t[63]=p,t[64]=ut,t[65]=vt,t[66]=nt,t[67]=Yt,t[68]=g,t[69]=Vt,t[70]=ct,t[71]=Jt,t[72]=be,t[73]=le,t[74]=Nt,t[75]=r?.graphObjectValues,t[76]=r?.xAxis?.gridLines,t[77]=r?.xAxis?.labels,t[78]=r?.xAxis?.title,t[79]=r?.yAxis?.axis,t[80]=r?.yAxis?.labels,t[81]=Xt,t[82]=it,t[83]=ue,t[84]=B,t[85]=At,t[86]=he,t[87]=Ct,t[88]=Ht,t[89]=te,t[90]=G,t[91]=W,t[92]=C,t[93]=X,t[94]=Y,t[95]=z,t[96]=L,t[97]=v,t[98]=w,t[99]=I,t[100]=H,t[101]=J,t[102]=K,t[103]=q,t[104]=u}else W=t[91],C=t[92],X=t[93],Y=t[94],z=t[95],L=t[96],v=t[97],w=t[98],I=t[99],H=t[100],J=t[101],K=t[102],q=t[103],u=t[104];let Q;t[117]!==W||t[118]!==X||t[119]!==Y?(Q=a.jsxRuntimeExports.jsxs(W,{children:[X,Y]}),t[117]=W,t[118]=X,t[119]=Y,t[120]=Q):Q=t[120];let Z;t[121]!==V?(Z=V.filter(Ci).map(Ei),t[121]=V,t[122]=Z):Z=t[122];let $;t[123]!==z||t[124]!==L||t[125]!==v||t[126]!==w||t[127]!==I||t[128]!==Q||t[129]!==Z?($=a.jsxRuntimeExports.jsxs("g",{transform:z,children:[L,v,w,I,Q,Z]}),t[123]=z,t[124]=L,t[125]=v,t[126]=w,t[127]=I,t[128]=Q,t[129]=Z,t[130]=$):$=t[130];let gt;t[131]!==C||t[132]!==H||t[133]!==J||t[134]!==K||t[135]!==q||t[136]!==u||t[137]!==$?(gt=a.jsxRuntimeExports.jsx(C,{width:H,height:J,viewBox:K,direction:q,ref:u,children:$}),t[131]=C,t[132]=H,t[133]=J,t[134]=K,t[135]=q,t[136]=u,t[137]=$,t[138]=gt):gt=t[138];let S;t[139]!==d?.tooltip||t[140]!==st||t[141]!==Qt||t[142]!==zt||t[143]!==r?.tooltip||t[144]!==bt?(S=zt&&bt&&st&&Qt?a.jsxRuntimeExports.jsx(De.Tooltip,{data:zt,body:bt,xPos:st,yPos:Qt,backgroundStyle:r?.tooltip,className:d?.tooltip}):null,t[139]=d?.tooltip,t[140]=st,t[141]=Qt,t[142]=zt,t[143]=r?.tooltip,t[144]=bt,t[145]=S):S=t[145];let Pt;t[146]!==d?.modal||t[147]!==U||t[148]!==at?(Pt=U&&at!==void 0?a.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:U,data:at,setData:Mt,className:d?.modal}):null,t[146]=d?.modal,t[147]=U,t[148]=at,t[149]=Pt):Pt=t[149];let c;return t[150]!==gt||t[151]!==S||t[152]!==Pt?(c=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[gt,S,Pt]}),t[150]=gt,t[151]=S,t[152]=Pt,t[153]=c):c=t[153],c}function Ei(e){return e.layer}function Ci(e){return e.position==="after"}function zi(e){return e.layer}function Li(e){return e.position==="before"}function qi(e){return e!==0}function $i(e){return e!==0}function Si(e){return`${e.id}`}function Ti(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function Di(e){return e.target}function Fi(e){return!y.checkIfNullOrUndefined(e.target)}function Ui(e){return e.target}function Bi(e){return!y.checkIfNullOrUndefined(e.target)}function Pi(e){return e.size}function Gi(e){return!y.checkIfNullOrUndefined(e.size)}function Wi(e){return e.size}function Xi(e){return!y.checkIfNullOrUndefined(e.size)}function Yi(e){return Ne.sum((e.qualitativeRange||[]).filter(Hi))||0}function Hi(e){return!y.checkIfNullOrUndefined(e)}function Ji(e){return e.target}function Ki(e){return!y.checkIfNullOrUndefined(e.target)}function Qi(e){return e.target}function Zi(e){return!y.checkIfNullOrUndefined(e.target)}function _i(e){return e.size}function tn(e){return!y.checkIfNullOrUndefined(e.size)}function en(e){return e.size}function nn(e){return!y.checkIfNullOrUndefined(e.size)}function an(e){const t=a.compilerRuntimeExports.c(136),{data:i,graphTitle:Ot,barColor:ae,barPadding:Wt,showTicks:It,leftMargin:N,rightMargin:Xt,topMargin:Yt,bottomMargin:se,truncateBy:Nt,showLabels:le,showValues:he,backgroundColor:Ht,suffix:re,prefix:be,sources:bt,graphDescription:vt,height:Vt,width:j,footNote:wt,colorDomain:tt,colorLegendTitle:ut,padding:k,relativeHeight:Jt,tooltip:Et,onSeriesMouseOver:Kt,refValues:ct,showColorScale:U,graphID:et,maxValue:Ct,minValue:p,highlightedDataPoints:r,onSeriesMouseClick:d,valueColor:B,orientation:it,styles:g,classNames:o,qualitativeRangeColors:m,targetColor:xt,filterNA:nt,targetStyle:V,measureBarWidthFactor:oe,animate:ue,dimmedOpacity:jt,precision:P,customLayers:At,naLabel:pe,graphDownload:ge,dataDownload:ve,language:ye,theme:E,sortData:O,labelOrder:zt,minHeight:b,maxBarThickness:at,maxNumberOfBars:Mt,minBarThickness:st,ariaLabel:ce,resetSelectionOnDoubleClick:Qt,detailsOnClick:xe,barAxisTitle:Zt,noOfTicks:me,targetLineThickness:f,timeline:mt,hideAxisLine:lt,locale:_t}=e,Lt=ae===void 0?Ee.Colors.primaryColors["blue-600"]:ae,qt=Wt===void 0?.25:Wt,$t=It===void 0?!0:It,St=Nt===void 0?999:Nt,Tt=le===void 0?!0:le,Dt=he===void 0?!0:he,te=Ht===void 0?!1:Ht,Ft=re===void 0?"":re,Ut=be===void 0?"":be,Bt=U===void 0?!0:U,dt=it===void 0?"vertical":it,M=xt===void 0?Ee.Colors.light.grays["gray-700"]:xt,G=nt===void 0?!0:nt,ft=V===void 0?"line":V,ht=oe===void 0?.4:oe,pt=ue===void 0?!1:ue,rt=jt===void 0?.3:jt,W=P===void 0?2:P;let C;t[0]!==At?(C=At===void 0?[]:At,t[0]=At,t[1]=C):C=t[1];const X=C,Y=pe===void 0?"NA":pe,z=ge===void 0?!1:ge,L=ve===void 0?!1:ve,v=ye===void 0?"en":ye,w=E===void 0?"light":E,I=b===void 0?0:b,H=Qt===void 0?!0:Qt,J=me===void 0?5:me,K=f===void 0?2:f;let q;t[2]!==mt?(q=mt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:mt,t[2]=mt,t[3]=q):q=t[3];const u=q,Q=lt===void 0?!1:lt,Z=_t===void 0?"en":_t,[$,gt]=F.useState(0),[S,Pt]=F.useState(0),c=F.useRef(null),s=F.useRef(null),R=dt==="horizontal"?Vi:ni,[A,ot]=F.useState(u.autoplay);let T;if(t[4]!==i||t[5]!==u.dateFormat){let h;t[7]!==u.dateFormat?(h=fe=>Ce.parse(`${fe.date}`,u.dateFormat||"yyyy",new Date).getTime(),t[7]=u.dateFormat,t[8]=h):h=t[8],T=[...new Set(i.filter(mn).map(h))],T.sort(xn),t[4]=i,t[5]=u.dateFormat,t[6]=T}else T=t[6];const x=T,[D,de]=F.useState(u.autoplay?0:x.length-1);let kt,ee;t[9]===Symbol.for("react.memo_cache_sentinel")?(kt=()=>{const h=new ResizeObserver(fe=>{gt(fe[0].target.clientWidth||620),Pt(fe[0].target.clientHeight||480)});return c.current&&h.observe(c.current),()=>h.disconnect()},ee=[],t[9]=kt,t[10]=ee):(kt=t[9],ee=t[10]),F.useEffect(kt,ee);let Gt,n;t[11]!==A||t[12]!==u.speed||t[13]!==x?(Gt=()=>{const h=setInterval(()=>{de(fe=>fe<x.length-1?fe+1:0)},(u.speed||2)*1e3);return A||clearInterval(h),()=>clearInterval(h)},n=[x,A,u.speed],t[11]=A,t[12]=u.speed,t[13]=x,t[14]=Gt,t[15]=n):(Gt=t[14],n=t[15]),F.useEffect(Gt,n);const _=u.dateFormat||"yyyy";let l;t[16]!==D||t[17]!==_||t[18]!==u.showOnlyActiveDate||t[19]!==x?(l=Le.getSliderMarks(x,D,u.showOnlyActiveDate,_),t[16]=D,t[17]=_,t[18]=u.showOnlyActiveDate,t[19]=x,t[20]=l):l=t[20];const yt=l,ie=o?.graphContainer,we=g?.graphContainer;let ne;t[21]!==o?.description||t[22]!==o?.title||t[23]!==i||t[24]!==L||t[25]!==vt||t[26]!==z||t[27]!==Ot||t[28]!==g?.description||t[29]!==g?.title||t[30]!==j?(ne=Ot||vt||z||L?a.jsxRuntimeExports.jsx(ei.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:o?.title,description:o?.description},graphTitle:Ot,graphDescription:vt,width:j,graphDownload:z?s:void 0,dataDownload:L?i.map(cn).filter(un).length>0?i.map(on).filter(rn):i.filter(ln):null}):null,t[21]=o?.description,t[22]=o?.title,t[23]=i,t[24]=L,t[25]=vt,t[26]=z,t[27]=Ot,t[28]=g?.description,t[29]=g?.title,t[30]=j,t[31]=ne):ne=t[31];let je;t[32]!==D||t[33]!==yt||t[34]!==A||t[35]!==u.enabled||t[36]!==x?(je=u.enabled&&x.length>0&&yt?a.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[a.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{ot(!A)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":A?"Click to pause animation":"Click to play animation",children:A?a.jsxRuntimeExports.jsx(Se.Pause,{}):a.jsxRuntimeExports.jsx(Se.Play,{})}),a.jsxRuntimeExports.jsx(Le.Nr,{min:x[0],max:x[x.length-1],marks:yt,step:null,defaultValue:x[x.length-1],value:x[D],onChangeComplete:h=>{de(x.indexOf(h))},onChange:h=>{de(x.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[32]=D,t[33]=yt,t[34]=A,t[35]=u.enabled,t[36]=x,t[37]=je):je=t[37];let Ae;t[38]!==o?.colorLegend||t[39]!==tt||t[40]!==ut||t[41]!==i||t[42]!==m||t[43]!==Bt||t[44]!==w||t[45]!==j?(Ae=Bt&&i.filter(sn).length!==0&&tt&&i.length>0?a.jsxRuntimeExports.jsx(ii.ColorLegend,{width:j,colorLegendTitle:ut,colors:m||Ee.Colors[w].sequentialColors.positiveColorsx10,colorDomain:tt,showNAColor:!1,className:o?.colorLegend}):null,t[38]=o?.colorLegend,t[39]=tt,t[40]=ut,t[41]=i,t[42]=m,t[43]=Bt,t[44]=w,t[45]=j,t[46]=Ae):Ae=t[46];let Me;t[47]!==i.length?(Me=i.length===0&&a.jsxRuntimeExports.jsx(_e.EmptyState,{}),t[47]=i.length,t[48]=Me):Me=t[48];let ke;t[49]!==R||t[50]!==pt||t[51]!==Zt||t[52]!==Lt||t[53]!==qt||t[54]!==se||t[55]!==o||t[56]!==X||t[57]!==i||t[58]!==xe||t[59]!==rt||t[60]!==G||t[61]!==Q||t[62]!==r||t[63]!==D||t[64]!==zt||t[65]!==v||t[66]!==N||t[67]!==Z||t[68]!==at||t[69]!==Mt||t[70]!==Ct||t[71]!==ht||t[72]!==st||t[73]!==p||t[74]!==Y||t[75]!==J||t[76]!==d||t[77]!==Kt||t[78]!==dt||t[79]!==W||t[80]!==Ut||t[81]!==m||t[82]!==ct||t[83]!==H||t[84]!==Xt||t[85]!==Tt||t[86]!==$t||t[87]!==Dt||t[88]!==O||t[89]!==g||t[90]!==Ft||t[91]!==S||t[92]!==$||t[93]!==M||t[94]!==K||t[95]!==ft||t[96]!==w||t[97]!==u.dateFormat||t[98]!==u.enabled||t[99]!==Et||t[100]!==Yt||t[101]!==St||t[102]!==x||t[103]!==B?(ke=$&&S&&i.length>0?a.jsxRuntimeExports.jsx(R,{hideAxisLine:Q,data:O?He.orderBy($e.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?`${h.date}`===Ce.format(new Date(x[D]),u.dateFormat||"yyyy"):h).filter(h=>G?!y.checkIfNullOrUndefined(h.size):h),[h=>h.size===void 0?O==="asc"?(dt==="horizontal"?1:-1)*(1/0):(dt==="horizontal"?-1:1)*(1/0):h.size],[O]).filter((h,fe)=>Mt?fe<Mt:!0):$e.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?`${h.date}`===Ce.format(new Date(x[D]),u.dateFormat||"yyyy"):h).filter(h=>G?!y.checkIfNullOrUndefined(h.size):h).filter((h,fe)=>Mt?fe<Mt:!0),barColor:Lt,targetColor:M,width:$,refValues:ct,height:S,suffix:Ft,prefix:Ut,barPadding:qt,showLabels:Tt,showValues:Dt,showTicks:$t,truncateBy:St,leftMargin:N,rightMargin:Xt,qualitativeRangeColors:m||Ee.Colors[w].sequentialColors.positiveColorsx10,topMargin:Yt,bottomMargin:se,tooltip:Et,onSeriesMouseOver:Kt,maxValue:Ct,minValue:p,highlightedDataPoints:r,onSeriesMouseClick:d,labelOrder:zt,maxBarThickness:at,minBarThickness:st,resetSelectionOnDoubleClick:H,detailsOnClick:xe,barAxisTitle:Zt,noOfTicks:J,valueColor:B,styles:g,classNames:o,targetStyle:ft,dimmedOpacity:rt,measureBarWidthFactor:ht,animate:pt===!0?{duration:.5,once:!0,amount:.5}:pt||{duration:0,once:!0,amount:0},precision:W,customLayers:X,naLabel:Y,targetLineThickness:K,rtl:v==="ar"||v==="he",locale:Z}):null,t[49]=R,t[50]=pt,t[51]=Zt,t[52]=Lt,t[53]=qt,t[54]=se,t[55]=o,t[56]=X,t[57]=i,t[58]=xe,t[59]=rt,t[60]=G,t[61]=Q,t[62]=r,t[63]=D,t[64]=zt,t[65]=v,t[66]=N,t[67]=Z,t[68]=at,t[69]=Mt,t[70]=Ct,t[71]=ht,t[72]=st,t[73]=p,t[74]=Y,t[75]=J,t[76]=d,t[77]=Kt,t[78]=dt,t[79]=W,t[80]=Ut,t[81]=m,t[82]=ct,t[83]=H,t[84]=Xt,t[85]=Tt,t[86]=$t,t[87]=Dt,t[88]=O,t[89]=g,t[90]=Ft,t[91]=S,t[92]=$,t[93]=M,t[94]=K,t[95]=ft,t[96]=w,t[97]=u.dateFormat,t[98]=u.enabled,t[99]=Et,t[100]=Yt,t[101]=St,t[102]=x,t[103]=B,t[104]=ke):ke=t[104];let Re;t[105]!==Me||t[106]!==ke?(Re=a.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:c,children:[Me,ke]}),t[105]=Me,t[106]=ke,t[107]=Re):Re=t[107];let Oe;t[108]!==Ae||t[109]!==Re?(Oe=a.jsxRuntimeExports.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[Ae,Re]}),t[108]=Ae,t[109]=Re,t[110]=Oe):Oe=t[110];let Ie;t[111]!==o?.footnote||t[112]!==o?.source||t[113]!==wt||t[114]!==bt||t[115]!==g?.footnote||t[116]!==g?.source||t[117]!==j?(Ie=bt||wt?a.jsxRuntimeExports.jsx(ti.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:bt,footNote:wt,width:j}):null,t[111]=o?.footnote,t[112]=o?.source,t[113]=wt,t[114]=bt,t[115]=g?.footnote,t[116]=g?.source,t[117]=j,t[118]=Ie):Ie=t[118];let Ve;return t[119]!==ce||t[120]!==te||t[121]!==et||t[122]!==Vt||t[123]!==v||t[124]!==I||t[125]!==k||t[126]!==Jt||t[127]!==ie||t[128]!==we||t[129]!==ne||t[130]!==je||t[131]!==Oe||t[132]!==Ie||t[133]!==w||t[134]!==j?(Ve=a.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:ie,style:we,id:et,ref:s,"aria-label":ce,backgroundColor:te,theme:w,language:v,minHeight:I,width:j,height:Vt,relativeHeight:Jt,padding:k,children:[ne,je,Oe,Ie]}),t[119]=ce,t[120]=te,t[121]=et,t[122]=Vt,t[123]=v,t[124]=I,t[125]=k,t[126]=Jt,t[127]=ie,t[128]=we,t[129]=ne,t[130]=je,t[131]=Oe,t[132]=Ie,t[133]=w,t[134]=j,t[135]=Ve):Ve=t[135],Ve}function sn(e){return e.qualitativeRange}function ln(e){return e!==void 0}function rn(e){return e!==void 0}function on(e){return e.data}function un(e){return e!==void 0}function cn(e){return e.data}function xn(e,t){return e-t}function mn(e){return e.date}exports.BulletChart=an;
|
|
2
2
|
//# sourceMappingURL=BulletChart.cjs.map
|