@undp/data-viz 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.cjs.map +1 -1
  3. package/dist/BarGraph.js +957 -957
  4. package/dist/BarGraph.js.map +1 -1
  5. package/dist/BasicStatCard.cjs +1 -1
  6. package/dist/BasicStatCard.cjs.map +1 -1
  7. package/dist/BasicStatCard.js +45 -47
  8. package/dist/BasicStatCard.js.map +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.cjs.map +1 -1
  11. package/dist/BeeSwarmChart.js +76 -56
  12. package/dist/BeeSwarmChart.js.map +1 -1
  13. package/dist/BiVariateChoroplethMap.cjs +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  15. package/dist/BiVariateChoroplethMap.js +157 -157
  16. package/dist/BiVariateChoroplethMap.js.map +1 -1
  17. package/dist/ChoroplethMap.cjs +1 -1
  18. package/dist/ChoroplethMap.cjs.map +1 -1
  19. package/dist/ChoroplethMap.js +185 -185
  20. package/dist/ChoroplethMap.js.map +1 -1
  21. package/dist/CirclePackingGraph.cjs +1 -1
  22. package/dist/CirclePackingGraph.js +2 -4
  23. package/dist/CirclePackingGraph.js.map +1 -1
  24. package/dist/Data/barChart.json +70 -0
  25. package/dist/Data/basic.csv +20 -0
  26. package/dist/DifferenceLineChart.cjs +1 -1
  27. package/dist/DifferenceLineChart.cjs.map +1 -1
  28. package/dist/DifferenceLineChart.js +224 -223
  29. package/dist/DifferenceLineChart.js.map +1 -1
  30. package/dist/DotDensityMap.cjs +1 -1
  31. package/dist/DotDensityMap.cjs.map +1 -1
  32. package/dist/DotDensityMap.js +156 -156
  33. package/dist/DotDensityMap.js.map +1 -1
  34. package/dist/DualAxisLineChart.cjs +1 -1
  35. package/dist/DualAxisLineChart.cjs.map +1 -1
  36. package/dist/DualAxisLineChart.js +326 -325
  37. package/dist/DualAxisLineChart.js.map +1 -1
  38. package/dist/GeoHubCompareMaps.cjs +1 -1
  39. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  40. package/dist/GeoHubCompareMaps.js +183 -183
  41. package/dist/GeoHubCompareMaps.js.map +1 -1
  42. package/dist/{GraphEl-DzRon4cb.js → GraphEl-BZne2JIx.js} +3 -3
  43. package/dist/{GraphEl-DzRon4cb.js.map → GraphEl-BZne2JIx.js.map} +1 -1
  44. package/dist/{GraphEl-BkyLYXG5.cjs → GraphEl-D5MUfp45.cjs} +2 -2
  45. package/dist/{GraphEl-BkyLYXG5.cjs.map → GraphEl-D5MUfp45.cjs.map} +1 -1
  46. package/dist/GriddedGraphs.cjs +1 -1
  47. package/dist/GriddedGraphs.js +1 -1
  48. package/dist/Histogram.cjs +1 -1
  49. package/dist/Histogram.js +1 -1
  50. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  51. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  52. package/dist/LineChartWithConfidenceInterval.js +133 -132
  53. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  54. package/dist/MultiGraphDashboard.cjs +1 -1
  55. package/dist/MultiGraphDashboard.cjs.map +1 -1
  56. package/dist/MultiGraphDashboard.js +52 -50
  57. package/dist/MultiGraphDashboard.js.map +1 -1
  58. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  59. package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
  60. package/dist/MultiGraphDashboardWideToLongFormat.js +11 -9
  61. package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
  62. package/dist/MultiLineAltChart.cjs +1 -1
  63. package/dist/MultiLineAltChart.cjs.map +1 -1
  64. package/dist/MultiLineAltChart.js +149 -148
  65. package/dist/MultiLineAltChart.js.map +1 -1
  66. package/dist/MultiLineChart.cjs +1 -1
  67. package/dist/MultiLineChart.cjs.map +1 -1
  68. package/dist/MultiLineChart.js +182 -181
  69. package/dist/MultiLineChart.js.map +1 -1
  70. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  71. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  72. package/dist/PerformanceIntensiveMultiGraphDashboard.js +14 -12
  73. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  74. package/dist/SimpleLineChart.cjs +1 -1
  75. package/dist/SimpleLineChart.cjs.map +1 -1
  76. package/dist/SimpleLineChart.js +123 -122
  77. package/dist/SimpleLineChart.js.map +1 -1
  78. package/dist/SingleGraphDashboard.cjs +1 -1
  79. package/dist/SingleGraphDashboard.cjs.map +1 -1
  80. package/dist/SingleGraphDashboard.js +83 -79
  81. package/dist/SingleGraphDashboard.js.map +1 -1
  82. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  83. package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
  84. package/dist/SingleGraphDashboardGeoHubMaps.js +49 -45
  85. package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -1
  86. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  87. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  88. package/dist/SingleGraphDashboardThreeDGraphs.js +56 -52
  89. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  90. package/dist/StatCardFromData.cjs +1 -1
  91. package/dist/StatCardFromData.cjs.map +1 -1
  92. package/dist/StatCardFromData.js +44 -46
  93. package/dist/StatCardFromData.js.map +1 -1
  94. package/dist/ThreeDGlobe.cjs +1 -1
  95. package/dist/ThreeDGlobe.cjs.map +1 -1
  96. package/dist/ThreeDGlobe.js +134 -134
  97. package/dist/ThreeDGlobe.js.map +1 -1
  98. package/dist/getNoOfTicks-C_1CFXv_.cjs +2 -0
  99. package/dist/getNoOfTicks-C_1CFXv_.cjs.map +1 -0
  100. package/dist/getNoOfTicks-CpmRjcRF.js +7 -0
  101. package/dist/getNoOfTicks-CpmRjcRF.js.map +1 -0
  102. package/dist/index-C6LorfZ-.cjs +2 -0
  103. package/dist/index-C6LorfZ-.cjs.map +1 -0
  104. package/dist/index-Ceppbd8C.js +342 -0
  105. package/dist/index-Ceppbd8C.js.map +1 -0
  106. package/dist/index.cjs +1 -1
  107. package/dist/index.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/index-DoY3Ga3W.cjs +0 -2
  110. package/dist/index-DoY3Ga3W.cjs.map +0 -1
  111. package/dist/index-leTnKT2q.js +0 -329
  112. package/dist/index-leTnKT2q.js.map +0 -1
package/dist/BarGraph.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),G=require("react"),ye=require("./getSliderMarks-BmADcPQt.cjs"),me=require("./parse-hMnG_lRV.cjs"),Ne=require("./index-Cno4Q0YE.cjs"),oe=require("./index-CSNtgibC.cjs"),je=require("./index-DQA8q5sC.cjs"),we=require("./Modal-JW_IExO3.cjs"),ue=require("./numberFormattingFunction-02t-wJta.cjs"),Ae=require("./Tooltip-4dJo4_AF.cjs"),_t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),$e=require("./string2HTML-CPGr_I5E.cjs"),Te=require("./YAxesLabels-DcS85Beo.cjs"),Ee=require("./Axis-DxRV2yMi.cjs"),Oe=require("./AxisTitle-sS5bLLR7.cjs"),Se=require("./XTicksAndGridLines-B6CELS7q.cjs"),ke=require("./ReferenceLine-BH0qdf4R.cjs"),De=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ze=require("./XAxesLabels-D5X8jngD.cjs"),Ce=require("./use-in-view-QcfiW0w3.cjs"),Re=require("./linear-BwPAspcq.cjs"),fe=require("./band-VYfcZeJ2.cjs"),Me=require("./index-DG2bgAva.cjs"),Zt=require("./proxy-BxvUI_9l.cjs"),Be=require("./GraphHeader.cjs"),Fe=require("./GraphFooter.cjs"),Pe=require("./ColorLegendWithMouseOver.cjs"),ce=require("./Colors.cjs"),qe=require("./EmptyState-sAEZ_5rU.cjs"),be=require("./index-DRXx7m-C.cjs"),he=require("./ensureCompleteData-I6nYmT8E.cjs"),Le=require("./uniqBy-O05lp2S5.cjs"),ve=require("./GraphContainer-d8A46BK2.cjs"),He=require("./sort-O96oMZLb.cjs"),Ge=require("./init-DU0ybBc_.cjs"),Ie=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs");function Xe(e){const t=i.compilerRuntimeExports.c(122),{data:d,leftMargin:N,rightMargin:qt,topMargin:Dt,bottomMargin:yt,barColors:it,barPadding:mt,showTicks:C,truncateBy:V,width:h,height:F,suffix:Vt,prefix:ut,showValues:It,showLabels:P,tooltip:st,onSeriesMouseOver:dt,refValues:pt,maxValue:Tt,minValue:j,onSeriesMouseClick:nt,selectedColor:W,rtl:X,labelOrder:Z,maxBarThickness:$,resetSelectionOnDoubleClick:q,detailsOnClick:E,barAxisTitle:J,valueColor:S,noOfTicks:a,styles:s,classNames:o,animate:u,colorDomain:x,precision:f,customLayers:m,naLabel:A}=e,_=N===void 0?100:N,K=qt===void 0?40:qt,xt=Dt===void 0?25:Dt,Ft=yt===void 0?10:yt,Ht=G.useRef(null);let Y;t[0]!==u.amount||t[1]!==u.once?(Y={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=Y):Y=t[2];const bt=Ce.useInView(Ht,Y),zt=J?xt+25:xt;let r;t[3]!==Ft||t[4]!==_||t[5]!==K||t[6]!==zt?(r={top:zt,bottom:Ft,left:_,right:K},t[3]=Ft,t[4]=_,t[5]=K,t[6]=zt,t[7]=r):r=t[7];const c=r,[B,p]=G.useState(void 0),[R,D]=G.useState(void 0),[w,Lt]=G.useState(void 0),[vt,ot]=G.useState(void 0),ht=h-c.left-c.right,M=F-c.top-c.bottom;let y,tt,et,Q,L,ft,Ct,lt,Rt,U,at,H,z,gt;if(t[8]!==u||t[9]!==J||t[10]!==it||t[11]!==mt||t[12]!==o?.graphObjectValues||t[13]!==o?.xAxis?.gridLines||t[14]!==o?.xAxis?.labels||t[15]!==o?.xAxis?.title||t[16]!==o?.yAxis?.axis||t[17]!==o?.yAxis?.labels||t[18]!==x||t[19]!==m||t[20]!==d||t[21]!==E||t[22]!==M||t[23]!==ht||t[24]!==F||t[25]!==bt||t[26]!==Z||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==$||t[31]!==Tt||t[32]!==j||t[33]!==R||t[34]!==A||t[35]!==a||t[36]!==nt||t[37]!==dt||t[38]!==f||t[39]!==ut||t[40]!==pt||t[41]!==q||t[42]!==X||t[43]!==W||t[44]!==P||t[45]!==C||t[46]!==It||t[47]!==s?.graphObjectValues||t[48]!==s?.xAxis?.gridLines||t[49]!==s?.xAxis?.labels||t[50]!==s?.xAxis?.title||t[51]!==s?.yAxis?.axis||t[52]!==s?.yAxis?.labels||t[53]!==Vt||t[54]!==xt||t[55]!==V||t[56]!==S||t[57]!==h){let ct;t[72]!==Z?(ct=(v,k)=>({...v,id:Z?`${v.label}`:`${k}`}),t[72]=Z,t[73]=ct):ct=t[73];const St=d.map(ct),Gt=Z||St.map(_e),O=Re.linear().domain([j,Tt]).range([0,ht]).nice(),Yt=fe.band().domain(Gt).range([0,$?Math.min(M,$*Gt.length):M]).paddingInner(mt),Ot=fe.band().domain(d[0].size.map(Ze)).range([0,Yt.bandwidth()]).paddingInner(.1),Kt=O.ticks(a);tt=Zt.motion.svg,Ct=Ht,lt=`${h}px`,Rt=`${F}px`,U=`0 0 ${h} ${F}`,at="ltr",et=`translate(${c.left},${c.top})`,Q=C?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Kt.filter(Qe),x:Kt.filter(Ke).map(v=>O(v)),y1:0-xt,y2:M+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:Vt,prefix:ut,labelType:"secondary",showGridLines:!0,precision:f}):null;const Nt=ht/2,Qt=0-c.top+15,Wt=s?.xAxis?.title,Pt=o?.xAxis?.title;t[74]!==J||t[75]!==Nt||t[76]!==Qt||t[77]!==Wt||t[78]!==Pt?(L=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Nt,y:Qt,style:Wt,className:Pt,text:J}),t[74]=J,t[75]=Nt,t[76]=Qt,t[77]=Wt,t[78]=Pt,t[79]=L):L=t[79],t[80]!==m?(ft=m.filter(Je).map(We),t[80]=m,t[81]=ft):ft=t[81],y=Me.AnimatePresence,H=St.map(v=>_t.checkIfNullOrUndefined(Yt(v.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:0,y:Yt(`${v.id}`)},whileInView:{x:0,y:Yt(`${v.id}`),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[v.size.map((k,n)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:W?it[n]===W?1:.3:.85,onMouseEnter:g=>{p({...v,sizeIndex:n}),ot(g.clientY),Lt(g.clientX),dt?.({...v,sizeIndex:n})},onMouseMove:g=>{p({...v,sizeIndex:n}),ot(g.clientY),Lt(g.clientX)},onMouseLeave:()=>{p(void 0),Lt(void 0),ot(void 0),dt?.(void 0)},onClick:()=>{(nt||E)&&(je.isEqual(R,{...v,sizeIndex:n})&&q?(D(void 0),nt?.(void 0)):(D({...v,sizeIndex:n}),nt&&nt({...v,sizeIndex:n})))},children:[_t.checkIfNullOrUndefined(k)?null:i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:Ot(`${n}`),variants:{initial:{width:0,x:O(0),fill:it[n]},whileInView:{width:_t.checkIfNullOrUndefined(k)?0:k>=0?O(k)-O(0):O(0)-O(k),x:k>=0?O(0):O(k),fill:it[n],transition:{duration:u.duration}}},exit:{width:0,x:O(0),transition:{duration:u.duration}},height:Ot.bandwidth(),initial:"initial",animate:bt?"whileInView":"initial"}),It?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:Ot(`${n}`)+Ot.bandwidth()/2,style:{textAnchor:k&&k<0?"end":"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm",o?.graphObjectValues),dx:k&&k<0?-5:5,dy:"0.33em",variants:{initial:{x:O(0),opacity:0,fill:S||it[n]},whileInView:{x:O(k||0),opacity:1,fill:S||it[n],transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:ue.numberFormattingFunction(k,A,f,ut,Vt)}):null]},`${v.label}-${x[n]||n}`)),P?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${v.label}`.length<V?`${v.label}`:`${`${v.label}`.substring(0,V)}...`,y:0,x:0-c.left,width:O(j<0?0:j)+c.left,height:Yt.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:u,isInView:bt}):null]},v.label));const kt=o?.yAxis?.axis;let Ut;t[82]!==kt?(Ut={axis:kt},t[82]=kt,t[83]=Ut):Ut=t[83];const Jt=s?.yAxis?.axis;let T;t[84]!==Jt?(T={axis:Jt},t[84]=Jt,t[85]=T):T=t[85],z=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:O(j<0?0:j),x2:O(j<0?0:j),y1:-2.5,y2:M+c.bottom,classNames:Ut,styles:T}),gt=pt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:pt.map((v,k)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:v.text,color:v.color,x:O(v.value),y1:0-c.top,y2:M+c.bottom,textSide:O(v.value)>ht*.75||X?"left":"right",classNames:v.classNames,styles:v.styles,animate:u,isInView:bt},k))}):null,t[8]=u,t[9]=J,t[10]=it,t[11]=mt,t[12]=o?.graphObjectValues,t[13]=o?.xAxis?.gridLines,t[14]=o?.xAxis?.labels,t[15]=o?.xAxis?.title,t[16]=o?.yAxis?.axis,t[17]=o?.yAxis?.labels,t[18]=x,t[19]=m,t[20]=d,t[21]=E,t[22]=M,t[23]=ht,t[24]=F,t[25]=bt,t[26]=Z,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=$,t[31]=Tt,t[32]=j,t[33]=R,t[34]=A,t[35]=a,t[36]=nt,t[37]=dt,t[38]=f,t[39]=ut,t[40]=pt,t[41]=q,t[42]=X,t[43]=W,t[44]=P,t[45]=C,t[46]=It,t[47]=s?.graphObjectValues,t[48]=s?.xAxis?.gridLines,t[49]=s?.xAxis?.labels,t[50]=s?.xAxis?.title,t[51]=s?.yAxis?.axis,t[52]=s?.yAxis?.labels,t[53]=Vt,t[54]=xt,t[55]=V,t[56]=S,t[57]=h,t[58]=y,t[59]=tt,t[60]=et,t[61]=Q,t[62]=L,t[63]=ft,t[64]=Ct,t[65]=lt,t[66]=Rt,t[67]=U,t[68]=at,t[69]=H,t[70]=z,t[71]=gt}else y=t[58],tt=t[59],et=t[60],Q=t[61],L=t[62],ft=t[63],Ct=t[64],lt=t[65],Rt=t[66],U=t[67],at=t[68],H=t[69],z=t[70],gt=t[71];let jt;t[86]!==y||t[87]!==H||t[88]!==z||t[89]!==gt?(jt=i.jsxRuntimeExports.jsxs(y,{children:[H,z,gt]}),t[86]=y,t[87]=H,t[88]=z,t[89]=gt,t[90]=jt):jt=t[90];let wt;t[91]!==m?(wt=m.filter(Ue).map(Ye),t[91]=m,t[92]=wt):wt=t[92];let rt;t[93]!==et||t[94]!==Q||t[95]!==L||t[96]!==ft||t[97]!==jt||t[98]!==wt?(rt=i.jsxRuntimeExports.jsxs("g",{transform:et,children:[Q,L,ft,jt,wt]}),t[93]=et,t[94]=Q,t[95]=L,t[96]=ft,t[97]=jt,t[98]=wt,t[99]=rt):rt=t[99];let At;t[100]!==tt||t[101]!==Ct||t[102]!==lt||t[103]!==Rt||t[104]!==U||t[105]!==at||t[106]!==rt?(At=i.jsxRuntimeExports.jsx(tt,{ref:Ct,width:lt,height:Rt,viewBox:U,direction:at,children:rt}),t[100]=tt,t[101]=Ct,t[102]=lt,t[103]=Rt,t[104]=U,t[105]=at,t[106]=rt,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==w||t[110]!==vt||t[111]!==B||t[112]!==s?.tooltip||t[113]!==st?($t=B&&st&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:B,body:st,xPos:w,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=w,t[110]=vt,t[111]=B,t[112]=s?.tooltip,t[113]=st,t[114]=$t):$t=t[114];let Et;t[115]!==E||t[116]!==R?(Et=E&&R!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:R!==void 0,onClose:()=>{D(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof E=="string"?{__html:$e.string2HTML(E,R)}:void 0,children:typeof E=="function"?E(R):null})}):null,t[115]=E,t[116]=R,t[117]=Et):Et=t[117];let b;return t[118]!==At||t[119]!==$t||t[120]!==Et?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Et]}),t[118]=At,t[119]=$t,t[120]=Et,t[121]=b):b=t[121],b}function Ye(e){return e.layer}function Ue(e){return e.position==="after"}function We(e){return e.layer}function Je(e){return e.position==="before"}function Ke(e){return e!==0}function Qe(e){return e!==0}function Ze(e,t){return`${t}`}function _e(e){return`${e.id}`}function ti(e){const t=i.compilerRuntimeExports.c(130),{data:d,leftMargin:N,rightMargin:qt,topMargin:Dt,bottomMargin:yt,width:it,height:mt,barColors:C,suffix:V,prefix:h,barPadding:F,showLabels:Vt,showValues:ut,showTicks:It,truncateBy:P,tooltip:st,onSeriesMouseOver:dt,refValues:pt,maxValue:Tt,minValue:j,onSeriesMouseClick:nt,selectedColor:W,labelOrder:X,maxBarThickness:Z,resetSelectionOnDoubleClick:$,detailsOnClick:q,barAxisTitle:E,valueColor:J,noOfTicks:S,styles:a,classNames:s,animate:o,colorDomain:u,precision:x,customLayers:f,naLabel:m}=e,A=N===void 0?20:N,_=qt===void 0?20:qt,K=Dt===void 0?20:Dt,xt=yt===void 0?25:yt,Ft=G.useRef(null);let Ht;t[0]!==o.amount||t[1]!==o.once?(Ht={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Ht):Ht=t[2];const Y=Ce.useInView(Ft,Ht),bt=E?A+30:A;let zt;t[3]!==xt||t[4]!==_||t[5]!==bt||t[6]!==K?(zt={top:K,bottom:xt,left:bt,right:_},t[3]=xt,t[4]=_,t[5]=bt,t[6]=K,t[7]=zt):zt=t[7];const r=zt,[c,B]=G.useState(void 0),[p,R]=G.useState(void 0),[D,w]=G.useState(void 0),[Lt,vt]=G.useState(void 0),ot=it-r.left-r.right,ht=mt-r.top-r.bottom;let M,y,tt,et,Q,L,ft,Ct,lt,Rt,U,at,H,z;if(t[8]!==o||t[9]!==E||t[10]!==C||t[11]!==F||t[12]!==s?.graphObjectValues||t[13]!==s?.xAxis?.axis||t[14]!==s?.xAxis?.labels||t[15]!==s?.yAxis?.gridLines||t[16]!==s?.yAxis?.labels||t[17]!==s?.yAxis?.title||t[18]!==u||t[19]!==f||t[20]!==d||t[21]!==q||t[22]!==ht||t[23]!==ot||t[24]!==mt||t[25]!==Y||t[26]!==X||t[27]!==A||t[28]!==r.bottom||t[29]!==r.left||t[30]!==r.right||t[31]!==r.top||t[32]!==Z||t[33]!==Tt||t[34]!==j||t[35]!==p||t[36]!==m||t[37]!==S||t[38]!==nt||t[39]!==dt||t[40]!==x||t[41]!==h||t[42]!==pt||t[43]!==$||t[44]!==W||t[45]!==Vt||t[46]!==It||t[47]!==ut||t[48]!==a?.graphObjectValues||t[49]!==a?.xAxis?.axis||t[50]!==a?.xAxis?.labels||t[51]!==a?.yAxis?.gridLines||t[52]!==a?.yAxis?.labels||t[53]!==a?.yAxis?.title||t[54]!==V||t[55]!==P||t[56]!==J||t[57]!==it){const b=Re.linear().domain([j,Tt]).range([ht,0]).nice();let ct;t[72]!==X?(ct=(I,Mt)=>({...I,id:X?`${I.label}`:`${Mt}`}),t[72]=X,t[73]=ct):ct=t[73];const St=d.map(ct),Gt=X||St.map(ri),O=fe.band().domain(Gt).range([0,Z?Math.min(ot,Z*Gt.length):ot]).paddingInner(F),Yt=fe.band().domain(d[0].size.map(ai)).range([0,O.bandwidth()]).paddingInner(.1),Ot=b.ticks(S);y=Zt.motion.svg,ft=`${it}px`,Ct=`${mt}px`,lt=`0 0 ${it} ${mt}`,Rt="ltr",U=Ft,z=`translate(${r.left},${r.top})`;const Kt=b(j<0?0:j),Nt=b(j<0?0:j),Qt=j<0?0:j;let Wt;t[74]!==m||t[75]!==x||t[76]!==h||t[77]!==V||t[78]!==Qt?(Wt=ue.numberFormattingFunction(Qt,m,x,h,V),t[74]=m,t[75]=x,t[76]=h,t[77]=V,t[78]=Qt,t[79]=Wt):Wt=t[79];const Pt=s?.xAxis?.axis,kt=s?.yAxis?.labels;let Ut;t[80]!==Pt||t[81]!==kt?(Ut={axis:Pt,label:kt},t[80]=Pt,t[81]=kt,t[82]=Ut):Ut=t[82];const Jt=a?.xAxis?.axis,T=a?.yAxis?.labels;let v;t[83]!==Jt||t[84]!==T?(v={axis:Jt,label:T},t[83]=Jt,t[84]=T,t[85]=v):v=t[85],tt=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Kt,y2:Nt,x1:0-A,x2:ot+r.right,label:Wt,labelPos:{x:0-A,dx:0,dy:Tt<0?"1em":-5,y:b(j<0?0:j)},classNames:Ut,styles:v}),et=It?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Ot.filter(li),y:Ot.filter(oi).map(I=>b(I)),x1:0-A,x2:ot+r.right,styles:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:V,prefix:h,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:x}):null;const k=0-A-15,n=ht/2,g=a?.yAxis?.title,ee=s?.yAxis?.title;t[86]!==E||t[87]!==k||t[88]!==n||t[89]!==g||t[90]!==ee?(Q=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:k,y:n,style:g,className:ee,text:E,rotate90:!0}),t[86]=E,t[87]=k,t[88]=n,t[89]=g,t[90]=ee,t[91]=Q):Q=t[91],t[92]!==f?(L=f.filter(ni).map(si),t[92]=f,t[93]=L):L=t[93],M=Me.AnimatePresence,at=St.map(I=>_t.checkIfNullOrUndefined(O(I.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:O(`${I.id}`),y:0},whileInView:{x:O(`${I.id}`),y:0,transition:{duration:o.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[I.size.map((Mt,l)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:W?C[l]===W?1:.3:.85,onMouseEnter:ie=>{B({...I,sizeIndex:l}),vt(ie.clientY),w(ie.clientX),dt?.({...I,sizeIndex:l})},onMouseMove:ie=>{B({...I,sizeIndex:l}),vt(ie.clientY),w(ie.clientX)},onMouseLeave:()=>{B(void 0),w(void 0),vt(void 0),dt?.(void 0)},onClick:()=>{(nt||q)&&(je.isEqual(p,{...I,sizeIndex:l})&&$?(R(void 0),nt?.(void 0)):(R({...I,sizeIndex:l}),nt&&nt({...I,sizeIndex:l})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:Yt(`${l}`),width:Yt.bandwidth(),variants:{initial:{height:0,y:b(0),fill:C[l]},whileInView:{height:_t.checkIfNullOrUndefined(Mt)?0:Math.abs(b(Mt)-b(0)),y:_t.checkIfNullOrUndefined(Mt)?b(0):Mt>0?b(Mt):b(0),fill:C[l],transition:{duration:o.duration}}},exit:{height:0,y:b(0),transition:{duration:o.duration}},initial:"initial",animate:Y?"whileInView":"initial"}),ut?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:Yt(`${l}`)+Yt.bandwidth()/2,style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:Mt?Mt>=0?"-5px":"1em":"-5px",variants:{initial:{y:b(0),opacity:0,fill:J||C[l]},whileInView:{y:b(Mt||0),opacity:1,fill:J||C[l],transition:{duration:o.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(Mt,m,x,h,V)}):null]},`${I.label}-${u[l]||l}`)),Vt?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${I.label}`.length<P?`${I.label}`:`${`${I.label}`.substring(0,P)}...`,y:b(0)+5,x:0,width:O.bandwidth(),height:r.bottom,style:a?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:Y}):null]},I.label)),H=pt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:pt.map((I,Mt)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:I.text,color:I.color,y:b(I.value),x1:0-A,x2:ot+r.right,classNames:I.classNames,styles:I.styles,animate:o,isInView:Y},Mt))}):null,t[8]=o,t[9]=E,t[10]=C,t[11]=F,t[12]=s?.graphObjectValues,t[13]=s?.xAxis?.axis,t[14]=s?.xAxis?.labels,t[15]=s?.yAxis?.gridLines,t[16]=s?.yAxis?.labels,t[17]=s?.yAxis?.title,t[18]=u,t[19]=f,t[20]=d,t[21]=q,t[22]=ht,t[23]=ot,t[24]=mt,t[25]=Y,t[26]=X,t[27]=A,t[28]=r.bottom,t[29]=r.left,t[30]=r.right,t[31]=r.top,t[32]=Z,t[33]=Tt,t[34]=j,t[35]=p,t[36]=m,t[37]=S,t[38]=nt,t[39]=dt,t[40]=x,t[41]=h,t[42]=pt,t[43]=$,t[44]=W,t[45]=Vt,t[46]=It,t[47]=ut,t[48]=a?.graphObjectValues,t[49]=a?.xAxis?.axis,t[50]=a?.xAxis?.labels,t[51]=a?.yAxis?.gridLines,t[52]=a?.yAxis?.labels,t[53]=a?.yAxis?.title,t[54]=V,t[55]=P,t[56]=J,t[57]=it,t[58]=M,t[59]=y,t[60]=tt,t[61]=et,t[62]=Q,t[63]=L,t[64]=ft,t[65]=Ct,t[66]=lt,t[67]=Rt,t[68]=U,t[69]=at,t[70]=H,t[71]=z}else M=t[58],y=t[59],tt=t[60],et=t[61],Q=t[62],L=t[63],ft=t[64],Ct=t[65],lt=t[66],Rt=t[67],U=t[68],at=t[69],H=t[70],z=t[71];let gt;t[94]!==M||t[95]!==at||t[96]!==H?(gt=i.jsxRuntimeExports.jsxs(M,{children:[at,H]}),t[94]=M,t[95]=at,t[96]=H,t[97]=gt):gt=t[97];let jt;t[98]!==f?(jt=f.filter(ii).map(ei),t[98]=f,t[99]=jt):jt=t[99];let wt;t[100]!==tt||t[101]!==et||t[102]!==Q||t[103]!==L||t[104]!==gt||t[105]!==jt||t[106]!==z?(wt=i.jsxRuntimeExports.jsxs("g",{transform:z,children:[tt,et,Q,L,gt,jt]}),t[100]=tt,t[101]=et,t[102]=Q,t[103]=L,t[104]=gt,t[105]=jt,t[106]=z,t[107]=wt):wt=t[107];let rt;t[108]!==y||t[109]!==ft||t[110]!==Ct||t[111]!==lt||t[112]!==Rt||t[113]!==U||t[114]!==wt?(rt=i.jsxRuntimeExports.jsx(y,{width:ft,height:Ct,viewBox:lt,direction:Rt,ref:U,children:wt}),t[108]=y,t[109]=ft,t[110]=Ct,t[111]=lt,t[112]=Rt,t[113]=U,t[114]=wt,t[115]=rt):rt=t[115];let At;t[116]!==s?.tooltip||t[117]!==D||t[118]!==Lt||t[119]!==c||t[120]!==a?.tooltip||t[121]!==st?(At=c&&st&&D&&Lt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:c,body:st,xPos:D,yPos:Lt,backgroundStyle:a?.tooltip,className:s?.tooltip}):null,t[116]=s?.tooltip,t[117]=D,t[118]=Lt,t[119]=c,t[120]=a?.tooltip,t[121]=st,t[122]=At):At=t[122];let $t;t[123]!==q||t[124]!==p?($t=q&&p!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:p!==void 0,onClose:()=>{R(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof q=="string"?{__html:$e.string2HTML(q,p)}:void 0,children:typeof q=="function"?q(p):null})}):null,t[123]=q,t[124]=p,t[125]=$t):$t=t[125];let Et;return t[126]!==rt||t[127]!==At||t[128]!==$t?(Et=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[rt,At,$t]}),t[126]=rt,t[127]=At,t[128]=$t,t[129]=Et):Et=t[129],Et}function ei(e){return e.layer}function ii(e){return e.position==="after"}function si(e){return e.layer}function ni(e){return e.position==="before"}function oi(e){return e!==0}function li(e){return e!==0}function ai(e,t){return`${t}`}function ri(e){return`${e.id}`}function ci(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:N,colors:qt,sources:Dt,graphDescription:yt,barPadding:it,showTicks:mt,truncateBy:C,height:V,width:h,footNote:F,colorDomain:Vt,colorLegendTitle:ut,suffix:It,prefix:P,showValues:st,showColorScale:dt,padding:pt,backgroundColor:Tt,leftMargin:j,rightMargin:nt,topMargin:W,bottomMargin:X,showLabels:Z,relativeHeight:$,tooltip:q,onSeriesMouseOver:E,refValues:J,graphID:S,maxValue:a,minValue:s,onSeriesMouseClick:o,graphDownload:u,dataDownload:x,language:f,labelOrder:m,minHeight:A,theme:_,maxBarThickness:K,ariaLabel:xt,resetSelectionOnDoubleClick:Ft,detailsOnClick:Ht,barAxisTitle:Y,noOfTicks:bt,valueColor:zt,styles:r,classNames:c,filterNA:B,animate:p,precision:R,customLayers:D,timeline:w,naLabel:Lt,sortParameter:vt,sortData:ot,orientation:ht}=e,M=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,y=it===void 0?.25:it,tt=mt===void 0?!0:mt,et=C===void 0?999:C,Q=It===void 0?"":It,L=P===void 0?"":P,ft=st===void 0?!0:st,Ct=dt===void 0?!0:dt,lt=Tt===void 0?!1:Tt,Rt=Z===void 0?!0:Z,U=u===void 0?!1:u,at=x===void 0?!1:x,H=f===void 0?"en":f,z=A===void 0?0:A,gt=_===void 0?"light":_,jt=Ft===void 0?!0:Ft,wt=bt===void 0?5:bt,rt=B===void 0?!0:B,At=p===void 0?!1:p,$t=R===void 0?2:R;let Et;t[0]!==D?(Et=D===void 0?[]:D,t[0]=D,t[1]=Et):Et=t[1];const b=Et,ct=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,St=Lt===void 0?"NA":Lt,O=(ht===void 0?"vertical":ht)==="horizontal"?Xe:ti,[Yt,Ot]=G.useState(0),[Kt,Nt]=G.useState(0),[Qt,Wt]=G.useState(ct.autoplay),Pt=He.sort(Le.uniqBy(d,"date",!0).map(Xt=>me.parse(`${Xt}`,ct.dateFormat||"yyyy",new Date).getTime()),Ci),[kt,Ut]=G.useState(ct.autoplay?0:Pt.length-1),[Jt,T]=G.useState(void 0),v=G.useRef(null),k=G.useRef(null);let n,g;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{const Xt=new ResizeObserver(Bt=>{Ot(Bt[0].target.clientWidth||620),Nt(Bt[0].target.clientHeight||480)});return v.current&&Xt.observe(v.current),()=>Xt.disconnect()},g=[],t[2]=n,t[3]=g):(n=t[2],g=t[3]),G.useEffect(n,g),G.useEffect(()=>{const Xt=setInterval(()=>{Ut(Bt=>Bt<Pt.length-1?Bt+1:0)},(ct.speed||2)*1e3);return Qt||clearInterval(Xt),()=>clearInterval(Xt)},[Pt,Qt,ct.speed]);const ee=ye.getSliderMarks(Pt,kt,ct.showOnlyActiveDate,ct.dateFormat||"yyyy"),I=ve.GraphContainer,Mt=c?.graphContainer,l=r?.graphContainer;let ie;t[4]!==c?.description||t[5]!==c?.title||t[6]!==d||t[7]!==at||t[8]!==yt||t[9]!==U||t[10]!==N||t[11]!==r?.description||t[12]!==r?.title||t[13]!==h?(ie=N||yt||U||at?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:c?.title,description:c?.description},graphTitle:N,graphDescription:yt,width:h,graphDownload:U?k:void 0,dataDownload:at?d.map(ki).filter(Oi).length>0?d.map(Ei).filter($i):d.filter(Ai):null}):null,t[4]=c?.description,t[5]=c?.title,t[6]=d,t[7]=at,t[8]=yt,t[9]=U,t[10]=N,t[11]=r?.description,t[12]=r?.title,t[13]=h,t[14]=ie):ie=t[14];const se=ct.enabled&&Pt.length>0&&ee?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Wt(!Qt)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Qt?"Click to pause animation":"Click to play animation",children:Qt?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:Pt[0],max:Pt[Pt.length-1],marks:ee,step:null,defaultValue:Pt[Pt.length-1],value:Pt[kt],onChangeComplete:Xt=>{Ut(Pt.indexOf(Xt))},onChange:Xt=>{Ut(Pt.indexOf(Xt))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,xe="grow flex flex-col justify-center gap-3 w-full",pe=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Ct?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:h,colorDomain:Vt,colors:M,colorLegendTitle:ut,setSelectedColor:T,showNAColor:!1,className:c?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:v,children:Yt&&Kt?i.jsxRuntimeExports.jsx(O,{data:vt!==void 0?vt==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,ct.dateFormat||"yyyy").filter(Xt=>ct.enabled?Xt.date===me.format(new Date(Pt[kt]),ct.dateFormat||"yyyy"):Xt).filter(Xt=>rt?!Xt.size.every(wi):Xt),vi,[ot||"asc"]):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,ct.dateFormat||"yyyy").filter(Xt=>ct.enabled?Xt.date===me.format(new Date(Pt[kt]),ct.dateFormat||"yyyy"):Xt).filter(Xt=>rt?!Xt.size.every(bi):Xt),Xt=>_t.checkIfNullOrUndefined(Xt.size[vt])?-1/0:Xt.size[vt],[ot||"asc"]):he.ensureCompleteDataForStackedBarChart(d,ct.dateFormat||"yyyy").filter(Xt=>rt?!Xt.size.every(yi):Xt),barColors:M,width:h||Yt,height:Math.max(z,V||($?z?(h||Yt)*$>z?(h||Yt)*$:z:(h||Yt)*$:Kt)),suffix:Q,prefix:L,showValues:ft,barPadding:y,showTicks:tt,leftMargin:j,rightMargin:nt,topMargin:W,bottomMargin:X,truncateBy:et,showLabels:Rt,tooltip:q,onSeriesMouseOver:E,refValues:J,maxValue:_t.checkIfNullOrUndefined(a)?Math.max(...d.map(fi))<0?0:Math.max(...d.map(pi)):a,minValue:_t.checkIfNullOrUndefined(s)?Math.min(...d.map(mi))>=0?0:Math.min(...d.map(ui)):s,onSeriesMouseClick:o,selectedColor:Jt,labelOrder:m,rtl:H==="he"||H==="ar",maxBarThickness:K,resetSelectionOnDoubleClick:jt,detailsOnClick:Ht,barAxisTitle:Y,noOfTicks:wt,valueColor:zt,styles:r,classNames:c,colorDomain:Vt,animate:At===!0?{duration:.5,once:!0,amount:.5}:At||{duration:0,once:!0,amount:0},precision:$t,customLayers:b,naLabel:St}):null})]});let re;t[15]!==pe?(re=i.jsxRuntimeExports.jsx("div",{className:xe,children:pe}),t[15]=pe,t[16]=re):re=t[16];let ne;t[17]!==c?.footnote||t[18]!==c?.source||t[19]!==F||t[20]!==Dt||t[21]!==r?.footnote||t[22]!==r?.source||t[23]!==h?(ne=Dt||F?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:Dt,footNote:F,width:h}):null,t[17]=c?.footnote,t[18]=c?.source,t[19]=F,t[20]=Dt,t[21]=r?.footnote,t[22]=r?.source,t[23]=h,t[24]=ne):ne=t[24];let le;return t[25]!==I||t[26]!==xt||t[27]!==lt||t[28]!==S||t[29]!==V||t[30]!==H||t[31]!==z||t[32]!==pt||t[33]!==$||t[34]!==Mt||t[35]!==l||t[36]!==ie||t[37]!==se||t[38]!==re||t[39]!==ne||t[40]!==gt||t[41]!==h?(le=i.jsxRuntimeExports.jsxs(I,{className:Mt,style:l,id:S,ref:k,"aria-label":xt,backgroundColor:lt,theme:gt,language:H,minHeight:z,width:h,height:V,relativeHeight:$,padding:pt,children:[ie,se,re,ne]}),t[25]=I,t[26]=xt,t[27]=lt,t[28]=S,t[29]=V,t[30]=H,t[31]=z,t[32]=pt,t[33]=$,t[34]=Mt,t[35]=l,t[36]=ie,t[37]=se,t[38]=re,t[39]=ne,t[40]=gt,t[41]=h,t[42]=le):le=t[42],le}function ui(e){return Math.min(...e.size.filter(xi))}function xi(e){return!_t.checkIfNullOrUndefined(e)}function mi(e){return Math.min(...e.size.filter(di))}function di(e){return!_t.checkIfNullOrUndefined(e)}function pi(e){return Math.max(...e.size.filter(hi))}function hi(e){return!_t.checkIfNullOrUndefined(e)}function fi(e){return Math.max(...e.size.filter(gi))}function gi(e){return!_t.checkIfNullOrUndefined(e)}function yi(e){return e==null}function bi(e){return e==null}function vi(e){return oe.sum(e.size.filter(ji))}function ji(e){return!_t.checkIfNullOrUndefined(e)}function wi(e){return e==null}function Ai(e){return e!==void 0}function $i(e){return e!==void 0}function Ei(e){return e.data}function Oi(e){return e!==void 0}function ki(e){return e.data}function Ci(e,t){return Ge.ascending(e,t)}function Ri(e){const t=i.compilerRuntimeExports.c(125),{data:d,barColor:N,suffix:qt,prefix:Dt,barPadding:yt,showValues:it,showTicks:mt,truncateBy:C,width:V,height:h,colorDomain:F,topMargin:Vt,bottomMargin:ut,leftMargin:It,rightMargin:P,showLabels:st,tooltip:dt,onSeriesMouseOver:pt,refValues:Tt,selectedColor:j,highlightedDataPoints:nt,maxValue:W,minValue:X,onSeriesMouseClick:Z,labelOrder:$,rtl:q,maxBarThickness:E,minBarThickness:J,resetSelectionOnDoubleClick:S,detailsOnClick:a,barAxisTitle:s,valueColor:o,noOfTicks:u,styles:x,classNames:f,animate:m,dimmedOpacity:A,precision:_,customLayers:K,naLabel:xt}=e,Ft=Vt===void 0?25:Vt,Ht=ut===void 0?10:ut,Y=It===void 0?100:It,bt=P===void 0?40:P,zt=G.useRef(null);let r;t[0]!==m.amount||t[1]!==m.once?(r={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=r):r=t[2];const c=Ce.useInView(zt,r),[B,p]=G.useState(void 0),[R,D]=G.useState(void 0),[w,Lt]=G.useState(void 0),[vt,ot]=G.useState(void 0),ht=s?Ft+25:Ft;let M;t[3]!==Ht||t[4]!==Y||t[5]!==bt||t[6]!==ht?(M={top:ht,bottom:Ht,left:Y,right:bt},t[3]=Ht,t[4]=Y,t[5]=bt,t[6]=ht,t[7]=M):M=t[7];const y=M,tt=V-y.left-y.right,et=h-y.top-y.bottom;let Q,L,ft,Ct,lt,Rt,U,at,H,z,gt,jt,wt,rt;if(t[8]!==m||t[9]!==s||t[10]!==N||t[11]!==yt||t[12]!==f?.graphObjectValues||t[13]!==f?.xAxis?.gridLines||t[14]!==f?.xAxis?.labels||t[15]!==f?.xAxis?.title||t[16]!==f?.yAxis?.axis||t[17]!==f?.yAxis?.labels||t[18]!==F||t[19]!==K||t[20]!==d||t[21]!==a||t[22]!==A||t[23]!==et||t[24]!==tt||t[25]!==h||t[26]!==nt||t[27]!==c||t[28]!==$||t[29]!==y.bottom||t[30]!==y.left||t[31]!==y.top||t[32]!==E||t[33]!==W||t[34]!==J||t[35]!==X||t[36]!==R||t[37]!==xt||t[38]!==u||t[39]!==Z||t[40]!==pt||t[41]!==_||t[42]!==Dt||t[43]!==Tt||t[44]!==S||t[45]!==q||t[46]!==j||t[47]!==st||t[48]!==mt||t[49]!==it||t[50]!==x?.graphObjectValues||t[51]!==x?.xAxis?.gridLines||t[52]!==x?.xAxis?.labels||t[53]!==x?.xAxis?.title||t[54]!==x?.yAxis?.axis||t[55]!==x?.yAxis?.labels||t[56]!==qt||t[57]!==Ft||t[58]!==C||t[59]!==o||t[60]!==V){let O;t[75]!==$?(O=(n,g)=>({...n,id:$?`${n.label}`:`${g}`}),t[75]=$,t[76]=O):O=t[76];const Yt=d.map(O),Ot=Re.linear().domain([X,W]).range([0,tt]).nice(),Kt=$||Yt.map(Fi),Nt=fe.band().domain(Kt).range([0,J?Math.max(et,J*Kt.length):E?Math.min(et,E*Kt.length):et]).paddingInner(yt),Qt=Ot.ticks(u);L=Zt.motion.svg,U=zt,at=`${V}px`,H=`${h}px`,z=`0 0 ${V} ${h}`,gt="ltr",ft=`translate(${y.left},${y.top})`,Ct=mt?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Qt.filter(Bi),x:Qt.filter(zi).map(n=>Ot(n)),y1:0-Ft,y2:et+y.bottom,styles:{gridLines:x?.xAxis?.gridLines,labels:x?.xAxis?.labels},classNames:{gridLines:f?.xAxis?.gridLines,labels:f?.xAxis?.labels},suffix:qt,prefix:Dt,labelType:"secondary",showGridLines:!0,precision:_}):null;const Wt=tt/2,Pt=0-y.top+15,kt=x?.xAxis?.title,Ut=f?.xAxis?.title;t[77]!==s||t[78]!==Wt||t[79]!==Pt||t[80]!==kt||t[81]!==Ut?(lt=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Wt,y:Pt,style:kt,className:Ut,text:s}),t[77]=s,t[78]=Wt,t[79]=Pt,t[80]=kt,t[81]=Ut,t[82]=lt):lt=t[82],t[83]!==K?(Rt=K.filter(Di).map(Si),t[83]=K,t[84]=Rt):Rt=t[84],Q=Me.AnimatePresence,jt=Yt.map(n=>_t.checkIfNullOrUndefined(Nt(n.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:j?n.color&&N[F.indexOf(n.color)]===j?1:A:nt.length!==0?nt.indexOf(n.label)!==-1?.85:A:.85},whileInView:{opacity:j?n.color&&N[F.indexOf(n.color)]===j?1:A:nt.length!==0?nt.indexOf(n.label)!==-1?.85:A:.85,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:g=>{p(n),ot(g.clientY),Lt(g.clientX),pt?.(n)},onClick:()=>{(Z||a)&&(je.isEqual(R,n)&&S?(D(void 0),Z?.(void 0)):(D(n),Z?.(n)))},onMouseMove:g=>{p(n),ot(g.clientY),Lt(g.clientX)},onMouseLeave:()=>{p(void 0),Lt(void 0),ot(void 0),pt?.(void 0)},children:[n.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{variants:{initial:{width:0,x:Ot(0),y:Nt(`${n.id}`),fill:d.filter(Ti).length===0?N[0]:n.color?N[F.indexOf(n.color)]:ce.Colors.gray},whileInView:{width:n.size>=0?Ot(n.size)-Ot(0):Ot(0)-Ot(n.size),x:n.size>=0?Ot(0):Ot(n.size),y:Nt(`${n.id}`),fill:d.filter(Ii).length===0?N[0]:n.color?N[F.indexOf(n.color)]:ce.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{width:0,x:Ot(0),transition:{duration:m.duration}},height:Nt.bandwidth()}):null,st?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${n.label}`.length<C?`${n.label}`:`${`${n.label}`.substring(0,C)}...`,y:Nt(n.id)||0,x:(n.size||0)<0?Ot(0):0-y.left,width:(n.size||0)<0?V-Ot(0):Ot(0)+y.left,height:Nt.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:x?.yAxis?.labels,className:f?.yAxis?.labels,animate:m,isInView:c}):null,it?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:n.size&&n.size<0?"end":"start",...x?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!o&&N.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",f?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",variants:{initial:{x:Ot(0),y:Nt(`${n.id}`)+Nt.bandwidth()/2,opacity:0,fill:o||(d.filter(Vi).length===0?N[0]:n.color?N[F.indexOf(n.color)]:ce.Colors.gray)},whileInView:{x:n.size?Ot(n.size):Ot(0),opacity:1,y:Nt(`${n.id}`)+Nt.bandwidth()/2,fill:o||(d.filter(Ni).length===0?N[0]:n.color?N[F.indexOf(n.color)]:ce.Colors.gray),transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(n.size,xt,_,Dt,qt)}):null]},n.label));const Jt=f?.yAxis?.axis;let T;t[85]!==Jt?(T={axis:Jt},t[85]=Jt,t[86]=T):T=t[86];const v=x?.yAxis?.axis;let k;t[87]!==v?(k={axis:v},t[87]=v,t[88]=k):k=t[88],wt=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:Ot(X<0?0:X),x2:Ot(X<0?0:X),y1:-2.5,y2:et+y.bottom,classNames:T,styles:k}),rt=Tt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Tt.map((n,g)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:n.text,color:n.color,x:Ot(n.value),y1:0-y.top,y2:et+y.bottom,textSide:Ot(n.value)>tt*.75||q?"left":"right",classNames:n.classNames,styles:n.styles,animate:m,isInView:c},g))}):null,t[8]=m,t[9]=s,t[10]=N,t[11]=yt,t[12]=f?.graphObjectValues,t[13]=f?.xAxis?.gridLines,t[14]=f?.xAxis?.labels,t[15]=f?.xAxis?.title,t[16]=f?.yAxis?.axis,t[17]=f?.yAxis?.labels,t[18]=F,t[19]=K,t[20]=d,t[21]=a,t[22]=A,t[23]=et,t[24]=tt,t[25]=h,t[26]=nt,t[27]=c,t[28]=$,t[29]=y.bottom,t[30]=y.left,t[31]=y.top,t[32]=E,t[33]=W,t[34]=J,t[35]=X,t[36]=R,t[37]=xt,t[38]=u,t[39]=Z,t[40]=pt,t[41]=_,t[42]=Dt,t[43]=Tt,t[44]=S,t[45]=q,t[46]=j,t[47]=st,t[48]=mt,t[49]=it,t[50]=x?.graphObjectValues,t[51]=x?.xAxis?.gridLines,t[52]=x?.xAxis?.labels,t[53]=x?.xAxis?.title,t[54]=x?.yAxis?.axis,t[55]=x?.yAxis?.labels,t[56]=qt,t[57]=Ft,t[58]=C,t[59]=o,t[60]=V,t[61]=Q,t[62]=L,t[63]=ft,t[64]=Ct,t[65]=lt,t[66]=Rt,t[67]=U,t[68]=at,t[69]=H,t[70]=z,t[71]=gt,t[72]=jt,t[73]=wt,t[74]=rt}else Q=t[61],L=t[62],ft=t[63],Ct=t[64],lt=t[65],Rt=t[66],U=t[67],at=t[68],H=t[69],z=t[70],gt=t[71],jt=t[72],wt=t[73],rt=t[74];let At;t[89]!==Q||t[90]!==jt||t[91]!==wt||t[92]!==rt?(At=i.jsxRuntimeExports.jsxs(Q,{children:[jt,wt,rt]}),t[89]=Q,t[90]=jt,t[91]=wt,t[92]=rt,t[93]=At):At=t[93];let $t;t[94]!==K?($t=K.filter(Li).map(Mi),t[94]=K,t[95]=$t):$t=t[95];let Et;t[96]!==ft||t[97]!==Ct||t[98]!==lt||t[99]!==Rt||t[100]!==At||t[101]!==$t?(Et=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[Ct,lt,Rt,At,$t]}),t[96]=ft,t[97]=Ct,t[98]=lt,t[99]=Rt,t[100]=At,t[101]=$t,t[102]=Et):Et=t[102];let b;t[103]!==L||t[104]!==U||t[105]!==at||t[106]!==H||t[107]!==z||t[108]!==gt||t[109]!==Et?(b=i.jsxRuntimeExports.jsx(L,{ref:U,width:at,height:H,viewBox:z,direction:gt,children:Et}),t[103]=L,t[104]=U,t[105]=at,t[106]=H,t[107]=z,t[108]=gt,t[109]=Et,t[110]=b):b=t[110];let ct;t[111]!==f?.tooltip||t[112]!==w||t[113]!==vt||t[114]!==B||t[115]!==x?.tooltip||t[116]!==dt?(ct=B&&dt&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:B,body:dt,xPos:w,yPos:vt,backgroundStyle:x?.tooltip,className:f?.tooltip}):null,t[111]=f?.tooltip,t[112]=w,t[113]=vt,t[114]=B,t[115]=x?.tooltip,t[116]=dt,t[117]=ct):ct=t[117];let St;t[118]!==a||t[119]!==R?(St=a&&R!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:R!==void 0,onClose:()=>{D(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof a=="string"?{__html:$e.string2HTML(a,R)}:void 0,children:typeof a=="function"?a(R):null})}):null,t[118]=a,t[119]=R,t[120]=St):St=t[120];let Gt;return t[121]!==b||t[122]!==ct||t[123]!==St?(Gt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[b,ct,St]}),t[121]=b,t[122]=ct,t[123]=St,t[124]=Gt):Gt=t[124],Gt}function Mi(e){return e.layer}function Li(e){return e.position==="after"}function Ni(e){return e.color}function Vi(e){return e.color}function Ii(e){return e.color}function Ti(e){return e.color}function Si(e){return e.layer}function Di(e){return e.position==="before"}function zi(e){return e!==0}function Bi(e){return e!==0}function Fi(e){return`${e.id}`}function Pi(e){const t=i.compilerRuntimeExports.c(133),{leftMargin:d,rightMargin:N,topMargin:qt,bottomMargin:Dt,data:yt,width:it,height:mt,barColor:C,suffix:V,prefix:h,barPadding:F,showLabels:Vt,showValues:ut,showTicks:It,colorDomain:P,truncateBy:st,tooltip:dt,onSeriesMouseOver:pt,refValues:Tt,selectedColor:j,maxValue:nt,minValue:W,highlightedDataPoints:X,onSeriesMouseClick:Z,labelOrder:$,maxBarThickness:q,minBarThickness:E,resetSelectionOnDoubleClick:J,detailsOnClick:S,barAxisTitle:a,valueColor:s,noOfTicks:o,styles:u,classNames:x,dimmedOpacity:f,animate:m,precision:A,customLayers:_,naLabel:K}=e,xt=d===void 0?20:d,Ft=N===void 0?20:N,Ht=qt===void 0?20:qt,Y=Dt===void 0?25:Dt,bt=G.useRef(null);let zt;t[0]!==m.amount||t[1]!==m.once?(zt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=zt):zt=t[2];const r=Ce.useInView(bt,zt),c=a?xt+30:xt;let B;t[3]!==Y||t[4]!==Ft||t[5]!==c||t[6]!==Ht?(B={top:Ht,bottom:Y,left:c,right:Ft},t[3]=Y,t[4]=Ft,t[5]=c,t[6]=Ht,t[7]=B):B=t[7];const p=B,[R,D]=G.useState(void 0),[w,Lt]=G.useState(void 0),[vt,ot]=G.useState(void 0),[ht,M]=G.useState(void 0),y=it-p.left-p.right,tt=mt-p.top-p.bottom;let et,Q,L,ft,Ct,lt,Rt,U,at,H,z,gt,jt,wt;if(t[8]!==m||t[9]!==a||t[10]!==C||t[11]!==F||t[12]!==x?.graphObjectValues||t[13]!==x?.xAxis?.axis||t[14]!==x?.xAxis?.labels||t[15]!==x?.yAxis?.gridLines||t[16]!==x?.yAxis?.labels||t[17]!==x?.yAxis?.title||t[18]!==P||t[19]!==_||t[20]!==yt||t[21]!==S||t[22]!==f||t[23]!==tt||t[24]!==y||t[25]!==mt||t[26]!==X||t[27]!==r||t[28]!==$||t[29]!==xt||t[30]!==p.bottom||t[31]!==p.left||t[32]!==p.right||t[33]!==p.top||t[34]!==q||t[35]!==nt||t[36]!==E||t[37]!==W||t[38]!==w||t[39]!==K||t[40]!==o||t[41]!==Z||t[42]!==pt||t[43]!==A||t[44]!==h||t[45]!==Tt||t[46]!==J||t[47]!==j||t[48]!==Vt||t[49]!==It||t[50]!==ut||t[51]!==u?.graphObjectValues||t[52]!==u?.xAxis?.axis||t[53]!==u?.xAxis?.labels||t[54]!==u?.yAxis?.gridLines||t[55]!==u?.yAxis?.labels||t[56]!==u?.yAxis?.title||t[57]!==V||t[58]!==st||t[59]!==s||t[60]!==it){const Gt=Re.linear().domain([W,nt]).range([tt,0]).nice();let O;t[75]!==$?(O=(l,ie)=>({...l,id:$?`${l.label}`:`${ie}`}),t[75]=$,t[76]=O):O=t[76];const Yt=yt.map(O),Ot=$||Yt.map(Zi),Kt=fe.band().domain(Ot).range([0,E?Math.max(y,E*Ot.length):q?Math.min(y,q*Ot.length):y]).paddingInner(F),Nt=Gt.ticks(o);Q=Zt.motion.svg,Rt=bt,U=`${it}px`,at=`${mt}px`,H=`0 0 ${it} ${mt}`,z="ltr",wt=`translate(${p.left},${p.top})`;const Qt=Gt(W<0?0:W),Wt=Gt(W<0?0:W),Pt=W<0?0:W;let kt;t[77]!==K||t[78]!==A||t[79]!==h||t[80]!==V||t[81]!==Pt?(kt=ue.numberFormattingFunction(Pt,K,A,h,V),t[77]=K,t[78]=A,t[79]=h,t[80]=V,t[81]=Pt,t[82]=kt):kt=t[82];const Ut=x?.xAxis?.axis,Jt=x?.yAxis?.labels;let T;t[83]!==Ut||t[84]!==Jt?(T={axis:Ut,label:Jt},t[83]=Ut,t[84]=Jt,t[85]=T):T=t[85];const v=u?.xAxis?.axis,k=u?.yAxis?.labels;let n;t[86]!==v||t[87]!==k?(n={axis:v,label:k},t[86]=v,t[87]=k,t[88]=n):n=t[88],L=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Qt,y2:Wt,x1:0-xt,x2:y+p.right,label:kt,labelPos:{x:0-xt,dx:0,dy:nt<0?"1em":-5,y:Gt(W<0?0:W)},classNames:T,styles:n}),ft=It?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Nt.filter(Qi),y:Nt.filter(Ki).map(l=>Gt(l)),x1:0-xt,x2:y+p.right,styles:{gridLines:u?.yAxis?.gridLines,labels:u?.yAxis?.labels},classNames:{gridLines:x?.yAxis?.gridLines,labels:x?.yAxis?.labels},suffix:V,prefix:h,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:A}):null;const g=0-xt-15,ee=tt/2,I=u?.yAxis?.title,Mt=x?.yAxis?.title;t[89]!==a||t[90]!==g||t[91]!==ee||t[92]!==I||t[93]!==Mt?(Ct=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:g,y:ee,style:I,className:Mt,text:a,rotate90:!0}),t[89]=a,t[90]=g,t[91]=ee,t[92]=I,t[93]=Mt,t[94]=Ct):Ct=t[94],t[95]!==_?(lt=_.filter(Ji).map(Wi),t[95]=_,t[96]=lt):lt=t[96],et=Me.AnimatePresence,gt=Yt.map((l,ie)=>_t.checkIfNullOrUndefined(Kt(l.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:r?"whileInView":"initial",variants:{initial:{opacity:j?l.color&&C[P.indexOf(l.color)]===j?1:f:X.length!==0?X.indexOf(l.label)!==-1?.85:f:.85},whileInView:{opacity:j?l.color&&C[P.indexOf(l.color)]===j?1:f:X.length!==0?X.indexOf(l.label)!==-1?.85:f:.85,transition:{duration:m.duration}}},exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:se=>{D(l),M(se.clientY),ot(se.clientX),pt?.(l)},onClick:()=>{(Z||S)&&(je.isEqual(w,l)&&J?(Lt(void 0),Z?.(void 0)):(Lt(l),Z?.(l)))},onMouseMove:se=>{D(l),M(se.clientY),ot(se.clientX)},onMouseLeave:()=>{D(void 0),ot(void 0),M(void 0),pt?.(void 0)},children:[l.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{width:Kt.bandwidth(),initial:"initial",animate:r?"whileInView":"initial",variants:{initial:{height:0,x:Kt(`${l.id}`),y:Gt(0),fill:yt.filter(Ui).length===0?C[0]:l.color?C[P.indexOf(l.color)]:ce.Colors.gray},whileInView:{height:l.size?Math.abs(Gt(l.size)-Gt(0)):0,y:l.size&&l.size>0?Gt(l.size):Gt(0),x:Kt(`${l.id}`),fill:yt.filter(Yi).length===0?C[0]:l.color?C[P.indexOf(l.color)]:ce.Colors.gray,transition:{duration:m.duration}}},exit:{height:0,y:Gt(0),transition:{duration:m.duration}}}):null,Vt?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${l.label}`.length<st?`${l.label}`:`${`${l.label}`.substring(0,st)}...`,y:(l.size||0)<0?0:Gt(0)+5,x:Kt(`${l.id}`),width:Kt.bandwidth(),height:(l.size||0)<0?Gt(0)-5:p.bottom,style:u?.xAxis?.labels,className:x?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:m,isInView:r}):null,ut?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...u?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!s&&C.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",x?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",variants:{initial:{x:Kt(`${l.id}`)+Kt.bandwidth()/2,y:Gt(0),opacity:0,fill:s||(yt.filter(Xi).length===0?C[0]:l.color?C[P.indexOf(l.color)]:ce.Colors.gray)},whileInView:{x:Kt(`${l.id}`)+Kt.bandwidth()/2,y:Gt(l.size||0),fill:s||(yt.filter(Gi).length===0?C[0]:l.color?C[P.indexOf(l.color)]:ce.Colors.gray),opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:r?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(l.size,K,A,h,V)}):null]},l.label)),jt=Tt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Tt.map((l,ie)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:l.text,color:l.color,y:Gt(l.value),x1:0-xt,x2:y+p.right,classNames:l.classNames,styles:l.styles,animate:m,isInView:r},ie))}):null,t[8]=m,t[9]=a,t[10]=C,t[11]=F,t[12]=x?.graphObjectValues,t[13]=x?.xAxis?.axis,t[14]=x?.xAxis?.labels,t[15]=x?.yAxis?.gridLines,t[16]=x?.yAxis?.labels,t[17]=x?.yAxis?.title,t[18]=P,t[19]=_,t[20]=yt,t[21]=S,t[22]=f,t[23]=tt,t[24]=y,t[25]=mt,t[26]=X,t[27]=r,t[28]=$,t[29]=xt,t[30]=p.bottom,t[31]=p.left,t[32]=p.right,t[33]=p.top,t[34]=q,t[35]=nt,t[36]=E,t[37]=W,t[38]=w,t[39]=K,t[40]=o,t[41]=Z,t[42]=pt,t[43]=A,t[44]=h,t[45]=Tt,t[46]=J,t[47]=j,t[48]=Vt,t[49]=It,t[50]=ut,t[51]=u?.graphObjectValues,t[52]=u?.xAxis?.axis,t[53]=u?.xAxis?.labels,t[54]=u?.yAxis?.gridLines,t[55]=u?.yAxis?.labels,t[56]=u?.yAxis?.title,t[57]=V,t[58]=st,t[59]=s,t[60]=it,t[61]=et,t[62]=Q,t[63]=L,t[64]=ft,t[65]=Ct,t[66]=lt,t[67]=Rt,t[68]=U,t[69]=at,t[70]=H,t[71]=z,t[72]=gt,t[73]=jt,t[74]=wt}else et=t[61],Q=t[62],L=t[63],ft=t[64],Ct=t[65],lt=t[66],Rt=t[67],U=t[68],at=t[69],H=t[70],z=t[71],gt=t[72],jt=t[73],wt=t[74];let rt;t[97]!==et||t[98]!==gt||t[99]!==jt?(rt=i.jsxRuntimeExports.jsxs(et,{children:[gt,jt]}),t[97]=et,t[98]=gt,t[99]=jt,t[100]=rt):rt=t[100];let At;t[101]!==_?(At=_.filter(Hi).map(qi),t[101]=_,t[102]=At):At=t[102];let $t;t[103]!==L||t[104]!==ft||t[105]!==Ct||t[106]!==lt||t[107]!==rt||t[108]!==At||t[109]!==wt?($t=i.jsxRuntimeExports.jsxs("g",{transform:wt,children:[L,ft,Ct,lt,rt,At]}),t[103]=L,t[104]=ft,t[105]=Ct,t[106]=lt,t[107]=rt,t[108]=At,t[109]=wt,t[110]=$t):$t=t[110];let Et;t[111]!==Q||t[112]!==Rt||t[113]!==U||t[114]!==at||t[115]!==H||t[116]!==z||t[117]!==$t?(Et=i.jsxRuntimeExports.jsx(Q,{ref:Rt,width:U,height:at,viewBox:H,direction:z,children:$t}),t[111]=Q,t[112]=Rt,t[113]=U,t[114]=at,t[115]=H,t[116]=z,t[117]=$t,t[118]=Et):Et=t[118];let b;t[119]!==x?.tooltip||t[120]!==vt||t[121]!==ht||t[122]!==R||t[123]!==u?.tooltip||t[124]!==dt?(b=R&&dt&&vt&&ht?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:R,body:dt,xPos:vt,yPos:ht,backgroundStyle:u?.tooltip,className:x?.tooltip}):null,t[119]=x?.tooltip,t[120]=vt,t[121]=ht,t[122]=R,t[123]=u?.tooltip,t[124]=dt,t[125]=b):b=t[125];let ct;t[126]!==S||t[127]!==w?(ct=S&&w!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:w!==void 0,onClose:()=>{Lt(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof S=="string"?{__html:$e.string2HTML(S,w)}:void 0,children:typeof S=="function"?S(w):null})}):null,t[126]=S,t[127]=w,t[128]=ct):ct=t[128];let St;return t[129]!==Et||t[130]!==b||t[131]!==ct?(St=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Et,b,ct]}),t[129]=Et,t[130]=b,t[131]=ct,t[132]=St):St=t[132],St}function qi(e){return e.layer}function Hi(e){return e.position==="after"}function Gi(e){return e.color}function Xi(e){return e.color}function Yi(e){return e.color}function Ui(e){return e.color}function Wi(e){return e.layer}function Ji(e){return e.position==="before"}function Ki(e){return e!==0}function Qi(e){return e!==0}function Zi(e){return`${e.id}`}function _i(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:N,colors:qt,suffix:Dt,sources:yt,prefix:it,graphDescription:mt,barPadding:C,showValues:V,showTicks:h,truncateBy:F,height:Vt,width:ut,footNote:It,colorDomain:P,colorLegendTitle:st,highlightedDataPoints:dt,padding:pt,backgroundColor:Tt,topMargin:j,bottomMargin:nt,leftMargin:W,rightMargin:X,showLabels:Z,relativeHeight:$,tooltip:q,onSeriesMouseOver:E,refValues:J,showColorScale:S,graphID:a,maxValue:s,minValue:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:f,sortData:m,labelOrder:A,language:_,showNAColor:K,minHeight:xt,theme:Ft,maxBarThickness:Ht,maxNumberOfBars:Y,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,detailsOnClick:c,barAxisTitle:B,noOfTicks:p,valueColor:R,styles:D,classNames:w,filterNA:Lt,animate:vt,dimmedOpacity:ot,precision:ht,customLayers:M,timeline:y,naLabel:tt,orientation:et}=e,Q=Dt===void 0?"":Dt,L=it===void 0?"":it,ft=C===void 0?.25:C,Ct=V===void 0?!0:V,lt=h===void 0?!0:h,Rt=F===void 0?999:F;let U;t[0]!==dt?(U=dt===void 0?[]:dt,t[0]=dt,t[1]=U):U=t[1];const at=U,H=Tt===void 0?!1:Tt,z=Z===void 0?!0:Z,gt=S===void 0?!0:S,jt=x===void 0?!1:x,wt=f===void 0?!1:f,rt=_===void 0?"en":_,At=K===void 0?!0:K,$t=xt===void 0?0:xt,Et=Ft===void 0?"light":Ft,b=r===void 0?!0:r,ct=p===void 0?5:p,St=Lt===void 0?!0:Lt,Gt=vt===void 0?!1:vt,O=ot===void 0?.3:ot,Yt=ht===void 0?2:ht;let Ot;t[2]!==M?(Ot=M===void 0?[]:M,t[2]=M,t[3]=Ot):Ot=t[3];const Kt=Ot,Nt=y===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:y,Qt=tt===void 0?"NA":tt,Wt=et===void 0?"vertical":et,Pt=Wt==="horizontal"?Ri:Pi,[kt,Ut]=G.useState(0),[Jt,T]=G.useState(0),[v,k]=G.useState(Nt.autoplay),n=He.sort(Le.uniqBy(d,"date",!0).map(te=>me.parse(`${te}`,Nt.dateFormat||"yyyy",new Date).getTime()),fs),[g,ee]=G.useState(Nt.autoplay?0:n.length-1),[I,Mt]=G.useState(void 0),l=G.useRef(null),ie=G.useRef(null);let se,xe;t[4]===Symbol.for("react.memo_cache_sentinel")?(se=()=>{const te=new ResizeObserver(de=>{Ut(de[0].target.clientWidth||620),T(de[0].target.clientHeight||480)});return l.current&&te.observe(l.current),()=>te.disconnect()},xe=[],t[4]=se,t[5]=xe):(se=t[4],xe=t[5]),G.useEffect(se,xe),G.useEffect(()=>{const te=setInterval(()=>{ee(de=>de<n.length-1?de+1:0)},(Nt.speed||2)*1e3);return v||clearInterval(te),()=>clearInterval(te)},[n,v,Nt.speed]);const pe=ye.getSliderMarks(n,g,Nt.showOnlyActiveDate,Nt.dateFormat||"yyyy"),re=ve.GraphContainer,ne=w?.graphContainer,le=D?.graphContainer;let Xt;t[6]!==w?.description||t[7]!==w?.title||t[8]!==d||t[9]!==wt||t[10]!==mt||t[11]!==jt||t[12]!==N||t[13]!==D?.description||t[14]!==D?.title||t[15]!==ut?(Xt=N||mt||jt||wt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:D?.title,description:D?.description},classNames:{title:w?.title,description:w?.description},graphTitle:N,graphDescription:mt,width:ut,graphDownload:jt?ie:void 0,dataDownload:wt?d.map(hs).filter(ps).length>0?d.map(ds).filter(ms):d.filter(xs):null}):null,t[6]=w?.description,t[7]=w?.title,t[8]=d,t[9]=wt,t[10]=mt,t[11]=jt,t[12]=N,t[13]=D?.description,t[14]=D?.title,t[15]=ut,t[16]=Xt):Xt=t[16];const Bt=Nt.enabled&&n.length>0&&pe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center pb-4",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{k(!v)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":v?"Click to pause animation":"Click to play animation",children:v?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:n[0],max:n[n.length-1],marks:pe,step:null,defaultValue:n[n.length-1],value:n[g],onChangeComplete:te=>{ee(n.indexOf(te))},onChange:te=>{ee(n.indexOf(te))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,ae=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[gt&&d.filter(us).length!==0?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:ut,colorLegendTitle:st,colors:qt||ce.Colors[Et].categoricalColors.colors,colorDomain:P||Le.uniqBy(d,"color",!0),setSelectedColor:Mt,showNAColor:At,className:w?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:l,children:kt&&Jt?i.jsxRuntimeExports.jsx(Pt,{data:m?Ne.orderBy(he.ensureCompleteDataForBarChart(d,Nt.dateFormat||"yyyy").filter(te=>Nt.enabled?te.date===me.format(new Date(n[g]),Nt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te),[te=>te.size===void 0?m==="asc"?(Wt==="horizontal"?1:-1)*(1/0):(Wt==="horizontal"?-1:1)*(1/0):te.size],[m]).filter((te,de)=>Y?de<Y:!0):he.ensureCompleteDataForBarChart(d,Nt.dateFormat||"yyyy").filter(te=>Nt.enabled?te.date===me.format(new Date(n[g]),Nt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te).filter((te,de)=>Y?de<Y:!0),barColor:d.filter(cs).length===0?qt?[qt]:[ce.Colors.primaryColors["blue-600"]]:qt||ce.Colors[Et].categoricalColors.colors,colorDomain:d.filter(rs).length===0?[]:P||Le.uniqBy(d,"color",!0),selectedColor:I,width:kt,height:Jt,suffix:Q,prefix:L,barPadding:ft,showValues:Ct,showTicks:lt,leftMargin:W,rightMargin:X,topMargin:j,bottomMargin:nt,truncateBy:Rt,showLabels:z,tooltip:q,onSeriesMouseOver:E,refValues:J,maxValue:_t.checkIfNullOrUndefined(s)?Math.max(...d.filter(as).map(ls))<0?0:Math.max(...d.filter(os).map(ns)):s,minValue:_t.checkIfNullOrUndefined(o)?Math.min(...d.filter(ss).map(is))>=0?0:Math.min(...d.filter(es).map(ts)):o,highlightedDataPoints:at,onSeriesMouseClick:u,labelOrder:A,rtl:rt==="he"||rt==="ar",maxBarThickness:Ht,minBarThickness:bt,resetSelectionOnDoubleClick:b,detailsOnClick:c,barAxisTitle:B,noOfTicks:ct,valueColor:R,classNames:w,styles:D,animate:Gt===!0?{duration:.5,once:!0,amount:.5}:Gt||{duration:0,once:!0,amount:0},dimmedOpacity:O,precision:Yt,customLayers:Kt,naLabel:Qt}):null})]});let ge;t[17]!==w?.footnote||t[18]!==w?.source||t[19]!==It||t[20]!==yt||t[21]!==D?.footnote||t[22]!==D?.source||t[23]!==ut?(ge=yt||It?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{sources:yt,footNote:It,width:ut,styles:{footnote:D?.footnote,source:D?.source},classNames:{footnote:w?.footnote,source:w?.source}}):null,t[17]=w?.footnote,t[18]=w?.source,t[19]=It,t[20]=yt,t[21]=D?.footnote,t[22]=D?.source,t[23]=ut,t[24]=ge):ge=t[24];let Ve;return t[25]!==re||t[26]!==zt||t[27]!==H||t[28]!==a||t[29]!==Vt||t[30]!==rt||t[31]!==$t||t[32]!==pt||t[33]!==$||t[34]!==ne||t[35]!==le||t[36]!==Xt||t[37]!==Bt||t[38]!==ae||t[39]!==ge||t[40]!==Et||t[41]!==ut?(Ve=i.jsxRuntimeExports.jsxs(re,{className:ne,style:le,id:a,ref:ie,"aria-label":zt,backgroundColor:H,theme:Et,language:rt,minHeight:$t,width:ut,height:Vt,relativeHeight:$,padding:pt,children:[Xt,Bt,ae,ge]}),t[25]=re,t[26]=zt,t[27]=H,t[28]=a,t[29]=Vt,t[30]=rt,t[31]=$t,t[32]=pt,t[33]=$,t[34]=ne,t[35]=le,t[36]=Xt,t[37]=Bt,t[38]=ae,t[39]=ge,t[40]=Et,t[41]=ut,t[42]=Ve):Ve=t[42],Ve}function ts(e){return e.size}function es(e){return!_t.checkIfNullOrUndefined(e.size)}function is(e){return e.size}function ss(e){return!_t.checkIfNullOrUndefined(e.size)}function ns(e){return e.size}function os(e){return!_t.checkIfNullOrUndefined(e.size)}function ls(e){return e.size}function as(e){return!_t.checkIfNullOrUndefined(e.size)}function rs(e){return e.color}function cs(e){return e.color}function us(e){return e.color}function xs(e){return e!==void 0}function ms(e){return e!==void 0}function ds(e){return e.data}function ps(e){return e!==void 0}function hs(e){return e.data}function fs(e,t){return Ge.ascending(e,t)}function gs(e){const t=i.compilerRuntimeExports.c(122),{data:d,barColors:N,barPadding:qt,showTicks:Dt,topMargin:yt,bottomMargin:it,leftMargin:mt,rightMargin:C,truncateBy:V,width:h,height:F,tooltip:Vt,onSeriesMouseOver:ut,showLabels:It,suffix:P,prefix:st,showValues:dt,refValues:pt,maxValue:Tt,onSeriesMouseClick:j,selectedColor:nt,rtl:W,labelOrder:X,maxBarThickness:Z,minBarThickness:$,resetSelectionOnDoubleClick:q,detailsOnClick:E,barAxisTitle:J,valueColor:S,noOfTicks:a,styles:s,classNames:o,animate:u,colorDomain:x,precision:f,customLayers:m,naLabel:A}=e,_=yt===void 0?25:yt,K=it===void 0?10:it,xt=mt===void 0?100:mt,Ft=C===void 0?40:C,Ht=G.useRef(null);let Y;t[0]!==u.amount||t[1]!==u.once?(Y={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=Y):Y=t[2];const bt=Ce.useInView(Ht,Y),zt=J?_+25:_;let r;t[3]!==K||t[4]!==xt||t[5]!==Ft||t[6]!==zt?(r={top:zt,bottom:K,left:xt,right:Ft},t[3]=K,t[4]=xt,t[5]=Ft,t[6]=zt,t[7]=r):r=t[7];const c=r,[B,p]=G.useState(void 0),[R,D]=G.useState(void 0),[w,Lt]=G.useState(void 0),[vt,ot]=G.useState(void 0),ht=h-c.left-c.right,M=F-c.top-c.bottom;let y,tt,et,Q,L,ft,Ct,lt,Rt,U,at,H,z,gt;if(t[8]!==u||t[9]!==J||t[10]!==N||t[11]!==qt||t[12]!==o?.graphObjectValues||t[13]!==o?.xAxis?.gridLines||t[14]!==o?.xAxis?.labels||t[15]!==o?.xAxis?.title||t[16]!==o?.yAxis?.axis||t[17]!==o?.yAxis?.labels||t[18]!==x||t[19]!==m||t[20]!==d||t[21]!==E||t[22]!==M||t[23]!==ht||t[24]!==F||t[25]!==bt||t[26]!==X||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==Z||t[31]!==Tt||t[32]!==$||t[33]!==R||t[34]!==A||t[35]!==a||t[36]!==j||t[37]!==ut||t[38]!==f||t[39]!==st||t[40]!==pt||t[41]!==q||t[42]!==W||t[43]!==nt||t[44]!==It||t[45]!==Dt||t[46]!==dt||t[47]!==s?.graphObjectValues||t[48]!==s?.xAxis?.gridLines||t[49]!==s?.xAxis?.labels||t[50]!==s?.xAxis?.title||t[51]!==s?.yAxis?.axis||t[52]!==s?.yAxis?.labels||t[53]!==P||t[54]!==_||t[55]!==V||t[56]!==S||t[57]!==h){let ct;t[72]!==X?(ct=(T,v)=>({...T,id:X?`${T.label}`:`${v}`}),t[72]=X,t[73]=ct):ct=t[73];const St=d.map(ct),Gt=X||St.map(Os),O=Re.linear().domain([0,Tt]).range([0,ht]).nice(),Yt=fe.band().domain(Gt).range([0,$?Math.max(M,$*Gt.length):Z?Math.min(M,Z*Gt.length):M]).paddingInner(qt),Ot=O.ticks(a);tt=Zt.motion.svg,Ct=Ht,lt=`${h}px`,Rt=`${F}px`,U=`0 0 ${h} ${F}`,at="ltr",et=`translate(${c.left},${c.top})`,Q=Dt?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Ot.filter(Es),x:Ot.filter($s).map(T=>O(T)),y1:0-_,y2:M+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:P,prefix:st,labelType:"secondary",showGridLines:!0,precision:f}):null;const Kt=ht/2,Nt=0-c.top+15,Qt=s?.xAxis?.title,Wt=o?.xAxis?.title;t[74]!==J||t[75]!==Kt||t[76]!==Nt||t[77]!==Qt||t[78]!==Wt?(L=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Kt,y:Nt,style:Qt,className:Wt,text:J}),t[74]=J,t[75]=Kt,t[76]=Nt,t[77]=Qt,t[78]=Wt,t[79]=L):L=t[79],t[80]!==m?(ft=m.filter(As).map(ws),t[80]=m,t[81]=ft):ft=t[81],y=Me.AnimatePresence,H=St.map(T=>_t.checkIfNullOrUndefined(Yt(T.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:0,y:Yt(`${T.id}`)},whileInView:{x:0,y:Yt(`${T.id}`),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[T.size.map((v,k)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:nt?N[k]===nt?1:.3:1,onMouseEnter:n=>{p({...T,sizeIndex:k}),ot(n.clientY),Lt(n.clientX),ut?.({...T,sizeIndex:k})},onMouseMove:n=>{p({...T,sizeIndex:k}),ot(n.clientY),Lt(n.clientX)},onMouseLeave:()=>{p(void 0),Lt(void 0),ot(void 0),ut?.(void 0)},onClick:()=>{(j||E)&&(je.isEqual(R,{...T,sizeIndex:k})&&q?(D(void 0),j?.(void 0)):(D({...T,sizeIndex:k}),j&&j({...T,sizeIndex:k})))},children:[v?i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:0,style:{fill:N[k]},height:Yt.bandwidth(),exit:{width:0,x:O(0),transition:{duration:u.duration}},variants:{initial:{width:0,x:O(0),fill:N[k]},whileInView:{width:O(v||0),x:O(k===0?0:oe.sum(T.size.filter((n,g)=>g<k&&n))),fill:N[k],transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial"},k):null,dt?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:Yt.bandwidth()/2,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dy:"0.33em",className:i.mo("graph-value text-sm",o?.graphObjectValues),exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x:O(0),opacity:0,fill:Ie.getTextColorBasedOnBgColor(N[k])},whileInView:{x:O(k===0?0:oe.sum(T.size.filter((n,g)=>g<k&&n)))+O(v||0)/2,opacity:v&&O(v)/ue.numberFormattingFunction(v,A,f,st,P).length>12?1:0,fill:Ie.getTextColorBasedOnBgColor(N[k]),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(v,A,f,st,P)}):null]},`${T.label}-${x[k]||k}`)),It?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${T.label}`.length<V?`${T.label}`:`${`${T.label}`.substring(0,V)}...`,y:0,x:0-c.left,width:0+c.left,height:Yt.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:u,isInView:bt}):null,dt?i.jsxRuntimeExports.jsx(Zt.motion.text,{className:i.mo("graph-value graph-value-total text-sm",S?"":" fill-primary-gray-700 dark:fill-primary-gray-300",o?.graphObjectValues),style:{...S?{fill:S}:{},textAnchor:"start",...s?.graphObjectValues||{}},y:Yt.bandwidth()/2,dx:5,dy:"0.33em",variants:{initial:{x:O(0),opacity:0,...S?{fill:S}:{}},whileInView:{x:O(oe.sum(T.size.map(js))),opacity:1,...S?{fill:S}:{},transition:{duration:u.duration}}},exit:{opacity:0,transition:{duration:u.duration}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(T.size.filter(vs)),A,f,st,P)}):null]},T.label));const Pt=o?.yAxis?.axis;let kt;t[82]!==Pt?(kt={axis:Pt},t[82]=Pt,t[83]=kt):kt=t[83];const Ut=s?.yAxis?.axis;let Jt;t[84]!==Ut?(Jt={axis:Ut},t[84]=Ut,t[85]=Jt):Jt=t[85],z=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:O(0),x2:O(0),y1:-2.5,y2:M+c.bottom,classNames:kt,styles:Jt}),gt=pt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:pt.map((T,v)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:T.text,color:T.color,x:O(T.value),y1:0-c.top,y2:M+c.bottom,textSide:O(T.value)>ht*.75||W?"left":"right",classNames:T.classNames,styles:T.styles,animate:u,isInView:bt},v))}):null,t[8]=u,t[9]=J,t[10]=N,t[11]=qt,t[12]=o?.graphObjectValues,t[13]=o?.xAxis?.gridLines,t[14]=o?.xAxis?.labels,t[15]=o?.xAxis?.title,t[16]=o?.yAxis?.axis,t[17]=o?.yAxis?.labels,t[18]=x,t[19]=m,t[20]=d,t[21]=E,t[22]=M,t[23]=ht,t[24]=F,t[25]=bt,t[26]=X,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=Z,t[31]=Tt,t[32]=$,t[33]=R,t[34]=A,t[35]=a,t[36]=j,t[37]=ut,t[38]=f,t[39]=st,t[40]=pt,t[41]=q,t[42]=W,t[43]=nt,t[44]=It,t[45]=Dt,t[46]=dt,t[47]=s?.graphObjectValues,t[48]=s?.xAxis?.gridLines,t[49]=s?.xAxis?.labels,t[50]=s?.xAxis?.title,t[51]=s?.yAxis?.axis,t[52]=s?.yAxis?.labels,t[53]=P,t[54]=_,t[55]=V,t[56]=S,t[57]=h,t[58]=y,t[59]=tt,t[60]=et,t[61]=Q,t[62]=L,t[63]=ft,t[64]=Ct,t[65]=lt,t[66]=Rt,t[67]=U,t[68]=at,t[69]=H,t[70]=z,t[71]=gt}else y=t[58],tt=t[59],et=t[60],Q=t[61],L=t[62],ft=t[63],Ct=t[64],lt=t[65],Rt=t[66],U=t[67],at=t[68],H=t[69],z=t[70],gt=t[71];let jt;t[86]!==y||t[87]!==H||t[88]!==z||t[89]!==gt?(jt=i.jsxRuntimeExports.jsxs(y,{children:[H,z,gt]}),t[86]=y,t[87]=H,t[88]=z,t[89]=gt,t[90]=jt):jt=t[90];let wt;t[91]!==m?(wt=m.filter(bs).map(ys),t[91]=m,t[92]=wt):wt=t[92];let rt;t[93]!==et||t[94]!==Q||t[95]!==L||t[96]!==ft||t[97]!==jt||t[98]!==wt?(rt=i.jsxRuntimeExports.jsxs("g",{transform:et,children:[Q,L,ft,jt,wt]}),t[93]=et,t[94]=Q,t[95]=L,t[96]=ft,t[97]=jt,t[98]=wt,t[99]=rt):rt=t[99];let At;t[100]!==tt||t[101]!==Ct||t[102]!==lt||t[103]!==Rt||t[104]!==U||t[105]!==at||t[106]!==rt?(At=i.jsxRuntimeExports.jsx(tt,{ref:Ct,width:lt,height:Rt,viewBox:U,direction:at,children:rt}),t[100]=tt,t[101]=Ct,t[102]=lt,t[103]=Rt,t[104]=U,t[105]=at,t[106]=rt,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==w||t[110]!==vt||t[111]!==B||t[112]!==s?.tooltip||t[113]!==Vt?($t=B&&Vt&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:B,body:Vt,xPos:w,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=w,t[110]=vt,t[111]=B,t[112]=s?.tooltip,t[113]=Vt,t[114]=$t):$t=t[114];let Et;t[115]!==E||t[116]!==R?(Et=E&&R!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:R!==void 0,onClose:()=>{D(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof E=="string"?{__html:$e.string2HTML(E,R)}:void 0,children:typeof E=="function"?E(R):null})}):null,t[115]=E,t[116]=R,t[117]=Et):Et=t[117];let b;return t[118]!==At||t[119]!==$t||t[120]!==Et?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Et]}),t[118]=At,t[119]=$t,t[120]=Et,t[121]=b):b=t[121],b}function ys(e){return e.layer}function bs(e){return e.position==="after"}function vs(e){return e}function js(e){return e||0}function ws(e){return e.layer}function As(e){return e.position==="before"}function $s(e){return e!==0}function Es(e){return e!==0}function Os(e){return`${e.id}`}function ks(e){const t=i.compilerRuntimeExports.c(129),{data:d,leftMargin:N,rightMargin:qt,topMargin:Dt,bottomMargin:yt,width:it,height:mt,barColors:C,barPadding:V,showLabels:h,showTicks:F,truncateBy:Vt,tooltip:ut,onSeriesMouseOver:It,suffix:P,prefix:st,showValues:dt,refValues:pt,maxValue:Tt,onSeriesMouseClick:j,selectedColor:nt,labelOrder:W,maxBarThickness:X,minBarThickness:Z,resetSelectionOnDoubleClick:$,detailsOnClick:q,barAxisTitle:E,valueColor:J,noOfTicks:S,styles:a,classNames:s,animate:o,colorDomain:u,precision:x,customLayers:f,naLabel:m}=e,A=N===void 0?20:N,_=qt===void 0?20:qt,K=Dt===void 0?20:Dt,xt=yt===void 0?25:yt,Ft=G.useRef(null);let Ht;t[0]!==o.amount||t[1]!==o.once?(Ht={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Ht):Ht=t[2];const Y=Ce.useInView(Ft,Ht),bt=E?A+30:A;let zt;t[3]!==xt||t[4]!==_||t[5]!==bt||t[6]!==K?(zt={top:K,bottom:xt,left:bt,right:_},t[3]=xt,t[4]=_,t[5]=bt,t[6]=K,t[7]=zt):zt=t[7];const r=zt,[c,B]=G.useState(void 0),[p,R]=G.useState(void 0),[D,w]=G.useState(void 0),[Lt,vt]=G.useState(void 0),ot=it-r.left-r.right,ht=mt-r.top-r.bottom;let M,y,tt,et,Q,L,ft,Ct,lt,Rt,U,at,H,z;if(t[8]!==o||t[9]!==E||t[10]!==C||t[11]!==V||t[12]!==s?.graphObjectValues||t[13]!==s?.xAxis?.axis||t[14]!==s?.xAxis?.labels||t[15]!==s?.yAxis?.gridLines||t[16]!==s?.yAxis?.labels||t[17]!==s?.yAxis?.title||t[18]!==u||t[19]!==f||t[20]!==d||t[21]!==q||t[22]!==ht||t[23]!==ot||t[24]!==mt||t[25]!==Y||t[26]!==W||t[27]!==A||t[28]!==r.bottom||t[29]!==r.left||t[30]!==r.right||t[31]!==r.top||t[32]!==X||t[33]!==Tt||t[34]!==Z||t[35]!==p||t[36]!==m||t[37]!==S||t[38]!==j||t[39]!==It||t[40]!==x||t[41]!==st||t[42]!==pt||t[43]!==$||t[44]!==nt||t[45]!==h||t[46]!==F||t[47]!==dt||t[48]!==a?.graphObjectValues||t[49]!==a?.xAxis?.axis||t[50]!==a?.xAxis?.labels||t[51]!==a?.yAxis?.gridLines||t[52]!==a?.yAxis?.labels||t[53]!==a?.yAxis?.title||t[54]!==P||t[55]!==Vt||t[56]!==J||t[57]!==it){const b=Re.linear().domain([0,Tt]).range([ht,0]).nice();let ct;t[72]!==W?(ct=(g,ee)=>({...g,id:W?`${g.label}`:`${ee}`}),t[72]=W,t[73]=ct):ct=t[73];const St=d.map(ct),Gt=W||St.map(Ss),O=fe.band().domain(Gt).range([0,Z?Math.max(ot,Z*Gt.length):X?Math.min(ot,X*Gt.length):ot]).paddingInner(V),Yt=b.ticks(S);y=Zt.motion.svg,ft=`${it}px`,Ct=`${mt}px`,lt=`0 0 ${it} ${mt}`,Rt="ltr",U=Ft,z=`translate(${r.left},${r.top})`;const Ot=b(0),Kt=b(0);let Nt;t[74]!==m||t[75]!==x||t[76]!==st||t[77]!==P?(Nt=ue.numberFormattingFunction(0,m,x,st,P),t[74]=m,t[75]=x,t[76]=st,t[77]=P,t[78]=Nt):Nt=t[78];const Qt=s?.xAxis?.axis,Wt=s?.yAxis?.labels;let Pt;t[79]!==Qt||t[80]!==Wt?(Pt={axis:Qt,label:Wt},t[79]=Qt,t[80]=Wt,t[81]=Pt):Pt=t[81];const kt=a?.xAxis?.axis,Ut=a?.yAxis?.labels;let Jt;t[82]!==kt||t[83]!==Ut?(Jt={axis:kt,label:Ut},t[82]=kt,t[83]=Ut,t[84]=Jt):Jt=t[84],tt=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Ot,y2:Kt,x1:0-A,x2:ot+r.right,label:Nt,labelPos:{x:0-A,y:b(0),dx:0,dy:-5},classNames:Pt,styles:Jt}),et=F?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Yt.filter(Ts),y:Yt.filter(Is).map(g=>b(g)),x1:0-A,x2:ot+r.right,styles:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:P,prefix:st,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:x}):null;const T=0-A-15,v=ht/2,k=a?.yAxis?.title,n=s?.yAxis?.title;t[85]!==E||t[86]!==T||t[87]!==v||t[88]!==k||t[89]!==n?(Q=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:T,y:v,style:k,className:n,text:E,rotate90:!0}),t[85]=E,t[86]=T,t[87]=v,t[88]=k,t[89]=n,t[90]=Q):Q=t[90],t[91]!==f?(L=f.filter(Vs).map(Ns),t[91]=f,t[92]=L):L=t[92],M=Me.AnimatePresence,at=St.map(g=>_t.checkIfNullOrUndefined(O(g.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:O(`${g.id}`),y:0},whileInView:{x:O(`${g.id}`),y:0,transition:{duration:o.duration}}},transition:{duration:o.duration},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[g.size.map((ee,I)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:nt?C[I]===nt?1:.3:1,onMouseEnter:Mt=>{B({...g,sizeIndex:I}),vt(Mt.clientY),w(Mt.clientX),It?.({...g,sizeIndex:I})},onMouseMove:Mt=>{B({...g,sizeIndex:I}),vt(Mt.clientY),w(Mt.clientX)},onMouseLeave:()=>{B(void 0),w(void 0),vt(void 0),It?.(void 0)},onClick:()=>{(j||q)&&(je.isEqual(p,{...g,sizeIndex:I})&&$?(R(void 0),j?.(void 0)):(R({...g,sizeIndex:I}),j&&j({...g,sizeIndex:I})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:0,width:O.bandwidth(),variants:{initial:{height:0,fill:C[I],y:b(0)},whileInView:{height:Math.abs(b(oe.sum(g.size.filter((Mt,l)=>l<=I&&Mt)))-b(oe.sum(g.size.filter((Mt,l)=>l<I&&Mt)))),y:b(oe.sum(g.size.filter((Mt,l)=>l<=I&&Mt))),fill:C[I],transition:{duration:o.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{height:0,y:b(0),transition:{duration:o.duration}}}),dt?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:O.bandwidth()/2,style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:"0.33em",variants:{initial:{y:b(0),opacity:0,fill:Ie.getTextColorBasedOnBgColor(C[I])},whileInView:{y:b(oe.sum(g.size.filter((Mt,l)=>l<=I&&Mt)))+Math.abs(b(oe.sum(g.size.filter((Mt,l)=>l<=I&&Mt)))-b(oe.sum(g.size.filter((Mt,l)=>l<I&&Mt))))/2,opacity:ee&&Math.abs(b(oe.sum(g.size.filter((Mt,l)=>l<=I&&Mt)))-b(oe.sum(g.size.filter((Mt,l)=>l<I&&Mt))))>20?1:0,fill:Ie.getTextColorBasedOnBgColor(C[I]),transition:{duration:o.duration}}},initial:"initial",animate:Y?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(ee,m,x,st,P)}):null]},`${g.label}-${u[I]||I}`)),h?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${g.label}`.length<Vt?`${g.label}`:`${`${g.label}`.substring(0,Vt)}...`,y:b(0)+5,x:0,width:O.bandwidth(),height:r.bottom,style:a?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:Y}):null,dt?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...a?.graphObjectValues||{}},x:O.bandwidth()/2,dy:-10,className:i.mo("graph-value graph-value-total",J?"text-sm":"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",s?.graphObjectValues),variants:{initial:{y:b(0),opacity:0,...J&&{fill:J}},whileInView:{y:b(oe.sum(g.size.map(Ls))),opacity:1,...J&&{fill:J},transition:{duration:o.duration}}},exit:{opacity:0,transition:{duration:o.duration}},initial:"initial",animate:Y?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(g.size.filter(Ms)),m,x,st,P)}):null]},g.label)),H=pt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:pt.map((g,ee)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:g.text,color:g.color,y:b(g.value),x1:0-A,x2:ot+r.right,classNames:g.classNames,styles:g.styles,animate:o,isInView:Y},ee))}):null,t[8]=o,t[9]=E,t[10]=C,t[11]=V,t[12]=s?.graphObjectValues,t[13]=s?.xAxis?.axis,t[14]=s?.xAxis?.labels,t[15]=s?.yAxis?.gridLines,t[16]=s?.yAxis?.labels,t[17]=s?.yAxis?.title,t[18]=u,t[19]=f,t[20]=d,t[21]=q,t[22]=ht,t[23]=ot,t[24]=mt,t[25]=Y,t[26]=W,t[27]=A,t[28]=r.bottom,t[29]=r.left,t[30]=r.right,t[31]=r.top,t[32]=X,t[33]=Tt,t[34]=Z,t[35]=p,t[36]=m,t[37]=S,t[38]=j,t[39]=It,t[40]=x,t[41]=st,t[42]=pt,t[43]=$,t[44]=nt,t[45]=h,t[46]=F,t[47]=dt,t[48]=a?.graphObjectValues,t[49]=a?.xAxis?.axis,t[50]=a?.xAxis?.labels,t[51]=a?.yAxis?.gridLines,t[52]=a?.yAxis?.labels,t[53]=a?.yAxis?.title,t[54]=P,t[55]=Vt,t[56]=J,t[57]=it,t[58]=M,t[59]=y,t[60]=tt,t[61]=et,t[62]=Q,t[63]=L,t[64]=ft,t[65]=Ct,t[66]=lt,t[67]=Rt,t[68]=U,t[69]=at,t[70]=H,t[71]=z}else M=t[58],y=t[59],tt=t[60],et=t[61],Q=t[62],L=t[63],ft=t[64],Ct=t[65],lt=t[66],Rt=t[67],U=t[68],at=t[69],H=t[70],z=t[71];let gt;t[93]!==M||t[94]!==at||t[95]!==H?(gt=i.jsxRuntimeExports.jsxs(M,{children:[at,H]}),t[93]=M,t[94]=at,t[95]=H,t[96]=gt):gt=t[96];let jt;t[97]!==f?(jt=f.filter(Rs).map(Cs),t[97]=f,t[98]=jt):jt=t[98];let wt;t[99]!==tt||t[100]!==et||t[101]!==Q||t[102]!==L||t[103]!==gt||t[104]!==jt||t[105]!==z?(wt=i.jsxRuntimeExports.jsxs("g",{transform:z,children:[tt,et,Q,L,gt,jt]}),t[99]=tt,t[100]=et,t[101]=Q,t[102]=L,t[103]=gt,t[104]=jt,t[105]=z,t[106]=wt):wt=t[106];let rt;t[107]!==y||t[108]!==ft||t[109]!==Ct||t[110]!==lt||t[111]!==Rt||t[112]!==U||t[113]!==wt?(rt=i.jsxRuntimeExports.jsx(y,{width:ft,height:Ct,viewBox:lt,direction:Rt,ref:U,children:wt}),t[107]=y,t[108]=ft,t[109]=Ct,t[110]=lt,t[111]=Rt,t[112]=U,t[113]=wt,t[114]=rt):rt=t[114];let At;t[115]!==s?.tooltip||t[116]!==D||t[117]!==Lt||t[118]!==c||t[119]!==a?.tooltip||t[120]!==ut?(At=c&&ut&&D&&Lt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:c,body:ut,xPos:D,yPos:Lt,backgroundStyle:a?.tooltip,className:s?.tooltip}):null,t[115]=s?.tooltip,t[116]=D,t[117]=Lt,t[118]=c,t[119]=a?.tooltip,t[120]=ut,t[121]=At):At=t[121];let $t;t[122]!==q||t[123]!==p?($t=q&&p!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:p!==void 0,onClose:()=>{R(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof q=="string"?{__html:$e.string2HTML(q,p)}:void 0,children:typeof q=="function"?q(p):null})}):null,t[122]=q,t[123]=p,t[124]=$t):$t=t[124];let Et;return t[125]!==rt||t[126]!==At||t[127]!==$t?(Et=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[rt,At,$t]}),t[125]=rt,t[126]=At,t[127]=$t,t[128]=Et):Et=t[128],Et}function Cs(e){return e.layer}function Rs(e){return e.position==="after"}function Ms(e){return e}function Ls(e){return e||0}function Ns(e){return e.layer}function Vs(e){return e.position==="before"}function Is(e){return e!==0}function Ts(e){return e!==0}function Ss(e){return`${e.id}`}function Ds(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:N,colors:qt,sources:Dt,graphDescription:yt,barPadding:it,showTicks:mt,truncateBy:C,height:V,width:h,footNote:F,colorDomain:Vt,colorLegendTitle:ut,padding:It,backgroundColor:P,topMargin:st,bottomMargin:dt,leftMargin:pt,rightMargin:Tt,tooltip:j,onSeriesMouseOver:nt,suffix:W,prefix:X,showLabels:Z,relativeHeight:$,showValues:q,refValues:E,graphID:J,maxValue:S,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,labelOrder:x,minHeight:f,theme:m,maxBarThickness:A,sortParameter:_,maxNumberOfBars:K,minBarThickness:xt,showColorScale:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:Y,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,styles:B,classNames:p,filterNA:R,animate:D,precision:w,customLayers:Lt,timeline:vt,naLabel:ot,sortData:ht,orientation:M}=e,y=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,tt=it===void 0?.25:it,et=mt===void 0?!0:mt,Q=C===void 0?999:C,L=P===void 0?!1:P,ft=W===void 0?"":W,Ct=X===void 0?"":X,lt=Z===void 0?!0:Z,Rt=q===void 0?!0:q,U=s===void 0?!1:s,at=o===void 0?!1:o,H=u===void 0?"en":u,z=f===void 0?0:f,gt=m===void 0?"light":m,jt=Ft===void 0?!0:Ft,wt=Y===void 0?!0:Y,rt=r===void 0?5:r,At=R===void 0?!0:R,$t=D===void 0?!1:D,Et=w===void 0?2:w;let b;t[0]!==Lt?(b=Lt===void 0?[]:Lt,t[0]=Lt,t[1]=b):b=t[1];const ct=b,St=vt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:vt,Gt=ot===void 0?"NA":ot,Yt=(M===void 0?"vertical":M)==="horizontal"?gs:ks,[Ot,Kt]=G.useState(0),[Nt,Qt]=G.useState(0),[Wt,Pt]=G.useState(St.autoplay),kt=He.sort(Le.uniqBy(d,"date",!0).map(Bt=>me.parse(`${Bt}`,St.dateFormat||"yyyy",new Date).getTime()),Ks),[Ut,Jt]=G.useState(St.autoplay?0:kt.length-1),[T,v]=G.useState(void 0),k=G.useRef(null),n=G.useRef(null);let g,ee;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{const Bt=new ResizeObserver(ae=>{Kt(ae[0].target.clientWidth||620),Qt(ae[0].target.clientHeight||480)});return k.current&&Bt.observe(k.current),()=>Bt.disconnect()},ee=[],t[2]=g,t[3]=ee):(g=t[2],ee=t[3]),G.useEffect(g,ee),G.useEffect(()=>{const Bt=setInterval(()=>{Jt(ae=>ae<kt.length-1?ae+1:0)},(St.speed||2)*1e3);return Wt||clearInterval(Bt),()=>clearInterval(Bt)},[kt,Wt,St.speed]);const I=ye.getSliderMarks(kt,Ut,St.showOnlyActiveDate,St.dateFormat||"yyyy"),Mt=ve.GraphContainer,l=p?.graphContainer,ie=B?.graphContainer;let se;t[4]!==p?.description||t[5]!==p?.title||t[6]!==d||t[7]!==at||t[8]!==yt||t[9]!==U||t[10]!==N||t[11]!==B?.description||t[12]!==B?.title||t[13]!==h?(se=N||yt||U||at?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:B?.title,description:B?.description},classNames:{title:p?.title,description:p?.description},graphTitle:N,graphDescription:yt,width:h,graphDownload:U?n:void 0,dataDownload:at?d.map(Js).filter(Ws).length>0?d.map(Us).filter(Ys):d.filter(Xs):null}):null,t[4]=p?.description,t[5]=p?.title,t[6]=d,t[7]=at,t[8]=yt,t[9]=U,t[10]=N,t[11]=B?.description,t[12]=B?.title,t[13]=h,t[14]=se):se=t[14];const xe=St.enabled&&kt.length>0&&I?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Pt(!Wt)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Wt?"Click to pause animation":"Click to play animation",children:Wt?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:kt[0],max:kt[kt.length-1],marks:I,step:null,defaultValue:kt[kt.length-1],value:kt[Ut],onChangeComplete:Bt=>{Jt(kt.indexOf(Bt))},onChange:Bt=>{Jt(kt.indexOf(Bt))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,pe="grow flex flex-col justify-center gap-3 w-full",re=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[jt?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:h,colorDomain:Vt,colors:y,colorLegendTitle:ut,setSelectedColor:v,showNAColor:!1,className:p?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:k,children:Ot&&Nt?i.jsxRuntimeExports.jsx(Yt,{data:_!==void 0?_==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(kt[Ut]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Gs):Bt),qs,[ht||"asc"]).filter((Bt,ae)=>K?ae<K:!0):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(kt[Ut]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Ps):Bt),Bt=>_t.checkIfNullOrUndefined(Bt.size[_])?-1/0:Bt.size[_],[ht||"asc"]).filter((Bt,ae)=>K?ae<K:!0):he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(kt[Ut]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Fs):Bt).filter((Bt,ae)=>K?ae<K:!0),barColors:y,width:h||Ot,height:Math.max(z,V||($?z?(h||Ot)*$>z?(h||Ot)*$:z:(h||Ot)*$:Nt)),barPadding:tt,showTicks:et,leftMargin:pt,rightMargin:Tt,topMargin:st,bottomMargin:dt,truncateBy:Q,showLabels:lt,tooltip:j,onSeriesMouseOver:nt,showValues:Rt,suffix:ft,prefix:Ct,refValues:E,maxValue:_t.checkIfNullOrUndefined(S)?Math.max(...d.map(zs)):S,onSeriesMouseClick:a,selectedColor:T,rtl:H==="he"||H==="ar",labelOrder:x,maxBarThickness:A,minBarThickness:xt,resetSelectionOnDoubleClick:wt,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:rt,valueColor:c,classNames:p,styles:B,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},colorDomain:Vt,precision:Et,customLayers:ct,naLabel:Gt}):null})]});let ne;t[15]!==re?(ne=i.jsxRuntimeExports.jsx("div",{className:pe,children:re}),t[15]=re,t[16]=ne):ne=t[16];let le;t[17]!==p?.footnote||t[18]!==p?.source||t[19]!==F||t[20]!==Dt||t[21]!==B?.footnote||t[22]!==B?.source||t[23]!==h?(le=Dt||F?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:B?.footnote,source:B?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:Dt,footNote:F,width:h}):null,t[17]=p?.footnote,t[18]=p?.source,t[19]=F,t[20]=Dt,t[21]=B?.footnote,t[22]=B?.source,t[23]=h,t[24]=le):le=t[24];let Xt;return t[25]!==Mt||t[26]!==Ht||t[27]!==L||t[28]!==J||t[29]!==V||t[30]!==H||t[31]!==z||t[32]!==It||t[33]!==$||t[34]!==l||t[35]!==ie||t[36]!==se||t[37]!==xe||t[38]!==ne||t[39]!==le||t[40]!==gt||t[41]!==h?(Xt=i.jsxRuntimeExports.jsxs(Mt,{className:l,style:ie,id:J,ref:n,"aria-label":Ht,backgroundColor:L,theme:gt,language:H,minHeight:z,width:h,height:V,relativeHeight:$,padding:It,children:[se,xe,ne,le]}),t[25]=Mt,t[26]=Ht,t[27]=L,t[28]=J,t[29]=V,t[30]=H,t[31]=z,t[32]=It,t[33]=$,t[34]=l,t[35]=ie,t[36]=se,t[37]=xe,t[38]=ne,t[39]=le,t[40]=gt,t[41]=h,t[42]=Xt):Xt=t[42],Xt}function zs(e){return oe.sum(e.size.filter(Bs))||0}function Bs(e){return!_t.checkIfNullOrUndefined(e)}function Fs(e){return e==null}function Ps(e){return e==null}function qs(e){return oe.sum(e.size.filter(Hs))}function Hs(e){return!_t.checkIfNullOrUndefined(e)}function Gs(e){return e==null}function Xs(e){return e!==void 0}function Ys(e){return e!==void 0}function Us(e){return e.data}function Ws(e){return e!==void 0}function Js(e){return e.data}function Ks(e,t){return Ge.ascending(e,t)}function Qs(e){const t=i.compilerRuntimeExports.c(61),{data:d,graphTitle:N,colors:qt,barPadding:Dt,showTicks:yt,leftMargin:it,rightMargin:mt,topMargin:C,bottomMargin:V,truncateBy:h,showLabels:F,showValues:Vt,backgroundColor:ut,suffix:It,prefix:P,sources:st,graphDescription:dt,height:pt,width:Tt,footNote:j,colorDomain:nt,colorLegendTitle:W,padding:X,relativeHeight:Z,tooltip:$,onSeriesMouseOver:q,refValues:E,showColorScale:J,graphID:S,maxValue:a,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:f,language:m,theme:A,sortData:_,labelOrder:K,showNAColor:xt,minHeight:Ft,maxBarThickness:Ht,maxNumberOfBars:Y,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,detailsOnClick:c,barAxisTitle:B,noOfTicks:p,valueColor:R,orientation:D,styles:w,classNames:Lt,filterNA:vt,animate:ot,dimmedOpacity:ht,precision:M,customLayers:y,timeline:tt,naLabel:et}=e,Q=D===void 0?"vertical":D;let L;return t[0]!==ot||t[1]!==zt||t[2]!==ut||t[3]!==B||t[4]!==Dt||t[5]!==V||t[6]!==Lt||t[7]!==nt||t[8]!==W||t[9]!==qt||t[10]!==y||t[11]!==d||t[12]!==f||t[13]!==c||t[14]!==ht||t[15]!==vt||t[16]!==j||t[17]!==dt||t[18]!==x||t[19]!==S||t[20]!==N||t[21]!==pt||t[22]!==o||t[23]!==K||t[24]!==m||t[25]!==it||t[26]!==Ht||t[27]!==Y||t[28]!==a||t[29]!==bt||t[30]!==Ft||t[31]!==s||t[32]!==et||t[33]!==p||t[34]!==u||t[35]!==q||t[36]!==Q||t[37]!==X||t[38]!==M||t[39]!==P||t[40]!==E||t[41]!==Z||t[42]!==r||t[43]!==mt||t[44]!==J||t[45]!==F||t[46]!==xt||t[47]!==yt||t[48]!==Vt||t[49]!==_||t[50]!==st||t[51]!==w||t[52]!==It||t[53]!==A||t[54]!==tt||t[55]!==$||t[56]!==C||t[57]!==h||t[58]!==R||t[59]!==Tt?(L=i.jsxRuntimeExports.jsx(_i,{data:d,graphTitle:N,colors:qt,barPadding:Dt,showTicks:yt,leftMargin:it,rightMargin:mt,topMargin:C,bottomMargin:V,truncateBy:h,showLabels:F,showValues:Vt,backgroundColor:ut,suffix:It,prefix:P,sources:st,graphDescription:dt,height:pt,width:Tt,footNote:j,colorDomain:nt,colorLegendTitle:W,padding:X,relativeHeight:Z,tooltip:$,onSeriesMouseOver:q,refValues:E,showColorScale:J,graphID:S,maxValue:a,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:f,language:m,theme:A,sortData:_,labelOrder:K,showNAColor:xt,minHeight:Ft,maxBarThickness:Ht,maxNumberOfBars:Y,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,styles:w,detailsOnClick:c,barAxisTitle:B,noOfTicks:p,valueColor:R,classNames:Lt,filterNA:vt,animate:ot,dimmedOpacity:ht,precision:M,customLayers:y,timeline:tt,naLabel:et,orientation:Q}),t[0]=ot,t[1]=zt,t[2]=ut,t[3]=B,t[4]=Dt,t[5]=V,t[6]=Lt,t[7]=nt,t[8]=W,t[9]=qt,t[10]=y,t[11]=d,t[12]=f,t[13]=c,t[14]=ht,t[15]=vt,t[16]=j,t[17]=dt,t[18]=x,t[19]=S,t[20]=N,t[21]=pt,t[22]=o,t[23]=K,t[24]=m,t[25]=it,t[26]=Ht,t[27]=Y,t[28]=a,t[29]=bt,t[30]=Ft,t[31]=s,t[32]=et,t[33]=p,t[34]=u,t[35]=q,t[36]=Q,t[37]=X,t[38]=M,t[39]=P,t[40]=E,t[41]=Z,t[42]=r,t[43]=mt,t[44]=J,t[45]=F,t[46]=xt,t[47]=yt,t[48]=Vt,t[49]=_,t[50]=st,t[51]=w,t[52]=It,t[53]=A,t[54]=tt,t[55]=$,t[56]=C,t[57]=h,t[58]=R,t[59]=Tt,t[60]=L):L=t[60],L}function Zs(e){const t=i.compilerRuntimeExports.c(57),{data:d,graphTitle:N,colors:qt,sources:Dt,graphDescription:yt,barPadding:it,showTicks:mt,truncateBy:C,height:V,width:h,footNote:F,colorDomain:Vt,colorLegendTitle:ut,suffix:It,prefix:P,showValues:st,padding:dt,backgroundColor:pt,leftMargin:Tt,rightMargin:j,topMargin:nt,bottomMargin:W,showLabels:X,relativeHeight:Z,tooltip:$,onSeriesMouseOver:q,refValues:E,graphID:J,maxValue:S,minValue:a,onSeriesMouseClick:s,graphDownload:o,dataDownload:u,language:x,labelOrder:f,minHeight:m,theme:A,sortParameter:_,sortData:K,maxBarThickness:xt,ariaLabel:Ft,resetSelectionOnDoubleClick:Ht,detailsOnClick:Y,barAxisTitle:bt,noOfTicks:zt,valueColor:r,orientation:c,styles:B,classNames:p,filterNA:R,animate:D,precision:w,customLayers:Lt,showColorScale:vt,timeline:ot,naLabel:ht}=e,M=c===void 0?"vertical":c;let y;return t[0]!==D||t[1]!==Ft||t[2]!==pt||t[3]!==bt||t[4]!==it||t[5]!==W||t[6]!==p||t[7]!==Vt||t[8]!==ut||t[9]!==qt||t[10]!==Lt||t[11]!==d||t[12]!==u||t[13]!==Y||t[14]!==R||t[15]!==F||t[16]!==yt||t[17]!==o||t[18]!==J||t[19]!==N||t[20]!==V||t[21]!==f||t[22]!==x||t[23]!==Tt||t[24]!==xt||t[25]!==S||t[26]!==m||t[27]!==a||t[28]!==ht||t[29]!==zt||t[30]!==s||t[31]!==q||t[32]!==M||t[33]!==dt||t[34]!==w||t[35]!==P||t[36]!==E||t[37]!==Z||t[38]!==Ht||t[39]!==j||t[40]!==vt||t[41]!==X||t[42]!==mt||t[43]!==st||t[44]!==K||t[45]!==_||t[46]!==Dt||t[47]!==B||t[48]!==It||t[49]!==A||t[50]!==ot||t[51]!==$||t[52]!==nt||t[53]!==C||t[54]!==r||t[55]!==h?(y=i.jsxRuntimeExports.jsx(ci,{orientation:M,data:d,graphTitle:N,colors:qt,sources:Dt,graphDescription:yt,barPadding:it,showTicks:mt,truncateBy:C,height:V,width:h,footNote:F,colorDomain:Vt,colorLegendTitle:ut,suffix:It,prefix:P,showValues:st,padding:dt,backgroundColor:pt,leftMargin:Tt,rightMargin:j,sortParameter:_,sortData:K,topMargin:nt,bottomMargin:W,showLabels:X,relativeHeight:Z,tooltip:$,onSeriesMouseOver:q,refValues:E,graphID:J,maxValue:S,minValue:a,onSeriesMouseClick:s,graphDownload:o,dataDownload:u,language:x,labelOrder:f,minHeight:m,theme:A,maxBarThickness:xt,ariaLabel:Ft,resetSelectionOnDoubleClick:Ht,styles:B,detailsOnClick:Y,barAxisTitle:bt,noOfTicks:zt,valueColor:r,classNames:p,filterNA:R,animate:D,precision:w,customLayers:Lt,showColorScale:vt,timeline:ot,naLabel:ht}),t[0]=D,t[1]=Ft,t[2]=pt,t[3]=bt,t[4]=it,t[5]=W,t[6]=p,t[7]=Vt,t[8]=ut,t[9]=qt,t[10]=Lt,t[11]=d,t[12]=u,t[13]=Y,t[14]=R,t[15]=F,t[16]=yt,t[17]=o,t[18]=J,t[19]=N,t[20]=V,t[21]=f,t[22]=x,t[23]=Tt,t[24]=xt,t[25]=S,t[26]=m,t[27]=a,t[28]=ht,t[29]=zt,t[30]=s,t[31]=q,t[32]=M,t[33]=dt,t[34]=w,t[35]=P,t[36]=E,t[37]=Z,t[38]=Ht,t[39]=j,t[40]=vt,t[41]=X,t[42]=mt,t[43]=st,t[44]=K,t[45]=_,t[46]=Dt,t[47]=B,t[48]=It,t[49]=A,t[50]=ot,t[51]=$,t[52]=nt,t[53]=C,t[54]=r,t[55]=h,t[56]=y):y=t[56],y}function _s(e){const t=i.compilerRuntimeExports.c(58),{data:d,graphTitle:N,colors:qt,sources:Dt,graphDescription:yt,barPadding:it,showTicks:mt,leftMargin:C,rightMargin:V,topMargin:h,bottomMargin:F,truncateBy:Vt,showLabels:ut,showValues:It,backgroundColor:P,suffix:st,prefix:dt,height:pt,width:Tt,footNote:j,colorDomain:nt,colorLegendTitle:W,padding:X,tooltip:Z,onSeriesMouseOver:$,relativeHeight:q,refValues:E,graphID:J,maxValue:S,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,theme:x,labelOrder:f,minHeight:m,maxBarThickness:A,sortParameter:_,sortData:K,maxNumberOfBars:xt,minBarThickness:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:Y,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,orientation:B,styles:p,classNames:R,filterNA:D,animate:w,precision:Lt,customLayers:vt,showColorScale:ot,timeline:ht,naLabel:M}=e,y=B===void 0?"vertical":B;let tt;return t[0]!==w||t[1]!==Ht||t[2]!==P||t[3]!==zt||t[4]!==it||t[5]!==F||t[6]!==R||t[7]!==nt||t[8]!==W||t[9]!==qt||t[10]!==vt||t[11]!==d||t[12]!==o||t[13]!==bt||t[14]!==D||t[15]!==j||t[16]!==yt||t[17]!==s||t[18]!==J||t[19]!==N||t[20]!==pt||t[21]!==f||t[22]!==u||t[23]!==C||t[24]!==A||t[25]!==xt||t[26]!==S||t[27]!==Ft||t[28]!==m||t[29]!==M||t[30]!==r||t[31]!==a||t[32]!==$||t[33]!==y||t[34]!==X||t[35]!==Lt||t[36]!==dt||t[37]!==E||t[38]!==q||t[39]!==Y||t[40]!==V||t[41]!==ot||t[42]!==ut||t[43]!==mt||t[44]!==It||t[45]!==K||t[46]!==_||t[47]!==Dt||t[48]!==p||t[49]!==st||t[50]!==x||t[51]!==ht||t[52]!==Z||t[53]!==h||t[54]!==Vt||t[55]!==c||t[56]!==Tt?(tt=i.jsxRuntimeExports.jsx(Ds,{data:d,graphTitle:N,colors:qt,sources:Dt,graphDescription:yt,barPadding:it,showTicks:mt,leftMargin:C,rightMargin:V,topMargin:h,bottomMargin:F,truncateBy:Vt,showLabels:ut,showValues:It,backgroundColor:P,suffix:st,prefix:dt,height:pt,width:Tt,footNote:j,colorDomain:nt,colorLegendTitle:W,padding:X,tooltip:Z,onSeriesMouseOver:$,relativeHeight:q,refValues:E,graphID:J,maxValue:S,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,theme:x,labelOrder:f,minHeight:m,maxBarThickness:A,sortParameter:_,sortData:K,maxNumberOfBars:xt,minBarThickness:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:Y,styles:p,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,classNames:R,filterNA:D,animate:w,precision:Lt,customLayers:vt,showColorScale:ot,timeline:ht,naLabel:M,orientation:y}),t[0]=w,t[1]=Ht,t[2]=P,t[3]=zt,t[4]=it,t[5]=F,t[6]=R,t[7]=nt,t[8]=W,t[9]=qt,t[10]=vt,t[11]=d,t[12]=o,t[13]=bt,t[14]=D,t[15]=j,t[16]=yt,t[17]=s,t[18]=J,t[19]=N,t[20]=pt,t[21]=f,t[22]=u,t[23]=C,t[24]=A,t[25]=xt,t[26]=S,t[27]=Ft,t[28]=m,t[29]=M,t[30]=r,t[31]=a,t[32]=$,t[33]=y,t[34]=X,t[35]=Lt,t[36]=dt,t[37]=E,t[38]=q,t[39]=Y,t[40]=V,t[41]=ot,t[42]=ut,t[43]=mt,t[44]=It,t[45]=K,t[46]=_,t[47]=Dt,t[48]=p,t[49]=st,t[50]=x,t[51]=ht,t[52]=Z,t[53]=h,t[54]=Vt,t[55]=c,t[56]=Tt,t[57]=tt):tt=t[57],tt}exports.GroupedBarGraph=Zs;exports.SimpleBarGraph=Qs;exports.StackedBarGraph=_s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),q=require("react"),ye=require("./getSliderMarks-BmADcPQt.cjs"),me=require("./parse-hMnG_lRV.cjs"),Ne=require("./index-Cno4Q0YE.cjs"),oe=require("./index-CSNtgibC.cjs"),je=require("./index-DQA8q5sC.cjs"),we=require("./Modal-JW_IExO3.cjs"),ue=require("./numberFormattingFunction-02t-wJta.cjs"),Ae=require("./Tooltip-4dJo4_AF.cjs"),_t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),$e=require("./string2HTML-CPGr_I5E.cjs"),Te=require("./YAxesLabels-DcS85Beo.cjs"),Ee=require("./Axis-DxRV2yMi.cjs"),Oe=require("./AxisTitle-sS5bLLR7.cjs"),Se=require("./XTicksAndGridLines-B6CELS7q.cjs"),ke=require("./ReferenceLine-BH0qdf4R.cjs"),De=require("./YTicksAndGridLines-4pxTRlRK.cjs"),ze=require("./XAxesLabels-D5X8jngD.cjs"),Ce=require("./use-in-view-QcfiW0w3.cjs"),Re=require("./linear-BwPAspcq.cjs"),fe=require("./band-VYfcZeJ2.cjs"),Me=require("./index-DG2bgAva.cjs"),Zt=require("./proxy-BxvUI_9l.cjs"),Be=require("./GraphHeader.cjs"),Fe=require("./GraphFooter.cjs"),Pe=require("./ColorLegendWithMouseOver.cjs"),ce=require("./Colors.cjs"),qe=require("./EmptyState-sAEZ_5rU.cjs"),be=require("./index-DRXx7m-C.cjs"),he=require("./ensureCompleteData-I6nYmT8E.cjs"),Le=require("./uniqBy-O05lp2S5.cjs"),ve=require("./GraphContainer-d8A46BK2.cjs"),He=require("./sort-O96oMZLb.cjs"),Ge=require("./init-DU0ybBc_.cjs"),Ie=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs");function Xe(e){const t=i.compilerRuntimeExports.c(122),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,barColors:et,barPadding:xt,showTicks:k,truncateBy:I,width:y,height:z,suffix:Nt,prefix:ct,showValues:Vt,showLabels:B,tooltip:it,onSeriesMouseOver:mt,refValues:dt,maxValue:Tt,minValue:j,onSeriesMouseClick:st,selectedColor:Y,rtl:H,labelOrder:Q,maxBarThickness:U,resetSelectionOnDoubleClick:F,detailsOnClick:$,barAxisTitle:W,valueColor:T,noOfTicks:a,styles:s,classNames:o,animate:u,colorDomain:x,precision:h,customLayers:m,naLabel:A}=e,Z=L===void 0?100:L,J=qt===void 0?40:qt,ut=Dt===void 0?25:Dt,Ft=yt===void 0?10:yt,Ht=q.useRef(null);let G;t[0]!==u.amount||t[1]!==u.once?(G={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=G):G=t[2];const bt=Ce.useInView(Ht,G),zt=W?ut+25:ut;let r;t[3]!==Ft||t[4]!==Z||t[5]!==J||t[6]!==zt?(r={top:zt,bottom:Ft,left:Z,right:J},t[3]=Ft,t[4]=Z,t[5]=J,t[6]=zt,t[7]=r):r=t[7];const c=r,[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=y-c.left-c.right,R=z-c.top-c.bottom;let g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt;if(t[8]!==u||t[9]!==W||t[10]!==et||t[11]!==xt||t[12]!==o?.graphObjectValues||t[13]!==o?.xAxis?.gridLines||t[14]!==o?.xAxis?.labels||t[15]!==o?.xAxis?.title||t[16]!==o?.yAxis?.axis||t[17]!==o?.yAxis?.labels||t[18]!==x||t[19]!==m||t[20]!==d||t[21]!==$||t[22]!==R||t[23]!==pt||t[24]!==z||t[25]!==bt||t[26]!==Q||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==U||t[31]!==Tt||t[32]!==j||t[33]!==C||t[34]!==A||t[35]!==a||t[36]!==st||t[37]!==mt||t[38]!==h||t[39]!==ct||t[40]!==dt||t[41]!==F||t[42]!==H||t[43]!==Y||t[44]!==B||t[45]!==k||t[46]!==Vt||t[47]!==s?.graphObjectValues||t[48]!==s?.xAxis?.gridLines||t[49]!==s?.xAxis?.labels||t[50]!==s?.xAxis?.title||t[51]!==s?.yAxis?.axis||t[52]!==s?.yAxis?.labels||t[53]!==Nt||t[54]!==ut||t[55]!==I||t[56]!==T||t[57]!==y){let rt;t[72]!==Q?(rt=(v,O)=>({...v,id:Q?`${v.label}`:`${O}`}),t[72]=Q,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=Q||St.map(_e),E=Re.linear().domain([j,Tt]).range([0,pt]).nice(),Ut=fe.band().domain(Gt).range([0,U?Math.min(R,U*Gt.length):R]).paddingInner(xt),It=fe.band().domain(d[0].size.map(Ze)).range([0,Ut.bandwidth()]).paddingInner(.1),Kt=E.ticks(a);_=Zt.motion.svg,kt=Ht,ot=`${y}px`,Ct=`${z}px`,X=`0 0 ${y} ${z}`,lt="ltr",tt=`translate(${c.left},${c.top})`,K=k?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Kt.filter(Qe),x:Kt.filter(Ke).map(v=>E(v)),y1:0-ut,y2:R+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:Nt,prefix:ct,labelType:"secondary",showGridLines:!0,precision:h}):null;const Lt=pt/2,Qt=0-c.top+15,Wt=s?.xAxis?.title,Pt=o?.xAxis?.title;t[74]!==W||t[75]!==Lt||t[76]!==Qt||t[77]!==Wt||t[78]!==Pt?(M=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Lt,y:Qt,style:Wt,className:Pt,text:W}),t[74]=W,t[75]=Lt,t[76]=Qt,t[77]=Wt,t[78]=Pt,t[79]=M):M=t[79],t[80]!==m?(ht=m.filter(Je).map(We),t[80]=m,t[81]=ht):ht=t[81],g=Me.AnimatePresence,P=St.map(v=>_t.checkIfNullOrUndefined(Ut(v.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:0,y:Ut(`${v.id}`)},whileInView:{x:0,y:Ut(`${v.id}`),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[v.size.map((O,n)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:Y?et[n]===Y?1:.3:.85,onMouseEnter:f=>{p({...v,sizeIndex:n}),nt(f.clientY),Mt(f.clientX),mt?.({...v,sizeIndex:n})},onMouseMove:f=>{p({...v,sizeIndex:n}),nt(f.clientY),Mt(f.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),mt?.(void 0)},onClick:()=>{(st||$)&&(je.isEqual(C,{...v,sizeIndex:n})&&F?(S(void 0),st?.(void 0)):(S({...v,sizeIndex:n}),st&&st({...v,sizeIndex:n})))},children:[_t.checkIfNullOrUndefined(O)?null:i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:It(`${n}`),variants:{initial:{width:0,x:E(0),fill:et[n]},whileInView:{width:_t.checkIfNullOrUndefined(O)?0:O>=0?E(O)-E(0):E(0)-E(O),x:O>=0?E(0):E(O),fill:et[n],transition:{duration:u.duration}}},exit:{width:0,x:E(0),transition:{duration:u.duration}},height:It.bandwidth(),initial:"initial",animate:bt?"whileInView":"initial"}),Vt?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:It(`${n}`)+It.bandwidth()/2,style:{textAnchor:O&&O<0?"end":"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm",o?.graphObjectValues),dx:O&&O<0?-5:5,dy:"0.33em",variants:{initial:{x:E(0),opacity:0,fill:T||et[n]},whileInView:{x:E(O||0),opacity:1,fill:T||et[n],transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:ue.numberFormattingFunction(O,A,h,ct,Nt)}):null]},`${v.label}-${x[n]||n}`)),B?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${v.label}`.length<I?`${v.label}`:`${`${v.label}`.substring(0,I)}...`,y:0,x:0-c.left,width:E(j<0?0:j)+c.left,height:Ut.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:u,isInView:bt}):null]},v.label));const Ot=o?.yAxis?.axis;let Yt;t[82]!==Ot?(Yt={axis:Ot},t[82]=Ot,t[83]=Yt):Yt=t[83];const Jt=s?.yAxis?.axis;let V;t[84]!==Jt?(V={axis:Jt},t[84]=Jt,t[85]=V):V=t[85],ft=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:E(j<0?0:j),x2:E(j<0?0:j),y1:-2.5,y2:R+c.bottom,classNames:Yt,styles:V}),gt=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((v,O)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:v.text,color:v.color,x:E(v.value),y1:0-c.top,y2:R+c.bottom,textSide:E(v.value)>pt*.75||H?"left":"right",classNames:v.classNames,styles:v.styles,animate:u,isInView:bt},O))}):null,t[8]=u,t[9]=W,t[10]=et,t[11]=xt,t[12]=o?.graphObjectValues,t[13]=o?.xAxis?.gridLines,t[14]=o?.xAxis?.labels,t[15]=o?.xAxis?.title,t[16]=o?.yAxis?.axis,t[17]=o?.yAxis?.labels,t[18]=x,t[19]=m,t[20]=d,t[21]=$,t[22]=R,t[23]=pt,t[24]=z,t[25]=bt,t[26]=Q,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=U,t[31]=Tt,t[32]=j,t[33]=C,t[34]=A,t[35]=a,t[36]=st,t[37]=mt,t[38]=h,t[39]=ct,t[40]=dt,t[41]=F,t[42]=H,t[43]=Y,t[44]=B,t[45]=k,t[46]=Vt,t[47]=s?.graphObjectValues,t[48]=s?.xAxis?.gridLines,t[49]=s?.xAxis?.labels,t[50]=s?.xAxis?.title,t[51]=s?.yAxis?.axis,t[52]=s?.yAxis?.labels,t[53]=Nt,t[54]=ut,t[55]=I,t[56]=T,t[57]=y,t[58]=g,t[59]=_,t[60]=tt,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt}else g=t[58],_=t[59],tt=t[60],K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71];let jt;t[86]!==g||t[87]!==P||t[88]!==ft||t[89]!==gt?(jt=i.jsxRuntimeExports.jsxs(g,{children:[P,ft,gt]}),t[86]=g,t[87]=P,t[88]=ft,t[89]=gt,t[90]=jt):jt=t[90];let wt;t[91]!==m?(wt=m.filter(Ue).map(Ye),t[91]=m,t[92]=wt):wt=t[92];let at;t[93]!==tt||t[94]!==K||t[95]!==M||t[96]!==ht||t[97]!==jt||t[98]!==wt?(at=i.jsxRuntimeExports.jsxs("g",{transform:tt,children:[K,M,ht,jt,wt]}),t[93]=tt,t[94]=K,t[95]=M,t[96]=ht,t[97]=jt,t[98]=wt,t[99]=at):at=t[99];let At;t[100]!==_||t[101]!==kt||t[102]!==ot||t[103]!==Ct||t[104]!==X||t[105]!==lt||t[106]!==at?(At=i.jsxRuntimeExports.jsx(_,{ref:kt,width:ot,height:Ct,viewBox:X,direction:lt,children:at}),t[100]=_,t[101]=kt,t[102]=ot,t[103]=Ct,t[104]=X,t[105]=lt,t[106]=at,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==w||t[110]!==vt||t[111]!==D||t[112]!==s?.tooltip||t[113]!==it?($t=D&&it&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:it,xPos:w,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=w,t[110]=vt,t[111]=D,t[112]=s?.tooltip,t[113]=it,t[114]=$t):$t=t[114];let Et;t[115]!==$||t[116]!==C?(Et=$&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof $=="string"?{__html:$e.string2HTML($,C)}:void 0,children:typeof $=="function"?$(C):null})}):null,t[115]=$,t[116]=C,t[117]=Et):Et=t[117];let b;return t[118]!==At||t[119]!==$t||t[120]!==Et?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Et]}),t[118]=At,t[119]=$t,t[120]=Et,t[121]=b):b=t[121],b}function Ye(e){return e.layer}function Ue(e){return e.position==="after"}function We(e){return e.layer}function Je(e){return e.position==="before"}function Ke(e){return e!==0}function Qe(e){return e!==0}function Ze(e,t){return`${t}`}function _e(e){return`${e.id}`}function ti(e){const t=i.compilerRuntimeExports.c(130),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,width:et,height:xt,barColors:k,suffix:I,prefix:y,barPadding:z,showLabels:Nt,showValues:ct,showTicks:Vt,truncateBy:B,tooltip:it,onSeriesMouseOver:mt,refValues:dt,maxValue:Tt,minValue:j,onSeriesMouseClick:st,selectedColor:Y,labelOrder:H,maxBarThickness:Q,resetSelectionOnDoubleClick:U,detailsOnClick:F,barAxisTitle:$,valueColor:W,noOfTicks:T,styles:a,classNames:s,animate:o,colorDomain:u,precision:x,customLayers:h,naLabel:m}=e,A=L===void 0?20:L,Z=qt===void 0?20:qt,J=Dt===void 0?20:Dt,ut=yt===void 0?25:yt,Ft=q.useRef(null);let Ht;t[0]!==o.amount||t[1]!==o.once?(Ht={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Ht):Ht=t[2];const G=Ce.useInView(Ft,Ht),bt=$?A+30:A;let zt;t[3]!==ut||t[4]!==Z||t[5]!==bt||t[6]!==J?(zt={top:J,bottom:ut,left:bt,right:Z},t[3]=ut,t[4]=Z,t[5]=bt,t[6]=J,t[7]=zt):zt=t[7];const r=zt,[c,D]=q.useState(void 0),[p,C]=q.useState(void 0),[S,w]=q.useState(void 0),[Mt,vt]=q.useState(void 0),nt=et-r.left-r.right,pt=xt-r.top-r.bottom;let R,g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft;if(t[8]!==o||t[9]!==$||t[10]!==k||t[11]!==z||t[12]!==s?.graphObjectValues||t[13]!==s?.xAxis?.axis||t[14]!==s?.xAxis?.labels||t[15]!==s?.yAxis?.gridLines||t[16]!==s?.yAxis?.labels||t[17]!==s?.yAxis?.title||t[18]!==u||t[19]!==h||t[20]!==d||t[21]!==F||t[22]!==pt||t[23]!==nt||t[24]!==xt||t[25]!==G||t[26]!==H||t[27]!==A||t[28]!==r.bottom||t[29]!==r.left||t[30]!==r.right||t[31]!==r.top||t[32]!==Q||t[33]!==Tt||t[34]!==j||t[35]!==p||t[36]!==m||t[37]!==T||t[38]!==st||t[39]!==mt||t[40]!==x||t[41]!==y||t[42]!==dt||t[43]!==U||t[44]!==Y||t[45]!==Nt||t[46]!==Vt||t[47]!==ct||t[48]!==a?.graphObjectValues||t[49]!==a?.xAxis?.axis||t[50]!==a?.xAxis?.labels||t[51]!==a?.yAxis?.gridLines||t[52]!==a?.yAxis?.labels||t[53]!==a?.yAxis?.title||t[54]!==I||t[55]!==B||t[56]!==W||t[57]!==et){const b=Re.linear().domain([j,Tt]).range([pt,0]).nice();let rt;t[72]!==H?(rt=(N,Rt)=>({...N,id:H?`${N.label}`:`${Rt}`}),t[72]=H,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=H||St.map(ri),E=fe.band().domain(Gt).range([0,Q?Math.min(nt,Q*Gt.length):nt]).paddingInner(z),Ut=fe.band().domain(d[0].size.map(ai)).range([0,E.bandwidth()]).paddingInner(.1),It=b.ticks(T);g=Zt.motion.svg,ht=`${et}px`,kt=`${xt}px`,ot=`0 0 ${et} ${xt}`,Ct="ltr",X=Ft,ft=`translate(${r.left},${r.top})`;const Kt=b(j<0?0:j),Lt=b(j<0?0:j),Qt=j<0?0:j;let Wt;t[74]!==m||t[75]!==x||t[76]!==y||t[77]!==I||t[78]!==Qt?(Wt=ue.numberFormattingFunction(Qt,m,x,y,I),t[74]=m,t[75]=x,t[76]=y,t[77]=I,t[78]=Qt,t[79]=Wt):Wt=t[79];const Pt=s?.xAxis?.axis,Ot=s?.yAxis?.labels;let Yt;t[80]!==Pt||t[81]!==Ot?(Yt={axis:Pt,label:Ot},t[80]=Pt,t[81]=Ot,t[82]=Yt):Yt=t[82];const Jt=a?.xAxis?.axis,V=a?.yAxis?.labels;let v;t[83]!==Jt||t[84]!==V?(v={axis:Jt,label:V},t[83]=Jt,t[84]=V,t[85]=v):v=t[85],_=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Kt,y2:Lt,x1:0-A,x2:nt+r.right,label:Wt,labelPos:{x:0-A,dx:0,dy:Tt<0?"1em":-5,y:b(j<0?0:j)},classNames:Yt,styles:v}),tt=Vt?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:It.filter(li),y:It.filter(oi).map(N=>b(N)),x1:0-A,x2:nt+r.right,styles:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:I,prefix:y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:x}):null;const O=0-A-15,n=pt/2,f=a?.yAxis?.title,ee=s?.yAxis?.title;t[86]!==$||t[87]!==O||t[88]!==n||t[89]!==f||t[90]!==ee?(K=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:O,y:n,style:f,className:ee,text:$,rotate90:!0}),t[86]=$,t[87]=O,t[88]=n,t[89]=f,t[90]=ee,t[91]=K):K=t[91],t[92]!==h?(M=h.filter(ni).map(si),t[92]=h,t[93]=M):M=t[93],R=Me.AnimatePresence,lt=St.map(N=>_t.checkIfNullOrUndefined(E(N.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{variants:{initial:{x:E(`${N.id}`),y:0},whileInView:{x:E(`${N.id}`),y:0,transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[N.size.map((Rt,l)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",opacity:Y?k[l]===Y?1:.3:.85,onMouseEnter:ie=>{D({...N,sizeIndex:l}),vt(ie.clientY),w(ie.clientX),mt?.({...N,sizeIndex:l})},onMouseMove:ie=>{D({...N,sizeIndex:l}),vt(ie.clientY),w(ie.clientX)},onMouseLeave:()=>{D(void 0),w(void 0),vt(void 0),mt?.(void 0)},onClick:()=>{(st||F)&&(je.isEqual(p,{...N,sizeIndex:l})&&U?(C(void 0),st?.(void 0)):(C({...N,sizeIndex:l}),st&&st({...N,sizeIndex:l})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:Ut(`${l}`),width:Ut.bandwidth(),variants:{initial:{height:0,y:b(0),fill:k[l]},whileInView:{height:_t.checkIfNullOrUndefined(Rt)?0:Math.abs(b(Rt)-b(0)),y:_t.checkIfNullOrUndefined(Rt)?b(0):Rt>0?b(Rt):b(0),fill:k[l],transition:{duration:o.duration}}},exit:{height:0,y:b(0),transition:{duration:o.duration}},initial:"initial",animate:G?"whileInView":"initial"}),ct?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:Ut(`${l}`)+Ut.bandwidth()/2,style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:Rt?Rt>=0?"-5px":"1em":"-5px",variants:{initial:{y:b(0),opacity:0,fill:W||k[l]},whileInView:{y:b(Rt||0),opacity:1,fill:W||k[l],transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(Rt,m,x,y,I)}):null]},`${N.label}-${u[l]||l}`)),Nt?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${N.label}`.length<B?`${N.label}`:`${`${N.label}`.substring(0,B)}...`,y:b(0)+5,x:0,width:E.bandwidth(),height:r.bottom,style:a?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:G}):null]},N.label)),P=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((N,Rt)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:N.text,color:N.color,y:b(N.value),x1:0-A,x2:nt+r.right,classNames:N.classNames,styles:N.styles,animate:o,isInView:G},Rt))}):null,t[8]=o,t[9]=$,t[10]=k,t[11]=z,t[12]=s?.graphObjectValues,t[13]=s?.xAxis?.axis,t[14]=s?.xAxis?.labels,t[15]=s?.yAxis?.gridLines,t[16]=s?.yAxis?.labels,t[17]=s?.yAxis?.title,t[18]=u,t[19]=h,t[20]=d,t[21]=F,t[22]=pt,t[23]=nt,t[24]=xt,t[25]=G,t[26]=H,t[27]=A,t[28]=r.bottom,t[29]=r.left,t[30]=r.right,t[31]=r.top,t[32]=Q,t[33]=Tt,t[34]=j,t[35]=p,t[36]=m,t[37]=T,t[38]=st,t[39]=mt,t[40]=x,t[41]=y,t[42]=dt,t[43]=U,t[44]=Y,t[45]=Nt,t[46]=Vt,t[47]=ct,t[48]=a?.graphObjectValues,t[49]=a?.xAxis?.axis,t[50]=a?.xAxis?.labels,t[51]=a?.yAxis?.gridLines,t[52]=a?.yAxis?.labels,t[53]=a?.yAxis?.title,t[54]=I,t[55]=B,t[56]=W,t[57]=et,t[58]=R,t[59]=g,t[60]=_,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft}else R=t[58],g=t[59],_=t[60],tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71];let gt;t[94]!==R||t[95]!==lt||t[96]!==P?(gt=i.jsxRuntimeExports.jsxs(R,{children:[lt,P]}),t[94]=R,t[95]=lt,t[96]=P,t[97]=gt):gt=t[97];let jt;t[98]!==h?(jt=h.filter(ii).map(ei),t[98]=h,t[99]=jt):jt=t[99];let wt;t[100]!==_||t[101]!==tt||t[102]!==K||t[103]!==M||t[104]!==gt||t[105]!==jt||t[106]!==ft?(wt=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[_,tt,K,M,gt,jt]}),t[100]=_,t[101]=tt,t[102]=K,t[103]=M,t[104]=gt,t[105]=jt,t[106]=ft,t[107]=wt):wt=t[107];let at;t[108]!==g||t[109]!==ht||t[110]!==kt||t[111]!==ot||t[112]!==Ct||t[113]!==X||t[114]!==wt?(at=i.jsxRuntimeExports.jsx(g,{width:ht,height:kt,viewBox:ot,direction:Ct,ref:X,children:wt}),t[108]=g,t[109]=ht,t[110]=kt,t[111]=ot,t[112]=Ct,t[113]=X,t[114]=wt,t[115]=at):at=t[115];let At;t[116]!==s?.tooltip||t[117]!==S||t[118]!==Mt||t[119]!==c||t[120]!==a?.tooltip||t[121]!==it?(At=c&&it&&S&&Mt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:c,body:it,xPos:S,yPos:Mt,backgroundStyle:a?.tooltip,className:s?.tooltip}):null,t[116]=s?.tooltip,t[117]=S,t[118]=Mt,t[119]=c,t[120]=a?.tooltip,t[121]=it,t[122]=At):At=t[122];let $t;t[123]!==F||t[124]!==p?($t=F&&p!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:p!==void 0,onClose:()=>{C(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof F=="string"?{__html:$e.string2HTML(F,p)}:void 0,children:typeof F=="function"?F(p):null})}):null,t[123]=F,t[124]=p,t[125]=$t):$t=t[125];let Et;return t[126]!==at||t[127]!==At||t[128]!==$t?(Et=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[at,At,$t]}),t[126]=at,t[127]=At,t[128]=$t,t[129]=Et):Et=t[129],Et}function ei(e){return e.layer}function ii(e){return e.position==="after"}function si(e){return e.layer}function ni(e){return e.position==="before"}function oi(e){return e!==0}function li(e){return e!==0}function ai(e,t){return`${t}`}function ri(e){return`${e.id}`}function ci(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,showColorScale:mt,padding:dt,backgroundColor:Tt,leftMargin:j,rightMargin:st,topMargin:Y,bottomMargin:H,showLabels:Q,relativeHeight:U,tooltip:F,onSeriesMouseOver:$,refValues:W,graphID:T,maxValue:a,minValue:s,onSeriesMouseClick:o,graphDownload:u,dataDownload:x,language:h,labelOrder:m,minHeight:A,theme:Z,maxBarThickness:J,ariaLabel:ut,resetSelectionOnDoubleClick:Ft,detailsOnClick:Ht,barAxisTitle:G,noOfTicks:bt,valueColor:zt,styles:r,classNames:c,filterNA:D,animate:p,precision:C,customLayers:S,timeline:w,naLabel:Mt,sortParameter:vt,sortData:nt,orientation:pt}=e,R=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,g=et===void 0?.25:et,_=xt===void 0?!0:xt,tt=k===void 0?999:k,K=Vt===void 0?"":Vt,M=B===void 0?"":B,ht=it===void 0?!0:it,kt=mt===void 0?!0:mt,ot=Tt===void 0?!1:Tt,Ct=Q===void 0?!0:Q,X=u===void 0?!1:u,lt=x===void 0?!1:x,P=h===void 0?"en":h,ft=A===void 0?0:A,gt=Z===void 0?"light":Z,jt=Ft===void 0?!0:Ft,wt=bt===void 0?5:bt,at=D===void 0?!0:D,At=p===void 0?!1:p,$t=C===void 0?2:C;let Et;t[0]!==S?(Et=S===void 0?[]:S,t[0]=S,t[1]=Et):Et=t[1];const b=Et,rt=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,St=Mt===void 0?"NA":Mt,E=(pt===void 0?"vertical":pt)==="horizontal"?Xe:ti,[Ut,It]=q.useState(0),[Kt,Lt]=q.useState(0),[Qt,Wt]=q.useState(rt.autoplay),Pt=He.sort(Le.uniqBy(d,"date",!0).map(Xt=>me.parse(`${Xt}`,rt.dateFormat||"yyyy",new Date).getTime()),Ci),[Ot,Yt]=q.useState(rt.autoplay?0:Pt.length-1),[Jt,V]=q.useState(void 0),v=q.useRef(null),O=q.useRef(null);let n,f;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{const Xt=new ResizeObserver(Bt=>{It(Bt[0].target.clientWidth||620),Lt(Bt[0].target.clientHeight||480)});return v.current&&Xt.observe(v.current),()=>Xt.disconnect()},f=[],t[2]=n,t[3]=f):(n=t[2],f=t[3]),q.useEffect(n,f),q.useEffect(()=>{const Xt=setInterval(()=>{Yt(Bt=>Bt<Pt.length-1?Bt+1:0)},(rt.speed||2)*1e3);return Qt||clearInterval(Xt),()=>clearInterval(Xt)},[Pt,Qt,rt.speed]);const ee=ye.getSliderMarks(Pt,Ot,rt.showOnlyActiveDate,rt.dateFormat||"yyyy"),N=ve.GraphContainer,Rt=c?.graphContainer,l=r?.graphContainer;let ie;t[4]!==c?.description||t[5]!==c?.title||t[6]!==d||t[7]!==lt||t[8]!==yt||t[9]!==X||t[10]!==L||t[11]!==r?.description||t[12]!==r?.title||t[13]!==y?(ie=L||yt||X||lt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:c?.title,description:c?.description},graphTitle:L,graphDescription:yt,width:y,graphDownload:X?O:void 0,dataDownload:lt?d.map(ki).filter(Oi).length>0?d.map(Ei).filter($i):d.filter(Ai):null}):null,t[4]=c?.description,t[5]=c?.title,t[6]=d,t[7]=lt,t[8]=yt,t[9]=X,t[10]=L,t[11]=r?.description,t[12]=r?.title,t[13]=y,t[14]=ie):ie=t[14];const se=rt.enabled&&Pt.length>0&&ee?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Wt(!Qt)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Qt?"Click to pause animation":"Click to play animation",children:Qt?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:Pt[0],max:Pt[Pt.length-1],marks:ee,step:null,defaultValue:Pt[Pt.length-1],value:Pt[Ot],onChangeComplete:Xt=>{Yt(Pt.indexOf(Xt))},onChange:Xt=>{Yt(Pt.indexOf(Xt))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,xe="grow flex flex-col justify-center gap-3 w-full",pe=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[kt?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:y,colorDomain:Nt,colors:R,colorLegendTitle:ct,setSelectedColor:V,showNAColor:!1,className:c?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:v,children:Ut&&Kt?i.jsxRuntimeExports.jsx(E,{data:vt!==void 0?vt==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>rt.enabled?Xt.date===me.format(new Date(Pt[Ot]),rt.dateFormat||"yyyy"):Xt).filter(Xt=>at?!Xt.size.every(wi):Xt),vi,[nt||"asc"]):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>rt.enabled?Xt.date===me.format(new Date(Pt[Ot]),rt.dateFormat||"yyyy"):Xt).filter(Xt=>at?!Xt.size.every(bi):Xt),Xt=>_t.checkIfNullOrUndefined(Xt.size[vt])?-1/0:Xt.size[vt],[nt||"asc"]):he.ensureCompleteDataForStackedBarChart(d,rt.dateFormat||"yyyy").filter(Xt=>at?!Xt.size.every(yi):Xt),barColors:R,width:Ut,height:Kt,suffix:K,prefix:M,showValues:ht,barPadding:g,showTicks:_,leftMargin:j,rightMargin:st,topMargin:Y,bottomMargin:H,truncateBy:tt,showLabels:Ct,tooltip:F,onSeriesMouseOver:$,refValues:W,maxValue:_t.checkIfNullOrUndefined(a)?Math.max(...d.map(fi))<0?0:Math.max(...d.map(pi)):a,minValue:_t.checkIfNullOrUndefined(s)?Math.min(...d.map(mi))>=0?0:Math.min(...d.map(ui)):s,onSeriesMouseClick:o,selectedColor:Jt,labelOrder:m,rtl:P==="he"||P==="ar",maxBarThickness:J,resetSelectionOnDoubleClick:jt,detailsOnClick:Ht,barAxisTitle:G,noOfTicks:wt,valueColor:zt,styles:r,classNames:c,colorDomain:Nt,animate:At===!0?{duration:.5,once:!0,amount:.5}:At||{duration:0,once:!0,amount:0},precision:$t,customLayers:b,naLabel:St}):null})]});let re;t[15]!==pe?(re=i.jsxRuntimeExports.jsx("div",{className:xe,children:pe}),t[15]=pe,t[16]=re):re=t[16];let ne;t[17]!==c?.footnote||t[18]!==c?.source||t[19]!==z||t[20]!==Dt||t[21]!==r?.footnote||t[22]!==r?.source||t[23]!==y?(ne=Dt||z?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:Dt,footNote:z,width:y}):null,t[17]=c?.footnote,t[18]=c?.source,t[19]=z,t[20]=Dt,t[21]=r?.footnote,t[22]=r?.source,t[23]=y,t[24]=ne):ne=t[24];let le;return t[25]!==N||t[26]!==ut||t[27]!==ot||t[28]!==T||t[29]!==I||t[30]!==P||t[31]!==ft||t[32]!==dt||t[33]!==U||t[34]!==Rt||t[35]!==l||t[36]!==ie||t[37]!==se||t[38]!==re||t[39]!==ne||t[40]!==gt||t[41]!==y?(le=i.jsxRuntimeExports.jsxs(N,{className:Rt,style:l,id:T,ref:O,"aria-label":ut,backgroundColor:ot,theme:gt,language:P,minHeight:ft,width:y,height:I,relativeHeight:U,padding:dt,children:[ie,se,re,ne]}),t[25]=N,t[26]=ut,t[27]=ot,t[28]=T,t[29]=I,t[30]=P,t[31]=ft,t[32]=dt,t[33]=U,t[34]=Rt,t[35]=l,t[36]=ie,t[37]=se,t[38]=re,t[39]=ne,t[40]=gt,t[41]=y,t[42]=le):le=t[42],le}function ui(e){return Math.min(...e.size.filter(xi))}function xi(e){return!_t.checkIfNullOrUndefined(e)}function mi(e){return Math.min(...e.size.filter(di))}function di(e){return!_t.checkIfNullOrUndefined(e)}function pi(e){return Math.max(...e.size.filter(hi))}function hi(e){return!_t.checkIfNullOrUndefined(e)}function fi(e){return Math.max(...e.size.filter(gi))}function gi(e){return!_t.checkIfNullOrUndefined(e)}function yi(e){return e==null}function bi(e){return e==null}function vi(e){return oe.sum(e.size.filter(ji))}function ji(e){return!_t.checkIfNullOrUndefined(e)}function wi(e){return e==null}function Ai(e){return e!==void 0}function $i(e){return e!==void 0}function Ei(e){return e.data}function Oi(e){return e!==void 0}function ki(e){return e.data}function Ci(e,t){return Ge.ascending(e,t)}function Ri(e){const t=i.compilerRuntimeExports.c(125),{data:d,barColor:L,suffix:qt,prefix:Dt,barPadding:yt,showValues:et,showTicks:xt,truncateBy:k,width:I,height:y,colorDomain:z,topMargin:Nt,bottomMargin:ct,leftMargin:Vt,rightMargin:B,showLabels:it,tooltip:mt,onSeriesMouseOver:dt,refValues:Tt,selectedColor:j,highlightedDataPoints:st,maxValue:Y,minValue:H,onSeriesMouseClick:Q,labelOrder:U,rtl:F,maxBarThickness:$,minBarThickness:W,resetSelectionOnDoubleClick:T,detailsOnClick:a,barAxisTitle:s,valueColor:o,noOfTicks:u,styles:x,classNames:h,animate:m,dimmedOpacity:A,precision:Z,customLayers:J,naLabel:ut}=e,Ft=Nt===void 0?25:Nt,Ht=ct===void 0?10:ct,G=Vt===void 0?100:Vt,bt=B===void 0?40:B,zt=q.useRef(null);let r;t[0]!==m.amount||t[1]!==m.once?(r={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=r):r=t[2];const c=Ce.useInView(zt,r),[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=s?Ft+25:Ft;let R;t[3]!==Ht||t[4]!==G||t[5]!==bt||t[6]!==pt?(R={top:pt,bottom:Ht,left:G,right:bt},t[3]=Ht,t[4]=G,t[5]=bt,t[6]=pt,t[7]=R):R=t[7];const g=R,_=I-g.left-g.right,tt=y-g.top-g.bottom;let K,M,ht,kt,ot,Ct,X,lt,P,ft,gt,jt,wt,at;if(t[8]!==m||t[9]!==s||t[10]!==L||t[11]!==yt||t[12]!==h?.graphObjectValues||t[13]!==h?.xAxis?.gridLines||t[14]!==h?.xAxis?.labels||t[15]!==h?.xAxis?.title||t[16]!==h?.yAxis?.axis||t[17]!==h?.yAxis?.labels||t[18]!==z||t[19]!==J||t[20]!==d||t[21]!==a||t[22]!==A||t[23]!==tt||t[24]!==_||t[25]!==y||t[26]!==st||t[27]!==c||t[28]!==U||t[29]!==g.bottom||t[30]!==g.left||t[31]!==g.top||t[32]!==$||t[33]!==Y||t[34]!==W||t[35]!==H||t[36]!==C||t[37]!==ut||t[38]!==u||t[39]!==Q||t[40]!==dt||t[41]!==Z||t[42]!==Dt||t[43]!==Tt||t[44]!==T||t[45]!==F||t[46]!==j||t[47]!==it||t[48]!==xt||t[49]!==et||t[50]!==x?.graphObjectValues||t[51]!==x?.xAxis?.gridLines||t[52]!==x?.xAxis?.labels||t[53]!==x?.xAxis?.title||t[54]!==x?.yAxis?.axis||t[55]!==x?.yAxis?.labels||t[56]!==qt||t[57]!==Ft||t[58]!==k||t[59]!==o||t[60]!==I){let E;t[75]!==U?(E=(n,f)=>({...n,id:U?`${n.label}`:`${f}`}),t[75]=U,t[76]=E):E=t[76];const Ut=d.map(E),It=Re.linear().domain([H,Y]).range([0,_]).nice(),Kt=U||Ut.map(Fi),Lt=fe.band().domain(Kt).range([0,W?Math.max(tt,W*Kt.length):$?Math.min(tt,$*Kt.length):tt]).paddingInner(yt),Qt=It.ticks(u);M=Zt.motion.svg,X=zt,lt=`${I}px`,P=`${y}px`,ft=`0 0 ${I} ${y}`,gt="ltr",ht=`translate(${g.left},${g.top})`,kt=xt?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:Qt.filter(Bi),x:Qt.filter(zi).map(n=>It(n)),y1:0-Ft,y2:tt+g.bottom,styles:{gridLines:x?.xAxis?.gridLines,labels:x?.xAxis?.labels},classNames:{gridLines:h?.xAxis?.gridLines,labels:h?.xAxis?.labels},suffix:qt,prefix:Dt,labelType:"secondary",showGridLines:!0,precision:Z}):null;const Wt=_/2,Pt=0-g.top+15,Ot=x?.xAxis?.title,Yt=h?.xAxis?.title;t[77]!==s||t[78]!==Wt||t[79]!==Pt||t[80]!==Ot||t[81]!==Yt?(ot=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Wt,y:Pt,style:Ot,className:Yt,text:s}),t[77]=s,t[78]=Wt,t[79]=Pt,t[80]=Ot,t[81]=Yt,t[82]=ot):ot=t[82],t[83]!==J?(Ct=J.filter(Di).map(Si),t[83]=J,t[84]=Ct):Ct=t[84],K=Me.AnimatePresence,jt=Ut.map(n=>_t.checkIfNullOrUndefined(Lt(n.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:j?n.color&&L[z.indexOf(n.color)]===j?1:A:st.length!==0?st.indexOf(n.label)!==-1?.85:A:.85},whileInView:{opacity:j?n.color&&L[z.indexOf(n.color)]===j?1:A:st.length!==0?st.indexOf(n.label)!==-1?.85:A:.85,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:f=>{p(n),nt(f.clientY),Mt(f.clientX),dt?.(n)},onClick:()=>{(Q||a)&&(je.isEqual(C,n)&&T?(S(void 0),Q?.(void 0)):(S(n),Q?.(n)))},onMouseMove:f=>{p(n),nt(f.clientY),Mt(f.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),dt?.(void 0)},children:[n.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{variants:{initial:{width:0,x:It(0),y:Lt(`${n.id}`),fill:d.filter(Ti).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray},whileInView:{width:n.size>=0?It(n.size)-It(0):It(0)-It(n.size),x:n.size>=0?It(0):It(n.size),y:Lt(`${n.id}`),fill:d.filter(Ii).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray,transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{width:0,x:It(0),transition:{duration:m.duration}},height:Lt.bandwidth()}):null,it?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${n.label}`.length<k?`${n.label}`:`${`${n.label}`.substring(0,k)}...`,y:Lt(n.id)||0,x:(n.size||0)<0?It(0):0-g.left,width:(n.size||0)<0?I-It(0):It(0)+g.left,height:Lt.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:x?.yAxis?.labels,className:h?.yAxis?.labels,animate:m,isInView:c}):null,et?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:n.size&&n.size<0?"end":"start",...x?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!o&&L.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",h?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",variants:{initial:{x:It(0),y:Lt(`${n.id}`)+Lt.bandwidth()/2,opacity:0,fill:o||(d.filter(Vi).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray)},whileInView:{x:n.size?It(n.size):It(0),opacity:1,y:Lt(`${n.id}`)+Lt.bandwidth()/2,fill:o||(d.filter(Ni).length===0?L[0]:n.color?L[z.indexOf(n.color)]:ce.Colors.gray),transition:{duration:m.duration}}},initial:"initial",animate:c?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(n.size,ut,Z,Dt,qt)}):null]},n.label));const Jt=h?.yAxis?.axis;let V;t[85]!==Jt?(V={axis:Jt},t[85]=Jt,t[86]=V):V=t[86];const v=x?.yAxis?.axis;let O;t[87]!==v?(O={axis:v},t[87]=v,t[88]=O):O=t[88],wt=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:It(H<0?0:H),x2:It(H<0?0:H),y1:-2.5,y2:tt+g.bottom,classNames:V,styles:O}),at=Tt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Tt.map((n,f)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:n.text,color:n.color,x:It(n.value),y1:0-g.top,y2:tt+g.bottom,textSide:It(n.value)>_*.75||F?"left":"right",classNames:n.classNames,styles:n.styles,animate:m,isInView:c},f))}):null,t[8]=m,t[9]=s,t[10]=L,t[11]=yt,t[12]=h?.graphObjectValues,t[13]=h?.xAxis?.gridLines,t[14]=h?.xAxis?.labels,t[15]=h?.xAxis?.title,t[16]=h?.yAxis?.axis,t[17]=h?.yAxis?.labels,t[18]=z,t[19]=J,t[20]=d,t[21]=a,t[22]=A,t[23]=tt,t[24]=_,t[25]=y,t[26]=st,t[27]=c,t[28]=U,t[29]=g.bottom,t[30]=g.left,t[31]=g.top,t[32]=$,t[33]=Y,t[34]=W,t[35]=H,t[36]=C,t[37]=ut,t[38]=u,t[39]=Q,t[40]=dt,t[41]=Z,t[42]=Dt,t[43]=Tt,t[44]=T,t[45]=F,t[46]=j,t[47]=it,t[48]=xt,t[49]=et,t[50]=x?.graphObjectValues,t[51]=x?.xAxis?.gridLines,t[52]=x?.xAxis?.labels,t[53]=x?.xAxis?.title,t[54]=x?.yAxis?.axis,t[55]=x?.yAxis?.labels,t[56]=qt,t[57]=Ft,t[58]=k,t[59]=o,t[60]=I,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt,t[72]=jt,t[73]=wt,t[74]=at}else K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71],jt=t[72],wt=t[73],at=t[74];let At;t[89]!==K||t[90]!==jt||t[91]!==wt||t[92]!==at?(At=i.jsxRuntimeExports.jsxs(K,{children:[jt,wt,at]}),t[89]=K,t[90]=jt,t[91]=wt,t[92]=at,t[93]=At):At=t[93];let $t;t[94]!==J?($t=J.filter(Li).map(Mi),t[94]=J,t[95]=$t):$t=t[95];let Et;t[96]!==ht||t[97]!==kt||t[98]!==ot||t[99]!==Ct||t[100]!==At||t[101]!==$t?(Et=i.jsxRuntimeExports.jsxs("g",{transform:ht,children:[kt,ot,Ct,At,$t]}),t[96]=ht,t[97]=kt,t[98]=ot,t[99]=Ct,t[100]=At,t[101]=$t,t[102]=Et):Et=t[102];let b;t[103]!==M||t[104]!==X||t[105]!==lt||t[106]!==P||t[107]!==ft||t[108]!==gt||t[109]!==Et?(b=i.jsxRuntimeExports.jsx(M,{ref:X,width:lt,height:P,viewBox:ft,direction:gt,children:Et}),t[103]=M,t[104]=X,t[105]=lt,t[106]=P,t[107]=ft,t[108]=gt,t[109]=Et,t[110]=b):b=t[110];let rt;t[111]!==h?.tooltip||t[112]!==w||t[113]!==vt||t[114]!==D||t[115]!==x?.tooltip||t[116]!==mt?(rt=D&&mt&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:mt,xPos:w,yPos:vt,backgroundStyle:x?.tooltip,className:h?.tooltip}):null,t[111]=h?.tooltip,t[112]=w,t[113]=vt,t[114]=D,t[115]=x?.tooltip,t[116]=mt,t[117]=rt):rt=t[117];let St;t[118]!==a||t[119]!==C?(St=a&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof a=="string"?{__html:$e.string2HTML(a,C)}:void 0,children:typeof a=="function"?a(C):null})}):null,t[118]=a,t[119]=C,t[120]=St):St=t[120];let Gt;return t[121]!==b||t[122]!==rt||t[123]!==St?(Gt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[b,rt,St]}),t[121]=b,t[122]=rt,t[123]=St,t[124]=Gt):Gt=t[124],Gt}function Mi(e){return e.layer}function Li(e){return e.position==="after"}function Ni(e){return e.color}function Vi(e){return e.color}function Ii(e){return e.color}function Ti(e){return e.color}function Si(e){return e.layer}function Di(e){return e.position==="before"}function zi(e){return e!==0}function Bi(e){return e!==0}function Fi(e){return`${e.id}`}function Pi(e){const t=i.compilerRuntimeExports.c(133),{leftMargin:d,rightMargin:L,topMargin:qt,bottomMargin:Dt,data:yt,width:et,height:xt,barColor:k,suffix:I,prefix:y,barPadding:z,showLabels:Nt,showValues:ct,showTicks:Vt,colorDomain:B,truncateBy:it,tooltip:mt,onSeriesMouseOver:dt,refValues:Tt,selectedColor:j,maxValue:st,minValue:Y,highlightedDataPoints:H,onSeriesMouseClick:Q,labelOrder:U,maxBarThickness:F,minBarThickness:$,resetSelectionOnDoubleClick:W,detailsOnClick:T,barAxisTitle:a,valueColor:s,noOfTicks:o,styles:u,classNames:x,dimmedOpacity:h,animate:m,precision:A,customLayers:Z,naLabel:J}=e,ut=d===void 0?20:d,Ft=L===void 0?20:L,Ht=qt===void 0?20:qt,G=Dt===void 0?25:Dt,bt=q.useRef(null);let zt;t[0]!==m.amount||t[1]!==m.once?(zt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=zt):zt=t[2];const r=Ce.useInView(bt,zt),c=a?ut+30:ut;let D;t[3]!==G||t[4]!==Ft||t[5]!==c||t[6]!==Ht?(D={top:Ht,bottom:G,left:c,right:Ft},t[3]=G,t[4]=Ft,t[5]=c,t[6]=Ht,t[7]=D):D=t[7];const p=D,[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),[pt,R]=q.useState(void 0),g=et-p.left-p.right,_=xt-p.top-p.bottom;let tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt,jt,wt;if(t[8]!==m||t[9]!==a||t[10]!==k||t[11]!==z||t[12]!==x?.graphObjectValues||t[13]!==x?.xAxis?.axis||t[14]!==x?.xAxis?.labels||t[15]!==x?.yAxis?.gridLines||t[16]!==x?.yAxis?.labels||t[17]!==x?.yAxis?.title||t[18]!==B||t[19]!==Z||t[20]!==yt||t[21]!==T||t[22]!==h||t[23]!==_||t[24]!==g||t[25]!==xt||t[26]!==H||t[27]!==r||t[28]!==U||t[29]!==ut||t[30]!==p.bottom||t[31]!==p.left||t[32]!==p.right||t[33]!==p.top||t[34]!==F||t[35]!==st||t[36]!==$||t[37]!==Y||t[38]!==w||t[39]!==J||t[40]!==o||t[41]!==Q||t[42]!==dt||t[43]!==A||t[44]!==y||t[45]!==Tt||t[46]!==W||t[47]!==j||t[48]!==Nt||t[49]!==Vt||t[50]!==ct||t[51]!==u?.graphObjectValues||t[52]!==u?.xAxis?.axis||t[53]!==u?.xAxis?.labels||t[54]!==u?.yAxis?.gridLines||t[55]!==u?.yAxis?.labels||t[56]!==u?.yAxis?.title||t[57]!==I||t[58]!==it||t[59]!==s||t[60]!==et){const Gt=Re.linear().domain([Y,st]).range([_,0]).nice();let E;t[75]!==U?(E=(l,ie)=>({...l,id:U?`${l.label}`:`${ie}`}),t[75]=U,t[76]=E):E=t[76];const Ut=yt.map(E),It=U||Ut.map(Zi),Kt=fe.band().domain(It).range([0,$?Math.max(g,$*It.length):F?Math.min(g,F*It.length):g]).paddingInner(z),Lt=Gt.ticks(o);K=Zt.motion.svg,Ct=bt,X=`${et}px`,lt=`${xt}px`,P=`0 0 ${et} ${xt}`,ft="ltr",wt=`translate(${p.left},${p.top})`;const Qt=Gt(Y<0?0:Y),Wt=Gt(Y<0?0:Y),Pt=Y<0?0:Y;let Ot;t[77]!==J||t[78]!==A||t[79]!==y||t[80]!==I||t[81]!==Pt?(Ot=ue.numberFormattingFunction(Pt,J,A,y,I),t[77]=J,t[78]=A,t[79]=y,t[80]=I,t[81]=Pt,t[82]=Ot):Ot=t[82];const Yt=x?.xAxis?.axis,Jt=x?.yAxis?.labels;let V;t[83]!==Yt||t[84]!==Jt?(V={axis:Yt,label:Jt},t[83]=Yt,t[84]=Jt,t[85]=V):V=t[85];const v=u?.xAxis?.axis,O=u?.yAxis?.labels;let n;t[86]!==v||t[87]!==O?(n={axis:v,label:O},t[86]=v,t[87]=O,t[88]=n):n=t[88],M=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:Qt,y2:Wt,x1:0-ut,x2:g+p.right,label:Ot,labelPos:{x:0-ut,dx:0,dy:st<0?"1em":-5,y:Gt(Y<0?0:Y)},classNames:V,styles:n}),ht=Vt?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Lt.filter(Qi),y:Lt.filter(Ki).map(l=>Gt(l)),x1:0-ut,x2:g+p.right,styles:{gridLines:u?.yAxis?.gridLines,labels:u?.yAxis?.labels},classNames:{gridLines:x?.yAxis?.gridLines,labels:x?.yAxis?.labels},suffix:I,prefix:y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:A}):null;const f=0-ut-15,ee=_/2,N=u?.yAxis?.title,Rt=x?.yAxis?.title;t[89]!==a||t[90]!==f||t[91]!==ee||t[92]!==N||t[93]!==Rt?(kt=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:f,y:ee,style:N,className:Rt,text:a,rotate90:!0}),t[89]=a,t[90]=f,t[91]=ee,t[92]=N,t[93]=Rt,t[94]=kt):kt=t[94],t[95]!==Z?(ot=Z.filter(Ji).map(Wi),t[95]=Z,t[96]=ot):ot=t[96],tt=Me.AnimatePresence,gt=Ut.map((l,ie)=>_t.checkIfNullOrUndefined(Kt(l.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:r?"whileInView":"initial",variants:{initial:{opacity:j?l.color&&k[B.indexOf(l.color)]===j?1:h:H.length!==0?H.indexOf(l.label)!==-1?.85:h:.85},whileInView:{opacity:j?l.color&&k[B.indexOf(l.color)]===j?1:h:H.length!==0?H.indexOf(l.label)!==-1?.85:h:.85,transition:{duration:m.duration}}},exit:{opacity:0,transition:{duration:m.duration}},onMouseEnter:se=>{S(l),R(se.clientY),nt(se.clientX),dt?.(l)},onClick:()=>{(Q||T)&&(je.isEqual(w,l)&&W?(Mt(void 0),Q?.(void 0)):(Mt(l),Q?.(l)))},onMouseMove:se=>{S(l),R(se.clientY),nt(se.clientX)},onMouseLeave:()=>{S(void 0),nt(void 0),R(void 0),dt?.(void 0)},children:[l.size?i.jsxRuntimeExports.jsx(Zt.motion.rect,{width:Kt.bandwidth(),initial:"initial",animate:r?"whileInView":"initial",variants:{initial:{height:0,x:Kt(`${l.id}`),y:Gt(0),fill:yt.filter(Ui).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray},whileInView:{height:l.size?Math.abs(Gt(l.size)-Gt(0)):0,y:l.size&&l.size>0?Gt(l.size):Gt(0),x:Kt(`${l.id}`),fill:yt.filter(Yi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray,transition:{duration:m.duration}}},exit:{height:0,y:Gt(0),transition:{duration:m.duration}}}):null,Nt?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${l.label}`.length<it?`${l.label}`:`${`${l.label}`.substring(0,it)}...`,y:(l.size||0)<0?0:Gt(0)+5,x:Kt(`${l.id}`),width:Kt.bandwidth(),height:(l.size||0)<0?Gt(0)-5:p.bottom,style:u?.xAxis?.labels,className:x?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:m,isInView:r}):null,ct?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...u?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!s&&k.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",x?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",variants:{initial:{x:Kt(`${l.id}`)+Kt.bandwidth()/2,y:Gt(0),opacity:0,fill:s||(yt.filter(Xi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray)},whileInView:{x:Kt(`${l.id}`)+Kt.bandwidth()/2,y:Gt(l.size||0),fill:s||(yt.filter(Gi).length===0?k[0]:l.color?k[B.indexOf(l.color)]:ce.Colors.gray),opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:r?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:ue.numberFormattingFunction(l.size,J,A,y,I)}):null]},l.label)),jt=Tt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Tt.map((l,ie)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:l.text,color:l.color,y:Gt(l.value),x1:0-ut,x2:g+p.right,classNames:l.classNames,styles:l.styles,animate:m,isInView:r},ie))}):null,t[8]=m,t[9]=a,t[10]=k,t[11]=z,t[12]=x?.graphObjectValues,t[13]=x?.xAxis?.axis,t[14]=x?.xAxis?.labels,t[15]=x?.yAxis?.gridLines,t[16]=x?.yAxis?.labels,t[17]=x?.yAxis?.title,t[18]=B,t[19]=Z,t[20]=yt,t[21]=T,t[22]=h,t[23]=_,t[24]=g,t[25]=xt,t[26]=H,t[27]=r,t[28]=U,t[29]=ut,t[30]=p.bottom,t[31]=p.left,t[32]=p.right,t[33]=p.top,t[34]=F,t[35]=st,t[36]=$,t[37]=Y,t[38]=w,t[39]=J,t[40]=o,t[41]=Q,t[42]=dt,t[43]=A,t[44]=y,t[45]=Tt,t[46]=W,t[47]=j,t[48]=Nt,t[49]=Vt,t[50]=ct,t[51]=u?.graphObjectValues,t[52]=u?.xAxis?.axis,t[53]=u?.xAxis?.labels,t[54]=u?.yAxis?.gridLines,t[55]=u?.yAxis?.labels,t[56]=u?.yAxis?.title,t[57]=I,t[58]=it,t[59]=s,t[60]=et,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft,t[72]=gt,t[73]=jt,t[74]=wt}else tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71],gt=t[72],jt=t[73],wt=t[74];let at;t[97]!==tt||t[98]!==gt||t[99]!==jt?(at=i.jsxRuntimeExports.jsxs(tt,{children:[gt,jt]}),t[97]=tt,t[98]=gt,t[99]=jt,t[100]=at):at=t[100];let At;t[101]!==Z?(At=Z.filter(Hi).map(qi),t[101]=Z,t[102]=At):At=t[102];let $t;t[103]!==M||t[104]!==ht||t[105]!==kt||t[106]!==ot||t[107]!==at||t[108]!==At||t[109]!==wt?($t=i.jsxRuntimeExports.jsxs("g",{transform:wt,children:[M,ht,kt,ot,at,At]}),t[103]=M,t[104]=ht,t[105]=kt,t[106]=ot,t[107]=at,t[108]=At,t[109]=wt,t[110]=$t):$t=t[110];let Et;t[111]!==K||t[112]!==Ct||t[113]!==X||t[114]!==lt||t[115]!==P||t[116]!==ft||t[117]!==$t?(Et=i.jsxRuntimeExports.jsx(K,{ref:Ct,width:X,height:lt,viewBox:P,direction:ft,children:$t}),t[111]=K,t[112]=Ct,t[113]=X,t[114]=lt,t[115]=P,t[116]=ft,t[117]=$t,t[118]=Et):Et=t[118];let b;t[119]!==x?.tooltip||t[120]!==vt||t[121]!==pt||t[122]!==C||t[123]!==u?.tooltip||t[124]!==mt?(b=C&&mt&&vt&&pt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:C,body:mt,xPos:vt,yPos:pt,backgroundStyle:u?.tooltip,className:x?.tooltip}):null,t[119]=x?.tooltip,t[120]=vt,t[121]=pt,t[122]=C,t[123]=u?.tooltip,t[124]=mt,t[125]=b):b=t[125];let rt;t[126]!==T||t[127]!==w?(rt=T&&w!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:w!==void 0,onClose:()=>{Mt(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof T=="string"?{__html:$e.string2HTML(T,w)}:void 0,children:typeof T=="function"?T(w):null})}):null,t[126]=T,t[127]=w,t[128]=rt):rt=t[128];let St;return t[129]!==Et||t[130]!==b||t[131]!==rt?(St=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Et,b,rt]}),t[129]=Et,t[130]=b,t[131]=rt,t[132]=St):St=t[132],St}function qi(e){return e.layer}function Hi(e){return e.position==="after"}function Gi(e){return e.color}function Xi(e){return e.color}function Yi(e){return e.color}function Ui(e){return e.color}function Wi(e){return e.layer}function Ji(e){return e.position==="before"}function Ki(e){return e!==0}function Qi(e){return e!==0}function Zi(e){return`${e.id}`}function _i(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,suffix:Dt,sources:yt,prefix:et,graphDescription:xt,barPadding:k,showValues:I,showTicks:y,truncateBy:z,height:Nt,width:ct,footNote:Vt,colorDomain:B,colorLegendTitle:it,highlightedDataPoints:mt,padding:dt,backgroundColor:Tt,topMargin:j,bottomMargin:st,leftMargin:Y,rightMargin:H,showLabels:Q,relativeHeight:U,tooltip:F,onSeriesMouseOver:$,refValues:W,showColorScale:T,graphID:a,maxValue:s,minValue:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,sortData:m,labelOrder:A,language:Z,showNAColor:J,minHeight:ut,theme:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,styles:S,classNames:w,filterNA:Mt,animate:vt,dimmedOpacity:nt,precision:pt,customLayers:R,timeline:g,naLabel:_,orientation:tt}=e,K=Dt===void 0?"":Dt,M=et===void 0?"":et,ht=k===void 0?.25:k,kt=I===void 0?!0:I,ot=y===void 0?!0:y,Ct=z===void 0?999:z;let X;t[0]!==mt?(X=mt===void 0?[]:mt,t[0]=mt,t[1]=X):X=t[1];const lt=X,P=Tt===void 0?!1:Tt,ft=Q===void 0?!0:Q,gt=T===void 0?!0:T,jt=x===void 0?!1:x,wt=h===void 0?!1:h,at=Z===void 0?"en":Z,At=J===void 0?!0:J,$t=ut===void 0?0:ut,Et=Ft===void 0?"light":Ft,b=r===void 0?!0:r,rt=p===void 0?5:p,St=Mt===void 0?!0:Mt,Gt=vt===void 0?!1:vt,E=nt===void 0?.3:nt,Ut=pt===void 0?2:pt;let It;t[2]!==R?(It=R===void 0?[]:R,t[2]=R,t[3]=It):It=t[3];const Kt=It,Lt=g===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:g,Qt=_===void 0?"NA":_,Wt=tt===void 0?"vertical":tt,Pt=Wt==="horizontal"?Ri:Pi,[Ot,Yt]=q.useState(0),[Jt,V]=q.useState(0),[v,O]=q.useState(Lt.autoplay),n=He.sort(Le.uniqBy(d,"date",!0).map(te=>me.parse(`${te}`,Lt.dateFormat||"yyyy",new Date).getTime()),fs),[f,ee]=q.useState(Lt.autoplay?0:n.length-1),[N,Rt]=q.useState(void 0),l=q.useRef(null),ie=q.useRef(null);let se,xe;t[4]===Symbol.for("react.memo_cache_sentinel")?(se=()=>{const te=new ResizeObserver(de=>{Yt(de[0].target.clientWidth||620),V(de[0].target.clientHeight||480)});return l.current&&te.observe(l.current),()=>te.disconnect()},xe=[],t[4]=se,t[5]=xe):(se=t[4],xe=t[5]),q.useEffect(se,xe),q.useEffect(()=>{const te=setInterval(()=>{ee(de=>de<n.length-1?de+1:0)},(Lt.speed||2)*1e3);return v||clearInterval(te),()=>clearInterval(te)},[n,v,Lt.speed]);const pe=ye.getSliderMarks(n,f,Lt.showOnlyActiveDate,Lt.dateFormat||"yyyy"),re=ve.GraphContainer,ne=w?.graphContainer,le=S?.graphContainer;let Xt;t[6]!==w?.description||t[7]!==w?.title||t[8]!==d||t[9]!==wt||t[10]!==xt||t[11]!==jt||t[12]!==L||t[13]!==S?.description||t[14]!==S?.title||t[15]!==ct?(Xt=L||xt||jt||wt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:S?.title,description:S?.description},classNames:{title:w?.title,description:w?.description},graphTitle:L,graphDescription:xt,width:ct,graphDownload:jt?ie:void 0,dataDownload:wt?d.map(hs).filter(ps).length>0?d.map(ds).filter(ms):d.filter(xs):null}):null,t[6]=w?.description,t[7]=w?.title,t[8]=d,t[9]=wt,t[10]=xt,t[11]=jt,t[12]=L,t[13]=S?.description,t[14]=S?.title,t[15]=ct,t[16]=Xt):Xt=t[16];const Bt=Lt.enabled&&n.length>0&&pe?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center pb-4",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{O(!v)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":v?"Click to pause animation":"Click to play animation",children:v?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:n[0],max:n[n.length-1],marks:pe,step:null,defaultValue:n[n.length-1],value:n[f],onChangeComplete:te=>{ee(n.indexOf(te))},onChange:te=>{ee(n.indexOf(te))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,ae=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[gt&&d.filter(us).length!==0?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:ct,colorLegendTitle:it,colors:qt||ce.Colors[Et].categoricalColors.colors,colorDomain:B||Le.uniqBy(d,"color",!0),setSelectedColor:Rt,showNAColor:At,className:w?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:l,children:Ot&&Jt?i.jsxRuntimeExports.jsx(Pt,{data:m?Ne.orderBy(he.ensureCompleteDataForBarChart(d,Lt.dateFormat||"yyyy").filter(te=>Lt.enabled?te.date===me.format(new Date(n[f]),Lt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te),[te=>te.size===void 0?m==="asc"?(Wt==="horizontal"?1:-1)*(1/0):(Wt==="horizontal"?-1:1)*(1/0):te.size],[m]).filter((te,de)=>G?de<G:!0):he.ensureCompleteDataForBarChart(d,Lt.dateFormat||"yyyy").filter(te=>Lt.enabled?te.date===me.format(new Date(n[f]),Lt.dateFormat||"yyyy"):te).filter(te=>St?!_t.checkIfNullOrUndefined(te.size):te).filter((te,de)=>G?de<G:!0),barColor:d.filter(cs).length===0?qt?[qt]:[ce.Colors.primaryColors["blue-600"]]:qt||ce.Colors[Et].categoricalColors.colors,colorDomain:d.filter(rs).length===0?[]:B||Le.uniqBy(d,"color",!0),selectedColor:N,width:Ot,height:Jt,suffix:K,prefix:M,barPadding:ht,showValues:kt,showTicks:ot,leftMargin:Y,rightMargin:H,topMargin:j,bottomMargin:st,truncateBy:Ct,showLabels:ft,tooltip:F,onSeriesMouseOver:$,refValues:W,maxValue:_t.checkIfNullOrUndefined(s)?Math.max(...d.filter(as).map(ls))<0?0:Math.max(...d.filter(os).map(ns)):s,minValue:_t.checkIfNullOrUndefined(o)?Math.min(...d.filter(ss).map(is))>=0?0:Math.min(...d.filter(es).map(ts)):o,highlightedDataPoints:lt,onSeriesMouseClick:u,labelOrder:A,rtl:at==="he"||at==="ar",maxBarThickness:Ht,minBarThickness:bt,resetSelectionOnDoubleClick:b,detailsOnClick:c,barAxisTitle:D,noOfTicks:rt,valueColor:C,classNames:w,styles:S,animate:Gt===!0?{duration:.5,once:!0,amount:.5}:Gt||{duration:0,once:!0,amount:0},dimmedOpacity:E,precision:Ut,customLayers:Kt,naLabel:Qt}):null})]});let ge;t[17]!==w?.footnote||t[18]!==w?.source||t[19]!==Vt||t[20]!==yt||t[21]!==S?.footnote||t[22]!==S?.source||t[23]!==ct?(ge=yt||Vt?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{sources:yt,footNote:Vt,width:ct,styles:{footnote:S?.footnote,source:S?.source},classNames:{footnote:w?.footnote,source:w?.source}}):null,t[17]=w?.footnote,t[18]=w?.source,t[19]=Vt,t[20]=yt,t[21]=S?.footnote,t[22]=S?.source,t[23]=ct,t[24]=ge):ge=t[24];let Ve;return t[25]!==re||t[26]!==zt||t[27]!==P||t[28]!==a||t[29]!==Nt||t[30]!==at||t[31]!==$t||t[32]!==dt||t[33]!==U||t[34]!==ne||t[35]!==le||t[36]!==Xt||t[37]!==Bt||t[38]!==ae||t[39]!==ge||t[40]!==Et||t[41]!==ct?(Ve=i.jsxRuntimeExports.jsxs(re,{className:ne,style:le,id:a,ref:ie,"aria-label":zt,backgroundColor:P,theme:Et,language:at,minHeight:$t,width:ct,height:Nt,relativeHeight:U,padding:dt,children:[Xt,Bt,ae,ge]}),t[25]=re,t[26]=zt,t[27]=P,t[28]=a,t[29]=Nt,t[30]=at,t[31]=$t,t[32]=dt,t[33]=U,t[34]=ne,t[35]=le,t[36]=Xt,t[37]=Bt,t[38]=ae,t[39]=ge,t[40]=Et,t[41]=ct,t[42]=Ve):Ve=t[42],Ve}function ts(e){return e.size}function es(e){return!_t.checkIfNullOrUndefined(e.size)}function is(e){return e.size}function ss(e){return!_t.checkIfNullOrUndefined(e.size)}function ns(e){return e.size}function os(e){return!_t.checkIfNullOrUndefined(e.size)}function ls(e){return e.size}function as(e){return!_t.checkIfNullOrUndefined(e.size)}function rs(e){return e.color}function cs(e){return e.color}function us(e){return e.color}function xs(e){return e!==void 0}function ms(e){return e!==void 0}function ds(e){return e.data}function ps(e){return e!==void 0}function hs(e){return e.data}function fs(e,t){return Ge.ascending(e,t)}function gs(e){const t=i.compilerRuntimeExports.c(122),{data:d,barColors:L,barPadding:qt,showTicks:Dt,topMargin:yt,bottomMargin:et,leftMargin:xt,rightMargin:k,truncateBy:I,width:y,height:z,tooltip:Nt,onSeriesMouseOver:ct,showLabels:Vt,suffix:B,prefix:it,showValues:mt,refValues:dt,maxValue:Tt,onSeriesMouseClick:j,selectedColor:st,rtl:Y,labelOrder:H,maxBarThickness:Q,minBarThickness:U,resetSelectionOnDoubleClick:F,detailsOnClick:$,barAxisTitle:W,valueColor:T,noOfTicks:a,styles:s,classNames:o,animate:u,colorDomain:x,precision:h,customLayers:m,naLabel:A}=e,Z=yt===void 0?25:yt,J=et===void 0?10:et,ut=xt===void 0?100:xt,Ft=k===void 0?40:k,Ht=q.useRef(null);let G;t[0]!==u.amount||t[1]!==u.once?(G={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=G):G=t[2];const bt=Ce.useInView(Ht,G),zt=W?Z+25:Z;let r;t[3]!==J||t[4]!==ut||t[5]!==Ft||t[6]!==zt?(r={top:zt,bottom:J,left:ut,right:Ft},t[3]=J,t[4]=ut,t[5]=Ft,t[6]=zt,t[7]=r):r=t[7];const c=r,[D,p]=q.useState(void 0),[C,S]=q.useState(void 0),[w,Mt]=q.useState(void 0),[vt,nt]=q.useState(void 0),pt=y-c.left-c.right,R=z-c.top-c.bottom;let g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft,gt;if(t[8]!==u||t[9]!==W||t[10]!==L||t[11]!==qt||t[12]!==o?.graphObjectValues||t[13]!==o?.xAxis?.gridLines||t[14]!==o?.xAxis?.labels||t[15]!==o?.xAxis?.title||t[16]!==o?.yAxis?.axis||t[17]!==o?.yAxis?.labels||t[18]!==x||t[19]!==m||t[20]!==d||t[21]!==$||t[22]!==R||t[23]!==pt||t[24]!==z||t[25]!==bt||t[26]!==H||t[27]!==c.bottom||t[28]!==c.left||t[29]!==c.top||t[30]!==Q||t[31]!==Tt||t[32]!==U||t[33]!==C||t[34]!==A||t[35]!==a||t[36]!==j||t[37]!==ct||t[38]!==h||t[39]!==it||t[40]!==dt||t[41]!==F||t[42]!==Y||t[43]!==st||t[44]!==Vt||t[45]!==Dt||t[46]!==mt||t[47]!==s?.graphObjectValues||t[48]!==s?.xAxis?.gridLines||t[49]!==s?.xAxis?.labels||t[50]!==s?.xAxis?.title||t[51]!==s?.yAxis?.axis||t[52]!==s?.yAxis?.labels||t[53]!==B||t[54]!==Z||t[55]!==I||t[56]!==T||t[57]!==y){let rt;t[72]!==H?(rt=(V,v)=>({...V,id:H?`${V.label}`:`${v}`}),t[72]=H,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=H||St.map(Os),E=Re.linear().domain([0,Tt]).range([0,pt]).nice(),Ut=fe.band().domain(Gt).range([0,U?Math.max(R,U*Gt.length):Q?Math.min(R,Q*Gt.length):R]).paddingInner(qt),It=E.ticks(a);_=Zt.motion.svg,kt=Ht,ot=`${y}px`,Ct=`${z}px`,X=`0 0 ${y} ${z}`,lt="ltr",tt=`translate(${c.left},${c.top})`,K=Dt?i.jsxRuntimeExports.jsx(Se.XTicksAndGridLines,{values:It.filter(Es),x:It.filter($s).map(V=>E(V)),y1:0-Z,y2:R+c.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},suffix:B,prefix:it,labelType:"secondary",showGridLines:!0,precision:h}):null;const Kt=pt/2,Lt=0-c.top+15,Qt=s?.xAxis?.title,Wt=o?.xAxis?.title;t[74]!==W||t[75]!==Kt||t[76]!==Lt||t[77]!==Qt||t[78]!==Wt?(M=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:Kt,y:Lt,style:Qt,className:Wt,text:W}),t[74]=W,t[75]=Kt,t[76]=Lt,t[77]=Qt,t[78]=Wt,t[79]=M):M=t[79],t[80]!==m?(ht=m.filter(As).map(ws),t[80]=m,t[81]=ht):ht=t[81],g=Me.AnimatePresence,P=St.map(V=>_t.checkIfNullOrUndefined(Ut(V.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:0,y:Ut(`${V.id}`)},whileInView:{x:0,y:Ut(`${V.id}`),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:[V.size.map((v,O)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:st?L[O]===st?1:.3:1,onMouseEnter:n=>{p({...V,sizeIndex:O}),nt(n.clientY),Mt(n.clientX),ct?.({...V,sizeIndex:O})},onMouseMove:n=>{p({...V,sizeIndex:O}),nt(n.clientY),Mt(n.clientX)},onMouseLeave:()=>{p(void 0),Mt(void 0),nt(void 0),ct?.(void 0)},onClick:()=>{(j||$)&&(je.isEqual(C,{...V,sizeIndex:O})&&F?(S(void 0),j?.(void 0)):(S({...V,sizeIndex:O}),j&&j({...V,sizeIndex:O})))},children:[v?i.jsxRuntimeExports.jsx(Zt.motion.rect,{y:0,style:{fill:L[O]},height:Ut.bandwidth(),exit:{width:0,x:E(0),transition:{duration:u.duration}},variants:{initial:{width:0,x:E(0),fill:L[O]},whileInView:{width:E(v||0),x:E(O===0?0:oe.sum(V.size.filter((n,f)=>f<O&&n))),fill:L[O],transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial"},O):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{y:Ut.bandwidth()/2,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dy:"0.33em",className:i.mo("graph-value text-sm",o?.graphObjectValues),exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x:E(0),opacity:0,fill:Ie.getTextColorBasedOnBgColor(L[O])},whileInView:{x:E(O===0?0:oe.sum(V.size.filter((n,f)=>f<O&&n)))+E(v||0)/2,opacity:v&&E(v)/ue.numberFormattingFunction(v,A,h,it,B).length>12?1:0,fill:Ie.getTextColorBasedOnBgColor(L[O]),transition:{duration:u.duration}}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(v,A,h,it,B)}):null]},`${V.label}-${x[O]||O}`)),Vt?i.jsxRuntimeExports.jsx(Te.YAxesLabels,{value:`${V.label}`.length<I?`${V.label}`:`${`${V.label}`.substring(0,I)}...`,y:0,x:0-c.left,width:0+c.left,height:Ut.bandwidth(),style:s?.yAxis?.labels,className:o?.yAxis?.labels,animate:u,isInView:bt}):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{className:i.mo("graph-value graph-value-total text-sm",T?"":" fill-primary-gray-700 dark:fill-primary-gray-300",o?.graphObjectValues),style:{...T?{fill:T}:{},textAnchor:"start",...s?.graphObjectValues||{}},y:Ut.bandwidth()/2,dx:5,dy:"0.33em",variants:{initial:{x:E(0),opacity:0,...T?{fill:T}:{}},whileInView:{x:E(oe.sum(V.size.map(js))),opacity:1,...T?{fill:T}:{},transition:{duration:u.duration}}},exit:{opacity:0,transition:{duration:u.duration}},initial:"initial",animate:bt?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(V.size.filter(vs)),A,h,it,B)}):null]},V.label));const Pt=o?.yAxis?.axis;let Ot;t[82]!==Pt?(Ot={axis:Pt},t[82]=Pt,t[83]=Ot):Ot=t[83];const Yt=s?.yAxis?.axis;let Jt;t[84]!==Yt?(Jt={axis:Yt},t[84]=Yt,t[85]=Jt):Jt=t[85],ft=i.jsxRuntimeExports.jsx(Ee.Axis,{x1:E(0),x2:E(0),y1:-2.5,y2:R+c.bottom,classNames:Ot,styles:Jt}),gt=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((V,v)=>i.jsxRuntimeExports.jsx(ke.RefLineX,{text:V.text,color:V.color,x:E(V.value),y1:0-c.top,y2:R+c.bottom,textSide:E(V.value)>pt*.75||Y?"left":"right",classNames:V.classNames,styles:V.styles,animate:u,isInView:bt},v))}):null,t[8]=u,t[9]=W,t[10]=L,t[11]=qt,t[12]=o?.graphObjectValues,t[13]=o?.xAxis?.gridLines,t[14]=o?.xAxis?.labels,t[15]=o?.xAxis?.title,t[16]=o?.yAxis?.axis,t[17]=o?.yAxis?.labels,t[18]=x,t[19]=m,t[20]=d,t[21]=$,t[22]=R,t[23]=pt,t[24]=z,t[25]=bt,t[26]=H,t[27]=c.bottom,t[28]=c.left,t[29]=c.top,t[30]=Q,t[31]=Tt,t[32]=U,t[33]=C,t[34]=A,t[35]=a,t[36]=j,t[37]=ct,t[38]=h,t[39]=it,t[40]=dt,t[41]=F,t[42]=Y,t[43]=st,t[44]=Vt,t[45]=Dt,t[46]=mt,t[47]=s?.graphObjectValues,t[48]=s?.xAxis?.gridLines,t[49]=s?.xAxis?.labels,t[50]=s?.xAxis?.title,t[51]=s?.yAxis?.axis,t[52]=s?.yAxis?.labels,t[53]=B,t[54]=Z,t[55]=I,t[56]=T,t[57]=y,t[58]=g,t[59]=_,t[60]=tt,t[61]=K,t[62]=M,t[63]=ht,t[64]=kt,t[65]=ot,t[66]=Ct,t[67]=X,t[68]=lt,t[69]=P,t[70]=ft,t[71]=gt}else g=t[58],_=t[59],tt=t[60],K=t[61],M=t[62],ht=t[63],kt=t[64],ot=t[65],Ct=t[66],X=t[67],lt=t[68],P=t[69],ft=t[70],gt=t[71];let jt;t[86]!==g||t[87]!==P||t[88]!==ft||t[89]!==gt?(jt=i.jsxRuntimeExports.jsxs(g,{children:[P,ft,gt]}),t[86]=g,t[87]=P,t[88]=ft,t[89]=gt,t[90]=jt):jt=t[90];let wt;t[91]!==m?(wt=m.filter(bs).map(ys),t[91]=m,t[92]=wt):wt=t[92];let at;t[93]!==tt||t[94]!==K||t[95]!==M||t[96]!==ht||t[97]!==jt||t[98]!==wt?(at=i.jsxRuntimeExports.jsxs("g",{transform:tt,children:[K,M,ht,jt,wt]}),t[93]=tt,t[94]=K,t[95]=M,t[96]=ht,t[97]=jt,t[98]=wt,t[99]=at):at=t[99];let At;t[100]!==_||t[101]!==kt||t[102]!==ot||t[103]!==Ct||t[104]!==X||t[105]!==lt||t[106]!==at?(At=i.jsxRuntimeExports.jsx(_,{ref:kt,width:ot,height:Ct,viewBox:X,direction:lt,children:at}),t[100]=_,t[101]=kt,t[102]=ot,t[103]=Ct,t[104]=X,t[105]=lt,t[106]=at,t[107]=At):At=t[107];let $t;t[108]!==o?.tooltip||t[109]!==w||t[110]!==vt||t[111]!==D||t[112]!==s?.tooltip||t[113]!==Nt?($t=D&&Nt&&w&&vt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:D,body:Nt,xPos:w,yPos:vt,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[108]=o?.tooltip,t[109]=w,t[110]=vt,t[111]=D,t[112]=s?.tooltip,t[113]=Nt,t[114]=$t):$t=t[114];let Et;t[115]!==$||t[116]!==C?(Et=$&&C!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:C!==void 0,onClose:()=>{S(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof $=="string"?{__html:$e.string2HTML($,C)}:void 0,children:typeof $=="function"?$(C):null})}):null,t[115]=$,t[116]=C,t[117]=Et):Et=t[117];let b;return t[118]!==At||t[119]!==$t||t[120]!==Et?(b=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[At,$t,Et]}),t[118]=At,t[119]=$t,t[120]=Et,t[121]=b):b=t[121],b}function ys(e){return e.layer}function bs(e){return e.position==="after"}function vs(e){return e}function js(e){return e||0}function ws(e){return e.layer}function As(e){return e.position==="before"}function $s(e){return e!==0}function Es(e){return e!==0}function Os(e){return`${e.id}`}function ks(e){const t=i.compilerRuntimeExports.c(129),{data:d,leftMargin:L,rightMargin:qt,topMargin:Dt,bottomMargin:yt,width:et,height:xt,barColors:k,barPadding:I,showLabels:y,showTicks:z,truncateBy:Nt,tooltip:ct,onSeriesMouseOver:Vt,suffix:B,prefix:it,showValues:mt,refValues:dt,maxValue:Tt,onSeriesMouseClick:j,selectedColor:st,labelOrder:Y,maxBarThickness:H,minBarThickness:Q,resetSelectionOnDoubleClick:U,detailsOnClick:F,barAxisTitle:$,valueColor:W,noOfTicks:T,styles:a,classNames:s,animate:o,colorDomain:u,precision:x,customLayers:h,naLabel:m}=e,A=L===void 0?20:L,Z=qt===void 0?20:qt,J=Dt===void 0?20:Dt,ut=yt===void 0?25:yt,Ft=q.useRef(null);let Ht;t[0]!==o.amount||t[1]!==o.once?(Ht={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Ht):Ht=t[2];const G=Ce.useInView(Ft,Ht),bt=$?A+30:A;let zt;t[3]!==ut||t[4]!==Z||t[5]!==bt||t[6]!==J?(zt={top:J,bottom:ut,left:bt,right:Z},t[3]=ut,t[4]=Z,t[5]=bt,t[6]=J,t[7]=zt):zt=t[7];const r=zt,[c,D]=q.useState(void 0),[p,C]=q.useState(void 0),[S,w]=q.useState(void 0),[Mt,vt]=q.useState(void 0),nt=et-r.left-r.right,pt=xt-r.top-r.bottom;let R,g,_,tt,K,M,ht,kt,ot,Ct,X,lt,P,ft;if(t[8]!==o||t[9]!==$||t[10]!==k||t[11]!==I||t[12]!==s?.graphObjectValues||t[13]!==s?.xAxis?.axis||t[14]!==s?.xAxis?.labels||t[15]!==s?.yAxis?.gridLines||t[16]!==s?.yAxis?.labels||t[17]!==s?.yAxis?.title||t[18]!==u||t[19]!==h||t[20]!==d||t[21]!==F||t[22]!==pt||t[23]!==nt||t[24]!==xt||t[25]!==G||t[26]!==Y||t[27]!==A||t[28]!==r.bottom||t[29]!==r.left||t[30]!==r.right||t[31]!==r.top||t[32]!==H||t[33]!==Tt||t[34]!==Q||t[35]!==p||t[36]!==m||t[37]!==T||t[38]!==j||t[39]!==Vt||t[40]!==x||t[41]!==it||t[42]!==dt||t[43]!==U||t[44]!==st||t[45]!==y||t[46]!==z||t[47]!==mt||t[48]!==a?.graphObjectValues||t[49]!==a?.xAxis?.axis||t[50]!==a?.xAxis?.labels||t[51]!==a?.yAxis?.gridLines||t[52]!==a?.yAxis?.labels||t[53]!==a?.yAxis?.title||t[54]!==B||t[55]!==Nt||t[56]!==W||t[57]!==et){const b=Re.linear().domain([0,Tt]).range([pt,0]).nice();let rt;t[72]!==Y?(rt=(f,ee)=>({...f,id:Y?`${f.label}`:`${ee}`}),t[72]=Y,t[73]=rt):rt=t[73];const St=d.map(rt),Gt=Y||St.map(Ss),E=fe.band().domain(Gt).range([0,Q?Math.max(nt,Q*Gt.length):H?Math.min(nt,H*Gt.length):nt]).paddingInner(I),Ut=b.ticks(T);g=Zt.motion.svg,ht=`${et}px`,kt=`${xt}px`,ot=`0 0 ${et} ${xt}`,Ct="ltr",X=Ft,ft=`translate(${r.left},${r.top})`;const It=b(0),Kt=b(0);let Lt;t[74]!==m||t[75]!==x||t[76]!==it||t[77]!==B?(Lt=ue.numberFormattingFunction(0,m,x,it,B),t[74]=m,t[75]=x,t[76]=it,t[77]=B,t[78]=Lt):Lt=t[78];const Qt=s?.xAxis?.axis,Wt=s?.yAxis?.labels;let Pt;t[79]!==Qt||t[80]!==Wt?(Pt={axis:Qt,label:Wt},t[79]=Qt,t[80]=Wt,t[81]=Pt):Pt=t[81];const Ot=a?.xAxis?.axis,Yt=a?.yAxis?.labels;let Jt;t[82]!==Ot||t[83]!==Yt?(Jt={axis:Ot,label:Yt},t[82]=Ot,t[83]=Yt,t[84]=Jt):Jt=t[84],_=i.jsxRuntimeExports.jsx(Ee.Axis,{y1:It,y2:Kt,x1:0-A,x2:nt+r.right,label:Lt,labelPos:{x:0-A,y:b(0),dx:0,dy:-5},classNames:Pt,styles:Jt}),tt=z?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:Ut.filter(Ts),y:Ut.filter(Is).map(f=>b(f)),x1:0-A,x2:nt+r.right,styles:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},classNames:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},suffix:B,prefix:it,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:x}):null;const V=0-A-15,v=pt/2,O=a?.yAxis?.title,n=s?.yAxis?.title;t[85]!==$||t[86]!==V||t[87]!==v||t[88]!==O||t[89]!==n?(K=i.jsxRuntimeExports.jsx(Oe.AxisTitle,{x:V,y:v,style:O,className:n,text:$,rotate90:!0}),t[85]=$,t[86]=V,t[87]=v,t[88]=O,t[89]=n,t[90]=K):K=t[90],t[91]!==h?(M=h.filter(Vs).map(Ns),t[91]=h,t[92]=M):M=t[92],R=Me.AnimatePresence,lt=St.map(f=>_t.checkIfNullOrUndefined(E(f.id))?null:i.jsxRuntimeExports.jsxs(Zt.motion.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",variants:{initial:{x:E(`${f.id}`),y:0},whileInView:{x:E(`${f.id}`),y:0,transition:{duration:o.duration}}},transition:{duration:o.duration},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:[f.size.map((ee,N)=>i.jsxRuntimeExports.jsxs(Zt.motion.g,{opacity:st?k[N]===st?1:.3:1,onMouseEnter:Rt=>{D({...f,sizeIndex:N}),vt(Rt.clientY),w(Rt.clientX),Vt?.({...f,sizeIndex:N})},onMouseMove:Rt=>{D({...f,sizeIndex:N}),vt(Rt.clientY),w(Rt.clientX)},onMouseLeave:()=>{D(void 0),w(void 0),vt(void 0),Vt?.(void 0)},onClick:()=>{(j||F)&&(je.isEqual(p,{...f,sizeIndex:N})&&U?(C(void 0),j?.(void 0)):(C({...f,sizeIndex:N}),j&&j({...f,sizeIndex:N})))},children:[i.jsxRuntimeExports.jsx(Zt.motion.rect,{x:0,width:E.bandwidth(),variants:{initial:{height:0,fill:k[N],y:b(0)},whileInView:{height:Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt)))),y:b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt))),fill:k[N],transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{height:0,y:b(0),transition:{duration:o.duration}}}),mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{x:E.bandwidth()/2,style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:i.mo("graph-value text-sm",s?.graphObjectValues),dy:"0.33em",variants:{initial:{y:b(0),opacity:0,fill:Ie.getTextColorBasedOnBgColor(k[N])},whileInView:{y:b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))+Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt))))/2,opacity:ee&&Math.abs(b(oe.sum(f.size.filter((Rt,l)=>l<=N&&Rt)))-b(oe.sum(f.size.filter((Rt,l)=>l<N&&Rt))))>20?1:0,fill:Ie.getTextColorBasedOnBgColor(k[N]),transition:{duration:o.duration}}},initial:"initial",animate:G?"whileInView":"initial",exit:{opacity:0,transition:{duration:o.duration}},children:ue.numberFormattingFunction(ee,m,x,it,B)}):null]},`${f.label}-${u[N]||N}`)),y?i.jsxRuntimeExports.jsx(ze.XAxesLabels,{value:`${f.label}`.length<Nt?`${f.label}`:`${`${f.label}`.substring(0,Nt)}...`,y:b(0)+5,x:0,width:E.bandwidth(),height:r.bottom,style:a?.xAxis?.labels,className:s?.xAxis?.labels,alignment:"top",animate:o,isInView:G}):null,mt?i.jsxRuntimeExports.jsx(Zt.motion.text,{style:{textAnchor:"middle",...a?.graphObjectValues||{}},x:E.bandwidth()/2,dy:-10,className:i.mo("graph-value graph-value-total",W?"text-sm":"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",s?.graphObjectValues),variants:{initial:{y:b(0),opacity:0,...W&&{fill:W}},whileInView:{y:b(oe.sum(f.size.map(Ls))),opacity:1,...W&&{fill:W},transition:{duration:o.duration}}},exit:{opacity:0,transition:{duration:o.duration}},initial:"initial",animate:G?"whileInView":"initial",children:ue.numberFormattingFunction(oe.sum(f.size.filter(Ms)),m,x,it,B)}):null]},f.label)),P=dt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:dt.map((f,ee)=>i.jsxRuntimeExports.jsx(ke.RefLineY,{text:f.text,color:f.color,y:b(f.value),x1:0-A,x2:nt+r.right,classNames:f.classNames,styles:f.styles,animate:o,isInView:G},ee))}):null,t[8]=o,t[9]=$,t[10]=k,t[11]=I,t[12]=s?.graphObjectValues,t[13]=s?.xAxis?.axis,t[14]=s?.xAxis?.labels,t[15]=s?.yAxis?.gridLines,t[16]=s?.yAxis?.labels,t[17]=s?.yAxis?.title,t[18]=u,t[19]=h,t[20]=d,t[21]=F,t[22]=pt,t[23]=nt,t[24]=xt,t[25]=G,t[26]=Y,t[27]=A,t[28]=r.bottom,t[29]=r.left,t[30]=r.right,t[31]=r.top,t[32]=H,t[33]=Tt,t[34]=Q,t[35]=p,t[36]=m,t[37]=T,t[38]=j,t[39]=Vt,t[40]=x,t[41]=it,t[42]=dt,t[43]=U,t[44]=st,t[45]=y,t[46]=z,t[47]=mt,t[48]=a?.graphObjectValues,t[49]=a?.xAxis?.axis,t[50]=a?.xAxis?.labels,t[51]=a?.yAxis?.gridLines,t[52]=a?.yAxis?.labels,t[53]=a?.yAxis?.title,t[54]=B,t[55]=Nt,t[56]=W,t[57]=et,t[58]=R,t[59]=g,t[60]=_,t[61]=tt,t[62]=K,t[63]=M,t[64]=ht,t[65]=kt,t[66]=ot,t[67]=Ct,t[68]=X,t[69]=lt,t[70]=P,t[71]=ft}else R=t[58],g=t[59],_=t[60],tt=t[61],K=t[62],M=t[63],ht=t[64],kt=t[65],ot=t[66],Ct=t[67],X=t[68],lt=t[69],P=t[70],ft=t[71];let gt;t[93]!==R||t[94]!==lt||t[95]!==P?(gt=i.jsxRuntimeExports.jsxs(R,{children:[lt,P]}),t[93]=R,t[94]=lt,t[95]=P,t[96]=gt):gt=t[96];let jt;t[97]!==h?(jt=h.filter(Rs).map(Cs),t[97]=h,t[98]=jt):jt=t[98];let wt;t[99]!==_||t[100]!==tt||t[101]!==K||t[102]!==M||t[103]!==gt||t[104]!==jt||t[105]!==ft?(wt=i.jsxRuntimeExports.jsxs("g",{transform:ft,children:[_,tt,K,M,gt,jt]}),t[99]=_,t[100]=tt,t[101]=K,t[102]=M,t[103]=gt,t[104]=jt,t[105]=ft,t[106]=wt):wt=t[106];let at;t[107]!==g||t[108]!==ht||t[109]!==kt||t[110]!==ot||t[111]!==Ct||t[112]!==X||t[113]!==wt?(at=i.jsxRuntimeExports.jsx(g,{width:ht,height:kt,viewBox:ot,direction:Ct,ref:X,children:wt}),t[107]=g,t[108]=ht,t[109]=kt,t[110]=ot,t[111]=Ct,t[112]=X,t[113]=wt,t[114]=at):at=t[114];let At;t[115]!==s?.tooltip||t[116]!==S||t[117]!==Mt||t[118]!==c||t[119]!==a?.tooltip||t[120]!==ct?(At=c&&ct&&S&&Mt?i.jsxRuntimeExports.jsx(Ae.Tooltip,{data:c,body:ct,xPos:S,yPos:Mt,backgroundStyle:a?.tooltip,className:s?.tooltip}):null,t[115]=s?.tooltip,t[116]=S,t[117]=Mt,t[118]=c,t[119]=a?.tooltip,t[120]=ct,t[121]=At):At=t[121];let $t;t[122]!==F||t[123]!==p?($t=F&&p!==void 0?i.jsxRuntimeExports.jsx(we.le,{open:p!==void 0,onClose:()=>{C(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof F=="string"?{__html:$e.string2HTML(F,p)}:void 0,children:typeof F=="function"?F(p):null})}):null,t[122]=F,t[123]=p,t[124]=$t):$t=t[124];let Et;return t[125]!==at||t[126]!==At||t[127]!==$t?(Et=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[at,At,$t]}),t[125]=at,t[126]=At,t[127]=$t,t[128]=Et):Et=t[128],Et}function Cs(e){return e.layer}function Rs(e){return e.position==="after"}function Ms(e){return e}function Ls(e){return e||0}function Ns(e){return e.layer}function Vs(e){return e.position==="before"}function Is(e){return e!==0}function Ts(e){return e!==0}function Ss(e){return`${e.id}`}function Ds(e){const t=i.compilerRuntimeExports.c(43),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,padding:Vt,backgroundColor:B,topMargin:it,bottomMargin:mt,leftMargin:dt,rightMargin:Tt,tooltip:j,onSeriesMouseOver:st,suffix:Y,prefix:H,showLabels:Q,relativeHeight:U,showValues:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,labelOrder:x,minHeight:h,theme:m,maxBarThickness:A,sortParameter:Z,maxNumberOfBars:J,minBarThickness:ut,showColorScale:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,styles:D,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,timeline:vt,naLabel:nt,sortData:pt,orientation:R}=e,g=qt===void 0?ce.Colors.light.categoricalColors.colors:qt,_=et===void 0?.25:et,tt=xt===void 0?!0:xt,K=k===void 0?999:k,M=B===void 0?!1:B,ht=Y===void 0?"":Y,kt=H===void 0?"":H,ot=Q===void 0?!0:Q,Ct=F===void 0?!0:F,X=s===void 0?!1:s,lt=o===void 0?!1:o,P=u===void 0?"en":u,ft=h===void 0?0:h,gt=m===void 0?"light":m,jt=Ft===void 0?!0:Ft,wt=G===void 0?!0:G,at=r===void 0?5:r,At=C===void 0?!0:C,$t=S===void 0?!1:S,Et=w===void 0?2:w;let b;t[0]!==Mt?(b=Mt===void 0?[]:Mt,t[0]=Mt,t[1]=b):b=t[1];const rt=b,St=vt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:vt,Gt=nt===void 0?"NA":nt,Ut=(R===void 0?"vertical":R)==="horizontal"?gs:ks,[It,Kt]=q.useState(0),[Lt,Qt]=q.useState(0),[Wt,Pt]=q.useState(St.autoplay),Ot=He.sort(Le.uniqBy(d,"date",!0).map(Bt=>me.parse(`${Bt}`,St.dateFormat||"yyyy",new Date).getTime()),Ks),[Yt,Jt]=q.useState(St.autoplay?0:Ot.length-1),[V,v]=q.useState(void 0),O=q.useRef(null),n=q.useRef(null);let f,ee;t[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{const Bt=new ResizeObserver(ae=>{Kt(ae[0].target.clientWidth||620),Qt(ae[0].target.clientHeight||480)});return O.current&&Bt.observe(O.current),()=>Bt.disconnect()},ee=[],t[2]=f,t[3]=ee):(f=t[2],ee=t[3]),q.useEffect(f,ee),q.useEffect(()=>{const Bt=setInterval(()=>{Jt(ae=>ae<Ot.length-1?ae+1:0)},(St.speed||2)*1e3);return Wt||clearInterval(Bt),()=>clearInterval(Bt)},[Ot,Wt,St.speed]);const N=ye.getSliderMarks(Ot,Yt,St.showOnlyActiveDate,St.dateFormat||"yyyy"),Rt=ve.GraphContainer,l=p?.graphContainer,ie=D?.graphContainer;let se;t[4]!==p?.description||t[5]!==p?.title||t[6]!==d||t[7]!==lt||t[8]!==yt||t[9]!==X||t[10]!==L||t[11]!==D?.description||t[12]!==D?.title||t[13]!==y?(se=L||yt||X||lt?i.jsxRuntimeExports.jsx(Be.GraphHeader,{styles:{title:D?.title,description:D?.description},classNames:{title:p?.title,description:p?.description},graphTitle:L,graphDescription:yt,width:y,graphDownload:X?n:void 0,dataDownload:lt?d.map(Js).filter(Ws).length>0?d.map(Us).filter(Ys):d.filter(Xs):null}):null,t[4]=p?.description,t[5]=p?.title,t[6]=d,t[7]=lt,t[8]=yt,t[9]=X,t[10]=L,t[11]=D?.description,t[12]=D?.title,t[13]=y,t[14]=se):se=t[14];const xe=St.enabled&&Ot.length>0&&N?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Pt(!Wt)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Wt?"Click to pause animation":"Click to play animation",children:Wt?i.jsxRuntimeExports.jsx(be.Pause,{}):i.jsxRuntimeExports.jsx(be.Play,{})}),i.jsxRuntimeExports.jsx(ye.Nr,{min:Ot[0],max:Ot[Ot.length-1],marks:N,step:null,defaultValue:Ot[Ot.length-1],value:Ot[Yt],onChangeComplete:Bt=>{Jt(Ot.indexOf(Bt))},onChange:Bt=>{Jt(Ot.indexOf(Bt))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,pe="grow flex flex-col justify-center gap-3 w-full",re=d.length===0?i.jsxRuntimeExports.jsx(qe.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[jt?i.jsxRuntimeExports.jsx(Pe.ColorLegendWithMouseOver,{width:y,colorDomain:Nt,colors:g,colorLegendTitle:ct,setSelectedColor:v,showNAColor:!1,className:p?.colorLegend}):null,i.jsxRuntimeExports.jsx(ve.GraphArea,{ref:O,children:It&&Lt?i.jsxRuntimeExports.jsx(Ut,{data:Z!==void 0?Z==="total"?Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Gs):Bt),qs,[pt||"asc"]).filter((Bt,ae)=>J?ae<J:!0):Ne.orderBy(he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Ps):Bt),Bt=>_t.checkIfNullOrUndefined(Bt.size[Z])?-1/0:Bt.size[Z],[pt||"asc"]).filter((Bt,ae)=>J?ae<J:!0):he.ensureCompleteDataForStackedBarChart(d,St.dateFormat||"yyyy").filter(Bt=>St.enabled?Bt.date===me.format(new Date(Ot[Yt]),St.dateFormat||"yyyy"):Bt).filter(Bt=>At?!Bt.size.every(Fs):Bt).filter((Bt,ae)=>J?ae<J:!0),barColors:g,width:It,height:Lt,barPadding:_,showTicks:tt,leftMargin:dt,rightMargin:Tt,topMargin:it,bottomMargin:mt,truncateBy:K,showLabels:ot,tooltip:j,onSeriesMouseOver:st,showValues:Ct,suffix:ht,prefix:kt,refValues:$,maxValue:_t.checkIfNullOrUndefined(T)?Math.max(...d.map(zs)):T,onSeriesMouseClick:a,selectedColor:V,rtl:P==="he"||P==="ar",labelOrder:x,maxBarThickness:A,minBarThickness:ut,resetSelectionOnDoubleClick:wt,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:at,valueColor:c,classNames:p,styles:D,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},colorDomain:Nt,precision:Et,customLayers:rt,naLabel:Gt}):null})]});let ne;t[15]!==re?(ne=i.jsxRuntimeExports.jsx("div",{className:pe,children:re}),t[15]=re,t[16]=ne):ne=t[16];let le;t[17]!==p?.footnote||t[18]!==p?.source||t[19]!==z||t[20]!==Dt||t[21]!==D?.footnote||t[22]!==D?.source||t[23]!==y?(le=Dt||z?i.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:D?.footnote,source:D?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:Dt,footNote:z,width:y}):null,t[17]=p?.footnote,t[18]=p?.source,t[19]=z,t[20]=Dt,t[21]=D?.footnote,t[22]=D?.source,t[23]=y,t[24]=le):le=t[24];let Xt;return t[25]!==Rt||t[26]!==Ht||t[27]!==M||t[28]!==W||t[29]!==I||t[30]!==P||t[31]!==ft||t[32]!==Vt||t[33]!==U||t[34]!==l||t[35]!==ie||t[36]!==se||t[37]!==xe||t[38]!==ne||t[39]!==le||t[40]!==gt||t[41]!==y?(Xt=i.jsxRuntimeExports.jsxs(Rt,{className:l,style:ie,id:W,ref:n,"aria-label":Ht,backgroundColor:M,theme:gt,language:P,minHeight:ft,width:y,height:I,relativeHeight:U,padding:Vt,children:[se,xe,ne,le]}),t[25]=Rt,t[26]=Ht,t[27]=M,t[28]=W,t[29]=I,t[30]=P,t[31]=ft,t[32]=Vt,t[33]=U,t[34]=l,t[35]=ie,t[36]=se,t[37]=xe,t[38]=ne,t[39]=le,t[40]=gt,t[41]=y,t[42]=Xt):Xt=t[42],Xt}function zs(e){return oe.sum(e.size.filter(Bs))||0}function Bs(e){return!_t.checkIfNullOrUndefined(e)}function Fs(e){return e==null}function Ps(e){return e==null}function qs(e){return oe.sum(e.size.filter(Hs))}function Hs(e){return!_t.checkIfNullOrUndefined(e)}function Gs(e){return e==null}function Xs(e){return e!==void 0}function Ys(e){return e!==void 0}function Us(e){return e.data}function Ws(e){return e!==void 0}function Js(e){return e.data}function Ks(e,t){return Ge.ascending(e,t)}function Qs(e){const t=i.compilerRuntimeExports.c(61),{data:d,graphTitle:L,colors:qt,barPadding:Dt,showTicks:yt,leftMargin:et,rightMargin:xt,topMargin:k,bottomMargin:I,truncateBy:y,showLabels:z,showValues:Nt,backgroundColor:ct,suffix:Vt,prefix:B,sources:it,graphDescription:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,showColorScale:W,graphID:T,maxValue:a,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,language:m,theme:A,sortData:Z,labelOrder:J,showNAColor:ut,minHeight:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,orientation:S,styles:w,classNames:Mt,filterNA:vt,animate:nt,dimmedOpacity:pt,precision:R,customLayers:g,timeline:_,naLabel:tt}=e,K=S===void 0?"vertical":S;let M;return t[0]!==nt||t[1]!==zt||t[2]!==ct||t[3]!==D||t[4]!==Dt||t[5]!==I||t[6]!==Mt||t[7]!==st||t[8]!==Y||t[9]!==qt||t[10]!==g||t[11]!==d||t[12]!==h||t[13]!==c||t[14]!==pt||t[15]!==vt||t[16]!==j||t[17]!==mt||t[18]!==x||t[19]!==T||t[20]!==L||t[21]!==dt||t[22]!==o||t[23]!==J||t[24]!==m||t[25]!==et||t[26]!==Ht||t[27]!==G||t[28]!==a||t[29]!==bt||t[30]!==Ft||t[31]!==s||t[32]!==tt||t[33]!==p||t[34]!==u||t[35]!==F||t[36]!==K||t[37]!==H||t[38]!==R||t[39]!==B||t[40]!==$||t[41]!==Q||t[42]!==r||t[43]!==xt||t[44]!==W||t[45]!==z||t[46]!==ut||t[47]!==yt||t[48]!==Nt||t[49]!==Z||t[50]!==it||t[51]!==w||t[52]!==Vt||t[53]!==A||t[54]!==_||t[55]!==U||t[56]!==k||t[57]!==y||t[58]!==C||t[59]!==Tt?(M=i.jsxRuntimeExports.jsx(_i,{data:d,graphTitle:L,colors:qt,barPadding:Dt,showTicks:yt,leftMargin:et,rightMargin:xt,topMargin:k,bottomMargin:I,truncateBy:y,showLabels:z,showValues:Nt,backgroundColor:ct,suffix:Vt,prefix:B,sources:it,graphDescription:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,showColorScale:W,graphID:T,maxValue:a,minValue:s,highlightedDataPoints:o,onSeriesMouseClick:u,graphDownload:x,dataDownload:h,language:m,theme:A,sortData:Z,labelOrder:J,showNAColor:ut,minHeight:Ft,maxBarThickness:Ht,maxNumberOfBars:G,minBarThickness:bt,ariaLabel:zt,resetSelectionOnDoubleClick:r,styles:w,detailsOnClick:c,barAxisTitle:D,noOfTicks:p,valueColor:C,classNames:Mt,filterNA:vt,animate:nt,dimmedOpacity:pt,precision:R,customLayers:g,timeline:_,naLabel:tt,orientation:K}),t[0]=nt,t[1]=zt,t[2]=ct,t[3]=D,t[4]=Dt,t[5]=I,t[6]=Mt,t[7]=st,t[8]=Y,t[9]=qt,t[10]=g,t[11]=d,t[12]=h,t[13]=c,t[14]=pt,t[15]=vt,t[16]=j,t[17]=mt,t[18]=x,t[19]=T,t[20]=L,t[21]=dt,t[22]=o,t[23]=J,t[24]=m,t[25]=et,t[26]=Ht,t[27]=G,t[28]=a,t[29]=bt,t[30]=Ft,t[31]=s,t[32]=tt,t[33]=p,t[34]=u,t[35]=F,t[36]=K,t[37]=H,t[38]=R,t[39]=B,t[40]=$,t[41]=Q,t[42]=r,t[43]=xt,t[44]=W,t[45]=z,t[46]=ut,t[47]=yt,t[48]=Nt,t[49]=Z,t[50]=it,t[51]=w,t[52]=Vt,t[53]=A,t[54]=_,t[55]=U,t[56]=k,t[57]=y,t[58]=C,t[59]=Tt,t[60]=M):M=t[60],M}function Zs(e){const t=i.compilerRuntimeExports.c(57),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,padding:mt,backgroundColor:dt,leftMargin:Tt,rightMargin:j,topMargin:st,bottomMargin:Y,showLabels:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,graphID:W,maxValue:T,minValue:a,onSeriesMouseClick:s,graphDownload:o,dataDownload:u,language:x,labelOrder:h,minHeight:m,theme:A,sortParameter:Z,sortData:J,maxBarThickness:ut,ariaLabel:Ft,resetSelectionOnDoubleClick:Ht,detailsOnClick:G,barAxisTitle:bt,noOfTicks:zt,valueColor:r,orientation:c,styles:D,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,showColorScale:vt,timeline:nt,naLabel:pt}=e,R=c===void 0?"vertical":c;let g;return t[0]!==S||t[1]!==Ft||t[2]!==dt||t[3]!==bt||t[4]!==et||t[5]!==Y||t[6]!==p||t[7]!==Nt||t[8]!==ct||t[9]!==qt||t[10]!==Mt||t[11]!==d||t[12]!==u||t[13]!==G||t[14]!==C||t[15]!==z||t[16]!==yt||t[17]!==o||t[18]!==W||t[19]!==L||t[20]!==I||t[21]!==h||t[22]!==x||t[23]!==Tt||t[24]!==ut||t[25]!==T||t[26]!==m||t[27]!==a||t[28]!==pt||t[29]!==zt||t[30]!==s||t[31]!==F||t[32]!==R||t[33]!==mt||t[34]!==w||t[35]!==B||t[36]!==$||t[37]!==Q||t[38]!==Ht||t[39]!==j||t[40]!==vt||t[41]!==H||t[42]!==xt||t[43]!==it||t[44]!==J||t[45]!==Z||t[46]!==Dt||t[47]!==D||t[48]!==Vt||t[49]!==A||t[50]!==nt||t[51]!==U||t[52]!==st||t[53]!==k||t[54]!==r||t[55]!==y?(g=i.jsxRuntimeExports.jsx(ci,{orientation:R,data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,truncateBy:k,height:I,width:y,footNote:z,colorDomain:Nt,colorLegendTitle:ct,suffix:Vt,prefix:B,showValues:it,padding:mt,backgroundColor:dt,leftMargin:Tt,rightMargin:j,sortParameter:Z,sortData:J,topMargin:st,bottomMargin:Y,showLabels:H,relativeHeight:Q,tooltip:U,onSeriesMouseOver:F,refValues:$,graphID:W,maxValue:T,minValue:a,onSeriesMouseClick:s,graphDownload:o,dataDownload:u,language:x,labelOrder:h,minHeight:m,theme:A,maxBarThickness:ut,ariaLabel:Ft,resetSelectionOnDoubleClick:Ht,styles:D,detailsOnClick:G,barAxisTitle:bt,noOfTicks:zt,valueColor:r,classNames:p,filterNA:C,animate:S,precision:w,customLayers:Mt,showColorScale:vt,timeline:nt,naLabel:pt}),t[0]=S,t[1]=Ft,t[2]=dt,t[3]=bt,t[4]=et,t[5]=Y,t[6]=p,t[7]=Nt,t[8]=ct,t[9]=qt,t[10]=Mt,t[11]=d,t[12]=u,t[13]=G,t[14]=C,t[15]=z,t[16]=yt,t[17]=o,t[18]=W,t[19]=L,t[20]=I,t[21]=h,t[22]=x,t[23]=Tt,t[24]=ut,t[25]=T,t[26]=m,t[27]=a,t[28]=pt,t[29]=zt,t[30]=s,t[31]=F,t[32]=R,t[33]=mt,t[34]=w,t[35]=B,t[36]=$,t[37]=Q,t[38]=Ht,t[39]=j,t[40]=vt,t[41]=H,t[42]=xt,t[43]=it,t[44]=J,t[45]=Z,t[46]=Dt,t[47]=D,t[48]=Vt,t[49]=A,t[50]=nt,t[51]=U,t[52]=st,t[53]=k,t[54]=r,t[55]=y,t[56]=g):g=t[56],g}function _s(e){const t=i.compilerRuntimeExports.c(58),{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,leftMargin:k,rightMargin:I,topMargin:y,bottomMargin:z,truncateBy:Nt,showLabels:ct,showValues:Vt,backgroundColor:B,suffix:it,prefix:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,tooltip:Q,onSeriesMouseOver:U,relativeHeight:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,theme:x,labelOrder:h,minHeight:m,maxBarThickness:A,sortParameter:Z,sortData:J,maxNumberOfBars:ut,minBarThickness:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,orientation:D,styles:p,classNames:C,filterNA:S,animate:w,precision:Mt,customLayers:vt,showColorScale:nt,timeline:pt,naLabel:R}=e,g=D===void 0?"vertical":D;let _;return t[0]!==w||t[1]!==Ht||t[2]!==B||t[3]!==zt||t[4]!==et||t[5]!==z||t[6]!==C||t[7]!==st||t[8]!==Y||t[9]!==qt||t[10]!==vt||t[11]!==d||t[12]!==o||t[13]!==bt||t[14]!==S||t[15]!==j||t[16]!==yt||t[17]!==s||t[18]!==W||t[19]!==L||t[20]!==dt||t[21]!==h||t[22]!==u||t[23]!==k||t[24]!==A||t[25]!==ut||t[26]!==T||t[27]!==Ft||t[28]!==m||t[29]!==R||t[30]!==r||t[31]!==a||t[32]!==U||t[33]!==g||t[34]!==H||t[35]!==Mt||t[36]!==mt||t[37]!==$||t[38]!==F||t[39]!==G||t[40]!==I||t[41]!==nt||t[42]!==ct||t[43]!==xt||t[44]!==Vt||t[45]!==J||t[46]!==Z||t[47]!==Dt||t[48]!==p||t[49]!==it||t[50]!==x||t[51]!==pt||t[52]!==Q||t[53]!==y||t[54]!==Nt||t[55]!==c||t[56]!==Tt?(_=i.jsxRuntimeExports.jsx(Ds,{data:d,graphTitle:L,colors:qt,sources:Dt,graphDescription:yt,barPadding:et,showTicks:xt,leftMargin:k,rightMargin:I,topMargin:y,bottomMargin:z,truncateBy:Nt,showLabels:ct,showValues:Vt,backgroundColor:B,suffix:it,prefix:mt,height:dt,width:Tt,footNote:j,colorDomain:st,colorLegendTitle:Y,padding:H,tooltip:Q,onSeriesMouseOver:U,relativeHeight:F,refValues:$,graphID:W,maxValue:T,onSeriesMouseClick:a,graphDownload:s,dataDownload:o,language:u,theme:x,labelOrder:h,minHeight:m,maxBarThickness:A,sortParameter:Z,sortData:J,maxNumberOfBars:ut,minBarThickness:Ft,ariaLabel:Ht,resetSelectionOnDoubleClick:G,styles:p,detailsOnClick:bt,barAxisTitle:zt,noOfTicks:r,valueColor:c,classNames:C,filterNA:S,animate:w,precision:Mt,customLayers:vt,showColorScale:nt,timeline:pt,naLabel:R,orientation:g}),t[0]=w,t[1]=Ht,t[2]=B,t[3]=zt,t[4]=et,t[5]=z,t[6]=C,t[7]=st,t[8]=Y,t[9]=qt,t[10]=vt,t[11]=d,t[12]=o,t[13]=bt,t[14]=S,t[15]=j,t[16]=yt,t[17]=s,t[18]=W,t[19]=L,t[20]=dt,t[21]=h,t[22]=u,t[23]=k,t[24]=A,t[25]=ut,t[26]=T,t[27]=Ft,t[28]=m,t[29]=R,t[30]=r,t[31]=a,t[32]=U,t[33]=g,t[34]=H,t[35]=Mt,t[36]=mt,t[37]=$,t[38]=F,t[39]=G,t[40]=I,t[41]=nt,t[42]=ct,t[43]=xt,t[44]=Vt,t[45]=J,t[46]=Z,t[47]=Dt,t[48]=p,t[49]=it,t[50]=x,t[51]=pt,t[52]=Q,t[53]=y,t[54]=Nt,t[55]=c,t[56]=Tt,t[57]=_):_=t[57],_}exports.GroupedBarGraph=Zs;exports.SimpleBarGraph=Qs;exports.StackedBarGraph=_s;
2
2
  //# sourceMappingURL=BarGraph.cjs.map