@undp/data-viz 1.4.15 → 1.5.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 (232) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +4 -4
  3. package/dist/BarGraph.cjs +1 -1
  4. package/dist/BarGraph.js +8 -8
  5. package/dist/BeeSwarmChart.cjs +1 -1
  6. package/dist/BeeSwarmChart.js +5 -5
  7. package/dist/BiVariateChoroplethMap.cjs +1 -1
  8. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  9. package/dist/BiVariateChoroplethMap.js +35 -34
  10. package/dist/BiVariateChoroplethMap.js.map +1 -1
  11. package/dist/BulletChart.cjs +1 -1
  12. package/dist/BulletChart.js +5 -5
  13. package/dist/ButterflyChart.cjs +1 -1
  14. package/dist/ButterflyChart.js +5 -5
  15. package/dist/ChoroplethMap.cjs +1 -1
  16. package/dist/ChoroplethMap.cjs.map +1 -1
  17. package/dist/ChoroplethMap.js +52 -51
  18. package/dist/ChoroplethMap.js.map +1 -1
  19. package/dist/CirclePackingGraph.cjs +1 -1
  20. package/dist/CirclePackingGraph.js +3 -3
  21. package/dist/DataCards.cjs +1 -1
  22. package/dist/DataCards.js +5 -5
  23. package/dist/DataTable.cjs +1 -1
  24. package/dist/DataTable.js +3 -3
  25. package/dist/DifferenceLineChart.cjs +1 -1
  26. package/dist/DifferenceLineChart.js +3 -3
  27. package/dist/DonutChart.cjs +1 -1
  28. package/dist/DonutChart.js +4 -4
  29. package/dist/DotDensityMap.cjs +1 -1
  30. package/dist/DotDensityMap.cjs.map +1 -1
  31. package/dist/DotDensityMap.js +39 -38
  32. package/dist/DotDensityMap.js.map +1 -1
  33. package/dist/DualAxisLineChart.cjs +1 -1
  34. package/dist/DualAxisLineChart.js +3 -3
  35. package/dist/DumbbellChart.cjs +1 -1
  36. package/dist/DumbbellChart.js +6 -6
  37. package/dist/GeoHubCompareMaps.cjs +1 -1
  38. package/dist/GeoHubCompareMaps.js +1 -1
  39. package/dist/GeoHubMap.cjs +1 -1
  40. package/dist/GeoHubMap.js +3 -3
  41. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  42. package/dist/GeoHubMapWithLayerSelection.js +4 -4
  43. package/dist/{GraphEl-Bz2jatkM.cjs → GraphEl-4RUlclvW.cjs} +2 -2
  44. package/dist/{GraphEl-Bz2jatkM.cjs.map → GraphEl-4RUlclvW.cjs.map} +1 -1
  45. package/dist/{GraphEl-zNOHBYrK.js → GraphEl-ClIxlWa3.js} +2 -2
  46. package/dist/{GraphEl-zNOHBYrK.js.map → GraphEl-ClIxlWa3.js.map} +1 -1
  47. package/dist/GriddedGraphs.cjs +1 -1
  48. package/dist/GriddedGraphs.d.ts +58 -1
  49. package/dist/GriddedGraphs.js +7 -7
  50. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  51. package/dist/GriddedGraphsFromConfig.d.ts +58 -1
  52. package/dist/GriddedGraphsFromConfig.js +1 -1
  53. package/dist/HeatMap.cjs +1 -1
  54. package/dist/HeatMap.js +4 -4
  55. package/dist/Histogram.cjs +1 -1
  56. package/dist/Histogram.js +1 -1
  57. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  58. package/dist/LineChartWithConfidenceInterval.js +3 -3
  59. package/dist/MultiGraphDashboard.cjs +1 -1
  60. package/dist/MultiGraphDashboard.d.ts +58 -1
  61. package/dist/MultiGraphDashboard.js +5 -5
  62. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  63. package/dist/MultiGraphDashboardFromConfig.d.ts +58 -1
  64. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  65. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  66. package/dist/MultiGraphDashboardWideToLongFormat.js +2 -2
  67. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  68. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  69. package/dist/MultiLineAltChart.cjs +1 -1
  70. package/dist/MultiLineAltChart.js +4 -4
  71. package/dist/MultiLineChart.cjs +1 -1
  72. package/dist/MultiLineChart.js +3 -3
  73. package/dist/ParetoChart.cjs +1 -1
  74. package/dist/ParetoChart.js +3 -3
  75. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  76. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +58 -1
  77. package/dist/PerformanceIntensiveMultiGraphDashboard.js +5 -5
  78. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  79. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +58 -1
  80. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  81. package/dist/PerformanceIntensiveScrollStory.d.ts +58 -1
  82. package/dist/RadarChart.cjs +1 -1
  83. package/dist/RadarChart.js +4 -4
  84. package/dist/SankeyChart.cjs +1 -1
  85. package/dist/SankeyChart.js +6 -6
  86. package/dist/ScatterPlot.cjs +1 -1
  87. package/dist/ScatterPlot.cjs.map +1 -1
  88. package/dist/ScatterPlot.js +31 -29
  89. package/dist/ScatterPlot.js.map +1 -1
  90. package/dist/ScrollStory.d.ts +58 -1
  91. package/dist/SimpleLineChart.cjs +1 -1
  92. package/dist/SimpleLineChart.js +3 -3
  93. package/dist/SingleGraphDashboard.cjs +1 -1
  94. package/dist/SingleGraphDashboard.d.ts +58 -1
  95. package/dist/SingleGraphDashboard.js +8 -8
  96. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  97. package/dist/SingleGraphDashboardFromConfig.d.ts +58 -1
  98. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  99. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +58 -1
  100. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  101. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +58 -1
  102. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  103. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  104. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  105. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +58 -1
  106. package/dist/SingleGraphDashboardThreeDGraphs.js +20 -19
  107. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  108. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  109. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +58 -1
  110. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  111. package/dist/SlopeChart.cjs +1 -1
  112. package/dist/SlopeChart.js +4 -4
  113. package/dist/SparkLine.cjs +1 -1
  114. package/dist/SparkLine.js +2 -2
  115. package/dist/StatCardFromData.cjs +1 -1
  116. package/dist/StatCardFromData.js +1 -1
  117. package/dist/StripChart.cjs +1 -1
  118. package/dist/StripChart.js +5 -5
  119. package/dist/ThreeDGlobe.cjs +1 -1
  120. package/dist/ThreeDGlobe.cjs.map +1 -1
  121. package/dist/ThreeDGlobe.d.ts +61 -6
  122. package/dist/ThreeDGlobe.js +385 -314
  123. package/dist/ThreeDGlobe.js.map +1 -1
  124. package/dist/{Tooltip-DyM5snqx.js → Tooltip-CVCGWyzw.js} +2 -2
  125. package/dist/{Tooltip-DyM5snqx.js.map → Tooltip-CVCGWyzw.js.map} +1 -1
  126. package/dist/{Tooltip-n8z5bfav.cjs → Tooltip-De16GWhY.cjs} +2 -2
  127. package/dist/{Tooltip-n8z5bfav.cjs.map → Tooltip-De16GWhY.cjs.map} +1 -1
  128. package/dist/TreeMapGraph.cjs +1 -1
  129. package/dist/TreeMapGraph.js +3 -3
  130. package/dist/Types.d.ts +58 -1
  131. package/dist/UnitChart.cjs +1 -1
  132. package/dist/UnitChart.js +1 -1
  133. package/dist/_commonjsHelpers-BH3jXuIh.cjs +2 -0
  134. package/dist/_commonjsHelpers-BH3jXuIh.cjs.map +1 -0
  135. package/dist/_commonjsHelpers-ByX85dGu.js +34 -0
  136. package/dist/_commonjsHelpers-ByX85dGu.js.map +1 -0
  137. package/dist/{ensureCompleteData-BBDZbDCE.js → ensureCompleteData-BALdOrsS.js} +2 -2
  138. package/dist/{ensureCompleteData-BBDZbDCE.js.map → ensureCompleteData-BALdOrsS.js.map} +1 -1
  139. package/dist/{ensureCompleteData-DqWQ2Zbi.cjs → ensureCompleteData-BU5Zlccy.cjs} +2 -2
  140. package/dist/{ensureCompleteData-DqWQ2Zbi.cjs.map → ensureCompleteData-BU5Zlccy.cjs.map} +1 -1
  141. package/dist/{fetchAndParseData-4gsYTy6_.js → fetchAndParseData-DBOl1Icl.js} +2 -2
  142. package/dist/{fetchAndParseData-4gsYTy6_.js.map → fetchAndParseData-DBOl1Icl.js.map} +1 -1
  143. package/dist/{fetchAndParseData-CQyVGCul.cjs → fetchAndParseData-Dcy7AS_0.cjs} +2 -2
  144. package/dist/{fetchAndParseData-CQyVGCul.cjs.map → fetchAndParseData-Dcy7AS_0.cjs.map} +1 -1
  145. package/dist/fetchAndParseData.cjs +1 -1
  146. package/dist/fetchAndParseData.js +1 -1
  147. package/dist/{filterData-B8ocT57s.js → filterData-9nEcQ-Jp.js} +3 -3
  148. package/dist/{filterData-B8ocT57s.js.map → filterData-9nEcQ-Jp.js.map} +1 -1
  149. package/dist/{filterData-DN6py7y_.cjs → filterData-BoYadk0l.cjs} +2 -2
  150. package/dist/{filterData-DN6py7y_.cjs.map → filterData-BoYadk0l.cjs.map} +1 -1
  151. package/dist/{getJenks-VhM3GIoC.js → getJenks-DW96UYNE.js} +2 -2
  152. package/dist/{getJenks-VhM3GIoC.js.map → getJenks-DW96UYNE.js.map} +1 -1
  153. package/dist/{getJenks-TWQvbuOz.cjs → getJenks-vofIZmeb.cjs} +2 -2
  154. package/dist/{getJenks-TWQvbuOz.cjs.map → getJenks-vofIZmeb.cjs.map} +1 -1
  155. package/dist/{getUniqValue-CHqgSss5.cjs → getUniqValue-CfuE_l9c.cjs} +2 -2
  156. package/dist/{getUniqValue-CHqgSss5.cjs.map → getUniqValue-CfuE_l9c.cjs.map} +1 -1
  157. package/dist/{getUniqValue-BtUENB2H.js → getUniqValue-CttuU_wn.js} +4 -4
  158. package/dist/{getUniqValue-BtUENB2H.js.map → getUniqValue-CttuU_wn.js.map} +1 -1
  159. package/dist/{index-CaAIPGZo.js → index-AqnpA7_O.js} +2 -2
  160. package/dist/{index-CaAIPGZo.js.map → index-AqnpA7_O.js.map} +1 -1
  161. package/dist/{index-CZbIGs8q.cjs → index-BJOeaYTk.cjs} +2 -2
  162. package/dist/{index-CZbIGs8q.cjs.map → index-BJOeaYTk.cjs.map} +1 -1
  163. package/dist/{index-Bc5VF70V.js → index-BMgDMxKJ.js} +6 -6
  164. package/dist/{index-Bc5VF70V.js.map → index-BMgDMxKJ.js.map} +1 -1
  165. package/dist/{index-B0rbzOoC.cjs → index-BS2TADPj.cjs} +2 -2
  166. package/dist/{index-B0rbzOoC.cjs.map → index-BS2TADPj.cjs.map} +1 -1
  167. package/dist/{index-DNj994Pv.cjs → index-BYzIB5V6.cjs} +2 -2
  168. package/dist/index-BYzIB5V6.cjs.map +1 -0
  169. package/dist/{index-27yTRcko.js → index-Bwrro8-q.js} +2 -2
  170. package/dist/{index-27yTRcko.js.map → index-Bwrro8-q.js.map} +1 -1
  171. package/dist/{index-BczVvEBZ.cjs → index-CQ3e6Ewi.cjs} +2 -2
  172. package/dist/{index-BczVvEBZ.cjs.map → index-CQ3e6Ewi.cjs.map} +1 -1
  173. package/dist/{index-C21TvELx.cjs → index-CSNtgibC.cjs} +2 -2
  174. package/dist/{index-C21TvELx.cjs.map → index-CSNtgibC.cjs.map} +1 -1
  175. package/dist/{index-D7ltPi18.js → index-CeVNqhMO.js} +2 -2
  176. package/dist/{index-D7ltPi18.js.map → index-CeVNqhMO.js.map} +1 -1
  177. package/dist/index-D05lK1Te.cjs +2 -0
  178. package/dist/index-D05lK1Te.cjs.map +1 -0
  179. package/dist/{index-Ds0uHjK9.cjs → index-D72cOtq7.cjs} +2 -2
  180. package/dist/{index-Ds0uHjK9.cjs.map → index-D72cOtq7.cjs.map} +1 -1
  181. package/dist/{index-Cdcfp4nk.js → index-DKCxu1Gh.js} +2 -2
  182. package/dist/index-DKCxu1Gh.js.map +1 -0
  183. package/dist/{index-BXns0-ng.cjs → index-DQA8q5sC.cjs} +2 -2
  184. package/dist/{index-BXns0-ng.cjs.map → index-DQA8q5sC.cjs.map} +1 -1
  185. package/dist/{index-BzeLQvXk.cjs → index-DYH8g9WA.cjs} +2 -2
  186. package/dist/{index-BzeLQvXk.cjs.map → index-DYH8g9WA.cjs.map} +1 -1
  187. package/dist/{index-BbNoLJ_w.cjs → index-Da2GUKrr.cjs} +2 -2
  188. package/dist/{index-BbNoLJ_w.cjs.map → index-Da2GUKrr.cjs.map} +1 -1
  189. package/dist/{index-BLizQDlg.js → index-DvVprvy6.js} +2 -2
  190. package/dist/{index-BLizQDlg.js.map → index-DvVprvy6.js.map} +1 -1
  191. package/dist/{index-UV9hjG_S.js → index-EArKRVKg.js} +2 -2
  192. package/dist/{index-UV9hjG_S.js.map → index-EArKRVKg.js.map} +1 -1
  193. package/dist/{index-C1rRk_50.js → index-V_JXij1_.js} +2 -2
  194. package/dist/{index-C1rRk_50.js.map → index-V_JXij1_.js.map} +1 -1
  195. package/dist/{index-DxagiOHo.js → index-fwdktvAS.js} +2 -2
  196. package/dist/{index-DxagiOHo.js.map → index-fwdktvAS.js.map} +1 -1
  197. package/dist/index-qfWCwobm.js +682 -0
  198. package/dist/index-qfWCwobm.js.map +1 -0
  199. package/dist/index.cjs +1 -1
  200. package/dist/index.d.ts +63 -7
  201. package/dist/index.js +6 -6
  202. package/dist/{string2HTML-CWHGfz_d.js → string2HTML-oFCROsus.js} +2 -2
  203. package/dist/{string2HTML-CWHGfz_d.js.map → string2HTML-oFCROsus.js.map} +1 -1
  204. package/dist/{string2HTML-D2Avudmb.cjs → string2HTML-z7CwHXcx.cjs} +2 -2
  205. package/dist/{string2HTML-D2Avudmb.cjs.map → string2HTML-z7CwHXcx.cjs.map} +1 -1
  206. package/dist/transformData.cjs +1 -1
  207. package/dist/transformData.js +3 -3
  208. package/dist/{transformDataForAggregation-CdcwlnNe.js → transformDataForAggregation-1BYVFqvF.js} +4 -4
  209. package/dist/{transformDataForAggregation-CdcwlnNe.js.map → transformDataForAggregation-1BYVFqvF.js.map} +1 -1
  210. package/dist/{transformDataForAggregation-Du-Hei-W.cjs → transformDataForAggregation-BVxVu4yY.cjs} +2 -2
  211. package/dist/{transformDataForAggregation-Du-Hei-W.cjs.map → transformDataForAggregation-BVxVu4yY.cjs.map} +1 -1
  212. package/dist/{transformDataForGraphFromFile-BCjsizvb.js → transformDataForGraphFromFile-BC9Ha8hF.js} +3 -3
  213. package/dist/{transformDataForGraphFromFile-BCjsizvb.js.map → transformDataForGraphFromFile-BC9Ha8hF.js.map} +1 -1
  214. package/dist/{transformDataForGraphFromFile-B1A0AS-Z.cjs → transformDataForGraphFromFile-b41aNQYY.cjs} +2 -2
  215. package/dist/{transformDataForGraphFromFile-B1A0AS-Z.cjs.map → transformDataForGraphFromFile-b41aNQYY.cjs.map} +1 -1
  216. package/dist/utils.cjs +1 -1
  217. package/dist/utils.js +2 -2
  218. package/dist/zoom-Bsbhil-K.cjs +2 -0
  219. package/dist/zoom-Bsbhil-K.cjs.map +1 -0
  220. package/dist/zoom-DAu91HKr.js +1864 -0
  221. package/dist/zoom-DAu91HKr.js.map +1 -0
  222. package/package.json +2 -2
  223. package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -2
  224. package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +0 -1
  225. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
  226. package/dist/_commonjsHelpers-DaMA6jEr.js.map +0 -1
  227. package/dist/index-Cdcfp4nk.js.map +0 -1
  228. package/dist/index-DNj994Pv.cjs.map +0 -1
  229. package/dist/zoom-Lo7IAUfC.cjs +0 -2
  230. package/dist/zoom-Lo7IAUfC.cjs.map +0 -1
  231. package/dist/zoom-_lqdiGoI.js +0 -1983
  232. package/dist/zoom-_lqdiGoI.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { j as i, m as k } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
2
  import { useRef as lt, useState as P, useEffect as ft } from "react";
3
3
  import { p as G, f as $t } from "./parse-DlCRUFh_.js";
4
- import { s as It } from "./index-DxagiOHo.js";
4
+ import { s as It } from "./index-fwdktvAS.js";
5
5
  import { n as ot } from "./numberFormattingFunction-14YCbkN2.js";
6
- import { T as Tt } from "./Tooltip-DyM5snqx.js";
6
+ import { T as Tt } from "./Tooltip-CVCGWyzw.js";
7
7
  import { c as g } from "./checkIfNullOrUndefined-DmfiKkNw.js";
8
8
  import { X as Vt } from "./XTicksAndGridLines-Bn9u5gOM.js";
9
9
  import { A as gt } from "./Axis-Ddg-seDi.js";
10
10
  import { A as At } from "./AxisTitle-BmHLMRJZ.js";
11
- import { H as Ot } from "./index-Cdcfp4nk.js";
11
+ import { H as Ot } from "./index-DKCxu1Gh.js";
12
12
  import { t as St } from "./time-BzJP5SPC.js";
13
13
  import { a as bt } from "./linear-DUdu7l2G.js";
14
14
  import { l as Nt, c as Ct } from "./line-CPfhohvF.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-DDoeWRVt.cjs"),x=require("react"),ve=require("./parse-hMnG_lRV.cjs"),je=require("./getSliderMarks-CtsEXiLV.cjs"),Le=require("./index-CZbIGs8q.cjs"),Me=require("./index-BczVvEBZ.cjs"),Ve=require("./index-BXns0-ng.cjs"),$e=require("./Modal-tXZlLE5s.cjs"),Te=require("./numberFormattingFunction-02t-wJta.cjs"),Ae=require("./Tooltip-n8z5bfav.cjs"),A=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Fe=require("./string2HTML-D2Avudmb.cjs"),Qe=require("./XTicksAndGridLines-CCzXIV8d.cjs"),qe=require("./AxisTitle-CK9YeovX.cjs"),Ze=require("./YAxesLabels-D8IydyZj.cjs"),Pe=require("./YTicksAndGridLines-DBDuz6vb.cjs"),Be=require("./ReferenceLine-CFVBBN__.cjs"),He=require("./linear-BVckp9RD.cjs"),We=require("./band-CAApY4Pd.cjs"),Ue=require("./use-in-view-sQJZ_xDO.cjs"),le=require("./proxy-BHRoeZgd.cjs"),Ge=require("./index-BW8iNx7E.cjs"),Xe=require("./GraphHeader.cjs"),Ye=require("./GraphFooter.cjs"),_e=require("./ColorLegendWithMouseOver.cjs"),ze=require("./Colors.cjs"),Je=require("./EmptyState-d8_8SxeW.cjs"),Ne=require("./index-BW_-wD2k.cjs"),ke=require("./ensureCompleteData-DqWQ2Zbi.cjs"),Ke=require("./init-DU0ybBc_.cjs"),et=require("./Axis-DE7dSn1_.cjs"),tt=require("./XAxesLabels-OjBNl_lS.cjs");function it(ye){const{data:l,dotColors:g,suffix:_,prefix:z,barPadding:w,showValues:ue,showTicks:Z,leftMargin:ee,truncateBy:ce,width:te,height:ie,rightMargin:J,topMargin:N,bottomMargin:s,radius:F,showLabels:xe,tooltip:O,onSeriesMouseOver:q,maxValue:E,minValue:ae,onSeriesMouseClick:B,selectedColor:I,arrowConnector:R,connectorStrokeWidth:pe,maxBarThickness:re,minBarThickness:ne,resetSelectionOnDoubleClick:ge,detailsOnClick:v,axisTitle:U,noOfTicks:fe,valueColor:se,styles:d,classNames:h,labelOrder:D,refValues:oe,rtl:y,animate:u,precision:M,customLayers:G,highlightedDataPoints:X,dimmedOpacity:L}=ye,j=x.useRef(null),p=Ue.useInView(j,{once:u.once,amount:u.amount}),m={top:U?N+25:N,bottom:s,left:ee,right:J},H=te-m.left-m.right,W=ie-m.top-m.bottom,[K,P]=x.useState(void 0),[C,b]=x.useState(void 0),[S,Q]=x.useState(void 0),[V,$]=x.useState(void 0),Y=l.map((t,n)=>({...t,id:D?`${t.label}`:`${n}`})),k=D||Y.map(t=>`${t.id}`),f=He.linear().domain([ae,E]).range([0,H]).nice(),T=We.band().domain(k).range([0,ne?Math.max(W,ne*Y.length):re?Math.min(W,re*Y.length):W]).paddingInner(w),a=f.ticks(fe);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs(le.motion.svg,{width:`${te}px`,height:`${ie}px`,viewBox:`0 0 ${te} ${ie}`,direction:"ltr",ref:j,children:[R?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,i.jsxRuntimeExports.jsxs("g",{transform:`translate(${m.left},${m.top})`,children:[Z?i.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:a.filter((t,n)=>n!==0),x:a.filter((t,n)=>n!==0).map(t=>f(t)),y1:0-N,y2:W+m.bottom,styles:{gridLines:d?.xAxis?.gridLines,labels:d?.xAxis?.labels},classNames:{gridLines:h?.xAxis?.gridLines,labels:h?.xAxis?.labels},suffix:_,prefix:z,labelType:"secondary",showGridLines:!0,precision:M}):null,i.jsxRuntimeExports.jsx(qe.AxisTitle,{x:H/2,y:0-m.top+15,style:d?.xAxis?.title,className:h?.xAxis?.title,text:U}),i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{y:Y.map(t=>T(`${t.id}`)+T.bandwidth()/2),x1:0,x2:H,styles:{gridLines:d?.yAxis?.gridLines},classNames:{gridLines:h?.yAxis?.gridLines},labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:M}),G.filter(t=>t.position==="before").map(t=>t.layer),i.jsxRuntimeExports.jsxs(Ge.AnimatePresence,{children:[Y.map(t=>i.jsxRuntimeExports.jsxs(le.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:T(`${t.id}`)+T.bandwidth()/2,opacity:X.length!==0?X.indexOf(t.label)!==-1?.85:L:.85},whileInView:{x:0,y:T(`${t.id}`)+T.bandwidth()/2,opacity:X.length!==0?X.indexOf(t.label)!==-1?.85:L:.85,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[xe?i.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${t.label}`.length<ce?`${t.label}`:`${`${t.label}`.substring(0,ce)}...`,y:0-T.bandwidth()/2,x:0-m.left,width:m.left,height:T.bandwidth(),alignment:"right",style:d?.yAxis?.labels,className:h?.yAxis?.labels,animate:u,isInView:p}):null,i.jsxRuntimeExports.jsx(le.motion.line,{y1:0,y2:0,style:{strokeWidth:pe,...d?.dataConnectors||{},opacity:I?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",h?.dataConnectors),markerEnd:R&&t.x.indexOf(Math.min(...t.x.filter(n=>n!==null)))===0?"url(#arrow)":"",markerStart:R&&t.x.indexOf(Math.min(...t.x.filter(n=>n!==null)))===t.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:f(Math.min(...t.x.filter(n=>n!==null)))+F,x2:f(Math.max(...t.x.filter(n=>n!==null)))-F,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial"}),t.x.map((n,o)=>i.jsxRuntimeExports.jsx(le.motion.g,{onMouseEnter:de=>{P({...t,xIndex:o}),$(de.clientY),Q(de.clientX),q?.({...t,xIndex:o})},onClick:()=>{(B||v)&&(Ve.isEqual(C,{...t,xIndex:o})&&ge?(b(void 0),B?.(void 0)):(b({...t,xIndex:o}),B&&B({...t,xIndex:o})))},onMouseMove:de=>{P({...t,xIndex:o}),$(de.clientY),Q(de.clientX)},onMouseLeave:()=>{P(void 0),Q(void 0),$(void 0),q?.(void 0)},exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{opacity:I?g[o]===I?1:.3:1},whileInView:{opacity:I?g[o]===I?1:.3:1,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial",children:A.checkIfNullOrUndefined(n)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(le.motion.circle,{cy:0,r:F,style:{fill:g[o],fillOpacity:.85,stroke:g[o],strokeWidth:1,opacity:A.checkIfNullOrUndefined(n)?0:1},exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{cx:f(0),opacity:0},whileInView:{cx:f(n||0),opacity:A.checkIfNullOrUndefined(n)?0:1,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial"}),ue?i.jsxRuntimeExports.jsx(le.motion.text,{y:0,style:{fill:se||g[o],textAnchor:"middle",...d?.graphObjectValues||{}},dx:0,dy:0-F-3,className:i.mo("graph-value text-sm font-bold",A.checkIfNullOrUndefined(n)?"0opacity-0":"opacity-100",h?.graphObjectValues),exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x:f(0),opacity:0},whileInView:{x:f(n||0),opacity:1,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial",children:Te.numberFormattingFunction(n,"NA",M,z,_)}):null]})},o))]},t.label)),oe?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:oe.map((t,n)=>i.jsxRuntimeExports.jsx(Be.RefLineX,{text:t.text,color:t.color,x:f(t.value),y1:0-m.top,y2:W+m.bottom,textSide:f(t.value)>H*.75||y?"left":"right",classNames:t.classNames,styles:t.styles,animate:u,isInView:p},n))}):null]}),G.filter(t=>t.position==="after").map(t=>t.layer)]})]}),K&&O&&S&&V?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:K,body:O,xPos:S,yPos:V,backgroundStyle:d?.tooltip,className:h?.tooltip}):null,v&&C!==void 0?i.jsxRuntimeExports.jsx($e.X,{open:C!==void 0,onClose:()=>{b(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof v=="string"?{__html:Fe.string2HTML(v,C)}:void 0,children:typeof v=="function"?v(C):null})}):null]})}function at(ye){const{data:l,graphTitle:g,colors:_=ze.Colors.light.categoricalColors.colors,sources:z,graphDescription:w,barPadding:ue=.25,showTicks:Z=!0,leftMargin:ee=100,rightMargin:ce=40,topMargin:te=20,bottomMargin:ie=10,truncateBy:J=999,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E=!1,radius:ae=3,showLabels:B=!0,tooltip:I,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne="",prefix:ge="",maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se=!1,dataDownload:d=!1,showValues:h=!0,sortParameter:D,arrowConnector:oe=!1,connectorStrokeWidth:y=2,language:u="en",minHeight:M=0,theme:G="light",labelOrder:X,maxBarThickness:L,maxNumberOfBars:j,minBarThickness:p,ariaLabel:m,resetSelectionOnDoubleClick:H=!0,detailsOnClick:W,axisTitle:K,noOfTicks:P=5,valueColor:C,styles:b,classNames:S,refValues:Q,filterNA:V=!0,animate:$=!1,precision:Y=2,customLayers:k=[],showColorScale:f=!0,highlightedDataPoints:T=[],dimmedOpacity:a=.3,timeline:t={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},sortData:n}=ye,[o,de]=x.useState(0),[Ee,Re]=x.useState(0),[me,Ie]=x.useState(t.autoplay),c=je.sort(Le.uniqBy(l.filter(e=>e.date!==void 0&&e.date!==null),e=>e.date).map(e=>ve.parse(`${e.date}`,t.dateFormat||"yyyy",new Date).getTime()),(e,r)=>Ke.ascending(e,r)),[be,we]=x.useState(t.autoplay?0:c.length-1),[De,Se]=x.useState(void 0),he=x.useRef(null),Ce=x.useRef(null);x.useEffect(()=>{const e=new ResizeObserver(r=>{de(s||r[0].target.clientWidth||620),Re(N||r[0].target.clientHeight||480)});return he.current&&(Re(he.current.clientHeight||480),de(he.current.clientWidth||620),s||e.observe(he.current)),()=>e.disconnect()},[s,N]),x.useEffect(()=>{const e=setInterval(()=>{we(r=>r<c.length-1?r+1:0)},(t.speed||2)*1e3);return me||clearInterval(e),()=>clearInterval(e)},[c,me,t.speed]);const Oe=je.getSliderMarks(c,be,t.showOnlyActiveDate,t.dateFormat||"yyyy");return i.jsxRuntimeExports.jsx("div",{className:`${G||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:u==="he"||u==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:i.mo(`${E?E===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${u||"en"}`,s?"w-fit":"w-full",S?.graphContainer),style:{...b?.graphContainer||{},...E&&E!==!0?{backgroundColor:E}:{}},id:re,ref:Ce,"aria-label":m||`${g?`The graph shows ${g}. `:""}This is a dumbbell chart that shows comparisons between two or more data points across categories. ${w?` ${w}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:E?q||"1rem":q||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[g||w||se||d?i.jsxRuntimeExports.jsx(Xe.GraphHeader,{styles:{title:b?.title,description:b?.description},classNames:{title:S?.title,description:S?.description},graphTitle:g,graphDescription:w,width:s,graphDownload:se?Ce.current:void 0,dataDownload:d?l.map(e=>e.data).filter(e=>e!==void 0).length>0?l.map(e=>e.data).filter(e=>e!==void 0):l.filter(e=>e!==void 0):null}):null,t.enabled&&c.length>0&&Oe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Ie(!me)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":me?"Click to pause animation":"Click to play animation",children:me?i.jsxRuntimeExports.jsx(Ne.Pause,{}):i.jsxRuntimeExports.jsx(Ne.Play,{})}),i.jsxRuntimeExports.jsx(je.xr,{min:c[0],max:c[c.length-1],marks:Oe,step:null,defaultValue:c[c.length-1],value:c[be],onChangeComplete:e=>{we(c.indexOf(e))},onChange:e=>{we(c.indexOf(e))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?i.jsxRuntimeExports.jsx(Je.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[f?i.jsxRuntimeExports.jsx(_e.ColorLegendWithMouseOver,{width:s,colorDomain:xe,colors:_,colorLegendTitle:O,setSelectedColor:Se,showNAColor:!1}):null,i.jsxRuntimeExports.jsx("div",{className:"flex grow w-full justify-center leading-0",ref:he,"aria-label":"Graph area",children:(s||o)&&(N||Ee)?i.jsxRuntimeExports.jsx(it,{data:D!==void 0?D==="diff"?Me.orderBy(ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>t.enabled?e.date===ve.format(new Date(c[be]),t.dateFormat||"yyyy"):e).filter(e=>V?!e.x.every(r=>r==null):e),e=>A.checkIfNullOrUndefined(e.x[e.x.length-1])||A.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0],[n||"asc"]).filter((e,r)=>j?r<j:!0):Me.orderBy(ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>t.enabled?e.date===ve.format(new Date(c[be]),t.dateFormat||"yyyy"):e).filter(e=>V?!e.x.every(r=>r==null):e),e=>A.checkIfNullOrUndefined(e.x[D])?-1/0:e.x[D],[n||"asc"]).filter((e,r)=>j?r<j:!0):ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>V?!e.x.every(r=>r==null):e).filter((e,r)=>j?r<j:!0),dotColors:_,width:s||o,height:Math.max(M,N||(R?M?(s||o)*R>M?(s||o)*R:M:(s||o)*R:Ee)),suffix:ne,prefix:ge,radius:ae,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,showLabels:B,showValues:h,tooltip:I,onSeriesMouseOver:pe,maxValue:A.checkIfNullOrUndefined(v)?Math.max(...l.map(e=>Math.max(...e.x.filter(r=>r!==null))))<0?0:Math.max(...l.map(e=>Math.max(...e.x.filter(r=>r!==null)))):v,minValue:A.checkIfNullOrUndefined(U)?Math.min(...l.map(e=>Math.min(...e.x.filter(r=>r!==null))))>0?0:Math.min(...l.map(e=>Math.min(...e.x.filter(r=>r!==null)))):U,onSeriesMouseClick:fe,selectedColor:De,arrowConnector:oe,connectorStrokeWidth:y,maxBarThickness:L,minBarThickness:p,resetSelectionOnDoubleClick:H,detailsOnClick:W,axisTitle:K,noOfTicks:P,valueColor:C,styles:b,classNames:S,labelOrder:X,refValues:Q,rtl:u==="he"||u==="ar",animate:$===!0?{duration:.5,once:!0,amount:.5}:$||{duration:0,once:!0,amount:0},precision:Y,customLayers:k,highlightedDataPoints:T,dimmedOpacity:a}):null})]})}),z||F?i.jsxRuntimeExports.jsx(Ye.GraphFooter,{styles:{footnote:b?.footnote,source:b?.source},classNames:{footnote:S?.footnote,source:S?.source},sources:z,footNote:F,width:s}):null]})})})})}function rt(ye){const{data:l,dotColors:g,barPadding:_,showTicks:z,leftMargin:w,truncateBy:ue,width:Z,height:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,radius:J,showLabels:N,tooltip:s,onSeriesMouseOver:F,maxValue:xe,minValue:O,onSeriesMouseClick:q,showValues:E,suffix:ae,prefix:B,selectedColor:I,arrowConnector:R,connectorStrokeWidth:pe,maxBarThickness:re,minBarThickness:ne,resetSelectionOnDoubleClick:ge,detailsOnClick:v,axisTitle:U,noOfTicks:fe,valueColor:se,styles:d,classNames:h,labelOrder:D,refValues:oe,animate:y,precision:u,customLayers:M,highlightedDataPoints:G,dimmedOpacity:X}=ye,L=x.useRef(null),j=Ue.useInView(L,{once:y.once,amount:y.amount}),p={top:te,bottom:ie,left:U?w+30:w,right:ce},m=Z-p.left-p.right,H=ee-p.top-p.bottom,[W,K]=x.useState(void 0),[P,C]=x.useState(void 0),[b,S]=x.useState(void 0),[Q,V]=x.useState(void 0),$=l.map((a,t)=>({...a,id:D?`${a.label}`:`${t}`})),Y=D||$.map(a=>`${a.id}`),k=He.linear().domain([O,xe]).range([H,0]).nice(),f=We.band().domain(Y).range([0,ne?Math.max(m,ne*$.length):re?Math.min(m,re*$.length):m]).paddingInner(_),T=k.ticks(fe);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs(le.motion.svg,{width:`${Z}px`,height:`${ee}px`,viewBox:`0 0 ${Z} ${ee}`,direction:"ltr",ref:L,children:[R?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,i.jsxRuntimeExports.jsxs("g",{transform:`translate(${p.left},${p.top})`,children:[i.jsxRuntimeExports.jsx(et.Axis,{y1:k(O<0?0:O),y2:k(O<0?0:O),x1:0-w,x2:m+p.right,label:Te.numberFormattingFunction(O<0?0:O,"NA",u,B,ae),labelPos:{x:0-w,dx:0,dy:xe<0?"1em":-5,y:k(O<0?0:O)},classNames:{axis:h?.xAxis?.axis,label:h?.yAxis?.labels},styles:{axis:d?.xAxis?.axis,label:d?.yAxis?.labels}}),z?i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:T.filter(a=>a!==0),y:T.filter(a=>a!==0).map(a=>k(a)),x1:0-w,x2:m+p.right,styles:{gridLines:d?.yAxis?.gridLines,labels:d?.yAxis?.labels},classNames:{gridLines:h?.yAxis?.gridLines,labels:h?.yAxis?.labels},suffix:ae,prefix:B,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:u}):null,i.jsxRuntimeExports.jsx(qe.AxisTitle,{x:0-w-15,y:H/2,style:d?.yAxis?.title,className:h?.yAxis?.title,text:U,rotate90:!0}),M.filter(a=>a.position==="before").map(a=>a.layer),i.jsxRuntimeExports.jsxs(Ge.AnimatePresence,{children:[$.map(a=>i.jsxRuntimeExports.jsxs(le.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:f(`${a.id}`)+f.bandwidth()/2,y:0,opacity:G.length!==0?G.indexOf(a.label)!==-1?.85:X:.85},whileInView:{x:f(`${a.id}`)+f.bandwidth()/2,y:0,opacity:G.length!==0?G.indexOf(a.label)!==-1?.85:X:.85,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial",exit:{opacity:0,transition:{duration:y.duration}},children:[N?i.jsxRuntimeExports.jsx(tt.XAxesLabels,{value:`${a.label}`.length<ue?`${a.label}`:`${`${a.label}`.substring(0,ue)}...`,y:H+5,x:0-f.bandwidth()/2,width:f.bandwidth(),height:p.bottom,style:d?.xAxis?.labels,className:h?.xAxis?.labels,alignment:"top",animate:y,isInView:j}):null,i.jsxRuntimeExports.jsx(le.motion.line,{x1:0,x2:0,style:{strokeWidth:pe,...d?.dataConnectors||{},opacity:I?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",h?.dataConnectors),markerEnd:R&&a.x.indexOf(Math.min(...a.x.filter(t=>t!==null)))===0?"url(#arrow)":"",markerStart:R&&a.x.indexOf(Math.min(...a.x.filter(t=>t!==null)))===a.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:y.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:k(Math.min(...a.x.filter(t=>t!==null)))+J,y2:k(Math.max(...a.x.filter(t=>t!==null)))-J,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial"}),a.x.map((t,n)=>i.jsxRuntimeExports.jsx(le.motion.g,{onMouseEnter:o=>{K({...a,xIndex:n}),V(o.clientY),S(o.clientX),F?.({...a,xIndex:n})},onClick:()=>{(q||v)&&(Ve.isEqual(P,{...a,xIndex:n})&&ge?(C(void 0),q?.(void 0)):(C({...a,xIndex:n}),q&&q({...a,xIndex:n})))},onMouseMove:o=>{K({...a,xIndex:n}),V(o.clientY),S(o.clientX)},onMouseLeave:()=>{K(void 0),S(void 0),V(void 0),F?.(void 0)},exit:{opacity:0,transition:{duration:y.duration}},variants:{initial:{opacity:I?g[n]===I?1:.3:1},whileInView:{opacity:I?g[n]===I?1:.3:1,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial",children:A.checkIfNullOrUndefined(t)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(le.motion.circle,{cx:0,r:J,style:{fill:g[n],fillOpacity:.85,stroke:g[n],strokeWidth:1},exit:{opacity:0,transition:{duration:y.duration}},variants:{initial:{cy:k(0),opacity:0},whileInView:{cy:k(t||0),opacity:A.checkIfNullOrUndefined(t)?0:1,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial"}),E?i.jsxRuntimeExports.jsx(le.motion.text,{x:0,style:{fill:se||g[n],textAnchor:"start",...d?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",A.checkIfNullOrUndefined(t)?"opacity-0":"opacity-100",h?.graphObjectValues),dx:J+3,dy:"0.33em",exit:{opacity:0,transition:{duration:y.duration}},variants:{initial:{y:k(0),opacity:0},whileInView:{y:k(t||0),opacity:1,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial",children:Te.numberFormattingFunction(t,"NA",u,B,ae)}):null]})},n))]},a.label)),oe?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:oe.map((a,t)=>i.jsxRuntimeExports.jsx(Be.RefLineY,{text:a.text,color:a.color,y:k(a.value),x1:0-w,x2:m+p.right,classNames:a.classNames,styles:a.styles,animate:y,isInView:j},t))}):null]}),M.filter(a=>a.position==="after").map(a=>a.layer)]})]}),W&&s&&b&&Q?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:W,body:s,xPos:b,yPos:Q,backgroundStyle:d?.tooltip,className:h?.tooltip}):null,v&&P!==void 0?i.jsxRuntimeExports.jsx($e.X,{open:P!==void 0,onClose:()=>{C(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof v=="string"?{__html:Fe.string2HTML(v,P)}:void 0,children:typeof v=="function"?v(P):null})}):null]})}function nt(ye){const{data:l,graphTitle:g,colors:_=ze.Colors.light.categoricalColors.colors,sources:z,graphDescription:w,barPadding:ue=.25,showTicks:Z=!0,leftMargin:ee=20,rightMargin:ce=20,topMargin:te=20,bottomMargin:ie=25,truncateBy:J=999,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E=!1,radius:ae=3,tooltip:B,showLabels:I=!0,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne="",prefix:ge="",maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se=!1,dataDownload:d=!1,showValues:h=!0,sortParameter:D,arrowConnector:oe=!1,connectorStrokeWidth:y=2,language:u="en",minHeight:M=0,theme:G="light",maxBarThickness:X,maxNumberOfBars:L,minBarThickness:j,ariaLabel:p,resetSelectionOnDoubleClick:m=!0,detailsOnClick:H,axisTitle:W,noOfTicks:K=5,valueColor:P,styles:C,classNames:b,labelOrder:S,refValues:Q,filterNA:V=!0,animate:$=!1,precision:Y=2,customLayers:k=[],showColorScale:f=!0,highlightedDataPoints:T=[],dimmedOpacity:a=.3,timeline:t={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},sortData:n}=ye,[o,de]=x.useState(0),[Ee,Re]=x.useState(0),[me,Ie]=x.useState(t.autoplay),c=je.sort(Le.uniqBy(l.filter(e=>e.date!==void 0&&e.date!==null),e=>e.date).map(e=>ve.parse(`${e.date}`,t.dateFormat||"yyyy",new Date).getTime()),(e,r)=>Ke.ascending(e,r)),[be,we]=x.useState(t.autoplay?0:c.length-1),[De,Se]=x.useState(void 0),he=x.useRef(null),Ce=x.useRef(null);x.useEffect(()=>{const e=new ResizeObserver(r=>{de(s||r[0].target.clientWidth||620),Re(N||r[0].target.clientHeight||480)});return he.current&&(Re(he.current.clientHeight||480),de(he.current.clientWidth||620),s||e.observe(he.current)),()=>e.disconnect()},[s,N]),x.useEffect(()=>{const e=setInterval(()=>{we(r=>r<c.length-1?r+1:0)},(t.speed||2)*1e3);return me||clearInterval(e),()=>clearInterval(e)},[c,me,t.speed]);const Oe=je.getSliderMarks(c,be,t.showOnlyActiveDate,t.dateFormat||"yyyy");return i.jsxRuntimeExports.jsx("div",{className:`${G||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:u==="he"||u==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:i.mo(`${E?E===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${u||"en"}`,s?"w-fit":"w-full",b?.graphContainer),style:{...C?.graphContainer||{},...E&&E!==!0?{backgroundColor:E}:{}},id:re,ref:Ce,"aria-label":p||`${g?`The graph shows ${g}. `:""}This is a dumbbell chart that shows comparisons between two or more data points across categories. ${w?` ${w}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:E?q||"1rem":q||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[g||w||se||d?i.jsxRuntimeExports.jsx(Xe.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:b?.title,description:b?.description},graphTitle:g,graphDescription:w,width:s,graphDownload:se?Ce.current:void 0,dataDownload:d?l.map(e=>e.data).filter(e=>e!==void 0).length>0?l.map(e=>e.data).filter(e=>e!==void 0):l.filter(e=>e!==void 0):null}):null,t.enabled&&c.length>0&&Oe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Ie(!me)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":me?"Click to pause animation":"Click to play animation",children:me?i.jsxRuntimeExports.jsx(Ne.Pause,{}):i.jsxRuntimeExports.jsx(Ne.Play,{})}),i.jsxRuntimeExports.jsx(je.xr,{min:c[0],max:c[c.length-1],marks:Oe,step:null,defaultValue:c[c.length-1],value:c[be],onChangeComplete:e=>{we(c.indexOf(e))},onChange:e=>{we(c.indexOf(e))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?i.jsxRuntimeExports.jsx(Je.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[f?i.jsxRuntimeExports.jsx(_e.ColorLegendWithMouseOver,{width:s,colorDomain:xe,colors:_,colorLegendTitle:O,setSelectedColor:Se,showNAColor:!1}):null,i.jsxRuntimeExports.jsx("div",{className:"flex grow w-full justify-center leading-0",ref:he,"aria-label":"Graph area",children:(s||o)&&(N||Ee)?i.jsxRuntimeExports.jsx(rt,{data:D!==void 0?D==="diff"?Me.orderBy(ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>t.enabled?e.date===ve.format(new Date(c[be]),t.dateFormat||"yyyy"):e).filter(e=>V?!e.x.every(r=>r==null):e),e=>A.checkIfNullOrUndefined(e.x[e.x.length-1])||A.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0],[n||"asc"]).filter((e,r)=>L?r<L:!0):Me.orderBy(ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>t.enabled?e.date===ve.format(new Date(c[be]),t.dateFormat||"yyyy"):e).filter(e=>V?!e.x.every(r=>r==null):e),e=>A.checkIfNullOrUndefined(e.x[D])?-1/0:e.x[D],[n||"asc"]).filter((e,r)=>L?r<L:!0):ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>V?!e.x.every(r=>r==null):e).filter((e,r)=>L?r<L:!0),dotColors:_,width:s||o,height:Math.max(M,N||(R?M?(s||o)*R>M?(s||o)*R:M:(s||o)*R:Ee)),radius:ae,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,showLabels:I,showValues:h,tooltip:B,suffix:ne,prefix:ge,onSeriesMouseOver:pe,maxValue:A.checkIfNullOrUndefined(v)?Math.max(...l.map(e=>Math.max(...e.x.filter(r=>r!==null))))<0?0:Math.max(...l.map(e=>Math.max(...e.x.filter(r=>r!==null)))):v,minValue:A.checkIfNullOrUndefined(U)?Math.min(...l.map(e=>Math.min(...e.x.filter(r=>r!==null))))>0?0:Math.min(...l.map(e=>Math.min(...e.x.filter(r=>r!==null)))):U,onSeriesMouseClick:fe,selectedColor:De,arrowConnector:oe,connectorStrokeWidth:y,maxBarThickness:X,minBarThickness:j,resetSelectionOnDoubleClick:m,detailsOnClick:H,axisTitle:W,noOfTicks:K,valueColor:P,styles:C,classNames:b,labelOrder:S,refValues:Q,animate:$===!0?{duration:.5,once:!0,amount:.5}:$||{duration:0,once:!0,amount:0},precision:Y,customLayers:k,highlightedDataPoints:T,dimmedOpacity:a}):null})]})}),z||F?i.jsxRuntimeExports.jsx(Ye.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:b?.footnote,source:b?.source},sources:z,footNote:F,width:s}):null]})})})})}function st(ye){const{data:l,graphTitle:g,colors:_,sources:z,graphDescription:w,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E,radius:ae,tooltip:B,showLabels:I,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne,prefix:ge,maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se,dataDownload:d,showValues:h,sortParameter:D,arrowConnector:oe,connectorStrokeWidth:y,language:u,minHeight:M,theme:G,maxBarThickness:X,maxNumberOfBars:L,minBarThickness:j,ariaLabel:p,resetSelectionOnDoubleClick:m,detailsOnClick:H,axisTitle:W,noOfTicks:K,valueColor:P,orientation:C="vertical",styles:b,classNames:S,labelOrder:Q,refValues:V,filterNA:$,animate:Y,precision:k,showColorScale:f,customLayers:T,highlightedDataPoints:a,dimmedOpacity:t,timeline:n,sortData:o}=ye;return C==="vertical"?i.jsxRuntimeExports.jsx(nt,{data:l,graphTitle:g,colors:_,sources:z,graphDescription:w,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E,radius:ae,tooltip:B,showLabels:I,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne,prefix:ge,maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se,dataDownload:d,showValues:h,sortParameter:D,arrowConnector:oe,connectorStrokeWidth:y,language:u,minHeight:M,theme:G,maxBarThickness:X,maxNumberOfBars:L,minBarThickness:j,ariaLabel:p,resetSelectionOnDoubleClick:m,styles:b,detailsOnClick:H,axisTitle:W,noOfTicks:K,labelOrder:Q,valueColor:P,classNames:S,refValues:V,filterNA:$,animate:Y,precision:k,showColorScale:f,customLayers:T,highlightedDataPoints:a,dimmedOpacity:t,timeline:n,sortData:o}):i.jsxRuntimeExports.jsx(at,{data:l,graphTitle:g,colors:_,sources:z,graphDescription:w,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E,radius:ae,tooltip:B,showLabels:I,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne,prefix:ge,maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se,dataDownload:d,showValues:h,sortParameter:D,arrowConnector:oe,connectorStrokeWidth:y,language:u,minHeight:M,theme:G,maxBarThickness:X,maxNumberOfBars:L,minBarThickness:j,ariaLabel:p,resetSelectionOnDoubleClick:m,styles:b,detailsOnClick:H,axisTitle:W,noOfTicks:K,valueColor:P,classNames:S,labelOrder:Q,refValues:V,filterNA:$,animate:Y,precision:k,showColorScale:f,customLayers:T,highlightedDataPoints:a,dimmedOpacity:t,timeline:n,sortData:o})}exports.DumbbellChart=st;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-DDoeWRVt.cjs"),x=require("react"),ve=require("./parse-hMnG_lRV.cjs"),je=require("./getSliderMarks-CtsEXiLV.cjs"),Le=require("./index-BJOeaYTk.cjs"),Me=require("./index-CQ3e6Ewi.cjs"),Ve=require("./index-DQA8q5sC.cjs"),$e=require("./Modal-tXZlLE5s.cjs"),Te=require("./numberFormattingFunction-02t-wJta.cjs"),Ae=require("./Tooltip-De16GWhY.cjs"),A=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Fe=require("./string2HTML-z7CwHXcx.cjs"),Qe=require("./XTicksAndGridLines-CCzXIV8d.cjs"),qe=require("./AxisTitle-CK9YeovX.cjs"),Ze=require("./YAxesLabels-D8IydyZj.cjs"),Pe=require("./YTicksAndGridLines-DBDuz6vb.cjs"),Be=require("./ReferenceLine-CFVBBN__.cjs"),He=require("./linear-BVckp9RD.cjs"),We=require("./band-CAApY4Pd.cjs"),Ue=require("./use-in-view-sQJZ_xDO.cjs"),le=require("./proxy-BHRoeZgd.cjs"),Ge=require("./index-BW8iNx7E.cjs"),Xe=require("./GraphHeader.cjs"),Ye=require("./GraphFooter.cjs"),_e=require("./ColorLegendWithMouseOver.cjs"),ze=require("./Colors.cjs"),Je=require("./EmptyState-d8_8SxeW.cjs"),Ne=require("./index-BW_-wD2k.cjs"),ke=require("./ensureCompleteData-BU5Zlccy.cjs"),Ke=require("./init-DU0ybBc_.cjs"),et=require("./Axis-DE7dSn1_.cjs"),tt=require("./XAxesLabels-OjBNl_lS.cjs");function it(ye){const{data:l,dotColors:g,suffix:_,prefix:z,barPadding:w,showValues:ue,showTicks:Z,leftMargin:ee,truncateBy:ce,width:te,height:ie,rightMargin:J,topMargin:N,bottomMargin:s,radius:F,showLabels:xe,tooltip:O,onSeriesMouseOver:q,maxValue:E,minValue:ae,onSeriesMouseClick:B,selectedColor:I,arrowConnector:R,connectorStrokeWidth:pe,maxBarThickness:re,minBarThickness:ne,resetSelectionOnDoubleClick:ge,detailsOnClick:v,axisTitle:U,noOfTicks:fe,valueColor:se,styles:d,classNames:h,labelOrder:D,refValues:oe,rtl:y,animate:u,precision:M,customLayers:G,highlightedDataPoints:X,dimmedOpacity:L}=ye,j=x.useRef(null),p=Ue.useInView(j,{once:u.once,amount:u.amount}),m={top:U?N+25:N,bottom:s,left:ee,right:J},H=te-m.left-m.right,W=ie-m.top-m.bottom,[K,P]=x.useState(void 0),[C,b]=x.useState(void 0),[S,Q]=x.useState(void 0),[V,$]=x.useState(void 0),Y=l.map((t,n)=>({...t,id:D?`${t.label}`:`${n}`})),k=D||Y.map(t=>`${t.id}`),f=He.linear().domain([ae,E]).range([0,H]).nice(),T=We.band().domain(k).range([0,ne?Math.max(W,ne*Y.length):re?Math.min(W,re*Y.length):W]).paddingInner(w),a=f.ticks(fe);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs(le.motion.svg,{width:`${te}px`,height:`${ie}px`,viewBox:`0 0 ${te} ${ie}`,direction:"ltr",ref:j,children:[R?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,i.jsxRuntimeExports.jsxs("g",{transform:`translate(${m.left},${m.top})`,children:[Z?i.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:a.filter((t,n)=>n!==0),x:a.filter((t,n)=>n!==0).map(t=>f(t)),y1:0-N,y2:W+m.bottom,styles:{gridLines:d?.xAxis?.gridLines,labels:d?.xAxis?.labels},classNames:{gridLines:h?.xAxis?.gridLines,labels:h?.xAxis?.labels},suffix:_,prefix:z,labelType:"secondary",showGridLines:!0,precision:M}):null,i.jsxRuntimeExports.jsx(qe.AxisTitle,{x:H/2,y:0-m.top+15,style:d?.xAxis?.title,className:h?.xAxis?.title,text:U}),i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{y:Y.map(t=>T(`${t.id}`)+T.bandwidth()/2),x1:0,x2:H,styles:{gridLines:d?.yAxis?.gridLines},classNames:{gridLines:h?.yAxis?.gridLines},labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:M}),G.filter(t=>t.position==="before").map(t=>t.layer),i.jsxRuntimeExports.jsxs(Ge.AnimatePresence,{children:[Y.map(t=>i.jsxRuntimeExports.jsxs(le.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:T(`${t.id}`)+T.bandwidth()/2,opacity:X.length!==0?X.indexOf(t.label)!==-1?.85:L:.85},whileInView:{x:0,y:T(`${t.id}`)+T.bandwidth()/2,opacity:X.length!==0?X.indexOf(t.label)!==-1?.85:L:.85,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[xe?i.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${t.label}`.length<ce?`${t.label}`:`${`${t.label}`.substring(0,ce)}...`,y:0-T.bandwidth()/2,x:0-m.left,width:m.left,height:T.bandwidth(),alignment:"right",style:d?.yAxis?.labels,className:h?.yAxis?.labels,animate:u,isInView:p}):null,i.jsxRuntimeExports.jsx(le.motion.line,{y1:0,y2:0,style:{strokeWidth:pe,...d?.dataConnectors||{},opacity:I?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",h?.dataConnectors),markerEnd:R&&t.x.indexOf(Math.min(...t.x.filter(n=>n!==null)))===0?"url(#arrow)":"",markerStart:R&&t.x.indexOf(Math.min(...t.x.filter(n=>n!==null)))===t.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:f(Math.min(...t.x.filter(n=>n!==null)))+F,x2:f(Math.max(...t.x.filter(n=>n!==null)))-F,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial"}),t.x.map((n,o)=>i.jsxRuntimeExports.jsx(le.motion.g,{onMouseEnter:de=>{P({...t,xIndex:o}),$(de.clientY),Q(de.clientX),q?.({...t,xIndex:o})},onClick:()=>{(B||v)&&(Ve.isEqual(C,{...t,xIndex:o})&&ge?(b(void 0),B?.(void 0)):(b({...t,xIndex:o}),B&&B({...t,xIndex:o})))},onMouseMove:de=>{P({...t,xIndex:o}),$(de.clientY),Q(de.clientX)},onMouseLeave:()=>{P(void 0),Q(void 0),$(void 0),q?.(void 0)},exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{opacity:I?g[o]===I?1:.3:1},whileInView:{opacity:I?g[o]===I?1:.3:1,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial",children:A.checkIfNullOrUndefined(n)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(le.motion.circle,{cy:0,r:F,style:{fill:g[o],fillOpacity:.85,stroke:g[o],strokeWidth:1,opacity:A.checkIfNullOrUndefined(n)?0:1},exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{cx:f(0),opacity:0},whileInView:{cx:f(n||0),opacity:A.checkIfNullOrUndefined(n)?0:1,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial"}),ue?i.jsxRuntimeExports.jsx(le.motion.text,{y:0,style:{fill:se||g[o],textAnchor:"middle",...d?.graphObjectValues||{}},dx:0,dy:0-F-3,className:i.mo("graph-value text-sm font-bold",A.checkIfNullOrUndefined(n)?"0opacity-0":"opacity-100",h?.graphObjectValues),exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x:f(0),opacity:0},whileInView:{x:f(n||0),opacity:1,transition:{duration:u.duration}}},initial:"initial",animate:p?"whileInView":"initial",children:Te.numberFormattingFunction(n,"NA",M,z,_)}):null]})},o))]},t.label)),oe?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:oe.map((t,n)=>i.jsxRuntimeExports.jsx(Be.RefLineX,{text:t.text,color:t.color,x:f(t.value),y1:0-m.top,y2:W+m.bottom,textSide:f(t.value)>H*.75||y?"left":"right",classNames:t.classNames,styles:t.styles,animate:u,isInView:p},n))}):null]}),G.filter(t=>t.position==="after").map(t=>t.layer)]})]}),K&&O&&S&&V?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:K,body:O,xPos:S,yPos:V,backgroundStyle:d?.tooltip,className:h?.tooltip}):null,v&&C!==void 0?i.jsxRuntimeExports.jsx($e.X,{open:C!==void 0,onClose:()=>{b(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof v=="string"?{__html:Fe.string2HTML(v,C)}:void 0,children:typeof v=="function"?v(C):null})}):null]})}function at(ye){const{data:l,graphTitle:g,colors:_=ze.Colors.light.categoricalColors.colors,sources:z,graphDescription:w,barPadding:ue=.25,showTicks:Z=!0,leftMargin:ee=100,rightMargin:ce=40,topMargin:te=20,bottomMargin:ie=10,truncateBy:J=999,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E=!1,radius:ae=3,showLabels:B=!0,tooltip:I,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne="",prefix:ge="",maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se=!1,dataDownload:d=!1,showValues:h=!0,sortParameter:D,arrowConnector:oe=!1,connectorStrokeWidth:y=2,language:u="en",minHeight:M=0,theme:G="light",labelOrder:X,maxBarThickness:L,maxNumberOfBars:j,minBarThickness:p,ariaLabel:m,resetSelectionOnDoubleClick:H=!0,detailsOnClick:W,axisTitle:K,noOfTicks:P=5,valueColor:C,styles:b,classNames:S,refValues:Q,filterNA:V=!0,animate:$=!1,precision:Y=2,customLayers:k=[],showColorScale:f=!0,highlightedDataPoints:T=[],dimmedOpacity:a=.3,timeline:t={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},sortData:n}=ye,[o,de]=x.useState(0),[Ee,Re]=x.useState(0),[me,Ie]=x.useState(t.autoplay),c=je.sort(Le.uniqBy(l.filter(e=>e.date!==void 0&&e.date!==null),e=>e.date).map(e=>ve.parse(`${e.date}`,t.dateFormat||"yyyy",new Date).getTime()),(e,r)=>Ke.ascending(e,r)),[be,we]=x.useState(t.autoplay?0:c.length-1),[De,Se]=x.useState(void 0),he=x.useRef(null),Ce=x.useRef(null);x.useEffect(()=>{const e=new ResizeObserver(r=>{de(s||r[0].target.clientWidth||620),Re(N||r[0].target.clientHeight||480)});return he.current&&(Re(he.current.clientHeight||480),de(he.current.clientWidth||620),s||e.observe(he.current)),()=>e.disconnect()},[s,N]),x.useEffect(()=>{const e=setInterval(()=>{we(r=>r<c.length-1?r+1:0)},(t.speed||2)*1e3);return me||clearInterval(e),()=>clearInterval(e)},[c,me,t.speed]);const Oe=je.getSliderMarks(c,be,t.showOnlyActiveDate,t.dateFormat||"yyyy");return i.jsxRuntimeExports.jsx("div",{className:`${G||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:u==="he"||u==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:i.mo(`${E?E===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${u||"en"}`,s?"w-fit":"w-full",S?.graphContainer),style:{...b?.graphContainer||{},...E&&E!==!0?{backgroundColor:E}:{}},id:re,ref:Ce,"aria-label":m||`${g?`The graph shows ${g}. `:""}This is a dumbbell chart that shows comparisons between two or more data points across categories. ${w?` ${w}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:E?q||"1rem":q||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[g||w||se||d?i.jsxRuntimeExports.jsx(Xe.GraphHeader,{styles:{title:b?.title,description:b?.description},classNames:{title:S?.title,description:S?.description},graphTitle:g,graphDescription:w,width:s,graphDownload:se?Ce.current:void 0,dataDownload:d?l.map(e=>e.data).filter(e=>e!==void 0).length>0?l.map(e=>e.data).filter(e=>e!==void 0):l.filter(e=>e!==void 0):null}):null,t.enabled&&c.length>0&&Oe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Ie(!me)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":me?"Click to pause animation":"Click to play animation",children:me?i.jsxRuntimeExports.jsx(Ne.Pause,{}):i.jsxRuntimeExports.jsx(Ne.Play,{})}),i.jsxRuntimeExports.jsx(je.xr,{min:c[0],max:c[c.length-1],marks:Oe,step:null,defaultValue:c[c.length-1],value:c[be],onChangeComplete:e=>{we(c.indexOf(e))},onChange:e=>{we(c.indexOf(e))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?i.jsxRuntimeExports.jsx(Je.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[f?i.jsxRuntimeExports.jsx(_e.ColorLegendWithMouseOver,{width:s,colorDomain:xe,colors:_,colorLegendTitle:O,setSelectedColor:Se,showNAColor:!1}):null,i.jsxRuntimeExports.jsx("div",{className:"flex grow w-full justify-center leading-0",ref:he,"aria-label":"Graph area",children:(s||o)&&(N||Ee)?i.jsxRuntimeExports.jsx(it,{data:D!==void 0?D==="diff"?Me.orderBy(ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>t.enabled?e.date===ve.format(new Date(c[be]),t.dateFormat||"yyyy"):e).filter(e=>V?!e.x.every(r=>r==null):e),e=>A.checkIfNullOrUndefined(e.x[e.x.length-1])||A.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0],[n||"asc"]).filter((e,r)=>j?r<j:!0):Me.orderBy(ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>t.enabled?e.date===ve.format(new Date(c[be]),t.dateFormat||"yyyy"):e).filter(e=>V?!e.x.every(r=>r==null):e),e=>A.checkIfNullOrUndefined(e.x[D])?-1/0:e.x[D],[n||"asc"]).filter((e,r)=>j?r<j:!0):ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>V?!e.x.every(r=>r==null):e).filter((e,r)=>j?r<j:!0),dotColors:_,width:s||o,height:Math.max(M,N||(R?M?(s||o)*R>M?(s||o)*R:M:(s||o)*R:Ee)),suffix:ne,prefix:ge,radius:ae,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,showLabels:B,showValues:h,tooltip:I,onSeriesMouseOver:pe,maxValue:A.checkIfNullOrUndefined(v)?Math.max(...l.map(e=>Math.max(...e.x.filter(r=>r!==null))))<0?0:Math.max(...l.map(e=>Math.max(...e.x.filter(r=>r!==null)))):v,minValue:A.checkIfNullOrUndefined(U)?Math.min(...l.map(e=>Math.min(...e.x.filter(r=>r!==null))))>0?0:Math.min(...l.map(e=>Math.min(...e.x.filter(r=>r!==null)))):U,onSeriesMouseClick:fe,selectedColor:De,arrowConnector:oe,connectorStrokeWidth:y,maxBarThickness:L,minBarThickness:p,resetSelectionOnDoubleClick:H,detailsOnClick:W,axisTitle:K,noOfTicks:P,valueColor:C,styles:b,classNames:S,labelOrder:X,refValues:Q,rtl:u==="he"||u==="ar",animate:$===!0?{duration:.5,once:!0,amount:.5}:$||{duration:0,once:!0,amount:0},precision:Y,customLayers:k,highlightedDataPoints:T,dimmedOpacity:a}):null})]})}),z||F?i.jsxRuntimeExports.jsx(Ye.GraphFooter,{styles:{footnote:b?.footnote,source:b?.source},classNames:{footnote:S?.footnote,source:S?.source},sources:z,footNote:F,width:s}):null]})})})})}function rt(ye){const{data:l,dotColors:g,barPadding:_,showTicks:z,leftMargin:w,truncateBy:ue,width:Z,height:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,radius:J,showLabels:N,tooltip:s,onSeriesMouseOver:F,maxValue:xe,minValue:O,onSeriesMouseClick:q,showValues:E,suffix:ae,prefix:B,selectedColor:I,arrowConnector:R,connectorStrokeWidth:pe,maxBarThickness:re,minBarThickness:ne,resetSelectionOnDoubleClick:ge,detailsOnClick:v,axisTitle:U,noOfTicks:fe,valueColor:se,styles:d,classNames:h,labelOrder:D,refValues:oe,animate:y,precision:u,customLayers:M,highlightedDataPoints:G,dimmedOpacity:X}=ye,L=x.useRef(null),j=Ue.useInView(L,{once:y.once,amount:y.amount}),p={top:te,bottom:ie,left:U?w+30:w,right:ce},m=Z-p.left-p.right,H=ee-p.top-p.bottom,[W,K]=x.useState(void 0),[P,C]=x.useState(void 0),[b,S]=x.useState(void 0),[Q,V]=x.useState(void 0),$=l.map((a,t)=>({...a,id:D?`${a.label}`:`${t}`})),Y=D||$.map(a=>`${a.id}`),k=He.linear().domain([O,xe]).range([H,0]).nice(),f=We.band().domain(Y).range([0,ne?Math.max(m,ne*$.length):re?Math.min(m,re*$.length):m]).paddingInner(_),T=k.ticks(fe);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs(le.motion.svg,{width:`${Z}px`,height:`${ee}px`,viewBox:`0 0 ${Z} ${ee}`,direction:"ltr",ref:L,children:[R?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,i.jsxRuntimeExports.jsxs("g",{transform:`translate(${p.left},${p.top})`,children:[i.jsxRuntimeExports.jsx(et.Axis,{y1:k(O<0?0:O),y2:k(O<0?0:O),x1:0-w,x2:m+p.right,label:Te.numberFormattingFunction(O<0?0:O,"NA",u,B,ae),labelPos:{x:0-w,dx:0,dy:xe<0?"1em":-5,y:k(O<0?0:O)},classNames:{axis:h?.xAxis?.axis,label:h?.yAxis?.labels},styles:{axis:d?.xAxis?.axis,label:d?.yAxis?.labels}}),z?i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:T.filter(a=>a!==0),y:T.filter(a=>a!==0).map(a=>k(a)),x1:0-w,x2:m+p.right,styles:{gridLines:d?.yAxis?.gridLines,labels:d?.yAxis?.labels},classNames:{gridLines:h?.yAxis?.gridLines,labels:h?.yAxis?.labels},suffix:ae,prefix:B,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:u}):null,i.jsxRuntimeExports.jsx(qe.AxisTitle,{x:0-w-15,y:H/2,style:d?.yAxis?.title,className:h?.yAxis?.title,text:U,rotate90:!0}),M.filter(a=>a.position==="before").map(a=>a.layer),i.jsxRuntimeExports.jsxs(Ge.AnimatePresence,{children:[$.map(a=>i.jsxRuntimeExports.jsxs(le.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:f(`${a.id}`)+f.bandwidth()/2,y:0,opacity:G.length!==0?G.indexOf(a.label)!==-1?.85:X:.85},whileInView:{x:f(`${a.id}`)+f.bandwidth()/2,y:0,opacity:G.length!==0?G.indexOf(a.label)!==-1?.85:X:.85,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial",exit:{opacity:0,transition:{duration:y.duration}},children:[N?i.jsxRuntimeExports.jsx(tt.XAxesLabels,{value:`${a.label}`.length<ue?`${a.label}`:`${`${a.label}`.substring(0,ue)}...`,y:H+5,x:0-f.bandwidth()/2,width:f.bandwidth(),height:p.bottom,style:d?.xAxis?.labels,className:h?.xAxis?.labels,alignment:"top",animate:y,isInView:j}):null,i.jsxRuntimeExports.jsx(le.motion.line,{x1:0,x2:0,style:{strokeWidth:pe,...d?.dataConnectors||{},opacity:I?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",h?.dataConnectors),markerEnd:R&&a.x.indexOf(Math.min(...a.x.filter(t=>t!==null)))===0?"url(#arrow)":"",markerStart:R&&a.x.indexOf(Math.min(...a.x.filter(t=>t!==null)))===a.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:y.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:k(Math.min(...a.x.filter(t=>t!==null)))+J,y2:k(Math.max(...a.x.filter(t=>t!==null)))-J,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial"}),a.x.map((t,n)=>i.jsxRuntimeExports.jsx(le.motion.g,{onMouseEnter:o=>{K({...a,xIndex:n}),V(o.clientY),S(o.clientX),F?.({...a,xIndex:n})},onClick:()=>{(q||v)&&(Ve.isEqual(P,{...a,xIndex:n})&&ge?(C(void 0),q?.(void 0)):(C({...a,xIndex:n}),q&&q({...a,xIndex:n})))},onMouseMove:o=>{K({...a,xIndex:n}),V(o.clientY),S(o.clientX)},onMouseLeave:()=>{K(void 0),S(void 0),V(void 0),F?.(void 0)},exit:{opacity:0,transition:{duration:y.duration}},variants:{initial:{opacity:I?g[n]===I?1:.3:1},whileInView:{opacity:I?g[n]===I?1:.3:1,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial",children:A.checkIfNullOrUndefined(t)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(le.motion.circle,{cx:0,r:J,style:{fill:g[n],fillOpacity:.85,stroke:g[n],strokeWidth:1},exit:{opacity:0,transition:{duration:y.duration}},variants:{initial:{cy:k(0),opacity:0},whileInView:{cy:k(t||0),opacity:A.checkIfNullOrUndefined(t)?0:1,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial"}),E?i.jsxRuntimeExports.jsx(le.motion.text,{x:0,style:{fill:se||g[n],textAnchor:"start",...d?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",A.checkIfNullOrUndefined(t)?"opacity-0":"opacity-100",h?.graphObjectValues),dx:J+3,dy:"0.33em",exit:{opacity:0,transition:{duration:y.duration}},variants:{initial:{y:k(0),opacity:0},whileInView:{y:k(t||0),opacity:1,transition:{duration:y.duration}}},initial:"initial",animate:j?"whileInView":"initial",children:Te.numberFormattingFunction(t,"NA",u,B,ae)}):null]})},n))]},a.label)),oe?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:oe.map((a,t)=>i.jsxRuntimeExports.jsx(Be.RefLineY,{text:a.text,color:a.color,y:k(a.value),x1:0-w,x2:m+p.right,classNames:a.classNames,styles:a.styles,animate:y,isInView:j},t))}):null]}),M.filter(a=>a.position==="after").map(a=>a.layer)]})]}),W&&s&&b&&Q?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:W,body:s,xPos:b,yPos:Q,backgroundStyle:d?.tooltip,className:h?.tooltip}):null,v&&P!==void 0?i.jsxRuntimeExports.jsx($e.X,{open:P!==void 0,onClose:()=>{C(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof v=="string"?{__html:Fe.string2HTML(v,P)}:void 0,children:typeof v=="function"?v(P):null})}):null]})}function nt(ye){const{data:l,graphTitle:g,colors:_=ze.Colors.light.categoricalColors.colors,sources:z,graphDescription:w,barPadding:ue=.25,showTicks:Z=!0,leftMargin:ee=20,rightMargin:ce=20,topMargin:te=20,bottomMargin:ie=25,truncateBy:J=999,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E=!1,radius:ae=3,tooltip:B,showLabels:I=!0,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne="",prefix:ge="",maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se=!1,dataDownload:d=!1,showValues:h=!0,sortParameter:D,arrowConnector:oe=!1,connectorStrokeWidth:y=2,language:u="en",minHeight:M=0,theme:G="light",maxBarThickness:X,maxNumberOfBars:L,minBarThickness:j,ariaLabel:p,resetSelectionOnDoubleClick:m=!0,detailsOnClick:H,axisTitle:W,noOfTicks:K=5,valueColor:P,styles:C,classNames:b,labelOrder:S,refValues:Q,filterNA:V=!0,animate:$=!1,precision:Y=2,customLayers:k=[],showColorScale:f=!0,highlightedDataPoints:T=[],dimmedOpacity:a=.3,timeline:t={enabled:!1,autoplay:!1,showOnlyActiveDate:!0},sortData:n}=ye,[o,de]=x.useState(0),[Ee,Re]=x.useState(0),[me,Ie]=x.useState(t.autoplay),c=je.sort(Le.uniqBy(l.filter(e=>e.date!==void 0&&e.date!==null),e=>e.date).map(e=>ve.parse(`${e.date}`,t.dateFormat||"yyyy",new Date).getTime()),(e,r)=>Ke.ascending(e,r)),[be,we]=x.useState(t.autoplay?0:c.length-1),[De,Se]=x.useState(void 0),he=x.useRef(null),Ce=x.useRef(null);x.useEffect(()=>{const e=new ResizeObserver(r=>{de(s||r[0].target.clientWidth||620),Re(N||r[0].target.clientHeight||480)});return he.current&&(Re(he.current.clientHeight||480),de(he.current.clientWidth||620),s||e.observe(he.current)),()=>e.disconnect()},[s,N]),x.useEffect(()=>{const e=setInterval(()=>{we(r=>r<c.length-1?r+1:0)},(t.speed||2)*1e3);return me||clearInterval(e),()=>clearInterval(e)},[c,me,t.speed]);const Oe=je.getSliderMarks(c,be,t.showOnlyActiveDate,t.dateFormat||"yyyy");return i.jsxRuntimeExports.jsx("div",{className:`${G||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:u==="he"||u==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:i.mo(`${E?E===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${u||"en"}`,s?"w-fit":"w-full",b?.graphContainer),style:{...C?.graphContainer||{},...E&&E!==!0?{backgroundColor:E}:{}},id:re,ref:Ce,"aria-label":p||`${g?`The graph shows ${g}. `:""}This is a dumbbell chart that shows comparisons between two or more data points across categories. ${w?` ${w}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:E?q||"1rem":q||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[g||w||se||d?i.jsxRuntimeExports.jsx(Xe.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:b?.title,description:b?.description},graphTitle:g,graphDescription:w,width:s,graphDownload:se?Ce.current:void 0,dataDownload:d?l.map(e=>e.data).filter(e=>e!==void 0).length>0?l.map(e=>e.data).filter(e=>e!==void 0):l.filter(e=>e!==void 0):null}):null,t.enabled&&c.length>0&&Oe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Ie(!me)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":me?"Click to pause animation":"Click to play animation",children:me?i.jsxRuntimeExports.jsx(Ne.Pause,{}):i.jsxRuntimeExports.jsx(Ne.Play,{})}),i.jsxRuntimeExports.jsx(je.xr,{min:c[0],max:c[c.length-1],marks:Oe,step:null,defaultValue:c[c.length-1],value:c[be],onChangeComplete:e=>{we(c.indexOf(e))},onChange:e=>{we(c.indexOf(e))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:l.length===0?i.jsxRuntimeExports.jsx(Je.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[f?i.jsxRuntimeExports.jsx(_e.ColorLegendWithMouseOver,{width:s,colorDomain:xe,colors:_,colorLegendTitle:O,setSelectedColor:Se,showNAColor:!1}):null,i.jsxRuntimeExports.jsx("div",{className:"flex grow w-full justify-center leading-0",ref:he,"aria-label":"Graph area",children:(s||o)&&(N||Ee)?i.jsxRuntimeExports.jsx(rt,{data:D!==void 0?D==="diff"?Me.orderBy(ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>t.enabled?e.date===ve.format(new Date(c[be]),t.dateFormat||"yyyy"):e).filter(e=>V?!e.x.every(r=>r==null):e),e=>A.checkIfNullOrUndefined(e.x[e.x.length-1])||A.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0],[n||"asc"]).filter((e,r)=>L?r<L:!0):Me.orderBy(ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>t.enabled?e.date===ve.format(new Date(c[be]),t.dateFormat||"yyyy"):e).filter(e=>V?!e.x.every(r=>r==null):e),e=>A.checkIfNullOrUndefined(e.x[D])?-1/0:e.x[D],[n||"asc"]).filter((e,r)=>L?r<L:!0):ke.ensureCompleteDataForDumbbellChart(l,t.dateFormat||"yyyy").filter(e=>V?!e.x.every(r=>r==null):e).filter((e,r)=>L?r<L:!0),dotColors:_,width:s||o,height:Math.max(M,N||(R?M?(s||o)*R>M?(s||o)*R:M:(s||o)*R:Ee)),radius:ae,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,showLabels:I,showValues:h,tooltip:B,suffix:ne,prefix:ge,onSeriesMouseOver:pe,maxValue:A.checkIfNullOrUndefined(v)?Math.max(...l.map(e=>Math.max(...e.x.filter(r=>r!==null))))<0?0:Math.max(...l.map(e=>Math.max(...e.x.filter(r=>r!==null)))):v,minValue:A.checkIfNullOrUndefined(U)?Math.min(...l.map(e=>Math.min(...e.x.filter(r=>r!==null))))>0?0:Math.min(...l.map(e=>Math.min(...e.x.filter(r=>r!==null)))):U,onSeriesMouseClick:fe,selectedColor:De,arrowConnector:oe,connectorStrokeWidth:y,maxBarThickness:X,minBarThickness:j,resetSelectionOnDoubleClick:m,detailsOnClick:H,axisTitle:W,noOfTicks:K,valueColor:P,styles:C,classNames:b,labelOrder:S,refValues:Q,animate:$===!0?{duration:.5,once:!0,amount:.5}:$||{duration:0,once:!0,amount:0},precision:Y,customLayers:k,highlightedDataPoints:T,dimmedOpacity:a}):null})]})}),z||F?i.jsxRuntimeExports.jsx(Ye.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:b?.footnote,source:b?.source},sources:z,footNote:F,width:s}):null]})})})})}function st(ye){const{data:l,graphTitle:g,colors:_,sources:z,graphDescription:w,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E,radius:ae,tooltip:B,showLabels:I,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne,prefix:ge,maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se,dataDownload:d,showValues:h,sortParameter:D,arrowConnector:oe,connectorStrokeWidth:y,language:u,minHeight:M,theme:G,maxBarThickness:X,maxNumberOfBars:L,minBarThickness:j,ariaLabel:p,resetSelectionOnDoubleClick:m,detailsOnClick:H,axisTitle:W,noOfTicks:K,valueColor:P,orientation:C="vertical",styles:b,classNames:S,labelOrder:Q,refValues:V,filterNA:$,animate:Y,precision:k,showColorScale:f,customLayers:T,highlightedDataPoints:a,dimmedOpacity:t,timeline:n,sortData:o}=ye;return C==="vertical"?i.jsxRuntimeExports.jsx(nt,{data:l,graphTitle:g,colors:_,sources:z,graphDescription:w,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E,radius:ae,tooltip:B,showLabels:I,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne,prefix:ge,maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se,dataDownload:d,showValues:h,sortParameter:D,arrowConnector:oe,connectorStrokeWidth:y,language:u,minHeight:M,theme:G,maxBarThickness:X,maxNumberOfBars:L,minBarThickness:j,ariaLabel:p,resetSelectionOnDoubleClick:m,styles:b,detailsOnClick:H,axisTitle:W,noOfTicks:K,labelOrder:Q,valueColor:P,classNames:S,refValues:V,filterNA:$,animate:Y,precision:k,showColorScale:f,customLayers:T,highlightedDataPoints:a,dimmedOpacity:t,timeline:n,sortData:o}):i.jsxRuntimeExports.jsx(at,{data:l,graphTitle:g,colors:_,sources:z,graphDescription:w,barPadding:ue,showTicks:Z,leftMargin:ee,rightMargin:ce,topMargin:te,bottomMargin:ie,truncateBy:J,height:N,width:s,footNote:F,colorDomain:xe,colorLegendTitle:O,padding:q,backgroundColor:E,radius:ae,tooltip:B,showLabels:I,relativeHeight:R,onSeriesMouseOver:pe,graphID:re,suffix:ne,prefix:ge,maxValue:v,minValue:U,onSeriesMouseClick:fe,graphDownload:se,dataDownload:d,showValues:h,sortParameter:D,arrowConnector:oe,connectorStrokeWidth:y,language:u,minHeight:M,theme:G,maxBarThickness:X,maxNumberOfBars:L,minBarThickness:j,ariaLabel:p,resetSelectionOnDoubleClick:m,styles:b,detailsOnClick:H,axisTitle:W,noOfTicks:K,valueColor:P,classNames:S,labelOrder:Q,refValues:V,filterNA:$,animate:Y,precision:k,showColorScale:f,customLayers:T,highlightedDataPoints:a,dimmedOpacity:t,timeline:n,sortData:o})}exports.DumbbellChart=st;
2
2
  //# sourceMappingURL=DumbbellChart.cjs.map
@@ -2,14 +2,14 @@ import { j as i, m as ke } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
2
  import { useRef as Ce, useState as L, useEffect as De } from "react";
3
3
  import { p as Se, f as Ie } from "./parse-DlCRUFh_.js";
4
4
  import { s as Pe, g as Fe, x as Be } from "./getSliderMarks-C0jptXeP.js";
5
- import { u as We } from "./index-CaAIPGZo.js";
6
- import { o as Ve } from "./index-BLizQDlg.js";
7
- import { i as He } from "./index-27yTRcko.js";
5
+ import { u as We } from "./index-AqnpA7_O.js";
6
+ import { o as Ve } from "./index-DvVprvy6.js";
7
+ import { i as He } from "./index-Bwrro8-q.js";
8
8
  import { X as Xe } from "./Modal-DVVwpKhP.js";
9
9
  import { n as Ae } from "./numberFormattingFunction-14YCbkN2.js";
10
- import { T as Ye } from "./Tooltip-DyM5snqx.js";
10
+ import { T as Ye } from "./Tooltip-CVCGWyzw.js";
11
11
  import { c as F } from "./checkIfNullOrUndefined-DmfiKkNw.js";
12
- import { s as Ee } from "./string2HTML-CWHGfz_d.js";
12
+ import { s as Ee } from "./string2HTML-oFCROsus.js";
13
13
  import { X as rt } from "./XTicksAndGridLines-Bn9u5gOM.js";
14
14
  import { A as _e } from "./AxisTitle-BmHLMRJZ.js";
15
15
  import { Y as lt } from "./YAxesLabels-CPGZjmZJ.js";
@@ -26,7 +26,7 @@ import { ColorLegendWithMouseOver as Qe } from "./ColorLegendWithMouseOver.js";
26
26
  import { Colors as Ze } from "./Colors.js";
27
27
  import { E as et } from "./EmptyState-DdTp-Mdn.js";
28
28
  import { P as tt, f as it } from "./index-BmCqpO1B.js";
29
- import { b as ve } from "./ensureCompleteData-BBDZbDCE.js";
29
+ import { b as ve } from "./ensureCompleteData-BALdOrsS.js";
30
30
  import { c as at } from "./init-BhZylTFx.js";
31
31
  import { A as st } from "./Axis-Ddg-seDi.js";
32
32
  import { X as ct } from "./XAxesLabels-CaV2q-6H.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),n=require("react"),T=require("maplibre-gl"),O=require("pmtiles");;/* empty css */const C=require("@dnd-kit/core"),_=require("@dnd-kit/modifiers"),L=require("./index-BW_-wD2k.cjs"),I=require("./string2HTML-D2Avudmb.cjs"),q=require("./select-Bnfk0lJx.cjs"),A=require("./GraphHeader.cjs"),W=require("./GraphFooter.cjs");function G(o){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(s,r,t.get?t:{enumerable:!0,get:()=>o[r]})}}return s.default=o,Object.freeze(s)}const v=G(T),X=G(O);function B(o,s){let r=!1;function t(i,p){if(!r){r=!0;const l=i.getCenter(),a=i.getZoom(),x=i.getBearing(),c=i.getPitch();p.jumpTo({center:l,zoom:a,bearing:x,pitch:c}),r=!1}}o.on("move",()=>{t(o,s)}),s.on("move",()=>{t(s,o)})}function F(o){const{height:s,width:r,mapStyles:t,center:i,zoomLevel:p,mapLegend:l}=o,[a,x]=n.useState(50),[c,S]=n.useState(!1),d=n.useRef(null),[N,M]=n.useState(!0),w=n.useRef(50),m=n.useRef(0),D=C.useSensors(C.useSensor(C.PointerSensor,{activationConstraint:{distance:0}})),k=()=>{S(!0),w.current=a,d.current&&(m.current=d.current.getBoundingClientRect().width)},h=u=>{if(!d.current||m.current===0)return;const g=u.delta.x/m.current*100,E=Math.max(0,Math.min(100,w.current+g));x(E)},f=()=>{S(!1)},z=u=>{if(c||!d.current)return;const g=d.current.getBoundingClientRect(),P=(u.clientX-g.left)/g.width*100;x(Math.max(0,Math.min(100,P)))},b=n.useRef(null),j=n.useRef(null),y=n.useRef(null),R=n.useRef(null);return n.useEffect(()=>{if(R.current&&j.current&&y.current&&r){q.select(R.current).selectAll(".maplibregl-compare").remove(),q.select(j.current).selectAll("div").remove(),q.select(y.current).selectAll("div").remove();const P=new X.Protocol;v.addProtocol("pmtiles",P.tile);const H=new v.Map({container:j.current,style:t[0],center:i||[0,0],zoom:p||4}),$=new v.Map({container:y.current,style:t[1],center:i||[0,0],zoom:p||4});$.addControl(new v.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),H.addControl(new v.ScaleControl,"bottom-left"),H.addControl(new v.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),$.addControl(new v.ScaleControl,"bottom-left"),B(H,$)}},[r,t,i,p]),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col grow justify-center leading-0",ref:b,"aria-label":"Map area",children:[e.jsxRuntimeExports.jsx("div",{style:{width:r,height:s},children:e.jsxRuntimeExports.jsx("div",{ref:R,className:"map maplibre-show-control relative w-full h-full",style:{inset:0},children:e.jsxRuntimeExports.jsx(C.DndContext,{sensors:D,modifiers:[_.restrictToHorizontalAxis],onDragStart:k,onDragMove:h,onDragEnd:f,children:e.jsxRuntimeExports.jsxs("div",{ref:d,style:{position:"relative",width:r,height:s,overflow:"hidden",cursor:c?"grabbing":"col-resize",userSelect:"none"},onClick:z,children:[e.jsxRuntimeExports.jsx("div",{ref:y,className:"absolute h-full rightMap w-full",style:{position:"absolute",top:0,left:0,clipPath:`polygon(${a}% 0%, ${a}% 100%, 100% 100%, 100% 0%)`}}),e.jsxRuntimeExports.jsx("div",{ref:j,className:"absolute h-full leftMap w-full",style:{position:"absolute",top:0,left:0,inset:0,clipPath:`polygon(0% 0%, ${a}% 0%, ${a}% 100%, 0% 100%)`}}),e.jsxRuntimeExports.jsx(Z,{position:a})]})})})}),l?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:N?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{M(!1)},children:e.jsxRuntimeExports.jsx(L.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},dangerouslySetInnerHTML:typeof l=="string"?{__html:I.string2HTML(l)}:void 0,children:n.isValidElement(l)?l:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{M(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]})}function Z(o){const{position:s}=o,{attributes:r,listeners:t,setNodeRef:i}=C.useDraggable({id:"slider-handle"});return e.jsxRuntimeExports.jsxs("div",{ref:i,style:{position:"absolute",left:`${s}%`,top:0,bottom:0,width:"40px",transform:"translateX(-50%)",cursor:"col-resize",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10,touchAction:"none"},...t,...r,children:[e.jsxRuntimeExports.jsx("div",{className:"h-full bg-primary-blue-600 dark:bg-primary-blue-400",style:{width:"2px"}}),e.jsxRuntimeExports.jsx("div",{className:"flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white",style:{boxShadow:"inset 0 0 0 1px #fff",width:"42px",height:"42px",top:"calc(50% - 21px)",left:"0",cursor:"col-resize"},children:e.jsxRuntimeExports.jsx(L.ChevronLeftRight,{})})]})}function V(o){const{graphTitle:s,height:r,width:t,relativeHeight:i,sources:p,graphDescription:l,footNote:a,padding:x,backgroundColor:c=!1,graphID:S,mapStyles:d,center:N=[0,0],zoomLevel:M=3,language:w="en",minHeight:m=0,theme:D="light",ariaLabel:k,styles:h,classNames:f,mapLegend:z}=o,[b,j]=n.useState(0),[y,R]=n.useState(0),u=n.useRef(null);return n.useEffect(()=>{const g=new ResizeObserver(E=>{j(t||E[0].target.clientWidth||620),R(r||E[0].target.clientHeight||480)});return u.current&&(R(u.current.clientHeight||480),j(u.current.clientWidth||620),t||g.observe(u.current)),()=>g.disconnect()},[t,r]),e.jsxRuntimeExports.jsx("div",{className:`${D||"light"} flex ${t?"w-fit grow-0":"w-full grow"}`,dir:w==="he"||w==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${w||"en"}`,t?"w-fit":"w-full",f?.graphContainer),style:{...h?.graphContainer||{},...c&&c!==!0?{backgroundColor:c}:{}},id:S,"aria-label":k||`${s?`The graph shows ${s}. `:""}This is a comparison between two maps.${l?` ${l}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:c?x||"1rem":x||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[s||l?e.jsxRuntimeExports.jsx(A.GraphHeader,{styles:{title:h?.title,description:h?.description},classNames:{title:f?.title,description:f?.description},graphTitle:s,graphDescription:l,width:t}):null,e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:u,"aria-label":"map area",children:(t||b)&&(r||y)?e.jsxRuntimeExports.jsx(F,{width:t||b,height:Math.max(m,r||(i?m?(t||b)*i>m?(t||b)*i:m:(t||b)*i:y)),mapStyles:d,center:N,zoomLevel:M,mapLegend:z}):null}),p||a?e.jsxRuntimeExports.jsx(W.GraphFooter,{styles:{footnote:h?.footnote,source:h?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:p,footNote:a,width:t}):null]})})})})}exports.GeoHubCompareMaps=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),n=require("react"),T=require("maplibre-gl"),O=require("pmtiles");;/* empty css */const C=require("@dnd-kit/core"),_=require("@dnd-kit/modifiers"),L=require("./index-BW_-wD2k.cjs"),I=require("./string2HTML-z7CwHXcx.cjs"),q=require("./select-Bnfk0lJx.cjs"),A=require("./GraphHeader.cjs"),W=require("./GraphFooter.cjs");function G(o){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(s,r,t.get?t:{enumerable:!0,get:()=>o[r]})}}return s.default=o,Object.freeze(s)}const v=G(T),X=G(O);function B(o,s){let r=!1;function t(i,p){if(!r){r=!0;const l=i.getCenter(),a=i.getZoom(),x=i.getBearing(),c=i.getPitch();p.jumpTo({center:l,zoom:a,bearing:x,pitch:c}),r=!1}}o.on("move",()=>{t(o,s)}),s.on("move",()=>{t(s,o)})}function F(o){const{height:s,width:r,mapStyles:t,center:i,zoomLevel:p,mapLegend:l}=o,[a,x]=n.useState(50),[c,S]=n.useState(!1),d=n.useRef(null),[N,M]=n.useState(!0),w=n.useRef(50),m=n.useRef(0),D=C.useSensors(C.useSensor(C.PointerSensor,{activationConstraint:{distance:0}})),k=()=>{S(!0),w.current=a,d.current&&(m.current=d.current.getBoundingClientRect().width)},h=u=>{if(!d.current||m.current===0)return;const g=u.delta.x/m.current*100,E=Math.max(0,Math.min(100,w.current+g));x(E)},f=()=>{S(!1)},z=u=>{if(c||!d.current)return;const g=d.current.getBoundingClientRect(),P=(u.clientX-g.left)/g.width*100;x(Math.max(0,Math.min(100,P)))},b=n.useRef(null),j=n.useRef(null),y=n.useRef(null),R=n.useRef(null);return n.useEffect(()=>{if(R.current&&j.current&&y.current&&r){q.select(R.current).selectAll(".maplibregl-compare").remove(),q.select(j.current).selectAll("div").remove(),q.select(y.current).selectAll("div").remove();const P=new X.Protocol;v.addProtocol("pmtiles",P.tile);const H=new v.Map({container:j.current,style:t[0],center:i||[0,0],zoom:p||4}),$=new v.Map({container:y.current,style:t[1],center:i||[0,0],zoom:p||4});$.addControl(new v.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),H.addControl(new v.ScaleControl,"bottom-left"),H.addControl(new v.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),$.addControl(new v.ScaleControl,"bottom-left"),B(H,$)}},[r,t,i,p]),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col grow justify-center leading-0",ref:b,"aria-label":"Map area",children:[e.jsxRuntimeExports.jsx("div",{style:{width:r,height:s},children:e.jsxRuntimeExports.jsx("div",{ref:R,className:"map maplibre-show-control relative w-full h-full",style:{inset:0},children:e.jsxRuntimeExports.jsx(C.DndContext,{sensors:D,modifiers:[_.restrictToHorizontalAxis],onDragStart:k,onDragMove:h,onDragEnd:f,children:e.jsxRuntimeExports.jsxs("div",{ref:d,style:{position:"relative",width:r,height:s,overflow:"hidden",cursor:c?"grabbing":"col-resize",userSelect:"none"},onClick:z,children:[e.jsxRuntimeExports.jsx("div",{ref:y,className:"absolute h-full rightMap w-full",style:{position:"absolute",top:0,left:0,clipPath:`polygon(${a}% 0%, ${a}% 100%, 100% 100%, 100% 0%)`}}),e.jsxRuntimeExports.jsx("div",{ref:j,className:"absolute h-full leftMap w-full",style:{position:"absolute",top:0,left:0,inset:0,clipPath:`polygon(0% 0%, ${a}% 0%, ${a}% 100%, 0% 100%)`}}),e.jsxRuntimeExports.jsx(Z,{position:a})]})})})}),l?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:N?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{M(!1)},children:e.jsxRuntimeExports.jsx(L.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},dangerouslySetInnerHTML:typeof l=="string"?{__html:I.string2HTML(l)}:void 0,children:n.isValidElement(l)?l:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{M(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]})}function Z(o){const{position:s}=o,{attributes:r,listeners:t,setNodeRef:i}=C.useDraggable({id:"slider-handle"});return e.jsxRuntimeExports.jsxs("div",{ref:i,style:{position:"absolute",left:`${s}%`,top:0,bottom:0,width:"40px",transform:"translateX(-50%)",cursor:"col-resize",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10,touchAction:"none"},...t,...r,children:[e.jsxRuntimeExports.jsx("div",{className:"h-full bg-primary-blue-600 dark:bg-primary-blue-400",style:{width:"2px"}}),e.jsxRuntimeExports.jsx("div",{className:"flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white",style:{boxShadow:"inset 0 0 0 1px #fff",width:"42px",height:"42px",top:"calc(50% - 21px)",left:"0",cursor:"col-resize"},children:e.jsxRuntimeExports.jsx(L.ChevronLeftRight,{})})]})}function V(o){const{graphTitle:s,height:r,width:t,relativeHeight:i,sources:p,graphDescription:l,footNote:a,padding:x,backgroundColor:c=!1,graphID:S,mapStyles:d,center:N=[0,0],zoomLevel:M=3,language:w="en",minHeight:m=0,theme:D="light",ariaLabel:k,styles:h,classNames:f,mapLegend:z}=o,[b,j]=n.useState(0),[y,R]=n.useState(0),u=n.useRef(null);return n.useEffect(()=>{const g=new ResizeObserver(E=>{j(t||E[0].target.clientWidth||620),R(r||E[0].target.clientHeight||480)});return u.current&&(R(u.current.clientHeight||480),j(u.current.clientWidth||620),t||g.observe(u.current)),()=>g.disconnect()},[t,r]),e.jsxRuntimeExports.jsx("div",{className:`${D||"light"} flex ${t?"w-fit grow-0":"w-full grow"}`,dir:w==="he"||w==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${w||"en"}`,t?"w-fit":"w-full",f?.graphContainer),style:{...h?.graphContainer||{},...c&&c!==!0?{backgroundColor:c}:{}},id:S,"aria-label":k||`${s?`The graph shows ${s}. `:""}This is a comparison between two maps.${l?` ${l}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:c?x||"1rem":x||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[s||l?e.jsxRuntimeExports.jsx(A.GraphHeader,{styles:{title:h?.title,description:h?.description},classNames:{title:f?.title,description:f?.description},graphTitle:s,graphDescription:l,width:t}):null,e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:u,"aria-label":"map area",children:(t||b)&&(r||y)?e.jsxRuntimeExports.jsx(F,{width:t||b,height:Math.max(m,r||(i?m?(t||b)*i>m?(t||b)*i:m:(t||b)*i:y)),mapStyles:d,center:N,zoomLevel:M,mapLegend:z}):null}),p||a?e.jsxRuntimeExports.jsx(W.GraphFooter,{styles:{footnote:h?.footnote,source:h?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:p,footNote:a,width:t}):null]})})})})}exports.GeoHubCompareMaps=V;
2
2
  //# sourceMappingURL=GeoHubCompareMaps.cjs.map
@@ -6,7 +6,7 @@ import * as G from "pmtiles";
6
6
  import { useSensors as W, useSensor as X, PointerSensor as _, DndContext as B, useDraggable as Z } from "@dnd-kit/core";
7
7
  import { restrictToHorizontalAxis as F } from "@dnd-kit/modifiers";
8
8
  import { X as O, C as V } from "./index-BmCqpO1B.js";
9
- import { s as q } from "./string2HTML-CWHGfz_d.js";
9
+ import { s as q } from "./string2HTML-oFCROsus.js";
10
10
  import { s as T } from "./select-DKy99ogv.js";
11
11
  import { GraphHeader as J } from "./GraphHeader.js";
12
12
  import { GraphFooter as K } from "./GraphFooter.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),s=require("react"),O=require("./DropdownSelect-DBDM64B5.cjs"),R=require("maplibre-gl"),T=require("pmtiles");;/* empty css */const N=require("./fetchAndParseData-CQyVGCul.cjs"),L=require("./filterData-DN6py7y_.cjs"),D=require("./index-BW_-wD2k.cjs"),z=require("./string2HTML-D2Avudmb.cjs"),P=require("./select-Bnfk0lJx.cjs"),W=require("./GraphHeader.cjs"),$=require("./GraphFooter.cjs");function A(h){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const n in h)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(h,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>h[n]})}}return t.default=h,Object.freeze(t)}const q=A(T);function _(h){const{mapStyle:t,height:n,width:r,relativeHeight:a,center:b,zoomLevel:j,minHeight:u,includeLayers:p,excludeLayers:g,mapLegend:i}=h,[o,w]=s.useState(0),[E,f]=s.useState(0),[H,S]=s.useState(!0),d=s.useRef(null),x=s.useRef(null),l=s.useRef(null);return s.useEffect(()=>{const c=new ResizeObserver(m=>{w(r||m[0].target.clientWidth||620),f(n||m[0].target.clientHeight||480)});return d.current&&(f(d.current.clientHeight||480),w(d.current.clientWidth||620),r||c.observe(d.current)),()=>c.disconnect()},[r,n]),s.useEffect(()=>{x.current&&o&&!l.current&&N.fetchAndParseJSON(t).then(c=>{P.select(x.current).selectAll("div").remove();const y=new q.Protocol;R.addProtocol("pmtiles",y.tile);const v={container:x.current,style:p.length===0&&g.length===0?c:{...c,layers:L.filterData(c.layers,[{column:"id",includeValues:p,excludeValues:g}])},attributionControl:!0};b&&(v.center=b),j&&(v.zoom=j),l.current=new R.Map(v),l.current.addControl(new R.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),l.current.addControl(new R.ScaleControl,"bottom-left")})},[o,b,j,p,g,t]),s.useEffect(()=>{l.current&&N.fetchAndParseJSON(t).then(c=>{const m={...c,layers:L.filterData(c.layers,[{column:"id",includeValues:p,excludeValues:g}])};l.current.setStyle(m)})},[g,p,t]),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:d,"aria-label":"Map area",children:(r||o)&&(n||E)?e.jsxRuntimeExports.jsxs("div",{style:{width:r||o,height:Math.max(u,n||(a?u?(r||o)*a>u?(r||o)*a:u:(r||o)*a:E))},children:[e.jsxRuntimeExports.jsx("div",{ref:x,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),i?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:H?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{S(!1)},children:e.jsxRuntimeExports.jsx(D.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},dangerouslySetInnerHTML:typeof i=="string"?{__html:z.string2HTML(i)}:void 0,children:s.isValidElement(i)?i:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{S(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null})}function I(h){const{mapStyle:t,height:n,width:r,relativeHeight:a,center:b,zoomLevel:j,minHeight:u,includeLayers:p,excludeLayers:g,mapLegend:i}=h,[o,w]=s.useState(0),[E,f]=s.useState(0),[H,S]=s.useState(!0),d=s.useRef(null),x=s.useRef(null);return s.useEffect(()=>{const l=new ResizeObserver(c=>{w(r||c[0].target.clientWidth||620),f(n||c[0].target.clientHeight||480)});return d.current&&(f(d.current.clientHeight||480),w(d.current.clientWidth||620),r||l.observe(d.current)),()=>l.disconnect()},[r,n]),s.useEffect(()=>{x.current&&o&&N.fetchAndParseJSON(t).then(l=>{P.select(x.current).selectAll("div").remove();const m=new q.Protocol;R.addProtocol("pmtiles",m.tile);const y={container:x.current,style:p.length===0&&g.length===0?l:{...l,layers:L.filterData(l.layers,[{column:"id",includeValues:p,excludeValues:g}])},attributionControl:!0};b&&(y.center=b),j&&(y.zoom=j);const v=new R.Map(y);v.addControl(new R.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),v.addControl(new R.ScaleControl,"bottom-left")})},[o,t,b,j,p,g]),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:d,"aria-label":"Map area",children:(r||o)&&(n||E)?e.jsxRuntimeExports.jsxs("div",{style:{width:r||o,height:Math.max(u,n||(a?u?(r||o)*a>u?(r||o)*a:u:(r||o)*a:E))},children:[e.jsxRuntimeExports.jsx("div",{ref:x,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),i?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:H?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{S(!1)},children:e.jsxRuntimeExports.jsx(D.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},dangerouslySetInnerHTML:typeof i=="string"?{__html:z.string2HTML(i)}:void 0,children:s.isValidElement(i)?i:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{S(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null})}function F(h){const{mapStyle:t,graphTitle:n,height:r,width:a,relativeHeight:b,sources:j,graphDescription:u,footNote:p,padding:g,backgroundColor:i=!1,center:o,zoomLevel:w,graphID:E,language:f="en",minHeight:H=0,theme:S="light",includeLayers:d=[],excludeLayers:x=[],ariaLabel:l,uiMode:c="normal",styles:m,classNames:y,mapLegend:v}=h,[M,k]=s.useState(typeof t=="string"?t:t[0].style);s.useEffect(()=>{k(typeof t=="string"?t:t[0].style)},[t]);const V=s.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return e.jsxRuntimeExports.jsx("div",{className:`${S||"light"} flex ${a?"w-fit grow-0":"w-full grow"}`,dir:f==="he"||f==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${i?i===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${f||"en"}`,a?"w-fit":"w-full",y?.graphContainer),style:{...m?.graphContainer||{},...i&&i!==!0?{backgroundColor:i}:{}},id:E,"aria-label":l||`${n?`The graph shows ${n}. `:""}This is a map.${u?` ${u}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:i?g||"1rem":g||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||u?e.jsxRuntimeExports.jsx(W.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:y?.title,description:y?.description},graphTitle:n,graphDescription:u,width:a}):null,typeof t=="string"?null:e.jsxRuntimeExports.jsx(O.Za,{options:t.map(C=>({label:C.name,value:C.style})),isClearable:!1,size:"sm",variant:c,isRtl:f==="he"||f==="ar",isSearchable:!0,filterOption:O.Hu(V),defaultValue:{label:t[0].name,value:t[0].style},controlShouldRenderValue:!0,onChange:C=>{C&&k(C.value)}}),typeof t=="string"?e.jsxRuntimeExports.jsx(I,{mapStyle:t,center:o,zoomLevel:w,width:a,height:r,relativeHeight:b,minHeight:H,includeLayers:d,excludeLayers:x,mapLegend:v}):e.jsxRuntimeExports.jsx(_,{mapStyle:M,center:o,zoomLevel:w,width:a,height:r,relativeHeight:b,minHeight:H,includeLayers:d,excludeLayers:x,mapLegend:(v||[]).find(C=>C.mapStyleName===t.find(G=>G.style===M)?.name)?.legend}),j||p?e.jsxRuntimeExports.jsx($.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:y?.footnote,source:y?.source},sources:j,footNote:p,width:a}):null]})})})})}exports.GeoHubMap=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),s=require("react"),O=require("./DropdownSelect-DBDM64B5.cjs"),R=require("maplibre-gl"),T=require("pmtiles");;/* empty css */const N=require("./fetchAndParseData-Dcy7AS_0.cjs"),L=require("./filterData-BoYadk0l.cjs"),D=require("./index-BW_-wD2k.cjs"),z=require("./string2HTML-z7CwHXcx.cjs"),P=require("./select-Bnfk0lJx.cjs"),W=require("./GraphHeader.cjs"),$=require("./GraphFooter.cjs");function A(h){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const n in h)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(h,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>h[n]})}}return t.default=h,Object.freeze(t)}const q=A(T);function _(h){const{mapStyle:t,height:n,width:r,relativeHeight:a,center:b,zoomLevel:j,minHeight:u,includeLayers:p,excludeLayers:g,mapLegend:i}=h,[o,w]=s.useState(0),[E,f]=s.useState(0),[H,S]=s.useState(!0),d=s.useRef(null),x=s.useRef(null),l=s.useRef(null);return s.useEffect(()=>{const c=new ResizeObserver(m=>{w(r||m[0].target.clientWidth||620),f(n||m[0].target.clientHeight||480)});return d.current&&(f(d.current.clientHeight||480),w(d.current.clientWidth||620),r||c.observe(d.current)),()=>c.disconnect()},[r,n]),s.useEffect(()=>{x.current&&o&&!l.current&&N.fetchAndParseJSON(t).then(c=>{P.select(x.current).selectAll("div").remove();const y=new q.Protocol;R.addProtocol("pmtiles",y.tile);const v={container:x.current,style:p.length===0&&g.length===0?c:{...c,layers:L.filterData(c.layers,[{column:"id",includeValues:p,excludeValues:g}])},attributionControl:!0};b&&(v.center=b),j&&(v.zoom=j),l.current=new R.Map(v),l.current.addControl(new R.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),l.current.addControl(new R.ScaleControl,"bottom-left")})},[o,b,j,p,g,t]),s.useEffect(()=>{l.current&&N.fetchAndParseJSON(t).then(c=>{const m={...c,layers:L.filterData(c.layers,[{column:"id",includeValues:p,excludeValues:g}])};l.current.setStyle(m)})},[g,p,t]),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:d,"aria-label":"Map area",children:(r||o)&&(n||E)?e.jsxRuntimeExports.jsxs("div",{style:{width:r||o,height:Math.max(u,n||(a?u?(r||o)*a>u?(r||o)*a:u:(r||o)*a:E))},children:[e.jsxRuntimeExports.jsx("div",{ref:x,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),i?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:H?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{S(!1)},children:e.jsxRuntimeExports.jsx(D.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},dangerouslySetInnerHTML:typeof i=="string"?{__html:z.string2HTML(i)}:void 0,children:s.isValidElement(i)?i:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{S(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null})}function I(h){const{mapStyle:t,height:n,width:r,relativeHeight:a,center:b,zoomLevel:j,minHeight:u,includeLayers:p,excludeLayers:g,mapLegend:i}=h,[o,w]=s.useState(0),[E,f]=s.useState(0),[H,S]=s.useState(!0),d=s.useRef(null),x=s.useRef(null);return s.useEffect(()=>{const l=new ResizeObserver(c=>{w(r||c[0].target.clientWidth||620),f(n||c[0].target.clientHeight||480)});return d.current&&(f(d.current.clientHeight||480),w(d.current.clientWidth||620),r||l.observe(d.current)),()=>l.disconnect()},[r,n]),s.useEffect(()=>{x.current&&o&&N.fetchAndParseJSON(t).then(l=>{P.select(x.current).selectAll("div").remove();const m=new q.Protocol;R.addProtocol("pmtiles",m.tile);const y={container:x.current,style:p.length===0&&g.length===0?l:{...l,layers:L.filterData(l.layers,[{column:"id",includeValues:p,excludeValues:g}])},attributionControl:!0};b&&(y.center=b),j&&(y.zoom=j);const v=new R.Map(y);v.addControl(new R.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),v.addControl(new R.ScaleControl,"bottom-left")})},[o,t,b,j,p,g]),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:d,"aria-label":"Map area",children:(r||o)&&(n||E)?e.jsxRuntimeExports.jsxs("div",{style:{width:r||o,height:Math.max(u,n||(a?u?(r||o)*a>u?(r||o)*a:u:(r||o)*a:E))},children:[e.jsxRuntimeExports.jsx("div",{ref:x,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),i?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:H?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{S(!1)},children:e.jsxRuntimeExports.jsx(D.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},dangerouslySetInnerHTML:typeof i=="string"?{__html:z.string2HTML(i)}:void 0,children:s.isValidElement(i)?i:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{S(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null})}function F(h){const{mapStyle:t,graphTitle:n,height:r,width:a,relativeHeight:b,sources:j,graphDescription:u,footNote:p,padding:g,backgroundColor:i=!1,center:o,zoomLevel:w,graphID:E,language:f="en",minHeight:H=0,theme:S="light",includeLayers:d=[],excludeLayers:x=[],ariaLabel:l,uiMode:c="normal",styles:m,classNames:y,mapLegend:v}=h,[M,k]=s.useState(typeof t=="string"?t:t[0].style);s.useEffect(()=>{k(typeof t=="string"?t:t[0].style)},[t]);const V=s.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return e.jsxRuntimeExports.jsx("div",{className:`${S||"light"} flex ${a?"w-fit grow-0":"w-full grow"}`,dir:f==="he"||f==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${i?i===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${f||"en"}`,a?"w-fit":"w-full",y?.graphContainer),style:{...m?.graphContainer||{},...i&&i!==!0?{backgroundColor:i}:{}},id:E,"aria-label":l||`${n?`The graph shows ${n}. `:""}This is a map.${u?` ${u}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:i?g||"1rem":g||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||u?e.jsxRuntimeExports.jsx(W.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:y?.title,description:y?.description},graphTitle:n,graphDescription:u,width:a}):null,typeof t=="string"?null:e.jsxRuntimeExports.jsx(O.Za,{options:t.map(C=>({label:C.name,value:C.style})),isClearable:!1,size:"sm",variant:c,isRtl:f==="he"||f==="ar",isSearchable:!0,filterOption:O.Hu(V),defaultValue:{label:t[0].name,value:t[0].style},controlShouldRenderValue:!0,onChange:C=>{C&&k(C.value)}}),typeof t=="string"?e.jsxRuntimeExports.jsx(I,{mapStyle:t,center:o,zoomLevel:w,width:a,height:r,relativeHeight:b,minHeight:H,includeLayers:d,excludeLayers:x,mapLegend:v}):e.jsxRuntimeExports.jsx(_,{mapStyle:M,center:o,zoomLevel:w,width:a,height:r,relativeHeight:b,minHeight:H,includeLayers:d,excludeLayers:x,mapLegend:(v||[]).find(C=>C.mapStyleName===t.find(G=>G.style===M)?.name)?.legend}),j||p?e.jsxRuntimeExports.jsx($.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:y?.footnote,source:y?.source},sources:j,footNote:p,width:a}):null]})})})})}exports.GeoHubMap=F;
2
2
  //# sourceMappingURL=GeoHubMap.cjs.map
package/dist/GeoHubMap.js CHANGED
@@ -4,10 +4,10 @@ import { Z as E, H as Z } from "./DropdownSelect-CtOKZHD0.js";
4
4
  import w from "maplibre-gl";
5
5
  import * as W from "pmtiles";
6
6
  /* empty css */
7
- import { f as z } from "./fetchAndParseData-4gsYTy6_.js";
8
- import { f as V } from "./filterData-B8ocT57s.js";
7
+ import { f as z } from "./fetchAndParseData-DBOl1Icl.js";
8
+ import { f as V } from "./filterData-9nEcQ-Jp.js";
9
9
  import { X as _ } from "./index-BmCqpO1B.js";
10
- import { s as $ } from "./string2HTML-CWHGfz_d.js";
10
+ import { s as $ } from "./string2HTML-oFCROsus.js";
11
11
  import { s as P } from "./select-DKy99ogv.js";
12
12
  import { GraphHeader as F } from "./GraphHeader.js";
13
13
  import { GraphFooter as J } from "./GraphFooter.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),r=require("react"),I=require("./index-B0rbzOoC.cjs"),q=require("./DropdownSelect-DBDM64B5.cjs"),C=require("maplibre-gl"),P=require("pmtiles");;/* empty css */const M=require("./fetchAndParseData-CQyVGCul.cjs"),O=require("./filterData-DN6py7y_.cjs"),z=require("./string2HTML-D2Avudmb.cjs"),$=require("./index-BW_-wD2k.cjs"),G=require("./select-Bnfk0lJx.cjs"),T=require("./GraphHeader.cjs"),V=require("./GraphFooter.cjs");function W(p){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const t in p)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(p,t);Object.defineProperty(c,t,s.get?s:{enumerable:!0,get:()=>p[t]})}}return c.default=p,Object.freeze(c)}const A=W(P);function _(p){const{mapStyle:c,height:t,width:s,relativeHeight:u,center:R,zoomLevel:v,minHeight:x,selectedLayer:g,layerIdList:h,excludeLayers:n,mapLegend:b}=p,[f,D]=r.useState(0),[y,L]=r.useState(0),[N,l]=r.useState(!0),[S,H]=r.useState(void 0),j=r.useRef(null),d=r.useRef(null),a=r.useRef(null);return r.useEffect(()=>{const i=new ResizeObserver(m=>{D(s||m[0].target.clientWidth||620),L(t||m[0].target.clientHeight||480)});return j.current&&(L(j.current.clientHeight||480),D(j.current.clientWidth||620),s||i.observe(j.current)),()=>i.disconnect()},[s,t]),r.useEffect(()=>{d.current&&f&&!a.current&&M.fetchAndParseJSON(c).then(i=>{H(i),G.select(d.current).selectAll("div").remove();const w=new A.Protocol;C.addProtocol("pmtiles",w.tile);const E={container:d.current,style:{...i,layers:O.filterData(i.layers,[{column:"id",excludeValues:[...n,...h.filter(o=>g.indexOf(o)===-1)]}])},attributionControl:!0};R&&(E.center=R),v&&(E.zoom=v),a.current=new C.Map(E),a.current.addControl(new C.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),a.current.addControl(new C.ScaleControl,"bottom-left")})},[f,R,v,h,c,n,g]),r.useEffect(()=>{if(a.current)if(S){const i={...S,layers:O.filterData(S.layers,[{column:"id",excludeValues:[...n,...h.filter(m=>g.indexOf(m)===-1)]}])};a.current.setStyle(i)}else M.fetchAndParseJSON(c).then(i=>{const m={...i,layers:O.filterData(i.layers,[{column:"id",excludeValues:[...n,...h.filter(w=>g.indexOf(w)===-1)]}])};a.current.setStyle(m)})},[n,h,c,S,g]),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:j,"aria-label":"Map area",children:(s||f)&&(t||y)?e.jsxRuntimeExports.jsxs("div",{style:{width:s||f,height:Math.max(x,t||(u?x?(s||f)*u>x?(s||f)*u:x:(s||f)*u:y))},children:[e.jsxRuntimeExports.jsx("div",{ref:d,className:"map maplibre-show-control w-full h-full"}),b?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:N?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{l(!1)},children:e.jsxRuntimeExports.jsx($.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},dangerouslySetInnerHTML:typeof b=="string"?{__html:z.string2HTML(b)}:void 0,children:r.isValidElement(b)?b:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{l(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null})}function F(p){const{mapStyle:c,graphTitle:t,height:s,width:u,relativeHeight:R,sources:v,graphDescription:x,footNote:g,padding:h,backgroundColor:n=!1,center:b,zoomLevel:f,graphID:D,language:y="en",minHeight:L=0,theme:N="light",layerSelection:l,excludeLayers:S=[],ariaLabel:H,uiMode:j="normal",styles:d,classNames:a,mapLegend:i=[]}=p,[m,w]=r.useState(l[0].layerID);r.useEffect(()=>{w(l[0].layerID)},[l]);const E=r.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return e.jsxRuntimeExports.jsx("div",{className:`${N||"light"} flex ${u?"w-fit grow-0":"w-full grow"}`,dir:y==="he"||y==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${n?n===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${y||"en"}`,u?"w-fit":"w-full",a?.graphContainer),style:{...d?.graphContainer||{},...n&&n!==!0?{backgroundColor:n}:{}},id:D,"aria-label":H||`${t?`The graph shows ${t}. `:""}This is a map.${x?` ${x}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:n?h||"1rem":h||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[t||x?e.jsxRuntimeExports.jsx(T.GraphHeader,{styles:{title:d?.title,description:d?.description},classNames:{title:a?.title,description:a?.description},graphTitle:t,graphDescription:x,width:u}):null,e.jsxRuntimeExports.jsx(q.Za,{options:l.map(o=>({label:o.name,value:o.layerID})),size:"sm",isClearable:!1,variant:j,isRtl:y==="he"||y==="ar",isSearchable:!0,filterOption:q.Hu(E),defaultValue:{label:l[0].name,value:l[0].layerID},controlShouldRenderValue:!0,onChange:o=>{o&&w(o.value)}}),e.jsxRuntimeExports.jsx(_,{mapStyle:c,center:b,zoomLevel:f,width:u,height:s,relativeHeight:R,minHeight:L,selectedLayer:m,layerIdList:I.flattenDeep(l.map(o=>o.layerID)),excludeLayers:S,mapLegend:i.find(o=>o.mapStyleName===l.find(k=>k.layerID===m)?.name)?.legend}),v||g?e.jsxRuntimeExports.jsx(V.GraphFooter,{styles:{footnote:d?.footnote,source:d?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:v,footNote:g,width:u}):null]})})})})}exports.GeoHubMapWithLayerSelection=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),r=require("react"),I=require("./index-BS2TADPj.cjs"),q=require("./DropdownSelect-DBDM64B5.cjs"),C=require("maplibre-gl"),P=require("pmtiles");;/* empty css */const M=require("./fetchAndParseData-Dcy7AS_0.cjs"),O=require("./filterData-BoYadk0l.cjs"),z=require("./string2HTML-z7CwHXcx.cjs"),$=require("./index-BW_-wD2k.cjs"),G=require("./select-Bnfk0lJx.cjs"),T=require("./GraphHeader.cjs"),V=require("./GraphFooter.cjs");function W(p){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const t in p)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(p,t);Object.defineProperty(c,t,s.get?s:{enumerable:!0,get:()=>p[t]})}}return c.default=p,Object.freeze(c)}const A=W(P);function _(p){const{mapStyle:c,height:t,width:s,relativeHeight:u,center:R,zoomLevel:v,minHeight:x,selectedLayer:g,layerIdList:h,excludeLayers:n,mapLegend:b}=p,[f,D]=r.useState(0),[y,L]=r.useState(0),[N,l]=r.useState(!0),[S,H]=r.useState(void 0),j=r.useRef(null),d=r.useRef(null),a=r.useRef(null);return r.useEffect(()=>{const i=new ResizeObserver(m=>{D(s||m[0].target.clientWidth||620),L(t||m[0].target.clientHeight||480)});return j.current&&(L(j.current.clientHeight||480),D(j.current.clientWidth||620),s||i.observe(j.current)),()=>i.disconnect()},[s,t]),r.useEffect(()=>{d.current&&f&&!a.current&&M.fetchAndParseJSON(c).then(i=>{H(i),G.select(d.current).selectAll("div").remove();const w=new A.Protocol;C.addProtocol("pmtiles",w.tile);const E={container:d.current,style:{...i,layers:O.filterData(i.layers,[{column:"id",excludeValues:[...n,...h.filter(o=>g.indexOf(o)===-1)]}])},attributionControl:!0};R&&(E.center=R),v&&(E.zoom=v),a.current=new C.Map(E),a.current.addControl(new C.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),a.current.addControl(new C.ScaleControl,"bottom-left")})},[f,R,v,h,c,n,g]),r.useEffect(()=>{if(a.current)if(S){const i={...S,layers:O.filterData(S.layers,[{column:"id",excludeValues:[...n,...h.filter(m=>g.indexOf(m)===-1)]}])};a.current.setStyle(i)}else M.fetchAndParseJSON(c).then(i=>{const m={...i,layers:O.filterData(i.layers,[{column:"id",excludeValues:[...n,...h.filter(w=>g.indexOf(w)===-1)]}])};a.current.setStyle(m)})},[n,h,c,S,g]),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:j,"aria-label":"Map area",children:(s||f)&&(t||y)?e.jsxRuntimeExports.jsxs("div",{style:{width:s||f,height:Math.max(x,t||(u?x?(s||f)*u>x?(s||f)*u:x:(s||f)*u:y))},children:[e.jsxRuntimeExports.jsx("div",{ref:d,className:"map maplibre-show-control w-full h-full"}),b?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:N?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{l(!1)},children:e.jsxRuntimeExports.jsx($.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},dangerouslySetInnerHTML:typeof b=="string"?{__html:z.string2HTML(b)}:void 0,children:r.isValidElement(b)?b:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{l(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null})}function F(p){const{mapStyle:c,graphTitle:t,height:s,width:u,relativeHeight:R,sources:v,graphDescription:x,footNote:g,padding:h,backgroundColor:n=!1,center:b,zoomLevel:f,graphID:D,language:y="en",minHeight:L=0,theme:N="light",layerSelection:l,excludeLayers:S=[],ariaLabel:H,uiMode:j="normal",styles:d,classNames:a,mapLegend:i=[]}=p,[m,w]=r.useState(l[0].layerID);r.useEffect(()=>{w(l[0].layerID)},[l]);const E=r.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return e.jsxRuntimeExports.jsx("div",{className:`${N||"light"} flex ${u?"w-fit grow-0":"w-full grow"}`,dir:y==="he"||y==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${n?n===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${y||"en"}`,u?"w-fit":"w-full",a?.graphContainer),style:{...d?.graphContainer||{},...n&&n!==!0?{backgroundColor:n}:{}},id:D,"aria-label":H||`${t?`The graph shows ${t}. `:""}This is a map.${x?` ${x}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:n?h||"1rem":h||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[t||x?e.jsxRuntimeExports.jsx(T.GraphHeader,{styles:{title:d?.title,description:d?.description},classNames:{title:a?.title,description:a?.description},graphTitle:t,graphDescription:x,width:u}):null,e.jsxRuntimeExports.jsx(q.Za,{options:l.map(o=>({label:o.name,value:o.layerID})),size:"sm",isClearable:!1,variant:j,isRtl:y==="he"||y==="ar",isSearchable:!0,filterOption:q.Hu(E),defaultValue:{label:l[0].name,value:l[0].layerID},controlShouldRenderValue:!0,onChange:o=>{o&&w(o.value)}}),e.jsxRuntimeExports.jsx(_,{mapStyle:c,center:b,zoomLevel:f,width:u,height:s,relativeHeight:R,minHeight:L,selectedLayer:m,layerIdList:I.flattenDeep(l.map(o=>o.layerID)),excludeLayers:S,mapLegend:i.find(o=>o.mapStyleName===l.find(k=>k.layerID===m)?.name)?.legend}),v||g?e.jsxRuntimeExports.jsx(V.GraphFooter,{styles:{footnote:d?.footnote,source:d?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:v,footNote:g,width:u}):null]})})})})}exports.GeoHubMapWithLayerSelection=F;
2
2
  //# sourceMappingURL=GeoHubMapWithLayerSelection.cjs.map
@@ -1,13 +1,13 @@
1
1
  import { j as e, m as V } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
2
  import _, { useState as L, useRef as O, useEffect as H, useMemo as T } from "react";
3
- import { f as W } from "./index-UV9hjG_S.js";
3
+ import { f as W } from "./index-EArKRVKg.js";
4
4
  import { Z as E, H as G } from "./DropdownSelect-CtOKZHD0.js";
5
5
  import D from "maplibre-gl";
6
6
  import * as P from "pmtiles";
7
7
  /* empty css */
8
- import { f as $ } from "./fetchAndParseData-4gsYTy6_.js";
9
- import { f as z } from "./filterData-B8ocT57s.js";
10
- import { s as A } from "./string2HTML-CWHGfz_d.js";
8
+ import { f as $ } from "./fetchAndParseData-DBOl1Icl.js";
9
+ import { f as z } from "./filterData-9nEcQ-Jp.js";
10
+ import { s as A } from "./string2HTML-oFCROsus.js";
11
11
  import { X as Z } from "./index-BmCqpO1B.js";
12
12
  import { s as F } from "./select-DKy99ogv.js";
13
13
  import { GraphHeader as J } from "./GraphHeader.js";
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index-CHPV5EwG-DDoeWRVt.cjs"),c=require("./Typography-k-kOjICQ.cjs"),C=require("./ButterflyChart.cjs"),b=require("./index-BbNoLJ_w.cjs"),w=require("./DataTable.cjs"),T=require("./DonutChart.cjs"),k=require("./HeatMap.cjs"),x=require("./Histogram.cjs"),y=require("./DualAxisLineChart.cjs"),L=require("./SimpleLineChart.cjs"),M=require("./MultiLineChart.cjs"),O=require("./MultiLineAltChart.cjs"),S=require("./SparkLine.cjs"),V=require("./BiVariateChoroplethMap.cjs"),N=require("./ChoroplethMap.cjs"),H=require("./DotDensityMap.cjs"),A=require("./ParetoChart.cjs"),v=require("./ScatterPlot.cjs"),B=require("./SlopeChart.cjs"),I=require("./AreaChart.cjs"),P=require("./StatCardFromData.cjs"),W=require("./TreeMapGraph.cjs"),j=require("./UnitChart.cjs"),q=require("./DifferenceLineChart.cjs"),z=require("./SankeyChart.cjs"),F=require("./LineChartWithConfidenceInterval.cjs"),X=require("./DataCards.cjs"),g=require("./BarGraph.cjs"),Y=require("./DumbbellChart.cjs"),E=require("./StripChart.cjs"),G=require("./BeeSwarmChart.cjs"),R=require("./RadarChart.cjs"),$=require("./BulletChart.cjs"),i=require("./checkIfMultiple-BXbHUCWM.cjs");function U(d){const{settings:e,graph:l,graphData:a,debugMode:p,graphDataConfiguration:t,readableHeader:o,updateFilters:s}=d;if(p&&(console.log(`Graph: ${l}`),console.log("Transformed data:",a),console.log("Settings:",e)),typeof a=="string")return n.jsxRuntimeExports.jsx("div",{className:`flex my-0 mx-auto grow flex-col justify-center ${e?.width?"w-fit":"w-full"}`,style:{height:"inherit"},children:n.jsxRuntimeExports.jsx(c.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a})});const u={barChart:g.SimpleBarGraph,bulletChart:$.BulletChart,groupedBarChart:g.GroupedBarGraph,stackedBarChart:g.StackedBarGraph,lineChart:L.SimpleLineChart,dualAxisLineChart:y.DualAxisLineChart,multiLineChart:M.MultiLineChart,multiLineAltChart:O.MultiLineAltChart,stackedAreaChart:I.AreaChart,choroplethMap:N.ChoroplethMap,biVariateChoroplethMap:V.BiVariateChoroplethMap,dotDensityMap:H.DotDensityMap,donutChart:T.DonutChart,slopeChart:B.SlopeChart,scatterPlot:v.ScatterPlot,dumbbellChart:Y.DumbbellChart,treeMap:W.TreeMapGraph,circlePacking:b.CirclePackingGraph,heatMap:k.HeatMap,stripChart:E.StripChart,beeSwarmChart:G.BeeSwarmChart,butterflyChart:C.ButterflyChart,histogram:x.Histogram,sparkLine:S.SparkLine,paretoChart:A.ParetoChart,dataTable:w.DataTable,statCard:P.StatCardFromData,unitChart:j.UnitChart,differenceLineChart:q.DifferenceLineChart,sankeyChart:z.SankeyChart,lineChartWithConfidenceInterval:F.LineChartWithConfidenceInterval,dataCards:X.DataCards,radarChart:R.RadarChart},m=f=>{switch(f){case"barChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,animate:e?.animate,naLabel:e?.naLabel};case"groupedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,sortParameter:e?.sortParameter,sortData:e?.sortData,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,showColorScale:e?.showColorScale,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||i.getValues("size",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,showLabels:e?.showLabels,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,labelOrder:e?.labelOrder,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"stackedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,showColorScale:e?.showColorScale,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||i.getValues("size",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,labelOrder:e?.labelOrder,showValues:e?.showValues,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,maxValue:e?.maxValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,sortParameter:e?.sortParameter,sortData:e?.sortData,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"bulletChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:a,barColor:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,qualitativeRangeColors:e?.qualitativeRangeColors,targetStyle:e?.targetStyle,targetColor:e?.targetColor,measureBarWidthFactor:e?.measureBarWidthFactor,animate:e?.animate,naLabel:e?.naLabel};case"lineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,curveType:e?.curveType,data:a,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"lineChartWithConfidenceInterval":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,showIntervalDots:e?.showIntervalDots,showIntervalValues:e?.showIntervalValues,intervalLineStrokeWidth:e?.intervalLineStrokeWidth,intervalLineColors:e?.intervalLineColors,intervalAreaColor:e?.intervalAreaColor,intervalAreaOpacity:e?.intervalAreaOpacity,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,colorLegendTitle:e?.colorLegendTitle,colorLegendColors:e?.colorLegendColors,colorLegendDomain:e?.colorLegendDomain,styles:e?.styles,classNames:e?.classNames};case"dualAxisLineChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,labels:e?.labels||[i.getValues("y1",t||[],o||[]),i.getValues("y2",t||[],o||[])],footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,lineColors:e?.lineColors,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,ariaLabel:e?.ariaLabel,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,lineSuffixes:e?.lineSuffixes,linePrefixes:e?.linePrefixes,styles:e?.styles,classNames:e?.classNames};case"multiLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,data:a,curveType:e?.curveType,lineColors:e?.lineColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,showColorScale:e?.showColorScale,labels:e?.labels||i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,dashedLines:e?.dashedLines,dashSettings:e?.dashSettings,labelsToBeHidden:e?.labelsToBeHidden};case"multiLineAltChart":return{naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,dimmedOpacity:e?.dimmedOpacity,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,showLabels:e?.showLabels,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,colorDomain:e?.colorDomain,showNAColor:e?.showNAColor};case"differenceLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,lineColors:e?.lineColors,diffAreaColors:e?.diffAreaColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,labels:e?.labels||[i.getValues("y1",t||[],o||[]),i.getValues("y2",t||[],o||[])],backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"stackedAreaChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,colorDomain:e?.colorDomain||i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,colorLegendTitle:e?.colorLegendTitle,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,relativeHeight:e?.relativeHeight,bottomMargin:e?.bottomMargin,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showColorScale:e?.showColorScale,language:e?.language,minHeight:e?.minHeight,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,suffix:e?.suffix,prefix:e?.prefix,styles:e?.styles,classNames:e?.classNames};case"choroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("x",t||[],o||[]),scaleType:e?.scaleType,categorical:e?.categorical,data:a,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"biVariateChoroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,mapData:e?.mapData,mapProjection:e?.mapProjection,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e?.xColorLegendTitle:i.getValues("x",t||[],o||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e?.yColorLegendTitle:i.getValues("y",t||[],o||[]),xDomain:e?.xDomain,yDomain:e?.yDomain,colors:e?.colors,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,padding:e?.padding,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,isWorldMap:e?.isWorldMap,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,mapProperty:e?.mapProperty,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"dotDensityMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,maxRadiusValue:e?.maxRadiusValue,width:e?.width,height:e?.height,radius:e?.radius,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),data:a,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,padding:e?.padding,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"donutChart":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,mainText:e?.mainText,data:a,colors:e?.colors,graphTitle:e?.graphTitle,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,graphDescription:e?.graphDescription,subNote:e?.subNote,footNote:e?.footNote,radius:e?.radius,strokeWidth:e?.strokeWidth,showColorScale:e?.showColorScale,backgroundColor:e?.backgroundColor,padding:e?.padding,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,colorDomain:e?.colorDomain,sortData:e?.sortData,language:e?.language,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,ariaLabel:e?.ariaLabel,legendMaxWidth:e?.legendMaxWidth,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,colorScaleMaxWidth:e?.colorScaleMaxWidth};case"slopeChart":return{customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,axisTitles:e?.axisTitles,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"scatterPlot":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e?.xAxisTitle:i.getValues("x",t||[],o||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e?.yAxisTitle:i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refXValues:e?.refXValues,refYValues:e?.refYValues,highlightedDataPoints:e?.highlightedDataPoints,highlightAreaSettings:e?.highlightAreaSettings,showColorScale:e?.showColorScale,graphID:e?.graphID,maxRadiusValue:e?.maxRadiusValue,maxXValue:e?.maxXValue,minXValue:e?.minXValue,maxYValue:e?.maxYValue,minYValue:e?.minYValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfXTicks:e?.noOfXTicks,noOfYTicks:e?.noOfYTicks,labelColor:e?.labelColor,xSuffix:e?.xSuffix,ySuffix:e?.ySuffix,xPrefix:e?.xPrefix,yPrefix:e?.yPrefix,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dumbbellChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,refValues:e?.refValues,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,labelOrder:e?.labelOrder,showColorScale:e?.showColorScale,colorDomain:e?.colorDomain||i.getValues("x",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,radius:e?.radius,relativeHeight:e?.relativeHeight,showValues:e?.showValues,showLabels:e?.showLabels,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,suffix:e?.suffix,prefix:e?.prefix,language:e?.language,minHeight:e?.minHeight,sortParameter:e?.sortParameter,sortData:e?.sortData,arrowConnector:e?.arrowConnector,connectorStrokeWidth:e?.connectorStrokeWidth,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,axisTitle:e?.axisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,highlightedDataPoints:e?.highlightedDataPoints,dimmedOpacity:e?.dimmedOpacity};case"treeMap":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"circlePacking":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"heatMap":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,scaleType:e?.scaleType,colorDomain:e?.colorDomain,showColumnLabels:e?.showColumnLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,showRowLabels:e?.showRowLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,noDataColor:e?.noDataColor,showColorScale:e?.showColorScale,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"stripChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,noOfTicks:e?.noOfTicks,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,prefix:e?.prefix,suffix:e?.suffix,stripType:e?.stripType,valueColor:e?.valueColor,language:e?.language,minHeight:e?.minHeight,highlightColor:e?.highlightColor,dotOpacity:e?.dotOpacity,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"beeSwarmChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,maxValue:e?.maxValue,minValue:e?.minValue,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,orientation:e?.orientation,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"butterflyChart":return{naLabel:e?.naLabel,timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e?.leftBarTitle:i.getValues("leftBar",t||[],o||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e?.rightBarTitle:i.getValues("rightBar",t||[],o||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColors:e?.barColors,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,suffix:e?.suffix,prefix:e?.prefix,showTicks:e?.showTicks,showValues:e?.showValues,centerGap:e?.centerGap,maxValue:e?.maxValue,minValue:e?.minValue,showColorScale:e?.showColorScale,refValues:e?.refValues,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"histogram":return{precision:e?.precision,theme:e?.theme,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,maxValue:e?.maxValue,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,numberOfBins:e?.numberOfBins,truncateBy:e?.truncateBy,donutStrokeWidth:e?.donutStrokeWidth,sortData:e?.sortData,barGraphLayout:e?.barGraphLayout,graphType:e?.graphType,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames};case"sparkLine":return{customLayers:e?.customLayers,theme:e?.theme,data:a,curveType:e?.curveType,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,dateFormat:e?.dateFormat,area:e?.area,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames};case"paretoChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,showValues:e?.showValues,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e?.barTitle:i.getValues("barTitle",t||[],o||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e?.lineTitle:i.getValues("lineTitle",t||[],o||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColor:e?.barColor,curveType:e?.curveType,lineColor:e?.lineColor,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,showLabels:e?.showLabels,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfTicks:e?.noOfTicks,lineSuffix:e?.lineSuffix,barSuffix:e?.barSuffix,linePrefix:e?.lineSuffix,barPrefix:e?.barPrefix,barAxisTitle:e?.barAxisTitle,lineAxisTitle:e?.lineAxisTitle,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataTable":return{naLabel:e?.naLabel,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:a,language:e?.language,ariaLabel:e?.ariaLabel,minWidth:e?.minWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,styles:e?.styles,classNames:e?.classNames};case"statCard":return{precision:e?.precision,theme:e?.theme,year:e?.year,data:a,graphTitle:e?.graphTitle||"",graphDescription:e?.graphDescription,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources||[],footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,aggregationMethod:e?.aggregationMethod,language:e?.language,minHeight:e?.minHeight,countOnly:e?.countOnly,ariaLabel:e?.ariaLabel,textBackground:e?.textBackground,headingFontSize:e?.headingFontSize,centerAlign:e?.centerAlign,verticalAlign:e?.verticalAlign,styles:e?.styles,classNames:e?.classNames,layout:e?.layout};case"unitChart":return{precision:e?.precision,theme:e?.theme,totalNoOfDots:e?.totalNoOfDots,gridSize:e?.gridSize,unitPadding:e?.unitPadding,size:e?.size,graphTitle:e?.graphTitle,sources:e?.sources,colors:e?.colors,graphDescription:e?.graphDescription,footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,showColorScale:e?.showColorScale,showStrokeForWhiteDots:e?.showStrokeForWhiteDots,note:e?.note,data:a,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"sankeyChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,padding:e?.padding,backgroundColor:e?.backgroundColor,tooltip:e?.tooltip,suffix:e?.suffix,prefix:e?.prefix,relativeHeight:e?.relativeHeight,showValues:e?.showValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,sourceColors:e?.sourceColors,targetColors:e?.targetColors,sourceColorDomain:e?.sourceColorDomain,targetColorDomain:e?.targetColorDomain,nodePadding:e?.nodePadding,nodeWidth:e?.nodeWidth,highlightedSourceDataPoints:e?.highlightedSourceDataPoints,highlightedTargetDataPoints:e?.highlightedTargetDataPoints,defaultLinkOpacity:e?.defaultLinkOpacity,sourceTitle:e?.sourceTitle,targetTitle:e?.targetTitle,sortNodes:e?.sortNodes,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataCards":return{theme:e?.theme,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:a,language:e?.language,ariaLabel:e?.ariaLabel,cardTemplate:e?.cardTemplate,cardBackgroundColor:e?.cardBackgroundColor,cardFilters:e?.cardFilters||[],cardSortingOptions:e?.cardSortingOptions,cardSearchColumns:e?.cardSearchColumns,cardMinWidth:e?.cardMinWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,detailsOnClick:e?.detailsOnClick,allowDataDownloadOnDetail:e?.allowDataDownloadOnDetail,noOfItemsInAPage:e?.noOfItemsInAPage,uiMode:e?.uiMode,styles:e?.styles,classNames:e?.classNames};case"radarChart":return{customLayers:e?.customLayers,precision:e?.precision,graphTitle:e?.graphTitle,dimmedOpacity:e?.dimmedOpacity,graphDescription:e?.graphDescription,footNote:e?.footNote,sources:e?.sources,ariaLabel:e?.ariaLabel,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,styles:e?.styles,classNames:e?.classNames,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,padding:e?.padding,radius:e?.radius,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,maxValue:e?.maxValue,minValue:e?.minValue,showValues:e?.showValues,showDots:e?.showDots,strokeWidth:e?.strokeWidth,fillShape:e?.fillShape,noOfTicks:e?.noOfTicks,showColorScale:e?.showColorScale,showNAColor:e?.showNAColor,highlightedLines:e?.highlightedLines,axisLabels:e?.axisLabels,curveType:e?.curveType,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,tooltip:e?.tooltip,detailsOnClick:e?.detailsOnClick,language:e?.language,theme:e?.theme,graphID:e?.graphID,animate:e?.animate};default:return{}}},h=u[l],D=m(l);return n.jsxRuntimeExports.jsx("div",{className:`grow my-0 ${l!=="statCard"?"mx-auto":"mx-0"} flex flex-col h-inherit ${e?.width?"w-fit":"w-full"} ${l!=="unitChart"&&l!=="statCard"?"justify-center":"justify-start"} ${e?.theme||"light"}`,style:{minHeight:"inherit"},children:h?n.jsxRuntimeExports.jsx(h,{...D}):n.jsxRuntimeExports.jsx(c.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${l}`})})}exports.GraphEl=U;
2
- //# sourceMappingURL=GraphEl-Bz2jatkM.cjs.map
1
+ "use strict";const n=require("./index-CHPV5EwG-DDoeWRVt.cjs"),c=require("./Typography-k-kOjICQ.cjs"),C=require("./ButterflyChart.cjs"),b=require("./index-Da2GUKrr.cjs"),w=require("./DataTable.cjs"),T=require("./DonutChart.cjs"),k=require("./HeatMap.cjs"),x=require("./Histogram.cjs"),y=require("./DualAxisLineChart.cjs"),L=require("./SimpleLineChart.cjs"),M=require("./MultiLineChart.cjs"),O=require("./MultiLineAltChart.cjs"),S=require("./SparkLine.cjs"),V=require("./BiVariateChoroplethMap.cjs"),N=require("./ChoroplethMap.cjs"),H=require("./DotDensityMap.cjs"),A=require("./ParetoChart.cjs"),v=require("./ScatterPlot.cjs"),B=require("./SlopeChart.cjs"),I=require("./AreaChart.cjs"),P=require("./StatCardFromData.cjs"),W=require("./TreeMapGraph.cjs"),j=require("./UnitChart.cjs"),q=require("./DifferenceLineChart.cjs"),z=require("./SankeyChart.cjs"),F=require("./LineChartWithConfidenceInterval.cjs"),X=require("./DataCards.cjs"),g=require("./BarGraph.cjs"),Y=require("./DumbbellChart.cjs"),E=require("./StripChart.cjs"),G=require("./BeeSwarmChart.cjs"),R=require("./RadarChart.cjs"),$=require("./BulletChart.cjs"),i=require("./checkIfMultiple-BXbHUCWM.cjs");function U(d){const{settings:e,graph:l,graphData:a,debugMode:p,graphDataConfiguration:t,readableHeader:o,updateFilters:s}=d;if(p&&(console.log(`Graph: ${l}`),console.log("Transformed data:",a),console.log("Settings:",e)),typeof a=="string")return n.jsxRuntimeExports.jsx("div",{className:`flex my-0 mx-auto grow flex-col justify-center ${e?.width?"w-fit":"w-full"}`,style:{height:"inherit"},children:n.jsxRuntimeExports.jsx(c.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a})});const u={barChart:g.SimpleBarGraph,bulletChart:$.BulletChart,groupedBarChart:g.GroupedBarGraph,stackedBarChart:g.StackedBarGraph,lineChart:L.SimpleLineChart,dualAxisLineChart:y.DualAxisLineChart,multiLineChart:M.MultiLineChart,multiLineAltChart:O.MultiLineAltChart,stackedAreaChart:I.AreaChart,choroplethMap:N.ChoroplethMap,biVariateChoroplethMap:V.BiVariateChoroplethMap,dotDensityMap:H.DotDensityMap,donutChart:T.DonutChart,slopeChart:B.SlopeChart,scatterPlot:v.ScatterPlot,dumbbellChart:Y.DumbbellChart,treeMap:W.TreeMapGraph,circlePacking:b.CirclePackingGraph,heatMap:k.HeatMap,stripChart:E.StripChart,beeSwarmChart:G.BeeSwarmChart,butterflyChart:C.ButterflyChart,histogram:x.Histogram,sparkLine:S.SparkLine,paretoChart:A.ParetoChart,dataTable:w.DataTable,statCard:P.StatCardFromData,unitChart:j.UnitChart,differenceLineChart:q.DifferenceLineChart,sankeyChart:z.SankeyChart,lineChartWithConfidenceInterval:F.LineChartWithConfidenceInterval,dataCards:X.DataCards,radarChart:R.RadarChart},m=f=>{switch(f){case"barChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,animate:e?.animate,naLabel:e?.naLabel};case"groupedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,sortParameter:e?.sortParameter,sortData:e?.sortData,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,showColorScale:e?.showColorScale,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||i.getValues("size",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,showLabels:e?.showLabels,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,labelOrder:e?.labelOrder,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"stackedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,showColorScale:e?.showColorScale,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||i.getValues("size",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,labelOrder:e?.labelOrder,showValues:e?.showValues,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,maxValue:e?.maxValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,sortParameter:e?.sortParameter,sortData:e?.sortData,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"bulletChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:a,barColor:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,qualitativeRangeColors:e?.qualitativeRangeColors,targetStyle:e?.targetStyle,targetColor:e?.targetColor,measureBarWidthFactor:e?.measureBarWidthFactor,animate:e?.animate,naLabel:e?.naLabel};case"lineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,curveType:e?.curveType,data:a,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"lineChartWithConfidenceInterval":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,showIntervalDots:e?.showIntervalDots,showIntervalValues:e?.showIntervalValues,intervalLineStrokeWidth:e?.intervalLineStrokeWidth,intervalLineColors:e?.intervalLineColors,intervalAreaColor:e?.intervalAreaColor,intervalAreaOpacity:e?.intervalAreaOpacity,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,colorLegendTitle:e?.colorLegendTitle,colorLegendColors:e?.colorLegendColors,colorLegendDomain:e?.colorLegendDomain,styles:e?.styles,classNames:e?.classNames};case"dualAxisLineChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,labels:e?.labels||[i.getValues("y1",t||[],o||[]),i.getValues("y2",t||[],o||[])],footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,lineColors:e?.lineColors,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,ariaLabel:e?.ariaLabel,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,lineSuffixes:e?.lineSuffixes,linePrefixes:e?.linePrefixes,styles:e?.styles,classNames:e?.classNames};case"multiLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,data:a,curveType:e?.curveType,lineColors:e?.lineColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,showColorScale:e?.showColorScale,labels:e?.labels||i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,dashedLines:e?.dashedLines,dashSettings:e?.dashSettings,labelsToBeHidden:e?.labelsToBeHidden};case"multiLineAltChart":return{naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,dimmedOpacity:e?.dimmedOpacity,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,showLabels:e?.showLabels,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,colorDomain:e?.colorDomain,showNAColor:e?.showNAColor};case"differenceLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,lineColors:e?.lineColors,diffAreaColors:e?.diffAreaColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,labels:e?.labels||[i.getValues("y1",t||[],o||[]),i.getValues("y2",t||[],o||[])],backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"stackedAreaChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,colorDomain:e?.colorDomain||i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,colorLegendTitle:e?.colorLegendTitle,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,relativeHeight:e?.relativeHeight,bottomMargin:e?.bottomMargin,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showColorScale:e?.showColorScale,language:e?.language,minHeight:e?.minHeight,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,suffix:e?.suffix,prefix:e?.prefix,styles:e?.styles,classNames:e?.classNames};case"choroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("x",t||[],o||[]),scaleType:e?.scaleType,categorical:e?.categorical,data:a,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"biVariateChoroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,mapData:e?.mapData,mapProjection:e?.mapProjection,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e?.xColorLegendTitle:i.getValues("x",t||[],o||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e?.yColorLegendTitle:i.getValues("y",t||[],o||[]),xDomain:e?.xDomain,yDomain:e?.yDomain,colors:e?.colors,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,padding:e?.padding,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,isWorldMap:e?.isWorldMap,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,mapProperty:e?.mapProperty,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"dotDensityMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,maxRadiusValue:e?.maxRadiusValue,width:e?.width,height:e?.height,radius:e?.radius,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),data:a,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,padding:e?.padding,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"donutChart":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,mainText:e?.mainText,data:a,colors:e?.colors,graphTitle:e?.graphTitle,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,graphDescription:e?.graphDescription,subNote:e?.subNote,footNote:e?.footNote,radius:e?.radius,strokeWidth:e?.strokeWidth,showColorScale:e?.showColorScale,backgroundColor:e?.backgroundColor,padding:e?.padding,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,colorDomain:e?.colorDomain,sortData:e?.sortData,language:e?.language,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,ariaLabel:e?.ariaLabel,legendMaxWidth:e?.legendMaxWidth,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,colorScaleMaxWidth:e?.colorScaleMaxWidth};case"slopeChart":return{customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,axisTitles:e?.axisTitles,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"scatterPlot":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e?.xAxisTitle:i.getValues("x",t||[],o||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e?.yAxisTitle:i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refXValues:e?.refXValues,refYValues:e?.refYValues,highlightedDataPoints:e?.highlightedDataPoints,highlightAreaSettings:e?.highlightAreaSettings,showColorScale:e?.showColorScale,graphID:e?.graphID,maxRadiusValue:e?.maxRadiusValue,maxXValue:e?.maxXValue,minXValue:e?.minXValue,maxYValue:e?.maxYValue,minYValue:e?.minYValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfXTicks:e?.noOfXTicks,noOfYTicks:e?.noOfYTicks,labelColor:e?.labelColor,xSuffix:e?.xSuffix,ySuffix:e?.ySuffix,xPrefix:e?.xPrefix,yPrefix:e?.yPrefix,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dumbbellChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,refValues:e?.refValues,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,labelOrder:e?.labelOrder,showColorScale:e?.showColorScale,colorDomain:e?.colorDomain||i.getValues("x",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,radius:e?.radius,relativeHeight:e?.relativeHeight,showValues:e?.showValues,showLabels:e?.showLabels,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,suffix:e?.suffix,prefix:e?.prefix,language:e?.language,minHeight:e?.minHeight,sortParameter:e?.sortParameter,sortData:e?.sortData,arrowConnector:e?.arrowConnector,connectorStrokeWidth:e?.connectorStrokeWidth,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,axisTitle:e?.axisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,highlightedDataPoints:e?.highlightedDataPoints,dimmedOpacity:e?.dimmedOpacity};case"treeMap":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"circlePacking":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"heatMap":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,scaleType:e?.scaleType,colorDomain:e?.colorDomain,showColumnLabels:e?.showColumnLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,showRowLabels:e?.showRowLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,noDataColor:e?.noDataColor,showColorScale:e?.showColorScale,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"stripChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,noOfTicks:e?.noOfTicks,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,prefix:e?.prefix,suffix:e?.suffix,stripType:e?.stripType,valueColor:e?.valueColor,language:e?.language,minHeight:e?.minHeight,highlightColor:e?.highlightColor,dotOpacity:e?.dotOpacity,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"beeSwarmChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,maxValue:e?.maxValue,minValue:e?.minValue,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,orientation:e?.orientation,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"butterflyChart":return{naLabel:e?.naLabel,timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e?.leftBarTitle:i.getValues("leftBar",t||[],o||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e?.rightBarTitle:i.getValues("rightBar",t||[],o||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColors:e?.barColors,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,suffix:e?.suffix,prefix:e?.prefix,showTicks:e?.showTicks,showValues:e?.showValues,centerGap:e?.centerGap,maxValue:e?.maxValue,minValue:e?.minValue,showColorScale:e?.showColorScale,refValues:e?.refValues,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"histogram":return{precision:e?.precision,theme:e?.theme,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,maxValue:e?.maxValue,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,numberOfBins:e?.numberOfBins,truncateBy:e?.truncateBy,donutStrokeWidth:e?.donutStrokeWidth,sortData:e?.sortData,barGraphLayout:e?.barGraphLayout,graphType:e?.graphType,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames};case"sparkLine":return{customLayers:e?.customLayers,theme:e?.theme,data:a,curveType:e?.curveType,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,dateFormat:e?.dateFormat,area:e?.area,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames};case"paretoChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,showValues:e?.showValues,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e?.barTitle:i.getValues("barTitle",t||[],o||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e?.lineTitle:i.getValues("lineTitle",t||[],o||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColor:e?.barColor,curveType:e?.curveType,lineColor:e?.lineColor,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,showLabels:e?.showLabels,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfTicks:e?.noOfTicks,lineSuffix:e?.lineSuffix,barSuffix:e?.barSuffix,linePrefix:e?.lineSuffix,barPrefix:e?.barPrefix,barAxisTitle:e?.barAxisTitle,lineAxisTitle:e?.lineAxisTitle,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataTable":return{naLabel:e?.naLabel,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:a,language:e?.language,ariaLabel:e?.ariaLabel,minWidth:e?.minWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,styles:e?.styles,classNames:e?.classNames};case"statCard":return{precision:e?.precision,theme:e?.theme,year:e?.year,data:a,graphTitle:e?.graphTitle||"",graphDescription:e?.graphDescription,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources||[],footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,aggregationMethod:e?.aggregationMethod,language:e?.language,minHeight:e?.minHeight,countOnly:e?.countOnly,ariaLabel:e?.ariaLabel,textBackground:e?.textBackground,headingFontSize:e?.headingFontSize,centerAlign:e?.centerAlign,verticalAlign:e?.verticalAlign,styles:e?.styles,classNames:e?.classNames,layout:e?.layout};case"unitChart":return{precision:e?.precision,theme:e?.theme,totalNoOfDots:e?.totalNoOfDots,gridSize:e?.gridSize,unitPadding:e?.unitPadding,size:e?.size,graphTitle:e?.graphTitle,sources:e?.sources,colors:e?.colors,graphDescription:e?.graphDescription,footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,showColorScale:e?.showColorScale,showStrokeForWhiteDots:e?.showStrokeForWhiteDots,note:e?.note,data:a,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"sankeyChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,padding:e?.padding,backgroundColor:e?.backgroundColor,tooltip:e?.tooltip,suffix:e?.suffix,prefix:e?.prefix,relativeHeight:e?.relativeHeight,showValues:e?.showValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,sourceColors:e?.sourceColors,targetColors:e?.targetColors,sourceColorDomain:e?.sourceColorDomain,targetColorDomain:e?.targetColorDomain,nodePadding:e?.nodePadding,nodeWidth:e?.nodeWidth,highlightedSourceDataPoints:e?.highlightedSourceDataPoints,highlightedTargetDataPoints:e?.highlightedTargetDataPoints,defaultLinkOpacity:e?.defaultLinkOpacity,sourceTitle:e?.sourceTitle,targetTitle:e?.targetTitle,sortNodes:e?.sortNodes,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataCards":return{theme:e?.theme,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:a,language:e?.language,ariaLabel:e?.ariaLabel,cardTemplate:e?.cardTemplate,cardBackgroundColor:e?.cardBackgroundColor,cardFilters:e?.cardFilters||[],cardSortingOptions:e?.cardSortingOptions,cardSearchColumns:e?.cardSearchColumns,cardMinWidth:e?.cardMinWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,detailsOnClick:e?.detailsOnClick,allowDataDownloadOnDetail:e?.allowDataDownloadOnDetail,noOfItemsInAPage:e?.noOfItemsInAPage,uiMode:e?.uiMode,styles:e?.styles,classNames:e?.classNames};case"radarChart":return{customLayers:e?.customLayers,precision:e?.precision,graphTitle:e?.graphTitle,dimmedOpacity:e?.dimmedOpacity,graphDescription:e?.graphDescription,footNote:e?.footNote,sources:e?.sources,ariaLabel:e?.ariaLabel,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,styles:e?.styles,classNames:e?.classNames,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,padding:e?.padding,radius:e?.radius,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,maxValue:e?.maxValue,minValue:e?.minValue,showValues:e?.showValues,showDots:e?.showDots,strokeWidth:e?.strokeWidth,fillShape:e?.fillShape,noOfTicks:e?.noOfTicks,showColorScale:e?.showColorScale,showNAColor:e?.showNAColor,highlightedLines:e?.highlightedLines,axisLabels:e?.axisLabels,curveType:e?.curveType,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,tooltip:e?.tooltip,detailsOnClick:e?.detailsOnClick,language:e?.language,theme:e?.theme,graphID:e?.graphID,animate:e?.animate};default:return{}}},h=u[l],D=m(l);return n.jsxRuntimeExports.jsx("div",{className:`grow my-0 ${l!=="statCard"?"mx-auto":"mx-0"} flex flex-col h-inherit ${e?.width?"w-fit":"w-full"} ${l!=="unitChart"&&l!=="statCard"?"justify-center":"justify-start"} ${e?.theme||"light"}`,style:{minHeight:"inherit"},children:h?n.jsxRuntimeExports.jsx(h,{...D}):n.jsxRuntimeExports.jsx(c.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${l}`})})}exports.GraphEl=U;
2
+ //# sourceMappingURL=GraphEl-4RUlclvW.cjs.map