@undp/data-viz 2.2.1 → 2.2.3

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 (101) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +1 -1
  3. package/dist/Axis-D56Gy0se.js +31 -0
  4. package/dist/Axis-D56Gy0se.js.map +1 -0
  5. package/dist/Axis-Jt_tmhxS.cjs +2 -0
  6. package/dist/Axis-Jt_tmhxS.cjs.map +1 -0
  7. package/dist/BarGraph.cjs +1 -1
  8. package/dist/BarGraph.cjs.map +1 -1
  9. package/dist/BarGraph.d.ts +6 -0
  10. package/dist/BarGraph.js +1759 -1750
  11. package/dist/BarGraph.js.map +1 -1
  12. package/dist/BeeSwarmChart.cjs +1 -1
  13. package/dist/BeeSwarmChart.cjs.map +1 -1
  14. package/dist/BeeSwarmChart.d.ts +2 -0
  15. package/dist/BeeSwarmChart.js +270 -267
  16. package/dist/BeeSwarmChart.js.map +1 -1
  17. package/dist/BiVariateChoroplethMap.cjs +1 -1
  18. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  19. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  20. package/dist/BiVariateChoroplethMap.js +264 -250
  21. package/dist/BiVariateChoroplethMap.js.map +1 -1
  22. package/dist/BulletChart.cjs +1 -1
  23. package/dist/BulletChart.cjs.map +1 -1
  24. package/dist/BulletChart.d.ts +2 -0
  25. package/dist/BulletChart.js +544 -542
  26. package/dist/BulletChart.js.map +1 -1
  27. package/dist/ButterflyChart.cjs +1 -1
  28. package/dist/ButterflyChart.cjs.map +1 -1
  29. package/dist/ButterflyChart.d.ts +2 -0
  30. package/dist/ButterflyChart.js +332 -330
  31. package/dist/ButterflyChart.js.map +1 -1
  32. package/dist/ChoroplethMap.cjs +1 -1
  33. package/dist/ChoroplethMap.cjs.map +1 -1
  34. package/dist/ChoroplethMap.d.ts +2 -0
  35. package/dist/ChoroplethMap.js +272 -258
  36. package/dist/ChoroplethMap.js.map +1 -1
  37. package/dist/DifferenceLineChart.cjs +1 -1
  38. package/dist/DifferenceLineChart.js +1 -1
  39. package/dist/DualAxisLineChart.cjs +1 -1
  40. package/dist/DualAxisLineChart.js +1 -1
  41. package/dist/DumbbellChart.cjs +1 -1
  42. package/dist/DumbbellChart.cjs.map +1 -1
  43. package/dist/DumbbellChart.d.ts +2 -0
  44. package/dist/DumbbellChart.js +537 -536
  45. package/dist/DumbbellChart.js.map +1 -1
  46. package/dist/GraphEl-BZbunD1_.cjs +2 -0
  47. package/dist/GraphEl-BZbunD1_.cjs.map +1 -0
  48. package/dist/{GraphEl-DKrjuQNB.js → GraphEl-C1Rz1V__.js} +68 -57
  49. package/dist/GraphEl-C1Rz1V__.js.map +1 -0
  50. package/dist/GriddedGraphs.cjs +1 -1
  51. package/dist/GriddedGraphs.d.ts +2 -0
  52. package/dist/GriddedGraphs.js +1 -1
  53. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  54. package/dist/Histogram.cjs +1 -1
  55. package/dist/Histogram.cjs.map +1 -1
  56. package/dist/Histogram.d.ts +2 -0
  57. package/dist/Histogram.js +50 -49
  58. package/dist/Histogram.js.map +1 -1
  59. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  60. package/dist/LineChartWithConfidenceInterval.js +1 -1
  61. package/dist/MultiGraphDashboard.d.ts +2 -0
  62. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  63. package/dist/MultiLineAltChart.cjs +1 -1
  64. package/dist/MultiLineAltChart.js +1 -1
  65. package/dist/MultiLineChart.cjs +1 -1
  66. package/dist/MultiLineChart.js +1 -1
  67. package/dist/ParetoChart.cjs +1 -1
  68. package/dist/ParetoChart.js +1 -1
  69. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  70. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  71. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  72. package/dist/ScatterPlot.cjs +1 -1
  73. package/dist/ScatterPlot.js +1 -1
  74. package/dist/ScrollStory.d.ts +2 -0
  75. package/dist/SimpleLineChart.cjs +1 -1
  76. package/dist/SimpleLineChart.js +1 -1
  77. package/dist/SingleGraphDashboard.cjs +1 -1
  78. package/dist/SingleGraphDashboard.d.ts +2 -0
  79. package/dist/SingleGraphDashboard.js +1 -1
  80. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  81. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  82. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  83. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  84. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  85. package/dist/SlopeChart.cjs +1 -1
  86. package/dist/SlopeChart.js +1 -1
  87. package/dist/Types.d.ts +2 -0
  88. package/dist/WaterfallChart.cjs +1 -1
  89. package/dist/WaterfallChart.cjs.map +1 -1
  90. package/dist/WaterfallChart.d.ts +2 -0
  91. package/dist/WaterfallChart.js +263 -261
  92. package/dist/WaterfallChart.js.map +1 -1
  93. package/dist/index.d.ts +24 -0
  94. package/package.json +1 -1
  95. package/dist/Axis-DoOqnt6g.js +0 -32
  96. package/dist/Axis-DoOqnt6g.js.map +0 -1
  97. package/dist/Axis-Dtjn-EgM.cjs +0 -2
  98. package/dist/Axis-Dtjn-EgM.cjs.map +0 -1
  99. package/dist/GraphEl-CBZdcvb7.cjs +0 -2
  100. package/dist/GraphEl-CBZdcvb7.cjs.map +0 -1
  101. package/dist/GraphEl-DKrjuQNB.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),b=require("react"),Ft=require("./parse-xYI9yrvL.cjs"),be=require("./index-Cno4Q0YE.cjs"),xe=require("./numberFormattingFunction-02t-wJta.cjs"),ke=require("./Tooltip-BLa2EfMs.cjs"),q=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./XTicksAndGridLines-CekrPykD.cjs"),ge=require("./Axis-Dtjn-EgM.cjs"),Ae=require("./AxisTitle-DV4n0RxE.cjs"),Oe=require("./index-D69M6klB.cjs"),Le=require("./time-CkcKbhwe.cjs"),we=require("./linear-CgUCbw9F.cjs"),ve=require("./line-DaEMhXmx.cjs"),me=require("./step-BZ3C8QFW.cjs"),Ie=require("./select-Bnfk0lJx.cjs"),mt=require("./proxy-C4-uo6nS.cjs"),Se=require("./init-DU0ybBc_.cjs"),De=require("./pointer-Dkq5NV1q.cjs"),qe=require("./use-in-view-C3o_ntMv.cjs"),Me=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),Ce=require("./ColorLegend.cjs"),Ee=require("./Colors.cjs"),Ve=require("./EmptyState-CGeBqbmR.cjs"),Re=require("./GraphContainer-B1EDxJ0S.cjs"),$e=require("./getNoOfTicks-C_1CFXv_.cjs");function Fe(e){const t=n.compilerRuntimeExports.c(117),{data:v,width:K,height:Q,lineColors:o,labels:j,sameAxes:A,dateFormat:f,showValues:Rt,noOfXTicks:Kt,rightMargin:Qt,leftMargin:Pt,topMargin:Z,bottomMargin:bt,tooltip:ft,highlightAreaSettings:kt,onSeriesMouseOver:Nt,animate:s,strokeWidth:G,showDots:M,noOfYTicks:pt,lineSuffixes:H,linePrefixes:_,minDate:dt,maxDate:Ot,curveType:tt,styles:a,classNames:c,precision:et,customLayers:U,showAxisLabels:W}=e,Gt=b.useRef(null);let ht;t[0]!==s.amount||t[1]!==s.once?(ht={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ht):ht=t[2];const d=qe.useInView(Gt,ht),[y,Ht]=b.useState(!1);let yt,it;t[3]!==s.duration||t[4]!==y||t[5]!==d?(yt=()=>{if(d&&!y){const i=setTimeout(()=>{Ht(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},it=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=yt,t[7]=it):(yt=t[6],it=t[7]),b.useEffect(yt,it);const Ut=tt==="linear"?ve.curveLinear:tt==="step"?me.curveStep:tt==="stepAfter"?me.stepAfter:tt==="stepBefore"?me.stepBefore:me.monotoneX,[N,Lt]=b.useState(void 0),[gt,p]=b.useState(void 0),[u,Wt]=b.useState(void 0),nt=Pt+50,It=Qt+65;let st;t[8]!==bt||t[9]!==nt||t[10]!==It||t[11]!==Z?(st={top:Z,bottom:bt,left:nt,right:It},t[8]=bt,t[9]=nt,t[10]=It,t[11]=Z,t[12]=st):st=t[12];const h=st,X=b.useRef(null);let O;t[13]!==f?(O=i=>({...i,date:Ft.parse(`${i.date}`,f,new Date)}),t[13]=f,t[14]=O):O=t[14];const r=be.orderBy(v.map(O),["date"],["asc"]);let ot;if(t[15]!==f||t[16]!==kt){let i;t[18]!==f?(i=R=>({...R,coordinates:[R.coordinates[0]===null?null:Ft.parse(`${R.coordinates[0]}`,f,new Date),R.coordinates[1]===null?null:Ft.parse(`${R.coordinates[1]}`,f,new Date)]}),t[18]=f,t[19]=i):i=t[19],ot=kt.map(i),t[15]=f,t[16]=kt,t[17]=ot}else ot=t[17];const vt=ot,x=K-h.left-h.right,l=Q-h.top-h.bottom,Xt=dt?Ft.parse(`${dt}`,f,new Date):r[0].date,St=Ot?Ft.parse(`${Ot}`,f,new Date):r[r.length-1].date,jt=Math.min(...r.map(yi).filter(hi))!==1/0?Math.min(...r.map(di).filter(pi))>0?0:Math.min(...r.map(fi).filter(mi)):0,rt=Math.min(...r.map(xi).filter(ui))!==1/0?Math.min(...r.map(ci).filter(ai))>0?0:Math.min(...r.map(li).filter(ri)):0,lt=Math.max(...r.map(oi).filter(si))!==1/0?Math.max(...r.map(ni).filter(ii)):0,Y=Math.max(...r.map(ei).filter(ti))!==1/0?Math.max(...r.map(_e).filter(Ze)):0,Dt=jt<rt?jt:rt,B=lt>Y?lt:Y,m=Le.time().domain([Xt,St]).range([0,x]),k=we.linear().domain([A?Dt:jt,A?B>0?B:0:lt>0?lt:0]).range([l,0]).nice(),g=we.linear().domain([A?Dt:rt,A?B>0?B:0:Y>0?Y:0]).range([l,0]).nice(),qt=ve.line().defined(Qe).x(i=>m(i.date)).y(i=>k(i.y1)).curve(Ut),At=ve.line().defined(Ke).x(i=>m(i.date)).y(i=>g(i.y2)).curve(Ut),Yt=k.ticks(pt),Bt=g.ticks(pt),Mt=m.ticks(Kt);b.useEffect(()=>{const i=ye=>{const je=r[Se.bisectCenter(r.map(Je),m.invert(De.pointer(ye)[0]),0)];Lt(je||r[r.length-1]),Nt?.(je||r[r.length-1]),Wt(ye.clientY),p(ye.clientX)},R=()=>{Lt(void 0),p(void 0),Wt(void 0),Nt?.(void 0)};Ie.select(X.current).on("mousemove",i).on("mouseout",R)},[m,r,Nt]);let at;t[20]!==s||t[21]!==l||t[22]!==x||t[23]!==vt||t[24]!==d||t[25]!==m?(at=n.jsxRuntimeExports.jsx(Oe.HighlightArea,{areaSettings:vt,width:x,height:l,scale:m,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=x,t[23]=vt,t[24]=d,t[25]=m,t[26]=at):at=t[26];const wt=c?.xAxis?.axis;let T;t[27]!==wt?(T={axis:wt},t[27]=wt,t[28]=T):T=t[28];let L;t[29]!==a?.xAxis?.axis?(L=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=L):L=t[30];let C;t[31]!==o[0]||t[32]!==L?(C={axis:{stroke:o[0],...L}},t[31]=o[0],t[32]=L,t[33]=C):C=t[33];let ct;t[34]!==l||t[35]!==T||t[36]!==C?(ct=n.jsxRuntimeExports.jsx(ge.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:T,styles:C}),t[34]=l,t[35]=T,t[36]=C,t[37]=ct):ct=t[37];let V;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==j||t[41]!==o[0]||t[42]!==h.left||t[43]!==W||t[44]!==a?.yAxis?.title?(V=W?n.jsxRuntimeExports.jsx(Ae.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[0].length>100?`${j[0].substring(0,100)}...`:j[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=j,t[41]=o[0],t[42]=h.left,t[43]=W,t[44]=a?.yAxis?.title,t[45]=V):V=t[45];const zt=x+15,ut=x+15,Jt=c?.xAxis?.axis;let $;t[46]!==Jt?($={axis:Jt},t[46]=Jt,t[47]=$):$=t[47];let z;t[48]!==a?.xAxis?.axis?(z=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=z):z=t[49];let I;t[50]!==o[1]||t[51]!==z?(I={axis:{stroke:o[1],...z}},t[50]=o[1],t[51]=z,t[52]=I):I=t[52];let J;t[53]!==l||t[54]!==zt||t[55]!==ut||t[56]!==$||t[57]!==I?(J=n.jsxRuntimeExports.jsx(ge.Axis,{y1:0,y2:l,x1:zt,x2:ut,classNames:$,styles:I}),t[53]=l,t[54]=zt,t[55]=ut,t[56]=$,t[57]=I,t[58]=J):J=t[58];let xt;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==x||t[62]!==j||t[63]!==o[1]||t[64]!==h.right||t[65]!==W||t[66]!==a?.yAxis?.title?(xt=W?n.jsxRuntimeExports.jsx(Ae.AxisTitle,{x:x+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[1].length>100?`${j[1].substring(0,100)}...`:j[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=x,t[62]=j,t[63]=o[1],t[64]=h.right,t[65]=W,t[66]=a?.yAxis?.title,t[67]=xt):xt=t[67];const Et=x+15,F=c?.xAxis?.axis;let w;t[68]!==F?(w={axis:F},t[68]=F,t[69]=w):w=t[69];const P=a?.xAxis?.axis;let E;t[70]!==P?(E={axis:P},t[70]=P,t[71]=E):E=t[71];let S;t[72]!==l||t[73]!==Et||t[74]!==w||t[75]!==E?(S=n.jsxRuntimeExports.jsx(ge.Axis,{y1:l,y2:l,x1:-15,x2:Et,classNames:w,styles:E}),t[72]=l,t[73]=Et,t[74]=w,t[75]=E,t[76]=S):S=t[76];let D;t[77]!==f?(D=i=>Ft.format(i,f),t[77]=f,t[78]=D):D=t[78];const Tt=Mt.map(D),Zt=Mt.map(i=>m(i)),Ct=a?.xAxis?.gridLines,fe=a?.xAxis?.labels;let _t;t[79]!==Ct||t[80]!==fe?(_t={gridLines:Ct,labels:fe},t[79]=Ct,t[80]=fe,t[81]=_t):_t=t[81];const pe=c?.xAxis?.gridLines;let Vt;t[82]!==pe?(Vt=n.mo("opacity-0",pe),t[82]=pe,t[83]=Vt):Vt=t[83];const de=c?.xAxis?.labels;let $t;t[84]!==de?($t=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",de),t[84]=de,t[85]=$t):$t=t[85];let te;t[86]!==Vt||t[87]!==$t?(te={gridLines:Vt,labels:$t},t[86]=Vt,t[87]=$t,t[88]=te):te=t[88];let ee;t[89]!==U?(ee=U.filter(ze).map(Be),t[89]=U,t[90]=ee):ee=t[90];let ie;t[91]!==o[0]||t[92]!==G?(ie={stroke:o[0],strokeWidth:G,fill:"none"},t[91]=o[0],t[92]=G,t[93]=ie):ie=t[93];let ne;t[94]!==s.duration?(ne={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=ne):ne=t[95];let se;t[96]!==o[1]||t[97]!==G?(se={stroke:o[1],strokeWidth:G,fill:"none"},t[96]=o[1],t[97]=G,t[98]=se):se=t[98];let oe;t[99]!==s.duration?(oe={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=oe):oe=t[100];const he=r.map((i,R)=>n.jsxRuntimeExports.jsxs(mt.motion.g,{children:[q.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M?n.jsxRuntimeExports.jsx(mt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:k(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:m(i.date),cy:k(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(mt.motion.text,{dy:q.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:m(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:xe.numberFormattingFunction(i.y1,"NA",et,_[0],H[0])}):null]}),q.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M?n.jsxRuntimeExports.jsx(mt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:m(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(mt.motion.text,{dy:q.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:m(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:xe.numberFormattingFunction(i.y2,"NA",et,_[1],H[1])}):null]})]},R));let re;t[101]!==he?(re=n.jsxRuntimeExports.jsx("g",{children:he}),t[101]=he,t[102]=re):re=t[102];let le;t[103]!==U?(le=U.filter(Ge).map(Pe),t[103]=U,t[104]=le):le=t[104];let ae;t[105]===Symbol.for("react.memo_cache_sentinel")?(ae={fill:"none",pointerEvents:"all"},t[105]=ae):ae=t[105];let ce;t[106]!==X||t[107]!==l||t[108]!==x?(ce=n.jsxRuntimeExports.jsx("rect",{ref:X,style:ae,width:x,height:l}),t[106]=X,t[107]=l,t[108]=x,t[109]=ce):ce=t[109];let ue;return t[110]!==c?.tooltip||t[111]!==gt||t[112]!==u||t[113]!==N||t[114]!==a?.tooltip||t[115]!==ft?(ue=N&&ft&&gt&&u?n.jsxRuntimeExports.jsx(ke.Tooltip,{data:N,body:ft,xPos:gt,yPos:u,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=gt,t[112]=u,t[113]=N,t[114]=a?.tooltip,t[115]=ft,t[116]=ue):ue=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(mt.motion.svg,{width:`${K}px`,height:`${Q}px`,viewBox:`0 0 ${K} ${Q}`,direction:"ltr",ref:Gt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[at,n.jsxRuntimeExports.jsxs("g",{children:[Yt.map((i,R)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:k(i),y2:k(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:k(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:xe.numberFormattingFunction(i,"NA",et,_[0],H[0])})]},R)),ct,V]}),n.jsxRuntimeExports.jsxs("g",{children:[Bt.map((i,R)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:x+15,x2:x+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:x+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:xe.numberFormattingFunction(i,"NA",et,_[1],H[1])})]},R)),J,xt]}),n.jsxRuntimeExports.jsxs("g",{children:[S,n.jsxRuntimeExports.jsx(Ne.XTicksAndGridLines,{values:Tt,x:Zt,y1:0,y2:l,styles:_t,classNames:te,labelType:"primary",showGridLines:!0,precision:et})]}),ee,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(mt.motion.path,{style:ie,exit:ne,variants:{initial:{pathLength:0,d:qt(r.filter(Ye))||"",opacity:1},whileInView:{pathLength:1,d:qt(r.filter(Xe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(mt.motion.path,{d:At(r.filter(We))||"",style:se,exit:oe,variants:{initial:{pathLength:0,d:At(r.filter(Ue))||"",opacity:1},whileInView:{pathLength:1,d:At(r.filter(He))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),N?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:m(N.date),x2:m(N.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),re,le,ce]})}),ue]})}function Pe(e){return e.layer}function Ge(e){return e.position==="after"}function He(e){return!q.checkIfNullOrUndefined(e.y2)}function Ue(e){return!q.checkIfNullOrUndefined(e.y2)}function We(e){return!q.checkIfNullOrUndefined(e.y2)}function Xe(e){return!q.checkIfNullOrUndefined(e.y1)}function Ye(e){return!q.checkIfNullOrUndefined(e.y1)}function Be(e){return e.layer}function ze(e){return e.position==="before"}function Je(e){return e.date}function Ke(e){return!q.checkIfNullOrUndefined(e.y2)}function Qe(e){return!q.checkIfNullOrUndefined(e.y1)}function Ze(e){return e!=null}function _e(e){return e.y2}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y1}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y2}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function fi(e){return e.y1}function pi(e){return e!=null}function di(e){return e.y2}function hi(e){return e!=null}function yi(e){return e.y1}function gi(e){const t=n.compilerRuntimeExports.c(90),{data:v,graphTitle:K,sources:Q,graphDescription:o,height:j,width:A,footNote:f,noOfXTicks:Rt,dateFormat:Kt,showValues:Qt,padding:Pt,lineColors:Z,sameAxes:bt,backgroundColor:ft,leftMargin:kt,rightMargin:Nt,topMargin:s,bottomMargin:G,labels:M,lineSuffixes:pt,linePrefixes:H,tooltip:_,highlightAreaSettings:dt,relativeHeight:Ot,onSeriesMouseOver:tt,graphID:a,graphDownload:c,dataDownload:et,animate:U,strokeWidth:W,showDots:Gt,language:ht,showColorScale:d,minHeight:y,colorLegendTitle:Ht,theme:yt,ariaLabel:it,noOfYTicks:Ut,maxDate:N,minDate:Lt,curveType:gt,styles:p,classNames:u,precision:Wt,customLayers:nt,showAxisLabels:It}=e,st=Kt===void 0?"yyyy":Kt,h=Qt===void 0?!1:Qt;let X;t[0]!==Z?(X=Z===void 0?[Ee.Colors.light.categoricalColors.colors[0],Ee.Colors.light.categoricalColors.colors[1]]:Z,t[0]=Z,t[1]=X):X=t[1];const O=X,r=bt===void 0?!1:bt,ot=ft===void 0?!1:ft,vt=kt===void 0?80:kt,x=Nt===void 0?80:Nt,l=s===void 0?20:s,Xt=G===void 0?25:G;let St;t[2]!==pt?(St=pt===void 0?["",""]:pt,t[2]=pt,t[3]=St):St=t[3];const jt=St;let rt;t[4]!==H?(rt=H===void 0?["",""]:H,t[4]=H,t[5]=rt):rt=t[5];const lt=rt;let Y;t[6]!==dt?(Y=dt===void 0?[]:dt,t[6]=dt,t[7]=Y):Y=t[7];const Dt=Y,B=c===void 0?!1:c,m=et===void 0?!1:et,k=U===void 0?!1:U,g=W===void 0?2:W,qt=Gt===void 0?!0:Gt,At=ht===void 0?"en":ht,Yt=d===void 0?!0:d,Bt=y===void 0?0:y,Mt=yt===void 0?"light":yt,at=Ut===void 0?5:Ut,wt=gt===void 0?"curve":gt,T=Wt===void 0?2:Wt;let L;t[8]!==nt?(L=nt===void 0?[]:nt,t[8]=nt,t[9]=L):L=t[9];const C=L,ct=It===void 0?!0:It,[V,zt]=b.useState(0),[ut,Jt]=b.useState(0),$=b.useRef(null),z=b.useRef(null);let I,J;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{const Zt=new ResizeObserver(Ct=>{zt(Ct[0].target.clientWidth||620),Jt(Ct[0].target.clientHeight||480)});return $.current&&Zt.observe($.current),()=>Zt.disconnect()},J=[],t[10]=I,t[11]=J):(I=t[10],J=t[11]),b.useEffect(I,J);const xt=u?.graphContainer,Et=p?.graphContainer;let F;t[12]!==u?.description||t[13]!==u?.title||t[14]!==v||t[15]!==m||t[16]!==o||t[17]!==B||t[18]!==K||t[19]!==p?.description||t[20]!==p?.title||t[21]!==A?(F=K||o||B||m?n.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:u?.title,description:u?.description},graphTitle:K,graphDescription:o,width:A,graphDownload:B?z:void 0,dataDownload:m?v.map(Ei).filter(wi).length>0?v.map(Ai).filter(ji):v.filter(vi):null}):null,t[12]=u?.description,t[13]=u?.title,t[14]=v,t[15]=m,t[16]=o,t[17]=B,t[18]=K,t[19]=p?.description,t[20]=p?.title,t[21]=A,t[22]=F):F=t[22];let w;t[23]!==u?.colorLegend||t[24]!==Ht||t[25]!==M||t[26]!==O||t[27]!==Yt?(w=Yt&&M.length>0?n.jsxRuntimeExports.jsx(Ce.ColorLegend,{colorDomain:M,colorLegendTitle:Ht,colors:O,showNAColor:!1,className:u?.colorLegend}):null,t[23]=u?.colorLegend,t[24]=Ht,t[25]=M,t[26]=O,t[27]=Yt,t[28]=w):w=t[28];let P;t[29]!==v.length?(P=v.length===0&&n.jsxRuntimeExports.jsx(Ve.EmptyState,{}),t[29]=v.length,t[30]=P):P=t[30];let E;t[31]!==k||t[32]!==Xt||t[33]!==u||t[34]!==wt||t[35]!==C||t[36]!==v||t[37]!==st||t[38]!==Dt||t[39]!==M||t[40]!==vt||t[41]!==O||t[42]!==lt||t[43]!==jt||t[44]!==N||t[45]!==Lt||t[46]!==Rt||t[47]!==at||t[48]!==tt||t[49]!==T||t[50]!==x||t[51]!==r||t[52]!==ct||t[53]!==qt||t[54]!==h||t[55]!==g||t[56]!==p||t[57]!==ut||t[58]!==V||t[59]!==_||t[60]!==l?(E=V&&ut&&v.length>0?n.jsxRuntimeExports.jsx(Fe,{data:v,sameAxes:r,lineColors:O,width:V,height:ut,dateFormat:st,showValues:h,noOfXTicks:Rt??$e.getNoOfTicks(V),leftMargin:vt,rightMargin:x,topMargin:l,bottomMargin:Xt,labels:M,highlightAreaSettings:Dt,tooltip:_,onSeriesMouseOver:tt,animate:k===!0?{duration:.5,once:!0,amount:.5}:k||{duration:0,once:!0,amount:0},strokeWidth:g,showDots:qt,noOfYTicks:at,lineSuffixes:jt,linePrefixes:lt,minDate:Lt,maxDate:N,curveType:wt,styles:p,classNames:u,precision:T,customLayers:C,showAxisLabels:ct}):null,t[31]=k,t[32]=Xt,t[33]=u,t[34]=wt,t[35]=C,t[36]=v,t[37]=st,t[38]=Dt,t[39]=M,t[40]=vt,t[41]=O,t[42]=lt,t[43]=jt,t[44]=N,t[45]=Lt,t[46]=Rt,t[47]=at,t[48]=tt,t[49]=T,t[50]=x,t[51]=r,t[52]=ct,t[53]=qt,t[54]=h,t[55]=g,t[56]=p,t[57]=ut,t[58]=V,t[59]=_,t[60]=l,t[61]=E):E=t[61];let S;t[62]!==P||t[63]!==E?(S=n.jsxRuntimeExports.jsxs(Re.GraphArea,{ref:$,children:[P,E]}),t[62]=P,t[63]=E,t[64]=S):S=t[64];let D;t[65]!==u?.footnote||t[66]!==u?.source||t[67]!==f||t[68]!==Q||t[69]!==p?.footnote||t[70]!==p?.source||t[71]!==A?(D=Q||f?n.jsxRuntimeExports.jsx(Me.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:Q,footNote:f,width:A}):null,t[65]=u?.footnote,t[66]=u?.source,t[67]=f,t[68]=Q,t[69]=p?.footnote,t[70]=p?.source,t[71]=A,t[72]=D):D=t[72];let Tt;return t[73]!==it||t[74]!==ot||t[75]!==a||t[76]!==j||t[77]!==At||t[78]!==Bt||t[79]!==Pt||t[80]!==Ot||t[81]!==xt||t[82]!==Et||t[83]!==F||t[84]!==w||t[85]!==S||t[86]!==D||t[87]!==Mt||t[88]!==A?(Tt=n.jsxRuntimeExports.jsxs(Re.GraphContainer,{className:xt,style:Et,id:a,ref:z,"aria-label":it,backgroundColor:ot,theme:Mt,language:At,minHeight:Bt,width:A,height:j,relativeHeight:Ot,padding:Pt,children:[F,w,S,D]}),t[73]=it,t[74]=ot,t[75]=a,t[76]=j,t[77]=At,t[78]=Bt,t[79]=Pt,t[80]=Ot,t[81]=xt,t[82]=Et,t[83]=F,t[84]=w,t[85]=S,t[86]=D,t[87]=Mt,t[88]=A,t[89]=Tt):Tt=t[89],Tt}function vi(e){return e!==void 0}function ji(e){return e!==void 0}function Ai(e){return e.data}function wi(e){return e!==void 0}function Ei(e){return e.data}exports.DualAxisLineChart=gi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),b=require("react"),Ft=require("./parse-xYI9yrvL.cjs"),be=require("./index-Cno4Q0YE.cjs"),xe=require("./numberFormattingFunction-02t-wJta.cjs"),ke=require("./Tooltip-BLa2EfMs.cjs"),q=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./XTicksAndGridLines-CekrPykD.cjs"),ge=require("./Axis-Jt_tmhxS.cjs"),Ae=require("./AxisTitle-DV4n0RxE.cjs"),Oe=require("./index-D69M6klB.cjs"),Le=require("./time-CkcKbhwe.cjs"),we=require("./linear-CgUCbw9F.cjs"),ve=require("./line-DaEMhXmx.cjs"),me=require("./step-BZ3C8QFW.cjs"),Ie=require("./select-Bnfk0lJx.cjs"),mt=require("./proxy-C4-uo6nS.cjs"),Se=require("./init-DU0ybBc_.cjs"),De=require("./pointer-Dkq5NV1q.cjs"),qe=require("./use-in-view-C3o_ntMv.cjs"),Me=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),Ce=require("./ColorLegend.cjs"),Ee=require("./Colors.cjs"),Ve=require("./EmptyState-CGeBqbmR.cjs"),Re=require("./GraphContainer-B1EDxJ0S.cjs"),$e=require("./getNoOfTicks-C_1CFXv_.cjs");function Fe(e){const t=n.compilerRuntimeExports.c(117),{data:v,width:K,height:Q,lineColors:o,labels:j,sameAxes:A,dateFormat:f,showValues:Rt,noOfXTicks:Kt,rightMargin:Qt,leftMargin:Pt,topMargin:Z,bottomMargin:bt,tooltip:ft,highlightAreaSettings:kt,onSeriesMouseOver:Nt,animate:s,strokeWidth:G,showDots:M,noOfYTicks:pt,lineSuffixes:H,linePrefixes:_,minDate:dt,maxDate:Ot,curveType:tt,styles:a,classNames:c,precision:et,customLayers:U,showAxisLabels:W}=e,Gt=b.useRef(null);let ht;t[0]!==s.amount||t[1]!==s.once?(ht={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ht):ht=t[2];const d=qe.useInView(Gt,ht),[y,Ht]=b.useState(!1);let yt,it;t[3]!==s.duration||t[4]!==y||t[5]!==d?(yt=()=>{if(d&&!y){const i=setTimeout(()=>{Ht(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},it=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=yt,t[7]=it):(yt=t[6],it=t[7]),b.useEffect(yt,it);const Ut=tt==="linear"?ve.curveLinear:tt==="step"?me.curveStep:tt==="stepAfter"?me.stepAfter:tt==="stepBefore"?me.stepBefore:me.monotoneX,[N,Lt]=b.useState(void 0),[gt,p]=b.useState(void 0),[u,Wt]=b.useState(void 0),nt=Pt+50,It=Qt+65;let st;t[8]!==bt||t[9]!==nt||t[10]!==It||t[11]!==Z?(st={top:Z,bottom:bt,left:nt,right:It},t[8]=bt,t[9]=nt,t[10]=It,t[11]=Z,t[12]=st):st=t[12];const h=st,X=b.useRef(null);let O;t[13]!==f?(O=i=>({...i,date:Ft.parse(`${i.date}`,f,new Date)}),t[13]=f,t[14]=O):O=t[14];const r=be.orderBy(v.map(O),["date"],["asc"]);let ot;if(t[15]!==f||t[16]!==kt){let i;t[18]!==f?(i=R=>({...R,coordinates:[R.coordinates[0]===null?null:Ft.parse(`${R.coordinates[0]}`,f,new Date),R.coordinates[1]===null?null:Ft.parse(`${R.coordinates[1]}`,f,new Date)]}),t[18]=f,t[19]=i):i=t[19],ot=kt.map(i),t[15]=f,t[16]=kt,t[17]=ot}else ot=t[17];const vt=ot,x=K-h.left-h.right,l=Q-h.top-h.bottom,Xt=dt?Ft.parse(`${dt}`,f,new Date):r[0].date,St=Ot?Ft.parse(`${Ot}`,f,new Date):r[r.length-1].date,jt=Math.min(...r.map(yi).filter(hi))!==1/0?Math.min(...r.map(di).filter(pi))>0?0:Math.min(...r.map(fi).filter(mi)):0,rt=Math.min(...r.map(xi).filter(ui))!==1/0?Math.min(...r.map(ci).filter(ai))>0?0:Math.min(...r.map(li).filter(ri)):0,lt=Math.max(...r.map(oi).filter(si))!==1/0?Math.max(...r.map(ni).filter(ii)):0,Y=Math.max(...r.map(ei).filter(ti))!==1/0?Math.max(...r.map(_e).filter(Ze)):0,Dt=jt<rt?jt:rt,B=lt>Y?lt:Y,m=Le.time().domain([Xt,St]).range([0,x]),k=we.linear().domain([A?Dt:jt,A?B>0?B:0:lt>0?lt:0]).range([l,0]).nice(),g=we.linear().domain([A?Dt:rt,A?B>0?B:0:Y>0?Y:0]).range([l,0]).nice(),qt=ve.line().defined(Qe).x(i=>m(i.date)).y(i=>k(i.y1)).curve(Ut),At=ve.line().defined(Ke).x(i=>m(i.date)).y(i=>g(i.y2)).curve(Ut),Yt=k.ticks(pt),Bt=g.ticks(pt),Mt=m.ticks(Kt);b.useEffect(()=>{const i=ye=>{const je=r[Se.bisectCenter(r.map(Je),m.invert(De.pointer(ye)[0]),0)];Lt(je||r[r.length-1]),Nt?.(je||r[r.length-1]),Wt(ye.clientY),p(ye.clientX)},R=()=>{Lt(void 0),p(void 0),Wt(void 0),Nt?.(void 0)};Ie.select(X.current).on("mousemove",i).on("mouseout",R)},[m,r,Nt]);let at;t[20]!==s||t[21]!==l||t[22]!==x||t[23]!==vt||t[24]!==d||t[25]!==m?(at=n.jsxRuntimeExports.jsx(Oe.HighlightArea,{areaSettings:vt,width:x,height:l,scale:m,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=x,t[23]=vt,t[24]=d,t[25]=m,t[26]=at):at=t[26];const wt=c?.xAxis?.axis;let T;t[27]!==wt?(T={axis:wt},t[27]=wt,t[28]=T):T=t[28];let L;t[29]!==a?.xAxis?.axis?(L=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=L):L=t[30];let C;t[31]!==o[0]||t[32]!==L?(C={axis:{stroke:o[0],...L}},t[31]=o[0],t[32]=L,t[33]=C):C=t[33];let ct;t[34]!==l||t[35]!==T||t[36]!==C?(ct=n.jsxRuntimeExports.jsx(ge.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:T,styles:C}),t[34]=l,t[35]=T,t[36]=C,t[37]=ct):ct=t[37];let V;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==j||t[41]!==o[0]||t[42]!==h.left||t[43]!==W||t[44]!==a?.yAxis?.title?(V=W?n.jsxRuntimeExports.jsx(Ae.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[0].length>100?`${j[0].substring(0,100)}...`:j[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=j,t[41]=o[0],t[42]=h.left,t[43]=W,t[44]=a?.yAxis?.title,t[45]=V):V=t[45];const zt=x+15,ut=x+15,Jt=c?.xAxis?.axis;let $;t[46]!==Jt?($={axis:Jt},t[46]=Jt,t[47]=$):$=t[47];let z;t[48]!==a?.xAxis?.axis?(z=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=z):z=t[49];let I;t[50]!==o[1]||t[51]!==z?(I={axis:{stroke:o[1],...z}},t[50]=o[1],t[51]=z,t[52]=I):I=t[52];let J;t[53]!==l||t[54]!==zt||t[55]!==ut||t[56]!==$||t[57]!==I?(J=n.jsxRuntimeExports.jsx(ge.Axis,{y1:0,y2:l,x1:zt,x2:ut,classNames:$,styles:I}),t[53]=l,t[54]=zt,t[55]=ut,t[56]=$,t[57]=I,t[58]=J):J=t[58];let xt;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==x||t[62]!==j||t[63]!==o[1]||t[64]!==h.right||t[65]!==W||t[66]!==a?.yAxis?.title?(xt=W?n.jsxRuntimeExports.jsx(Ae.AxisTitle,{x:x+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:j[1].length>100?`${j[1].substring(0,100)}...`:j[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=x,t[62]=j,t[63]=o[1],t[64]=h.right,t[65]=W,t[66]=a?.yAxis?.title,t[67]=xt):xt=t[67];const Et=x+15,F=c?.xAxis?.axis;let w;t[68]!==F?(w={axis:F},t[68]=F,t[69]=w):w=t[69];const P=a?.xAxis?.axis;let E;t[70]!==P?(E={axis:P},t[70]=P,t[71]=E):E=t[71];let S;t[72]!==l||t[73]!==Et||t[74]!==w||t[75]!==E?(S=n.jsxRuntimeExports.jsx(ge.Axis,{y1:l,y2:l,x1:-15,x2:Et,classNames:w,styles:E}),t[72]=l,t[73]=Et,t[74]=w,t[75]=E,t[76]=S):S=t[76];let D;t[77]!==f?(D=i=>Ft.format(i,f),t[77]=f,t[78]=D):D=t[78];const Tt=Mt.map(D),Zt=Mt.map(i=>m(i)),Ct=a?.xAxis?.gridLines,fe=a?.xAxis?.labels;let _t;t[79]!==Ct||t[80]!==fe?(_t={gridLines:Ct,labels:fe},t[79]=Ct,t[80]=fe,t[81]=_t):_t=t[81];const pe=c?.xAxis?.gridLines;let Vt;t[82]!==pe?(Vt=n.mo("opacity-0",pe),t[82]=pe,t[83]=Vt):Vt=t[83];const de=c?.xAxis?.labels;let $t;t[84]!==de?($t=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",de),t[84]=de,t[85]=$t):$t=t[85];let te;t[86]!==Vt||t[87]!==$t?(te={gridLines:Vt,labels:$t},t[86]=Vt,t[87]=$t,t[88]=te):te=t[88];let ee;t[89]!==U?(ee=U.filter(ze).map(Be),t[89]=U,t[90]=ee):ee=t[90];let ie;t[91]!==o[0]||t[92]!==G?(ie={stroke:o[0],strokeWidth:G,fill:"none"},t[91]=o[0],t[92]=G,t[93]=ie):ie=t[93];let ne;t[94]!==s.duration?(ne={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=ne):ne=t[95];let se;t[96]!==o[1]||t[97]!==G?(se={stroke:o[1],strokeWidth:G,fill:"none"},t[96]=o[1],t[97]=G,t[98]=se):se=t[98];let oe;t[99]!==s.duration?(oe={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=oe):oe=t[100];const he=r.map((i,R)=>n.jsxRuntimeExports.jsxs(mt.motion.g,{children:[q.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M?n.jsxRuntimeExports.jsx(mt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:k(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:m(i.date),cy:k(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(mt.motion.text,{dy:q.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:m(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:xe.numberFormattingFunction(i.y1,"NA",et,_[0],H[0])}):null]}),q.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M?n.jsxRuntimeExports.jsx(mt.motion.circle,{r:x/r.length<5?0:x/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:m(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:m(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(mt.motion.text,{dy:q.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:m(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:m(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:xe.numberFormattingFunction(i.y2,"NA",et,_[1],H[1])}):null]})]},R));let re;t[101]!==he?(re=n.jsxRuntimeExports.jsx("g",{children:he}),t[101]=he,t[102]=re):re=t[102];let le;t[103]!==U?(le=U.filter(Ge).map(Pe),t[103]=U,t[104]=le):le=t[104];let ae;t[105]===Symbol.for("react.memo_cache_sentinel")?(ae={fill:"none",pointerEvents:"all"},t[105]=ae):ae=t[105];let ce;t[106]!==X||t[107]!==l||t[108]!==x?(ce=n.jsxRuntimeExports.jsx("rect",{ref:X,style:ae,width:x,height:l}),t[106]=X,t[107]=l,t[108]=x,t[109]=ce):ce=t[109];let ue;return t[110]!==c?.tooltip||t[111]!==gt||t[112]!==u||t[113]!==N||t[114]!==a?.tooltip||t[115]!==ft?(ue=N&&ft&&gt&&u?n.jsxRuntimeExports.jsx(ke.Tooltip,{data:N,body:ft,xPos:gt,yPos:u,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=gt,t[112]=u,t[113]=N,t[114]=a?.tooltip,t[115]=ft,t[116]=ue):ue=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(mt.motion.svg,{width:`${K}px`,height:`${Q}px`,viewBox:`0 0 ${K} ${Q}`,direction:"ltr",ref:Gt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[at,n.jsxRuntimeExports.jsxs("g",{children:[Yt.map((i,R)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:k(i),y2:k(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:k(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:xe.numberFormattingFunction(i,"NA",et,_[0],H[0])})]},R)),ct,V]}),n.jsxRuntimeExports.jsxs("g",{children:[Bt.map((i,R)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:x+15,x2:x+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:x+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:xe.numberFormattingFunction(i,"NA",et,_[1],H[1])})]},R)),J,xt]}),n.jsxRuntimeExports.jsxs("g",{children:[S,n.jsxRuntimeExports.jsx(Ne.XTicksAndGridLines,{values:Tt,x:Zt,y1:0,y2:l,styles:_t,classNames:te,labelType:"primary",showGridLines:!0,precision:et})]}),ee,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(mt.motion.path,{style:ie,exit:ne,variants:{initial:{pathLength:0,d:qt(r.filter(Ye))||"",opacity:1},whileInView:{pathLength:1,d:qt(r.filter(Xe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(mt.motion.path,{d:At(r.filter(We))||"",style:se,exit:oe,variants:{initial:{pathLength:0,d:At(r.filter(Ue))||"",opacity:1},whileInView:{pathLength:1,d:At(r.filter(He))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),N?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:m(N.date),x2:m(N.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),re,le,ce]})}),ue]})}function Pe(e){return e.layer}function Ge(e){return e.position==="after"}function He(e){return!q.checkIfNullOrUndefined(e.y2)}function Ue(e){return!q.checkIfNullOrUndefined(e.y2)}function We(e){return!q.checkIfNullOrUndefined(e.y2)}function Xe(e){return!q.checkIfNullOrUndefined(e.y1)}function Ye(e){return!q.checkIfNullOrUndefined(e.y1)}function Be(e){return e.layer}function ze(e){return e.position==="before"}function Je(e){return e.date}function Ke(e){return!q.checkIfNullOrUndefined(e.y2)}function Qe(e){return!q.checkIfNullOrUndefined(e.y1)}function Ze(e){return e!=null}function _e(e){return e.y2}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y1}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y2}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function fi(e){return e.y1}function pi(e){return e!=null}function di(e){return e.y2}function hi(e){return e!=null}function yi(e){return e.y1}function gi(e){const t=n.compilerRuntimeExports.c(90),{data:v,graphTitle:K,sources:Q,graphDescription:o,height:j,width:A,footNote:f,noOfXTicks:Rt,dateFormat:Kt,showValues:Qt,padding:Pt,lineColors:Z,sameAxes:bt,backgroundColor:ft,leftMargin:kt,rightMargin:Nt,topMargin:s,bottomMargin:G,labels:M,lineSuffixes:pt,linePrefixes:H,tooltip:_,highlightAreaSettings:dt,relativeHeight:Ot,onSeriesMouseOver:tt,graphID:a,graphDownload:c,dataDownload:et,animate:U,strokeWidth:W,showDots:Gt,language:ht,showColorScale:d,minHeight:y,colorLegendTitle:Ht,theme:yt,ariaLabel:it,noOfYTicks:Ut,maxDate:N,minDate:Lt,curveType:gt,styles:p,classNames:u,precision:Wt,customLayers:nt,showAxisLabels:It}=e,st=Kt===void 0?"yyyy":Kt,h=Qt===void 0?!1:Qt;let X;t[0]!==Z?(X=Z===void 0?[Ee.Colors.light.categoricalColors.colors[0],Ee.Colors.light.categoricalColors.colors[1]]:Z,t[0]=Z,t[1]=X):X=t[1];const O=X,r=bt===void 0?!1:bt,ot=ft===void 0?!1:ft,vt=kt===void 0?80:kt,x=Nt===void 0?80:Nt,l=s===void 0?20:s,Xt=G===void 0?25:G;let St;t[2]!==pt?(St=pt===void 0?["",""]:pt,t[2]=pt,t[3]=St):St=t[3];const jt=St;let rt;t[4]!==H?(rt=H===void 0?["",""]:H,t[4]=H,t[5]=rt):rt=t[5];const lt=rt;let Y;t[6]!==dt?(Y=dt===void 0?[]:dt,t[6]=dt,t[7]=Y):Y=t[7];const Dt=Y,B=c===void 0?!1:c,m=et===void 0?!1:et,k=U===void 0?!1:U,g=W===void 0?2:W,qt=Gt===void 0?!0:Gt,At=ht===void 0?"en":ht,Yt=d===void 0?!0:d,Bt=y===void 0?0:y,Mt=yt===void 0?"light":yt,at=Ut===void 0?5:Ut,wt=gt===void 0?"curve":gt,T=Wt===void 0?2:Wt;let L;t[8]!==nt?(L=nt===void 0?[]:nt,t[8]=nt,t[9]=L):L=t[9];const C=L,ct=It===void 0?!0:It,[V,zt]=b.useState(0),[ut,Jt]=b.useState(0),$=b.useRef(null),z=b.useRef(null);let I,J;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{const Zt=new ResizeObserver(Ct=>{zt(Ct[0].target.clientWidth||620),Jt(Ct[0].target.clientHeight||480)});return $.current&&Zt.observe($.current),()=>Zt.disconnect()},J=[],t[10]=I,t[11]=J):(I=t[10],J=t[11]),b.useEffect(I,J);const xt=u?.graphContainer,Et=p?.graphContainer;let F;t[12]!==u?.description||t[13]!==u?.title||t[14]!==v||t[15]!==m||t[16]!==o||t[17]!==B||t[18]!==K||t[19]!==p?.description||t[20]!==p?.title||t[21]!==A?(F=K||o||B||m?n.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:u?.title,description:u?.description},graphTitle:K,graphDescription:o,width:A,graphDownload:B?z:void 0,dataDownload:m?v.map(Ei).filter(wi).length>0?v.map(Ai).filter(ji):v.filter(vi):null}):null,t[12]=u?.description,t[13]=u?.title,t[14]=v,t[15]=m,t[16]=o,t[17]=B,t[18]=K,t[19]=p?.description,t[20]=p?.title,t[21]=A,t[22]=F):F=t[22];let w;t[23]!==u?.colorLegend||t[24]!==Ht||t[25]!==M||t[26]!==O||t[27]!==Yt?(w=Yt&&M.length>0?n.jsxRuntimeExports.jsx(Ce.ColorLegend,{colorDomain:M,colorLegendTitle:Ht,colors:O,showNAColor:!1,className:u?.colorLegend}):null,t[23]=u?.colorLegend,t[24]=Ht,t[25]=M,t[26]=O,t[27]=Yt,t[28]=w):w=t[28];let P;t[29]!==v.length?(P=v.length===0&&n.jsxRuntimeExports.jsx(Ve.EmptyState,{}),t[29]=v.length,t[30]=P):P=t[30];let E;t[31]!==k||t[32]!==Xt||t[33]!==u||t[34]!==wt||t[35]!==C||t[36]!==v||t[37]!==st||t[38]!==Dt||t[39]!==M||t[40]!==vt||t[41]!==O||t[42]!==lt||t[43]!==jt||t[44]!==N||t[45]!==Lt||t[46]!==Rt||t[47]!==at||t[48]!==tt||t[49]!==T||t[50]!==x||t[51]!==r||t[52]!==ct||t[53]!==qt||t[54]!==h||t[55]!==g||t[56]!==p||t[57]!==ut||t[58]!==V||t[59]!==_||t[60]!==l?(E=V&&ut&&v.length>0?n.jsxRuntimeExports.jsx(Fe,{data:v,sameAxes:r,lineColors:O,width:V,height:ut,dateFormat:st,showValues:h,noOfXTicks:Rt??$e.getNoOfTicks(V),leftMargin:vt,rightMargin:x,topMargin:l,bottomMargin:Xt,labels:M,highlightAreaSettings:Dt,tooltip:_,onSeriesMouseOver:tt,animate:k===!0?{duration:.5,once:!0,amount:.5}:k||{duration:0,once:!0,amount:0},strokeWidth:g,showDots:qt,noOfYTicks:at,lineSuffixes:jt,linePrefixes:lt,minDate:Lt,maxDate:N,curveType:wt,styles:p,classNames:u,precision:T,customLayers:C,showAxisLabels:ct}):null,t[31]=k,t[32]=Xt,t[33]=u,t[34]=wt,t[35]=C,t[36]=v,t[37]=st,t[38]=Dt,t[39]=M,t[40]=vt,t[41]=O,t[42]=lt,t[43]=jt,t[44]=N,t[45]=Lt,t[46]=Rt,t[47]=at,t[48]=tt,t[49]=T,t[50]=x,t[51]=r,t[52]=ct,t[53]=qt,t[54]=h,t[55]=g,t[56]=p,t[57]=ut,t[58]=V,t[59]=_,t[60]=l,t[61]=E):E=t[61];let S;t[62]!==P||t[63]!==E?(S=n.jsxRuntimeExports.jsxs(Re.GraphArea,{ref:$,children:[P,E]}),t[62]=P,t[63]=E,t[64]=S):S=t[64];let D;t[65]!==u?.footnote||t[66]!==u?.source||t[67]!==f||t[68]!==Q||t[69]!==p?.footnote||t[70]!==p?.source||t[71]!==A?(D=Q||f?n.jsxRuntimeExports.jsx(Me.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:Q,footNote:f,width:A}):null,t[65]=u?.footnote,t[66]=u?.source,t[67]=f,t[68]=Q,t[69]=p?.footnote,t[70]=p?.source,t[71]=A,t[72]=D):D=t[72];let Tt;return t[73]!==it||t[74]!==ot||t[75]!==a||t[76]!==j||t[77]!==At||t[78]!==Bt||t[79]!==Pt||t[80]!==Ot||t[81]!==xt||t[82]!==Et||t[83]!==F||t[84]!==w||t[85]!==S||t[86]!==D||t[87]!==Mt||t[88]!==A?(Tt=n.jsxRuntimeExports.jsxs(Re.GraphContainer,{className:xt,style:Et,id:a,ref:z,"aria-label":it,backgroundColor:ot,theme:Mt,language:At,minHeight:Bt,width:A,height:j,relativeHeight:Ot,padding:Pt,children:[F,w,S,D]}),t[73]=it,t[74]=ot,t[75]=a,t[76]=j,t[77]=At,t[78]=Bt,t[79]=Pt,t[80]=Ot,t[81]=xt,t[82]=Et,t[83]=F,t[84]=w,t[85]=S,t[86]=D,t[87]=Mt,t[88]=A,t[89]=Tt):Tt=t[89],Tt}function vi(e){return e!==void 0}function ji(e){return e!==void 0}function Ai(e){return e.data}function wi(e){return e!==void 0}function Ei(e){return e.data}exports.DualAxisLineChart=gi;
2
2
  //# sourceMappingURL=DualAxisLineChart.cjs.map
@@ -6,7 +6,7 @@ import { n as fe } from "./numberFormattingFunction-14YCbkN2.js";
6
6
  import { T as Oe } from "./Tooltip-BRnAz2Gv.js";
7
7
  import { c as V } from "./checkIfNullOrUndefined-DmfiKkNw.js";
8
8
  import { X as Se } from "./XTicksAndGridLines-CVZkZkpS.js";
9
- import { A as ve } from "./Axis-DoOqnt6g.js";
9
+ import { A as ve } from "./Axis-D56Gy0se.js";
10
10
  import { A as je } from "./AxisTitle-VFq89Olw.js";
11
11
  import { H as Te } from "./index-CSiFiXPj.js";
12
12
  import { t as Ve } from "./time-CAtex-RV.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),Re=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),T=require("react"),Me=require("./getSliderMarks-CIuSoedo.cjs"),$e=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-02t-wJta.cjs"),Ne=require("./Tooltip-BLa2EfMs.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ve=require("./AxisTitle-DV4n0RxE.cjs"),Ge=require("./Axis-Dtjn-EgM.cjs"),Be=require("./XAxesLabels-C6o9jJal.cjs"),De=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Se=require("./ReferenceLine-M9aP3dj-.cjs"),Ye=require("./XTicksAndGridLines-CekrPykD.cjs"),Xe=require("./YAxesLabels-BQ2aCazV.cjs"),Te=require("./DetailsModal-DHttOA80.cjs"),qe=require("./linear-CgUCbw9F.cjs"),Fe=require("./band-VYfcZeJ2.cjs"),Tt=require("./proxy-C4-uo6nS.cjs"),Pe=require("./use-in-view-C3o_ntMv.cjs"),We=require("./index-CoobIWNj.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Ie=require("./GraphContainer-B1EDxJ0S.cjs"),He=require("./GraphHeader.cjs"),Le=require("./index-C6er0ety.cjs"),Ue=require("./GraphFooter.cjs"),ze=require("./ColorLegendWithMouseOver.cjs"),Je=require("./EmptyState-CGeBqbmR.cjs"),Ke=require("./Colors.cjs");function Qe(e){const t=i.compilerRuntimeExports.c(146),{data:u,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:E,barPadding:Ft,showTicks:Mt,truncateBy:It,width:wt,height:jt,radius:ht,showLabels:At,tooltip:g,onSeriesMouseOver:at,maxValue:Lt,minValue:O,onSeriesMouseClick:ct,showValues:Zt,suffix:ft,prefix:q,selectedColor:F,arrowConnector:$,connectorStrokeWidth:Pt,maxBarThickness:kt,minBarThickness:$t,resetSelectionOnDoubleClick:_t,detailsOnClick:C,axisTitle:P,noOfTicks:Wt,valueColor:Nt,styles:s,classNames:n,labelOrder:y,refValues:Vt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:ut}=e,b=Jt===void 0?20:Jt,Gt=se===void 0?20:se,Bt=Kt===void 0?20:Kt,Dt=Qt===void 0?25:Qt,te=T.useRef(null);let Yt;t[0]!==p.amount||t[1]!==p.once?(Yt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Yt):Yt=t[2];const H=Pe.useInView(te,Yt),U=P?b+30:b;let Xt;t[3]!==Dt||t[4]!==Gt||t[5]!==U||t[6]!==Bt?(Xt={top:Bt,bottom:Dt,left:U,right:Gt},t[3]=Dt,t[4]=Gt,t[5]=U,t[6]=Bt,t[7]=Xt):Xt=t[7];const l=Xt,o=wt-l.left-l.right,rt=jt-l.top-l.bottom,[lt,Ht]=T.useState(void 0),[yt,gt]=T.useState(void 0),[Ut,Et]=T.useState(void 0),[Ot,zt]=T.useState(void 0);let Ct;if(t[8]!==u||t[9]!==y){const f=new Set,h=u.map((v,w)=>{const a=y?`${v.label}`:`${w}`;return f.add(a),{...v,id:a}}),I=y?y.filter(v=>!f.has(v)):[];let mt;t[11]!==u[0]?(mt=v=>({id:v,label:v,x:Array(u[0].x.length).fill(null)}),t[11]=u[0],t[12]=mt):mt=t[12],Ct=[...h,...I.map(mt)],t[8]=u,t[9]=y,t[10]=Ct}else Ct=t[10];const G=Ct;let j;t[13]!==G||t[14]!==y?(j=y??G.map(li),t[13]=G,t[14]=y,t[15]=j):j=t[15];const St=j;let bt,z,J,K,Q,Z,A,R,M,_,tt,et,k,N,V;if(t[16]!==p||t[17]!==$||t[18]!==P||t[19]!==St||t[20]!==Ft||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Pt||t[29]!==X||t[30]!==G||t[31]!==C||t[32]!==ut||t[33]!==E||t[34]!==rt||t[35]!==o||t[36]!==jt||t[37]!==W||t[38]!==H||t[39]!==b||t[40]!==l.bottom||t[41]!==l.left||t[42]!==l.right||t[43]!==l.top||t[44]!==kt||t[45]!==Lt||t[46]!==$t||t[47]!==O||t[48]!==yt||t[49]!==Wt||t[50]!==ct||t[51]!==at||t[52]!==m||t[53]!==q||t[54]!==ht||t[55]!==Vt||t[56]!==_t||t[57]!==F||t[58]!==At||t[59]!==Mt||t[60]!==Zt||t[61]!==s?.dataConnectors||t[62]!==s?.graphObjectValues||t[63]!==s?.xAxis?.axis||t[64]!==s?.xAxis?.labels||t[65]!==s?.yAxis?.gridLines||t[66]!==s?.yAxis?.labels||t[67]!==s?.yAxis?.title||t[68]!==ft||t[69]!==It||t[70]!==Nt||t[71]!==wt){const f=qe.linear().domain([O,Lt]).range([rt,0]).nice(),h=Fe.band().domain(St).range([0,$t?Math.max(o,$t*G.length):kt?Math.min(o,kt*G.length):o]).paddingInner(Ft),I=f.ticks(Wt);z=Tt.motion.svg,M=`${wt}px`,_=`${jt}px`,tt=`0 0 ${wt} ${jt}`,et="ltr",k=te,t[87]!==$?(N=$?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=$,t[88]=N):N=t[88],K=`translate(${l.left},${l.top})`;const mt=f(O<0?0:O),v=f(O<0?0:O),w=O<0?0:O;let a;t[89]!==m||t[90]!==q||t[91]!==ft||t[92]!==w?(a=Ce.numberFormattingFunction(w,"NA",m,q,ft),t[89]=m,t[90]=q,t[91]=ft,t[92]=w,t[93]=a):a=t[93];const pt=n?.xAxis?.axis,ie=n?.yAxis?.labels;let vt;t[94]!==pt||t[95]!==ie?(vt={axis:pt,label:ie},t[94]=pt,t[95]=ie,t[96]=vt):vt=t[96];const ne=s?.xAxis?.axis,Y=s?.yAxis?.labels;let c;t[97]!==ne||t[98]!==Y?(c={axis:ne,label:Y},t[97]=ne,t[98]=Y,t[99]=c):c=t[99],Q=i.jsxRuntimeExports.jsx(Ge.Axis,{y1:mt,y2:v,x1:0-b,x2:o+l.right,label:a,labelPos:{x:0-b,dx:0,dy:Lt<0?"1em":-5,y:f(O<0?0:O)},classNames:vt,styles:c}),Z=Mt?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:I.filter(ri),y:I.filter(ai).map(d=>f(d)),x1:0-b,x2:o+l.right,styles:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ft,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const S=0-b-15,r=rt/2,L=s?.yAxis?.title,ae=n?.yAxis?.title;t[100]!==P||t[101]!==S||t[102]!==r||t[103]!==L||t[104]!==ae?(A=i.jsxRuntimeExports.jsx(Ve.AxisTitle,{x:S,y:r,style:L,className:ae,text:P,rotate90:!0}),t[100]=P,t[101]=S,t[102]=r,t[103]=L,t[104]=ae,t[105]=A):A=t[105],t[106]!==X?(R=X.filter(oi).map(si),t[106]=X,t[107]=R):R=t[107],bt=We.AnimatePresence,V=G.map(d=>i.jsxRuntimeExports.jsxs(Tt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:h(`${d.id}`)+h.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(d.label)!==-1?.85:ut:.85},whileInView:{x:h(`${d.id}`)+h.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(d.label)!==-1?.85:ut:.85,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[At?i.jsxRuntimeExports.jsx(Be.XAxesLabels,{value:`${d.label}`.length<It?`${d.label}`:`${`${d.label}`.substring(0,It)}...`,y:rt+5,x:0-h.bandwidth()/2,width:h.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:H}):null,i.jsxRuntimeExports.jsx(Tt.motion.line,{x1:0,x2:0,style:{strokeWidth:Pt,...s?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:$&&d.x.indexOf(Math.min(...d.x.filter(ni)))===0?"url(#arrow)":"",markerStart:$&&d.x.indexOf(Math.min(...d.x.filter(ii)))===d.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:f(Math.min(...d.x.filter(ei)))+ht,y2:f(Math.max(...d.x.filter(ti)))-ht,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial"}),d.x.map((ee,ot)=>i.jsxRuntimeExports.jsx(Tt.motion.g,{onMouseEnter:oe=>{Ht({...d,xIndex:ot}),zt(oe.clientY),Et(oe.clientX),at?.({...d,xIndex:ot})},onClick:()=>{(ct||C)&&($e.isEqual(yt,{...d,xIndex:ot})&&_t?(gt(void 0),ct?.(void 0)):(gt({...d,xIndex:ot}),ct&&ct({...d,xIndex:ot})))},onMouseMove:oe=>{Ht({...d,xIndex:ot}),zt(oe.clientY),Et(oe.clientX)},onMouseLeave:()=>{Ht(void 0),Et(void 0),zt(void 0),at?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?E[ot]===F?1:.3:1},whileInView:{opacity:F?E[ot]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",children:qt.checkIfNullOrUndefined(ee)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Tt.motion.circle,{cx:0,r:ht,style:{fill:E[ot],fillOpacity:.85,stroke:E[ot],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:f(0),opacity:0},whileInView:{cy:f(ee||0),opacity:qt.checkIfNullOrUndefined(ee)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial"}),Zt?i.jsxRuntimeExports.jsx(Tt.motion.text,{x:0,style:{textAnchor:"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",qt.checkIfNullOrUndefined(ee)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:ht+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:f(0),opacity:0,fill:Nt||E[ot]},whileInView:{y:f(ee||0),fill:Nt||E[ot],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",children:Ce.numberFormattingFunction(ee,"NA",m,q,ft)}):null]})},ot))]},d.label)),J=Vt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Vt.map((d,ee)=>i.jsxRuntimeExports.jsx(Se.RefLineY,{text:d.text,color:d.color,y:f(d.value),x1:0-b,x2:o+l.right,classNames:d.classNames,styles:d.styles,animate:p,isInView:H},ee))}):null,t[16]=p,t[17]=$,t[18]=P,t[19]=St,t[20]=Ft,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Pt,t[29]=X,t[30]=G,t[31]=C,t[32]=ut,t[33]=E,t[34]=rt,t[35]=o,t[36]=jt,t[37]=W,t[38]=H,t[39]=b,t[40]=l.bottom,t[41]=l.left,t[42]=l.right,t[43]=l.top,t[44]=kt,t[45]=Lt,t[46]=$t,t[47]=O,t[48]=yt,t[49]=Wt,t[50]=ct,t[51]=at,t[52]=m,t[53]=q,t[54]=ht,t[55]=Vt,t[56]=_t,t[57]=F,t[58]=At,t[59]=Mt,t[60]=Zt,t[61]=s?.dataConnectors,t[62]=s?.graphObjectValues,t[63]=s?.xAxis?.axis,t[64]=s?.xAxis?.labels,t[65]=s?.yAxis?.gridLines,t[66]=s?.yAxis?.labels,t[67]=s?.yAxis?.title,t[68]=ft,t[69]=It,t[70]=Nt,t[71]=wt,t[72]=bt,t[73]=z,t[74]=J,t[75]=K,t[76]=Q,t[77]=Z,t[78]=A,t[79]=R,t[80]=M,t[81]=_,t[82]=tt,t[83]=et,t[84]=k,t[85]=N,t[86]=V}else bt=t[72],z=t[73],J=t[74],K=t[75],Q=t[76],Z=t[77],A=t[78],R=t[79],M=t[80],_=t[81],tt=t[82],et=t[83],k=t[84],N=t[85],V=t[86];let it;t[108]!==bt||t[109]!==J||t[110]!==V?(it=i.jsxRuntimeExports.jsxs(bt,{children:[V,J]}),t[108]=bt,t[109]=J,t[110]=V,t[111]=it):it=t[111];let nt;t[112]!==X?(nt=X.filter(_e).map(Ze),t[112]=X,t[113]=nt):nt=t[113];let xt;t[114]!==K||t[115]!==Q||t[116]!==Z||t[117]!==A||t[118]!==R||t[119]!==it||t[120]!==nt?(xt=i.jsxRuntimeExports.jsxs("g",{transform:K,children:[Q,Z,A,R,it,nt]}),t[114]=K,t[115]=Q,t[116]=Z,t[117]=A,t[118]=R,t[119]=it,t[120]=nt,t[121]=xt):xt=t[121];let D;t[122]!==z||t[123]!==M||t[124]!==_||t[125]!==tt||t[126]!==et||t[127]!==k||t[128]!==N||t[129]!==xt?(D=i.jsxRuntimeExports.jsxs(z,{width:M,height:_,viewBox:tt,direction:et,ref:k,children:[N,xt]}),t[122]=z,t[123]=M,t[124]=_,t[125]=tt,t[126]=et,t[127]=k,t[128]=N,t[129]=xt,t[130]=D):D=t[130];let B;t[131]!==n?.tooltip||t[132]!==Ut||t[133]!==Ot||t[134]!==lt||t[135]!==s?.tooltip||t[136]!==g?(B=lt&&g&&Ut&&Ot?i.jsxRuntimeExports.jsx(Ne.Tooltip,{data:lt,body:g,xPos:Ut,yPos:Ot,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[131]=n?.tooltip,t[132]=Ut,t[133]=Ot,t[134]=lt,t[135]=s?.tooltip,t[136]=g,t[137]=B):B=t[137];let st;t[138]!==n?.modal||t[139]!==C||t[140]!==yt?(st=C&&yt!==void 0?i.jsxRuntimeExports.jsx(Te.DetailsModal,{body:C,data:yt,setData:gt,className:n?.modal}):null,t[138]=n?.modal,t[139]=C,t[140]=yt,t[141]=st):st=t[141];let dt;return t[142]!==D||t[143]!==B||t[144]!==st?(dt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,B,st]}),t[142]=D,t[143]=B,t[144]=st,t[145]=dt):dt=t[145],dt}function Ze(e){return e.layer}function _e(e){return e.position==="after"}function ti(e){return e!==null}function ei(e){return e!==null}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e.layer}function oi(e){return e.position==="before"}function ai(e){return e!==0}function ri(e){return e!==0}function li(e){return`${e.id}`}function ci(e){const t=i.compilerRuntimeExports.c(139),{data:u,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:E,suffix:Ft,prefix:Mt,barPadding:It,showValues:wt,showTicks:jt,truncateBy:ht,width:At,height:g,radius:at,showLabels:Lt,tooltip:O,onSeriesMouseOver:ct,maxValue:Zt,minValue:ft,onSeriesMouseClick:q,selectedColor:F,arrowConnector:$,connectorStrokeWidth:Pt,maxBarThickness:kt,minBarThickness:$t,resetSelectionOnDoubleClick:_t,detailsOnClick:C,axisTitle:P,noOfTicks:Wt,valueColor:Nt,styles:s,classNames:n,labelOrder:y,refValues:Vt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:ut,dimmedOpacity:b}=e,Gt=Jt===void 0?100:Jt,Bt=se===void 0?40:se,Dt=Kt===void 0?20:Kt,te=Qt===void 0?10:Qt,Yt=T.useRef(null);let H;t[0]!==m.amount||t[1]!==m.once?(H={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=H):H=t[2];const U=Pe.useInView(Yt,H),Xt=P?Dt+25:Dt;let l;t[3]!==te||t[4]!==Gt||t[5]!==Bt||t[6]!==Xt?(l={top:Xt,bottom:te,left:Gt,right:Bt},t[3]=te,t[4]=Gt,t[5]=Bt,t[6]=Xt,t[7]=l):l=t[7];const o=l,rt=At-o.left-o.right,lt=g-o.top-o.bottom,[Ht,yt]=T.useState(void 0),[gt,Ut]=T.useState(void 0),[Et,Ot]=T.useState(void 0),[zt,Ct]=T.useState(void 0);let G;if(t[8]!==u||t[9]!==y){const h=new Set,I=u.map((w,a)=>{const pt=y?`${w.label}`:`${a}`;return h.add(pt),{...w,id:pt}}),mt=y?y.filter(w=>!h.has(w)):[];let v;t[11]!==u[0]?(v=w=>({id:w,label:w,x:Array(u[0].x.length).fill(null)}),t[11]=u[0],t[12]=v):v=t[12],G=[...I,...mt.map(v)],t[8]=u,t[9]=y,t[10]=G}else G=t[10];const j=G;let St;t[13]!==j||t[14]!==y?(St=y??j.map(vi),t[13]=j,t[14]=y,t[15]=St):St=t[15];const bt=St;let z,J,K,Q,Z,A,R,M,_,tt,et,k,N,V,it;if(t[16]!==m||t[17]!==$||t[18]!==P||t[19]!==bt||t[20]!==It||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Pt||t[29]!==W||t[30]!==j||t[31]!==C||t[32]!==b||t[33]!==E||t[34]!==lt||t[35]!==rt||t[36]!==g||t[37]!==ut||t[38]!==U||t[39]!==o.bottom||t[40]!==o.left||t[41]!==o.top||t[42]!==kt||t[43]!==Zt||t[44]!==$t||t[45]!==ft||t[46]!==gt||t[47]!==Wt||t[48]!==q||t[49]!==ct||t[50]!==X||t[51]!==Mt||t[52]!==at||t[53]!==Vt||t[54]!==_t||t[55]!==p||t[56]!==F||t[57]!==Lt||t[58]!==jt||t[59]!==wt||t[60]!==s?.dataConnectors||t[61]!==s?.graphObjectValues||t[62]!==s?.xAxis?.gridLines||t[63]!==s?.xAxis?.labels||t[64]!==s?.xAxis?.title||t[65]!==s?.yAxis?.gridLines||t[66]!==s?.yAxis?.labels||t[67]!==Ft||t[68]!==Dt||t[69]!==ht||t[70]!==Nt||t[71]!==At){const h=qe.linear().domain([ft,Zt]).range([0,rt]).nice(),I=Fe.band().domain(bt).range([0,$t?Math.max(lt,$t*j.length):kt?Math.min(lt,kt*j.length):lt]).paddingInner(It),mt=h.ticks(Wt);J=Tt.motion.svg,_=`${At}px`,tt=`${g}px`,et=`0 0 ${At} ${g}`,k="ltr",N=Yt,t[87]!==$?(V=$?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=$,t[88]=V):V=t[88],Q=`translate(${o.left},${o.top})`,Z=jt?i.jsxRuntimeExports.jsx(Ye.XTicksAndGridLines,{values:mt.filter(bi),x:mt.filter(gi).map(c=>h(c)),y1:0-Dt,y2:lt+o.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Ft,prefix:Mt,labelType:"secondary",showGridLines:!0,precision:X}):null;const v=rt/2,w=0-o.top+15,a=s?.xAxis?.title,pt=n?.xAxis?.title;t[89]!==P||t[90]!==v||t[91]!==w||t[92]!==a||t[93]!==pt?(A=i.jsxRuntimeExports.jsx(Ve.AxisTitle,{x:v,y:w,style:a,className:pt,text:P}),t[89]=P,t[90]=v,t[91]=w,t[92]=a,t[93]=pt,t[94]=A):A=t[94];const ie=s?.yAxis?.gridLines;let vt;t[95]!==ie?(vt={gridLines:ie},t[95]=ie,t[96]=vt):vt=t[96];const ne=n?.yAxis?.gridLines;let Y;t[97]!==ne?(Y={gridLines:ne},t[97]=ne,t[98]=Y):Y=t[98],R=i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{y:j.map(c=>I(`${c.id}`)+I.bandwidth()/2),x1:0,x2:rt,styles:vt,classNames:Y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(M=W.filter(yi).map(fi),t[99]=W,t[100]=M):M=t[100],z=We.AnimatePresence,it=j.map(c=>i.jsxRuntimeExports.jsxs(Tt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:I(`${c.id}`)+I.bandwidth()/2,opacity:ut.length!==0?ut.indexOf(c.label)!==-1?.85:b:.85},whileInView:{x:0,y:I(`${c.id}`)+I.bandwidth()/2,opacity:ut.length!==0?ut.indexOf(c.label)!==-1?.85:b:.85,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Lt?i.jsxRuntimeExports.jsx(Xe.YAxesLabels,{value:`${c.label}`.length<ht?`${c.label}`:`${`${c.label}`.substring(0,ht)}...`,y:0-I.bandwidth()/2,x:0-o.left,width:o.left,height:I.bandwidth(),alignment:"right",style:s?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:U}):null,i.jsxRuntimeExports.jsx(Tt.motion.line,{y1:0,y2:0,style:{strokeWidth:Pt,...s?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:$&&c.x.indexOf(Math.min(...c.x.filter(hi)))===0?"url(#arrow)":"",markerStart:$&&c.x.indexOf(Math.min(...c.x.filter(pi)))===c.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:h(Math.min(...c.x.filter(mi)))+at,x2:h(Math.max(...c.x.filter(di)))-at,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial"}),c.x.map((S,r)=>i.jsxRuntimeExports.jsx(Tt.motion.g,{onMouseEnter:L=>{yt({...c,xIndex:r}),Ct(L.clientY),Ot(L.clientX),ct?.({...c,xIndex:r})},onClick:()=>{(q||C)&&($e.isEqual(gt,{...c,xIndex:r})&&_t?(Ut(void 0),q?.(void 0)):(Ut({...c,xIndex:r}),q&&q({...c,xIndex:r})))},onMouseMove:L=>{yt({...c,xIndex:r}),Ct(L.clientY),Ot(L.clientX)},onMouseLeave:()=>{yt(void 0),Ot(void 0),Ct(void 0),ct?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?E[r]===F?1:.3:1},whileInView:{opacity:F?E[r]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",children:qt.checkIfNullOrUndefined(S)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Tt.motion.circle,{cy:0,r:at,style:{fill:E[r],fillOpacity:.85,stroke:E[r],strokeWidth:1,opacity:qt.checkIfNullOrUndefined(S)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:h(0),opacity:0},whileInView:{cx:h(S||0),opacity:qt.checkIfNullOrUndefined(S)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial"}),wt?i.jsxRuntimeExports.jsx(Tt.motion.text,{y:0,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dx:0,dy:0-at-3,className:i.mo("graph-value text-sm font-bold",qt.checkIfNullOrUndefined(S)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:h(0),opacity:0,fill:Nt||E[r]},whileInView:{x:h(S||0),fill:Nt||E[r],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",children:Ce.numberFormattingFunction(S,"NA",X,Mt,Ft)}):null]})},r))]},c.label)),K=Vt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Vt.map((c,S)=>i.jsxRuntimeExports.jsx(Se.RefLineX,{text:c.text,color:c.color,x:h(c.value),y1:0-o.top,y2:lt+o.bottom,textSide:h(c.value)>rt*.75||p?"left":"right",classNames:c.classNames,styles:c.styles,animate:m,isInView:U},S))}):null,t[16]=m,t[17]=$,t[18]=P,t[19]=bt,t[20]=It,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Pt,t[29]=W,t[30]=j,t[31]=C,t[32]=b,t[33]=E,t[34]=lt,t[35]=rt,t[36]=g,t[37]=ut,t[38]=U,t[39]=o.bottom,t[40]=o.left,t[41]=o.top,t[42]=kt,t[43]=Zt,t[44]=$t,t[45]=ft,t[46]=gt,t[47]=Wt,t[48]=q,t[49]=ct,t[50]=X,t[51]=Mt,t[52]=at,t[53]=Vt,t[54]=_t,t[55]=p,t[56]=F,t[57]=Lt,t[58]=jt,t[59]=wt,t[60]=s?.dataConnectors,t[61]=s?.graphObjectValues,t[62]=s?.xAxis?.gridLines,t[63]=s?.xAxis?.labels,t[64]=s?.xAxis?.title,t[65]=s?.yAxis?.gridLines,t[66]=s?.yAxis?.labels,t[67]=Ft,t[68]=Dt,t[69]=ht,t[70]=Nt,t[71]=At,t[72]=z,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=A,t[78]=R,t[79]=M,t[80]=_,t[81]=tt,t[82]=et,t[83]=k,t[84]=N,t[85]=V,t[86]=it}else z=t[72],J=t[73],K=t[74],Q=t[75],Z=t[76],A=t[77],R=t[78],M=t[79],_=t[80],tt=t[81],et=t[82],k=t[83],N=t[84],V=t[85],it=t[86];let nt;t[101]!==z||t[102]!==K||t[103]!==it?(nt=i.jsxRuntimeExports.jsxs(z,{children:[it,K]}),t[101]=z,t[102]=K,t[103]=it,t[104]=nt):nt=t[104];let xt;t[105]!==W?(xt=W.filter(xi).map(ui),t[105]=W,t[106]=xt):xt=t[106];let D;t[107]!==Q||t[108]!==Z||t[109]!==A||t[110]!==R||t[111]!==M||t[112]!==nt||t[113]!==xt?(D=i.jsxRuntimeExports.jsxs("g",{transform:Q,children:[Z,A,R,M,nt,xt]}),t[107]=Q,t[108]=Z,t[109]=A,t[110]=R,t[111]=M,t[112]=nt,t[113]=xt,t[114]=D):D=t[114];let B;t[115]!==J||t[116]!==_||t[117]!==tt||t[118]!==et||t[119]!==k||t[120]!==N||t[121]!==V||t[122]!==D?(B=i.jsxRuntimeExports.jsxs(J,{width:_,height:tt,viewBox:et,direction:k,ref:N,children:[V,D]}),t[115]=J,t[116]=_,t[117]=tt,t[118]=et,t[119]=k,t[120]=N,t[121]=V,t[122]=D,t[123]=B):B=t[123];let st;t[124]!==n?.tooltip||t[125]!==Et||t[126]!==zt||t[127]!==Ht||t[128]!==s?.tooltip||t[129]!==O?(st=Ht&&O&&Et&&zt?i.jsxRuntimeExports.jsx(Ne.Tooltip,{data:Ht,body:O,xPos:Et,yPos:zt,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=Et,t[126]=zt,t[127]=Ht,t[128]=s?.tooltip,t[129]=O,t[130]=st):st=t[130];let dt;t[131]!==n?.modal||t[132]!==C||t[133]!==gt?(dt=C&&gt!==void 0?i.jsxRuntimeExports.jsx(Te.DetailsModal,{body:C,data:gt,setData:Ut,className:n?.modal}):null,t[131]=n?.modal,t[132]=C,t[133]=gt,t[134]=dt):dt=t[134];let f;return t[135]!==B||t[136]!==st||t[137]!==dt?(f=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[B,st,dt]}),t[135]=B,t[136]=st,t[137]=dt,t[138]=f):f=t[138],f}function ui(e){return e.layer}function xi(e){return e.position==="after"}function di(e){return e!==null}function mi(e){return e!==null}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e.layer}function yi(e){return e.position==="before"}function gi(e,t){return t!==0}function bi(e,t){return t!==0}function vi(e){return`${e.id}`}function wi(e){const t=i.compilerRuntimeExports.c(130),{data:u,graphTitle:Jt,colors:se,sources:Kt,graphDescription:Qt,barPadding:E,showTicks:Ft,leftMargin:Mt,rightMargin:It,topMargin:wt,bottomMargin:jt,truncateBy:ht,height:At,width:g,footNote:at,colorDomain:Lt,colorLegendTitle:O,padding:ct,backgroundColor:Zt,radius:ft,tooltip:q,showLabels:F,relativeHeight:$,onSeriesMouseOver:Pt,graphID:kt,suffix:$t,prefix:_t,maxValue:C,minValue:P,onSeriesMouseClick:Wt,graphDownload:Nt,dataDownload:s,showValues:n,sortParameter:y,arrowConnector:Vt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:ut,maxNumberOfBars:b,minBarThickness:Gt,ariaLabel:Bt,resetSelectionOnDoubleClick:Dt,detailsOnClick:te,axisTitle:Yt,noOfTicks:H,valueColor:U,orientation:Xt,styles:l,classNames:o,labelOrder:rt,refValues:lt,filterNA:Ht,animate:yt,precision:gt,showColorScale:Ut,customLayers:Et,highlightedDataPoints:Ot,dimmedOpacity:zt,timeline:Ct,sortData:G}=e,j=se===void 0?Ke.Colors.light.categoricalColors.colors:se,St=E===void 0?.25:E,bt=Ft===void 0?!0:Ft,z=ht===void 0?999:ht,J=Zt===void 0?!0:Zt,K=ft===void 0?3:ft,Q=F===void 0?!0:F,Z=$t===void 0?"":$t,A=_t===void 0?"":_t,R=Nt===void 0?!1:Nt,M=s===void 0?!1:s,_=n===void 0?!0:n,tt=Vt===void 0?!1:Vt,et=p===void 0?2:p,k=m===void 0?"en":m,N=X===void 0?0:X,V=W===void 0?"light":W,it=Dt===void 0?!0:Dt,nt=H===void 0?5:H,xt=Xt===void 0?"vertical":Xt,D=Ht===void 0?!0:Ht,B=yt===void 0?!1:yt,st=gt===void 0?2:gt,dt=Ut===void 0?!0:Ut;let f;t[0]!==Et?(f=Et===void 0?[]:Et,t[0]=Et,t[1]=f):f=t[1];const h=f;let I;t[2]!==Ot?(I=Ot===void 0?[]:Ot,t[2]=Ot,t[3]=I):I=t[3];const mt=I,v=zt===void 0?.3:zt;let w;t[4]!==Ct?(w=Ct===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Ct,t[4]=Ct,t[5]=w):w=t[5];const a=w,[pt,ie]=T.useState(0),[vt,ne]=T.useState(0),[Y,c]=T.useState(a.autoplay);let S;if(t[6]!==u||t[7]!==a.dateFormat){let x;t[9]!==a.dateFormat?(x=Rt=>Ee.parse(`${Rt.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=x):x=t[10],S=[...new Set(u.filter(Pi).map(x))],S.sort(Fi),t[6]=u,t[7]=a.dateFormat,t[8]=S}else S=t[8];const r=S,[L,ae]=T.useState(a.autoplay?0:r.length-1),[d,ee]=T.useState(void 0),ot=T.useRef(null),oe=T.useRef(null);let pe,he;t[11]===Symbol.for("react.memo_cache_sentinel")?(pe=()=>{const x=new ResizeObserver(Rt=>{ie(Rt[0].target.clientWidth||620),ne(Rt[0].target.clientHeight||480)});return ot.current&&x.observe(ot.current),()=>x.disconnect()},he=[],t[11]=pe,t[12]=he):(pe=t[11],he=t[12]),T.useEffect(pe,he);let fe,ye;t[13]!==Y||t[14]!==a.speed||t[15]!==r?(fe=()=>{const x=setInterval(()=>{ae(Rt=>Rt<r.length-1?Rt+1:0)},(a.speed||2)*1e3);return Y||clearInterval(x),()=>clearInterval(x)},ye=[r,Y,a.speed],t[13]=Y,t[14]=a.speed,t[15]=r,t[16]=fe,t[17]=ye):(fe=t[16],ye=t[17]),T.useEffect(fe,ye);const we=a.dateFormat||"yyyy";let ge;t[18]!==L||t[19]!==we||t[20]!==a.showOnlyActiveDate||t[21]!==r?(ge=Me.getSliderMarks(r,L,a.showOnlyActiveDate,we),t[18]=L,t[19]=we,t[20]=a.showOnlyActiveDate,t[21]=r,t[22]=ge):ge=t[22];const be=ge,je=xt==="horizontal"?ci:Qe,Ae=o?.graphContainer,ke=l?.graphContainer;let re;t[23]!==o?.description||t[24]!==o?.title||t[25]!==u||t[26]!==M||t[27]!==Qt||t[28]!==R||t[29]!==Jt||t[30]!==l?.description||t[31]!==l?.title||t[32]!==g?(re=Jt||Qt||R||M?i.jsxRuntimeExports.jsx(He.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:o?.title,description:o?.description},graphTitle:Jt,graphDescription:Qt,width:g,graphDownload:R?oe:void 0,dataDownload:M?u.map(qi).filter(Ti).length>0?u.map(Si).filter(Di):u.filter(Vi):null}):null,t[23]=o?.description,t[24]=o?.title,t[25]=u,t[26]=M,t[27]=Qt,t[28]=R,t[29]=Jt,t[30]=l?.description,t[31]=l?.title,t[32]=g,t[33]=re):re=t[33];let le;t[34]!==L||t[35]!==be||t[36]!==Y||t[37]!==a.enabled||t[38]!==r?(le=a.enabled&&r.length>0&&be?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{c(!Y)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Y?"Click to pause animation":"Click to play animation",children:Y?i.jsxRuntimeExports.jsx(Le.Pause,{}):i.jsxRuntimeExports.jsx(Le.Play,{})}),i.jsxRuntimeExports.jsx(Me.Nr,{min:r[0],max:r[r.length-1],marks:be,step:null,defaultValue:r[r.length-1],value:r[L],onChangeComplete:x=>{ae(r.indexOf(x))},onChange:x=>{ae(r.indexOf(x))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=L,t[35]=be,t[36]=Y,t[37]=a.enabled,t[38]=r,t[39]=le):le=t[39];let ce;t[40]!==o?.colorLegend||t[41]!==Lt||t[42]!==O||t[43]!==j||t[44]!==u.length||t[45]!==dt||t[46]!==g?(ce=dt&&u.length>0?i.jsxRuntimeExports.jsx(ze.ColorLegendWithMouseOver,{width:g,colorDomain:Lt,colors:j,colorLegendTitle:O,setSelectedColor:ee,showNAColor:!1,className:o?.colorLegend}):null,t[40]=o?.colorLegend,t[41]=Lt,t[42]=O,t[43]=j,t[44]=u.length,t[45]=dt,t[46]=g,t[47]=ce):ce=t[47];let ue;t[48]!==u.length?(ue=u.length===0&&i.jsxRuntimeExports.jsx(Je.EmptyState,{}),t[48]=u.length,t[49]=ue):ue=t[49];let xe;t[50]!==je||t[51]!==B||t[52]!==tt||t[53]!==Yt||t[54]!==St||t[55]!==jt||t[56]!==o||t[57]!==j||t[58]!==et||t[59]!==h||t[60]!==u||t[61]!==te||t[62]!==v||t[63]!==D||t[64]!==mt||t[65]!==L||t[66]!==rt||t[67]!==k||t[68]!==Mt||t[69]!==ut||t[70]!==b||t[71]!==C||t[72]!==Gt||t[73]!==P||t[74]!==nt||t[75]!==Wt||t[76]!==Pt||t[77]!==st||t[78]!==A||t[79]!==K||t[80]!==lt||t[81]!==it||t[82]!==It||t[83]!==d||t[84]!==Q||t[85]!==bt||t[86]!==_||t[87]!==G||t[88]!==y||t[89]!==l||t[90]!==Z||t[91]!==vt||t[92]!==pt||t[93]!==a.dateFormat||t[94]!==a.enabled||t[95]!==q||t[96]!==wt||t[97]!==z||t[98]!==r||t[99]!==U?(xe=pt&&vt&&u.length>0?i.jsxRuntimeExports.jsx(je,{data:y!==void 0?y==="diff"?Re.orderBy(Oe.ensureCompleteDataForDumbbellChart(u,a.dateFormat||"yyyy").filter(x=>a.enabled?x.date===Ee.format(new Date(r[L]),a.dateFormat||"yyyy"):x).filter(x=>D?!x.x.every(Ni):x),$i,[G||"asc"]).filter((x,Rt)=>b?Rt<b:!0):Re.orderBy(Oe.ensureCompleteDataForDumbbellChart(u,a.dateFormat||"yyyy").filter(x=>a.enabled?x.date===Ee.format(new Date(r[L]),a.dateFormat||"yyyy"):x).filter(x=>D?!x.x.every(Li):x),x=>qt.checkIfNullOrUndefined(x.x[y])?-1/0:x.x[y],[G||"asc"]).filter((x,Rt)=>b?Rt<b:!0):Oe.ensureCompleteDataForDumbbellChart(u,a.dateFormat||"yyyy").filter(x=>D?!x.x.every(Ii):x).filter((x,Rt)=>b?Rt<b:!0),dotColors:j,width:pt,height:vt,radius:K,barPadding:St,showTicks:bt,leftMargin:Mt,rightMargin:It,topMargin:wt,bottomMargin:jt,truncateBy:z,showLabels:Q,showValues:_,tooltip:q,suffix:Z,prefix:A,onSeriesMouseOver:Pt,maxValue:qt.checkIfNullOrUndefined(C)?Math.max(...u.map(Ri))<0?0:Math.max(...u.map(Oi)):C,minValue:qt.checkIfNullOrUndefined(P)?Math.min(...u.map(ki))>0?0:Math.min(...u.map(ji)):P,onSeriesMouseClick:Wt,selectedColor:d,arrowConnector:tt,connectorStrokeWidth:et,maxBarThickness:ut,minBarThickness:Gt,resetSelectionOnDoubleClick:it,detailsOnClick:te,axisTitle:Yt,noOfTicks:nt,valueColor:U,styles:l,classNames:o,labelOrder:rt,refValues:lt,animate:B===!0?{duration:.5,once:!0,amount:.5}:B||{duration:0,once:!0,amount:0},precision:st,customLayers:h,highlightedDataPoints:mt,dimmedOpacity:v,rtl:k==="ar"||k==="he"}):null,t[50]=je,t[51]=B,t[52]=tt,t[53]=Yt,t[54]=St,t[55]=jt,t[56]=o,t[57]=j,t[58]=et,t[59]=h,t[60]=u,t[61]=te,t[62]=v,t[63]=D,t[64]=mt,t[65]=L,t[66]=rt,t[67]=k,t[68]=Mt,t[69]=ut,t[70]=b,t[71]=C,t[72]=Gt,t[73]=P,t[74]=nt,t[75]=Wt,t[76]=Pt,t[77]=st,t[78]=A,t[79]=K,t[80]=lt,t[81]=it,t[82]=It,t[83]=d,t[84]=Q,t[85]=bt,t[86]=_,t[87]=G,t[88]=y,t[89]=l,t[90]=Z,t[91]=vt,t[92]=pt,t[93]=a.dateFormat,t[94]=a.enabled,t[95]=q,t[96]=wt,t[97]=z,t[98]=r,t[99]=U,t[100]=xe):xe=t[100];let de;t[101]!==ue||t[102]!==xe?(de=i.jsxRuntimeExports.jsxs(Ie.GraphArea,{ref:ot,children:[ue,xe]}),t[101]=ue,t[102]=xe,t[103]=de):de=t[103];let me;t[104]!==o?.footnote||t[105]!==o?.source||t[106]!==at||t[107]!==Kt||t[108]!==l?.footnote||t[109]!==l?.source||t[110]!==g?(me=Kt||at?i.jsxRuntimeExports.jsx(Ue.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:Kt,footNote:at,width:g}):null,t[104]=o?.footnote,t[105]=o?.source,t[106]=at,t[107]=Kt,t[108]=l?.footnote,t[109]=l?.source,t[110]=g,t[111]=me):me=t[111];let ve;return t[112]!==Bt||t[113]!==J||t[114]!==kt||t[115]!==At||t[116]!==k||t[117]!==N||t[118]!==ct||t[119]!==$||t[120]!==Ae||t[121]!==ke||t[122]!==re||t[123]!==le||t[124]!==ce||t[125]!==de||t[126]!==me||t[127]!==V||t[128]!==g?(ve=i.jsxRuntimeExports.jsxs(Ie.GraphContainer,{className:Ae,style:ke,id:kt,ref:oe,"aria-label":Bt,backgroundColor:J,theme:V,language:k,minHeight:N,width:g,height:At,relativeHeight:$,padding:ct,children:[re,le,ce,de,me]}),t[112]=Bt,t[113]=J,t[114]=kt,t[115]=At,t[116]=k,t[117]=N,t[118]=ct,t[119]=$,t[120]=Ae,t[121]=ke,t[122]=re,t[123]=le,t[124]=ce,t[125]=de,t[126]=me,t[127]=V,t[128]=g,t[129]=ve):ve=t[129],ve}function ji(e){return Math.min(...e.x.filter(Ai))}function Ai(e){return e!==null}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.max(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return e==null}function Li(e){return e==null}function $i(e){return qt.checkIfNullOrUndefined(e.x[e.x.length-1])||qt.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Ni(e){return e==null}function Vi(e){return e!==void 0}function Di(e){return e!==void 0}function Si(e){return e.data}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e,t){return e-t}function Pi(e){return e.date}exports.DumbbellChart=wi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),T=require("react"),Ie=require("./getSliderMarks-CIuSoedo.cjs"),Ne=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),Ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./AxisTitle-DV4n0RxE.cjs"),Ye=require("./Axis-Jt_tmhxS.cjs"),Xe=require("./XAxesLabels-C6o9jJal.cjs"),Se=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Te=require("./ReferenceLine-M9aP3dj-.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ue=require("./YAxesLabels-BQ2aCazV.cjs"),qe=require("./DetailsModal-DHttOA80.cjs"),Fe=require("./linear-CgUCbw9F.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),qt=require("./proxy-C4-uo6nS.cjs"),We=require("./use-in-view-C3o_ntMv.cjs"),Ge=require("./index-CoobIWNj.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Le=require("./GraphContainer-B1EDxJ0S.cjs"),ze=require("./GraphHeader.cjs"),$e=require("./index-C6er0ety.cjs"),Je=require("./GraphFooter.cjs"),Ke=require("./ColorLegendWithMouseOver.cjs"),Qe=require("./EmptyState-CGeBqbmR.cjs"),Ze=require("./Colors.cjs");function _e(e){const t=i.compilerRuntimeExports.c(148),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,barPadding:Pt,showTicks:ut,truncateBy:Ct,width:bt,height:vt,radius:pt,showLabels:wt,tooltip:b,onSeriesMouseOver:rt,maxValue:Rt,minValue:A,onSeriesMouseClick:xt,showValues:Kt,suffix:ht,prefix:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:dt,hideAxisLine:H}=e,U=Ut===void 0?20:Ut,Bt=se===void 0?20:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?25:Jt,ie=T.useRef(null);let Nt;t[0]!==p.amount||t[1]!==p.once?(Nt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?U+30:U;let f;t[3]!==Yt||t[4]!==Bt||t[5]!==Zt||t[6]!==$t?(f={top:$t,bottom:Yt,left:Zt,right:Bt},t[3]=Yt,t[4]=Bt,t[5]=Zt,t[6]=$t,t[7]=f):f=t[7];const s=f,$=bt-s.left-s.right,z=vt-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ui),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==p||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Pt||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Wt||t[29]!==X||t[30]!==O||t[31]!==I||t[32]!==dt||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==vt||t[37]!==H||t[38]!==W||t[39]!==v||t[40]!==U||t[41]!==s.bottom||t[42]!==s.left||t[43]!==s.right||t[44]!==s.top||t[45]!==jt||t[46]!==Rt||t[47]!==Mt||t[48]!==A||t[49]!==G||t[50]!==Gt||t[51]!==xt||t[52]!==rt||t[53]!==m||t[54]!==q||t[55]!==pt||t[56]!==Lt||t[57]!==Qt||t[58]!==F||t[59]!==wt||t[60]!==ut||t[61]!==Kt||t[62]!==o?.dataConnectors||t[63]!==o?.graphObjectValues||t[64]!==o?.xAxis?.axis||t[65]!==o?.xAxis?.labels||t[66]!==o?.yAxis?.gridLines||t[67]!==o?.yAxis?.labels||t[68]!==o?.yAxis?.title||t[69]!==ht||t[70]!==Ct||t[71]!==It||t[72]!==bt){const x=Fe.linear().domain([A,Rt]).range([z,0]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max($,Mt*O.length):jt?Math.min($,jt*O.length):$]).paddingInner(Pt),gt=x.ticks(Gt);K=qt.motion.svg,B=`${bt}px`,tt=`${vt}px`,et=`0 0 ${bt} ${vt}`,it="ltr",C=ie,t[88]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[88]=L,t[89]=R):R=t[89],Z=`translate(${s.left},${s.top})`;let E;t[90]!==A||t[91]!==m||t[92]!==q||t[93]!==ut||t[94]!==ht?(E=ut?Ce.numberFormattingFunction(A<0?0:A,"NA",m,q,ht):void 0,t[90]=A,t[91]=m,t[92]=q,t[93]=ut,t[94]=ht,t[95]=E):E=t[95];const h=n?.xAxis?.axis,ct=n?.yAxis?.labels;let a;t[96]!==h||t[97]!==ct?(a={axis:h,label:ct},t[96]=h,t[97]=ct,t[98]=a):a=t[98];const Ht=o?.xAxis?.axis,kt=o?.yAxis?.labels;let ee;t[99]!==Ht||t[100]!==kt?(ee={axis:Ht,label:kt},t[99]=Ht,t[100]=kt,t[101]=ee):ee=t[101],_=i.jsxRuntimeExports.jsx(Ye.Axis,{hideAxisLine:H,y1:x(A<0?0:A),y2:x(A<0?0:A),x1:0-U,x2:$+s.right,label:E,labelPos:{x:0-U,dx:0,dy:Rt<0?"1em":-5,y:x(A<0?0:A)},classNames:a,styles:ee}),N=ut?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:gt.filter(ci),y:gt.filter(li).map(r=>x(r)),x1:0-U,x2:$+s.right,styles:{gridLines:o?.yAxis?.gridLines,labels:o?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ht,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const Et=0-U-15,l=z/2,j=o?.yAxis?.title,S=n?.yAxis?.title;t[102]!==P||t[103]!==Et||t[104]!==l||t[105]!==j||t[106]!==S?(V=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:Et,y:l,style:j,className:S,text:P,rotate90:!0}),t[102]=P,t[103]=Et,t[104]=l,t[105]=j,t[106]=S,t[107]=V):V=t[107],t[108]!==X?(k=X.filter(ri).map(ai),t[108]=X,t[109]=k):k=t[109],J=Ge.AnimatePresence,nt=O.map(r=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85},whileInView:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[wt?i.jsxRuntimeExports.jsx(Xe.XAxesLabels,{value:`${r.label}`.length<Ct?`${r.label}`:`${`${r.label}`.substring(0,Ct)}...`,y:z+5,x:0-w.bandwidth()/2,width:w.bandwidth(),height:s.bottom,style:o?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{x1:0,x2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&r.x.indexOf(Math.min(...r.x.filter(oi)))===0?"url(#arrow)":"",markerStart:L&&r.x.indexOf(Math.min(...r.x.filter(si)))===r.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:x(Math.min(...r.x.filter(ni)))+pt,y2:x(Math.max(...r.x.filter(ii)))-pt,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),r.x.map((d,g)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX),rt?.({...r,xIndex:g})},onClick:()=>{(xt||I)&&(Ne.isEqual(G,{...r,xIndex:g})&&Qt?(te(void 0),xt?.(void 0)):(te({...r,xIndex:g}),xt&&xt({...r,xIndex:g})))},onMouseMove:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),rt?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?M[g]===F?1:.3:1},whileInView:{opacity:F?M[g]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(d)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cx:0,r:pt,style:{fill:M[g],fillOpacity:.85,stroke:M[g],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:x(0),opacity:0},whileInView:{cy:x(d||0),opacity:Ft.checkIfNullOrUndefined(d)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),Kt?i.jsxRuntimeExports.jsx(qt.motion.text,{x:0,style:{textAnchor:"start",...o?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(d)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:pt+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:x(0),opacity:0,fill:It||M[g]},whileInView:{y:x(d||0),fill:It||M[g],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(d,"NA",m,q,ht)}):null]})},g))]},r.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((r,d)=>i.jsxRuntimeExports.jsx(Te.RefLineY,{text:r.text,color:r.color,y:x(r.value),x1:0-U,x2:$+s.right,classNames:r.classNames,styles:r.styles,animate:p,isInView:v},d))}):null,t[16]=p,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Pt,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Wt,t[29]=X,t[30]=O,t[31]=I,t[32]=dt,t[33]=M,t[34]=z,t[35]=$,t[36]=vt,t[37]=H,t[38]=W,t[39]=v,t[40]=U,t[41]=s.bottom,t[42]=s.left,t[43]=s.right,t[44]=s.top,t[45]=jt,t[46]=Rt,t[47]=Mt,t[48]=A,t[49]=G,t[50]=Gt,t[51]=xt,t[52]=rt,t[53]=m,t[54]=q,t[55]=pt,t[56]=Lt,t[57]=Qt,t[58]=F,t[59]=wt,t[60]=ut,t[61]=Kt,t[62]=o?.dataConnectors,t[63]=o?.graphObjectValues,t[64]=o?.xAxis?.axis,t[65]=o?.xAxis?.labels,t[66]=o?.yAxis?.gridLines,t[67]=o?.yAxis?.labels,t[68]=o?.yAxis?.title,t[69]=ht,t[70]=Ct,t[71]=It,t[72]=bt,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=_,t[78]=N,t[79]=V,t[80]=k,t[81]=B,t[82]=tt,t[83]=et,t[84]=it,t[85]=C,t[86]=R,t[87]=nt}else J=t[73],K=t[74],Q=t[75],Z=t[76],_=t[77],N=t[78],V=t[79],k=t[80],B=t[81],tt=t[82],et=t[83],it=t[84],C=t[85],R=t[86],nt=t[87];let st;t[110]!==J||t[111]!==Q||t[112]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[110]=J,t[111]=Q,t[112]=nt,t[113]=st):st=t[113];let ot;t[114]!==X?(ot=X.filter(ei).map(ti),t[114]=X,t[115]=ot):ot=t[115];let mt;t[116]!==Z||t[117]!==_||t[118]!==N||t[119]!==V||t[120]!==k||t[121]!==st||t[122]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[116]=Z,t[117]=_,t[118]=N,t[119]=V,t[120]=k,t[121]=st,t[122]=ot,t[123]=mt):mt=t[123];let D;t[124]!==K||t[125]!==B||t[126]!==tt||t[127]!==et||t[128]!==it||t[129]!==C||t[130]!==R||t[131]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[124]=K,t[125]=B,t[126]=tt,t[127]=et,t[128]=it,t[129]=C,t[130]=R,t[131]=mt,t[132]=D):D=t[132];let Y;t[133]!==n?.tooltip||t[134]!==ft||t[135]!==St||t[136]!==Vt||t[137]!==o?.tooltip||t[138]!==b?(Y=Vt&&b&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:b,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[133]=n?.tooltip,t[134]=ft,t[135]=St,t[136]=Vt,t[137]=o?.tooltip,t[138]=b,t[139]=Y):Y=t[139];let at;t[140]!==n?.modal||t[141]!==I||t[142]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[140]=n?.modal,t[141]=I,t[142]=G,t[143]=at):at=t[143];let At;return t[144]!==D||t[145]!==Y||t[146]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[144]=D,t[145]=Y,t[146]=at,t[147]=At):At=t[147],At}function ti(e){return e.layer}function ei(e){return e.position==="after"}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e!==null}function oi(e){return e!==null}function ai(e){return e.layer}function ri(e){return e.position==="before"}function li(e){return e!==0}function ci(e){return e!==0}function ui(e){return`${e.id}`}function xi(e){const t=i.compilerRuntimeExports.c(139),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,suffix:Pt,prefix:ut,barPadding:Ct,showValues:bt,showTicks:vt,truncateBy:pt,width:wt,height:b,radius:rt,showLabels:Rt,tooltip:A,onSeriesMouseOver:xt,maxValue:Kt,minValue:ht,onSeriesMouseClick:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:dt,dimmedOpacity:H}=e,U=Ut===void 0?100:Ut,Bt=se===void 0?40:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?10:Jt,ie=T.useRef(null);let Nt;t[0]!==m.amount||t[1]!==m.once?(Nt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?$t+25:$t;let f;t[3]!==Yt||t[4]!==U||t[5]!==Bt||t[6]!==Zt?(f={top:Zt,bottom:Yt,left:U,right:Bt},t[3]=Yt,t[4]=U,t[5]=Bt,t[6]=Zt,t[7]=f):f=t[7];const s=f,$=wt-s.left-s.right,z=b-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ji),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==m||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Ct||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Wt||t[29]!==W||t[30]!==O||t[31]!==I||t[32]!==H||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==b||t[37]!==dt||t[38]!==v||t[39]!==s.bottom||t[40]!==s.left||t[41]!==s.top||t[42]!==jt||t[43]!==Kt||t[44]!==Mt||t[45]!==ht||t[46]!==G||t[47]!==Gt||t[48]!==q||t[49]!==xt||t[50]!==X||t[51]!==ut||t[52]!==rt||t[53]!==Lt||t[54]!==Qt||t[55]!==p||t[56]!==F||t[57]!==Rt||t[58]!==vt||t[59]!==bt||t[60]!==o?.dataConnectors||t[61]!==o?.graphObjectValues||t[62]!==o?.xAxis?.gridLines||t[63]!==o?.xAxis?.labels||t[64]!==o?.xAxis?.title||t[65]!==o?.yAxis?.gridLines||t[66]!==o?.yAxis?.labels||t[67]!==Pt||t[68]!==$t||t[69]!==pt||t[70]!==It||t[71]!==wt){const x=Fe.linear().domain([ht,Kt]).range([0,$]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max(z,Mt*O.length):jt?Math.min(z,jt*O.length):z]).paddingInner(Ct),gt=x.ticks(Gt);K=qt.motion.svg,B=`${wt}px`,tt=`${b}px`,et=`0 0 ${wt} ${b}`,it="ltr",C=ie,t[87]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=R):R=t[88],Z=`translate(${s.left},${s.top})`,_=vt?i.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:gt.filter(wi),x:gt.filter(vi).map(l=>x(l)),y1:0-$t,y2:z+s.bottom,styles:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Pt,prefix:ut,labelType:"secondary",showGridLines:!0,precision:X}):null;const E=$/2,h=0-s.top+15,ct=o?.xAxis?.title,a=n?.xAxis?.title;t[89]!==P||t[90]!==E||t[91]!==h||t[92]!==ct||t[93]!==a?(N=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:E,y:h,style:ct,className:a,text:P}),t[89]=P,t[90]=E,t[91]=h,t[92]=ct,t[93]=a,t[94]=N):N=t[94];const Ht=o?.yAxis?.gridLines;let kt;t[95]!==Ht?(kt={gridLines:Ht},t[95]=Ht,t[96]=kt):kt=t[96];const ee=n?.yAxis?.gridLines;let Et;t[97]!==ee?(Et={gridLines:ee},t[97]=ee,t[98]=Et):Et=t[98],V=i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{y:O.map(l=>w(`${l.id}`)+w.bandwidth()/2),x1:0,x2:$,styles:kt,classNames:Et,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(k=W.filter(bi).map(gi),t[99]=W,t[100]=k):k=t[100],J=Ge.AnimatePresence,nt=O.map(l=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85},whileInView:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Rt?i.jsxRuntimeExports.jsx(Ue.YAxesLabels,{value:`${l.label}`.length<pt?`${l.label}`:`${`${l.label}`.substring(0,pt)}...`,y:0-w.bandwidth()/2,x:0-s.left,width:s.left,height:w.bandwidth(),alignment:"right",style:o?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{y1:0,y2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&l.x.indexOf(Math.min(...l.x.filter(yi)))===0?"url(#arrow)":"",markerStart:L&&l.x.indexOf(Math.min(...l.x.filter(fi)))===l.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:x(Math.min(...l.x.filter(hi)))+rt,x2:x(Math.max(...l.x.filter(pi)))-rt,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),l.x.map((j,S)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX),xt?.({...l,xIndex:S})},onClick:()=>{(q||I)&&(Ne.isEqual(G,{...l,xIndex:S})&&Qt?(te(void 0),q?.(void 0)):(te({...l,xIndex:S}),q&&q({...l,xIndex:S})))},onMouseMove:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),xt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?M[S]===F?1:.3:1},whileInView:{opacity:F?M[S]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(j)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cy:0,r:rt,style:{fill:M[S],fillOpacity:.85,stroke:M[S],strokeWidth:1,opacity:Ft.checkIfNullOrUndefined(j)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:x(0),opacity:0},whileInView:{cx:x(j||0),opacity:Ft.checkIfNullOrUndefined(j)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),bt?i.jsxRuntimeExports.jsx(qt.motion.text,{y:0,style:{textAnchor:"middle",...o?.graphObjectValues||{}},dx:0,dy:0-rt-3,className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(j)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:x(0),opacity:0,fill:It||M[S]},whileInView:{x:x(j||0),fill:It||M[S],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(j,"NA",X,ut,Pt)}):null]})},S))]},l.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((l,j)=>i.jsxRuntimeExports.jsx(Te.RefLineX,{text:l.text,color:l.color,x:x(l.value),y1:0-s.top,y2:z+s.bottom,textSide:x(l.value)>$*.75||p?"left":"right",classNames:l.classNames,styles:l.styles,animate:m,isInView:v},j))}):null,t[16]=m,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Ct,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Wt,t[29]=W,t[30]=O,t[31]=I,t[32]=H,t[33]=M,t[34]=z,t[35]=$,t[36]=b,t[37]=dt,t[38]=v,t[39]=s.bottom,t[40]=s.left,t[41]=s.top,t[42]=jt,t[43]=Kt,t[44]=Mt,t[45]=ht,t[46]=G,t[47]=Gt,t[48]=q,t[49]=xt,t[50]=X,t[51]=ut,t[52]=rt,t[53]=Lt,t[54]=Qt,t[55]=p,t[56]=F,t[57]=Rt,t[58]=vt,t[59]=bt,t[60]=o?.dataConnectors,t[61]=o?.graphObjectValues,t[62]=o?.xAxis?.gridLines,t[63]=o?.xAxis?.labels,t[64]=o?.xAxis?.title,t[65]=o?.yAxis?.gridLines,t[66]=o?.yAxis?.labels,t[67]=Pt,t[68]=$t,t[69]=pt,t[70]=It,t[71]=wt,t[72]=J,t[73]=K,t[74]=Q,t[75]=Z,t[76]=_,t[77]=N,t[78]=V,t[79]=k,t[80]=B,t[81]=tt,t[82]=et,t[83]=it,t[84]=C,t[85]=R,t[86]=nt}else J=t[72],K=t[73],Q=t[74],Z=t[75],_=t[76],N=t[77],V=t[78],k=t[79],B=t[80],tt=t[81],et=t[82],it=t[83],C=t[84],R=t[85],nt=t[86];let st;t[101]!==J||t[102]!==Q||t[103]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[101]=J,t[102]=Q,t[103]=nt,t[104]=st):st=t[104];let ot;t[105]!==W?(ot=W.filter(mi).map(di),t[105]=W,t[106]=ot):ot=t[106];let mt;t[107]!==Z||t[108]!==_||t[109]!==N||t[110]!==V||t[111]!==k||t[112]!==st||t[113]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[107]=Z,t[108]=_,t[109]=N,t[110]=V,t[111]=k,t[112]=st,t[113]=ot,t[114]=mt):mt=t[114];let D;t[115]!==K||t[116]!==B||t[117]!==tt||t[118]!==et||t[119]!==it||t[120]!==C||t[121]!==R||t[122]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[115]=K,t[116]=B,t[117]=tt,t[118]=et,t[119]=it,t[120]=C,t[121]=R,t[122]=mt,t[123]=D):D=t[123];let Y;t[124]!==n?.tooltip||t[125]!==ft||t[126]!==St||t[127]!==Vt||t[128]!==o?.tooltip||t[129]!==A?(Y=Vt&&A&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:A,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=ft,t[126]=St,t[127]=Vt,t[128]=o?.tooltip,t[129]=A,t[130]=Y):Y=t[130];let at;t[131]!==n?.modal||t[132]!==I||t[133]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[131]=n?.modal,t[132]=I,t[133]=G,t[134]=at):at=t[134];let At;return t[135]!==D||t[136]!==Y||t[137]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[135]=D,t[136]=Y,t[137]=at,t[138]=At):At=t[138],At}function di(e){return e.layer}function mi(e){return e.position==="after"}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e!==null}function yi(e){return e!==null}function gi(e){return e.layer}function bi(e){return e.position==="before"}function vi(e,t){return t!==0}function wi(e,t){return t!==0}function ji(e){return`${e.id}`}function Ai(e){const t=i.compilerRuntimeExports.c(131),{data:c,graphTitle:Ut,colors:se,sources:zt,graphDescription:Jt,barPadding:M,showTicks:Pt,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:pt,height:wt,width:b,footNote:rt,colorDomain:Rt,colorLegendTitle:A,padding:xt,backgroundColor:Kt,radius:ht,tooltip:q,showLabels:F,relativeHeight:L,onSeriesMouseOver:Wt,graphID:jt,suffix:Mt,prefix:Qt,maxValue:I,minValue:P,onSeriesMouseClick:Gt,graphDownload:It,dataDownload:o,showValues:n,sortParameter:y,arrowConnector:Lt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:dt,maxNumberOfBars:H,minBarThickness:U,ariaLabel:Bt,resetSelectionOnDoubleClick:$t,detailsOnClick:Yt,axisTitle:ie,noOfTicks:Nt,valueColor:v,orientation:Zt,styles:f,classNames:s,labelOrder:$,refValues:z,filterNA:Vt,animate:_t,precision:G,showColorScale:te,customLayers:ft,highlightedDataPoints:Dt,dimmedOpacity:St,timeline:Tt,sortData:yt,hideAxisLine:O}=e,lt=se===void 0?Ze.Colors.light.categoricalColors.colors:se,Xt=M===void 0?.25:M,J=Pt===void 0?!0:Pt,K=pt===void 0?999:pt,Q=Kt===void 0?!0:Kt,Z=ht===void 0?3:ht,_=F===void 0?!0:F,N=Mt===void 0?"":Mt,V=Qt===void 0?"":Qt,k=It===void 0?!1:It,B=o===void 0?!1:o,tt=n===void 0?!0:n,et=Lt===void 0?!1:Lt,it=p===void 0?2:p,C=m===void 0?"en":m,R=X===void 0?0:X,nt=W===void 0?"light":W,st=$t===void 0?!0:$t,ot=Nt===void 0?5:Nt,mt=Zt===void 0?"vertical":Zt,D=Vt===void 0?!0:Vt,Y=_t===void 0?!1:_t,at=G===void 0?2:G,At=te===void 0?!0:te;let x;t[0]!==ft?(x=ft===void 0?[]:ft,t[0]=ft,t[1]=x):x=t[1];const w=x;let gt;t[2]!==Dt?(gt=Dt===void 0?[]:Dt,t[2]=Dt,t[3]=gt):gt=t[3];const E=gt,h=St===void 0?.3:St;let ct;t[4]!==Tt?(ct=Tt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Tt,t[4]=Tt,t[5]=ct):ct=t[5];const a=ct,Ht=O===void 0?!1:O,[kt,ee]=T.useState(0),[Et,l]=T.useState(0),[j,S]=T.useState(a.autoplay);let r;if(t[6]!==c||t[7]!==a.dateFormat){let u;t[9]!==a.dateFormat?(u=Ot=>Ee.parse(`${Ot.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=u):u=t[10],r=[...new Set(c.filter(Gi).map(u))],r.sort(Wi),t[6]=c,t[7]=a.dateFormat,t[8]=r}else r=t[8];const d=r,[g,ne]=T.useState(a.autoplay?0:d.length-1),[be,Be]=T.useState(void 0),ve=T.useRef(null),Re=T.useRef(null);let de,me;t[11]===Symbol.for("react.memo_cache_sentinel")?(de=()=>{const u=new ResizeObserver(Ot=>{ee(Ot[0].target.clientWidth||620),l(Ot[0].target.clientHeight||480)});return ve.current&&u.observe(ve.current),()=>u.disconnect()},me=[],t[11]=de,t[12]=me):(de=t[11],me=t[12]),T.useEffect(de,me);let pe,he;t[13]!==j||t[14]!==a.speed||t[15]!==d?(pe=()=>{const u=setInterval(()=>{ne(Ot=>Ot<d.length-1?Ot+1:0)},(a.speed||2)*1e3);return j||clearInterval(u),()=>clearInterval(u)},he=[d,j,a.speed],t[13]=j,t[14]=a.speed,t[15]=d,t[16]=pe,t[17]=he):(pe=t[16],he=t[17]),T.useEffect(pe,he);const we=a.dateFormat||"yyyy";let fe;t[18]!==g||t[19]!==we||t[20]!==a.showOnlyActiveDate||t[21]!==d?(fe=Ie.getSliderMarks(d,g,a.showOnlyActiveDate,we),t[18]=g,t[19]=we,t[20]=a.showOnlyActiveDate,t[21]=d,t[22]=fe):fe=t[22];const ye=fe,je=mt==="horizontal"?xi:_e,Ae=s?.graphContainer,ke=f?.graphContainer;let oe;t[23]!==s?.description||t[24]!==s?.title||t[25]!==c||t[26]!==B||t[27]!==Jt||t[28]!==k||t[29]!==Ut||t[30]!==f?.description||t[31]!==f?.title||t[32]!==b?(oe=Ut||Jt||k||B?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:s?.title,description:s?.description},graphTitle:Ut,graphDescription:Jt,width:b,graphDownload:k?Re:void 0,dataDownload:B?c.map(Pi).filter(Fi).length>0?c.map(qi).filter(Ti):c.filter(Si):null}):null,t[23]=s?.description,t[24]=s?.title,t[25]=c,t[26]=B,t[27]=Jt,t[28]=k,t[29]=Ut,t[30]=f?.description,t[31]=f?.title,t[32]=b,t[33]=oe):oe=t[33];let ae;t[34]!==g||t[35]!==ye||t[36]!==j||t[37]!==a.enabled||t[38]!==d?(ae=a.enabled&&d.length>0&&ye?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{S(!j)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":j?"Click to pause animation":"Click to play animation",children:j?i.jsxRuntimeExports.jsx($e.Pause,{}):i.jsxRuntimeExports.jsx($e.Play,{})}),i.jsxRuntimeExports.jsx(Ie.Nr,{min:d[0],max:d[d.length-1],marks:ye,step:null,defaultValue:d[d.length-1],value:d[g],onChangeComplete:u=>{ne(d.indexOf(u))},onChange:u=>{ne(d.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=g,t[35]=ye,t[36]=j,t[37]=a.enabled,t[38]=d,t[39]=ae):ae=t[39];let re;t[40]!==s?.colorLegend||t[41]!==Rt||t[42]!==A||t[43]!==lt||t[44]!==c.length||t[45]!==At||t[46]!==b?(re=At&&c.length>0?i.jsxRuntimeExports.jsx(Ke.ColorLegendWithMouseOver,{width:b,colorDomain:Rt,colors:lt,colorLegendTitle:A,setSelectedColor:Be,showNAColor:!1,className:s?.colorLegend}):null,t[40]=s?.colorLegend,t[41]=Rt,t[42]=A,t[43]=lt,t[44]=c.length,t[45]=At,t[46]=b,t[47]=re):re=t[47];let le;t[48]!==c.length?(le=c.length===0&&i.jsxRuntimeExports.jsx(Qe.EmptyState,{}),t[48]=c.length,t[49]=le):le=t[49];let ce;t[50]!==je||t[51]!==Y||t[52]!==et||t[53]!==ie||t[54]!==Xt||t[55]!==vt||t[56]!==s||t[57]!==lt||t[58]!==it||t[59]!==w||t[60]!==c||t[61]!==Yt||t[62]!==h||t[63]!==D||t[64]!==Ht||t[65]!==E||t[66]!==g||t[67]!==$||t[68]!==C||t[69]!==ut||t[70]!==dt||t[71]!==H||t[72]!==I||t[73]!==U||t[74]!==P||t[75]!==ot||t[76]!==Gt||t[77]!==Wt||t[78]!==at||t[79]!==V||t[80]!==Z||t[81]!==z||t[82]!==st||t[83]!==Ct||t[84]!==be||t[85]!==_||t[86]!==J||t[87]!==tt||t[88]!==yt||t[89]!==y||t[90]!==f||t[91]!==N||t[92]!==Et||t[93]!==kt||t[94]!==a.dateFormat||t[95]!==a.enabled||t[96]!==q||t[97]!==bt||t[98]!==K||t[99]!==d||t[100]!==v?(ce=kt&&Et&&c.length>0?i.jsxRuntimeExports.jsx(je,{hideAxisLine:Ht,data:y!==void 0?y==="diff"?Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Di):u),Vi,[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ni):u),u=>Ft.checkIfNullOrUndefined(u.x[y])?-1/0:u.x[y],[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>D?!u.x.every($i):u).filter((u,Ot)=>H?Ot<H:!0),dotColors:lt,width:kt,height:Et,radius:Z,barPadding:Xt,showTicks:J,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:K,showLabels:_,showValues:tt,tooltip:q,suffix:N,prefix:V,onSeriesMouseOver:Wt,maxValue:Ft.checkIfNullOrUndefined(I)?Math.max(...c.map(Ii))<0?0:Math.max(...c.map(Ri)):I,minValue:Ft.checkIfNullOrUndefined(P)?Math.min(...c.map(Oi))>0?0:Math.min(...c.map(ki)):P,onSeriesMouseClick:Gt,selectedColor:be,arrowConnector:et,connectorStrokeWidth:it,maxBarThickness:dt,minBarThickness:U,resetSelectionOnDoubleClick:st,detailsOnClick:Yt,axisTitle:ie,noOfTicks:ot,valueColor:v,styles:f,classNames:s,labelOrder:$,refValues:z,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},precision:at,customLayers:w,highlightedDataPoints:E,dimmedOpacity:h,rtl:C==="ar"||C==="he"}):null,t[50]=je,t[51]=Y,t[52]=et,t[53]=ie,t[54]=Xt,t[55]=vt,t[56]=s,t[57]=lt,t[58]=it,t[59]=w,t[60]=c,t[61]=Yt,t[62]=h,t[63]=D,t[64]=Ht,t[65]=E,t[66]=g,t[67]=$,t[68]=C,t[69]=ut,t[70]=dt,t[71]=H,t[72]=I,t[73]=U,t[74]=P,t[75]=ot,t[76]=Gt,t[77]=Wt,t[78]=at,t[79]=V,t[80]=Z,t[81]=z,t[82]=st,t[83]=Ct,t[84]=be,t[85]=_,t[86]=J,t[87]=tt,t[88]=yt,t[89]=y,t[90]=f,t[91]=N,t[92]=Et,t[93]=kt,t[94]=a.dateFormat,t[95]=a.enabled,t[96]=q,t[97]=bt,t[98]=K,t[99]=d,t[100]=v,t[101]=ce):ce=t[101];let ue;t[102]!==le||t[103]!==ce?(ue=i.jsxRuntimeExports.jsxs(Le.GraphArea,{ref:ve,children:[le,ce]}),t[102]=le,t[103]=ce,t[104]=ue):ue=t[104];let xe;t[105]!==s?.footnote||t[106]!==s?.source||t[107]!==rt||t[108]!==zt||t[109]!==f?.footnote||t[110]!==f?.source||t[111]!==b?(xe=zt||rt?i.jsxRuntimeExports.jsx(Je.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:zt,footNote:rt,width:b}):null,t[105]=s?.footnote,t[106]=s?.source,t[107]=rt,t[108]=zt,t[109]=f?.footnote,t[110]=f?.source,t[111]=b,t[112]=xe):xe=t[112];let ge;return t[113]!==Bt||t[114]!==Q||t[115]!==jt||t[116]!==wt||t[117]!==C||t[118]!==R||t[119]!==xt||t[120]!==L||t[121]!==Ae||t[122]!==ke||t[123]!==oe||t[124]!==ae||t[125]!==re||t[126]!==ue||t[127]!==xe||t[128]!==nt||t[129]!==b?(ge=i.jsxRuntimeExports.jsxs(Le.GraphContainer,{className:Ae,style:ke,id:jt,ref:Re,"aria-label":Bt,backgroundColor:Q,theme:nt,language:C,minHeight:R,width:b,height:wt,relativeHeight:L,padding:xt,children:[oe,ae,re,ue,xe]}),t[113]=Bt,t[114]=Q,t[115]=jt,t[116]=wt,t[117]=C,t[118]=R,t[119]=xt,t[120]=L,t[121]=Ae,t[122]=ke,t[123]=oe,t[124]=ae,t[125]=re,t[126]=ue,t[127]=xe,t[128]=nt,t[129]=b,t[130]=ge):ge=t[130],ge}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.min(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return Math.max(...e.x.filter(Li))}function Li(e){return e!==null}function $i(e){return e==null}function Ni(e){return e==null}function Vi(e){return Ft.checkIfNullOrUndefined(e.x[e.x.length-1])||Ft.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Di(e){return e==null}function Si(e){return e!==void 0}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e){return e!==void 0}function Pi(e){return e.data}function Wi(e,t){return e-t}function Gi(e){return e.date}exports.DumbbellChart=Ai;
2
2
  //# sourceMappingURL=DumbbellChart.cjs.map