@undp/data-viz 2.2.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) 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 +4 -0
  20. package/dist/BiVariateChoroplethMap.js +328 -401
  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 +4 -0
  35. package/dist/ChoroplethMap.js +341 -416
  36. package/dist/ChoroplethMap.js.map +1 -1
  37. package/dist/Data/01.json +4042 -0
  38. package/dist/Data/mapData.json +4543 -0
  39. package/dist/Data/testMap.json +361 -0
  40. package/dist/DifferenceLineChart.cjs +1 -1
  41. package/dist/DifferenceLineChart.js +1 -1
  42. package/dist/DotDensityMap.cjs +1 -1
  43. package/dist/DotDensityMap.cjs.map +1 -1
  44. package/dist/DotDensityMap.d.ts +4 -0
  45. package/dist/DotDensityMap.js +297 -311
  46. package/dist/DotDensityMap.js.map +1 -1
  47. package/dist/DualAxisLineChart.cjs +1 -1
  48. package/dist/DualAxisLineChart.js +1 -1
  49. package/dist/DumbbellChart.cjs +1 -1
  50. package/dist/DumbbellChart.cjs.map +1 -1
  51. package/dist/DumbbellChart.d.ts +2 -0
  52. package/dist/DumbbellChart.js +537 -536
  53. package/dist/DumbbellChart.js.map +1 -1
  54. package/dist/{GraphEl-DcNr5JzH.js → GraphEl-L5hNe7wJ.js} +84 -67
  55. package/dist/GraphEl-L5hNe7wJ.js.map +1 -0
  56. package/dist/GraphEl-ic8C5Ksc.cjs +2 -0
  57. package/dist/GraphEl-ic8C5Ksc.cjs.map +1 -0
  58. package/dist/GriddedGraphs.cjs +1 -1
  59. package/dist/GriddedGraphs.d.ts +3 -0
  60. package/dist/GriddedGraphs.js +1 -1
  61. package/dist/GriddedGraphsFromConfig.d.ts +3 -0
  62. package/dist/Histogram.cjs +1 -1
  63. package/dist/Histogram.cjs.map +1 -1
  64. package/dist/Histogram.d.ts +2 -0
  65. package/dist/Histogram.js +50 -49
  66. package/dist/Histogram.js.map +1 -1
  67. package/dist/HybridMap.cjs +1 -1
  68. package/dist/HybridMap.cjs.map +1 -1
  69. package/dist/HybridMap.d.ts +4 -0
  70. package/dist/HybridMap.js +368 -418
  71. package/dist/HybridMap.js.map +1 -1
  72. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  73. package/dist/LineChartWithConfidenceInterval.js +1 -1
  74. package/dist/MultiGraphDashboard.d.ts +3 -0
  75. package/dist/MultiGraphDashboardFromConfig.d.ts +3 -0
  76. package/dist/MultiLineAltChart.cjs +1 -1
  77. package/dist/MultiLineAltChart.js +1 -1
  78. package/dist/MultiLineChart.cjs +1 -1
  79. package/dist/MultiLineChart.js +1 -1
  80. package/dist/ParetoChart.cjs +1 -1
  81. package/dist/ParetoChart.js +1 -1
  82. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +3 -0
  83. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +3 -0
  84. package/dist/PerformanceIntensiveScrollStory.d.ts +3 -0
  85. package/dist/ScatterPlot.cjs +1 -1
  86. package/dist/ScatterPlot.js +1 -1
  87. package/dist/ScrollStory.d.ts +3 -0
  88. package/dist/SimpleLineChart.cjs +1 -1
  89. package/dist/SimpleLineChart.js +1 -1
  90. package/dist/SingleGraphDashboard.cjs +1 -1
  91. package/dist/SingleGraphDashboard.d.ts +3 -0
  92. package/dist/SingleGraphDashboard.js +1 -1
  93. package/dist/SingleGraphDashboardFromConfig.d.ts +3 -0
  94. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +3 -0
  95. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +3 -0
  96. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +3 -0
  97. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +3 -0
  98. package/dist/SlopeChart.cjs +1 -1
  99. package/dist/SlopeChart.js +1 -1
  100. package/dist/Types.d.ts +3 -0
  101. package/dist/WaterfallChart.cjs +1 -1
  102. package/dist/WaterfallChart.cjs.map +1 -1
  103. package/dist/WaterfallChart.d.ts +2 -0
  104. package/dist/WaterfallChart.js +263 -261
  105. package/dist/WaterfallChart.js.map +1 -1
  106. package/dist/index-DLFt97gy.cjs +2 -0
  107. package/dist/index-DLFt97gy.cjs.map +1 -0
  108. package/dist/index-Dp_SfsUA.js +2344 -0
  109. package/dist/index-Dp_SfsUA.js.map +1 -0
  110. package/dist/index.d.ts +37 -0
  111. package/package.json +2 -1
  112. package/readme.md +0 -7
  113. package/dist/Axis-DoOqnt6g.js +0 -32
  114. package/dist/Axis-DoOqnt6g.js.map +0 -1
  115. package/dist/Axis-Dtjn-EgM.cjs +0 -2
  116. package/dist/Axis-Dtjn-EgM.cjs.map +0 -1
  117. package/dist/GraphEl-CAjJLOGk.cjs +0 -2
  118. package/dist/GraphEl-CAjJLOGk.cjs.map +0 -1
  119. package/dist/GraphEl-DcNr5JzH.js.map +0 -1
  120. package/dist/zoom-5AkJSuWO.js +0 -1864
  121. package/dist/zoom-5AkJSuWO.js.map +0 -1
  122. package/dist/zoom-ChcvXFIz.cjs +0 -2
  123. package/dist/zoom-ChcvXFIz.cjs.map +0 -1
@@ -0,0 +1,361 @@
1
+ {
2
+ "type": "FeatureCollection",
3
+ "features": [
4
+ {
5
+ "type": "Feature",
6
+ "geometry": {
7
+ "type": "MultiPolygon",
8
+ "coordinates": [
9
+ [
10
+ [
11
+ [
12
+ 16.5967051279,
13
+ 46.4758203254
14
+ ],
15
+ [
16
+ 16.2770767108,
17
+ 46.5186831293
18
+ ],
19
+ [
20
+ 15.6462970697,
21
+ 46.2154655364
22
+ ],
23
+ [
24
+ 15.6808362073,
25
+ 45.8438195183
26
+ ],
27
+ [
28
+ 15.2567298987,
29
+ 45.7218521503
30
+ ],
31
+ [
32
+ 15.3404331083,
33
+ 45.4562048762
34
+ ],
35
+ [
36
+ 14.8179041738,
37
+ 45.459940686
38
+ ],
39
+ [
40
+ 14.5967207577,
41
+ 45.6686980121
42
+ ],
43
+ [
44
+ 14.3266522743,
45
+ 45.4690556369
46
+ ],
47
+ [
48
+ 13.585806,
49
+ 45.4784814996
50
+ ],
51
+ [
52
+ 13.6175911573,
53
+ 45.1095277441
54
+ ],
55
+ [
56
+ 13.8969984103,
57
+ 44.7868698384
58
+ ],
59
+ [
60
+ 14.3083722722,
61
+ 45.3369769052
62
+ ],
63
+ [
64
+ 14.4780235396,
65
+ 45.3145671146
66
+ ],
67
+ [
68
+ 14.8453236361,
69
+ 45.1114106151
70
+ ],
71
+ [
72
+ 14.9891032338,
73
+ 44.5750356294
74
+ ],
75
+ [
76
+ 15.6262534394,
77
+ 44.1451014198
78
+ ],
79
+ [
80
+ 15.126583667,
81
+ 44.2770982422
82
+ ],
83
+ [
84
+ 15.2289734326,
85
+ 44.110361254
86
+ ],
87
+ [
88
+ 15.7189706826,
89
+ 43.7645069728
90
+ ],
91
+ [
92
+ 15.9910791008,
93
+ 43.850626328
94
+ ],
95
+ [
96
+ 15.8459619162,
97
+ 43.7767586781
98
+ ],
99
+ [
100
+ 15.9618876783,
101
+ 43.5023887751
102
+ ],
103
+ [
104
+ 16.474348688,
105
+ 43.5382615399
106
+ ],
107
+ [
108
+ 16.8943758464,
109
+ 43.38986332
110
+ ],
111
+ [
112
+ 17.5812103602,
113
+ 42.9383565347
114
+ ],
115
+ [
116
+ 17.6403244971,
117
+ 43.0894956436
118
+ ],
119
+ [
120
+ 16.1729585004,
121
+ 44.2098469036
122
+ ],
123
+ [
124
+ 16.0124817991,
125
+ 44.6532116426
126
+ ],
127
+ [
128
+ 15.72995142,
129
+ 44.8229421681
130
+ ],
131
+ [
132
+ 15.7739053578,
133
+ 45.1798834453
134
+ ],
135
+ [
136
+ 16.0101611031,
137
+ 45.2193436417
138
+ ],
139
+ [
140
+ 16.2905604819,
141
+ 44.9959673699
142
+ ],
143
+ [
144
+ 16.5326323622,
145
+ 45.2268946608
146
+ ],
147
+ [
148
+ 17.8515675736,
149
+ 45.0441033612
150
+ ],
151
+ [
152
+ 18.0130785609,
153
+ 45.1514903149
154
+ ],
155
+ [
156
+ 18.6040096199,
157
+ 45.0806343857
158
+ ],
159
+ [
160
+ 19.0221720664,
161
+ 44.8553667416
162
+ ],
163
+ [
164
+ 18.9896944267,
165
+ 44.9069936942
166
+ ],
167
+ [
168
+ 19.1379862181,
169
+ 45.1239982837
170
+ ],
171
+ [
172
+ 19.4151165406,
173
+ 45.2335343482
174
+ ],
175
+ [
176
+ 18.970709089,
177
+ 45.3902562092
178
+ ],
179
+ [
180
+ 18.97425858,
181
+ 45.4050630871
182
+ ],
183
+ [
184
+ 18.9873371714,
185
+ 45.4607395736
186
+ ],
187
+ [
188
+ 18.9876862747,
189
+ 45.485407801
190
+ ],
191
+ [
192
+ 18.8938423016,
193
+ 45.5735155186
194
+ ],
195
+ [
196
+ 18.9335112046,
197
+ 45.6489866508
198
+ ],
199
+ [
200
+ 18.8654053967,
201
+ 45.8063502626
202
+ ],
203
+ [
204
+ 18.8564438603,
205
+ 45.9094211027
206
+ ],
207
+ [
208
+ 18.4004061727,
209
+ 45.7500756748
210
+ ],
211
+ [
212
+ 17.8683160024,
213
+ 45.771074528
214
+ ],
215
+ [
216
+ 17.3441466434,
217
+ 45.9441876888
218
+ ],
219
+ [
220
+ 16.5967051279,
221
+ 46.4758203254
222
+ ]
223
+ ],
224
+ [
225
+ [
226
+ 14.8804905824,
227
+ 44.5785936226
228
+ ],
229
+ [
230
+ 14.7341616521,
231
+ 44.7031519104
232
+ ],
233
+ [
234
+ 15.2500422818,
235
+ 44.325391158
236
+ ],
237
+ [
238
+ 14.8804905824,
239
+ 44.5785936226
240
+ ]
241
+ ]
242
+ ],
243
+ [
244
+ [
245
+ [
246
+ 17.6490649811,
247
+ 42.888852635
248
+ ],
249
+ [
250
+ 17.0157507671,
251
+ 43.0135997229
252
+ ],
253
+ [
254
+ 18.5246595067,
255
+ 42.4204890994
256
+ ],
257
+ [
258
+ 18.4375961538,
259
+ 42.5565023804
260
+ ],
261
+ [
262
+ 17.6490649811,
263
+ 42.888852635
264
+ ]
265
+ ]
266
+ ],
267
+ [
268
+ [
269
+ [
270
+ 14.7465559872,
271
+ 44.9379536524
272
+ ],
273
+ [
274
+ 14.5559483946,
275
+ 45.244895784
276
+ ],
277
+ [
278
+ 14.4328046081,
279
+ 45.0745928553
280
+ ],
281
+ [
282
+ 14.7465559872,
283
+ 44.9379536524
284
+ ]
285
+ ]
286
+ ],
287
+ [
288
+ [
289
+ [
290
+ 14.4339451023,
291
+ 44.984282394
292
+ ],
293
+ [
294
+ 14.3189269837,
295
+ 45.175288603
296
+ ],
297
+ [
298
+ 14.4937608777,
299
+ 44.6075051914
300
+ ],
301
+ [
302
+ 14.4339451023,
303
+ 44.984282394
304
+ ]
305
+ ]
306
+ ],
307
+ [
308
+ [
309
+ [
310
+ 16.6852462603,
311
+ 43.2565094
312
+ ],
313
+ [
314
+ 16.8969675927,
315
+ 43.3135106589
316
+ ],
317
+ [
318
+ 16.4377940653,
319
+ 43.3903459151
320
+ ],
321
+ [
322
+ 16.6852462603,
323
+ 43.2565094
324
+ ]
325
+ ]
326
+ ],
327
+ [
328
+ [
329
+ [
330
+ 16.8607643414,
331
+ 42.9567246632
332
+ ],
333
+ [
334
+ 16.6272544773,
335
+ 42.983273883
336
+ ],
337
+ [
338
+ 17.2004177377,
339
+ 42.9179513321
340
+ ],
341
+ [
342
+ 16.8607643414,
343
+ 42.9567246632
344
+ ]
345
+ ]
346
+ ]
347
+ ]
348
+ },
349
+ "properties": {
350
+ "fid_1": 91,
351
+ "OBJECTID": 366,
352
+ "ISO2": "HR",
353
+ "NAME": "Croatia",
354
+ "LON": 16.39578378,
355
+ "LAT": 45.0320184,
356
+ "ISO3": "HRV",
357
+ "Shape_Area": 6.45023163203919
358
+ }
359
+ }
360
+ ]
361
+ }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),L=require("react"),C=require("./parse-xYI9yrvL.cjs"),xi=require("./index-Cno4Q0YE.cjs"),ei=require("./numberFormattingFunction-02t-wJta.cjs"),mi=require("./Tooltip-BLa2EfMs.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ii=require("./customArea-B1LWQBmM.cjs"),di=require("./AxisTitle-DV4n0RxE.cjs"),fi=require("./Axis-Dtjn-EgM.cjs"),pi=require("./XTicksAndGridLines-CekrPykD.cjs"),hi=require("./ReferenceLine-M9aP3dj-.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),gi=require("./index-D69M6klB.cjs"),ji=require("./time-CkcKbhwe.cjs"),vi=require("./linear-CgUCbw9F.cjs"),ni=require("./line-DaEMhXmx.cjs"),He=require("./step-BZ3C8QFW.cjs"),oi=require("./area-C1gxfNGD.cjs"),wi=require("./select-Bnfk0lJx.cjs"),D=require("./proxy-C4-uo6nS.cjs"),Ri=require("./init-DU0ybBc_.cjs"),bi=require("./pointer-Dkq5NV1q.cjs"),Ei=require("./use-in-view-C3o_ntMv.cjs"),Oi=require("./GraphFooter.cjs"),Ci=require("./GraphHeader.cjs"),Ai=require("./ColorLegend.cjs"),We=require("./Colors.cjs"),Vi=require("./generateRandomString-B5zBiJzS.cjs"),Li=require("./EmptyState-CGeBqbmR.cjs"),si=require("./GraphContainer-B1EDxJ0S.cjs"),Si=require("./getNoOfTicks-C_1CFXv_.cjs");function ki(r){const t=s.compilerRuntimeExports.c(217),{data:j,width:rt,height:$t,lineColors:c,suffix:O,prefix:w,dateFormat:x,showValues:R,noOfXTicks:Mt,rightMargin:Ft,leftMargin:S,topMargin:Gt,bottomMargin:wt,tooltip:B,highlightAreaSettings:Pt,onSeriesMouseOver:Ht,animate:i,rtl:z,showColorLegendAtTop:Wt,colorDomain:$,diffAreaColors:I,idSuffix:lt,strokeWidth:M,showDots:F,refValues:Rt,minValue:N,maxValue:bt,annotations:Yt,customHighlightAreaSettings:Xt,yAxisTitle:T,noOfYTicks:de,minDate:Ut,maxDate:Et,curveType:Ot,styles:h,classNames:d,precision:E,customLayers:G}=r,Ct=L.useRef(null);let J;t[0]!==i.amount||t[1]!==i.once?(J={once:i.once,amount:i.amount},t[0]=i.amount,t[1]=i.once,t[2]=J):J=t[2];const u=Ei.useInView(Ct,J),[f,se]=L.useState(!1);let At,ct;t[3]!==i.duration||t[4]!==f||t[5]!==u?(At=()=>{if(u&&!f){const o=setTimeout(()=>{se(!0)},(i.duration+.5)*1e3);return()=>clearTimeout(o)}},ct=[u,f,i.duration],t[3]=i.duration,t[4]=f,t[5]=u,t[6]=At,t[7]=ct):(At=t[6],ct=t[7]),L.useEffect(At,ct);const K=Ot==="linear"?ni.curveLinear:Ot==="step"?He.curveStep:Ot==="stepAfter"?He.stepAfter:Ot==="stepBefore"?He.stepBefore:He.monotoneX,[k,g]=L.useState(void 0),[p,ae]=L.useState(void 0),[Q,Bt]=L.useState(void 0),Vt=T?S+30:S;let ut;t[8]!==wt||t[9]!==Ft||t[10]!==Vt||t[11]!==Gt?(ut={top:Gt,bottom:wt,left:Vt,right:Ft},t[8]=wt,t[9]=Ft,t[10]=Vt,t[11]=Gt,t[12]=ut):ut=t[12];const y=ut,xt=L.useRef(null);let Z;t[13]!==x?(Z=o=>({...o,date:C.parse(`${o.date}`,x,new Date)}),t[13]=x,t[14]=Z):Z=t[14];const n=xi.orderBy(j.map(Z),["date"],["asc"]);let mt;if(t[15]!==x||t[16]!==Pt){let o;t[18]!==x?(o=e=>({...e,coordinates:[e.coordinates[0]===null?null:C.parse(`${e.coordinates[0]}`,x,new Date),e.coordinates[1]===null?null:C.parse(`${e.coordinates[1]}`,x,new Date)]}),t[18]=x,t[19]=o):o=t[19],mt=Pt.map(o),t[15]=x,t[16]=Pt,t[17]=mt}else mt=t[17];const Lt=mt;let dt;if(t[20]!==Xt||t[21]!==x){let o;t[23]!==x?(o=e=>({...e,coordinates:e.coordinates.map((U,Tt)=>Tt%2===0?C.parse(`${U}`,x,new Date):U)}),t[23]=x,t[24]=o):o=t[24],dt=Xt.map(o),t[20]=Xt,t[21]=x,t[22]=dt}else dt=t[22];const re=dt,m=rt-y.left-y.right,v=$t-y.top-y.bottom,le=Ut?C.parse(`${Ut}`,x,new Date):n[0].date,zt=Et?C.parse(`${Et}`,x,new Date):n[n.length-1].date,_=Math.min(...n.map(zi))!==1/0?Math.min(...n.map(Bi))>0?0:Math.min(...n.map(Ui)):0,tt=Math.min(...n.map(Xi))!==1/0?Math.min(...n.map(Yi))>0?0:Math.min(...n.map(Wi)):0,P=Math.max(...n.map(Hi))!==1/0?Math.max(...n.map(Pi)):0,Jt=Math.max(...n.map(Gi))!==1/0?Math.max(...n.map(Fi)):0;let q;t[25]!==_||t[26]!==tt||t[27]!==N?(q=qt.checkIfNullOrUndefined(N)?_<tt?_:tt:N,t[25]=_,t[26]=tt,t[27]=N,t[28]=q):q=t[28];const b=q,et=P>Jt?P:Jt,a=ji.time().domain([le,zt]).range([0,m]);let ft;t[29]!==b||t[30]!==N?(ft=qt.checkIfNullOrUndefined(N)?b:N,t[29]=b,t[30]=N,t[31]=ft):ft=t[31];let it;t[32]!==et||t[33]!==bt?(it=qt.checkIfNullOrUndefined(bt)?et>0?et:0:bt,t[32]=et,t[33]=bt,t[34]=it):it=t[34];const l=vi.linear().domain([ft,it]).range([v,0]).nice(),pt=ni.line().x(o=>a(o.date)).y(o=>l(o.y1)).curve(K),Kt=ni.line().x(o=>a(o.date)).y(o=>l(o.y2)).curve(K),St=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(o=>l(o.y2)).curve(K),ce=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(0).curve(K),ue=oi.area().x(o=>a(o.date)).y1(o=>l(o.y2)).y0(0).curve(K),Qt=l.ticks(de),Zt=a.ticks(Mt);L.useEffect(()=>{const o=U=>{const Tt=n[Ri.bisectCenter(n.map(Mi),a.invert(bi.pointer(U)[0]),0)];g(Tt||n[n.length-1]),Ht?.(Tt||n[n.length-1]),Bt(U.clientY),ae(U.clientX)},e=()=>{g(void 0),ae(void 0),Bt(void 0),Ht?.(void 0)};wi.select(xt.current).on("mousemove",o).on("mouseout",e)},[a,n,Ht]);let ht;t[35]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none"},t[35]=ht):ht=t[35];let nt;t[36]===Symbol.for("react.memo_cache_sentinel")?(nt={fill:"none"},t[36]=nt):nt=t[36];let yt;t[37]!==i||t[38]!==v||t[39]!==m||t[40]!==Lt||t[41]!==u||t[42]!==a?(yt=s.jsxRuntimeExports.jsx(gi.HighlightArea,{areaSettings:Lt,width:m,height:v,scale:a,animate:i,isInView:u}),t[37]=i,t[38]=v,t[39]=m,t[40]=Lt,t[41]=u,t[42]=a,t[43]=yt):yt=t[43];const ot=h?.yAxis?.gridLines,xe=h?.yAxis?.labels;let st;t[44]!==ot||t[45]!==xe?(st={gridLines:ot,labels:xe},t[44]=ot,t[45]=xe,t[46]=st):st=t[46];const me=d?.yAxis?.gridLines,kt=d?.yAxis?.labels;let Dt;t[47]!==me||t[48]!==kt?(Dt={gridLines:me,labels:kt},t[47]=me,t[48]=kt,t[49]=Dt):Dt=t[49];const gt=l(b<0?0:b),jt=l(b<0?0:b),It=0-S,Nt=m+y.right,H=b<0?0:b;let A;t[50]!==E||t[51]!==w||t[52]!==O||t[53]!==H?(A=ei.numberFormattingFunction(H,"NA",E,w,O),t[50]=E,t[51]=w,t[52]=O,t[53]=H,t[54]=A):A=t[54];const W=0-S,Y=l(b<0?0:b),X=et<0?"1rem":-5;let V;t[55]!==W||t[56]!==Y||t[57]!==X?(V={x:W,y:Y,dx:0,dy:X},t[55]=W,t[56]=Y,t[57]=X,t[58]=V):V=t[58];const vt=d?.xAxis?.axis,_t=d?.yAxis?.labels;let at;t[59]!==vt||t[60]!==_t?(at={axis:vt,label:_t},t[59]=vt,t[60]=_t,t[61]=at):at=t[61];const Ye=h?.xAxis?.axis,Xe=h?.yAxis?.labels;let te;t[62]!==Ye||t[63]!==Xe?(te={axis:Ye,label:Xe},t[62]=Ye,t[63]=Xe,t[64]=te):te=t[64];let fe;t[65]!==gt||t[66]!==jt||t[67]!==It||t[68]!==Nt||t[69]!==A||t[70]!==V||t[71]!==at||t[72]!==te?(fe=s.jsxRuntimeExports.jsx(fi.Axis,{y1:gt,y2:jt,x1:It,x2:Nt,label:A,labelPos:V,classNames:at,styles:te}),t[65]=gt,t[66]=jt,t[67]=It,t[68]=Nt,t[69]=A,t[70]=V,t[71]=at,t[72]=te,t[73]=fe):fe=t[73];const Ue=0-S-15,Be=v/2,ze=h?.yAxis?.title,Je=d?.yAxis?.title;let pe;t[74]!==Ue||t[75]!==Be||t[76]!==ze||t[77]!==Je||t[78]!==T?(pe=s.jsxRuntimeExports.jsx(di.AxisTitle,{x:Ue,y:Be,style:ze,className:Je,text:T,rotate90:!0}),t[74]=Ue,t[75]=Be,t[76]=ze,t[77]=Je,t[78]=T,t[79]=pe):pe=t[79];let he;t[80]!==x?(he=o=>C.format(o,x),t[80]=x,t[81]=he):he=t[81];const ai=Zt.map(he),ri=Zt.map(o=>a(o)),Ke=h?.xAxis?.gridLines,Qe=h?.xAxis?.labels;let ye;t[82]!==Ke||t[83]!==Qe?(ye={gridLines:Ke,labels:Qe},t[82]=Ke,t[83]=Qe,t[84]=ye):ye=t[84];const Ze=d?.xAxis?.gridLines;let ee;t[85]!==Ze?(ee=s.mo("opacity-0",Ze),t[85]=Ze,t[86]=ee):ee=t[86];const _e=d?.xAxis?.labels;let ie;t[87]!==_e?(ie=s.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",_e),t[87]=_e,t[88]=ie):ie=t[88];let ge;t[89]!==ee||t[90]!==ie?(ge={gridLines:ee,labels:ie},t[89]=ee,t[90]=ie,t[91]=ge):ge=t[91];let je;t[92]!==G?(je=G.filter(Ti).map(Ni),t[92]=G,t[93]=je):je=t[93];let ve;t[94]!==I[1]?(ve={fill:I[1]},t[94]=I[1],t[95]=ve):ve=t[95];let we;t[96]!==i.duration?(we={opacity:0,transition:{duration:i.duration}},t[96]=i.duration,t[97]=we):we=t[97];let Re;t[98]===Symbol.for("react.memo_cache_sentinel")?(Re={opacity:1},t[98]=Re):Re=t[98];let be;t[99]!==i.duration?(be={initial:Re,whileInView:{opacity:1,transition:{duration:i.duration}}},t[99]=i.duration,t[100]=be):be=t[100];let Ee;t[101]!==I[0]?(Ee={fill:I[0]},t[101]=I[0],t[102]=Ee):Ee=t[102];let Oe;t[103]!==i.duration?(Oe={opacity:0,transition:{duration:i.duration}},t[103]=i.duration,t[104]=Oe):Oe=t[104];let Ce;t[105]===Symbol.for("react.memo_cache_sentinel")?(Ce={opacity:0},t[105]=Ce):Ce=t[105];let Ae;t[106]!==i.duration?(Ae={initial:Ce,whileInView:{opacity:1,transition:{duration:i.duration}}},t[106]=i.duration,t[107]=Ae):Ae=t[107];let Ve;t[108]!==c[0]||t[109]!==M?(Ve={fill:"none",stroke:c[0],strokeWidth:M},t[108]=c[0],t[109]=M,t[110]=Ve):Ve=t[110];let Le;t[111]!==i.duration?(Le={opacity:0,transition:{duration:i.duration}},t[111]=i.duration,t[112]=Le):Le=t[112];let Se;t[113]!==c[1]||t[114]!==M?(Se={fill:"none",stroke:c[1],strokeWidth:M},t[113]=c[1],t[114]=M,t[115]=Se):Se=t[115];let ke;t[116]!==i.duration?(ke={opacity:0,transition:{duration:i.duration}},t[116]=i.duration,t[117]=ke):ke=t[117];const li=1,ti=Kt(n)||"";let ne;t[118]!==i.duration?(ne={duration:i.duration},t[118]=i.duration,t[119]=ne):ne=t[119];let De;t[120]!==ti||t[121]!==ne?(De={pathLength:li,d:ti,opacity:1,transition:ne},t[120]=ti,t[121]=ne,t[122]=De):De=t[122];let Ie;t[123]!==i.duration||t[124]!==$||t[125]!==n||t[126]!==f||t[127]!==u||t[128]!==c[0]||t[129]!==c[1]||t[130]!==Wt||t[131]!==a||t[132]!==l?(Ie=Wt?null:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[0]},$[0]),s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[1]},$[1])]}),t[123]=i.duration,t[124]=$,t[125]=n,t[126]=f,t[127]=u,t[128]=c[0],t[129]=c[1],t[130]=Wt,t[131]=a,t[132]=l,t[133]=Ie):Ie=t[133];let Ne;t[134]!==d?.mouseOverLine||t[135]!==v||t[136]!==k||t[137]!==h?.mouseOverLine||t[138]!==a?(Ne=k?s.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:a(k.date),x2:a(k.date),className:s.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",d?.mouseOverLine),style:h?.mouseOverLine}):null,t[134]=d?.mouseOverLine,t[135]=v,t[136]=k,t[137]=h?.mouseOverLine,t[138]=a,t[139]=Ne):Ne=t[139];let Te;if(t[140]!==i.duration||t[141]!==d?.graphObjectValues||t[142]!==n||t[143]!==m||t[144]!==f||t[145]!==u||t[146]!==c[0]||t[147]!==c[1]||t[148]!==E||t[149]!==w||t[150]!==F||t[151]!==R||t[152]!==h?.graphObjectValues||t[153]!==O||t[154]!==a||t[155]!==l){let o;t[157]!==i.duration||t[158]!==d?.graphObjectValues||t[159]!==n.length||t[160]!==m||t[161]!==f||t[162]!==u||t[163]!==c[0]||t[164]!==c[1]||t[165]!==E||t[166]!==w||t[167]!==F||t[168]!==R||t[169]!==h?.graphObjectValues||t[170]!==O||t[171]!==a||t[172]!==l?(o=(e,U)=>s.jsxRuntimeExports.jsxs(D.motion.g,{children:[qt.checkIfNullOrUndefined(e.y1)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],transition:{duration:.5,delay:i.duration},cx:a(e.date),cy:l(e.y1)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2<e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-1 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],x:a(e.date),y:l(e.y1),transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y1,"NA",E,w,O)}):null]}),qt.checkIfNullOrUndefined(e.y2)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y2),fill:c[1]},whileInView:{opacity:1,fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration},cx:a(e.date),cy:l(e.y2)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2>e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-2 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y2),fill:c[1]},whileInView:{opacity:1,x:a(e.date),y:l(e.y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y2,"NA",E,w,O)}):null]})]},U),t[157]=i.duration,t[158]=d?.graphObjectValues,t[159]=n.length,t[160]=m,t[161]=f,t[162]=u,t[163]=c[0],t[164]=c[1],t[165]=E,t[166]=w,t[167]=F,t[168]=R,t[169]=h?.graphObjectValues,t[170]=O,t[171]=a,t[172]=l,t[173]=o):o=t[173],Te=n.map(o),t[140]=i.duration,t[141]=d?.graphObjectValues,t[142]=n,t[143]=m,t[144]=f,t[145]=u,t[146]=c[0],t[147]=c[1],t[148]=E,t[149]=w,t[150]=F,t[151]=R,t[152]=h?.graphObjectValues,t[153]=O,t[154]=a,t[155]=l,t[156]=Te}else Te=t[156];let qe;t[174]!==i||t[175]!==m||t[176]!==u||t[177]!==S||t[178]!==y.right||t[179]!==Rt||t[180]!==l?(qe=Rt?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Rt.map((o,e)=>s.jsxRuntimeExports.jsx(hi.RefLineY,{text:o.text,color:o.color,y:l(o.value),x1:0-S,x2:m+y.right,classNames:o.classNames,styles:o.styles,animate:i,isInView:u},e))}):null,t[174]=i,t[175]=m,t[176]=u,t[177]=S,t[178]=y.right,t[179]=Rt,t[180]=l,t[181]=qe):qe=t[181];let oe;if(t[182]!==i||t[183]!==Yt||t[184]!==x||t[185]!==m||t[186]!==u||t[187]!==y.right||t[188]!==z||t[189]!==a||t[190]!==l){let o;t[192]!==i||t[193]!==x||t[194]!==m||t[195]!==u||t[196]!==y.right||t[197]!==z||t[198]!==a||t[199]!==l?(o=(e,U)=>{const Tt=ii.getLineEndPoint({x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ci=e.showConnector?{y1:Tt.y,x1:Tt.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,circleRadius:qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,ui={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:z?0:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:z?e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0):m+y.right-(e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return s.jsxRuntimeExports.jsx(ii.Annotation,{color:e.color,connectorsSettings:ci,labelSettings:ui,text:e.text,classNames:e.classNames,styles:e.styles,animate:i,isInView:u},U)},t[192]=i,t[193]=x,t[194]=m,t[195]=u,t[196]=y.right,t[197]=z,t[198]=a,t[199]=l,t[200]=o):o=t[200],oe=Yt.map(o),t[182]=i,t[183]=Yt,t[184]=x,t[185]=m,t[186]=u,t[187]=y.right,t[188]=z,t[189]=a,t[190]=l,t[191]=oe}else oe=t[191];let $e;t[201]!==oe?($e=s.jsxRuntimeExports.jsx("g",{children:oe}),t[201]=oe,t[202]=$e):$e=t[202];let Me;t[203]!==G?(Me=G.filter(Ii).map(Di),t[203]=G,t[204]=Me):Me=t[204];let Fe;t[205]===Symbol.for("react.memo_cache_sentinel")?(Fe={fill:"none",pointerEvents:"all"},t[205]=Fe):Fe=t[205];let Ge;t[206]!==xt||t[207]!==v||t[208]!==m?(Ge=s.jsxRuntimeExports.jsx("rect",{ref:xt,style:Fe,width:m,height:v}),t[206]=xt,t[207]=v,t[208]=m,t[209]=Ge):Ge=t[209];let Pe;return t[210]!==d?.tooltip||t[211]!==p||t[212]!==Q||t[213]!==k||t[214]!==h?.tooltip||t[215]!==B?(Pe=k&&B&&p&&Q?s.jsxRuntimeExports.jsx(mi.Tooltip,{data:k,body:B,xPos:p,yPos:Q,backgroundStyle:h?.tooltip,className:d?.tooltip}):null,t[210]=d?.tooltip,t[211]=p,t[212]=Q,t[213]=k,t[214]=h?.tooltip,t[215]=B,t[216]=Pe):Pe=t[216],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(D.motion.svg,{width:`${rt}px`,height:`${$t}px`,viewBox:`0 0 ${rt} ${$t}`,direction:"ltr",ref:Ct,children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${y.left},${y.top})`,children:[s.jsxRuntimeExports.jsx("clipPath",{id:`above${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ue(n),style:ht})}),s.jsxRuntimeExports.jsx("clipPath",{id:`below${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ce(n),style:nt})}),yt,s.jsxRuntimeExports.jsx(ii.CustomArea,{areaSettings:re,scaleX:a,scaleY:l,animate:i,isInView:u}),s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Qt.filter($i),y:Qt.filter(qi).map(o=>l(o)),x1:0-S,x2:m+y.right,styles:st,classNames:Dt,suffix:O,prefix:w,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:E}),fe,pe]})}),s.jsxRuntimeExports.jsx(pi.XTicksAndGridLines,{values:ai,x:ri,y1:0,y2:v,styles:ye,classNames:ge,suffix:O,prefix:w,labelType:"primary",showGridLines:!0,precision:E}),je,s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#below${lt})`,d:St(n)||"",style:ve,exit:we,variants:be,initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#above${lt})`,d:St(n)||"",style:Ee,exit:Oe,variants:Ae,initial:"initial",animate:u?"whileInView":"initial"})]}),s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{d:pt(n)||"",style:Ve,exit:Le,variants:{initial:{pathLength:0,d:pt(n)||"",opacity:1},whileInView:{pathLength:1,d:pt(n)||"",opacity:1,transition:{duration:i.duration}}},initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{style:Se,exit:ke,variants:{initial:{pathLength:0,d:Kt(n)||"",opacity:1},whileInView:De},initial:"initial",animate:u?"whileInView":"initial"}),Ie,Ne,Te]}),qe,$e,Me,Ge]})}),Pe]})}function Di(r){return r.layer}function Ii(r){return r.position==="after"}function Ni(r){return r.layer}function Ti(r){return r.position==="before"}function qi(r){return r!==0}function $i(r){return r!==0}function Mi(r){return r.date}function Fi(r){return r.y2}function Gi(r){return r.y2}function Pi(r){return r.y1}function Hi(r){return r.y1}function Wi(r){return r.y2}function Yi(r){return r.y2}function Xi(r){return r.y2}function Ui(r){return r.y1}function Bi(r){return r.y1}function zi(r){return r.y1}function Ji(r){const t=s.compilerRuntimeExports.c(102),{data:j,graphTitle:rt,suffix:$t,sources:c,prefix:O,graphDescription:w,height:x,width:R,footNote:Mt,noOfXTicks:Ft,dateFormat:S,showValues:Gt,padding:wt,lineColors:B,backgroundColor:Pt,leftMargin:Ht,rightMargin:i,topMargin:z,bottomMargin:Wt,tooltip:$,highlightAreaSettings:I,relativeHeight:lt,onSeriesMouseOver:M,graphID:F,graphDownload:Rt,dataDownload:N,animate:bt,language:Yt,minHeight:Xt,labels:T,showColorLegendAtTop:de,colorLegendTitle:Ut,diffAreaColors:Et,strokeWidth:Ot,showDots:h,refValues:d,minValue:E,maxValue:G,annotations:Ct,customHighlightAreaSettings:J,theme:u,ariaLabel:f,yAxisTitle:se,noOfYTicks:At,minDate:ct,maxDate:K,curveType:k,styles:g,classNames:p,precision:ae,customLayers:Q}=r,Bt=$t===void 0?"":$t,Vt=O===void 0?"":O,ut=Ft===void 0?10:Ft,y=S===void 0?"yyyy":S,xt=Gt===void 0?!1:Gt;let Z;t[0]!==B?(Z=B===void 0?[We.Colors.light.categoricalColors.colors[0],We.Colors.light.categoricalColors.colors[1]]:B,t[0]=B,t[1]=Z):Z=t[1];const n=Z,mt=Pt===void 0?!1:Pt,Lt=Ht===void 0?30:Ht,dt=i===void 0?50:i,re=z===void 0?20:z,m=Wt===void 0?25:Wt;let v;t[2]!==I?(v=I===void 0?[]:I,t[2]=I,t[3]=v):v=t[3];const le=v,zt=Rt===void 0?!1:Rt,_=N===void 0?!1:N,tt=bt===void 0?!1:bt,P=Yt===void 0?"en":Yt,Jt=Xt===void 0?0:Xt,q=de===void 0?!1:de;let b;t[4]!==Et?(b=Et===void 0?[We.Colors.alerts.red,We.Colors.alerts.darkGreen]:Et,t[4]=Et,t[5]=b):b=t[5];const et=b,a=Ot===void 0?2:Ot,ft=h===void 0?!0:h;let it;t[6]!==d?(it=d===void 0?[]:d,t[6]=d,t[7]=it):it=t[7];const l=it;let pt;t[8]!==Ct?(pt=Ct===void 0?[]:Ct,t[8]=Ct,t[9]=pt):pt=t[9];const Kt=pt;let St;t[10]!==J?(St=J===void 0?[]:J,t[10]=J,t[11]=St):St=t[11];const ce=St,ue=u===void 0?"light":u,Qt=At===void 0?5:At,Zt=k===void 0?"curve":k,ht=ae===void 0?2:ae;let nt;t[12]!==Q?(nt=Q===void 0?[]:Q,t[12]=Q,t[13]=nt):nt=t[13];const yt=nt,[ot,xe]=L.useState(0),[st,me]=L.useState(0),kt=L.useRef(null),Dt=L.useRef(null);let gt,jt;t[14]===Symbol.for("react.memo_cache_sentinel")?(gt=()=>{const _t=new ResizeObserver(at=>{xe(at[0].target.clientWidth||620),me(at[0].target.clientHeight||480)});return kt.current&&_t.observe(kt.current),()=>_t.disconnect()},jt=[],t[14]=gt,t[15]=jt):(gt=t[14],jt=t[15]),L.useEffect(gt,jt);const It=p?.graphContainer,Nt=g?.graphContainer;let H;t[16]!==p?.description||t[17]!==p?.title||t[18]!==j||t[19]!==_||t[20]!==w||t[21]!==zt||t[22]!==rt||t[23]!==g?.description||t[24]!==g?.title||t[25]!==R?(H=rt||w||zt||_?s.jsxRuntimeExports.jsx(Ci.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:p?.title,description:p?.description},graphTitle:rt,graphDescription:w,width:R,graphDownload:zt?Dt:void 0,dataDownload:_?j.map(tn).filter(_i).length>0?j.map(Zi).filter(Qi):j.filter(Ki):null}):null,t[16]=p?.description,t[17]=p?.title,t[18]=j,t[19]=_,t[20]=w,t[21]=zt,t[22]=rt,t[23]=g?.description,t[24]=g?.title,t[25]=R,t[26]=H):H=t[26];let A;t[27]!==p?.colorLegend||t[28]!==Ut||t[29]!==j.length||t[30]!==T||t[31]!==n||t[32]!==q?(A=q&&j.length>0?s.jsxRuntimeExports.jsx(Ai.ColorLegend,{colorDomain:T,colorLegendTitle:Ut,colors:n,showNAColor:!1,className:p?.colorLegend}):null,t[27]=p?.colorLegend,t[28]=Ut,t[29]=j.length,t[30]=T,t[31]=n,t[32]=q,t[33]=A):A=t[33];let W;t[34]!==j.length?(W=j.length===0&&s.jsxRuntimeExports.jsx(Li.EmptyState,{}),t[34]=j.length,t[35]=W):W=t[35];let Y;t[36]!==tt||t[37]!==Kt||t[38]!==m||t[39]!==p||t[40]!==Zt||t[41]!==ce||t[42]!==yt||t[43]!==j||t[44]!==y||t[45]!==et||t[46]!==le||t[47]!==T||t[48]!==P||t[49]!==Lt||t[50]!==n||t[51]!==K||t[52]!==G||t[53]!==ct||t[54]!==E||t[55]!==ut||t[56]!==Qt||t[57]!==M||t[58]!==ht||t[59]!==Vt||t[60]!==l||t[61]!==dt||t[62]!==q||t[63]!==ft||t[64]!==xt||t[65]!==a||t[66]!==g||t[67]!==Bt||t[68]!==st||t[69]!==ot||t[70]!==$||t[71]!==re||t[72]!==se?(Y=ot&&st&&j.length>0?s.jsxRuntimeExports.jsx(ki,{data:j,lineColors:n,colorDomain:T,width:ot,height:st,suffix:Bt,prefix:Vt,dateFormat:y,showValues:xt,noOfXTicks:ut??Si.getNoOfTicks(ot),leftMargin:Lt,rightMargin:dt,topMargin:re,bottomMargin:m,highlightAreaSettings:le,tooltip:$,onSeriesMouseOver:M,showColorLegendAtTop:q,animate:tt===!0?{duration:.5,once:!0,amount:.5}:tt||{duration:0,once:!0,amount:0},rtl:P==="he"||P==="ar",diffAreaColors:et,idSuffix:Vi.generateRandomString(8),strokeWidth:a,showDots:ft,refValues:l,minValue:E,maxValue:G,annotations:Kt,customHighlightAreaSettings:ce,yAxisTitle:se,noOfYTicks:Qt,minDate:ct,maxDate:K,curveType:Zt,styles:g,classNames:p,precision:ht,customLayers:yt}):null,t[36]=tt,t[37]=Kt,t[38]=m,t[39]=p,t[40]=Zt,t[41]=ce,t[42]=yt,t[43]=j,t[44]=y,t[45]=et,t[46]=le,t[47]=T,t[48]=P,t[49]=Lt,t[50]=n,t[51]=K,t[52]=G,t[53]=ct,t[54]=E,t[55]=ut,t[56]=Qt,t[57]=M,t[58]=ht,t[59]=Vt,t[60]=l,t[61]=dt,t[62]=q,t[63]=ft,t[64]=xt,t[65]=a,t[66]=g,t[67]=Bt,t[68]=st,t[69]=ot,t[70]=$,t[71]=re,t[72]=se,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=s.jsxRuntimeExports.jsxs(si.GraphArea,{ref:kt,children:[W,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let V;t[77]!==p?.footnote||t[78]!==p?.source||t[79]!==Mt||t[80]!==c||t[81]!==g?.footnote||t[82]!==g?.source||t[83]!==R?(V=c||Mt?s.jsxRuntimeExports.jsx(Oi.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:c,footNote:Mt,width:R}):null,t[77]=p?.footnote,t[78]=p?.source,t[79]=Mt,t[80]=c,t[81]=g?.footnote,t[82]=g?.source,t[83]=R,t[84]=V):V=t[84];let vt;return t[85]!==f||t[86]!==mt||t[87]!==F||t[88]!==x||t[89]!==P||t[90]!==Jt||t[91]!==wt||t[92]!==lt||t[93]!==It||t[94]!==Nt||t[95]!==H||t[96]!==A||t[97]!==X||t[98]!==V||t[99]!==ue||t[100]!==R?(vt=s.jsxRuntimeExports.jsxs(si.GraphContainer,{className:It,style:Nt,id:F,ref:Dt,"aria-label":f,backgroundColor:mt,theme:ue,language:P,minHeight:Jt,width:R,height:x,relativeHeight:lt,padding:wt,children:[H,A,X,V]}),t[85]=f,t[86]=mt,t[87]=F,t[88]=x,t[89]=P,t[90]=Jt,t[91]=wt,t[92]=lt,t[93]=It,t[94]=Nt,t[95]=H,t[96]=A,t[97]=X,t[98]=V,t[99]=ue,t[100]=R,t[101]=vt):vt=t[101],vt}function Ki(r){return r!==void 0}function Qi(r){return r!==void 0}function Zi(r){return r.data}function _i(r){return r!==void 0}function tn(r){return r.data}exports.DifferenceLineChart=Ji;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),L=require("react"),C=require("./parse-xYI9yrvL.cjs"),xi=require("./index-Cno4Q0YE.cjs"),ei=require("./numberFormattingFunction-02t-wJta.cjs"),mi=require("./Tooltip-BLa2EfMs.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ii=require("./customArea-B1LWQBmM.cjs"),di=require("./AxisTitle-DV4n0RxE.cjs"),fi=require("./Axis-Jt_tmhxS.cjs"),pi=require("./XTicksAndGridLines-CekrPykD.cjs"),hi=require("./ReferenceLine-M9aP3dj-.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),gi=require("./index-D69M6klB.cjs"),ji=require("./time-CkcKbhwe.cjs"),vi=require("./linear-CgUCbw9F.cjs"),ni=require("./line-DaEMhXmx.cjs"),He=require("./step-BZ3C8QFW.cjs"),oi=require("./area-C1gxfNGD.cjs"),wi=require("./select-Bnfk0lJx.cjs"),D=require("./proxy-C4-uo6nS.cjs"),Ri=require("./init-DU0ybBc_.cjs"),bi=require("./pointer-Dkq5NV1q.cjs"),Ei=require("./use-in-view-C3o_ntMv.cjs"),Oi=require("./GraphFooter.cjs"),Ci=require("./GraphHeader.cjs"),Ai=require("./ColorLegend.cjs"),We=require("./Colors.cjs"),Vi=require("./generateRandomString-B5zBiJzS.cjs"),Li=require("./EmptyState-CGeBqbmR.cjs"),si=require("./GraphContainer-B1EDxJ0S.cjs"),Si=require("./getNoOfTicks-C_1CFXv_.cjs");function ki(r){const t=s.compilerRuntimeExports.c(217),{data:j,width:rt,height:$t,lineColors:c,suffix:O,prefix:w,dateFormat:x,showValues:R,noOfXTicks:Mt,rightMargin:Ft,leftMargin:S,topMargin:Gt,bottomMargin:wt,tooltip:B,highlightAreaSettings:Pt,onSeriesMouseOver:Ht,animate:i,rtl:z,showColorLegendAtTop:Wt,colorDomain:$,diffAreaColors:I,idSuffix:lt,strokeWidth:M,showDots:F,refValues:Rt,minValue:N,maxValue:bt,annotations:Yt,customHighlightAreaSettings:Xt,yAxisTitle:T,noOfYTicks:de,minDate:Ut,maxDate:Et,curveType:Ot,styles:h,classNames:d,precision:E,customLayers:G}=r,Ct=L.useRef(null);let J;t[0]!==i.amount||t[1]!==i.once?(J={once:i.once,amount:i.amount},t[0]=i.amount,t[1]=i.once,t[2]=J):J=t[2];const u=Ei.useInView(Ct,J),[f,se]=L.useState(!1);let At,ct;t[3]!==i.duration||t[4]!==f||t[5]!==u?(At=()=>{if(u&&!f){const o=setTimeout(()=>{se(!0)},(i.duration+.5)*1e3);return()=>clearTimeout(o)}},ct=[u,f,i.duration],t[3]=i.duration,t[4]=f,t[5]=u,t[6]=At,t[7]=ct):(At=t[6],ct=t[7]),L.useEffect(At,ct);const K=Ot==="linear"?ni.curveLinear:Ot==="step"?He.curveStep:Ot==="stepAfter"?He.stepAfter:Ot==="stepBefore"?He.stepBefore:He.monotoneX,[k,g]=L.useState(void 0),[p,ae]=L.useState(void 0),[Q,Bt]=L.useState(void 0),Vt=T?S+30:S;let ut;t[8]!==wt||t[9]!==Ft||t[10]!==Vt||t[11]!==Gt?(ut={top:Gt,bottom:wt,left:Vt,right:Ft},t[8]=wt,t[9]=Ft,t[10]=Vt,t[11]=Gt,t[12]=ut):ut=t[12];const y=ut,xt=L.useRef(null);let Z;t[13]!==x?(Z=o=>({...o,date:C.parse(`${o.date}`,x,new Date)}),t[13]=x,t[14]=Z):Z=t[14];const n=xi.orderBy(j.map(Z),["date"],["asc"]);let mt;if(t[15]!==x||t[16]!==Pt){let o;t[18]!==x?(o=e=>({...e,coordinates:[e.coordinates[0]===null?null:C.parse(`${e.coordinates[0]}`,x,new Date),e.coordinates[1]===null?null:C.parse(`${e.coordinates[1]}`,x,new Date)]}),t[18]=x,t[19]=o):o=t[19],mt=Pt.map(o),t[15]=x,t[16]=Pt,t[17]=mt}else mt=t[17];const Lt=mt;let dt;if(t[20]!==Xt||t[21]!==x){let o;t[23]!==x?(o=e=>({...e,coordinates:e.coordinates.map((U,Tt)=>Tt%2===0?C.parse(`${U}`,x,new Date):U)}),t[23]=x,t[24]=o):o=t[24],dt=Xt.map(o),t[20]=Xt,t[21]=x,t[22]=dt}else dt=t[22];const re=dt,m=rt-y.left-y.right,v=$t-y.top-y.bottom,le=Ut?C.parse(`${Ut}`,x,new Date):n[0].date,zt=Et?C.parse(`${Et}`,x,new Date):n[n.length-1].date,_=Math.min(...n.map(zi))!==1/0?Math.min(...n.map(Bi))>0?0:Math.min(...n.map(Ui)):0,tt=Math.min(...n.map(Xi))!==1/0?Math.min(...n.map(Yi))>0?0:Math.min(...n.map(Wi)):0,P=Math.max(...n.map(Hi))!==1/0?Math.max(...n.map(Pi)):0,Jt=Math.max(...n.map(Gi))!==1/0?Math.max(...n.map(Fi)):0;let q;t[25]!==_||t[26]!==tt||t[27]!==N?(q=qt.checkIfNullOrUndefined(N)?_<tt?_:tt:N,t[25]=_,t[26]=tt,t[27]=N,t[28]=q):q=t[28];const b=q,et=P>Jt?P:Jt,a=ji.time().domain([le,zt]).range([0,m]);let ft;t[29]!==b||t[30]!==N?(ft=qt.checkIfNullOrUndefined(N)?b:N,t[29]=b,t[30]=N,t[31]=ft):ft=t[31];let it;t[32]!==et||t[33]!==bt?(it=qt.checkIfNullOrUndefined(bt)?et>0?et:0:bt,t[32]=et,t[33]=bt,t[34]=it):it=t[34];const l=vi.linear().domain([ft,it]).range([v,0]).nice(),pt=ni.line().x(o=>a(o.date)).y(o=>l(o.y1)).curve(K),Kt=ni.line().x(o=>a(o.date)).y(o=>l(o.y2)).curve(K),St=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(o=>l(o.y2)).curve(K),ce=oi.area().x(o=>a(o.date)).y1(o=>l(o.y1)).y0(0).curve(K),ue=oi.area().x(o=>a(o.date)).y1(o=>l(o.y2)).y0(0).curve(K),Qt=l.ticks(de),Zt=a.ticks(Mt);L.useEffect(()=>{const o=U=>{const Tt=n[Ri.bisectCenter(n.map(Mi),a.invert(bi.pointer(U)[0]),0)];g(Tt||n[n.length-1]),Ht?.(Tt||n[n.length-1]),Bt(U.clientY),ae(U.clientX)},e=()=>{g(void 0),ae(void 0),Bt(void 0),Ht?.(void 0)};wi.select(xt.current).on("mousemove",o).on("mouseout",e)},[a,n,Ht]);let ht;t[35]===Symbol.for("react.memo_cache_sentinel")?(ht={fill:"none"},t[35]=ht):ht=t[35];let nt;t[36]===Symbol.for("react.memo_cache_sentinel")?(nt={fill:"none"},t[36]=nt):nt=t[36];let yt;t[37]!==i||t[38]!==v||t[39]!==m||t[40]!==Lt||t[41]!==u||t[42]!==a?(yt=s.jsxRuntimeExports.jsx(gi.HighlightArea,{areaSettings:Lt,width:m,height:v,scale:a,animate:i,isInView:u}),t[37]=i,t[38]=v,t[39]=m,t[40]=Lt,t[41]=u,t[42]=a,t[43]=yt):yt=t[43];const ot=h?.yAxis?.gridLines,xe=h?.yAxis?.labels;let st;t[44]!==ot||t[45]!==xe?(st={gridLines:ot,labels:xe},t[44]=ot,t[45]=xe,t[46]=st):st=t[46];const me=d?.yAxis?.gridLines,kt=d?.yAxis?.labels;let Dt;t[47]!==me||t[48]!==kt?(Dt={gridLines:me,labels:kt},t[47]=me,t[48]=kt,t[49]=Dt):Dt=t[49];const gt=l(b<0?0:b),jt=l(b<0?0:b),It=0-S,Nt=m+y.right,H=b<0?0:b;let A;t[50]!==E||t[51]!==w||t[52]!==O||t[53]!==H?(A=ei.numberFormattingFunction(H,"NA",E,w,O),t[50]=E,t[51]=w,t[52]=O,t[53]=H,t[54]=A):A=t[54];const W=0-S,Y=l(b<0?0:b),X=et<0?"1rem":-5;let V;t[55]!==W||t[56]!==Y||t[57]!==X?(V={x:W,y:Y,dx:0,dy:X},t[55]=W,t[56]=Y,t[57]=X,t[58]=V):V=t[58];const vt=d?.xAxis?.axis,_t=d?.yAxis?.labels;let at;t[59]!==vt||t[60]!==_t?(at={axis:vt,label:_t},t[59]=vt,t[60]=_t,t[61]=at):at=t[61];const Ye=h?.xAxis?.axis,Xe=h?.yAxis?.labels;let te;t[62]!==Ye||t[63]!==Xe?(te={axis:Ye,label:Xe},t[62]=Ye,t[63]=Xe,t[64]=te):te=t[64];let fe;t[65]!==gt||t[66]!==jt||t[67]!==It||t[68]!==Nt||t[69]!==A||t[70]!==V||t[71]!==at||t[72]!==te?(fe=s.jsxRuntimeExports.jsx(fi.Axis,{y1:gt,y2:jt,x1:It,x2:Nt,label:A,labelPos:V,classNames:at,styles:te}),t[65]=gt,t[66]=jt,t[67]=It,t[68]=Nt,t[69]=A,t[70]=V,t[71]=at,t[72]=te,t[73]=fe):fe=t[73];const Ue=0-S-15,Be=v/2,ze=h?.yAxis?.title,Je=d?.yAxis?.title;let pe;t[74]!==Ue||t[75]!==Be||t[76]!==ze||t[77]!==Je||t[78]!==T?(pe=s.jsxRuntimeExports.jsx(di.AxisTitle,{x:Ue,y:Be,style:ze,className:Je,text:T,rotate90:!0}),t[74]=Ue,t[75]=Be,t[76]=ze,t[77]=Je,t[78]=T,t[79]=pe):pe=t[79];let he;t[80]!==x?(he=o=>C.format(o,x),t[80]=x,t[81]=he):he=t[81];const ai=Zt.map(he),ri=Zt.map(o=>a(o)),Ke=h?.xAxis?.gridLines,Qe=h?.xAxis?.labels;let ye;t[82]!==Ke||t[83]!==Qe?(ye={gridLines:Ke,labels:Qe},t[82]=Ke,t[83]=Qe,t[84]=ye):ye=t[84];const Ze=d?.xAxis?.gridLines;let ee;t[85]!==Ze?(ee=s.mo("opacity-0",Ze),t[85]=Ze,t[86]=ee):ee=t[86];const _e=d?.xAxis?.labels;let ie;t[87]!==_e?(ie=s.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",_e),t[87]=_e,t[88]=ie):ie=t[88];let ge;t[89]!==ee||t[90]!==ie?(ge={gridLines:ee,labels:ie},t[89]=ee,t[90]=ie,t[91]=ge):ge=t[91];let je;t[92]!==G?(je=G.filter(Ti).map(Ni),t[92]=G,t[93]=je):je=t[93];let ve;t[94]!==I[1]?(ve={fill:I[1]},t[94]=I[1],t[95]=ve):ve=t[95];let we;t[96]!==i.duration?(we={opacity:0,transition:{duration:i.duration}},t[96]=i.duration,t[97]=we):we=t[97];let Re;t[98]===Symbol.for("react.memo_cache_sentinel")?(Re={opacity:1},t[98]=Re):Re=t[98];let be;t[99]!==i.duration?(be={initial:Re,whileInView:{opacity:1,transition:{duration:i.duration}}},t[99]=i.duration,t[100]=be):be=t[100];let Ee;t[101]!==I[0]?(Ee={fill:I[0]},t[101]=I[0],t[102]=Ee):Ee=t[102];let Oe;t[103]!==i.duration?(Oe={opacity:0,transition:{duration:i.duration}},t[103]=i.duration,t[104]=Oe):Oe=t[104];let Ce;t[105]===Symbol.for("react.memo_cache_sentinel")?(Ce={opacity:0},t[105]=Ce):Ce=t[105];let Ae;t[106]!==i.duration?(Ae={initial:Ce,whileInView:{opacity:1,transition:{duration:i.duration}}},t[106]=i.duration,t[107]=Ae):Ae=t[107];let Ve;t[108]!==c[0]||t[109]!==M?(Ve={fill:"none",stroke:c[0],strokeWidth:M},t[108]=c[0],t[109]=M,t[110]=Ve):Ve=t[110];let Le;t[111]!==i.duration?(Le={opacity:0,transition:{duration:i.duration}},t[111]=i.duration,t[112]=Le):Le=t[112];let Se;t[113]!==c[1]||t[114]!==M?(Se={fill:"none",stroke:c[1],strokeWidth:M},t[113]=c[1],t[114]=M,t[115]=Se):Se=t[115];let ke;t[116]!==i.duration?(ke={opacity:0,transition:{duration:i.duration}},t[116]=i.duration,t[117]=ke):ke=t[117];const li=1,ti=Kt(n)||"";let ne;t[118]!==i.duration?(ne={duration:i.duration},t[118]=i.duration,t[119]=ne):ne=t[119];let De;t[120]!==ti||t[121]!==ne?(De={pathLength:li,d:ti,opacity:1,transition:ne},t[120]=ti,t[121]=ne,t[122]=De):De=t[122];let Ie;t[123]!==i.duration||t[124]!==$||t[125]!==n||t[126]!==f||t[127]!==u||t[128]!==c[0]||t[129]!==c[1]||t[130]!==Wt||t[131]!==a||t[132]!==l?(Ie=Wt?null:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y1),fill:c[0],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[0]},$[0]),s.jsxRuntimeExports.jsx(D.motion.text,{className:"text-xs",dx:5,dy:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1]},whileInView:{opacity:1,x:a(n[n.length-1].date),y:l(n[n.length-1].y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:$[1]},$[1])]}),t[123]=i.duration,t[124]=$,t[125]=n,t[126]=f,t[127]=u,t[128]=c[0],t[129]=c[1],t[130]=Wt,t[131]=a,t[132]=l,t[133]=Ie):Ie=t[133];let Ne;t[134]!==d?.mouseOverLine||t[135]!==v||t[136]!==k||t[137]!==h?.mouseOverLine||t[138]!==a?(Ne=k?s.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:a(k.date),x2:a(k.date),className:s.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",d?.mouseOverLine),style:h?.mouseOverLine}):null,t[134]=d?.mouseOverLine,t[135]=v,t[136]=k,t[137]=h?.mouseOverLine,t[138]=a,t[139]=Ne):Ne=t[139];let Te;if(t[140]!==i.duration||t[141]!==d?.graphObjectValues||t[142]!==n||t[143]!==m||t[144]!==f||t[145]!==u||t[146]!==c[0]||t[147]!==c[1]||t[148]!==E||t[149]!==w||t[150]!==F||t[151]!==R||t[152]!==h?.graphObjectValues||t[153]!==O||t[154]!==a||t[155]!==l){let o;t[157]!==i.duration||t[158]!==d?.graphObjectValues||t[159]!==n.length||t[160]!==m||t[161]!==f||t[162]!==u||t[163]!==c[0]||t[164]!==c[1]||t[165]!==E||t[166]!==w||t[167]!==F||t[168]!==R||t[169]!==h?.graphObjectValues||t[170]!==O||t[171]!==a||t[172]!==l?(o=(e,U)=>s.jsxRuntimeExports.jsxs(D.motion.g,{children:[qt.checkIfNullOrUndefined(e.y1)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],transition:{duration:.5,delay:i.duration},cx:a(e.date),cy:l(e.y1)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2<e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-1 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y1),fill:c[0]},whileInView:{opacity:1,fill:c[0],x:a(e.date),y:l(e.y1),transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y1,"NA",E,w,O)}):null]}),qt.checkIfNullOrUndefined(e.y2)?null:s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[F?s.jsxRuntimeExports.jsx(D.motion.circle,{r:m/n.length<5?0:m/n.length<20?2:4,exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,cx:a(e.date),cy:l(e.y2),fill:c[1]},whileInView:{opacity:1,fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration},cx:a(e.date),cy:l(e.y2)}},initial:"initial",animate:u?"whileInView":"initial"}):null,R?s.jsxRuntimeExports.jsx(D.motion.text,{dy:e.y2>e.y1?-8:"1em",style:{textAnchor:"middle",...h?.graphObjectValues||{}},className:s.mo("graph-value graph-value-line-2 text-xs font-bold",d?.graphObjectValues),exit:{opacity:0,transition:{duration:i.duration}},variants:{initial:{opacity:0,x:a(e.date),y:l(e.y2),fill:c[1]},whileInView:{opacity:1,x:a(e.date),y:l(e.y2),fill:c[1],transition:{duration:f?i.duration:.5,delay:f?0:i.duration}}},initial:"initial",animate:u?"whileInView":"initial",children:ei.numberFormattingFunction(e.y2,"NA",E,w,O)}):null]})]},U),t[157]=i.duration,t[158]=d?.graphObjectValues,t[159]=n.length,t[160]=m,t[161]=f,t[162]=u,t[163]=c[0],t[164]=c[1],t[165]=E,t[166]=w,t[167]=F,t[168]=R,t[169]=h?.graphObjectValues,t[170]=O,t[171]=a,t[172]=l,t[173]=o):o=t[173],Te=n.map(o),t[140]=i.duration,t[141]=d?.graphObjectValues,t[142]=n,t[143]=m,t[144]=f,t[145]=u,t[146]=c[0],t[147]=c[1],t[148]=E,t[149]=w,t[150]=F,t[151]=R,t[152]=h?.graphObjectValues,t[153]=O,t[154]=a,t[155]=l,t[156]=Te}else Te=t[156];let qe;t[174]!==i||t[175]!==m||t[176]!==u||t[177]!==S||t[178]!==y.right||t[179]!==Rt||t[180]!==l?(qe=Rt?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Rt.map((o,e)=>s.jsxRuntimeExports.jsx(hi.RefLineY,{text:o.text,color:o.color,y:l(o.value),x1:0-S,x2:m+y.right,classNames:o.classNames,styles:o.styles,animate:i,isInView:u},e))}):null,t[174]=i,t[175]=m,t[176]=u,t[177]=S,t[178]=y.right,t[179]=Rt,t[180]=l,t[181]=qe):qe=t[181];let oe;if(t[182]!==i||t[183]!==Yt||t[184]!==x||t[185]!==m||t[186]!==u||t[187]!==y.right||t[188]!==z||t[189]!==a||t[190]!==l){let o;t[192]!==i||t[193]!==x||t[194]!==m||t[195]!==u||t[196]!==y.right||t[197]!==z||t[198]!==a||t[199]!==l?(o=(e,U)=>{const Tt=ii.getLineEndPoint({x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ci=e.showConnector?{y1:Tt.y,x1:Tt.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date)):0,circleRadius:qt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,ui={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:z?0:e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:z?e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0):m+y.right-(e.xCoordinate?a(C.parse(`${e.xCoordinate}`,x,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return s.jsxRuntimeExports.jsx(ii.Annotation,{color:e.color,connectorsSettings:ci,labelSettings:ui,text:e.text,classNames:e.classNames,styles:e.styles,animate:i,isInView:u},U)},t[192]=i,t[193]=x,t[194]=m,t[195]=u,t[196]=y.right,t[197]=z,t[198]=a,t[199]=l,t[200]=o):o=t[200],oe=Yt.map(o),t[182]=i,t[183]=Yt,t[184]=x,t[185]=m,t[186]=u,t[187]=y.right,t[188]=z,t[189]=a,t[190]=l,t[191]=oe}else oe=t[191];let $e;t[201]!==oe?($e=s.jsxRuntimeExports.jsx("g",{children:oe}),t[201]=oe,t[202]=$e):$e=t[202];let Me;t[203]!==G?(Me=G.filter(Ii).map(Di),t[203]=G,t[204]=Me):Me=t[204];let Fe;t[205]===Symbol.for("react.memo_cache_sentinel")?(Fe={fill:"none",pointerEvents:"all"},t[205]=Fe):Fe=t[205];let Ge;t[206]!==xt||t[207]!==v||t[208]!==m?(Ge=s.jsxRuntimeExports.jsx("rect",{ref:xt,style:Fe,width:m,height:v}),t[206]=xt,t[207]=v,t[208]=m,t[209]=Ge):Ge=t[209];let Pe;return t[210]!==d?.tooltip||t[211]!==p||t[212]!==Q||t[213]!==k||t[214]!==h?.tooltip||t[215]!==B?(Pe=k&&B&&p&&Q?s.jsxRuntimeExports.jsx(mi.Tooltip,{data:k,body:B,xPos:p,yPos:Q,backgroundStyle:h?.tooltip,className:d?.tooltip}):null,t[210]=d?.tooltip,t[211]=p,t[212]=Q,t[213]=k,t[214]=h?.tooltip,t[215]=B,t[216]=Pe):Pe=t[216],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(D.motion.svg,{width:`${rt}px`,height:`${$t}px`,viewBox:`0 0 ${rt} ${$t}`,direction:"ltr",ref:Ct,children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${y.left},${y.top})`,children:[s.jsxRuntimeExports.jsx("clipPath",{id:`above${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ue(n),style:ht})}),s.jsxRuntimeExports.jsx("clipPath",{id:`below${lt}`,children:s.jsxRuntimeExports.jsx("path",{d:ce(n),style:nt})}),yt,s.jsxRuntimeExports.jsx(ii.CustomArea,{areaSettings:re,scaleX:a,scaleY:l,animate:i,isInView:u}),s.jsxRuntimeExports.jsx("g",{children:s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Qt.filter($i),y:Qt.filter(qi).map(o=>l(o)),x1:0-S,x2:m+y.right,styles:st,classNames:Dt,suffix:O,prefix:w,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:E}),fe,pe]})}),s.jsxRuntimeExports.jsx(pi.XTicksAndGridLines,{values:ai,x:ri,y1:0,y2:v,styles:ye,classNames:ge,suffix:O,prefix:w,labelType:"primary",showGridLines:!0,precision:E}),je,s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#below${lt})`,d:St(n)||"",style:ve,exit:we,variants:be,initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{clipPath:`url(#above${lt})`,d:St(n)||"",style:Ee,exit:Oe,variants:Ae,initial:"initial",animate:u?"whileInView":"initial"})]}),s.jsxRuntimeExports.jsxs("g",{children:[s.jsxRuntimeExports.jsx(D.motion.path,{d:pt(n)||"",style:Ve,exit:Le,variants:{initial:{pathLength:0,d:pt(n)||"",opacity:1},whileInView:{pathLength:1,d:pt(n)||"",opacity:1,transition:{duration:i.duration}}},initial:"initial",animate:u?"whileInView":"initial"}),s.jsxRuntimeExports.jsx(D.motion.path,{style:Se,exit:ke,variants:{initial:{pathLength:0,d:Kt(n)||"",opacity:1},whileInView:De},initial:"initial",animate:u?"whileInView":"initial"}),Ie,Ne,Te]}),qe,$e,Me,Ge]})}),Pe]})}function Di(r){return r.layer}function Ii(r){return r.position==="after"}function Ni(r){return r.layer}function Ti(r){return r.position==="before"}function qi(r){return r!==0}function $i(r){return r!==0}function Mi(r){return r.date}function Fi(r){return r.y2}function Gi(r){return r.y2}function Pi(r){return r.y1}function Hi(r){return r.y1}function Wi(r){return r.y2}function Yi(r){return r.y2}function Xi(r){return r.y2}function Ui(r){return r.y1}function Bi(r){return r.y1}function zi(r){return r.y1}function Ji(r){const t=s.compilerRuntimeExports.c(102),{data:j,graphTitle:rt,suffix:$t,sources:c,prefix:O,graphDescription:w,height:x,width:R,footNote:Mt,noOfXTicks:Ft,dateFormat:S,showValues:Gt,padding:wt,lineColors:B,backgroundColor:Pt,leftMargin:Ht,rightMargin:i,topMargin:z,bottomMargin:Wt,tooltip:$,highlightAreaSettings:I,relativeHeight:lt,onSeriesMouseOver:M,graphID:F,graphDownload:Rt,dataDownload:N,animate:bt,language:Yt,minHeight:Xt,labels:T,showColorLegendAtTop:de,colorLegendTitle:Ut,diffAreaColors:Et,strokeWidth:Ot,showDots:h,refValues:d,minValue:E,maxValue:G,annotations:Ct,customHighlightAreaSettings:J,theme:u,ariaLabel:f,yAxisTitle:se,noOfYTicks:At,minDate:ct,maxDate:K,curveType:k,styles:g,classNames:p,precision:ae,customLayers:Q}=r,Bt=$t===void 0?"":$t,Vt=O===void 0?"":O,ut=Ft===void 0?10:Ft,y=S===void 0?"yyyy":S,xt=Gt===void 0?!1:Gt;let Z;t[0]!==B?(Z=B===void 0?[We.Colors.light.categoricalColors.colors[0],We.Colors.light.categoricalColors.colors[1]]:B,t[0]=B,t[1]=Z):Z=t[1];const n=Z,mt=Pt===void 0?!1:Pt,Lt=Ht===void 0?30:Ht,dt=i===void 0?50:i,re=z===void 0?20:z,m=Wt===void 0?25:Wt;let v;t[2]!==I?(v=I===void 0?[]:I,t[2]=I,t[3]=v):v=t[3];const le=v,zt=Rt===void 0?!1:Rt,_=N===void 0?!1:N,tt=bt===void 0?!1:bt,P=Yt===void 0?"en":Yt,Jt=Xt===void 0?0:Xt,q=de===void 0?!1:de;let b;t[4]!==Et?(b=Et===void 0?[We.Colors.alerts.red,We.Colors.alerts.darkGreen]:Et,t[4]=Et,t[5]=b):b=t[5];const et=b,a=Ot===void 0?2:Ot,ft=h===void 0?!0:h;let it;t[6]!==d?(it=d===void 0?[]:d,t[6]=d,t[7]=it):it=t[7];const l=it;let pt;t[8]!==Ct?(pt=Ct===void 0?[]:Ct,t[8]=Ct,t[9]=pt):pt=t[9];const Kt=pt;let St;t[10]!==J?(St=J===void 0?[]:J,t[10]=J,t[11]=St):St=t[11];const ce=St,ue=u===void 0?"light":u,Qt=At===void 0?5:At,Zt=k===void 0?"curve":k,ht=ae===void 0?2:ae;let nt;t[12]!==Q?(nt=Q===void 0?[]:Q,t[12]=Q,t[13]=nt):nt=t[13];const yt=nt,[ot,xe]=L.useState(0),[st,me]=L.useState(0),kt=L.useRef(null),Dt=L.useRef(null);let gt,jt;t[14]===Symbol.for("react.memo_cache_sentinel")?(gt=()=>{const _t=new ResizeObserver(at=>{xe(at[0].target.clientWidth||620),me(at[0].target.clientHeight||480)});return kt.current&&_t.observe(kt.current),()=>_t.disconnect()},jt=[],t[14]=gt,t[15]=jt):(gt=t[14],jt=t[15]),L.useEffect(gt,jt);const It=p?.graphContainer,Nt=g?.graphContainer;let H;t[16]!==p?.description||t[17]!==p?.title||t[18]!==j||t[19]!==_||t[20]!==w||t[21]!==zt||t[22]!==rt||t[23]!==g?.description||t[24]!==g?.title||t[25]!==R?(H=rt||w||zt||_?s.jsxRuntimeExports.jsx(Ci.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:p?.title,description:p?.description},graphTitle:rt,graphDescription:w,width:R,graphDownload:zt?Dt:void 0,dataDownload:_?j.map(tn).filter(_i).length>0?j.map(Zi).filter(Qi):j.filter(Ki):null}):null,t[16]=p?.description,t[17]=p?.title,t[18]=j,t[19]=_,t[20]=w,t[21]=zt,t[22]=rt,t[23]=g?.description,t[24]=g?.title,t[25]=R,t[26]=H):H=t[26];let A;t[27]!==p?.colorLegend||t[28]!==Ut||t[29]!==j.length||t[30]!==T||t[31]!==n||t[32]!==q?(A=q&&j.length>0?s.jsxRuntimeExports.jsx(Ai.ColorLegend,{colorDomain:T,colorLegendTitle:Ut,colors:n,showNAColor:!1,className:p?.colorLegend}):null,t[27]=p?.colorLegend,t[28]=Ut,t[29]=j.length,t[30]=T,t[31]=n,t[32]=q,t[33]=A):A=t[33];let W;t[34]!==j.length?(W=j.length===0&&s.jsxRuntimeExports.jsx(Li.EmptyState,{}),t[34]=j.length,t[35]=W):W=t[35];let Y;t[36]!==tt||t[37]!==Kt||t[38]!==m||t[39]!==p||t[40]!==Zt||t[41]!==ce||t[42]!==yt||t[43]!==j||t[44]!==y||t[45]!==et||t[46]!==le||t[47]!==T||t[48]!==P||t[49]!==Lt||t[50]!==n||t[51]!==K||t[52]!==G||t[53]!==ct||t[54]!==E||t[55]!==ut||t[56]!==Qt||t[57]!==M||t[58]!==ht||t[59]!==Vt||t[60]!==l||t[61]!==dt||t[62]!==q||t[63]!==ft||t[64]!==xt||t[65]!==a||t[66]!==g||t[67]!==Bt||t[68]!==st||t[69]!==ot||t[70]!==$||t[71]!==re||t[72]!==se?(Y=ot&&st&&j.length>0?s.jsxRuntimeExports.jsx(ki,{data:j,lineColors:n,colorDomain:T,width:ot,height:st,suffix:Bt,prefix:Vt,dateFormat:y,showValues:xt,noOfXTicks:ut??Si.getNoOfTicks(ot),leftMargin:Lt,rightMargin:dt,topMargin:re,bottomMargin:m,highlightAreaSettings:le,tooltip:$,onSeriesMouseOver:M,showColorLegendAtTop:q,animate:tt===!0?{duration:.5,once:!0,amount:.5}:tt||{duration:0,once:!0,amount:0},rtl:P==="he"||P==="ar",diffAreaColors:et,idSuffix:Vi.generateRandomString(8),strokeWidth:a,showDots:ft,refValues:l,minValue:E,maxValue:G,annotations:Kt,customHighlightAreaSettings:ce,yAxisTitle:se,noOfYTicks:Qt,minDate:ct,maxDate:K,curveType:Zt,styles:g,classNames:p,precision:ht,customLayers:yt}):null,t[36]=tt,t[37]=Kt,t[38]=m,t[39]=p,t[40]=Zt,t[41]=ce,t[42]=yt,t[43]=j,t[44]=y,t[45]=et,t[46]=le,t[47]=T,t[48]=P,t[49]=Lt,t[50]=n,t[51]=K,t[52]=G,t[53]=ct,t[54]=E,t[55]=ut,t[56]=Qt,t[57]=M,t[58]=ht,t[59]=Vt,t[60]=l,t[61]=dt,t[62]=q,t[63]=ft,t[64]=xt,t[65]=a,t[66]=g,t[67]=Bt,t[68]=st,t[69]=ot,t[70]=$,t[71]=re,t[72]=se,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=s.jsxRuntimeExports.jsxs(si.GraphArea,{ref:kt,children:[W,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let V;t[77]!==p?.footnote||t[78]!==p?.source||t[79]!==Mt||t[80]!==c||t[81]!==g?.footnote||t[82]!==g?.source||t[83]!==R?(V=c||Mt?s.jsxRuntimeExports.jsx(Oi.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:c,footNote:Mt,width:R}):null,t[77]=p?.footnote,t[78]=p?.source,t[79]=Mt,t[80]=c,t[81]=g?.footnote,t[82]=g?.source,t[83]=R,t[84]=V):V=t[84];let vt;return t[85]!==f||t[86]!==mt||t[87]!==F||t[88]!==x||t[89]!==P||t[90]!==Jt||t[91]!==wt||t[92]!==lt||t[93]!==It||t[94]!==Nt||t[95]!==H||t[96]!==A||t[97]!==X||t[98]!==V||t[99]!==ue||t[100]!==R?(vt=s.jsxRuntimeExports.jsxs(si.GraphContainer,{className:It,style:Nt,id:F,ref:Dt,"aria-label":f,backgroundColor:mt,theme:ue,language:P,minHeight:Jt,width:R,height:x,relativeHeight:lt,padding:wt,children:[H,A,X,V]}),t[85]=f,t[86]=mt,t[87]=F,t[88]=x,t[89]=P,t[90]=Jt,t[91]=wt,t[92]=lt,t[93]=It,t[94]=Nt,t[95]=H,t[96]=A,t[97]=X,t[98]=V,t[99]=ue,t[100]=R,t[101]=vt):vt=t[101],vt}function Ki(r){return r!==void 0}function Qi(r){return r!==void 0}function Zi(r){return r.data}function _i(r){return r!==void 0}function tn(r){return r.data}exports.DifferenceLineChart=Ji;
2
2
  //# sourceMappingURL=DifferenceLineChart.cjs.map
@@ -7,7 +7,7 @@ import { T as hi } from "./Tooltip-BRnAz2Gv.js";
7
7
  import { c as Nt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
8
8
  import { C as pi, g as xi, A as yi } from "./customArea-ASDaSE4u.js";
9
9
  import { A as gi } from "./AxisTitle-VFq89Olw.js";
10
- import { A as vi } from "./Axis-DoOqnt6g.js";
10
+ import { A as vi } from "./Axis-D56Gy0se.js";
11
11
  import { X as wi } from "./XTicksAndGridLines-CVZkZkpS.js";
12
12
  import { a as bi } from "./ReferenceLine-DgtoRgw0.js";
13
13
  import { Y as ji } from "./YTicksAndGridLines-GnXnSRF2.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),ct=require("./parse-xYI9yrvL.cjs"),ut=require("./getSliderMarks-CIuSoedo.cjs"),gt=require("./Spinner-jTMOLuw_.cjs"),ft=require("./index-DQA8q5sC.cjs"),X=require("./zoom-ChcvXFIz.cjs"),yt=require("./Typography-sa1UE0oF.cjs"),vt=require("./index-C5K--w8d.cjs"),bt=require("./Tooltip-BLa2EfMs.cjs"),R=require("./Colors.cjs"),st=require("./index-C6er0ety.cjs"),jt=require("./DetailsModal-DHttOA80.cjs"),Et=require("./pow-BnyPO-NX.cjs"),it=require("./select-Bnfk0lJx.cjs"),Ye=require("./proxy-C4-uo6nS.cjs"),wt=require("./use-in-view-C3o_ntMv.cjs"),Ct=require("./index-CoobIWNj.cjs"),Dt=require("./GraphFooter.cjs"),Rt=require("./GraphHeader.cjs"),St=require("./fetchAndParseData-QTF6tjij.cjs"),kt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Nt=require("./uniqBy-O05lp2S5.cjs"),dt=require("./GraphContainer-B1EDxJ0S.cjs");function Ot(n){const{data:e,colors:r,mapData:Y,colorLegendTitle:P,colorDomain:f,radius:k,height:x,width:p,scale:h,centerPoint:z,tooltip:K,showLabels:xe,mapBorderWidth:ge,mapBorderColor:fe,mapNoDataColor:Z,onSeriesMouseOver:J,showColorScale:$e,zoomScaleExtend:qe,zoomTranslateExtend:Me,highlightedDataPoints:ye,onSeriesMouseClick:Q,resetSelectionOnDoubleClick:ve,detailsOnClick:b,styles:ee,classNames:A,mapProjection:F,zoomInteraction:S,animate:E,dimmedOpacity:te,customLayers:W,maxRadiusValue:be,collapseColorScaleByDefault:je}=n,[Ee,we]=c.useState(void 0),[Pe,Ce]=c.useState(je===void 0?!(p<680):!je),oe=c.useRef(null),[T,re]=c.useState(void 0),[ae,u]=c.useState(void 0),[m,G]=c.useState(void 0),[De,ne]=c.useState(void 0),I=c.useRef(null),L=wt.useInView(I,{once:E.once,amount:E.amount}),H=c.useRef(null),C=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?Et.sqrt().domain([0,be]).range([.25,k]).nice():void 0;c.useEffect(()=>{const t=it.select(H.current),g=it.select(I.current),a=s=>{if(S==="noZoom")return!1;if(S==="button")return!s.type.includes("wheel");const w=s.type==="wheel",j=s.type.startsWith("touch"),v=s.type==="mousedown"||s.type==="mousemove";return j?!0:w?S==="scroll"?!0:s.ctrlKey:v&&!s.button&&!s.ctrlKey},D=X.zoom().scaleExtent(qe).translateExtent(Me||[[-20,-20],[p+20,x+20]]).filter(a).on("zoom",({transform:s})=>{t.attr("transform",s)});g.call(D),oe.current=D},[x,p,S]);const V=X.index_default(Y),y=vt.index_default(Y),ie=V[2]-V[0],Re=V[3]-V[1],Se=p*190/960*360/ie,ke=x*190/678*180/Re,N=h*Math.min(Se,ke),_=F==="mercator"?X.geoMercator().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="equalEarth"?X.geoEqualEarth().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="naturalEarth"?X.geoNaturalEarth1().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N):F==="orthographic"?X.geoOrthographic().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N):X.geoAlbersUsa().rotate([0,0]).center(z||y.geometry.coordinates).translate([p/2,x/2]).scale(N),se=t=>{if(!I.current||!oe.current)return;it.select(I.current).call(oe.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(Ye.motion.svg,{width:`${p}px`,height:`${x}px`,viewBox:`0 0 ${p} ${x}`,ref:I,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:H,children:[W.filter(t=>t.position==="before").map(t=>t.layer),Y.features.map((t,g)=>o.jsxRuntimeExports.jsx("g",{children:t.geometry.type==="MultiPolygon"?t.geometry.coordinates.map((a,D)=>{let s="";return a.forEach(w=>{let j=" M";w.forEach((v,le)=>{const B=_([v[0],v[1]]);le!==w.length-1?j=`${j}${B[0]} ${B[1]}L`:j=`${j}${B[0]} ${B[1]}`}),s+=j}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:fe,strokeWidth:ge,fill:Z}},D)}):t.geometry.coordinates.map((a,D)=>{let s="M";return a.forEach((w,j)=>{const v=_([w[0],w[1]]);j!==a.length-1?s=`${s}${v[0]} ${v[1]}L`:s=`${s}${v[0]} ${v[1]}`}),o.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:fe,strokeWidth:ge,fill:Z}},D)})},g)),o.jsxRuntimeExports.jsx(Ct.AnimatePresence,{children:e.map(t=>{const g=e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray;return o.jsxRuntimeExports.jsxs(Ye.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:Ee?Ee===g?1:te:ye.length!==0?ye.indexOf(t.label||"")!==-1?1:te:1,transition:{duration:E.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:a=>{u(t),ne(a.clientY),G(a.clientX),J?.(t)},onMouseMove:a=>{u(t),ne(a.clientY),G(a.clientX)},onMouseLeave:()=>{u(void 0),G(void 0),ne(void 0),J?.(void 0)},onClick:()=>{(Q||b)&&(ft.isEqual(T,t)&&ve?(re(void 0),Q?.(void 0)):(re(t),Q?.(t)))},transform:`translate(${_([t.long,t.lat])[0]},${_([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(Ye.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray},whileInView:{r:C?C(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray,stroke:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{r:0,transition:{duration:E.duration}},style:{fillOpacity:.8}}),xe&&t.label?o.jsxRuntimeExports.jsx(Ye.motion.text,{variants:{initial:{opacity:0,x:C?C(t.radius||0):k,fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray},whileInView:{opacity:1,x:C?C(t.radius||0):k,transition:{duration:E.duration},fill:e.filter(a=>a.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:R.Colors.gray}},initial:"initial",animate:L?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},y:0,className:o.mo("graph-value text-sm",A?.graphObjectValues),style:{textAnchor:"start",...ee?.graphObjectValues||{}},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),W.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||$e===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",A?.colorLegend),children:Pe?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{Ce(!1)},children:o.jsxRuntimeExports.jsx(st.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[P&&P!==""?o.jsxRuntimeExports.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:P}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((t,g)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{we(r[g%r.length])},onMouseLeave:()=>{we(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[g%r.length]}}),o.jsxRuntimeExports.jsx(yt.j,{size:"sm",marginBottom:"none",leading:"none",children:t})]},g))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{Ce(!0)},children:o.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),S==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>se("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>se("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),b&&T!==void 0?o.jsxRuntimeExports.jsx(jt.DetailsModal,{body:b,data:T,setData:re,className:A?.modal}):null,ae&&K&&m&&De?o.jsxRuntimeExports.jsx(bt.Tooltip,{data:ae,body:K,xPos:m,yPos:De,backgroundStyle:ee?.tooltip,className:A?.tooltip}):null]})}function $t(n){const e=o.compilerRuntimeExports.c(117),{data:r,mapData:Y,graphTitle:P,colors:f,sources:k,graphDescription:x,height:p,width:h,footNote:z,colorLegendTitle:K,colorDomain:xe,radius:ge,scale:fe,centerPoint:Z,padding:J,mapBorderWidth:$e,mapNoDataColor:qe,backgroundColor:Me,showLabels:ye,mapBorderColor:Q,tooltip:ve,relativeHeight:b,onSeriesMouseOver:ee,isWorldMap:A,showColorScale:F,zoomScaleExtend:S,zoomTranslateExtend:E,graphID:te,highlightedDataPoints:W,onSeriesMouseClick:be,graphDownload:je,dataDownload:Ee,showAntarctica:we,language:Pe,minHeight:Ce,theme:oe,ariaLabel:T,resetSelectionOnDoubleClick:re,detailsOnClick:ae,styles:u,classNames:m,mapProjection:G,zoomInteraction:De,animate:ne,dimmedOpacity:I,customLayers:L,maxRadiusValue:H,timeline:C,collapseColorScaleByDefault:V}=n,y=Y===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":Y,ie=z===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":z,Re=ge===void 0?5:ge,Se=fe===void 0?.95:fe,ke=$e===void 0?.5:$e,N=qe===void 0?R.Colors.light.graphNoData:qe,_=Me===void 0?!1:Me,se=ye===void 0?!1:ye,t=Q===void 0?R.Colors.light.grays["gray-500"]:Q,g=A===void 0?!0:A,a=F===void 0?!0:F;let D;e[0]!==S?(D=S===void 0?[.8,6]:S,e[0]=S,e[1]=D):D=e[1];const s=D;let w;e[2]!==W?(w=W===void 0?[]:W,e[2]=W,e[3]=w):w=e[3];const j=w,v=je===void 0?!1:je,le=Ee===void 0?!1:Ee,B=we===void 0?!1:we,Ke=Pe===void 0?"en":Pe,O=Ce===void 0?0:Ce,ce=oe===void 0?"light":oe,Ze=re===void 0?!0:re,Je=De===void 0?"button":De,ze=ne===void 0?!1:ne,Qe=I===void 0?.3:I;let Ie;e[4]!==L?(Ie=L===void 0?[]:L,e[4]=L,e[5]=Ie):Ie=e[5];const et=Ie;let Le;e[6]!==C?(Le=C===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:C,e[6]=C,e[7]=Le):Le=e[7];const i=Le,[U,mt]=c.useState(0),[Ne,pt]=c.useState(0),[$,ht]=c.useState(i.autoplay);let Oe;if(e[8]!==r||e[9]!==i.dateFormat){let d;e[11]!==i.dateFormat?(d=M=>ct.parse(`${M.date}`,i.dateFormat||"yyyy",new Date).getTime(),e[11]=i.dateFormat,e[12]=d):d=e[12],Oe=[...new Set(r.filter(Wt).map(d))],Oe.sort(Ft),e[8]=r,e[9]=i.dateFormat,e[10]=Oe}else Oe=e[10];const l=Oe,[q,tt]=c.useState(i.autoplay?0:l.length-1),[ue,xt]=c.useState(void 0),ot=c.useRef(null),lt=c.useRef(null);let Ve,_e;e[13]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>{const d=new ResizeObserver(M=>{mt(M[0].target.clientWidth||620),pt(M[0].target.clientHeight||480)});return ot.current&&d.observe(ot.current),()=>d.disconnect()},_e=[],e[13]=Ve,e[14]=_e):(Ve=e[13],_e=e[14]),c.useEffect(Ve,_e);let Be;e[15]===Symbol.for("react.memo_cache_sentinel")?(Be=d=>{xt(d)},e[15]=Be):Be=e[15];const Ae=c.useEffectEvent(Be);let Fe;e[16]!==y||e[17]!==Ae?(Fe=()=>{typeof y=="string"?St.fetchAndParseJSON(y).then(M=>{Ae(M)}):Ae(y)},e[16]=y,e[17]=Ae,e[18]=Fe):Fe=e[18];let We;e[19]!==y?(We=[y],e[19]=y,e[20]=We):We=e[20],c.useEffect(Fe,We);let Te,Ge;e[21]!==$||e[22]!==i.speed||e[23]!==l?(Te=()=>{const d=setInterval(()=>{tt(M=>M<l.length-1?M+1:0)},(i.speed||2)*1e3);return $||clearInterval(d),()=>clearInterval(d)},Ge=[l,$,i.speed],e[21]=$,e[22]=i.speed,e[23]=l,e[24]=Te,e[25]=Ge):(Te=e[24],Ge=e[25]),c.useEffect(Te,Ge);const rt=i.dateFormat||"yyyy";let He;e[26]!==q||e[27]!==rt||e[28]!==i.showOnlyActiveDate||e[29]!==l?(He=ut.getSliderMarks(l,q,i.showOnlyActiveDate,rt),e[26]=q,e[27]=rt,e[28]=i.showOnlyActiveDate,e[29]=l,e[30]=He):He=e[30];const Ue=He,at=m?.graphContainer,nt=u?.graphContainer;let de;e[31]!==m?.description||e[32]!==m?.title||e[33]!==r||e[34]!==le||e[35]!==x||e[36]!==v||e[37]!==P||e[38]!==u?.description||e[39]!==u?.title||e[40]!==h?(de=P||x||v||le?o.jsxRuntimeExports.jsx(Rt.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:m?.title,description:m?.description},graphTitle:P,graphDescription:x,width:h,graphDownload:v?lt:void 0,dataDownload:le?r.map(At).filter(Bt).length>0?r.map(_t).filter(Vt):r.filter(Lt):null}):null,e[31]=m?.description,e[32]=m?.title,e[33]=r,e[34]=le,e[35]=x,e[36]=v,e[37]=P,e[38]=u?.description,e[39]=u?.title,e[40]=h,e[41]=de):de=e[41];let me;e[42]!==q||e[43]!==Ue||e[44]!==$||e[45]!==i.enabled||e[46]!==l?(me=i.enabled&&l.length>0&&Ue?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{ht(!$)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":$?"Click to pause animation":"Click to play animation",children:$?o.jsxRuntimeExports.jsx(st.Pause,{}):o.jsxRuntimeExports.jsx(st.Play,{})}),o.jsxRuntimeExports.jsx(ut.Nr,{min:l[0],max:l[l.length-1],marks:Ue,step:null,defaultValue:l[l.length-1],value:l[q],onChangeComplete:d=>{tt(l.indexOf(d))},onChange:d=>{tt(l.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[42]=q,e[43]=Ue,e[44]=$,e[45]=i.enabled,e[46]=l,e[47]=me):me=e[47];let pe;e[48]!==ze||e[49]!==Z||e[50]!==m||e[51]!==V||e[52]!==xe||e[53]!==K||e[54]!==f||e[55]!==et||e[56]!==r||e[57]!==ae||e[58]!==Qe||e[59]!==p||e[60]!==j||e[61]!==q||e[62]!==g||e[63]!==t||e[64]!==ke||e[65]!==N||e[66]!==G||e[67]!==ue||e[68]!==H||e[69]!==O||e[70]!==be||e[71]!==ee||e[72]!==Re||e[73]!==b||e[74]!==Ze||e[75]!==Se||e[76]!==B||e[77]!==a||e[78]!==se||e[79]!==u||e[80]!==Ne||e[81]!==U||e[82]!==ce||e[83]!==i.dateFormat||e[84]!==i.enabled||e[85]!==ve||e[86]!==l||e[87]!==h||e[88]!==Je||e[89]!==s||e[90]!==E?(pe=o.jsxRuntimeExports.jsx(dt.GraphArea,{ref:ot,children:U&&Ne&&ue?o.jsxRuntimeExports.jsx(Ot,{data:r.filter(d=>i.enabled?d.date===ct.format(new Date(l[q]),i.dateFormat||"yyyy"):d),mapData:B?ue:{...ue,features:ue.features.filter(It)},colorDomain:r.filter(zt).length===0?[]:xe||Nt.uniqBy(r,"color",!0),width:U,height:Ne,scale:Se,centerPoint:Z,colors:r.filter(Pt).length===0?f?[f]:[R.Colors.primaryColors["blue-600"]]:f||R.Colors[ce].categoricalColors.colors,colorLegendTitle:K,radius:Re,mapBorderWidth:ke,mapNoDataColor:N,mapBorderColor:t,tooltip:ve,onSeriesMouseOver:ee,showLabels:se,isWorldMap:g,showColorScale:a,zoomScaleExtend:s,zoomTranslateExtend:E,onSeriesMouseClick:be,highlightedDataPoints:j,resetSelectionOnDoubleClick:Ze,styles:u,classNames:m,zoomInteraction:Je,detailsOnClick:ae,mapProjection:G||(g?"naturalEarth":"mercator"),animate:ze===!0?{duration:.5,once:!0,amount:.5}:ze||{duration:0,once:!0,amount:0},dimmedOpacity:Qe,customLayers:et,maxRadiusValue:kt.checkIfNullOrUndefined(H)?Math.max(...r.map(Mt).filter(qt)):H,collapseColorScaleByDefault:V}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(O,p||(b?O?(h||U)*b>O?(h||U)*b:O:(h||U)*b:Ne))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(gt.w,{"aria-label":"Loading graph"})})}),e[48]=ze,e[49]=Z,e[50]=m,e[51]=V,e[52]=xe,e[53]=K,e[54]=f,e[55]=et,e[56]=r,e[57]=ae,e[58]=Qe,e[59]=p,e[60]=j,e[61]=q,e[62]=g,e[63]=t,e[64]=ke,e[65]=N,e[66]=G,e[67]=ue,e[68]=H,e[69]=O,e[70]=be,e[71]=ee,e[72]=Re,e[73]=b,e[74]=Ze,e[75]=Se,e[76]=B,e[77]=a,e[78]=se,e[79]=u,e[80]=Ne,e[81]=U,e[82]=ce,e[83]=i.dateFormat,e[84]=i.enabled,e[85]=ve,e[86]=l,e[87]=h,e[88]=Je,e[89]=s,e[90]=E,e[91]=pe):pe=e[91];let he;e[92]!==m?.footnote||e[93]!==m?.source||e[94]!==ie||e[95]!==k||e[96]!==u?.footnote||e[97]!==u?.source||e[98]!==h?(he=k||ie?o.jsxRuntimeExports.jsx(Dt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:k,footNote:ie,width:h}):null,e[92]=m?.footnote,e[93]=m?.source,e[94]=ie,e[95]=k,e[96]=u?.footnote,e[97]=u?.source,e[98]=h,e[99]=he):he=e[99];let Xe;return e[100]!==T||e[101]!==_||e[102]!==te||e[103]!==p||e[104]!==Ke||e[105]!==O||e[106]!==J||e[107]!==b||e[108]!==at||e[109]!==nt||e[110]!==de||e[111]!==me||e[112]!==pe||e[113]!==he||e[114]!==ce||e[115]!==h?(Xe=o.jsxRuntimeExports.jsxs(dt.GraphContainer,{className:at,style:nt,id:te,ref:lt,"aria-label":T,backgroundColor:_,theme:ce,language:Ke,minHeight:O,width:h,height:p,relativeHeight:b,padding:J,children:[de,me,pe,he]}),e[100]=T,e[101]=_,e[102]=te,e[103]=p,e[104]=Ke,e[105]=O,e[106]=J,e[107]=b,e[108]=at,e[109]=nt,e[110]=de,e[111]=me,e[112]=pe,e[113]=he,e[114]=ce,e[115]=h,e[116]=Xe):Xe=e[116],Xe}function qt(n){return n!=null}function Mt(n){return n.radius}function Pt(n){return n.color}function zt(n){return n.color}function It(n){return n.properties.NAME!=="Antarctica"}function Lt(n){return n!==void 0}function Vt(n){return n!==void 0}function _t(n){return n.data}function Bt(n){return n!==void 0}function At(n){return n.data}function Ft(n,e){return n-e}function Wt(n){return n.date}exports.DotDensityMap=$t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),l=require("react"),ht=require("./parse-xYI9yrvL.cjs"),ft=require("./getSliderMarks-CIuSoedo.cjs"),Et=require("./Spinner-jTMOLuw_.cjs"),wt=require("./index-DQA8q5sC.cjs"),q=require("./index-DLFt97gy.cjs"),Ct=require("./Typography-sa1UE0oF.cjs"),Dt=require("./index-C5K--w8d.cjs"),Rt=require("./Tooltip-BLa2EfMs.cjs"),b=require("./Colors.cjs"),pt=require("./index-C6er0ety.cjs"),St=require("./DetailsModal-DHttOA80.cjs"),kt=require("./pow-BnyPO-NX.cjs"),mt=require("./select-Bnfk0lJx.cjs"),Je=require("./proxy-C4-uo6nS.cjs"),Nt=require("./use-in-view-C3o_ntMv.cjs"),Ot=require("./index-CoobIWNj.cjs"),Mt=require("./GraphFooter.cjs"),qt=require("./GraphHeader.cjs"),Pt=require("./fetchAndParseData-QTF6tjij.cjs"),$t=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),It=require("./uniqBy-O05lp2S5.cjs"),gt=require("./GraphContainer-B1EDxJ0S.cjs");function zt(a){const{data:e,colors:r,mapData:X,colorLegendTitle:P,colorDomain:f,radius:D,height:x,width:m,scale:p,centerPoint:$,tooltip:Y,showLabels:de,mapBorderWidth:qe,mapBorderColor:Pe,mapNoDataColor:me,onSeriesMouseOver:K,showColorScale:$e,zoomScaleExtend:Ie,zoomTranslateExtend:ze,highlightedDataPoints:pe,onSeriesMouseClick:Z,resetSelectionOnDoubleClick:xe,detailsOnClick:y,styles:J,classNames:L,mapProjection:V,zoomInteraction:E,animate:j,dimmedOpacity:Q,customLayers:_,maxRadiusValue:he,collapseColorScaleByDefault:fe,projectionRotate:I,rewindCoordinatesInMapData:ge}=a,ee=l.useMemo(()=>ge?q.index_default(X,{reverse:!0}):X,[X,ge]),[ye,ve]=l.useState(void 0),[je,be]=l.useState(fe===void 0?!(m<680):!fe),B=l.useRef(null),[c,u]=l.useState(void 0),[Ee,te]=l.useState(void 0),[we,oe]=l.useState(void 0),[A,z]=l.useState(void 0),w=l.useRef(null),F=Nt.useInView(w,{once:j.once,amount:j.amount}),T=l.useRef(null),R=e.filter(t=>t.radius===void 0||t.radius===null).length!==e.length?kt.sqrt().domain([0,he]).range([.25,D]).nice():void 0;l.useEffect(()=>{const t=mt.select(T.current),h=mt.select(w.current),n=g=>{if(E==="noZoom")return!1;if(E==="button")return!g.type.includes("wheel");const re=g.type==="wheel",ae=g.type.startsWith("touch"),Ne=g.type==="mousedown"||g.type==="mousemove";return ae?!0:re?E==="scroll"?!0:g.ctrlKey:Ne&&!g.button&&!g.ctrlKey},H=q.zoom().scaleExtent(Ie).translateExtent(ze||[[-20,-20],[m+20,x+20]]).filter(n).on("zoom",({transform:g})=>{t.attr("transform",g)});h.call(H),B.current=H},[x,m,E]);const v=q.index_default$1(ee),C=Dt.index_default(ee),Ce=v[2]-v[0],De=v[3]-v[1],Re=m*190/960*360/Ce,Se=x*190/678*180/De,S=p*Math.min(Re,Se),W=V==="mercator"?q.geoMercator().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):V==="equalEarth"?q.geoEqualEarth().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):V==="naturalEarth"?q.geoNaturalEarth1().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):V==="orthographic"?q.geoOrthographic().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S):q.geoAlbersUsa().rotate(I).center($||C.geometry.coordinates).translate([m/2,x/2]).scale(S),ke=q.geoPath().projection(W),G=t=>{if(!w.current||!B.current)return;mt.select(w.current).call(B.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(Je.motion.svg,{width:`${m}px`,height:`${x}px`,viewBox:`0 0 ${m} ${x}`,ref:w,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:T,children:[_.filter(t=>t.position==="before").map(t=>t.layer),ee.features.map((t,h)=>{const n=ke(t);return n?o.jsxRuntimeExports.jsx("path",{d:n,style:{stroke:Pe,strokeWidth:qe,fill:me}},h):null}),o.jsxRuntimeExports.jsx(Ot.AnimatePresence,{children:e.map(t=>{const h=e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:b.Colors.gray;return o.jsxRuntimeExports.jsxs(Je.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:ye?ye===h?1:Q:pe.length!==0?pe.indexOf(t.label||"")!==-1?1:Q:1,transition:{duration:j.duration}}},initial:"initial",animate:F?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},onMouseEnter:n=>{te(t),z(n.clientY),oe(n.clientX),K?.(t)},onMouseMove:n=>{te(t),z(n.clientY),oe(n.clientX)},onMouseLeave:()=>{te(void 0),oe(void 0),z(void 0),K?.(void 0)},onClick:()=>{(Z||y)&&(wt.isEqual(c,t)&&xe?(u(void 0),Z?.(void 0)):(u(t),Z?.(t)))},transform:`translate(${W([t.long,t.lat])[0]},${W([t.long,t.lat])[1]})`,children:[o.jsxRuntimeExports.jsx(Je.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:b.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:b.Colors.gray},whileInView:{r:R?R(t.radius||0):D,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:b.Colors.gray,stroke:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:b.Colors.gray,transition:{duration:j.duration}}},initial:"initial",animate:F?"whileInView":"initial",exit:{r:0,transition:{duration:j.duration}},style:{fillOpacity:.8}}),de&&t.label?o.jsxRuntimeExports.jsx(Je.motion.text,{variants:{initial:{opacity:0,x:R?R(t.radius||0):D,fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:b.Colors.gray},whileInView:{opacity:1,x:R?R(t.radius||0):D,transition:{duration:j.duration},fill:e.filter(n=>n.color).length===0?r[0]:t.color?r[f.indexOf(`${t.color}`)]:b.Colors.gray}},initial:"initial",animate:F?"whileInView":"initial",exit:{opacity:0,transition:{duration:j.duration}},y:0,className:o.mo("graph-value text-sm",L?.graphObjectValues),style:{textAnchor:"start",...J?.graphObjectValues||{}},dx:4,dy:5,children:t.label}):null]},t.label||`${t.lat}-${t.long}`)})}),_.filter(t=>t.position==="after").map(t=>t.layer)]})}),e.filter(t=>t.color).length===0||$e===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",L?.colorLegend),children:je?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{be(!1)},children:o.jsxRuntimeExports.jsx(pt.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)"},children:[P&&P!==""?o.jsxRuntimeExports.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:P}):null,o.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((t,h)=>o.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{ve(r[h%r.length])},onMouseLeave:()=>{ve(void 0)},children:[o.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[h%r.length]}}),o.jsxRuntimeExports.jsx(Ct.j,{size:"sm",marginBottom:"none",leading:"none",children:t})]},h))})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{be(!0)},children:o.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),E==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>G("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>G("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),y&&c!==void 0?o.jsxRuntimeExports.jsx(St.DetailsModal,{body:y,data:c,setData:u,className:L?.modal}):null,Ee&&Y&&we&&A?o.jsxRuntimeExports.jsx(Rt.Tooltip,{data:Ee,body:Y,xPos:we,yPos:A,backgroundStyle:J?.tooltip,className:L?.tooltip}):null]})}function Lt(a){const e=o.compilerRuntimeExports.c(121),{data:r,mapData:X,graphTitle:P,colors:f,sources:D,graphDescription:x,height:m,width:p,footNote:$,colorLegendTitle:Y,colorDomain:de,radius:qe,scale:Pe,centerPoint:me,padding:K,mapBorderWidth:$e,mapNoDataColor:Ie,backgroundColor:ze,showLabels:pe,mapBorderColor:Z,tooltip:xe,relativeHeight:y,onSeriesMouseOver:J,isWorldMap:L,showColorScale:V,zoomScaleExtend:E,zoomTranslateExtend:j,graphID:Q,highlightedDataPoints:_,onSeriesMouseClick:he,graphDownload:fe,dataDownload:I,showAntarctica:ge,language:ee,minHeight:ye,theme:ve,ariaLabel:je,resetSelectionOnDoubleClick:be,detailsOnClick:B,styles:c,classNames:u,mapProjection:Ee,zoomInteraction:te,animate:we,dimmedOpacity:oe,customLayers:A,maxRadiusValue:z,timeline:w,collapseColorScaleByDefault:F,projectionRotate:T,rewindCoordinatesInMapData:R}=a,v=X===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":X,C=$===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":$,Ce=qe===void 0?5:qe,De=Pe===void 0?.95:Pe,Re=$e===void 0?.5:$e,Se=Ie===void 0?b.Colors.light.graphNoData:Ie,S=ze===void 0?!1:ze,W=pe===void 0?!1:pe,ke=Z===void 0?b.Colors.light.grays["gray-500"]:Z,G=L===void 0?!0:L,t=V===void 0?!0:V;let h;e[0]!==E?(h=E===void 0?[.8,6]:E,e[0]=E,e[1]=h):h=e[1];const n=h;let H;e[2]!==_?(H=_===void 0?[]:_,e[2]=_,e[3]=H):H=e[3];const g=H,re=fe===void 0?!1:fe,ae=I===void 0?!1:I,Ne=ge===void 0?!1:ge,Qe=ee===void 0?"en":ee,k=ye===void 0?0:ye,ne=ve===void 0?"light":ve,et=be===void 0?!0:be,tt=Ee===void 0?"naturalEarth":Ee,ot=te===void 0?"button":te,Le=we===void 0?!1:we,rt=oe===void 0?.3:oe;let Ve;e[4]!==A?(Ve=A===void 0?[]:A,e[4]=A,e[5]=Ve):Ve=e[5];const at=Ve;let _e;e[6]!==w?(_e=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,e[6]=w,e[7]=_e):_e=e[7];const i=_e;let Be;e[8]!==T?(Be=T===void 0?[0,0]:T,e[8]=T,e[9]=Be):Be=e[9];const nt=Be,it=R===void 0?!0:R,[U,yt]=l.useState(0),[Oe,vt]=l.useState(0),[N,jt]=l.useState(i.autoplay);let Me;if(e[10]!==r||e[11]!==i.dateFormat){let d;e[13]!==i.dateFormat?(d=M=>ht.parse(`${M.date}`,i.dateFormat||"yyyy",new Date).getTime(),e[13]=i.dateFormat,e[14]=d):d=e[14],Me=[...new Set(r.filter(Yt).map(d))],Me.sort(Xt),e[10]=r,e[11]=i.dateFormat,e[12]=Me}else Me=e[12];const s=Me,[O,st]=l.useState(i.autoplay?0:s.length-1),[ie,bt]=l.useState(void 0),lt=l.useRef(null),xt=l.useRef(null);let Ae,Fe;e[15]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>{const d=new ResizeObserver(M=>{yt(M[0].target.clientWidth||620),vt(M[0].target.clientHeight||480)});return lt.current&&d.observe(lt.current),()=>d.disconnect()},Fe=[],e[15]=Ae,e[16]=Fe):(Ae=e[15],Fe=e[16]),l.useEffect(Ae,Fe);let Te;e[17]===Symbol.for("react.memo_cache_sentinel")?(Te=d=>{bt(d)},e[17]=Te):Te=e[17];const We=l.useEffectEvent(Te);let Ge;e[18]!==v||e[19]!==We?(Ge=()=>{typeof v=="string"?Pt.fetchAndParseJSON(v).then(M=>{We(M)}):We(v)},e[18]=v,e[19]=We,e[20]=Ge):Ge=e[20];let He;e[21]!==v?(He=[v],e[21]=v,e[22]=He):He=e[22],l.useEffect(Ge,He);let Ue,Xe;e[23]!==N||e[24]!==i.speed||e[25]!==s?(Ue=()=>{const d=setInterval(()=>{st(M=>M<s.length-1?M+1:0)},(i.speed||2)*1e3);return N||clearInterval(d),()=>clearInterval(d)},Xe=[s,N,i.speed],e[23]=N,e[24]=i.speed,e[25]=s,e[26]=Ue,e[27]=Xe):(Ue=e[26],Xe=e[27]),l.useEffect(Ue,Xe);const ct=i.dateFormat||"yyyy";let Ye;e[28]!==O||e[29]!==ct||e[30]!==i.showOnlyActiveDate||e[31]!==s?(Ye=ft.getSliderMarks(s,O,i.showOnlyActiveDate,ct),e[28]=O,e[29]=ct,e[30]=i.showOnlyActiveDate,e[31]=s,e[32]=Ye):Ye=e[32];const Ke=Ye,ut=u?.graphContainer,dt=c?.graphContainer;let se;e[33]!==u?.description||e[34]!==u?.title||e[35]!==r||e[36]!==ae||e[37]!==x||e[38]!==re||e[39]!==P||e[40]!==c?.description||e[41]!==c?.title||e[42]!==p?(se=P||x||re||ae?o.jsxRuntimeExports.jsx(qt.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:u?.title,description:u?.description},graphTitle:P,graphDescription:x,width:p,graphDownload:re?xt:void 0,dataDownload:ae?r.map(Ut).filter(Ht).length>0?r.map(Gt).filter(Wt):r.filter(Tt):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=r,e[36]=ae,e[37]=x,e[38]=re,e[39]=P,e[40]=c?.description,e[41]=c?.title,e[42]=p,e[43]=se):se=e[43];let le;e[44]!==O||e[45]!==Ke||e[46]!==N||e[47]!==i.enabled||e[48]!==s?(le=i.enabled&&s.length>0&&Ke?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{jt(!N)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":N?"Click to pause animation":"Click to play animation",children:N?o.jsxRuntimeExports.jsx(pt.Pause,{}):o.jsxRuntimeExports.jsx(pt.Play,{})}),o.jsxRuntimeExports.jsx(ft.Nr,{min:s[0],max:s[s.length-1],marks:Ke,step:null,defaultValue:s[s.length-1],value:s[O],onChangeComplete:d=>{st(s.indexOf(d))},onChange:d=>{st(s.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=O,e[45]=Ke,e[46]=N,e[47]=i.enabled,e[48]=s,e[49]=le):le=e[49];let ce;e[50]!==Le||e[51]!==me||e[52]!==u||e[53]!==F||e[54]!==de||e[55]!==Y||e[56]!==f||e[57]!==at||e[58]!==r||e[59]!==B||e[60]!==rt||e[61]!==m||e[62]!==g||e[63]!==O||e[64]!==G||e[65]!==ke||e[66]!==Re||e[67]!==Se||e[68]!==tt||e[69]!==ie||e[70]!==z||e[71]!==k||e[72]!==he||e[73]!==J||e[74]!==nt||e[75]!==Ce||e[76]!==y||e[77]!==et||e[78]!==it||e[79]!==De||e[80]!==Ne||e[81]!==t||e[82]!==W||e[83]!==c||e[84]!==Oe||e[85]!==U||e[86]!==ne||e[87]!==i.dateFormat||e[88]!==i.enabled||e[89]!==xe||e[90]!==s||e[91]!==p||e[92]!==ot||e[93]!==n||e[94]!==j?(ce=o.jsxRuntimeExports.jsx(gt.GraphArea,{ref:lt,children:U&&Oe&&ie?o.jsxRuntimeExports.jsx(zt,{data:r.filter(d=>i.enabled?d.date===ht.format(new Date(s[O]),i.dateFormat||"yyyy"):d),mapData:Ne?ie:{...ie,features:ie.features.filter(Ft)},colorDomain:r.filter(At).length===0?[]:de||It.uniqBy(r,"color",!0),width:U,height:Oe,scale:De,centerPoint:me,colors:r.filter(Bt).length===0?f?[f]:[b.Colors.primaryColors["blue-600"]]:f||b.Colors[ne].categoricalColors.colors,colorLegendTitle:Y,radius:Ce,mapBorderWidth:Re,mapNoDataColor:Se,mapBorderColor:ke,tooltip:xe,onSeriesMouseOver:J,showLabels:W,isWorldMap:G,showColorScale:t,zoomScaleExtend:n,zoomTranslateExtend:j,onSeriesMouseClick:he,highlightedDataPoints:g,resetSelectionOnDoubleClick:et,styles:c,classNames:u,zoomInteraction:ot,detailsOnClick:B,mapProjection:tt||(G?"naturalEarth":"mercator"),animate:Le===!0?{duration:.5,once:!0,amount:.5}:Le||{duration:0,once:!0,amount:0},dimmedOpacity:rt,customLayers:at,maxRadiusValue:$t.checkIfNullOrUndefined(z)?Math.max(...r.map(_t).filter(Vt)):z,collapseColorScaleByDefault:F,projectionRotate:nt,rewindCoordinatesInMapData:it}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(k,m||(y?k?(p||U)*y>k?(p||U)*y:k:(p||U)*y:Oe))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(Et.w,{"aria-label":"Loading graph"})})}),e[50]=Le,e[51]=me,e[52]=u,e[53]=F,e[54]=de,e[55]=Y,e[56]=f,e[57]=at,e[58]=r,e[59]=B,e[60]=rt,e[61]=m,e[62]=g,e[63]=O,e[64]=G,e[65]=ke,e[66]=Re,e[67]=Se,e[68]=tt,e[69]=ie,e[70]=z,e[71]=k,e[72]=he,e[73]=J,e[74]=nt,e[75]=Ce,e[76]=y,e[77]=et,e[78]=it,e[79]=De,e[80]=Ne,e[81]=t,e[82]=W,e[83]=c,e[84]=Oe,e[85]=U,e[86]=ne,e[87]=i.dateFormat,e[88]=i.enabled,e[89]=xe,e[90]=s,e[91]=p,e[92]=ot,e[93]=n,e[94]=j,e[95]=ce):ce=e[95];let ue;e[96]!==u?.footnote||e[97]!==u?.source||e[98]!==C||e[99]!==D||e[100]!==c?.footnote||e[101]!==c?.source||e[102]!==p?(ue=D||C?o.jsxRuntimeExports.jsx(Mt.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:D,footNote:C,width:p}):null,e[96]=u?.footnote,e[97]=u?.source,e[98]=C,e[99]=D,e[100]=c?.footnote,e[101]=c?.source,e[102]=p,e[103]=ue):ue=e[103];let Ze;return e[104]!==je||e[105]!==S||e[106]!==Q||e[107]!==m||e[108]!==Qe||e[109]!==k||e[110]!==K||e[111]!==y||e[112]!==ut||e[113]!==dt||e[114]!==se||e[115]!==le||e[116]!==ce||e[117]!==ue||e[118]!==ne||e[119]!==p?(Ze=o.jsxRuntimeExports.jsxs(gt.GraphContainer,{className:ut,style:dt,id:Q,ref:xt,"aria-label":je,backgroundColor:S,theme:ne,language:Qe,minHeight:k,width:p,height:m,relativeHeight:y,padding:K,children:[se,le,ce,ue]}),e[104]=je,e[105]=S,e[106]=Q,e[107]=m,e[108]=Qe,e[109]=k,e[110]=K,e[111]=y,e[112]=ut,e[113]=dt,e[114]=se,e[115]=le,e[116]=ce,e[117]=ue,e[118]=ne,e[119]=p,e[120]=Ze):Ze=e[120],Ze}function Vt(a){return a!=null}function _t(a){return a.radius}function Bt(a){return a.color}function At(a){return a.color}function Ft(a){return a.properties.NAME!=="Antarctica"}function Tt(a){return a!==void 0}function Wt(a){return a!==void 0}function Gt(a){return a.data}function Ht(a){return a!==void 0}function Ut(a){return a.data}function Xt(a,e){return a-e}function Yt(a){return a.date}exports.DotDensityMap=Lt;
2
2
  //# sourceMappingURL=DotDensityMap.cjs.map