@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.
Files changed (95) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.cjs.map +1 -1
  3. package/dist/BarGraph.js +1360 -1363
  4. package/dist/BarGraph.js.map +1 -1
  5. package/dist/BeeSwarmChart.cjs +1 -1
  6. package/dist/BeeSwarmChart.cjs.map +1 -1
  7. package/dist/BeeSwarmChart.js +302 -305
  8. package/dist/BeeSwarmChart.js.map +1 -1
  9. package/dist/BiVariateChoroplethMap.cjs +1 -1
  10. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  11. package/dist/BiVariateChoroplethMap.js +4 -4
  12. package/dist/BiVariateChoroplethMap.js.map +1 -1
  13. package/dist/BulletChart.cjs +1 -1
  14. package/dist/BulletChart.cjs.map +1 -1
  15. package/dist/BulletChart.js +591 -594
  16. package/dist/BulletChart.js.map +1 -1
  17. package/dist/ChoroplethMap.cjs +1 -1
  18. package/dist/ChoroplethMap.cjs.map +1 -1
  19. package/dist/ChoroplethMap.js +4 -4
  20. package/dist/ChoroplethMap.js.map +1 -1
  21. package/dist/CirclePackingGraph.cjs +1 -1
  22. package/dist/CirclePackingGraph.js +1 -1
  23. package/dist/DotDensityMap.cjs +1 -1
  24. package/dist/DotDensityMap.cjs.map +1 -1
  25. package/dist/DotDensityMap.js +255 -258
  26. package/dist/DotDensityMap.js.map +1 -1
  27. package/dist/DumbbellChart.cjs +1 -1
  28. package/dist/DumbbellChart.cjs.map +1 -1
  29. package/dist/DumbbellChart.js +553 -556
  30. package/dist/DumbbellChart.js.map +1 -1
  31. package/dist/{GraphEl-Dorm_qQE.js → GraphEl-B73N4RIA.js} +2 -2
  32. package/dist/{GraphEl-Dorm_qQE.js.map → GraphEl-B73N4RIA.js.map} +1 -1
  33. package/dist/{GraphEl-D8WRC8-j.cjs → GraphEl-Lt1og0C-.cjs} +2 -2
  34. package/dist/{GraphEl-D8WRC8-j.cjs.map → GraphEl-Lt1og0C-.cjs.map} +1 -1
  35. package/dist/GriddedGraphs.cjs +1 -1
  36. package/dist/GriddedGraphs.js +1 -1
  37. package/dist/Histogram.cjs +1 -1
  38. package/dist/Histogram.js +1 -1
  39. package/dist/HybridMap.cjs +1 -1
  40. package/dist/HybridMap.cjs.map +1 -1
  41. package/dist/HybridMap.js +310 -313
  42. package/dist/HybridMap.js.map +1 -1
  43. package/dist/MultiLineAltChart.cjs +1 -1
  44. package/dist/MultiLineAltChart.cjs.map +1 -1
  45. package/dist/MultiLineAltChart.js +269 -272
  46. package/dist/MultiLineAltChart.js.map +1 -1
  47. package/dist/MultiLineChart.cjs +1 -1
  48. package/dist/MultiLineChart.cjs.map +1 -1
  49. package/dist/MultiLineChart.js +319 -322
  50. package/dist/MultiLineChart.js.map +1 -1
  51. package/dist/RadarChart.cjs +1 -1
  52. package/dist/RadarChart.cjs.map +1 -1
  53. package/dist/RadarChart.js +3 -3
  54. package/dist/RadarChart.js.map +1 -1
  55. package/dist/SankeyChart.cjs +1 -1
  56. package/dist/SankeyChart.cjs.map +1 -1
  57. package/dist/SankeyChart.js +274 -280
  58. package/dist/SankeyChart.js.map +1 -1
  59. package/dist/ScatterPlot.cjs +1 -1
  60. package/dist/ScatterPlot.cjs.map +1 -1
  61. package/dist/ScatterPlot.js +341 -344
  62. package/dist/ScatterPlot.js.map +1 -1
  63. package/dist/SingleGraphDashboard.cjs +1 -1
  64. package/dist/SingleGraphDashboard.js +1 -1
  65. package/dist/SlopeChart.cjs +1 -1
  66. package/dist/SlopeChart.cjs.map +1 -1
  67. package/dist/SlopeChart.js +251 -254
  68. package/dist/SlopeChart.js.map +1 -1
  69. package/dist/StripChart.cjs +1 -1
  70. package/dist/StripChart.cjs.map +1 -1
  71. package/dist/StripChart.js +292 -295
  72. package/dist/StripChart.js.map +1 -1
  73. package/dist/ThreeDGlobe.cjs +1 -1
  74. package/dist/ThreeDGlobe.cjs.map +1 -1
  75. package/dist/ThreeDGlobe.js +3 -3
  76. package/dist/ThreeDGlobe.js.map +1 -1
  77. package/dist/TreeMapGraph.cjs +1 -1
  78. package/dist/TreeMapGraph.cjs.map +1 -1
  79. package/dist/TreeMapGraph.js +196 -199
  80. package/dist/TreeMapGraph.js.map +1 -1
  81. package/dist/WaterfallChart.cjs +1 -1
  82. package/dist/WaterfallChart.cjs.map +1 -1
  83. package/dist/WaterfallChart.js +274 -277
  84. package/dist/WaterfallChart.js.map +1 -1
  85. package/dist/index-B0Awa_de.js +377 -0
  86. package/dist/index-B0Awa_de.js.map +1 -0
  87. package/dist/index-CP8cmNzt.cjs +2 -0
  88. package/dist/index-CP8cmNzt.cjs.map +1 -0
  89. package/dist/index.cjs +1 -1
  90. package/dist/index.js +1 -1
  91. package/package.json +1 -1
  92. package/dist/index-Bdo_HXb_.cjs +0 -2
  93. package/dist/index-Bdo_HXb_.cjs.map +0 -1
  94. package/dist/index-CGrBpeUa.js +0 -380
  95. package/dist/index-CGrBpeUa.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ThreeDGlobe.js","sources":["../node_modules/hex-to-rgba/build/index.js","../src/Components/Graphs/Maps/ThreeDGlobe/Graph.tsx","../src/Components/Graphs/Maps/ThreeDGlobe/index.tsx"],"sourcesContent":["\"use strict\";\n\nvar removeHash = function removeHash(hex) {\n return hex.charAt(0) === '#' ? hex.slice(1) : hex;\n};\n\nvar parseHex = function parseHex(nakedHex) {\n var isShort = nakedHex.length === 3 || nakedHex.length === 4;\n var twoDigitHexR = isShort ? \"\".concat(nakedHex.slice(0, 1)).concat(nakedHex.slice(0, 1)) : nakedHex.slice(0, 2);\n var twoDigitHexG = isShort ? \"\".concat(nakedHex.slice(1, 2)).concat(nakedHex.slice(1, 2)) : nakedHex.slice(2, 4);\n var twoDigitHexB = isShort ? \"\".concat(nakedHex.slice(2, 3)).concat(nakedHex.slice(2, 3)) : nakedHex.slice(4, 6);\n var twoDigitHexA = (isShort ? \"\".concat(nakedHex.slice(3, 4)).concat(nakedHex.slice(3, 4)) : nakedHex.slice(6, 8)) || 'ff'; // const numericA = +((parseInt(a, 16) / 255).toFixed(2));\n\n return {\n r: twoDigitHexR,\n g: twoDigitHexG,\n b: twoDigitHexB,\n a: twoDigitHexA\n };\n};\n\nvar hexToDecimal = function hexToDecimal(hex) {\n return parseInt(hex, 16);\n};\n\nvar hexesToDecimals = function hexesToDecimals(_ref) {\n var r = _ref.r,\n g = _ref.g,\n b = _ref.b,\n a = _ref.a;\n return {\n r: hexToDecimal(r),\n g: hexToDecimal(g),\n b: hexToDecimal(b),\n a: +(hexToDecimal(a) / 255).toFixed(2)\n };\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}; // eslint-disable-line no-restricted-globals, max-len\n\n\nvar formatRgb = function formatRgb(decimalObject, parameterA) {\n var r = decimalObject.r,\n g = decimalObject.g,\n b = decimalObject.b,\n parsedA = decimalObject.a;\n var a = isNumeric(parameterA) ? parameterA : parsedA;\n return \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(a, \")\");\n};\n/**\n * Turns an old-fashioned css hex color value into a rgb color value.\n *\n * If you specify an alpha value, you'll get a rgba() value instead.\n *\n * @param The hex value to convert. ('123456'. '#123456', ''123', '#123')\n * @param An alpha value to apply. (optional) ('0.5', '0.25')\n * @return An rgb or rgba value. ('rgb(11, 22, 33)'. 'rgba(11, 22, 33, 0.5)')\n */\n\n\nvar hexToRgba = function hexToRgba(hex, a) {\n var hashlessHex = removeHash(hex);\n var hexObject = parseHex(hashlessHex);\n var decimalObject = hexesToDecimals(hexObject);\n return formatRgb(decimalObject, a);\n};\n\nmodule.exports = hexToRgba;","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport Globe, { GlobeMethods } from 'react-globe.gl';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport * as THREE from 'three';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport hexToRgba from 'hex-to-rgba';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n LightConfig,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { getCentroidCoordinates } from '@/Utils/getCentroidCoordinates';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n width: number;\r\n data: ChoroplethMapDataType[];\r\n autoRotate: number;\r\n enableZoom: boolean;\r\n categorical: boolean;\r\n colorDomain: (number | string)[];\r\n colors: string[];\r\n height: number;\r\n globeMaterial?: THREE.Material;\r\n lights: LightConfig[];\r\n polygonData: any;\r\n mapProperty: string;\r\n mapBorderColor: string;\r\n atmosphereColor: string;\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapNoDataColor: string;\r\n colorLegendTitle?: string;\r\n showColorScale: boolean;\r\n hoverStrokeColor: string;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n resetSelectionOnDoubleClick: boolean;\r\n highlightedIds: string[];\r\n scale: number;\r\n globeOffset: [number, number];\r\n polygonAltitude: number;\r\n centerLng: number;\r\n centerLat: number;\r\n atmosphereAltitude: number;\r\n globeCurvatureResolution: number;\r\n fogSettings?: FogDataType;\r\n highlightedAltitude: number;\r\n selectedId?: string;\r\n collapseColorScaleByDefault?: boolean;\r\n dimmedOpacity: number;\r\n locale: string;\r\n}\r\n\r\nfunction createLightFromConfig(config: LightConfig): THREE.Light {\r\n let light: THREE.Light;\r\n\r\n switch (config.type) {\r\n case 'ambient':\r\n light = new THREE.AmbientLight(config.color, config.intensity);\r\n break;\r\n case 'directional':\r\n light = new THREE.DirectionalLight(config.color, config.intensity);\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z === undefined ? -1 : config.target.z,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.DirectionalLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.DirectionalLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.DirectionalLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.DirectionalLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.DirectionalLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n case 'point':\r\n light = new THREE.PointLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n break;\r\n case 'spot':\r\n light = new THREE.SpotLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.angle || Math.PI / 3,\r\n config.penumbra || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z || 0,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.SpotLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.SpotLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.SpotLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.SpotLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.SpotLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error('Unknown light type');\r\n }\r\n\r\n return light;\r\n}\r\nfunction Graph(props: Props) {\r\n const {\r\n width,\r\n autoRotate,\r\n data,\r\n enableZoom,\r\n categorical,\r\n colorDomain,\r\n colors,\r\n globeMaterial,\r\n height,\r\n polygonData,\r\n mapProperty,\r\n mapBorderColor,\r\n atmosphereColor,\r\n tooltip,\r\n styles,\r\n classNames,\r\n mapNoDataColor,\r\n colorLegendTitle,\r\n showColorScale,\r\n hoverStrokeColor,\r\n detailsOnClick,\r\n onSeriesMouseClick,\r\n onSeriesMouseOver,\r\n resetSelectionOnDoubleClick,\r\n highlightedIds,\r\n scale,\r\n globeOffset,\r\n polygonAltitude,\r\n centerLng,\r\n centerLat,\r\n atmosphereAltitude,\r\n globeCurvatureResolution,\r\n fogSettings,\r\n lights,\r\n highlightedAltitude,\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n dimmedOpacity,\r\n locale,\r\n } = props;\r\n const [globeReady, setGlobeReady] = useState(false);\r\n const globeEl = useRef<GlobeMethods | undefined>(undefined);\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\r\n const [mouseOverData, setMouseOverData] = useState<ChoroplethMapDataType | undefined>(undefined);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.controls().enableZoom = enableZoom;\r\n }\r\n }, [enableZoom]);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n if (mouseOverData || selectedId) {\r\n globeEl.current.controls().autoRotate = false;\r\n } else {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n globeEl.current.controls().autoRotateSpeed = autoRotate;\r\n }\r\n }\r\n }, [mouseOverData, selectedId, autoRotate]);\r\n useEffect(() => {\r\n if (globeEl.current && selectedId) {\r\n const selectedPolygon = polygonData.find(\r\n (d: any) => d.properties[mapProperty] === selectedId,\r\n );\r\n const [lng, lat] = getCentroidCoordinates(selectedPolygon);\r\n globeEl.current.pointOfView({ lat, lng, altitude: scale }, 1000);\r\n }\r\n }, [selectedId, scale, polygonData, mapProperty]);\r\n\r\n useEffect(() => {\r\n const canvas = globeEl.current?.renderer().domElement;\r\n if (!canvas) return;\r\n\r\n const handleMouseMove = (e: MouseEvent) => {\r\n setMousePos({ x: e.clientX, y: e.clientY });\r\n };\r\n\r\n canvas.addEventListener('mousemove', handleMouseMove);\r\n return () => canvas.removeEventListener('mousemove', handleMouseMove);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({ lat: centerLat, lng: centerLng, altitude: scale }, 1000);\r\n }\r\n }, [scale, centerLng, centerLat]);\r\n const materials =\r\n globeMaterial ||\r\n new THREE.MeshBasicMaterial({\r\n color: '#FFF',\r\n });\r\n const setupCustomLighting = useCallback(() => {\r\n if (!globeEl.current) return;\r\n\r\n const scene = globeEl.current.scene();\r\n const camera = globeEl.current.camera();\r\n\r\n let lightsAndObjToRemove: THREE.Object3D[] = [];\r\n scene.traverse(obj => {\r\n if (obj instanceof THREE.Light) {\r\n lightsAndObjToRemove.push(obj);\r\n }\r\n });\r\n lightsAndObjToRemove = [...lightsAndObjToRemove, ...camera.children];\r\n lightsAndObjToRemove.forEach(light => light.parent?.remove(light));\r\n\r\n const lightConfig = lights.map(config => createLightFromConfig(config));\r\n lightConfig.forEach((light, i) => {\r\n if (lights[i].type !== 'ambient' && lights[i].position === 'camera') {\r\n camera.add(light);\r\n if (lights[i].type !== 'point') {\r\n camera.add((light as THREE.DirectionalLight | THREE.SpotLight).target);\r\n }\r\n } else {\r\n scene.add(light);\r\n }\r\n });\r\n\r\n if (fogSettings) {\r\n scene.fog = new THREE.Fog(fogSettings.color, fogSettings.near, fogSettings.far);\r\n }\r\n }, [lights, fogSettings]);\r\n\r\n const handleGlobeReady = () => {\r\n setGlobeReady(true);\r\n setupCustomLighting();\r\n };\r\n useEffect(() => {\r\n if (globeReady) {\r\n setupCustomLighting();\r\n }\r\n }, [globeReady, setupCustomLighting]);\r\n return (\r\n <div className='relative'>\r\n <Globe\r\n ref={globeEl}\r\n height={height}\r\n width={width}\r\n globeOffset={globeOffset}\r\n lineHoverPrecision={0}\r\n polygonsData={polygonData}\r\n polygonAltitude={(polygon: any) =>\r\n highlightedIds.includes(polygon?.properties?.[mapProperty]) ||\r\n polygon?.properties?.[mapProperty] === selectedId\r\n ? highlightedAltitude\r\n : polygon?.properties?.[mapProperty] === mouseOverData?.id ||\r\n polygon?.properties?.[mapProperty] === mouseClickData?.id\r\n ? highlightedAltitude\r\n : polygonAltitude\r\n }\r\n polygonCapColor={(polygon: any) => {\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonSideColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonStrokeColor={(polygon: any) =>\r\n polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? hoverStrokeColor\r\n : mapBorderColor\r\n }\r\n onGlobeClick={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n onPolygonClick={(polygon: any) => {\r\n const clickedData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n isEqual(mouseClickData, clickedData) &&\r\n resetSelectionOnDoubleClick &&\r\n clickedData\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }\r\n }\r\n }}\r\n onPolygonHover={(polygon: any) => {\r\n const hoverData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n setMouseOverData(hoverData);\r\n onSeriesMouseOver?.(hoverData);\r\n }}\r\n atmosphereColor={atmosphereColor}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n globeMaterial={materials}\r\n backgroundColor='rgba(0, 0, 0, 0)'\r\n polygonsTransitionDuration={100}\r\n onGlobeReady={() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({\r\n lat: centerLat,\r\n lng: centerLng,\r\n });\r\n const scene = globeEl.current.scene();\r\n setTimeout(() => {\r\n const polygons = scene.children[3]?.children[0]?.children[4]?.children || [];\r\n polygons.forEach(d => {\r\n const line = d.children[1];\r\n line.renderOrder = 2;\r\n });\r\n }, 300);\r\n const camera = globeEl.current.camera();\r\n scene.add(camera);\r\n handleGlobeReady();\r\n }\r\n }}\r\n />\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g key={i} className='cursor-pointer'>\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[i],\r\n stroke: colors[i],\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(\r\n d as number,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n locale,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n stroke: colors[colorDomain.length],\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div key={i} className='flex gap-2 items-center'>\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {mouseOverData && tooltip ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={mousePos.x}\r\n yPos={mousePos.y}\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 </div>\r\n );\r\n}\r\n\r\nexport default Graph;\r\n","import React, { useEffect, useEffectEvent, useRef, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport * as THREE from 'three';\r\n\r\nimport Graph from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n Languages,\r\n LightConfig,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\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: ChoroplethMapDataType[];\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. Make sure the the colors are in hex code, any other format can cause issues. */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines if the globe rotates automatically */\r\n autoRotate?: number | boolean;\r\n /** Defines the material property applied to the sphere of the globe */\r\n globeMaterial?: THREE.Material;\r\n /** Defines the lights for the 3D scene */\r\n lights?: LightConfig[];\r\n /** Defines the colo of the glow around the globe */\r\n atmosphereColor?: string;\r\n /** Defines if the globe can be zoomed when scrolled */\r\n enableZoom?: boolean;\r\n /** Position offset of the globe relative to the canvas center */\r\n globeOffset?: [number, number];\r\n /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */\r\n scale?: number;\r\n /** Defines the spacing between the country shape polygon with the sphere */\r\n polygonAltitude?: number;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** The max altitude of the atmosphere, in terms of globe radius units. */\r\n atmosphereAltitude?: number;\r\n /** Resolution in angular degrees of the sphere curvature. The finer the resolution, the more the globe is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. */\r\n globeCurvatureResolution?: number;\r\n /** Defines fog settings for the scene. */\r\n fogSettings?: FogDataType;\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 /** Countries or regions to be highlighted */\r\n selectedId?: string;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the altitude of the highlighted countries or the countries on mouseover. */\r\n highlightedAltitude?: number;\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\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\n/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */\r\nexport function ThreeDGlobe(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n padding,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n graphID,\r\n mapProperty = 'ISO3',\r\n dataDownload = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n autoRotate = true,\r\n enableZoom = true,\r\n globeMaterial,\r\n centerPoint = [0, 0],\r\n atmosphereColor = '#999',\r\n showColorScale = true,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n highlightedIds = [],\r\n highlightedAltitude = 0.1,\r\n dimmedOpacity = 0.3,\r\n scale = 1,\r\n globeOffset = [0, 0],\r\n polygonAltitude = 0.01,\r\n globeCurvatureResolution = 4,\r\n atmosphereAltitude = 0.15,\r\n fogSettings,\r\n lights = [\r\n {\r\n type: 'ambient',\r\n color: 0x404040,\r\n intensity: 0.4,\r\n },\r\n {\r\n type: 'directional',\r\n color: 0xffffff,\r\n intensity: 1,\r\n position: { x: 5, y: 10, z: 5 },\r\n },\r\n ],\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n locale = 'en',\r\n } = props;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(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 if (\r\n mapData ===\r\n 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json'\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const features = d.features.map((el: any) => {\r\n if (el.geometry.type === 'Polygon') {\r\n const reversed = [...el.geometry.coordinates[0]].reverse();\r\n const geometry = { ...el.geometry, coordinates: [reversed] };\r\n return { ...el, geometry };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const coord: any = [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n el.geometry.coordinates.forEach((c: any) => {\r\n const reversed = [...c[0]].reverse();\r\n coord.push([reversed]);\r\n });\r\n const geometry = { ...el.geometry, coordinates: coord };\r\n return { ...el, geometry };\r\n });\r\n onUpdateShape(features);\r\n } else onUpdateShape(d.features);\r\n });\r\n } else {\r\n onUpdateShape(mapData.features);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n 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 || 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={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 <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data}\r\n globeOffset={globeOffset}\r\n polygonData={mapShape}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n mapProperty={mapProperty}\r\n styles={styles}\r\n classNames={classNames}\r\n autoRotate={autoRotate === true ? 1.5 : autoRotate === false ? 0 : autoRotate}\r\n enableZoom={enableZoom}\r\n globeMaterial={globeMaterial}\r\n atmosphereColor={atmosphereColor}\r\n colorLegendTitle={colorLegendTitle}\r\n showColorScale={showColorScale}\r\n hoverStrokeColor={\r\n theme === 'light' ? Colors.light.grays['gray-700'] : Colors.light.grays['gray-300']\r\n }\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n scale={scale}\r\n polygonAltitude={polygonAltitude}\r\n centerLat={centerPoint[0]}\r\n centerLng={centerPoint[1]}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n fogSettings={fogSettings}\r\n lights={lights}\r\n highlightedAltitude={highlightedAltitude}\r\n selectedId={selectedId}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n dimmedOpacity={dimmedOpacity}\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":["removeHash","hex","parseHex","nakedHex","isShort","twoDigitHexR","twoDigitHexG","twoDigitHexB","twoDigitHexA","hexToDecimal","hexesToDecimals","_ref","r","g","b","a","isNumeric","n","formatRgb","decimalObject","parameterA","parsedA","hexToRgba","hashlessHex","hexObject","build","createLightFromConfig","config","light","type","THREE","AmbientLight","color","intensity","DirectionalLight","position","set","x","y","z","target","undefined","castShadow","shadow","mapSize","width","height","camera","near","far","PointLight","distance","decay","SpotLight","angle","Math","PI","penumbra","Error","Graph","props","autoRotate","data","enableZoom","categorical","colorDomain","colors","globeMaterial","polygonData","mapProperty","mapBorderColor","atmosphereColor","tooltip","styles","classNames","mapNoDataColor","colorLegendTitle","showColorScale","hoverStrokeColor","detailsOnClick","onSeriesMouseClick","onSeriesMouseOver","resetSelectionOnDoubleClick","highlightedIds","scale","globeOffset","polygonAltitude","centerLng","centerLat","atmosphereAltitude","globeCurvatureResolution","fogSettings","lights","highlightedAltitude","selectedId","collapseColorScaleByDefault","dimmedOpacity","locale","globeReady","setGlobeReady","useState","globeEl","useRef","mouseClickData","setMouseClickData","showLegend","setShowLegend","mousePos","setMousePos","mouseOverData","setMouseOverData","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","current","controls","autoRotateSpeed","selectedPolygon","find","d","properties","lng","lat","getCentroidCoordinates","pointOfView","altitude","canvas","renderer","domElement","handleMouseMove","e","clientX","clientY","addEventListener","removeEventListener","materials","MeshBasicMaterial","setupCustomLighting","useCallback","scene","lightsAndObjToRemove","traverse","obj","Light","push","children","forEach","parent","remove","map","i","add","fog","Fog","handleGlobeReady","jsxs","jsx","Globe","polygon","includes","id","opacity","length","val","el","clickedData","isEqual","hoverData","setTimeout","polygons","line","renderOrder","cn","colorLegend","Fragment","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","fill","stroke","textAnchor","numberFormattingFunction","ExpandIcon","Tooltip","DetailsModal","modal","ThreeDGlobe","$","_c","mapData","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","padding","t3","t4","t5","relativeHeight","graphID","t6","dataDownload","t7","language","t8","minHeight","t9","theme","t10","ariaLabel","t11","t12","centerPoint","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","t25","t26","Colors","graphNoData","grays","t27","t28","t29","t30","mapShape","setMapShape","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","t31","t32","Symbol","for","resizeObserver","ResizeObserver","entries","clientWidth","clientHeight","observe","disconnect","t33","shape","onUpdateShape","useEffectEvent","t34","fetchAndParseJSON","then","features","_temp","t35","t36","getUniqValue","getJenks","_temp2","t37","graphContainer","t38","t39","description","title","GraphHeader","_temp3","filter","_temp4","_temp5","_temp6","_temp7","t40","GraphArea","sequentialColors","max","Spinner","t41","footnote","source","GraphFooter","t42","GraphContainer","d_3","d_2","d_1","d_5","d_4","d_0","geometry","reversed","coordinates","reverse","coord","c","reversed_0","geometry_0"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAIA,IAAa,SAAoBC,GAAK;AACxC,WAAOA,EAAI,OAAO,CAAC,MAAM,MAAMA,EAAI,MAAM,CAAC,IAAIA;AAAA,EAChD,GAEIC,IAAW,SAAkBC,GAAU;AACzC,QAAIC,IAAUD,EAAS,WAAW,KAAKA,EAAS,WAAW,GACvDE,IAAeD,IAAU,GAAG,OAAOD,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE,OAAOA,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,aAAe,CAACD,CAAQ;AAAA,IAAA;AAAI,WACtD;AAAA,MAAA,GAAK7I;AAAAA,MAAE4I,UAAAA;AAAAA,IAAAA;AAAAA,EAAY;AAG5B,QAAAI,IAAmB,CAAA;AAEnBhJ,EAAAA,EAAE4I,SAASE,YAAYhK,QAASmK,CAAAA,MAAA;AAC9B,UAAAC,IAAiB,CAAA,GAAID,IAAI,EAACF,QAAAA;AAC1BC,IAAAA,EAAKpK,KAAM,CAACiK,CAAQ,CAAC;AAAA,EAAC,CACvB;AACD,QAAAM,IAAiB;AAAA,IAAA,GAAKnJ,EAAE4I;AAAAA,IAASE,aAAeE;AAAAA,EAAAA;AAAQ,SACjD;AAAA,IAAA,GAAKhJ;AAAAA,IAAE4I,UAAEA;AAAAA,EAAAA;AAAU;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ThreeDGlobe.js","sources":["../node_modules/hex-to-rgba/build/index.js","../src/Components/Graphs/Maps/ThreeDGlobe/Graph.tsx","../src/Components/Graphs/Maps/ThreeDGlobe/index.tsx"],"sourcesContent":["\"use strict\";\n\nvar removeHash = function removeHash(hex) {\n return hex.charAt(0) === '#' ? hex.slice(1) : hex;\n};\n\nvar parseHex = function parseHex(nakedHex) {\n var isShort = nakedHex.length === 3 || nakedHex.length === 4;\n var twoDigitHexR = isShort ? \"\".concat(nakedHex.slice(0, 1)).concat(nakedHex.slice(0, 1)) : nakedHex.slice(0, 2);\n var twoDigitHexG = isShort ? \"\".concat(nakedHex.slice(1, 2)).concat(nakedHex.slice(1, 2)) : nakedHex.slice(2, 4);\n var twoDigitHexB = isShort ? \"\".concat(nakedHex.slice(2, 3)).concat(nakedHex.slice(2, 3)) : nakedHex.slice(4, 6);\n var twoDigitHexA = (isShort ? \"\".concat(nakedHex.slice(3, 4)).concat(nakedHex.slice(3, 4)) : nakedHex.slice(6, 8)) || 'ff'; // const numericA = +((parseInt(a, 16) / 255).toFixed(2));\n\n return {\n r: twoDigitHexR,\n g: twoDigitHexG,\n b: twoDigitHexB,\n a: twoDigitHexA\n };\n};\n\nvar hexToDecimal = function hexToDecimal(hex) {\n return parseInt(hex, 16);\n};\n\nvar hexesToDecimals = function hexesToDecimals(_ref) {\n var r = _ref.r,\n g = _ref.g,\n b = _ref.b,\n a = _ref.a;\n return {\n r: hexToDecimal(r),\n g: hexToDecimal(g),\n b: hexToDecimal(b),\n a: +(hexToDecimal(a) / 255).toFixed(2)\n };\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}; // eslint-disable-line no-restricted-globals, max-len\n\n\nvar formatRgb = function formatRgb(decimalObject, parameterA) {\n var r = decimalObject.r,\n g = decimalObject.g,\n b = decimalObject.b,\n parsedA = decimalObject.a;\n var a = isNumeric(parameterA) ? parameterA : parsedA;\n return \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(a, \")\");\n};\n/**\n * Turns an old-fashioned css hex color value into a rgb color value.\n *\n * If you specify an alpha value, you'll get a rgba() value instead.\n *\n * @param The hex value to convert. ('123456'. '#123456', ''123', '#123')\n * @param An alpha value to apply. (optional) ('0.5', '0.25')\n * @return An rgb or rgba value. ('rgb(11, 22, 33)'. 'rgba(11, 22, 33, 0.5)')\n */\n\n\nvar hexToRgba = function hexToRgba(hex, a) {\n var hashlessHex = removeHash(hex);\n var hexObject = parseHex(hashlessHex);\n var decimalObject = hexesToDecimals(hexObject);\n return formatRgb(decimalObject, a);\n};\n\nmodule.exports = hexToRgba;","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport Globe, { GlobeMethods } from 'react-globe.gl';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport * as THREE from 'three';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport hexToRgba from 'hex-to-rgba';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n LightConfig,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { getCentroidCoordinates } from '@/Utils/getCentroidCoordinates';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n width: number;\r\n data: ChoroplethMapDataType[];\r\n autoRotate: number;\r\n enableZoom: boolean;\r\n categorical: boolean;\r\n colorDomain: (number | string)[];\r\n colors: string[];\r\n height: number;\r\n globeMaterial?: THREE.Material;\r\n lights: LightConfig[];\r\n polygonData: any;\r\n mapProperty: string;\r\n mapBorderColor: string;\r\n atmosphereColor: string;\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapNoDataColor: string;\r\n colorLegendTitle?: string;\r\n showColorScale: boolean;\r\n hoverStrokeColor: string;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n resetSelectionOnDoubleClick: boolean;\r\n highlightedIds?: string[];\r\n scale: number;\r\n globeOffset: [number, number];\r\n polygonAltitude: number;\r\n centerLng: number;\r\n centerLat: number;\r\n atmosphereAltitude: number;\r\n globeCurvatureResolution: number;\r\n fogSettings?: FogDataType;\r\n highlightedAltitude: number;\r\n selectedId?: string;\r\n collapseColorScaleByDefault?: boolean;\r\n dimmedOpacity: number;\r\n locale: string;\r\n}\r\n\r\nfunction createLightFromConfig(config: LightConfig): THREE.Light {\r\n let light: THREE.Light;\r\n\r\n switch (config.type) {\r\n case 'ambient':\r\n light = new THREE.AmbientLight(config.color, config.intensity);\r\n break;\r\n case 'directional':\r\n light = new THREE.DirectionalLight(config.color, config.intensity);\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z === undefined ? -1 : config.target.z,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.DirectionalLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.DirectionalLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.DirectionalLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.DirectionalLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.DirectionalLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n case 'point':\r\n light = new THREE.PointLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n break;\r\n case 'spot':\r\n light = new THREE.SpotLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.angle || Math.PI / 3,\r\n config.penumbra || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z || 0,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.SpotLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.SpotLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.SpotLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.SpotLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.SpotLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error('Unknown light type');\r\n }\r\n\r\n return light;\r\n}\r\nfunction Graph(props: Props) {\r\n const {\r\n width,\r\n autoRotate,\r\n data,\r\n enableZoom,\r\n categorical,\r\n colorDomain,\r\n colors,\r\n globeMaterial,\r\n height,\r\n polygonData,\r\n mapProperty,\r\n mapBorderColor,\r\n atmosphereColor,\r\n tooltip,\r\n styles,\r\n classNames,\r\n mapNoDataColor,\r\n colorLegendTitle,\r\n showColorScale,\r\n hoverStrokeColor,\r\n detailsOnClick,\r\n onSeriesMouseClick,\r\n onSeriesMouseOver,\r\n resetSelectionOnDoubleClick,\r\n highlightedIds,\r\n scale,\r\n globeOffset,\r\n polygonAltitude,\r\n centerLng,\r\n centerLat,\r\n atmosphereAltitude,\r\n globeCurvatureResolution,\r\n fogSettings,\r\n lights,\r\n highlightedAltitude,\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n dimmedOpacity,\r\n locale,\r\n } = props;\r\n const [globeReady, setGlobeReady] = useState(false);\r\n const globeEl = useRef<GlobeMethods | undefined>(undefined);\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\r\n const [mouseOverData, setMouseOverData] = useState<ChoroplethMapDataType | undefined>(undefined);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.controls().enableZoom = enableZoom;\r\n }\r\n }, [enableZoom]);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n if (mouseOverData || selectedId) {\r\n globeEl.current.controls().autoRotate = false;\r\n } else {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n globeEl.current.controls().autoRotateSpeed = autoRotate;\r\n }\r\n }\r\n }, [mouseOverData, selectedId, autoRotate]);\r\n useEffect(() => {\r\n if (globeEl.current && selectedId) {\r\n const selectedPolygon = polygonData.find(\r\n (d: any) => d.properties[mapProperty] === selectedId,\r\n );\r\n const [lng, lat] = getCentroidCoordinates(selectedPolygon);\r\n globeEl.current.pointOfView({ lat, lng, altitude: scale }, 1000);\r\n }\r\n }, [selectedId, scale, polygonData, mapProperty]);\r\n\r\n useEffect(() => {\r\n const canvas = globeEl.current?.renderer().domElement;\r\n if (!canvas) return;\r\n\r\n const handleMouseMove = (e: MouseEvent) => {\r\n setMousePos({ x: e.clientX, y: e.clientY });\r\n };\r\n\r\n canvas.addEventListener('mousemove', handleMouseMove);\r\n return () => canvas.removeEventListener('mousemove', handleMouseMove);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({ lat: centerLat, lng: centerLng, altitude: scale }, 1000);\r\n }\r\n }, [scale, centerLng, centerLat]);\r\n const materials =\r\n globeMaterial ||\r\n new THREE.MeshBasicMaterial({\r\n color: '#FFF',\r\n });\r\n const setupCustomLighting = useCallback(() => {\r\n if (!globeEl.current) return;\r\n\r\n const scene = globeEl.current.scene();\r\n const camera = globeEl.current.camera();\r\n\r\n let lightsAndObjToRemove: THREE.Object3D[] = [];\r\n scene.traverse(obj => {\r\n if (obj instanceof THREE.Light) {\r\n lightsAndObjToRemove.push(obj);\r\n }\r\n });\r\n lightsAndObjToRemove = [...lightsAndObjToRemove, ...camera.children];\r\n lightsAndObjToRemove.forEach(light => light.parent?.remove(light));\r\n\r\n const lightConfig = lights.map(config => createLightFromConfig(config));\r\n lightConfig.forEach((light, i) => {\r\n if (lights[i].type !== 'ambient' && lights[i].position === 'camera') {\r\n camera.add(light);\r\n if (lights[i].type !== 'point') {\r\n camera.add((light as THREE.DirectionalLight | THREE.SpotLight).target);\r\n }\r\n } else {\r\n scene.add(light);\r\n }\r\n });\r\n\r\n if (fogSettings) {\r\n scene.fog = new THREE.Fog(fogSettings.color, fogSettings.near, fogSettings.far);\r\n }\r\n }, [lights, fogSettings]);\r\n\r\n const handleGlobeReady = () => {\r\n setGlobeReady(true);\r\n setupCustomLighting();\r\n };\r\n useEffect(() => {\r\n if (globeReady) {\r\n setupCustomLighting();\r\n }\r\n }, [globeReady, setupCustomLighting]);\r\n return (\r\n <div className='relative'>\r\n <Globe\r\n ref={globeEl}\r\n height={height}\r\n width={width}\r\n globeOffset={globeOffset}\r\n lineHoverPrecision={0}\r\n polygonsData={polygonData}\r\n polygonAltitude={(polygon: any) =>\r\n highlightedIds?.includes(polygon?.properties?.[mapProperty]) ||\r\n polygon?.properties?.[mapProperty] === selectedId\r\n ? highlightedAltitude\r\n : polygon?.properties?.[mapProperty] === mouseOverData?.id ||\r\n polygon?.properties?.[mapProperty] === mouseClickData?.id\r\n ? highlightedAltitude\r\n : polygonAltitude\r\n }\r\n polygonCapColor={(polygon: any) => {\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonSideColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonStrokeColor={(polygon: any) =>\r\n polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? hoverStrokeColor\r\n : mapBorderColor\r\n }\r\n onGlobeClick={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n onPolygonClick={(polygon: any) => {\r\n const clickedData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n isEqual(mouseClickData, clickedData) &&\r\n resetSelectionOnDoubleClick &&\r\n clickedData\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }\r\n }\r\n }}\r\n onPolygonHover={(polygon: any) => {\r\n const hoverData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n setMouseOverData(hoverData);\r\n onSeriesMouseOver?.(hoverData);\r\n }}\r\n atmosphereColor={atmosphereColor}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n globeMaterial={materials}\r\n backgroundColor='rgba(0, 0, 0, 0)'\r\n polygonsTransitionDuration={100}\r\n onGlobeReady={() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({\r\n lat: centerLat,\r\n lng: centerLng,\r\n });\r\n const scene = globeEl.current.scene();\r\n setTimeout(() => {\r\n const polygons = scene.children[3]?.children[0]?.children[4]?.children || [];\r\n polygons.forEach(d => {\r\n const line = d.children[1];\r\n line.renderOrder = 2;\r\n });\r\n }, 300);\r\n const camera = globeEl.current.camera();\r\n scene.add(camera);\r\n handleGlobeReady();\r\n }\r\n }}\r\n />\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g key={i} className='cursor-pointer'>\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[i],\r\n stroke: colors[i],\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(\r\n d as number,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n locale,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n stroke: colors[colorDomain.length],\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div key={i} className='flex gap-2 items-center'>\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {mouseOverData && tooltip ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={mousePos.x}\r\n yPos={mousePos.y}\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 </div>\r\n );\r\n}\r\n\r\nexport default Graph;\r\n","import React, { useEffect, useEffectEvent, useRef, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport * as THREE from 'three';\r\n\r\nimport Graph from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n Languages,\r\n LightConfig,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\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: ChoroplethMapDataType[];\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. Make sure the the colors are in hex code, any other format can cause issues. */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines if the globe rotates automatically */\r\n autoRotate?: number | boolean;\r\n /** Defines the material property applied to the sphere of the globe */\r\n globeMaterial?: THREE.Material;\r\n /** Defines the lights for the 3D scene */\r\n lights?: LightConfig[];\r\n /** Defines the colo of the glow around the globe */\r\n atmosphereColor?: string;\r\n /** Defines if the globe can be zoomed when scrolled */\r\n enableZoom?: boolean;\r\n /** Position offset of the globe relative to the canvas center */\r\n globeOffset?: [number, number];\r\n /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */\r\n scale?: number;\r\n /** Defines the spacing between the country shape polygon with the sphere */\r\n polygonAltitude?: number;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** The max altitude of the atmosphere, in terms of globe radius units. */\r\n atmosphereAltitude?: number;\r\n /** Resolution in angular degrees of the sphere curvature. The finer the resolution, the more the globe is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. */\r\n globeCurvatureResolution?: number;\r\n /** Defines fog settings for the scene. */\r\n fogSettings?: FogDataType;\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 /** Countries or regions to be highlighted */\r\n selectedId?: string;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the altitude of the highlighted countries or the countries on mouseover. */\r\n highlightedAltitude?: number;\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\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\n/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */\r\nexport function ThreeDGlobe(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n padding,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n graphID,\r\n mapProperty = 'ISO3',\r\n dataDownload = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n autoRotate = true,\r\n enableZoom = true,\r\n globeMaterial,\r\n centerPoint = [0, 0],\r\n atmosphereColor = '#999',\r\n showColorScale = true,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n highlightedIds = [],\r\n highlightedAltitude = 0.1,\r\n dimmedOpacity = 0.3,\r\n scale = 1,\r\n globeOffset = [0, 0],\r\n polygonAltitude = 0.01,\r\n globeCurvatureResolution = 4,\r\n atmosphereAltitude = 0.15,\r\n fogSettings,\r\n lights = [\r\n {\r\n type: 'ambient',\r\n color: 0x404040,\r\n intensity: 0.4,\r\n },\r\n {\r\n type: 'directional',\r\n color: 0xffffff,\r\n intensity: 1,\r\n position: { x: 5, y: 10, z: 5 },\r\n },\r\n ],\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n locale = 'en',\r\n } = props;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(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 if (\r\n mapData ===\r\n 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json'\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const features = d.features.map((el: any) => {\r\n if (el.geometry.type === 'Polygon') {\r\n const reversed = [...el.geometry.coordinates[0]].reverse();\r\n const geometry = { ...el.geometry, coordinates: [reversed] };\r\n return { ...el, geometry };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const coord: any = [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n el.geometry.coordinates.forEach((c: any) => {\r\n const reversed = [...c[0]].reverse();\r\n coord.push([reversed]);\r\n });\r\n const geometry = { ...el.geometry, coordinates: coord };\r\n return { ...el, geometry };\r\n });\r\n onUpdateShape(features);\r\n } else onUpdateShape(d.features);\r\n });\r\n } else {\r\n onUpdateShape(mapData.features);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n 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 || 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={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 <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data}\r\n globeOffset={globeOffset}\r\n polygonData={mapShape}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n mapProperty={mapProperty}\r\n styles={styles}\r\n classNames={classNames}\r\n autoRotate={autoRotate === true ? 1.5 : autoRotate === false ? 0 : autoRotate}\r\n enableZoom={enableZoom}\r\n globeMaterial={globeMaterial}\r\n atmosphereColor={atmosphereColor}\r\n colorLegendTitle={colorLegendTitle}\r\n showColorScale={showColorScale}\r\n hoverStrokeColor={\r\n theme === 'light' ? Colors.light.grays['gray-700'] : Colors.light.grays['gray-300']\r\n }\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n scale={scale}\r\n polygonAltitude={polygonAltitude}\r\n centerLat={centerPoint[0]}\r\n centerLng={centerPoint[1]}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n fogSettings={fogSettings}\r\n lights={lights}\r\n highlightedAltitude={highlightedAltitude}\r\n selectedId={selectedId}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n dimmedOpacity={dimmedOpacity}\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":["removeHash","hex","parseHex","nakedHex","isShort","twoDigitHexR","twoDigitHexG","twoDigitHexB","twoDigitHexA","hexToDecimal","hexesToDecimals","_ref","r","g","b","a","isNumeric","n","formatRgb","decimalObject","parameterA","parsedA","hexToRgba","hashlessHex","hexObject","build","createLightFromConfig","config","light","type","THREE","AmbientLight","color","intensity","DirectionalLight","position","set","x","y","z","target","undefined","castShadow","shadow","mapSize","width","height","camera","near","far","PointLight","distance","decay","SpotLight","angle","Math","PI","penumbra","Error","Graph","props","autoRotate","data","enableZoom","categorical","colorDomain","colors","globeMaterial","polygonData","mapProperty","mapBorderColor","atmosphereColor","tooltip","styles","classNames","mapNoDataColor","colorLegendTitle","showColorScale","hoverStrokeColor","detailsOnClick","onSeriesMouseClick","onSeriesMouseOver","resetSelectionOnDoubleClick","highlightedIds","scale","globeOffset","polygonAltitude","centerLng","centerLat","atmosphereAltitude","globeCurvatureResolution","fogSettings","lights","highlightedAltitude","selectedId","collapseColorScaleByDefault","dimmedOpacity","locale","globeReady","setGlobeReady","useState","globeEl","useRef","mouseClickData","setMouseClickData","showLegend","setShowLegend","mousePos","setMousePos","mouseOverData","setMouseOverData","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","current","controls","autoRotateSpeed","selectedPolygon","find","d","properties","lng","lat","getCentroidCoordinates","pointOfView","altitude","canvas","renderer","domElement","handleMouseMove","e","clientX","clientY","addEventListener","removeEventListener","materials","MeshBasicMaterial","setupCustomLighting","useCallback","scene","lightsAndObjToRemove","traverse","obj","Light","push","children","forEach","parent","remove","map","i","add","fog","Fog","handleGlobeReady","jsxs","jsx","Globe","polygon","includes","id","opacity","val","el","clickedData","isEqual","hoverData","setTimeout","polygons","line","renderOrder","cn","colorLegend","Fragment","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","length","fill","stroke","textAnchor","numberFormattingFunction","ExpandIcon","Tooltip","DetailsModal","modal","ThreeDGlobe","$","_c","mapData","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","padding","t3","t4","t5","relativeHeight","graphID","t6","dataDownload","t7","language","t8","minHeight","t9","theme","t10","ariaLabel","t11","t12","centerPoint","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","t25","t26","Colors","graphNoData","grays","t27","t28","t29","t30","mapShape","setMapShape","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","t31","t32","Symbol","for","resizeObserver","ResizeObserver","entries","clientWidth","clientHeight","observe","disconnect","t33","shape","onUpdateShape","useEffectEvent","t34","fetchAndParseJSON","then","features","_temp","t35","t36","getUniqValue","getJenks","_temp2","t37","graphContainer","t38","t39","description","title","GraphHeader","_temp3","filter","_temp4","_temp5","_temp6","_temp7","t40","GraphArea","sequentialColors","max","Spinner","t41","footnote","source","GraphFooter","t42","GraphContainer","d_3","d_2","d_1","d_5","d_4","d_0","geometry","reversed","coordinates","reverse","coord","c","reversed_0","geometry_0"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAIA,IAAa,SAAoBC,GAAK;AACxC,WAAOA,EAAI,OAAO,CAAC,MAAM,MAAMA,EAAI,MAAM,CAAC,IAAIA;AAAA,EAChD,GAEIC,IAAW,SAAkBC,GAAU;AACzC,QAAIC,IAAUD,EAAS,WAAW,KAAKA,EAAS,WAAW,GACvDE,IAAeD,IAAU,GAAG,OAAOD,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAS,MAAM,GAAG,CAAC,GAC3GG,IAAeF,IAAU,GAAG,OAAOD,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,GAAG,CAAC,CA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AC9B,UAAAC,IAAiB,CAAA,GAAID,IAAI,EAACF,QAAAA;AAC1BC,IAAAA,EAAKpK,KAAM,CAACiK,CAAQ,CAAC;AAAA,EAAC,CACvB;AACD,QAAAM,IAAiB;AAAA,IAAA,GAAKpJ,EAAE6I;AAAAA,IAASE,aAAeE;AAAAA,EAAAA;AAAQ,SACjD;AAAA,IAAA,GAAKjJ;AAAAA,IAAE6I,UAAEA;AAAAA,EAAAA;AAAU;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index-CHPV5EwG-D4pAp7u0.cjs"),$=require("react"),Gt=require("./Typography-BqmyF1gP.cjs"),_t=require("./Tooltip-Hr46paWP.cjs"),te=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Nt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),_=require("./Colors.cjs"),ee=require("./DetailsModal-jmmKRMRM.cjs"),Rt=require("./proxy-CqH8m8IQ.cjs"),ne=require("./use-in-view-dnRv_qqF.cjs"),ie=require("./index-FXfr51ZM.cjs"),oe=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),re=require("./GraphFooter.cjs"),ae=require("./GraphHeader.cjs"),le=require("./ColorLegendWithMouseOver.cjs"),se=require("./EmptyState-CFmiFPHz.cjs"),Ht=require("./uniqBy-O05lp2S5.cjs"),Wt=require("./GraphContainer-Cul9b74X.cjs");function ue(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function ce(){return this.eachAfter(ue)}function de(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function he(e,t){for(var n=this,i=[n],r,l,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(l=r.length-1;l>=0;--l)i.push(r[l]);return this}function fe(e,t){for(var n=this,i=[n],r=[],l,a,d,g=-1;n=i.pop();)if(r.push(n),l=n.children)for(a=0,d=l.length;a<d;++a)i.push(l[a]);for(;n=r.pop();)e.call(t,n,++g,this);return this}function pe(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function ge(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function me(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function ve(e){for(var t=this,n=xe(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function xe(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function ye(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function we(){return Array.from(this)}function je(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Ce(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*be(){var e=this,t,n=[e],i,r,l;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,l=i.length;r<l;++r)n.push(i[r]);while(n.length)}function Yt(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Ee)):t===void 0&&(t=Me);for(var n=new jt(e),i,r=[n],l,a,d,g;i=r.pop();)if((a=t(i.data))&&(g=(a=Array.from(a)).length))for(i.children=a,d=g-1;d>=0;--d)r.push(l=a[d]=new jt(a[d])),l.parent=i,l.depth=i.depth+1;return n.eachBefore(Kt)}function Oe(){return Yt(this).eachBefore(Re)}function Me(e){return e.children}function Ee(e){return Array.isArray(e)?e[1]:null}function Re(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Kt(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function jt(e){this.data=e,this.depth=this.height=0,this.parent=null}jt.prototype=Yt.prototype={constructor:jt,count:ce,each:de,eachAfter:fe,eachBefore:he,find:pe,sum:ge,sort:me,path:ve,ancestors:ye,descendants:we,leaves:je,links:Ce,copy:Oe,[Symbol.iterator]:be};function $t(e){return e==null?null:Ut(e)}function Ut(e){if(typeof e!="function")throw new Error;return e}function yt(){return 0}function wt(e){return function(){return e}}function De(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Se(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(i-t)/e.value;++d<g;)a=l[d],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*x}var ke={depth:-1},Ft={},Tt={};function Be(e){return e.id}function qe(e){return e.parentId}function Ie(){var e=Be,t=qe,n;function i(r){var l=Array.from(r),a=e,d=t,g,x,u,v,o,h,c,m,f=new Map;if(n!=null){const p=l.map((b,j)=>Ve(n(b,j,r))),O=p.map(Xt),R=new Set(p).add("");for(const b of O)R.has(b)||(R.add(b),p.push(b),O.push(Xt(b)),l.push(Tt));a=(b,j)=>p[j],d=(b,j)=>O[j]}for(u=0,g=l.length;u<g;++u)x=l[u],h=l[u]=new jt(x),(c=a(x,u,r))!=null&&(c+="")&&(m=h.id=c,f.set(m,f.has(m)?Ft:h)),(c=d(x,u,r))!=null&&(c+="")&&(h.parent=c);for(u=0;u<g;++u)if(h=l[u],c=h.parent){if(o=f.get(c),!o)throw new Error("missing: "+c);if(o===Ft)throw new Error("ambiguous: "+c);o.children?o.children.push(h):o.children=[h],h.parent=o}else{if(v)throw new Error("multiple roots");v=h}if(!v)throw new Error("no root");if(n!=null){for(;v.data===Tt&&v.children.length===1;)v=v.children[0],--g;for(let p=l.length-1;p>=0&&(h=l[p],h.data===Tt);--p)h.data=null}if(v.parent=ke,v.eachBefore(function(p){p.depth=p.parent.depth+1,--g}).eachBefore(Kt),v.parent=null,g>0)throw new Error("cycle");return v}return i.id=function(r){return arguments.length?(e=$t(r),i):e},i.parentId=function(r){return arguments.length?(t=$t(r),i):t},i.path=function(r){return arguments.length?(n=$t(r),i):n},i}function Ve(e){e=`${e}`;let t=e.length;return Lt(e,t-1)&&!Lt(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Xt(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Lt(e,t););return e.slice(0,t)}function Lt(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if((n&1)===0)return!0}return!1}function Ne(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(r-n)/e.value;++d<g;)a=l[d],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*x}var $e=(1+Math.sqrt(5))/2;function Te(e,t,n,i,r,l){for(var a=[],d=t.children,g,x,u=0,v=0,o=d.length,h,c,m=t.value,f,p,O,R,b,j,M;u<o;){h=r-n,c=l-i;do f=d[v++].value;while(!f&&v<o);for(p=O=f,j=Math.max(c/h,h/c)/(m*e),M=f*f*j,b=Math.max(O/M,M/p);v<o;++v){if(f+=x=d[v].value,x<p&&(p=x),x>O&&(O=x),M=f*f*j,R=Math.max(O/M,M/p),R>b){f-=x;break}b=R}a.push(g={value:f,dice:h<c,children:d.slice(u,v)}),g.dice?Se(g,n,i,r,m?i+=c*f/m:l):Ne(g,n,i,m?n+=h*f/m:r,l),m-=f,u=v}return a}const Le=(function e(t){function n(i,r,l,a,d){Te(t,i,r,l,a,d)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n})($e);function Ae(){var e=Le,t=!1,n=1,i=1,r=[0],l=yt,a=yt,d=yt,g=yt,x=yt;function u(o){return o.x0=o.y0=0,o.x1=n,o.y1=i,o.eachBefore(v),r=[0],t&&o.eachBefore(De),o}function v(o){var h=r[o.depth],c=o.x0+h,m=o.y0+h,f=o.x1-h,p=o.y1-h;f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),o.x0=c,o.y0=m,o.x1=f,o.y1=p,o.children&&(h=r[o.depth+1]=l(o)/2,c+=x(o)-h,m+=a(o)-h,f-=d(o)-h,p-=g(o)-h,f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),e(o,c,m,f,p))}return u.round=function(o){return arguments.length?(t=!!o,u):t},u.size=function(o){return arguments.length?(n=+o[0],i=+o[1],u):[n,i]},u.tile=function(o){return arguments.length?(e=Ut(o),u):e},u.padding=function(o){return arguments.length?u.paddingInner(o).paddingOuter(o):u.paddingInner()},u.paddingInner=function(o){return arguments.length?(l=typeof o=="function"?o:wt(+o),u):l},u.paddingOuter=function(o){return arguments.length?u.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o):u.paddingTop()},u.paddingTop=function(o){return arguments.length?(a=typeof o=="function"?o:wt(+o),u):a},u.paddingRight=function(o){return arguments.length?(d=typeof o=="function"?o:wt(+o),u):d},u.paddingBottom=function(o){return arguments.length?(g=typeof o=="function"?o:wt(+o),u):g},u.paddingLeft=function(o){return arguments.length?(x=typeof o=="function"?o:wt(+o),u):x},u}function Pe(e){const t=y.compilerRuntimeExports.c(74),{data:n,colors:i,leftMargin:r,width:l,height:a,colorDomain:d,rightMargin:g,topMargin:x,bottomMargin:u,showLabels:v,tooltip:o,onSeriesMouseOver:h,selectedColor:c,showValues:m,suffix:f,prefix:p,highlightedDataPoints:O,onSeriesMouseClick:R,resetSelectionOnDoubleClick:b,detailsOnClick:j,language:M,styles:k,classNames:D,animate:E,dimmedOpacity:Z,precision:J,locale:tt}=e,vt=$.useRef(null);let et;t[0]!==E.amount||t[1]!==E.once?(et={once:E.once,amount:E.amount},t[0]=E.amount,t[1]=E.once,t[2]=et):et=t[2];const Q=ne.useInView(vt,et),[nt,lt]=$.useState(void 0),[T,it]=$.useState(void 0),[ot,rt]=$.useState(void 0),[C,w]=$.useState(void 0);let at;t[3]!==u||t[4]!==r||t[5]!==g||t[6]!==x?(at={top:x,bottom:u,left:r,right:g},t[3]=u,t[4]=r,t[5]=g,t[6]=x,t[7]=at):at=t[7];const S=at,st=l-S.left-S.right,ut=a-S.top-S.bottom;let L,A,P,z,G,H,W,F,X;if(t[8]!==E.duration||t[9]!==D?.graphObjectValues||t[10]!==d||t[11]!==i||t[12]!==n||t[13]!==j||t[14]!==Z||t[15]!==ut||t[16]!==st||t[17]!==a||t[18]!==O||t[19]!==Q||t[20]!==M||t[21]!==tt||t[22]!==S.left||t[23]!==S.top||t[24]!==T||t[25]!==R||t[26]!==h||t[27]!==J||t[28]!==p||t[29]!==b||t[30]!==c||t[31]!==v||t[32]!==m||t[33]!==k?.graphObjectValues||t[34]!==f||t[35]!==l){const xt=[{id:"root",parent:void 0,value:void 0,data:void 0},...n.map(Ue)],ct=Ie().id(Ke).parentId(Ye)(xt);ct.sum(Xe);const N=Ae().size([st,ut]).padding(2)(ct);A=Rt.motion.svg,G=`${l}px`,H=`${a}px`,W=`0 0 ${l} ${a}`,F="ltr",X=vt,z=`translate(${S.left},${S.top})`,L=ie.AnimatePresence,P=N.children?.map(s=>y.jsxRuntimeExports.jsxs(Rt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:s.x0,y:s.y0},whileInView:{opacity:c?s.data.data.color&&i[d.indexOf(s.data.data.color)]===c?1:Z:O.length!==0?O.indexOf(s.data.id)!==-1?.85:Z:.85,x:s.x0,y:s.y0,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:U=>{lt(s.data.data),w(U.clientY),rt(U.clientX),h?.(s.data.data)},onClick:()=>{(R||j)&&(T===s.data.id&&b?(it(void 0),R?.(void 0)):(it(s.data.id),R?.(s.data.data)))},onMouseMove:U=>{lt(s.data.data),w(U.clientY),rt(U.clientX)},onMouseLeave:()=>{lt(void 0),rt(void 0),w(void 0),h?.(void 0)},children:[y.jsxRuntimeExports.jsx(Rt.motion.rect,{x:0,y:0,exit:{width:0,height:0,opacity:0,transition:{duration:E.duration}},variants:{initial:{width:0,height:0,fill:n.filter(Fe).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:_.Colors.gray},whileInView:{width:s.x1-s.x0,height:s.y1-s.y0,fill:n.filter(We).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:_.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial"}),s.x1-s.x0>50&&s.y1-s.y0>25&&(v||m)?y.jsxRuntimeExports.jsx(Rt.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},children:y.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:s.x1-s.x0,height:s.y1-s.y0,children:y.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:Nt.getTextColorBasedOnBgColor(n.filter(He).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:_.Colors.gray)},children:[v?y.jsxRuntimeExports.jsx(Gt._,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full treemap-label",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{WebkitLineClamp:s.y1-s.y0>50?s.y1-s.y0>100?s.y1-s.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:Nt.getTextColorBasedOnBgColor(n.filter(Ge).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:_.Colors.gray),...k?.graphObjectValues||{}},children:s.data.id}):null,m?y.jsxRuntimeExports.jsx(Gt._,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full font-bold treemap-value",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{color:Nt.getTextColorBasedOnBgColor(n.filter(ze).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:_.Colors.gray),...k?.graphObjectValues||{}},children:te.numberFormattingFunction(s.data.value,void 0,J,p,f,tt)}):null]})})}):null]},s.data.id)),t[8]=E.duration,t[9]=D?.graphObjectValues,t[10]=d,t[11]=i,t[12]=n,t[13]=j,t[14]=Z,t[15]=ut,t[16]=st,t[17]=a,t[18]=O,t[19]=Q,t[20]=M,t[21]=tt,t[22]=S.left,t[23]=S.top,t[24]=T,t[25]=R,t[26]=h,t[27]=J,t[28]=p,t[29]=b,t[30]=c,t[31]=v,t[32]=m,t[33]=k?.graphObjectValues,t[34]=f,t[35]=l,t[36]=L,t[37]=A,t[38]=P,t[39]=z,t[40]=G,t[41]=H,t[42]=W,t[43]=F,t[44]=X}else L=t[36],A=t[37],P=t[38],z=t[39],G=t[40],H=t[41],W=t[42],F=t[43],X=t[44];let Y;t[45]!==L||t[46]!==P?(Y=y.jsxRuntimeExports.jsx(L,{children:P}),t[45]=L,t[46]=P,t[47]=Y):Y=t[47];let B;t[48]!==z||t[49]!==Y?(B=y.jsxRuntimeExports.jsx("g",{transform:z,children:Y}),t[48]=z,t[49]=Y,t[50]=B):B=t[50];let K;t[51]!==A||t[52]!==B||t[53]!==G||t[54]!==H||t[55]!==W||t[56]!==F||t[57]!==X?(K=y.jsxRuntimeExports.jsx(A,{width:G,height:H,viewBox:W,direction:F,ref:X,children:B}),t[51]=A,t[52]=B,t[53]=G,t[54]=H,t[55]=W,t[56]=F,t[57]=X,t[58]=K):K=t[58];let q;t[59]!==D?.tooltip||t[60]!==ot||t[61]!==C||t[62]!==nt||t[63]!==k?.tooltip||t[64]!==o?(q=nt&&o&&ot&&C?y.jsxRuntimeExports.jsx(_t.Tooltip,{data:nt,body:o,xPos:ot,yPos:C,backgroundStyle:k?.tooltip,className:D?.tooltip}):null,t[59]=D?.tooltip,t[60]=ot,t[61]=C,t[62]=nt,t[63]=k?.tooltip,t[64]=o,t[65]=q):q=t[65];let I;t[66]!==D?.modal||t[67]!==j||t[68]!==T?(I=j&&T!==void 0?y.jsxRuntimeExports.jsx(ee.DetailsModal,{body:j,data:T,setData:it,className:D?.modal}):null,t[66]=D?.modal,t[67]=j,t[68]=T,t[69]=I):I=t[69];let V;return t[70]!==K||t[71]!==q||t[72]!==I?(V=y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[K,q,I]}),t[70]=K,t[71]=q,t[72]=I,t[73]=V):V=t[73],V}function ze(e){return e.color}function Ge(e){return e.color}function He(e){return e.color}function We(e){return e.color}function Fe(e){return e.color}function Xe(e){return e.value}function Ye(e){return e.parent}function Ke(e){return e.id}function Ue(e){return{id:e.label,value:e.size,parent:"root",data:e}}function Ze(e){const t=y.compilerRuntimeExports.c(84),{data:n,graphTitle:i,colors:r,suffix:l,sources:a,prefix:d,graphDescription:g,leftMargin:x,rightMargin:u,topMargin:v,bottomMargin:o,height:h,width:c,footNote:m,colorDomain:f,colorLegendTitle:p,padding:O,backgroundColor:R,showLabels:b,relativeHeight:j,tooltip:M,onSeriesMouseOver:k,showColorScale:D,showValues:E,graphID:Z,highlightedDataPoints:J,onSeriesMouseClick:tt,graphDownload:vt,dataDownload:et,language:Q,showNAColor:nt,minHeight:lt,theme:T,ariaLabel:it,resetSelectionOnDoubleClick:ot,detailsOnClick:rt,styles:C,classNames:w,animate:at,dimmedOpacity:S,precision:st,locale:ut}=e,L=l===void 0?"":l,A=d===void 0?"":d,P=x===void 0?0:x,z=u===void 0?0:u,G=v===void 0?0:v,H=o===void 0?0:o,W=R===void 0?!1:R,F=b===void 0?!0:b,X=D===void 0?!0:D,Y=E===void 0?!0:E;let B;t[0]!==J?(B=J===void 0?[]:J,t[0]=J,t[1]=B):B=t[1];const K=B,q=vt===void 0?!1:vt,I=et===void 0?!1:et,V=Q===void 0?"en":Q,xt=nt===void 0?!0:nt,ct=lt===void 0?0:lt,N=T===void 0?"light":T,s=ot===void 0?!0:ot,U=at===void 0?!1:at,Dt=S===void 0?.3:S,St=st===void 0?2:st,kt=ut===void 0?"en":ut,[Ct,Zt]=$.useState(0),[bt,Jt]=$.useState(0),[Bt,Qt]=$.useState(void 0),qt=$.useRef(null),At=$.useRef(null);let Ot,Mt;t[2]===Symbol.for("react.memo_cache_sentinel")?(Ot=()=>{const Pt=new ResizeObserver(zt=>{Zt(zt[0].target.clientWidth||620),Jt(zt[0].target.clientHeight||480)});return qt.current&&Pt.observe(qt.current),()=>Pt.disconnect()},Mt=[],t[2]=Ot,t[3]=Mt):(Ot=t[2],Mt=t[3]),$.useEffect(Ot,Mt);const It=w?.graphContainer,Vt=C?.graphContainer;let dt;t[4]!==w?.description||t[5]!==w?.title||t[6]!==n||t[7]!==I||t[8]!==g||t[9]!==q||t[10]!==i||t[11]!==C?.description||t[12]!==C?.title||t[13]!==c?(dt=i||g||q||I?y.jsxRuntimeExports.jsx(ae.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:w?.title,description:w?.description},graphTitle:i,graphDescription:g,width:c,graphDownload:q?At:void 0,dataDownload:I?n.map(an).filter(rn).length>0?n.map(on).filter(nn):n.filter(en):null}):null,t[4]=w?.description,t[5]=w?.title,t[6]=n,t[7]=I,t[8]=g,t[9]=q,t[10]=i,t[11]=C?.description,t[12]=C?.title,t[13]=c,t[14]=dt):dt=t[14];let ht;t[15]!==w?.colorLegend||t[16]!==f||t[17]!==p||t[18]!==r||t[19]!==n||t[20]!==X||t[21]!==xt||t[22]!==N||t[23]!==c?(ht=X&&n.filter(tn).length!==0&&n.length>0?y.jsxRuntimeExports.jsx(le.ColorLegendWithMouseOver,{width:c,colorLegendTitle:p,colors:r||_.Colors[N].categoricalColors.colors,colorDomain:f||Ht.uniqBy(n,"color",!0),setSelectedColor:Qt,showNAColor:xt,className:w?.colorLegend}):null,t[15]=w?.colorLegend,t[16]=f,t[17]=p,t[18]=r,t[19]=n,t[20]=X,t[21]=xt,t[22]=N,t[23]=c,t[24]=ht):ht=t[24];let ft;t[25]!==n.length?(ft=n.length===0&&y.jsxRuntimeExports.jsx(se.EmptyState,{}),t[25]=n.length,t[26]=ft):ft=t[26];let pt;t[27]!==U||t[28]!==H||t[29]!==w||t[30]!==f||t[31]!==r||t[32]!==n||t[33]!==rt||t[34]!==Dt||t[35]!==K||t[36]!==V||t[37]!==P||t[38]!==kt||t[39]!==tt||t[40]!==k||t[41]!==St||t[42]!==A||t[43]!==s||t[44]!==z||t[45]!==Bt||t[46]!==F||t[47]!==Y||t[48]!==C||t[49]!==L||t[50]!==bt||t[51]!==Ct||t[52]!==N||t[53]!==M||t[54]!==G?(pt=Ct&&bt&&n.length>0?y.jsxRuntimeExports.jsx(Pe,{data:n.filter(_e),colors:n.filter(Qe).length===0?r?[r]:[_.Colors.primaryColors["blue-600"]]:r||_.Colors[N].categoricalColors.colors,colorDomain:n.filter(Je).length===0?[]:f||Ht.uniqBy(n,"color",!0),width:Ct,height:bt,leftMargin:P,rightMargin:z,topMargin:G,bottomMargin:H,showLabels:F,showValues:Y,suffix:L,prefix:A,selectedColor:Bt,tooltip:M,onSeriesMouseOver:k,onSeriesMouseClick:tt,highlightedDataPoints:K,resetSelectionOnDoubleClick:s,detailsOnClick:rt,styles:C,classNames:w,language:V,animate:U===!0?{duration:.5,once:!0,amount:.5}:U||{duration:0,once:!0,amount:0},dimmedOpacity:Dt,precision:St,locale:kt}):null,t[27]=U,t[28]=H,t[29]=w,t[30]=f,t[31]=r,t[32]=n,t[33]=rt,t[34]=Dt,t[35]=K,t[36]=V,t[37]=P,t[38]=kt,t[39]=tt,t[40]=k,t[41]=St,t[42]=A,t[43]=s,t[44]=z,t[45]=Bt,t[46]=F,t[47]=Y,t[48]=C,t[49]=L,t[50]=bt,t[51]=Ct,t[52]=N,t[53]=M,t[54]=G,t[55]=pt):pt=t[55];let gt;t[56]!==ft||t[57]!==pt?(gt=y.jsxRuntimeExports.jsxs(Wt.GraphArea,{ref:qt,children:[ft,pt]}),t[56]=ft,t[57]=pt,t[58]=gt):gt=t[58];let mt;t[59]!==w?.footnote||t[60]!==w?.source||t[61]!==m||t[62]!==a||t[63]!==C?.footnote||t[64]!==C?.source||t[65]!==c?(mt=a||m?y.jsxRuntimeExports.jsx(re.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:a,footNote:m,width:c}):null,t[59]=w?.footnote,t[60]=w?.source,t[61]=m,t[62]=a,t[63]=C?.footnote,t[64]=C?.source,t[65]=c,t[66]=mt):mt=t[66];let Et;return t[67]!==it||t[68]!==W||t[69]!==Z||t[70]!==h||t[71]!==V||t[72]!==ct||t[73]!==O||t[74]!==j||t[75]!==It||t[76]!==Vt||t[77]!==dt||t[78]!==ht||t[79]!==gt||t[80]!==mt||t[81]!==N||t[82]!==c?(Et=y.jsxRuntimeExports.jsxs(Wt.GraphContainer,{className:It,style:Vt,id:Z,ref:At,"aria-label":it,backgroundColor:W,theme:N,language:V,minHeight:ct,width:c,height:h,relativeHeight:j,padding:O,children:[dt,ht,gt,mt]}),t[67]=it,t[68]=W,t[69]=Z,t[70]=h,t[71]=V,t[72]=ct,t[73]=O,t[74]=j,t[75]=It,t[76]=Vt,t[77]=dt,t[78]=ht,t[79]=gt,t[80]=mt,t[81]=N,t[82]=c,t[83]=Et):Et=t[83],Et}function Je(e){return e.color}function Qe(e){return e.color}function _e(e){return!oe.checkIfNullOrUndefined(e.size)}function tn(e){return e.color}function en(e){return e!==void 0}function nn(e){return e!==void 0}function on(e){return e.data}function rn(e){return e!==void 0}function an(e){return e.data}exports.TreeMapGraph=Ze;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index-CHPV5EwG-D4pAp7u0.cjs"),N=require("react"),zt=require("./Typography-BqmyF1gP.cjs"),Jt=require("./Tooltip-Hr46paWP.cjs"),Qt=require("./numberFormattingFunction-Cn9R7CM9.cjs"),It=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),Q=require("./Colors.cjs"),_t=require("./DetailsModal-jmmKRMRM.cjs"),Rt=require("./proxy-CqH8m8IQ.cjs"),te=require("./use-in-view-dnRv_qqF.cjs"),ee=require("./index-FXfr51ZM.cjs"),ne=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./GraphFooter.cjs"),oe=require("./GraphHeader.cjs"),re=require("./ColorLegendWithMouseOver.cjs"),ae=require("./EmptyState-CFmiFPHz.cjs"),Gt=require("./uniqBy-O05lp2S5.cjs"),Ht=require("./GraphContainer-Cul9b74X.cjs");function le(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function se(){return this.eachAfter(le)}function ue(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function ce(e,t){for(var n=this,i=[n],r,l,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(l=r.length-1;l>=0;--l)i.push(r[l]);return this}function de(e,t){for(var n=this,i=[n],r=[],l,a,d,g=-1;n=i.pop();)if(r.push(n),l=n.children)for(a=0,d=l.length;a<d;++a)i.push(l[a]);for(;n=r.pop();)e.call(t,n,++g,this);return this}function he(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function fe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function pe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function ge(e){for(var t=this,n=me(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function me(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function ve(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function xe(){return Array.from(this)}function ye(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function we(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*je(){var e=this,t,n=[e],i,r,l;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,l=i.length;r<l;++r)n.push(i[r]);while(n.length)}function Ft(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Oe)):t===void 0&&(t=be);for(var n=new jt(e),i,r=[n],l,a,d,g;i=r.pop();)if((a=t(i.data))&&(g=(a=Array.from(a)).length))for(i.children=a,d=g-1;d>=0;--d)r.push(l=a[d]=new jt(a[d])),l.parent=i,l.depth=i.depth+1;return n.eachBefore(Xt)}function Ce(){return Ft(this).eachBefore(Me)}function be(e){return e.children}function Oe(e){return Array.isArray(e)?e[1]:null}function Me(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Xt(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function jt(e){this.data=e,this.depth=this.height=0,this.parent=null}jt.prototype=Ft.prototype={constructor:jt,count:se,each:ue,eachAfter:de,eachBefore:ce,find:he,sum:fe,sort:pe,path:ge,ancestors:ve,descendants:xe,leaves:ye,links:we,copy:Ce,[Symbol.iterator]:je};function Vt(e){return e==null?null:Yt(e)}function Yt(e){if(typeof e!="function")throw new Error;return e}function yt(){return 0}function wt(e){return function(){return e}}function Ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Re(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(i-t)/e.value;++d<g;)a=l[d],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*x}var De={depth:-1},Pt={},Nt={};function Se(e){return e.id}function ke(e){return e.parentId}function Be(){var e=Se,t=ke,n;function i(r){var l=Array.from(r),a=e,d=t,g,x,u,v,o,h,c,m,f=new Map;if(n!=null){const p=l.map((b,j)=>qe(n(b,j,r))),O=p.map(Wt),R=new Set(p).add("");for(const b of O)R.has(b)||(R.add(b),p.push(b),O.push(Wt(b)),l.push(Nt));a=(b,j)=>p[j],d=(b,j)=>O[j]}for(u=0,g=l.length;u<g;++u)x=l[u],h=l[u]=new jt(x),(c=a(x,u,r))!=null&&(c+="")&&(m=h.id=c,f.set(m,f.has(m)?Pt:h)),(c=d(x,u,r))!=null&&(c+="")&&(h.parent=c);for(u=0;u<g;++u)if(h=l[u],c=h.parent){if(o=f.get(c),!o)throw new Error("missing: "+c);if(o===Pt)throw new Error("ambiguous: "+c);o.children?o.children.push(h):o.children=[h],h.parent=o}else{if(v)throw new Error("multiple roots");v=h}if(!v)throw new Error("no root");if(n!=null){for(;v.data===Nt&&v.children.length===1;)v=v.children[0],--g;for(let p=l.length-1;p>=0&&(h=l[p],h.data===Nt);--p)h.data=null}if(v.parent=De,v.eachBefore(function(p){p.depth=p.parent.depth+1,--g}).eachBefore(Xt),v.parent=null,g>0)throw new Error("cycle");return v}return i.id=function(r){return arguments.length?(e=Vt(r),i):e},i.parentId=function(r){return arguments.length?(t=Vt(r),i):t},i.path=function(r){return arguments.length?(n=Vt(r),i):n},i}function qe(e){e=`${e}`;let t=e.length;return $t(e,t-1)&&!$t(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Wt(e){let t=e.length;if(t<2)return"";for(;--t>1&&!$t(e,t););return e.slice(0,t)}function $t(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if((n&1)===0)return!0}return!1}function Ie(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(r-n)/e.value;++d<g;)a=l[d],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*x}var Ve=(1+Math.sqrt(5))/2;function Ne(e,t,n,i,r,l){for(var a=[],d=t.children,g,x,u=0,v=0,o=d.length,h,c,m=t.value,f,p,O,R,b,j,M;u<o;){h=r-n,c=l-i;do f=d[v++].value;while(!f&&v<o);for(p=O=f,j=Math.max(c/h,h/c)/(m*e),M=f*f*j,b=Math.max(O/M,M/p);v<o;++v){if(f+=x=d[v].value,x<p&&(p=x),x>O&&(O=x),M=f*f*j,R=Math.max(O/M,M/p),R>b){f-=x;break}b=R}a.push(g={value:f,dice:h<c,children:d.slice(u,v)}),g.dice?Re(g,n,i,r,m?i+=c*f/m:l):Ie(g,n,i,m?n+=h*f/m:r,l),m-=f,u=v}return a}const $e=(function e(t){function n(i,r,l,a,d){Ne(t,i,r,l,a,d)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n})(Ve);function Te(){var e=$e,t=!1,n=1,i=1,r=[0],l=yt,a=yt,d=yt,g=yt,x=yt;function u(o){return o.x0=o.y0=0,o.x1=n,o.y1=i,o.eachBefore(v),r=[0],t&&o.eachBefore(Ee),o}function v(o){var h=r[o.depth],c=o.x0+h,m=o.y0+h,f=o.x1-h,p=o.y1-h;f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),o.x0=c,o.y0=m,o.x1=f,o.y1=p,o.children&&(h=r[o.depth+1]=l(o)/2,c+=x(o)-h,m+=a(o)-h,f-=d(o)-h,p-=g(o)-h,f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),e(o,c,m,f,p))}return u.round=function(o){return arguments.length?(t=!!o,u):t},u.size=function(o){return arguments.length?(n=+o[0],i=+o[1],u):[n,i]},u.tile=function(o){return arguments.length?(e=Yt(o),u):e},u.padding=function(o){return arguments.length?u.paddingInner(o).paddingOuter(o):u.paddingInner()},u.paddingInner=function(o){return arguments.length?(l=typeof o=="function"?o:wt(+o),u):l},u.paddingOuter=function(o){return arguments.length?u.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o):u.paddingTop()},u.paddingTop=function(o){return arguments.length?(a=typeof o=="function"?o:wt(+o),u):a},u.paddingRight=function(o){return arguments.length?(d=typeof o=="function"?o:wt(+o),u):d},u.paddingBottom=function(o){return arguments.length?(g=typeof o=="function"?o:wt(+o),u):g},u.paddingLeft=function(o){return arguments.length?(x=typeof o=="function"?o:wt(+o),u):x},u}function Le(e){const t=y.compilerRuntimeExports.c(74),{data:n,colors:i,leftMargin:r,width:l,height:a,colorDomain:d,rightMargin:g,topMargin:x,bottomMargin:u,showLabels:v,tooltip:o,onSeriesMouseOver:h,selectedColor:c,showValues:m,suffix:f,prefix:p,highlightedDataPoints:O,onSeriesMouseClick:R,resetSelectionOnDoubleClick:b,detailsOnClick:j,language:M,styles:B,classNames:D,animate:E,dimmedOpacity:K,precision:_,locale:tt}=e,xt=N.useRef(null);let et;t[0]!==E.amount||t[1]!==E.once?(et={once:E.once,amount:E.amount},t[0]=E.amount,t[1]=E.once,t[2]=et):et=t[2];const Z=te.useInView(xt,et),[nt,lt]=N.useState(void 0),[$,it]=N.useState(void 0),[ot,rt]=N.useState(void 0),[C,w]=N.useState(void 0);let at;t[3]!==u||t[4]!==r||t[5]!==g||t[6]!==x?(at={top:x,bottom:u,left:r,right:g},t[3]=u,t[4]=r,t[5]=g,t[6]=x,t[7]=at):at=t[7];const S=at,st=l-S.left-S.right,ut=a-S.top-S.bottom;let T,L,A,z,G,H,P,W,F;if(t[8]!==E.duration||t[9]!==D?.graphObjectValues||t[10]!==d||t[11]!==i||t[12]!==n||t[13]!==j||t[14]!==K||t[15]!==ut||t[16]!==st||t[17]!==a||t[18]!==O||t[19]!==Z||t[20]!==M||t[21]!==tt||t[22]!==S.left||t[23]!==S.top||t[24]!==$||t[25]!==R||t[26]!==h||t[27]!==_||t[28]!==p||t[29]!==b||t[30]!==c||t[31]!==v||t[32]!==m||t[33]!==B?.graphObjectValues||t[34]!==f||t[35]!==l){const V=[{id:"root",parent:void 0,value:void 0,data:void 0},...n.map(Ye)],ct=Be().id(Xe).parentId(Fe)(V);ct.sum(We);const dt=Te().size([st,ut]).padding(2)(ct);L=Rt.motion.svg,G=`${l}px`,H=`${a}px`,P=`0 0 ${l} ${a}`,W="ltr",F=xt,z=`translate(${S.left},${S.top})`,T=ee.AnimatePresence,A=dt.children?.map(s=>y.jsxRuntimeExports.jsxs(Rt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:s.x0,y:s.y0},whileInView:{opacity:c?s.data.data.color&&i[d.indexOf(s.data.data.color)]===c?1:K:O?O.indexOf(s.data.id)!==-1?.85:K:.85,x:s.x0,y:s.y0,transition:{duration:E.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:U=>{lt(s.data.data),w(U.clientY),rt(U.clientX),h?.(s.data.data)},onClick:()=>{(R||j)&&($===s.data.id&&b?(it(void 0),R?.(void 0)):(it(s.data.id),R?.(s.data.data)))},onMouseMove:U=>{lt(s.data.data),w(U.clientY),rt(U.clientX)},onMouseLeave:()=>{lt(void 0),rt(void 0),w(void 0),h?.(void 0)},children:[y.jsxRuntimeExports.jsx(Rt.motion.rect,{x:0,y:0,exit:{width:0,height:0,opacity:0,transition:{duration:E.duration}},variants:{initial:{width:0,height:0,fill:n.filter(Pe).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:Q.Colors.gray},whileInView:{width:s.x1-s.x0,height:s.y1-s.y0,fill:n.filter(He).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:Q.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:Z?"whileInView":"initial"}),s.x1-s.x0>50&&s.y1-s.y0>25&&(v||m)?y.jsxRuntimeExports.jsx(Rt.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:Z?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},children:y.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:s.x1-s.x0,height:s.y1-s.y0,children:y.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:It.getTextColorBasedOnBgColor(n.filter(Ge).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:Q.Colors.gray)},children:[v?y.jsxRuntimeExports.jsx(zt._,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full treemap-label",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{WebkitLineClamp:s.y1-s.y0>50?s.y1-s.y0>100?s.y1-s.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:It.getTextColorBasedOnBgColor(n.filter(ze).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:Q.Colors.gray),...B?.graphObjectValues||{}},children:s.data.id}):null,m?y.jsxRuntimeExports.jsx(zt._,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full font-bold treemap-value",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{color:It.getTextColorBasedOnBgColor(n.filter(Ae).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:Q.Colors.gray),...B?.graphObjectValues||{}},children:Qt.numberFormattingFunction(s.data.value,void 0,_,p,f,tt)}):null]})})}):null]},s.data.id)),t[8]=E.duration,t[9]=D?.graphObjectValues,t[10]=d,t[11]=i,t[12]=n,t[13]=j,t[14]=K,t[15]=ut,t[16]=st,t[17]=a,t[18]=O,t[19]=Z,t[20]=M,t[21]=tt,t[22]=S.left,t[23]=S.top,t[24]=$,t[25]=R,t[26]=h,t[27]=_,t[28]=p,t[29]=b,t[30]=c,t[31]=v,t[32]=m,t[33]=B?.graphObjectValues,t[34]=f,t[35]=l,t[36]=T,t[37]=L,t[38]=A,t[39]=z,t[40]=G,t[41]=H,t[42]=P,t[43]=W,t[44]=F}else T=t[36],L=t[37],A=t[38],z=t[39],G=t[40],H=t[41],P=t[42],W=t[43],F=t[44];let X;t[45]!==T||t[46]!==A?(X=y.jsxRuntimeExports.jsx(T,{children:A}),t[45]=T,t[46]=A,t[47]=X):X=t[47];let q;t[48]!==z||t[49]!==X?(q=y.jsxRuntimeExports.jsx("g",{transform:z,children:X}),t[48]=z,t[49]=X,t[50]=q):q=t[50];let I;t[51]!==L||t[52]!==q||t[53]!==G||t[54]!==H||t[55]!==P||t[56]!==W||t[57]!==F?(I=y.jsxRuntimeExports.jsx(L,{width:G,height:H,viewBox:P,direction:W,ref:F,children:q}),t[51]=L,t[52]=q,t[53]=G,t[54]=H,t[55]=P,t[56]=W,t[57]=F,t[58]=I):I=t[58];let k;t[59]!==D?.tooltip||t[60]!==ot||t[61]!==C||t[62]!==nt||t[63]!==B?.tooltip||t[64]!==o?(k=nt&&o&&ot&&C?y.jsxRuntimeExports.jsx(Jt.Tooltip,{data:nt,body:o,xPos:ot,yPos:C,backgroundStyle:B?.tooltip,className:D?.tooltip}):null,t[59]=D?.tooltip,t[60]=ot,t[61]=C,t[62]=nt,t[63]=B?.tooltip,t[64]=o,t[65]=k):k=t[65];let Y;t[66]!==D?.modal||t[67]!==j||t[68]!==$?(Y=j&&$!==void 0?y.jsxRuntimeExports.jsx(_t.DetailsModal,{body:j,data:$,setData:it,className:D?.modal}):null,t[66]=D?.modal,t[67]=j,t[68]=$,t[69]=Y):Y=t[69];let J;return t[70]!==I||t[71]!==k||t[72]!==Y?(J=y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[I,k,Y]}),t[70]=I,t[71]=k,t[72]=Y,t[73]=J):J=t[73],J}function Ae(e){return e.color}function ze(e){return e.color}function Ge(e){return e.color}function He(e){return e.color}function Pe(e){return e.color}function We(e){return e.value}function Fe(e){return e.parent}function Xe(e){return e.id}function Ye(e){return{id:e.label,value:e.size,parent:"root",data:e}}function Ke(e){const t=y.compilerRuntimeExports.c(82),{data:n,graphTitle:i,colors:r,suffix:l,sources:a,prefix:d,graphDescription:g,leftMargin:x,rightMargin:u,topMargin:v,bottomMargin:o,height:h,width:c,footNote:m,colorDomain:f,colorLegendTitle:p,padding:O,backgroundColor:R,showLabels:b,relativeHeight:j,tooltip:M,onSeriesMouseOver:B,showColorScale:D,showValues:E,graphID:K,highlightedDataPoints:_,onSeriesMouseClick:tt,graphDownload:xt,dataDownload:et,language:Z,showNAColor:nt,minHeight:lt,theme:$,ariaLabel:it,resetSelectionOnDoubleClick:ot,detailsOnClick:rt,styles:C,classNames:w,animate:at,dimmedOpacity:S,precision:st,locale:ut}=e,T=l===void 0?"":l,L=d===void 0?"":d,A=x===void 0?0:x,z=u===void 0?0:u,G=v===void 0?0:v,H=o===void 0?0:o,P=R===void 0?!1:R,W=b===void 0?!0:b,F=D===void 0?!0:D,X=E===void 0?!0:E,q=xt===void 0?!1:xt,I=et===void 0?!1:et,k=Z===void 0?"en":Z,Y=nt===void 0?!0:nt,J=lt===void 0?0:lt,V=$===void 0?"light":$,ct=ot===void 0?!0:ot,dt=at===void 0?!1:at,s=S===void 0?.3:S,U=st===void 0?2:st,Dt=ut===void 0?"en":ut,[Ct,Kt]=N.useState(0),[bt,Ut]=N.useState(0),[St,Zt]=N.useState(void 0),kt=N.useRef(null),Tt=N.useRef(null);let Ot,Mt;t[0]===Symbol.for("react.memo_cache_sentinel")?(Ot=()=>{const Lt=new ResizeObserver(At=>{Kt(At[0].target.clientWidth||620),Ut(At[0].target.clientHeight||480)});return kt.current&&Lt.observe(kt.current),()=>Lt.disconnect()},Mt=[],t[0]=Ot,t[1]=Mt):(Ot=t[0],Mt=t[1]),N.useEffect(Ot,Mt);const Bt=w?.graphContainer,qt=C?.graphContainer;let ht;t[2]!==w?.description||t[3]!==w?.title||t[4]!==n||t[5]!==I||t[6]!==g||t[7]!==q||t[8]!==i||t[9]!==C?.description||t[10]!==C?.title||t[11]!==c?(ht=i||g||q||I?y.jsxRuntimeExports.jsx(oe.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:w?.title,description:w?.description},graphTitle:i,graphDescription:g,width:c,graphDownload:q?Tt:void 0,dataDownload:I?n.map(on).filter(nn).length>0?n.map(en).filter(tn):n.filter(_e):null}):null,t[2]=w?.description,t[3]=w?.title,t[4]=n,t[5]=I,t[6]=g,t[7]=q,t[8]=i,t[9]=C?.description,t[10]=C?.title,t[11]=c,t[12]=ht):ht=t[12];let ft;t[13]!==w?.colorLegend||t[14]!==f||t[15]!==p||t[16]!==r||t[17]!==n||t[18]!==F||t[19]!==Y||t[20]!==V||t[21]!==c?(ft=F&&n.filter(Qe).length!==0&&n.length>0?y.jsxRuntimeExports.jsx(re.ColorLegendWithMouseOver,{width:c,colorLegendTitle:p,colors:r||Q.Colors[V].categoricalColors.colors,colorDomain:f||Gt.uniqBy(n,"color",!0),setSelectedColor:Zt,showNAColor:Y,className:w?.colorLegend}):null,t[13]=w?.colorLegend,t[14]=f,t[15]=p,t[16]=r,t[17]=n,t[18]=F,t[19]=Y,t[20]=V,t[21]=c,t[22]=ft):ft=t[22];let pt;t[23]!==n.length?(pt=n.length===0&&y.jsxRuntimeExports.jsx(ae.EmptyState,{}),t[23]=n.length,t[24]=pt):pt=t[24];let gt;t[25]!==dt||t[26]!==H||t[27]!==w||t[28]!==f||t[29]!==r||t[30]!==n||t[31]!==rt||t[32]!==s||t[33]!==_||t[34]!==k||t[35]!==A||t[36]!==Dt||t[37]!==tt||t[38]!==B||t[39]!==U||t[40]!==L||t[41]!==ct||t[42]!==z||t[43]!==St||t[44]!==W||t[45]!==X||t[46]!==C||t[47]!==T||t[48]!==bt||t[49]!==Ct||t[50]!==V||t[51]!==M||t[52]!==G?(gt=Ct&&bt&&n.length>0?y.jsxRuntimeExports.jsx(Le,{data:n.filter(Je),colors:n.filter(Ze).length===0?r?[r]:[Q.Colors.primaryColors["blue-600"]]:r||Q.Colors[V].categoricalColors.colors,colorDomain:n.filter(Ue).length===0?[]:f||Gt.uniqBy(n,"color",!0),width:Ct,height:bt,leftMargin:A,rightMargin:z,topMargin:G,bottomMargin:H,showLabels:W,showValues:X,suffix:T,prefix:L,selectedColor:St,tooltip:M,onSeriesMouseOver:B,onSeriesMouseClick:tt,highlightedDataPoints:_,resetSelectionOnDoubleClick:ct,detailsOnClick:rt,styles:C,classNames:w,language:k,animate:dt===!0?{duration:.5,once:!0,amount:.5}:dt||{duration:0,once:!0,amount:0},dimmedOpacity:s,precision:U,locale:Dt}):null,t[25]=dt,t[26]=H,t[27]=w,t[28]=f,t[29]=r,t[30]=n,t[31]=rt,t[32]=s,t[33]=_,t[34]=k,t[35]=A,t[36]=Dt,t[37]=tt,t[38]=B,t[39]=U,t[40]=L,t[41]=ct,t[42]=z,t[43]=St,t[44]=W,t[45]=X,t[46]=C,t[47]=T,t[48]=bt,t[49]=Ct,t[50]=V,t[51]=M,t[52]=G,t[53]=gt):gt=t[53];let mt;t[54]!==pt||t[55]!==gt?(mt=y.jsxRuntimeExports.jsxs(Ht.GraphArea,{ref:kt,children:[pt,gt]}),t[54]=pt,t[55]=gt,t[56]=mt):mt=t[56];let vt;t[57]!==w?.footnote||t[58]!==w?.source||t[59]!==m||t[60]!==a||t[61]!==C?.footnote||t[62]!==C?.source||t[63]!==c?(vt=a||m?y.jsxRuntimeExports.jsx(ie.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:a,footNote:m,width:c}):null,t[57]=w?.footnote,t[58]=w?.source,t[59]=m,t[60]=a,t[61]=C?.footnote,t[62]=C?.source,t[63]=c,t[64]=vt):vt=t[64];let Et;return t[65]!==it||t[66]!==P||t[67]!==K||t[68]!==h||t[69]!==k||t[70]!==J||t[71]!==O||t[72]!==j||t[73]!==Bt||t[74]!==qt||t[75]!==ht||t[76]!==ft||t[77]!==mt||t[78]!==vt||t[79]!==V||t[80]!==c?(Et=y.jsxRuntimeExports.jsxs(Ht.GraphContainer,{className:Bt,style:qt,id:K,ref:Tt,"aria-label":it,backgroundColor:P,theme:V,language:k,minHeight:J,width:c,height:h,relativeHeight:j,padding:O,children:[ht,ft,mt,vt]}),t[65]=it,t[66]=P,t[67]=K,t[68]=h,t[69]=k,t[70]=J,t[71]=O,t[72]=j,t[73]=Bt,t[74]=qt,t[75]=ht,t[76]=ft,t[77]=mt,t[78]=vt,t[79]=V,t[80]=c,t[81]=Et):Et=t[81],Et}function Ue(e){return e.color}function Ze(e){return e.color}function Je(e){return!ne.checkIfNullOrUndefined(e.size)}function Qe(e){return e.color}function _e(e){return e!==void 0}function tn(e){return e!==void 0}function en(e){return e.data}function nn(e){return e!==void 0}function on(e){return e.data}exports.TreeMapGraph=Ke;
2
2
  //# sourceMappingURL=TreeMapGraph.cjs.map