@undp/data-viz 2.3.9 → 2.3.11
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.
- package/dist/AreaChart.js +16 -16
- package/dist/{Axis-D56Gy0se.js → Axis-RyGdzLrG.js} +2 -2
- package/dist/{Axis-D56Gy0se.js.map → Axis-RyGdzLrG.js.map} +1 -1
- package/dist/{AxisTitle-VFq89Olw.js → AxisTitle-DGjX1_2v.js} +2 -2
- package/dist/{AxisTitle-VFq89Olw.js.map → AxisTitle-DGjX1_2v.js.map} +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +18 -18
- package/dist/BasicStatCard.js +2 -2
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +13 -13
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +12 -12
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +18 -18
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +15 -15
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +12 -12
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +4 -4
- package/dist/ColorLegend.js +2 -2
- package/dist/ColorLegendWithMouseOver.js +2 -2
- package/dist/CopyTextButton.cjs +1 -1
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +4 -4
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.js +2 -2
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.js +7 -7
- package/dist/DataTable.js +4 -4
- package/dist/{DetailsModal-BMCTgVsk.js → DetailsModal-C3qlUyFK.js} +3 -3
- package/dist/{DetailsModal-BMCTgVsk.js.map → DetailsModal-C3qlUyFK.js.map} +1 -1
- package/dist/{DetailsModal-DHttOA80.cjs → DetailsModal-DIRTulvr.cjs} +2 -2
- package/dist/{DetailsModal-DHttOA80.cjs.map → DetailsModal-DIRTulvr.cjs.map} +1 -1
- package/dist/DifferenceLineChart.js +15 -15
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +10 -10
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +13 -13
- package/dist/{DropdownSelect-D8rFbygC.js → DropdownSelect-B2WTeedJ.js} +2 -2
- package/dist/{DropdownSelect-D8rFbygC.js.map → DropdownSelect-B2WTeedJ.js.map} +1 -1
- package/dist/DualAxisLineChart.js +12 -12
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +18 -18
- package/dist/{EmptyState-dScPFkLy.js → EmptyState-D807L58h.js} +4 -4
- package/dist/{EmptyState-dScPFkLy.js.map → EmptyState-D807L58h.js.map} +1 -1
- package/dist/ExcelDownloadButton.js +2 -2
- package/dist/FootNote.js +2 -2
- package/dist/GeoHubCompareMaps.js +3 -3
- package/dist/GeoHubMap.js +4 -4
- package/dist/GeoHubMapWithLayerSelection.js +5 -5
- package/dist/{GraphContainer-CF6ws3pd.js → GraphContainer-DwMxWRCi.js} +2 -2
- package/dist/{GraphContainer-CF6ws3pd.js.map → GraphContainer-DwMxWRCi.js.map} +1 -1
- package/dist/GraphDescription.js +2 -2
- package/dist/{GraphEl-Bw-9MUym.js → GraphEl-CT3xPv2P.js} +5 -5
- package/dist/{GraphEl-Bw-9MUym.js.map → GraphEl-CT3xPv2P.js.map} +1 -1
- package/dist/{GraphEl-DjElfY07.cjs → GraphEl-DvwOOhF1.cjs} +2 -2
- package/dist/{GraphEl-DjElfY07.cjs.map → GraphEl-DvwOOhF1.cjs.map} +1 -1
- package/dist/GraphFooter.js +2 -2
- package/dist/GraphHeader.js +1 -1
- package/dist/GraphTitle.js +2 -2
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +6 -6
- package/dist/GriddedGraphsFromConfig.js +2 -2
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +10 -10
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +4 -4
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +15 -15
- package/dist/ImageDownloadButton.js +2 -2
- package/dist/LineChartWithConfidenceInterval.js +15 -15
- package/dist/LinearColorLegend.js +2 -2
- package/dist/{Modal-Ch9wvKxF.js → Modal-BV4rkoLM.js} +5 -5
- package/dist/{Modal-Ch9wvKxF.js.map → Modal-BV4rkoLM.js.map} +1 -1
- package/dist/{Modal-CaYa_TLE.cjs → Modal-ZX55hLH-.cjs} +5 -5
- package/dist/{Modal-CaYa_TLE.cjs.map → Modal-ZX55hLH-.cjs.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.js +4 -4
- package/dist/MultiGraphDashboardFromConfig.js +2 -2
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +4 -4
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -2
- package/dist/MultiLineAltChart.js +15 -15
- package/dist/MultiLineChart.js +15 -15
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +12 -12
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +4 -4
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +2 -2
- package/dist/PerformanceIntensiveScrollStory.js +3 -3
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +9 -9
- package/dist/{ReferenceLine-DgtoRgw0.js → ReferenceLine-CNEjAYvv.js} +3 -3
- package/dist/{ReferenceLine-DgtoRgw0.js.map → ReferenceLine-CNEjAYvv.js.map} +1 -1
- package/dist/{RegressionLine-D2aqeBKp.js → RegressionLine-BDrndQxo.js} +4 -4
- package/dist/{RegressionLine-D2aqeBKp.js.map → RegressionLine-BDrndQxo.js.map} +1 -1
- package/dist/SVGDownloadButton.js +2 -2
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +9 -9
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +20 -20
- package/dist/ScrollStory.js +3 -3
- package/dist/SimpleLineChart.js +16 -16
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +6 -6
- package/dist/SingleGraphDashboardFromConfig.js +2 -2
- package/dist/SingleGraphDashboardGeoHubMaps.js +3 -3
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +2 -2
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +6 -6
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +2 -2
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +11 -11
- package/dist/{Source-Cu9OHOBj.js → Source-eILIr4Ov.js} +5 -5
- package/dist/{Source-Cu9OHOBj.js.map → Source-eILIr4Ov.js.map} +1 -1
- package/dist/Source.js +3 -3
- package/dist/SparkLine.js +5 -5
- package/dist/{Spinner--r2RrJV8.js → Spinner-CtJETd5V.js} +2 -2
- package/dist/{Spinner--r2RrJV8.js.map → Spinner-CtJETd5V.js.map} +1 -1
- package/dist/StatCardFromData.js +2 -2
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +9 -9
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +7 -7
- package/dist/ThresholdColorLegendWithMouseOver.js +2 -2
- package/dist/{Tooltip-BRnAz2Gv.js → Tooltip-CohiIbLZ.js} +2 -2
- package/dist/{Tooltip-BRnAz2Gv.js.map → Tooltip-CohiIbLZ.js.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +9 -9
- package/dist/{Typography-CdMGooqp.js → Typography-HicNIA61.js} +2 -2
- package/dist/{Typography-CdMGooqp.js.map → Typography-HicNIA61.js.map} +1 -1
- package/dist/UnitChart.js +6 -6
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.js +14 -14
- package/dist/{XAxesLabels-rhK7lRjO.js → XAxesLabels-IwjMJkYS.js} +3 -3
- package/dist/{XAxesLabels-rhK7lRjO.js.map → XAxesLabels-IwjMJkYS.js.map} +1 -1
- package/dist/{XTicksAndGridLines-CVZkZkpS.js → XTicksAndGridLines-BDmF9etl.js} +2 -2
- package/dist/{XTicksAndGridLines-CVZkZkpS.js.map → XTicksAndGridLines-BDmF9etl.js.map} +1 -1
- package/dist/{YAxesLabels-QICWVsHf.js → YAxesLabels-DoGvgHdw.js} +3 -3
- package/dist/{YAxesLabels-QICWVsHf.js.map → YAxesLabels-DoGvgHdw.js.map} +1 -1
- package/dist/{YTicksAndGridLines-GnXnSRF2.js → YTicksAndGridLines-C3GW1xFG.js} +2 -2
- package/dist/{YTicksAndGridLines-GnXnSRF2.js.map → YTicksAndGridLines-C3GW1xFG.js.map} +1 -1
- package/dist/{checkIfMultiple-D9fVkeOq.js → checkIfMultiple-B97uOUVq.js} +5 -5
- package/dist/{checkIfMultiple-D9fVkeOq.js.map → checkIfMultiple-B97uOUVq.js.map} +1 -1
- package/dist/{checkIfMultiple-DxnGtm3t.cjs → checkIfMultiple-TOaaUwS7.cjs} +2 -2
- package/dist/{checkIfMultiple-DxnGtm3t.cjs.map → checkIfMultiple-TOaaUwS7.cjs.map} +1 -1
- package/dist/{customArea-ASDaSE4u.js → customArea-Cc2whe6P.js} +3 -3
- package/dist/{customArea-ASDaSE4u.js.map → customArea-Cc2whe6P.js.map} +1 -1
- package/dist/{getSliderMarks-Cvg8zHBU.js → getSliderMarks-vXsR8RrR.js} +2 -2
- package/dist/{getSliderMarks-Cvg8zHBU.js.map → getSliderMarks-vXsR8RrR.js.map} +1 -1
- package/dist/{index-BzNfurbO.js → index-B5ggV1vg.js} +9 -9
- package/dist/{index-BzNfurbO.js.map → index-B5ggV1vg.js.map} +1 -1
- package/dist/{index-CXobQn-E.cjs → index-BDR7MlMo.cjs} +2 -2
- package/dist/{index-CXobQn-E.cjs.map → index-BDR7MlMo.cjs.map} +1 -1
- package/dist/{index-CHPV5EwG-DecW7_qr.js → index-CHPV5EwG-BCLAYDCV.js} +3 -3
- package/dist/{index-CHPV5EwG-DecW7_qr.js.map → index-CHPV5EwG-BCLAYDCV.js.map} +1 -1
- package/dist/{index-Dp_SfsUA.js → index-CKpKc9DR.js} +3 -3
- package/dist/{index-Dp_SfsUA.js.map → index-CKpKc9DR.js.map} +1 -1
- package/dist/{index-B-4y_iGB.js → index-CZ0elhKR.js} +4 -4
- package/dist/{index-B-4y_iGB.js.map → index-CZ0elhKR.js.map} +1 -1
- package/dist/{index-CtMBjvtq.js → index-Co3YGYe1.js} +3 -3
- package/dist/{index-CtMBjvtq.js.map → index-Co3YGYe1.js.map} +1 -1
- package/dist/{index-Cw8sCyo_-n4AacHGk.js → index-D6CYcVc7-BOa7Dpvf.js} +5 -5
- package/dist/{index-Cw8sCyo_-n4AacHGk.js.map → index-D6CYcVc7-BOa7Dpvf.js.map} +1 -1
- package/dist/index-D6CYcVc7-CTEcAtiQ.cjs +2 -0
- package/dist/index-D6CYcVc7-CTEcAtiQ.cjs.map +1 -0
- package/dist/{index-CSiFiXPj.js → index-D_dtv_T9.js} +3 -3
- package/dist/{index-CSiFiXPj.js.map → index-D_dtv_T9.js.map} +1 -1
- package/dist/{index-Dzc_aaI9-CG2Ar7l1.js → index-DoS4bGNa-Bgab95kx.js} +2 -2
- package/dist/{index-Dzc_aaI9-CG2Ar7l1.js.map → index-DoS4bGNa-Bgab95kx.js.map} +1 -1
- package/dist/{index-Dzc_aaI9-C3DbPpy3.cjs → index-DoS4bGNa-C3DbPpy3.cjs} +1 -1
- package/dist/{index-Dzc_aaI9-C3DbPpy3.cjs.map → index-DoS4bGNa-C3DbPpy3.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/{linear-CalFSAaO.js → linear-DNXM5Pdl.js} +3 -3
- package/dist/{linear-CalFSAaO.js.map → linear-DNXM5Pdl.js.map} +1 -1
- package/dist/{pow-CaIrlM4J.js → pow-BXYLJHCq.js} +2 -2
- package/dist/{pow-CaIrlM4J.js.map → pow-BXYLJHCq.js.map} +1 -1
- package/dist/{proxy-DRuSUlPL.js → proxy--_f6k3NR.js} +2 -2
- package/dist/{proxy-DRuSUlPL.js.map → proxy--_f6k3NR.js.map} +1 -1
- package/dist/{string-C_xJ4Wg4.js → string-CbaFIsiV.js} +4 -4
- package/dist/{string-C_xJ4Wg4.js.map → string-CbaFIsiV.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{time-CAtex-RV.js → time-vyz6Y89P.js} +2 -2
- package/dist/{time-CAtex-RV.js.map → time-vyz6Y89P.js.map} +1 -1
- package/dist/{use-in-view-Dl5L8LtP.js → use-in-view-DqvKAveg.js} +2 -2
- package/dist/{use-in-view-Dl5L8LtP.js.map → use-in-view-DqvKAveg.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-Cw8sCyo_-CEcCMKUi.cjs +0 -2
- package/dist/index-Cw8sCyo_-CEcCMKUi.cjs.map +0 -1
package/dist/SankeyChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CHPV5EwG-6v2a2njQ.cjs"),A=require("react"),de=require("./index-CSNtgibC.cjs"),pe=require("./index-Cno4Q0YE.cjs"),Oe=require("./index-DQA8q5sC.cjs"),Ut=require("./Typography-Cc_iHQB-.cjs"),me=require("./numberFormattingFunction-02t-wJta.cjs"),Ce=require("./Tooltip-BLa2EfMs.cjs"),Ve=require("./DetailsModal-DHttOA80.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),Ne=require("./use-in-view-C3o_ntMv.cjs"),De=require("./index-CoobIWNj.cjs"),Te=require("./GraphHeader.cjs"),qe=require("./GraphFooter.cjs"),xe=require("./Colors.cjs"),Be=require("./generateRandomString-B5zBiJzS.cjs"),Pe=require("./EmptyState-N1eHt3vq.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),ye=require("./GraphContainer-B1EDxJ0S.cjs");function ve(e,t){let o;if(t===void 0)for(const r of e)r!=null&&(o<r||o===void 0&&r>=r)&&(o=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}return o}function Ee(e,t){let o;if(t===void 0)for(const r of e)r!=null&&(o>r||o===void 0&&r>=r)&&(o=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}return o}function re(e,t){let o=0;if(t===void 0)for(let r of e)(r=+r)&&(o+=r);else{let r=-1;for(let a of e)(a=+t(a,++r,e))&&(o+=a)}return o}function ze(e){return e.target.depth}function Ie(e,t){return e.sourceLinks.length?e.depth:t-1}function se(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?Ee(e.sourceLinks,ze)-1:0}function Zt(e){return function(){return e}}function je(e,t){return Qt(e.source,t.source)||e.index-t.index}function ke(e,t){return Qt(e.target,t.target)||e.index-t.index}function Qt(e,t){return e.y0-t.y0}function le(e){return e.value}function Ae(e){return e.index}function He(e){return e.nodes}function Ge(e){return e.links}function be(e,t){const o=e.get(t);if(!o)throw new Error("missing: "+t);return o}function we({nodes:e}){for(const t of e){let o=t.y0,r=o;for(const a of t.sourceLinks)a.y0=o+a.width/2,o+=a.width;for(const a of t.targetLinks)a.y1=r+a.width/2,r+=a.width}}function ae(){let e=0,t=0,o=1,r=1,a=24,x=8,h,g=Ae,y=Ie,k,b,$=He,D=Ge,j=6;function p(){const n={nodes:$.apply(null,arguments),links:D.apply(null,arguments)};return M(n),H(n),w(n),S(n),F(n),we(n),n}p.update=function(n){return we(n),n},p.nodeId=function(n){return arguments.length?(g=typeof n=="function"?n:Zt(n),p):g},p.nodeAlign=function(n){return arguments.length?(y=typeof n=="function"?n:Zt(n),p):y},p.nodeSort=function(n){return arguments.length?(k=n,p):k},p.nodeWidth=function(n){return arguments.length?(a=+n,p):a},p.nodePadding=function(n){return arguments.length?(x=h=+n,p):x},p.nodes=function(n){return arguments.length?($=typeof n=="function"?n:Zt(n),p):$},p.links=function(n){return arguments.length?(D=typeof n=="function"?n:Zt(n),p):D},p.linkSort=function(n){return arguments.length?(b=n,p):b},p.size=function(n){return arguments.length?(e=t=0,o=+n[0],r=+n[1],p):[o-e,r-t]},p.extent=function(n){return arguments.length?(e=+n[0][0],o=+n[1][0],t=+n[0][1],r=+n[1][1],p):[[e,t],[o,r]]},p.iterations=function(n){return arguments.length?(j=+n,p):j};function M({nodes:n,links:l}){for(const[u,i]of n.entries())i.index=u,i.sourceLinks=[],i.targetLinks=[];const s=new Map(n.map((u,i)=>[g(u,i,n),u]));for(const[u,i]of l.entries()){i.index=u;let{source:f,target:v}=i;typeof f!="object"&&(f=i.source=be(s,f)),typeof v!="object"&&(v=i.target=be(s,v)),f.sourceLinks.push(i),v.targetLinks.push(i)}if(b!=null)for(const{sourceLinks:u,targetLinks:i}of n)u.sort(b),i.sort(b)}function H({nodes:n}){for(const l of n)l.value=l.fixedValue===void 0?Math.max(re(l.sourceLinks,le),re(l.targetLinks,le)):l.fixedValue}function w({nodes:n}){const l=n.length;let s=new Set(n),u=new Set,i=0;for(;s.size;){for(const f of s){f.depth=i;for(const{target:v}of f.sourceLinks)u.add(v)}if(++i>l)throw new Error("circular link");s=u,u=new Set}}function S({nodes:n}){const l=n.length;let s=new Set(n),u=new Set,i=0;for(;s.size;){for(const f of s){f.height=i;for(const{source:v}of f.targetLinks)u.add(v)}if(++i>l)throw new Error("circular link");s=u,u=new Set}}function B({nodes:n}){const l=ve(n,i=>i.depth)+1,s=(o-e-a)/(l-1),u=new Array(l);for(const i of n){const f=Math.max(0,Math.min(l-1,Math.floor(y.call(null,i,l))));i.layer=f,i.x0=e+f*s,i.x1=i.x0+a,u[f]?u[f].push(i):u[f]=[i]}if(k)for(const i of u)i.sort(k);return u}function z(n){const l=Ee(n,s=>(r-t-(s.length-1)*h)/re(s,le));for(const s of n){let u=t;for(const i of s){i.y0=u,i.y1=u+i.value*l,u=i.y1+h;for(const f of i.sourceLinks)f.width=f.value*l}u=(r-u+h)/(s.length+1);for(let i=0;i<s.length;++i){const f=s[i];f.y0+=u*(i+1),f.y1+=u*(i+1)}X(s)}}function F(n){const l=B(n);h=Math.min(x,(r-t)/(ve(l,s=>s.length)-1)),z(l);for(let s=0;s<j;++s){const u=Math.pow(.99,s),i=Math.max(1-u,(s+1)/j);_(l,u,i),G(l,u,i)}}function G(n,l,s){for(let u=1,i=n.length;u<i;++u){const f=n[u];for(const v of f){let C=0,T=0;for(const{source:I,value:Y}of v.targetLinks){let U=Y*(v.layer-I.layer);C+=O(I,v)*U,T+=U}if(!(T>0))continue;let V=(C/T-v.y0)*l;v.y0+=V,v.y1+=V,kt(v)}k===void 0&&f.sort(Qt),W(f,s)}}function _(n,l,s){for(let u=n.length,i=u-2;i>=0;--i){const f=n[i];for(const v of f){let C=0,T=0;for(const{target:I,value:Y}of v.sourceLinks){let U=Y*(I.layer-v.layer);C+=E(v,I)*U,T+=U}if(!(T>0))continue;let V=(C/T-v.y0)*l;v.y0+=V,v.y1+=V,kt(v)}k===void 0&&f.sort(Qt),W(f,s)}}function W(n,l){const s=n.length>>1,u=n[s];tt(n,u.y0-h,s-1,l),R(n,u.y1+h,s+1,l),tt(n,r,n.length-1,l),R(n,t,0,l)}function R(n,l,s,u){for(;s<n.length;++s){const i=n[s],f=(l-i.y0)*u;f>1e-6&&(i.y0+=f,i.y1+=f),l=i.y1+h}}function tt(n,l,s,u){for(;s>=0;--s){const i=n[s],f=(i.y1-l)*u;f>1e-6&&(i.y0-=f,i.y1-=f),l=i.y0-h}}function kt({sourceLinks:n,targetLinks:l}){if(b===void 0){for(const{source:{sourceLinks:s}}of l)s.sort(ke);for(const{target:{targetLinks:s}}of n)s.sort(je)}}function X(n){if(b===void 0)for(const{sourceLinks:l,targetLinks:s}of n)l.sort(ke),s.sort(je)}function O(n,l){let s=n.y0-(n.sourceLinks.length-1)*h/2;for(const{target:u,width:i}of n.sourceLinks){if(u===l)break;s+=i+h}for(const{source:u,width:i}of l.targetLinks){if(u===n)break;s-=i}return s}function E(n,l){let s=l.y0-(l.targetLinks.length-1)*h/2;for(const{source:u,width:i}of l.targetLinks){if(u===n)break;s+=i+h}for(const{target:u,width:i}of n.sourceLinks){if(u===l)break;s-=i}return s}return p}var ue=Math.PI,ce=2*ue,Ct=1e-6,We=ce-Ct;function fe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Le(){return new fe}fe.prototype=Le.prototype={constructor:fe,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,o,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+o)+","+(this._y1=+r)},bezierCurveTo:function(e,t,o,r,a,x){this._+="C"+ +e+","+ +t+","+ +o+","+ +r+","+(this._x1=+a)+","+(this._y1=+x)},arcTo:function(e,t,o,r,a){e=+e,t=+t,o=+o,r=+r,a=+a;var x=this._x1,h=this._y1,g=o-e,y=r-t,k=x-e,b=h-t,$=k*k+b*b;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if($>Ct)if(!(Math.abs(b*g-y*k)>Ct)||!a)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var D=o-x,j=r-h,p=g*g+y*y,M=D*D+j*j,H=Math.sqrt(p),w=Math.sqrt($),S=a*Math.tan((ue-Math.acos((p+$-M)/(2*H*w)))/2),B=S/w,z=S/H;Math.abs(B-1)>Ct&&(this._+="L"+(e+B*k)+","+(t+B*b)),this._+="A"+a+","+a+",0,0,"+ +(b*D>k*j)+","+(this._x1=e+z*g)+","+(this._y1=t+z*y)}},arc:function(e,t,o,r,a,x){e=+e,t=+t,o=+o,x=!!x;var h=o*Math.cos(r),g=o*Math.sin(r),y=e+h,k=t+g,b=1^x,$=x?r-a:a-r;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+y+","+k:(Math.abs(this._x1-y)>Ct||Math.abs(this._y1-k)>Ct)&&(this._+="L"+y+","+k),o&&($<0&&($=$%ce+ce),$>We?this._+="A"+o+","+o+",0,1,"+b+","+(e-h)+","+(t-g)+"A"+o+","+o+",0,1,"+b+","+(this._x1=y)+","+(this._y1=k):$>Ct&&(this._+="A"+o+","+o+",0,"+ +($>=ue)+","+b+","+(this._x1=e+o*Math.cos(a))+","+(this._y1=t+o*Math.sin(a))))},rect:function(e,t,o,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +o+"v"+ +r+"h"+-o+"Z"},toString:function(){return this._}};function $e(e){return function(){return e}}function Fe(e){return e[0]}function _e(e){return e[1]}var Xe=Array.prototype.slice;function Ye(e){return e.source}function Ue(e){return e.target}function Ze(e){var t=Ye,o=Ue,r=Fe,a=_e,x=null;function h(){var g,y=Xe.call(arguments),k=t.apply(this,y),b=o.apply(this,y);if(x||(x=g=Le()),e(x,+r.apply(this,(y[0]=k,y)),+a.apply(this,y),+r.apply(this,(y[0]=b,y)),+a.apply(this,y)),g)return x=null,g+""||null}return h.source=function(g){return arguments.length?(t=g,h):t},h.target=function(g){return arguments.length?(o=g,h):o},h.x=function(g){return arguments.length?(r=typeof g=="function"?g:$e(+g),h):r},h.y=function(g){return arguments.length?(a=typeof g=="function"?g:$e(+g),h):a},h.context=function(g){return arguments.length?(x=g??null,h):x},h}function Qe(e,t,o,r,a){e.moveTo(t,o),e.bezierCurveTo(t=(t+r)/2,o,t,a,r,a)}function Je(){return Ze(Qe)}function Ke(e){return[e.source.x1,e.y0]}function tn(e){return[e.target.x0,e.y1]}function en(){return Je().source(Ke).target(tn)}function nn(e){const t=d.compilerRuntimeExports.c(136),{data:o,showLabels:r,leftMargin:a,rightMargin:x,truncateBy:h,width:g,height:y,topMargin:k,bottomMargin:b,tooltip:$,onSeriesMouseOver:D,suffix:j,prefix:p,showValues:M,onSeriesMouseClick:H,nodePadding:w,nodeWidth:S,id:B,highlightedSourceDataPoints:z,highlightedTargetDataPoints:F,defaultLinkOpacity:G,sourceTitle:_,targetTitle:W,animate:R,sortNodes:tt,resetSelectionOnDoubleClick:kt,detailsOnClick:X,styles:O,classNames:E,precision:n,customLayers:l}=e,s=A.useRef(null);let u;t[0]!==R.amount||t[1]!==R.once?(u={once:R.once,amount:R.amount},t[0]=R.amount,t[1]=R.once,t[2]=u):u=t[2];const i=Ne.useInView(s,u),[f,v]=A.useState(void 0),[C,T]=A.useState(void 0),[V,I]=A.useState(void 0),[Y,U]=A.useState(void 0),[St,Rt]=A.useState(void 0);let L;t[3]!==b||t[4]!==a||t[5]!==x||t[6]!==k?(L={top:k,bottom:b,left:a,right:x},t[3]=b,t[4]=a,t[5]=x,t[6]=k,t[7]=L):L=t[7];const m=L,wt=g-m.left-m.right,$t=y-m.top-m.bottom;let et,lt,at,Z,ut,ct,Q,J,ft,ht,K,nt,ot,it,gt,dt;if(t[8]!==R.duration||t[9]!==E?.graphObjectValues||t[10]!==l||t[11]!==o||t[12]!==G||t[13]!==X||t[14]!==$t||t[15]!==wt||t[16]!==y||t[17]!==z||t[18]!==F||t[19]!==B||t[20]!==i||t[21]!==a||t[22]!==m.left||t[23]!==m.right||t[24]!==m.top||t[25]!==C||t[26]!==w||t[27]!==S||t[28]!==H||t[29]!==D||t[30]!==n||t[31]!==p||t[32]!==kt||t[33]!==x||t[34]!==V||t[35]!==r||t[36]!==M||t[37]!==tt||t[38]!==_||t[39]!==O?.graphObjectValues||t[40]!==j||t[41]!==W||t[42]!==h||t[43]!==g){const It=tt==="mostReadable"?ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se):tt==="none"?ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se).nodeSort(null).linkSort(null):ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se).nodeSort(tt==="desc"?fn:cn),{nodes:N,links:Vt}=It(o),Nt=en();lt=ie.motion.svg,gt=`${g}px`,dt=`${y}px`,at=`0 0 ${g} ${y}`,t[60]===Symbol.for("react.memo_cache_sentinel")?(Z={marginLeft:"auto",marginRight:"auto"},t[60]=Z):Z=t[60],ut="ltr",ct=s,t[61]!==m.left||t[62]!==m.top||t[63]!==_?(Q=_?d.jsxRuntimeExports.jsx("text",{x:m.left,y:m.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"start"},children:_}):null,t[61]=m.left,t[62]=m.top,t[63]=_,t[64]=Q):Q=t[64],t[65]!==m.right||t[66]!==m.top||t[67]!==W||t[68]!==g?(J=W?d.jsxRuntimeExports.jsx("text",{x:g-m.right,y:m.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"end"},children:W}):null,t[65]=m.right,t[66]=m.top,t[67]=W,t[68]=g,t[69]=J):J=t[69],ht=`translate(${m.left},${m.top})`,t[70]!==l?(K=l.filter(un).map(an),t[70]=l,t[71]=K):K=t[71];let Lt;t[72]!==E?.graphObjectValues||t[73]!==a||t[74]!==w||t[75]!==n||t[76]!==p||t[77]!==r||t[78]!==M||t[79]!==O?.graphObjectValues||t[80]!==j||t[81]!==h?(Lt=(c,vt)=>d.jsxRuntimeExports.jsx("g",{onMouseEnter:()=>{I(c)},onMouseLeave:()=>{I(void 0)},children:d.jsxRuntimeExports.jsxs("g",{transform:`translate(${c.x0},${c.y0})`,children:[d.jsxRuntimeExports.jsx("rect",{x:0,y:0,width:(c.x1||0)-(c.x0||0),height:(c.y1||0)-(c.y0||0),style:{fill:c.color}}),r||M?d.jsxRuntimeExports.jsx("foreignObject",{y:0-w/2,x:0-a,width:a,height:(c.y1||0)-(c.y0||0)+w,children:d.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(c.y1||0)-(c.y0||0)+w}px`,overflow:"visible"},children:[r?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:M?"3xs":"none",size:"sm",leading:"none",className:d.mo("sankey-right-label text-right",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:`${c.label}`.length<h?`${c.label}`:`${`${c.label}`.substring(0,h)}...`}):null,M?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:"none",size:"sm",leading:"none",className:d.mo("sankey-right-value text-right font-bold",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:me.numberFormattingFunction(c.value,"NA",n,p,j)}):null]})}):null]})},vt),t[72]=E?.graphObjectValues,t[73]=a,t[74]=w,t[75]=n,t[76]=p,t[77]=r,t[78]=M,t[79]=O?.graphObjectValues,t[80]=j,t[81]=h,t[82]=Lt):Lt=t[82],nt=N.filter(ln).map(Lt);let bt;t[83]!==E?.graphObjectValues||t[84]!==w||t[85]!==S||t[86]!==n||t[87]!==p||t[88]!==x||t[89]!==r||t[90]!==M||t[91]!==O?.graphObjectValues||t[92]!==j||t[93]!==h?(bt=(c,vt)=>d.jsxRuntimeExports.jsx("g",{onMouseEnter:()=>{I(c)},onMouseLeave:()=>{I(void 0)},children:d.jsxRuntimeExports.jsxs("g",{transform:`translate(${c.x0},${c.y0})`,children:[d.jsxRuntimeExports.jsx("rect",{x:0,y:0,width:(c.x1||0)-(c.x0||0),height:(c.y1||0)-(c.y0||0),style:{fill:c.color}}),r||M?d.jsxRuntimeExports.jsx("foreignObject",{y:0-w/2,x:S,width:x-S,height:(c.y1||0)-(c.y0||0)+w,children:d.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(c.y1||0)-(c.y0||0)+w}px`},children:[r?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:M?"3xs":"none",size:"sm",leading:"none",className:d.mo("sankey-left-label text-left",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:`${c.label}`.length<h?`${c.label}`:`${`${c.label}`.substring(0,h)}...`}):null,M?d.jsxRuntimeExports.jsx(Ut._,{size:"sm",leading:"none",marginBottom:"none",className:d.mo("sankey-left-value text-left font-bold",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:me.numberFormattingFunction(c.value,"NA",n,p,j)}):null]})}):null]})},vt),t[83]=E?.graphObjectValues,t[84]=w,t[85]=S,t[86]=n,t[87]=p,t[88]=x,t[89]=r,t[90]=M,t[91]=O?.graphObjectValues,t[92]=j,t[93]=h,t[94]=bt):bt=t[94],ot=N.filter(sn).map(bt);let Mt;t[95]!==B?(Mt=(c,vt)=>d.jsxRuntimeExports.jsxs("linearGradient",{id:`${B}-gradient-${vt}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientUnits:"userSpaceOnUse",children:[d.jsxRuntimeExports.jsx("stop",{offset:"0%",style:{stopColor:c.source.color,stopOpacity:1}}),d.jsxRuntimeExports.jsx("stop",{offset:"100%",style:{stopColor:c.target.color,stopOpacity:1}})]},vt),t[95]=B,t[96]=Mt):Mt=t[96],it=d.jsxRuntimeExports.jsx("defs",{children:Vt.map(Mt)}),et=De.AnimatePresence,ft=Vt.map((c,vt)=>d.jsxRuntimeExports.jsx(ie.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:jt=>{v(c.data),Rt(jt.clientY),U(jt.clientX),D?.(c)},onMouseMove:jt=>{v(c.data),Rt(jt.clientY),U(jt.clientX)},onClick:()=>{(H||X)&&(Oe.isEqual(C,c.data)&&kt?(T(void 0),H?.(void 0)):(T(c.data),H?.(c.data)))},onMouseLeave:()=>{v(void 0),U(void 0),Rt(void 0),D?.(void 0)},variants:{initial:{opacity:V?c.source.name===V.name||c.target.name===V.name?.85:G:(z.length!==0||F.length!==0)&&(z.indexOf(c.source.label)!==-1||F.indexOf(c.target.label)!==-1)?.85:G},whileInView:{opacity:V?c.source.name===V.name||c.target.name===V.name?.85:G:(z.length!==0||F.length!==0)&&(z.indexOf(c.source.label)!==-1||F.indexOf(c.target.label)!==-1)?.85:G,transition:{duration:R.duration}}},initial:"initial",animate:i?"whileInView":"initial",exit:{opacity:0,transition:{duration:R.duration}},children:d.jsxRuntimeExports.jsx(ie.motion.path,{d:Nt(c)||"",style:{stroke:`url(#${B}-gradient-${vt})`,strokeWidth:c.width,fill:"none"},exit:{opacity:0,transition:{duration:R.duration}},variants:{initial:{pathLength:0,opacity:1},whileInView:{pathLength:1,opacity:1,transition:{duration:R.duration}}},initial:"initial",animate:i?"whileInView":"initial"},`${c.source}-${c.target}`)},`${c.source}-${c.target}`)),t[8]=R.duration,t[9]=E?.graphObjectValues,t[10]=l,t[11]=o,t[12]=G,t[13]=X,t[14]=$t,t[15]=wt,t[16]=y,t[17]=z,t[18]=F,t[19]=B,t[20]=i,t[21]=a,t[22]=m.left,t[23]=m.right,t[24]=m.top,t[25]=C,t[26]=w,t[27]=S,t[28]=H,t[29]=D,t[30]=n,t[31]=p,t[32]=kt,t[33]=x,t[34]=V,t[35]=r,t[36]=M,t[37]=tt,t[38]=_,t[39]=O?.graphObjectValues,t[40]=j,t[41]=W,t[42]=h,t[43]=g,t[44]=et,t[45]=lt,t[46]=at,t[47]=Z,t[48]=ut,t[49]=ct,t[50]=Q,t[51]=J,t[52]=ft,t[53]=ht,t[54]=K,t[55]=nt,t[56]=ot,t[57]=it,t[58]=gt,t[59]=dt}else et=t[44],lt=t[45],at=t[46],Z=t[47],ut=t[48],ct=t[49],Q=t[50],J=t[51],ft=t[52],ht=t[53],K=t[54],nt=t[55],ot=t[56],it=t[57],gt=t[58],dt=t[59];let pt;t[97]!==et||t[98]!==ft?(pt=d.jsxRuntimeExports.jsx("g",{children:d.jsxRuntimeExports.jsx(et,{children:ft})}),t[97]=et,t[98]=ft,t[99]=pt):pt=t[99];let mt;t[100]!==l?(mt=l.filter(rn).map(on),t[100]=l,t[101]=mt):mt=t[101];let xt;t[102]!==pt||t[103]!==mt||t[104]!==ht||t[105]!==K||t[106]!==nt||t[107]!==ot||t[108]!==it?(xt=d.jsxRuntimeExports.jsxs("g",{transform:ht,children:[K,nt,ot,it,pt,mt]}),t[102]=pt,t[103]=mt,t[104]=ht,t[105]=K,t[106]=nt,t[107]=ot,t[108]=it,t[109]=xt):xt=t[109];let rt;t[110]!==lt||t[111]!==at||t[112]!==Z||t[113]!==ut||t[114]!==ct||t[115]!==Q||t[116]!==J||t[117]!==xt||t[118]!==gt||t[119]!==dt?(rt=d.jsxRuntimeExports.jsxs(lt,{width:gt,height:dt,viewBox:at,style:Z,direction:ut,ref:ct,children:[Q,J,xt]}),t[110]=lt,t[111]=at,t[112]=Z,t[113]=ut,t[114]=ct,t[115]=Q,t[116]=J,t[117]=xt,t[118]=gt,t[119]=dt,t[120]=rt):rt=t[120];let yt;t[121]!==E?.tooltip||t[122]!==Y||t[123]!==St||t[124]!==f||t[125]!==O?.tooltip||t[126]!==$?(yt=f&&$&&Y&&St?d.jsxRuntimeExports.jsx(Ce.Tooltip,{data:f,body:$,xPos:Y,yPos:St,backgroundStyle:O?.tooltip,className:E?.tooltip}):null,t[121]=E?.tooltip,t[122]=Y,t[123]=St,t[124]=f,t[125]=O?.tooltip,t[126]=$,t[127]=yt):yt=t[127];let st;t[128]!==E?.modal||t[129]!==X||t[130]!==C?(st=X&&C!==void 0?d.jsxRuntimeExports.jsx(Ve.DetailsModal,{body:X,data:C,setData:T,className:E?.modal}):null,t[128]=E?.modal,t[129]=X,t[130]=C,t[131]=st):st=t[131];let Et;return t[132]!==rt||t[133]!==yt||t[134]!==st?(Et=d.jsxRuntimeExports.jsxs(d.jsxRuntimeExports.Fragment,{children:[rt,yt,st]}),t[132]=rt,t[133]=yt,t[134]=st,t[135]=Et):Et=t[135],Et}function on(e){return e.layer}function rn(e){return e.position==="after"}function sn(e){return e.type==="target"}function ln(e){return e.type==="source"}function an(e){return e.layer}function un(e){return e.position==="before"}function cn(e,t){return(e.value||0)-(t.value||0)}function fn(e,t){return(t.value||0)-(e.value||0)}function hn(e){const t=d.compilerRuntimeExports.c(98),{data:o,graphTitle:r,sources:a,graphDescription:x,showLabels:h,leftMargin:g,rightMargin:y,topMargin:k,bottomMargin:b,truncateBy:$,height:D,width:j,footNote:p,padding:M,backgroundColor:H,tooltip:w,onSeriesMouseOver:S,suffix:B,prefix:z,relativeHeight:F,showValues:G,graphID:_,onSeriesMouseClick:W,graphDownload:R,dataDownload:tt,fillContainer:kt,language:X,minHeight:O,theme:E,ariaLabel:n,sourceColors:l,targetColors:s,sourceColorDomain:u,targetColorDomain:i,nodePadding:f,nodeWidth:v,highlightedSourceDataPoints:C,highlightedTargetDataPoints:T,defaultLinkOpacity:V,sourceTitle:I,targetTitle:Y,sortNodes:U,resetSelectionOnDoubleClick:St,detailsOnClick:Rt,styles:L,classNames:m,animate:wt,precision:$t,customLayers:et}=e,lt=h===void 0?!0:h,at=g===void 0?75:g,Z=y===void 0?75:y,ut=k===void 0?30:k,ct=b===void 0?10:b,Q=$===void 0?999:$,J=H===void 0?!1:H,ft=B===void 0?"":B,ht=z===void 0?"":z,K=G===void 0?!0:G,nt=R===void 0?!1:R,ot=tt===void 0?!1:tt,it=kt===void 0?!0:kt,gt=X===void 0?"en":X,dt=O===void 0?0:O,pt=E===void 0?"light":E,mt=f===void 0?5:f,xt=v===void 0?5:v;let rt;t[0]!==C?(rt=C===void 0?[]:C,t[0]=C,t[1]=rt):rt=t[1];const yt=rt;let st;t[2]!==T?(st=T===void 0?[]:T,t[2]=T,t[3]=st):st=t[3];const Et=st,It=V===void 0?.3:V,N=U===void 0?"mostReadable":U,Vt=St===void 0?!0:St,Nt=wt===void 0?!1:wt,Lt=$t===void 0?2:$t;let bt;t[4]!==et?(bt=et===void 0?[]:et,t[4]=et,t[5]=bt):bt=t[5];const Mt=bt,[c,vt]=A.useState(0),[jt,Me]=A.useState(0),[At,Se]=A.useState(void 0),Jt=A.useRef(null),he=A.useRef(null);let Ht;t[6]===Symbol.for("react.memo_cache_sentinel")?(Ht=Ot=>{Se(Ot)},t[6]=Ht):Ht=t[6];const Kt=A.useEffectEvent(Ht);let Gt;t[7]!==o||t[8]!==N||t[9]!==u||t[10]!==l||t[11]!==i||t[12]!==s||t[13]!==Kt?(Gt=()=>{const Ot=zt.uniqBy(o,"source",!0).map(q=>({name:`source_${q}`,type:"source",label:`${q}`,color:typeof l=="string"||!l?l||xe.Colors.graphMainColor:l[(u||zt.uniqBy(o,"source",!0)).findIndex(P=>`${P}`==`${q}`)>l.length?l.length-1:(u||zt.uniqBy(o,"source",!0)).findIndex(P=>`${P}`==`${q}`)],totalValue:de.sum(o.filter(P=>`${P.source}`==`${q}`).map(kn))})),Yt=N==="asc"||N==="desc"?pe.orderBy(Ot,["totalValue"],[N]):Ot,ge=zt.uniqBy(o,"target",!0).map(q=>({name:`target_${q}`,type:"target",label:`${q}`,color:typeof s=="string"||!s?s||xe.Colors.graphMainColor:s[(i||zt.uniqBy(o,"target",!0)).findIndex(P=>`${P}`==`${q}`)>s.length?s.length-1:(i||zt.uniqBy(o,"target",!0)).findIndex(P=>`${P}`==`${q}`)],totalValue:de.sum(o.filter(P=>`${P.target}`==`${q}`).map(jn))})),Re=N==="asc"||N==="desc"?pe.orderBy(ge,["totalValue"],[N]):ge,oe=[...Yt,...Re];Kt({nodes:oe,links:o.map(q=>({source:oe.findIndex(P=>P.name===`source_${q.source}`),target:oe.findIndex(P=>P.name===`target_${q.target}`),value:q.value,data:{...q}}))})},t[7]=o,t[8]=N,t[9]=u,t[10]=l,t[11]=i,t[12]=s,t[13]=Kt,t[14]=Gt):Gt=t[14];let Wt;t[15]!==o||t[16]!==N||t[17]!==u||t[18]!==l||t[19]!==i||t[20]!==s?(Wt=[o,N,u,l,i,s],t[15]=o,t[16]=N,t[17]=u,t[18]=l,t[19]=i,t[20]=s,t[21]=Wt):Wt=t[21],A.useEffect(Gt,Wt);let Ft,_t;t[22]===Symbol.for("react.memo_cache_sentinel")?(Ft=()=>{const Ot=new ResizeObserver(Yt=>{vt(Yt[0].target.clientWidth||620),Me(Yt[0].target.clientHeight||480)});return Jt.current&&Ot.observe(Jt.current),()=>Ot.disconnect()},_t=[],t[22]=Ft,t[23]=_t):(Ft=t[22],_t=t[23]),A.useEffect(Ft,_t);const te=m?.graphContainer,ee=L?.graphContainer,ne=it?void 0:j;let Dt;t[24]!==m?.description||t[25]!==m?.title||t[26]!==o||t[27]!==ot||t[28]!==x||t[29]!==nt||t[30]!==r||t[31]!==L?.description||t[32]!==L?.title||t[33]!==j?(Dt=r||x||nt||ot?d.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:L?.title,description:L?.description},classNames:{title:m?.title,description:m?.description},graphTitle:r,graphDescription:x,width:j,graphDownload:nt?he:void 0,dataDownload:ot?o.map(vn).filter(yn).length>0?o.map(xn).filter(mn):o.filter(pn):null}):null,t[24]=m?.description,t[25]=m?.title,t[26]=o,t[27]=ot,t[28]=x,t[29]=nt,t[30]=r,t[31]=L?.description,t[32]=L?.title,t[33]=j,t[34]=Dt):Dt=t[34];let Tt;t[35]!==o.length?(Tt=o.length===0&&d.jsxRuntimeExports.jsx(Pe.EmptyState,{}),t[35]=o.length,t[36]=Tt):Tt=t[36];let qt;t[37]!==Nt||t[38]!==ct||t[39]!==m||t[40]!==Mt||t[41]!==o.length||t[42]!==It||t[43]!==Rt||t[44]!==it||t[45]!==yt||t[46]!==Et||t[47]!==at||t[48]!==mt||t[49]!==xt||t[50]!==W||t[51]!==S||t[52]!==Lt||t[53]!==ht||t[54]!==Vt||t[55]!==Z||t[56]!==At||t[57]!==lt||t[58]!==K||t[59]!==N||t[60]!==I||t[61]!==L||t[62]!==ft||t[63]!==jt||t[64]!==c||t[65]!==Y||t[66]!==w||t[67]!==ut||t[68]!==Q||t[69]!==j?(qt=c&&jt&&At&&o.length>0?d.jsxRuntimeExports.jsx(nn,{data:At,nodePadding:mt,nodeWidth:xt,width:it||!j||c<j?c:j,height:jt,showLabels:lt,leftMargin:at,rightMargin:Z,topMargin:ut,bottomMargin:ct,truncateBy:Q,tooltip:w,onSeriesMouseOver:S,showValues:K,suffix:ft,prefix:ht,onSeriesMouseClick:W,id:Be.generateRandomString(8),highlightedSourceDataPoints:yt.map(dn),highlightedTargetDataPoints:Et.map(gn),defaultLinkOpacity:It,sourceTitle:I,targetTitle:Y,sortNodes:N,resetSelectionOnDoubleClick:Vt,styles:L,classNames:m,detailsOnClick:Rt,animate:Nt===!0?{duration:.5,once:!0,amount:.5}:Nt||{duration:0,once:!0,amount:0},precision:Lt,customLayers:Mt}):null,t[37]=Nt,t[38]=ct,t[39]=m,t[40]=Mt,t[41]=o.length,t[42]=It,t[43]=Rt,t[44]=it,t[45]=yt,t[46]=Et,t[47]=at,t[48]=mt,t[49]=xt,t[50]=W,t[51]=S,t[52]=Lt,t[53]=ht,t[54]=Vt,t[55]=Z,t[56]=At,t[57]=lt,t[58]=K,t[59]=N,t[60]=I,t[61]=L,t[62]=ft,t[63]=jt,t[64]=c,t[65]=Y,t[66]=w,t[67]=ut,t[68]=Q,t[69]=j,t[70]=qt):qt=t[70];let Bt;t[71]!==Tt||t[72]!==qt?(Bt=d.jsxRuntimeExports.jsxs(ye.GraphArea,{ref:Jt,children:[Tt,qt]}),t[71]=Tt,t[72]=qt,t[73]=Bt):Bt=t[73];let Pt;t[74]!==m?.footnote||t[75]!==m?.source||t[76]!==p||t[77]!==a||t[78]!==L?.footnote||t[79]!==L?.source||t[80]!==j?(Pt=a||p?d.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:L?.footnote,source:L?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:a,footNote:p,width:j}):null,t[74]=m?.footnote,t[75]=m?.source,t[76]=p,t[77]=a,t[78]=L?.footnote,t[79]=L?.source,t[80]=j,t[81]=Pt):Pt=t[81];let Xt;return t[82]!==n||t[83]!==J||t[84]!==_||t[85]!==D||t[86]!==gt||t[87]!==dt||t[88]!==M||t[89]!==F||t[90]!==te||t[91]!==ee||t[92]!==ne||t[93]!==Dt||t[94]!==Bt||t[95]!==Pt||t[96]!==pt?(Xt=d.jsxRuntimeExports.jsxs(ye.GraphContainer,{className:te,style:ee,id:_,ref:he,"aria-label":n,backgroundColor:J,theme:pt,language:gt,minHeight:dt,width:ne,height:D,relativeHeight:F,padding:M,children:[Dt,Bt,Pt]}),t[82]=n,t[83]=J,t[84]=_,t[85]=D,t[86]=gt,t[87]=dt,t[88]=M,t[89]=F,t[90]=te,t[91]=ee,t[92]=ne,t[93]=Dt,t[94]=Bt,t[95]=Pt,t[96]=pt,t[97]=Xt):Xt=t[97],Xt}function gn(e){return`${e}`}function dn(e){return`${e}`}function pn(e){return e!==void 0}function mn(e){return e!==void 0}function xn(e){return e.data}function yn(e){return e!==void 0}function vn(e){return e.data}function jn(e){return e.value}function kn(e){return e.value}exports.SankeyChart=hn;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CHPV5EwG-6v2a2njQ.cjs"),A=require("react"),de=require("./index-CSNtgibC.cjs"),pe=require("./index-Cno4Q0YE.cjs"),Oe=require("./index-DQA8q5sC.cjs"),Ut=require("./Typography-Cc_iHQB-.cjs"),me=require("./numberFormattingFunction-02t-wJta.cjs"),Ce=require("./Tooltip-BLa2EfMs.cjs"),Ve=require("./DetailsModal-DIRTulvr.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),Ne=require("./use-in-view-C3o_ntMv.cjs"),De=require("./index-CoobIWNj.cjs"),Te=require("./GraphHeader.cjs"),qe=require("./GraphFooter.cjs"),xe=require("./Colors.cjs"),Be=require("./generateRandomString-B5zBiJzS.cjs"),Pe=require("./EmptyState-N1eHt3vq.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),ye=require("./GraphContainer-B1EDxJ0S.cjs");function ve(e,t){let o;if(t===void 0)for(const r of e)r!=null&&(o<r||o===void 0&&r>=r)&&(o=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}return o}function Ee(e,t){let o;if(t===void 0)for(const r of e)r!=null&&(o>r||o===void 0&&r>=r)&&(o=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}return o}function re(e,t){let o=0;if(t===void 0)for(let r of e)(r=+r)&&(o+=r);else{let r=-1;for(let a of e)(a=+t(a,++r,e))&&(o+=a)}return o}function ze(e){return e.target.depth}function Ie(e,t){return e.sourceLinks.length?e.depth:t-1}function se(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?Ee(e.sourceLinks,ze)-1:0}function Zt(e){return function(){return e}}function je(e,t){return Qt(e.source,t.source)||e.index-t.index}function ke(e,t){return Qt(e.target,t.target)||e.index-t.index}function Qt(e,t){return e.y0-t.y0}function le(e){return e.value}function Ae(e){return e.index}function He(e){return e.nodes}function Ge(e){return e.links}function be(e,t){const o=e.get(t);if(!o)throw new Error("missing: "+t);return o}function we({nodes:e}){for(const t of e){let o=t.y0,r=o;for(const a of t.sourceLinks)a.y0=o+a.width/2,o+=a.width;for(const a of t.targetLinks)a.y1=r+a.width/2,r+=a.width}}function ae(){let e=0,t=0,o=1,r=1,a=24,x=8,h,g=Ae,y=Ie,k,b,$=He,D=Ge,j=6;function p(){const n={nodes:$.apply(null,arguments),links:D.apply(null,arguments)};return M(n),H(n),w(n),S(n),F(n),we(n),n}p.update=function(n){return we(n),n},p.nodeId=function(n){return arguments.length?(g=typeof n=="function"?n:Zt(n),p):g},p.nodeAlign=function(n){return arguments.length?(y=typeof n=="function"?n:Zt(n),p):y},p.nodeSort=function(n){return arguments.length?(k=n,p):k},p.nodeWidth=function(n){return arguments.length?(a=+n,p):a},p.nodePadding=function(n){return arguments.length?(x=h=+n,p):x},p.nodes=function(n){return arguments.length?($=typeof n=="function"?n:Zt(n),p):$},p.links=function(n){return arguments.length?(D=typeof n=="function"?n:Zt(n),p):D},p.linkSort=function(n){return arguments.length?(b=n,p):b},p.size=function(n){return arguments.length?(e=t=0,o=+n[0],r=+n[1],p):[o-e,r-t]},p.extent=function(n){return arguments.length?(e=+n[0][0],o=+n[1][0],t=+n[0][1],r=+n[1][1],p):[[e,t],[o,r]]},p.iterations=function(n){return arguments.length?(j=+n,p):j};function M({nodes:n,links:l}){for(const[u,i]of n.entries())i.index=u,i.sourceLinks=[],i.targetLinks=[];const s=new Map(n.map((u,i)=>[g(u,i,n),u]));for(const[u,i]of l.entries()){i.index=u;let{source:f,target:v}=i;typeof f!="object"&&(f=i.source=be(s,f)),typeof v!="object"&&(v=i.target=be(s,v)),f.sourceLinks.push(i),v.targetLinks.push(i)}if(b!=null)for(const{sourceLinks:u,targetLinks:i}of n)u.sort(b),i.sort(b)}function H({nodes:n}){for(const l of n)l.value=l.fixedValue===void 0?Math.max(re(l.sourceLinks,le),re(l.targetLinks,le)):l.fixedValue}function w({nodes:n}){const l=n.length;let s=new Set(n),u=new Set,i=0;for(;s.size;){for(const f of s){f.depth=i;for(const{target:v}of f.sourceLinks)u.add(v)}if(++i>l)throw new Error("circular link");s=u,u=new Set}}function S({nodes:n}){const l=n.length;let s=new Set(n),u=new Set,i=0;for(;s.size;){for(const f of s){f.height=i;for(const{source:v}of f.targetLinks)u.add(v)}if(++i>l)throw new Error("circular link");s=u,u=new Set}}function B({nodes:n}){const l=ve(n,i=>i.depth)+1,s=(o-e-a)/(l-1),u=new Array(l);for(const i of n){const f=Math.max(0,Math.min(l-1,Math.floor(y.call(null,i,l))));i.layer=f,i.x0=e+f*s,i.x1=i.x0+a,u[f]?u[f].push(i):u[f]=[i]}if(k)for(const i of u)i.sort(k);return u}function z(n){const l=Ee(n,s=>(r-t-(s.length-1)*h)/re(s,le));for(const s of n){let u=t;for(const i of s){i.y0=u,i.y1=u+i.value*l,u=i.y1+h;for(const f of i.sourceLinks)f.width=f.value*l}u=(r-u+h)/(s.length+1);for(let i=0;i<s.length;++i){const f=s[i];f.y0+=u*(i+1),f.y1+=u*(i+1)}X(s)}}function F(n){const l=B(n);h=Math.min(x,(r-t)/(ve(l,s=>s.length)-1)),z(l);for(let s=0;s<j;++s){const u=Math.pow(.99,s),i=Math.max(1-u,(s+1)/j);_(l,u,i),G(l,u,i)}}function G(n,l,s){for(let u=1,i=n.length;u<i;++u){const f=n[u];for(const v of f){let C=0,T=0;for(const{source:I,value:Y}of v.targetLinks){let U=Y*(v.layer-I.layer);C+=O(I,v)*U,T+=U}if(!(T>0))continue;let V=(C/T-v.y0)*l;v.y0+=V,v.y1+=V,kt(v)}k===void 0&&f.sort(Qt),W(f,s)}}function _(n,l,s){for(let u=n.length,i=u-2;i>=0;--i){const f=n[i];for(const v of f){let C=0,T=0;for(const{target:I,value:Y}of v.sourceLinks){let U=Y*(I.layer-v.layer);C+=E(v,I)*U,T+=U}if(!(T>0))continue;let V=(C/T-v.y0)*l;v.y0+=V,v.y1+=V,kt(v)}k===void 0&&f.sort(Qt),W(f,s)}}function W(n,l){const s=n.length>>1,u=n[s];tt(n,u.y0-h,s-1,l),R(n,u.y1+h,s+1,l),tt(n,r,n.length-1,l),R(n,t,0,l)}function R(n,l,s,u){for(;s<n.length;++s){const i=n[s],f=(l-i.y0)*u;f>1e-6&&(i.y0+=f,i.y1+=f),l=i.y1+h}}function tt(n,l,s,u){for(;s>=0;--s){const i=n[s],f=(i.y1-l)*u;f>1e-6&&(i.y0-=f,i.y1-=f),l=i.y0-h}}function kt({sourceLinks:n,targetLinks:l}){if(b===void 0){for(const{source:{sourceLinks:s}}of l)s.sort(ke);for(const{target:{targetLinks:s}}of n)s.sort(je)}}function X(n){if(b===void 0)for(const{sourceLinks:l,targetLinks:s}of n)l.sort(ke),s.sort(je)}function O(n,l){let s=n.y0-(n.sourceLinks.length-1)*h/2;for(const{target:u,width:i}of n.sourceLinks){if(u===l)break;s+=i+h}for(const{source:u,width:i}of l.targetLinks){if(u===n)break;s-=i}return s}function E(n,l){let s=l.y0-(l.targetLinks.length-1)*h/2;for(const{source:u,width:i}of l.targetLinks){if(u===n)break;s+=i+h}for(const{target:u,width:i}of n.sourceLinks){if(u===l)break;s-=i}return s}return p}var ue=Math.PI,ce=2*ue,Ct=1e-6,We=ce-Ct;function fe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Le(){return new fe}fe.prototype=Le.prototype={constructor:fe,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,o,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+o)+","+(this._y1=+r)},bezierCurveTo:function(e,t,o,r,a,x){this._+="C"+ +e+","+ +t+","+ +o+","+ +r+","+(this._x1=+a)+","+(this._y1=+x)},arcTo:function(e,t,o,r,a){e=+e,t=+t,o=+o,r=+r,a=+a;var x=this._x1,h=this._y1,g=o-e,y=r-t,k=x-e,b=h-t,$=k*k+b*b;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if($>Ct)if(!(Math.abs(b*g-y*k)>Ct)||!a)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var D=o-x,j=r-h,p=g*g+y*y,M=D*D+j*j,H=Math.sqrt(p),w=Math.sqrt($),S=a*Math.tan((ue-Math.acos((p+$-M)/(2*H*w)))/2),B=S/w,z=S/H;Math.abs(B-1)>Ct&&(this._+="L"+(e+B*k)+","+(t+B*b)),this._+="A"+a+","+a+",0,0,"+ +(b*D>k*j)+","+(this._x1=e+z*g)+","+(this._y1=t+z*y)}},arc:function(e,t,o,r,a,x){e=+e,t=+t,o=+o,x=!!x;var h=o*Math.cos(r),g=o*Math.sin(r),y=e+h,k=t+g,b=1^x,$=x?r-a:a-r;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+y+","+k:(Math.abs(this._x1-y)>Ct||Math.abs(this._y1-k)>Ct)&&(this._+="L"+y+","+k),o&&($<0&&($=$%ce+ce),$>We?this._+="A"+o+","+o+",0,1,"+b+","+(e-h)+","+(t-g)+"A"+o+","+o+",0,1,"+b+","+(this._x1=y)+","+(this._y1=k):$>Ct&&(this._+="A"+o+","+o+",0,"+ +($>=ue)+","+b+","+(this._x1=e+o*Math.cos(a))+","+(this._y1=t+o*Math.sin(a))))},rect:function(e,t,o,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +o+"v"+ +r+"h"+-o+"Z"},toString:function(){return this._}};function $e(e){return function(){return e}}function Fe(e){return e[0]}function _e(e){return e[1]}var Xe=Array.prototype.slice;function Ye(e){return e.source}function Ue(e){return e.target}function Ze(e){var t=Ye,o=Ue,r=Fe,a=_e,x=null;function h(){var g,y=Xe.call(arguments),k=t.apply(this,y),b=o.apply(this,y);if(x||(x=g=Le()),e(x,+r.apply(this,(y[0]=k,y)),+a.apply(this,y),+r.apply(this,(y[0]=b,y)),+a.apply(this,y)),g)return x=null,g+""||null}return h.source=function(g){return arguments.length?(t=g,h):t},h.target=function(g){return arguments.length?(o=g,h):o},h.x=function(g){return arguments.length?(r=typeof g=="function"?g:$e(+g),h):r},h.y=function(g){return arguments.length?(a=typeof g=="function"?g:$e(+g),h):a},h.context=function(g){return arguments.length?(x=g??null,h):x},h}function Qe(e,t,o,r,a){e.moveTo(t,o),e.bezierCurveTo(t=(t+r)/2,o,t,a,r,a)}function Je(){return Ze(Qe)}function Ke(e){return[e.source.x1,e.y0]}function tn(e){return[e.target.x0,e.y1]}function en(){return Je().source(Ke).target(tn)}function nn(e){const t=d.compilerRuntimeExports.c(136),{data:o,showLabels:r,leftMargin:a,rightMargin:x,truncateBy:h,width:g,height:y,topMargin:k,bottomMargin:b,tooltip:$,onSeriesMouseOver:D,suffix:j,prefix:p,showValues:M,onSeriesMouseClick:H,nodePadding:w,nodeWidth:S,id:B,highlightedSourceDataPoints:z,highlightedTargetDataPoints:F,defaultLinkOpacity:G,sourceTitle:_,targetTitle:W,animate:R,sortNodes:tt,resetSelectionOnDoubleClick:kt,detailsOnClick:X,styles:O,classNames:E,precision:n,customLayers:l}=e,s=A.useRef(null);let u;t[0]!==R.amount||t[1]!==R.once?(u={once:R.once,amount:R.amount},t[0]=R.amount,t[1]=R.once,t[2]=u):u=t[2];const i=Ne.useInView(s,u),[f,v]=A.useState(void 0),[C,T]=A.useState(void 0),[V,I]=A.useState(void 0),[Y,U]=A.useState(void 0),[St,Rt]=A.useState(void 0);let L;t[3]!==b||t[4]!==a||t[5]!==x||t[6]!==k?(L={top:k,bottom:b,left:a,right:x},t[3]=b,t[4]=a,t[5]=x,t[6]=k,t[7]=L):L=t[7];const m=L,wt=g-m.left-m.right,$t=y-m.top-m.bottom;let et,lt,at,Z,ut,ct,Q,J,ft,ht,K,nt,ot,it,gt,dt;if(t[8]!==R.duration||t[9]!==E?.graphObjectValues||t[10]!==l||t[11]!==o||t[12]!==G||t[13]!==X||t[14]!==$t||t[15]!==wt||t[16]!==y||t[17]!==z||t[18]!==F||t[19]!==B||t[20]!==i||t[21]!==a||t[22]!==m.left||t[23]!==m.right||t[24]!==m.top||t[25]!==C||t[26]!==w||t[27]!==S||t[28]!==H||t[29]!==D||t[30]!==n||t[31]!==p||t[32]!==kt||t[33]!==x||t[34]!==V||t[35]!==r||t[36]!==M||t[37]!==tt||t[38]!==_||t[39]!==O?.graphObjectValues||t[40]!==j||t[41]!==W||t[42]!==h||t[43]!==g){const It=tt==="mostReadable"?ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se):tt==="none"?ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se).nodeSort(null).linkSort(null):ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se).nodeSort(tt==="desc"?fn:cn),{nodes:N,links:Vt}=It(o),Nt=en();lt=ie.motion.svg,gt=`${g}px`,dt=`${y}px`,at=`0 0 ${g} ${y}`,t[60]===Symbol.for("react.memo_cache_sentinel")?(Z={marginLeft:"auto",marginRight:"auto"},t[60]=Z):Z=t[60],ut="ltr",ct=s,t[61]!==m.left||t[62]!==m.top||t[63]!==_?(Q=_?d.jsxRuntimeExports.jsx("text",{x:m.left,y:m.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"start"},children:_}):null,t[61]=m.left,t[62]=m.top,t[63]=_,t[64]=Q):Q=t[64],t[65]!==m.right||t[66]!==m.top||t[67]!==W||t[68]!==g?(J=W?d.jsxRuntimeExports.jsx("text",{x:g-m.right,y:m.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"end"},children:W}):null,t[65]=m.right,t[66]=m.top,t[67]=W,t[68]=g,t[69]=J):J=t[69],ht=`translate(${m.left},${m.top})`,t[70]!==l?(K=l.filter(un).map(an),t[70]=l,t[71]=K):K=t[71];let Lt;t[72]!==E?.graphObjectValues||t[73]!==a||t[74]!==w||t[75]!==n||t[76]!==p||t[77]!==r||t[78]!==M||t[79]!==O?.graphObjectValues||t[80]!==j||t[81]!==h?(Lt=(c,vt)=>d.jsxRuntimeExports.jsx("g",{onMouseEnter:()=>{I(c)},onMouseLeave:()=>{I(void 0)},children:d.jsxRuntimeExports.jsxs("g",{transform:`translate(${c.x0},${c.y0})`,children:[d.jsxRuntimeExports.jsx("rect",{x:0,y:0,width:(c.x1||0)-(c.x0||0),height:(c.y1||0)-(c.y0||0),style:{fill:c.color}}),r||M?d.jsxRuntimeExports.jsx("foreignObject",{y:0-w/2,x:0-a,width:a,height:(c.y1||0)-(c.y0||0)+w,children:d.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(c.y1||0)-(c.y0||0)+w}px`,overflow:"visible"},children:[r?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:M?"3xs":"none",size:"sm",leading:"none",className:d.mo("sankey-right-label text-right",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:`${c.label}`.length<h?`${c.label}`:`${`${c.label}`.substring(0,h)}...`}):null,M?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:"none",size:"sm",leading:"none",className:d.mo("sankey-right-value text-right font-bold",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:me.numberFormattingFunction(c.value,"NA",n,p,j)}):null]})}):null]})},vt),t[72]=E?.graphObjectValues,t[73]=a,t[74]=w,t[75]=n,t[76]=p,t[77]=r,t[78]=M,t[79]=O?.graphObjectValues,t[80]=j,t[81]=h,t[82]=Lt):Lt=t[82],nt=N.filter(ln).map(Lt);let bt;t[83]!==E?.graphObjectValues||t[84]!==w||t[85]!==S||t[86]!==n||t[87]!==p||t[88]!==x||t[89]!==r||t[90]!==M||t[91]!==O?.graphObjectValues||t[92]!==j||t[93]!==h?(bt=(c,vt)=>d.jsxRuntimeExports.jsx("g",{onMouseEnter:()=>{I(c)},onMouseLeave:()=>{I(void 0)},children:d.jsxRuntimeExports.jsxs("g",{transform:`translate(${c.x0},${c.y0})`,children:[d.jsxRuntimeExports.jsx("rect",{x:0,y:0,width:(c.x1||0)-(c.x0||0),height:(c.y1||0)-(c.y0||0),style:{fill:c.color}}),r||M?d.jsxRuntimeExports.jsx("foreignObject",{y:0-w/2,x:S,width:x-S,height:(c.y1||0)-(c.y0||0)+w,children:d.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(c.y1||0)-(c.y0||0)+w}px`},children:[r?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:M?"3xs":"none",size:"sm",leading:"none",className:d.mo("sankey-left-label text-left",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:`${c.label}`.length<h?`${c.label}`:`${`${c.label}`.substring(0,h)}...`}):null,M?d.jsxRuntimeExports.jsx(Ut._,{size:"sm",leading:"none",marginBottom:"none",className:d.mo("sankey-left-value text-left font-bold",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:me.numberFormattingFunction(c.value,"NA",n,p,j)}):null]})}):null]})},vt),t[83]=E?.graphObjectValues,t[84]=w,t[85]=S,t[86]=n,t[87]=p,t[88]=x,t[89]=r,t[90]=M,t[91]=O?.graphObjectValues,t[92]=j,t[93]=h,t[94]=bt):bt=t[94],ot=N.filter(sn).map(bt);let Mt;t[95]!==B?(Mt=(c,vt)=>d.jsxRuntimeExports.jsxs("linearGradient",{id:`${B}-gradient-${vt}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientUnits:"userSpaceOnUse",children:[d.jsxRuntimeExports.jsx("stop",{offset:"0%",style:{stopColor:c.source.color,stopOpacity:1}}),d.jsxRuntimeExports.jsx("stop",{offset:"100%",style:{stopColor:c.target.color,stopOpacity:1}})]},vt),t[95]=B,t[96]=Mt):Mt=t[96],it=d.jsxRuntimeExports.jsx("defs",{children:Vt.map(Mt)}),et=De.AnimatePresence,ft=Vt.map((c,vt)=>d.jsxRuntimeExports.jsx(ie.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:jt=>{v(c.data),Rt(jt.clientY),U(jt.clientX),D?.(c)},onMouseMove:jt=>{v(c.data),Rt(jt.clientY),U(jt.clientX)},onClick:()=>{(H||X)&&(Oe.isEqual(C,c.data)&&kt?(T(void 0),H?.(void 0)):(T(c.data),H?.(c.data)))},onMouseLeave:()=>{v(void 0),U(void 0),Rt(void 0),D?.(void 0)},variants:{initial:{opacity:V?c.source.name===V.name||c.target.name===V.name?.85:G:(z.length!==0||F.length!==0)&&(z.indexOf(c.source.label)!==-1||F.indexOf(c.target.label)!==-1)?.85:G},whileInView:{opacity:V?c.source.name===V.name||c.target.name===V.name?.85:G:(z.length!==0||F.length!==0)&&(z.indexOf(c.source.label)!==-1||F.indexOf(c.target.label)!==-1)?.85:G,transition:{duration:R.duration}}},initial:"initial",animate:i?"whileInView":"initial",exit:{opacity:0,transition:{duration:R.duration}},children:d.jsxRuntimeExports.jsx(ie.motion.path,{d:Nt(c)||"",style:{stroke:`url(#${B}-gradient-${vt})`,strokeWidth:c.width,fill:"none"},exit:{opacity:0,transition:{duration:R.duration}},variants:{initial:{pathLength:0,opacity:1},whileInView:{pathLength:1,opacity:1,transition:{duration:R.duration}}},initial:"initial",animate:i?"whileInView":"initial"},`${c.source}-${c.target}`)},`${c.source}-${c.target}`)),t[8]=R.duration,t[9]=E?.graphObjectValues,t[10]=l,t[11]=o,t[12]=G,t[13]=X,t[14]=$t,t[15]=wt,t[16]=y,t[17]=z,t[18]=F,t[19]=B,t[20]=i,t[21]=a,t[22]=m.left,t[23]=m.right,t[24]=m.top,t[25]=C,t[26]=w,t[27]=S,t[28]=H,t[29]=D,t[30]=n,t[31]=p,t[32]=kt,t[33]=x,t[34]=V,t[35]=r,t[36]=M,t[37]=tt,t[38]=_,t[39]=O?.graphObjectValues,t[40]=j,t[41]=W,t[42]=h,t[43]=g,t[44]=et,t[45]=lt,t[46]=at,t[47]=Z,t[48]=ut,t[49]=ct,t[50]=Q,t[51]=J,t[52]=ft,t[53]=ht,t[54]=K,t[55]=nt,t[56]=ot,t[57]=it,t[58]=gt,t[59]=dt}else et=t[44],lt=t[45],at=t[46],Z=t[47],ut=t[48],ct=t[49],Q=t[50],J=t[51],ft=t[52],ht=t[53],K=t[54],nt=t[55],ot=t[56],it=t[57],gt=t[58],dt=t[59];let pt;t[97]!==et||t[98]!==ft?(pt=d.jsxRuntimeExports.jsx("g",{children:d.jsxRuntimeExports.jsx(et,{children:ft})}),t[97]=et,t[98]=ft,t[99]=pt):pt=t[99];let mt;t[100]!==l?(mt=l.filter(rn).map(on),t[100]=l,t[101]=mt):mt=t[101];let xt;t[102]!==pt||t[103]!==mt||t[104]!==ht||t[105]!==K||t[106]!==nt||t[107]!==ot||t[108]!==it?(xt=d.jsxRuntimeExports.jsxs("g",{transform:ht,children:[K,nt,ot,it,pt,mt]}),t[102]=pt,t[103]=mt,t[104]=ht,t[105]=K,t[106]=nt,t[107]=ot,t[108]=it,t[109]=xt):xt=t[109];let rt;t[110]!==lt||t[111]!==at||t[112]!==Z||t[113]!==ut||t[114]!==ct||t[115]!==Q||t[116]!==J||t[117]!==xt||t[118]!==gt||t[119]!==dt?(rt=d.jsxRuntimeExports.jsxs(lt,{width:gt,height:dt,viewBox:at,style:Z,direction:ut,ref:ct,children:[Q,J,xt]}),t[110]=lt,t[111]=at,t[112]=Z,t[113]=ut,t[114]=ct,t[115]=Q,t[116]=J,t[117]=xt,t[118]=gt,t[119]=dt,t[120]=rt):rt=t[120];let yt;t[121]!==E?.tooltip||t[122]!==Y||t[123]!==St||t[124]!==f||t[125]!==O?.tooltip||t[126]!==$?(yt=f&&$&&Y&&St?d.jsxRuntimeExports.jsx(Ce.Tooltip,{data:f,body:$,xPos:Y,yPos:St,backgroundStyle:O?.tooltip,className:E?.tooltip}):null,t[121]=E?.tooltip,t[122]=Y,t[123]=St,t[124]=f,t[125]=O?.tooltip,t[126]=$,t[127]=yt):yt=t[127];let st;t[128]!==E?.modal||t[129]!==X||t[130]!==C?(st=X&&C!==void 0?d.jsxRuntimeExports.jsx(Ve.DetailsModal,{body:X,data:C,setData:T,className:E?.modal}):null,t[128]=E?.modal,t[129]=X,t[130]=C,t[131]=st):st=t[131];let Et;return t[132]!==rt||t[133]!==yt||t[134]!==st?(Et=d.jsxRuntimeExports.jsxs(d.jsxRuntimeExports.Fragment,{children:[rt,yt,st]}),t[132]=rt,t[133]=yt,t[134]=st,t[135]=Et):Et=t[135],Et}function on(e){return e.layer}function rn(e){return e.position==="after"}function sn(e){return e.type==="target"}function ln(e){return e.type==="source"}function an(e){return e.layer}function un(e){return e.position==="before"}function cn(e,t){return(e.value||0)-(t.value||0)}function fn(e,t){return(t.value||0)-(e.value||0)}function hn(e){const t=d.compilerRuntimeExports.c(98),{data:o,graphTitle:r,sources:a,graphDescription:x,showLabels:h,leftMargin:g,rightMargin:y,topMargin:k,bottomMargin:b,truncateBy:$,height:D,width:j,footNote:p,padding:M,backgroundColor:H,tooltip:w,onSeriesMouseOver:S,suffix:B,prefix:z,relativeHeight:F,showValues:G,graphID:_,onSeriesMouseClick:W,graphDownload:R,dataDownload:tt,fillContainer:kt,language:X,minHeight:O,theme:E,ariaLabel:n,sourceColors:l,targetColors:s,sourceColorDomain:u,targetColorDomain:i,nodePadding:f,nodeWidth:v,highlightedSourceDataPoints:C,highlightedTargetDataPoints:T,defaultLinkOpacity:V,sourceTitle:I,targetTitle:Y,sortNodes:U,resetSelectionOnDoubleClick:St,detailsOnClick:Rt,styles:L,classNames:m,animate:wt,precision:$t,customLayers:et}=e,lt=h===void 0?!0:h,at=g===void 0?75:g,Z=y===void 0?75:y,ut=k===void 0?30:k,ct=b===void 0?10:b,Q=$===void 0?999:$,J=H===void 0?!1:H,ft=B===void 0?"":B,ht=z===void 0?"":z,K=G===void 0?!0:G,nt=R===void 0?!1:R,ot=tt===void 0?!1:tt,it=kt===void 0?!0:kt,gt=X===void 0?"en":X,dt=O===void 0?0:O,pt=E===void 0?"light":E,mt=f===void 0?5:f,xt=v===void 0?5:v;let rt;t[0]!==C?(rt=C===void 0?[]:C,t[0]=C,t[1]=rt):rt=t[1];const yt=rt;let st;t[2]!==T?(st=T===void 0?[]:T,t[2]=T,t[3]=st):st=t[3];const Et=st,It=V===void 0?.3:V,N=U===void 0?"mostReadable":U,Vt=St===void 0?!0:St,Nt=wt===void 0?!1:wt,Lt=$t===void 0?2:$t;let bt;t[4]!==et?(bt=et===void 0?[]:et,t[4]=et,t[5]=bt):bt=t[5];const Mt=bt,[c,vt]=A.useState(0),[jt,Me]=A.useState(0),[At,Se]=A.useState(void 0),Jt=A.useRef(null),he=A.useRef(null);let Ht;t[6]===Symbol.for("react.memo_cache_sentinel")?(Ht=Ot=>{Se(Ot)},t[6]=Ht):Ht=t[6];const Kt=A.useEffectEvent(Ht);let Gt;t[7]!==o||t[8]!==N||t[9]!==u||t[10]!==l||t[11]!==i||t[12]!==s||t[13]!==Kt?(Gt=()=>{const Ot=zt.uniqBy(o,"source",!0).map(q=>({name:`source_${q}`,type:"source",label:`${q}`,color:typeof l=="string"||!l?l||xe.Colors.graphMainColor:l[(u||zt.uniqBy(o,"source",!0)).findIndex(P=>`${P}`==`${q}`)>l.length?l.length-1:(u||zt.uniqBy(o,"source",!0)).findIndex(P=>`${P}`==`${q}`)],totalValue:de.sum(o.filter(P=>`${P.source}`==`${q}`).map(kn))})),Yt=N==="asc"||N==="desc"?pe.orderBy(Ot,["totalValue"],[N]):Ot,ge=zt.uniqBy(o,"target",!0).map(q=>({name:`target_${q}`,type:"target",label:`${q}`,color:typeof s=="string"||!s?s||xe.Colors.graphMainColor:s[(i||zt.uniqBy(o,"target",!0)).findIndex(P=>`${P}`==`${q}`)>s.length?s.length-1:(i||zt.uniqBy(o,"target",!0)).findIndex(P=>`${P}`==`${q}`)],totalValue:de.sum(o.filter(P=>`${P.target}`==`${q}`).map(jn))})),Re=N==="asc"||N==="desc"?pe.orderBy(ge,["totalValue"],[N]):ge,oe=[...Yt,...Re];Kt({nodes:oe,links:o.map(q=>({source:oe.findIndex(P=>P.name===`source_${q.source}`),target:oe.findIndex(P=>P.name===`target_${q.target}`),value:q.value,data:{...q}}))})},t[7]=o,t[8]=N,t[9]=u,t[10]=l,t[11]=i,t[12]=s,t[13]=Kt,t[14]=Gt):Gt=t[14];let Wt;t[15]!==o||t[16]!==N||t[17]!==u||t[18]!==l||t[19]!==i||t[20]!==s?(Wt=[o,N,u,l,i,s],t[15]=o,t[16]=N,t[17]=u,t[18]=l,t[19]=i,t[20]=s,t[21]=Wt):Wt=t[21],A.useEffect(Gt,Wt);let Ft,_t;t[22]===Symbol.for("react.memo_cache_sentinel")?(Ft=()=>{const Ot=new ResizeObserver(Yt=>{vt(Yt[0].target.clientWidth||620),Me(Yt[0].target.clientHeight||480)});return Jt.current&&Ot.observe(Jt.current),()=>Ot.disconnect()},_t=[],t[22]=Ft,t[23]=_t):(Ft=t[22],_t=t[23]),A.useEffect(Ft,_t);const te=m?.graphContainer,ee=L?.graphContainer,ne=it?void 0:j;let Dt;t[24]!==m?.description||t[25]!==m?.title||t[26]!==o||t[27]!==ot||t[28]!==x||t[29]!==nt||t[30]!==r||t[31]!==L?.description||t[32]!==L?.title||t[33]!==j?(Dt=r||x||nt||ot?d.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:L?.title,description:L?.description},classNames:{title:m?.title,description:m?.description},graphTitle:r,graphDescription:x,width:j,graphDownload:nt?he:void 0,dataDownload:ot?o.map(vn).filter(yn).length>0?o.map(xn).filter(mn):o.filter(pn):null}):null,t[24]=m?.description,t[25]=m?.title,t[26]=o,t[27]=ot,t[28]=x,t[29]=nt,t[30]=r,t[31]=L?.description,t[32]=L?.title,t[33]=j,t[34]=Dt):Dt=t[34];let Tt;t[35]!==o.length?(Tt=o.length===0&&d.jsxRuntimeExports.jsx(Pe.EmptyState,{}),t[35]=o.length,t[36]=Tt):Tt=t[36];let qt;t[37]!==Nt||t[38]!==ct||t[39]!==m||t[40]!==Mt||t[41]!==o.length||t[42]!==It||t[43]!==Rt||t[44]!==it||t[45]!==yt||t[46]!==Et||t[47]!==at||t[48]!==mt||t[49]!==xt||t[50]!==W||t[51]!==S||t[52]!==Lt||t[53]!==ht||t[54]!==Vt||t[55]!==Z||t[56]!==At||t[57]!==lt||t[58]!==K||t[59]!==N||t[60]!==I||t[61]!==L||t[62]!==ft||t[63]!==jt||t[64]!==c||t[65]!==Y||t[66]!==w||t[67]!==ut||t[68]!==Q||t[69]!==j?(qt=c&&jt&&At&&o.length>0?d.jsxRuntimeExports.jsx(nn,{data:At,nodePadding:mt,nodeWidth:xt,width:it||!j||c<j?c:j,height:jt,showLabels:lt,leftMargin:at,rightMargin:Z,topMargin:ut,bottomMargin:ct,truncateBy:Q,tooltip:w,onSeriesMouseOver:S,showValues:K,suffix:ft,prefix:ht,onSeriesMouseClick:W,id:Be.generateRandomString(8),highlightedSourceDataPoints:yt.map(dn),highlightedTargetDataPoints:Et.map(gn),defaultLinkOpacity:It,sourceTitle:I,targetTitle:Y,sortNodes:N,resetSelectionOnDoubleClick:Vt,styles:L,classNames:m,detailsOnClick:Rt,animate:Nt===!0?{duration:.5,once:!0,amount:.5}:Nt||{duration:0,once:!0,amount:0},precision:Lt,customLayers:Mt}):null,t[37]=Nt,t[38]=ct,t[39]=m,t[40]=Mt,t[41]=o.length,t[42]=It,t[43]=Rt,t[44]=it,t[45]=yt,t[46]=Et,t[47]=at,t[48]=mt,t[49]=xt,t[50]=W,t[51]=S,t[52]=Lt,t[53]=ht,t[54]=Vt,t[55]=Z,t[56]=At,t[57]=lt,t[58]=K,t[59]=N,t[60]=I,t[61]=L,t[62]=ft,t[63]=jt,t[64]=c,t[65]=Y,t[66]=w,t[67]=ut,t[68]=Q,t[69]=j,t[70]=qt):qt=t[70];let Bt;t[71]!==Tt||t[72]!==qt?(Bt=d.jsxRuntimeExports.jsxs(ye.GraphArea,{ref:Jt,children:[Tt,qt]}),t[71]=Tt,t[72]=qt,t[73]=Bt):Bt=t[73];let Pt;t[74]!==m?.footnote||t[75]!==m?.source||t[76]!==p||t[77]!==a||t[78]!==L?.footnote||t[79]!==L?.source||t[80]!==j?(Pt=a||p?d.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:L?.footnote,source:L?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:a,footNote:p,width:j}):null,t[74]=m?.footnote,t[75]=m?.source,t[76]=p,t[77]=a,t[78]=L?.footnote,t[79]=L?.source,t[80]=j,t[81]=Pt):Pt=t[81];let Xt;return t[82]!==n||t[83]!==J||t[84]!==_||t[85]!==D||t[86]!==gt||t[87]!==dt||t[88]!==M||t[89]!==F||t[90]!==te||t[91]!==ee||t[92]!==ne||t[93]!==Dt||t[94]!==Bt||t[95]!==Pt||t[96]!==pt?(Xt=d.jsxRuntimeExports.jsxs(ye.GraphContainer,{className:te,style:ee,id:_,ref:he,"aria-label":n,backgroundColor:J,theme:pt,language:gt,minHeight:dt,width:ne,height:D,relativeHeight:F,padding:M,children:[Dt,Bt,Pt]}),t[82]=n,t[83]=J,t[84]=_,t[85]=D,t[86]=gt,t[87]=dt,t[88]=M,t[89]=F,t[90]=te,t[91]=ee,t[92]=ne,t[93]=Dt,t[94]=Bt,t[95]=Pt,t[96]=pt,t[97]=Xt):Xt=t[97],Xt}function gn(e){return`${e}`}function dn(e){return`${e}`}function pn(e){return e!==void 0}function mn(e){return e!==void 0}function xn(e){return e.data}function yn(e){return e!==void 0}function vn(e){return e.data}function jn(e){return e.value}function kn(e){return e.value}exports.SankeyChart=hn;
|
|
2
2
|
//# sourceMappingURL=SankeyChart.cjs.map
|
package/dist/SankeyChart.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { c as Se, j as m, m as Ut } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as Se, j as m, m as Ut } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useRef as ce, useState as St, useEffectEvent as Te, useEffect as me } from "react";
|
|
3
3
|
import { s as ye } from "./index-CeVNqhMO.js";
|
|
4
4
|
import { o as xe } from "./index-BZQYSqar.js";
|
|
5
5
|
import { i as Pe } from "./index-Bwrro8-q.js";
|
|
6
|
-
import { _ as Zt } from "./Typography-
|
|
6
|
+
import { _ as Zt } from "./Typography-HicNIA61.js";
|
|
7
7
|
import { n as ve } from "./numberFormattingFunction-14YCbkN2.js";
|
|
8
|
-
import { T as ze } from "./Tooltip-
|
|
9
|
-
import { D as Ee } from "./DetailsModal-
|
|
10
|
-
import { m as re } from "./proxy
|
|
11
|
-
import { u as Be } from "./use-in-view-
|
|
12
|
-
import { A as Ae } from "./index-
|
|
8
|
+
import { T as ze } from "./Tooltip-CohiIbLZ.js";
|
|
9
|
+
import { D as Ee } from "./DetailsModal-C3qlUyFK.js";
|
|
10
|
+
import { m as re } from "./proxy--_f6k3NR.js";
|
|
11
|
+
import { u as Be } from "./use-in-view-DqvKAveg.js";
|
|
12
|
+
import { A as Ae } from "./index-Co3YGYe1.js";
|
|
13
13
|
import { GraphHeader as Ie } from "./GraphHeader.js";
|
|
14
14
|
import { GraphFooter as He } from "./GraphFooter.js";
|
|
15
15
|
import { Colors as ke } from "./Colors.js";
|
|
16
16
|
import { g as We } from "./generateRandomString-za3IQGfQ.js";
|
|
17
|
-
import { E as Re } from "./EmptyState-
|
|
17
|
+
import { E as Re } from "./EmptyState-D807L58h.js";
|
|
18
18
|
import { u as It } from "./uniqBy-BHy4I8PK.js";
|
|
19
|
-
import { a as Ge, G as qe } from "./GraphContainer-
|
|
19
|
+
import { a as Ge, G as qe } from "./GraphContainer-DwMxWRCi.js";
|
|
20
20
|
function be(e, t) {
|
|
21
21
|
let o;
|
|
22
22
|
if (t === void 0)
|
package/dist/ScatterPlot.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),_t=require("./parse-xYI9yrvL.cjs"),L=require("react"),ei=require("./getSliderMarks-CIuSoedo.cjs"),ti=require("./index-DQA8q5sC.cjs"),di=require("./index-Cno4Q0YE.cjs"),ii=require("./simple-statistics-xm8c0LQQ.cjs"),pi=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./Colors.cjs"),ni=require("./numberFormattingFunction-02t-wJta.cjs"),Zt=require("./customArea-B1LWQBmM.cjs"),oi=require("./Axis-Jt_tmhxS.cjs"),si=require("./AxisTitle-DV4n0RxE.cjs"),hi=require("./XTicksAndGridLines-CekrPykD.cjs"),li=require("./ReferenceLine-M9aP3dj-.cjs"),gi=require("./RegressionLine-Ci-Dh0w0.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),vi=require("./index-D69M6klB.cjs"),bi=require("./DetailsModal-DHttOA80.cjs"),Ai=require("./pow-BnyPO-NX.cjs"),ri=require("./linear-CgUCbw9F.cjs"),ji=require("./delaunay-rcy0HhZi.cjs"),Ft=require("./proxy-C4-uo6nS.cjs"),Oi=require("./use-in-view-C3o_ntMv.cjs"),ai=require("./index-CoobIWNj.cjs"),Ci=require("./GraphFooter.cjs"),Ri=require("./GraphHeader.cjs"),ki=require("./ColorLegendWithMouseOver.cjs"),wi=require("./EmptyState-N1eHt3vq.cjs"),ci=require("./index-sbKVyHS2.cjs"),Si=require("./ensureCompleteData-D9bQTiVS.cjs"),ui=require("./uniqBy-O05lp2S5.cjs"),xi=require("./GraphContainer-B1EDxJ0S.cjs");function Ei(i){const e=o.compilerRuntimeExports.c(216),{data:n,width:ne,height:S,showLabels:We,colors:f,colorDomain:R,radius:T,xAxisTitle:g,yAxisTitle:H,leftMargin:P,rightMargin:ut,topMargin:Ct,bottomMargin:Dt,tooltip:xt,onSeriesMouseOver:oe,refXValues:Rt,refYValues:kt,highlightAreaSettings:wt,selectedColor:Ne,highlightedDataPoints:W,maxRadiusValue:ft,maxXValue:mt,minXValue:k,maxYValue:Be,minYValue:j,onSeriesMouseClick:N,rtl:ze,annotations:Je,customHighlightAreaSettings:$e,regressionLine:se,resetSelectionOnDoubleClick:Me,detailsOnClick:$,noOfXTicks:Ke,noOfYTicks:Qe,labelColor:Ve,xSuffix:qe,ySuffix:De,xPrefix:Ie,yPrefix:le,styles:s,classNames:l,animate:a,dimmedOpacity:M,precision:V,customLayers:q}=i,dt=L.useRef(null);let pt;e[0]!==a.amount||e[1]!==a.once?(pt={once:a.once,amount:a.amount},e[0]=a.amount,e[1]=a.once,e[2]=pt):pt=e[2];const b=Oi.useInView(dt,pt),[E,Te]=L.useState(void 0),[X,Ze]=L.useState(void 0),[ht,re]=L.useState(void 0),[h,u]=L.useState(void 0),St=g?Dt+50:Dt,Et=H?P+30:P;let gt;e[3]!==ut||e[4]!==St||e[5]!==Et||e[6]!==Ct?(gt={top:Ct,bottom:St,left:Et,right:ut},e[3]=ut,e[4]=St,e[5]=Et,e[6]=Ct,e[7]=gt):gt=e[7];const p=gt;let B,ae,ce,ue,xe,fe,Y,me,de,pe,z,he,J,ge,K,ye,F,Q;if(e[8]!==a||e[9]!==Je||e[10]!==l?.graphObjectValues||e[11]!==l?.regLine||e[12]!==l?.xAxis?.axis||e[13]!==l?.xAxis?.gridLines||e[14]!==l?.xAxis?.labels||e[15]!==l?.xAxis?.title||e[16]!==l?.yAxis?.gridLines||e[17]!==l?.yAxis?.labels||e[18]!==l?.yAxis?.title||e[19]!==R||e[20]!==f||e[21]!==$e||e[22]!==q||e[23]!==n||e[24]!==$||e[25]!==M||e[26]!==S||e[27]!==wt||e[28]!==W||e[29]!==b||e[30]!==Ve||e[31]!==P||e[32]!==p.bottom||e[33]!==p.left||e[34]!==p.right||e[35]!==p.top||e[36]!==ft||e[37]!==mt||e[38]!==Be||e[39]!==k||e[40]!==j||e[41]!==X||e[42]!==E||e[43]!==Ke||e[44]!==Qe||e[45]!==N||e[46]!==oe||e[47]!==V||e[48]!==T||e[49]!==Rt||e[50]!==kt||e[51]!==se||e[52]!==Me||e[53]!==ze||e[54]!==Ne||e[55]!==We||e[56]!==s?.graphObjectValues||e[57]!==s?.regLine||e[58]!==s?.xAxis?.axis||e[59]!==s?.xAxis?.gridLines||e[60]!==s?.xAxis?.labels||e[61]!==s?.xAxis?.title||e[62]!==s?.yAxis?.gridLines||e[63]!==s?.yAxis?.labels||e[64]!==s?.yAxis?.title||e[65]!==ne||e[66]!==g||e[67]!==Ie||e[68]!==qe||e[69]!==H||e[70]!==le||e[71]!==De){const _=n.map(_i),A=ne-p.left-p.right,y=S-p.top-p.bottom,w=n.filter(Zi).length!==n.length?Ai.sqrt().domain([0,ft]).range([.25,T]).nice():void 0,_e=_.filter(Qi).length===0?_:di.orderBy(_.filter(Ki),"radius","desc"),c=ri.linear().domain([k,mt]).range([0,A]).nice(),d=ri.linear().domain([j,Be]).range([y,0]).nice(),U=c.ticks(Ke),Lt=d.ticks(Qe),It=ji.Delaunay.from(_e.filter(Ji),t=>c(t.x),t=>d(t.y)).voronoi([0,0,A<0?0:A,y<0?0:y]),Tt=ii.linearRegression(n.filter(zi).map(t=>[c(t.x),d(t.y)])),Nt=ii.linearRegressionLine(Tt);ae=Ft.motion.svg,me=`${ne}px`,de=`${S}px`,pe=`0 0 ${ne} ${S}`,z="ltr",he=dt,ce=`translate(${p.left},${p.top})`;let Xe;e[90]!==a||e[91]!==$e||e[92]!==b||e[93]!==c||e[94]!==d?(Xe=o.jsxRuntimeExports.jsx(Zt.CustomArea,{areaSettings:$e,scaleX:c,scaleY:d,animate:a,isInView:b},"custom-area"),e[90]=a,e[91]=$e,e[92]=b,e[93]=c,e[94]=d,e[95]=Xe):Xe=e[95],ue=o.jsxRuntimeExports.jsxs(ai.AnimatePresence,{children:[o.jsxRuntimeExports.jsx(vi.HighlightAreaForScatterPlot,{areaSettings:wt,width:A,height:y,scaleX:c,scaleY:d,animate:a,isInView:b},"highlight-area"),Xe]});const yt=s?.yAxis?.gridLines,vt=s?.yAxis?.labels;let Ye;e[96]!==yt||e[97]!==vt?(Ye={gridLines:yt,labels:vt},e[96]=yt,e[97]=vt,e[98]=Ye):Ye=e[98];const bt=l?.yAxis?.gridLines,et=l?.yAxis?.labels;let r;e[99]!==bt||e[100]!==et?(r={gridLines:bt,labels:et},e[99]=bt,e[100]=et,e[101]=r):r=e[101];const tt=d(j<0?0:j),Pt=d(j<0?0:j),it=A+p.right,Xt=j<0?0:j;let O;e[102]!==V||e[103]!==Xt||e[104]!==le||e[105]!==De?(O=ni.numberFormattingFunction(Xt,"NA",V,le,De),e[102]=V,e[103]=Xt,e[104]=le,e[105]=De,e[106]=O):O=e[106];const Yt=d(j<0?0:j);let G;e[107]!==Yt?(G={x:0,y:Yt,dy:"0.33em",dx:-4},e[107]=Yt,e[108]=G):G=e[108];const x=l?.xAxis?.axis,D=l?.yAxis?.labels;let Ce;e[109]!==x||e[110]!==D?(Ce={axis:x,label:D},e[109]=x,e[110]=D,e[111]=Ce):Ce=e[111];const At=s?.xAxis?.axis;let nt;e[112]!==s?.yAxis?.labels?(nt=s?.yAxis?.labels||{},e[112]=s?.yAxis?.labels,e[113]=nt):nt=e[113];let Re;e[114]!==nt?(Re={textAnchor:"end",...nt},e[114]=nt,e[115]=Re):Re=e[115];let Fe;e[116]!==At||e[117]!==Re?(Fe={axis:At,label:Re},e[116]=At,e[117]=Re,e[118]=Fe):Fe=e[118];let Ue;e[119]!==tt||e[120]!==Pt||e[121]!==it||e[122]!==O||e[123]!==G||e[124]!==Ce||e[125]!==Fe?(Ue=o.jsxRuntimeExports.jsx(oi.Axis,{y1:tt,y2:Pt,x1:0,x2:it,label:O,labelPos:G,classNames:Ce,styles:Fe}),e[119]=tt,e[120]=Pt,e[121]=it,e[122]=O,e[123]=G,e[124]=Ce,e[125]=Fe,e[126]=Ue):Ue=e[126];const ot=0-P-15,st=y/2,lt=s?.yAxis?.title,jt=l?.yAxis?.title;let Ge;e[127]!==ot||e[128]!==st||e[129]!==lt||e[130]!==jt||e[131]!==H?(Ge=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:ot,y:st,style:lt,className:jt,text:H,rotate90:!0}),e[127]=ot,e[128]=st,e[129]=lt,e[130]=jt,e[131]=H,e[132]=Ge):Ge=e[132],xe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Lt.filter(Bi),y:Lt.filter(Wi).map(t=>d(t)),x1:0,x2:A+p.right,styles:Ye,classNames:r,suffix:De,prefix:le,labelType:"secondary",showGridLines:!0,labelPos:"side",precision:V}),Ue,Ge]});const rt=s?.xAxis?.gridLines,Ot=s?.xAxis?.labels;let at;e[133]!==rt||e[134]!==Ot?(at={gridLines:rt,labels:Ot},e[133]=rt,e[134]=Ot,e[135]=at):at=e[135];const ke=l?.xAxis?.gridLines,we=l?.xAxis?.labels;let ee;e[136]!==ke||e[137]!==we?(ee={gridLines:ke,labels:we},e[136]=ke,e[137]=we,e[138]=ee):ee=e[138];const Se=c(k<0?0:k),Ee=c(k<0?0:k),Le=k<0?0:k;let I;e[139]!==V||e[140]!==Le||e[141]!==Ie||e[142]!==qe?(I=ni.numberFormattingFunction(Le,"NA",V,Ie,qe),e[139]=V,e[140]=Le,e[141]=Ie,e[142]=qe,e[143]=I):I=e[143];const ct=c(k<0?0:k);let m;e[144]!==y||e[145]!==ct?(m={x:ct,y,dy:"1em",dx:0},e[144]=y,e[145]=ct,e[146]=m):m=e[146];const te=l?.xAxis?.axis,Ht=l?.yAxis?.labels;let $t;e[147]!==te||e[148]!==Ht?($t={axis:te,label:Ht},e[147]=te,e[148]=Ht,e[149]=$t):$t=e[149];const Wt=s?.xAxis?.axis;let Mt;e[150]!==s?.yAxis?.labels?(Mt=s?.yAxis?.labels||{},e[150]=s?.yAxis?.labels,e[151]=Mt):Mt=e[151];let Vt;e[152]!==Mt?(Vt={textAnchor:"middle",...Mt},e[152]=Mt,e[153]=Vt):Vt=e[153];let qt;e[154]!==Wt||e[155]!==Vt?(qt={axis:Wt,label:Vt},e[154]=Wt,e[155]=Vt,e[156]=qt):qt=e[156];let Ut;e[157]!==y||e[158]!==Se||e[159]!==Ee||e[160]!==I||e[161]!==m||e[162]!==$t||e[163]!==qt?(Ut=o.jsxRuntimeExports.jsx(oi.Axis,{x1:Se,x2:Ee,y1:0,y2:y,label:I,labelPos:m,classNames:$t,styles:qt}),e[157]=y,e[158]=Se,e[159]=Ee,e[160]=I,e[161]=m,e[162]=$t,e[163]=qt,e[164]=Ut):Ut=e[164];const Bt=A/2,zt=y+30,Jt=s?.xAxis?.title,Kt=l?.xAxis?.title;let Gt;e[165]!==Bt||e[166]!==zt||e[167]!==Jt||e[168]!==Kt||e[169]!==g?(Gt=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:Bt,y:zt,style:Jt,className:Kt,text:g}),e[165]=Bt,e[166]=zt,e[167]=Jt,e[168]=Kt,e[169]=g,e[170]=Gt):Gt=e[170],fe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(hi.XTicksAndGridLines,{values:U.filter(Hi),x:U.filter(Gi).map(t=>c(t)),y1:0,y2:y,styles:at,classNames:ee,suffix:qe,prefix:Ie,labelType:"primary",showGridLines:!0,precision:V}),Ut,Gt]}),e[171]!==q?(Y=q.filter(Ui).map(Fi),e[171]=q,e[172]=Y):Y=e[172],B=ai.AnimatePresence,J=_e.filter(Yi).map((t,He)=>o.jsxRuntimeExports.jsx("path",{d:It.renderCell(_e.findIndex(C=>C.id===t.id)),opacity:0,onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))}},`tesselation_${t.label||He}`)),ge=_e.filter(Xi).map((t,He)=>o.jsxRuntimeExports.jsxs(Ft.motion.g,{variants:{initial:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1},whileInView:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))},children:[o.jsxRuntimeExports.jsx(Ft.motion.circle,{cx:0,cy:0,exit:{r:0,transition:{duration:a.duration}},variants:{initial:{r:0,fill:n.filter(Pi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Ti).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray},whileInView:{r:w?w(t.radius||0):T,fill:n.filter(Ii).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Di).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",style:{fillOpacity:.6}}),We&&!v.checkIfNullOrUndefined(t.label)?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(qi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter(Vi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):W.length!==0&&!v.checkIfNullOrUndefined(t.label)&&W.indexOf(t.label)!==-1?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(Mi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter($i).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):null]},`${t.label||He}`)),K=Rt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineX,{text:t.text,color:t.color,x:c(t.value),y1:0,y2:y,textSide:c(t.value)>A*.75||ze?"left":"right",classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)),ye=kt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineY,{text:t.text,color:t.color,y:d(t.value),x1:0,x2:A,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He));const Qt=Je.map((t,He)=>{const C=Zt.getLineEndPoint({x:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?c(t.xCoordinate):0,y:t.yCoordinate?d(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),fi=t.showConnector?{y1:C.y,x1:C.x,y2:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?d(t.yCoordinate):0,cx:t.xCoordinate?c(t.xCoordinate):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,mi={y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:ze?0:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),width:ze?t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0):A+p.right-(t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return o.jsxRuntimeExports.jsx(Zt.Annotation,{color:t.color,connectorsSettings:fi,labelSettings:mi,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)});e[173]!==Qt?(F=o.jsxRuntimeExports.jsx("g",{children:Qt}),e[173]=Qt,e[174]=F):F=e[174],Q=se?o.jsxRuntimeExports.jsx(gi.RegressionLine,{x1:0,x2:A,y1:Nt(0),y2:Nt(A),graphHeight:y,graphWidth:A,className:l?.regLine,style:s?.regLine,color:typeof se=="string"?se:void 0,animate:a,isInView:b}):null,e[8]=a,e[9]=Je,e[10]=l?.graphObjectValues,e[11]=l?.regLine,e[12]=l?.xAxis?.axis,e[13]=l?.xAxis?.gridLines,e[14]=l?.xAxis?.labels,e[15]=l?.xAxis?.title,e[16]=l?.yAxis?.gridLines,e[17]=l?.yAxis?.labels,e[18]=l?.yAxis?.title,e[19]=R,e[20]=f,e[21]=$e,e[22]=q,e[23]=n,e[24]=$,e[25]=M,e[26]=S,e[27]=wt,e[28]=W,e[29]=b,e[30]=Ve,e[31]=P,e[32]=p.bottom,e[33]=p.left,e[34]=p.right,e[35]=p.top,e[36]=ft,e[37]=mt,e[38]=Be,e[39]=k,e[40]=j,e[41]=X,e[42]=E,e[43]=Ke,e[44]=Qe,e[45]=N,e[46]=oe,e[47]=V,e[48]=T,e[49]=Rt,e[50]=kt,e[51]=se,e[52]=Me,e[53]=ze,e[54]=Ne,e[55]=We,e[56]=s?.graphObjectValues,e[57]=s?.regLine,e[58]=s?.xAxis?.axis,e[59]=s?.xAxis?.gridLines,e[60]=s?.xAxis?.labels,e[61]=s?.xAxis?.title,e[62]=s?.yAxis?.gridLines,e[63]=s?.yAxis?.labels,e[64]=s?.yAxis?.title,e[65]=ne,e[66]=g,e[67]=Ie,e[68]=qe,e[69]=H,e[70]=le,e[71]=De,e[72]=B,e[73]=ae,e[74]=ce,e[75]=ue,e[76]=xe,e[77]=fe,e[78]=Y,e[79]=me,e[80]=de,e[81]=pe,e[82]=z,e[83]=he,e[84]=J,e[85]=ge,e[86]=K,e[87]=ye,e[88]=F,e[89]=Q}else B=e[72],ae=e[73],ce=e[74],ue=e[75],xe=e[76],fe=e[77],Y=e[78],me=e[79],de=e[80],pe=e[81],z=e[82],he=e[83],J=e[84],ge=e[85],K=e[86],ye=e[87],F=e[88],Q=e[89];let ve;e[175]!==B||e[176]!==J||e[177]!==ge||e[178]!==K||e[179]!==ye||e[180]!==F||e[181]!==Q?(ve=o.jsxRuntimeExports.jsxs(B,{children:[J,ge,K,ye,F,Q]}),e[175]=B,e[176]=J,e[177]=ge,e[178]=K,e[179]=ye,e[180]=F,e[181]=Q,e[182]=ve):ve=e[182];let be;e[183]!==q?(be=q.filter(Ni).map(Li),e[183]=q,e[184]=be):be=e[184];let Ae;e[185]!==ce||e[186]!==ue||e[187]!==xe||e[188]!==fe||e[189]!==Y||e[190]!==ve||e[191]!==be?(Ae=o.jsxRuntimeExports.jsxs("g",{transform:ce,children:[ue,xe,fe,Y,ve,be]}),e[185]=ce,e[186]=ue,e[187]=xe,e[188]=fe,e[189]=Y,e[190]=ve,e[191]=be,e[192]=Ae):Ae=e[192];let je;e[193]!==ae||e[194]!==me||e[195]!==de||e[196]!==pe||e[197]!==z||e[198]!==he||e[199]!==Ae?(je=o.jsxRuntimeExports.jsx(ae,{width:me,height:de,viewBox:pe,direction:z,ref:he,children:Ae}),e[193]=ae,e[194]=me,e[195]=de,e[196]=pe,e[197]=z,e[198]=he,e[199]=Ae,e[200]=je):je=e[200];let Oe;e[201]!==l?.tooltip||e[202]!==ht||e[203]!==h||e[204]!==E||e[205]!==s?.tooltip||e[206]!==xt?(Oe=E&&xt&&ht&&h?o.jsxRuntimeExports.jsx(pi.Tooltip,{data:E,body:xt,xPos:ht,yPos:h,backgroundStyle:s?.tooltip,className:l?.tooltip}):null,e[201]=l?.tooltip,e[202]=ht,e[203]=h,e[204]=E,e[205]=s?.tooltip,e[206]=xt,e[207]=Oe):Oe=e[207];let Z;e[208]!==l?.modal||e[209]!==$||e[210]!==X?(Z=$&&X!==void 0?o.jsxRuntimeExports.jsx(bi.DetailsModal,{body:$,data:X,setData:Ze,className:l?.modal}):null,e[208]=l?.modal,e[209]=$,e[210]=X,e[211]=Z):Z=e[211];let Pe;return e[212]!==je||e[213]!==Oe||e[214]!==Z?(Pe=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[je,Oe,Z]}),e[212]=je,e[213]=Oe,e[214]=Z,e[215]=Pe):Pe=e[215],Pe}function Li(i){return i.layer}function Ni(i){return i.position==="after"}function $i(i){return i.color}function Mi(i){return i.color}function Vi(i){return i.color}function qi(i){return i.color}function Di(i){return i.color}function Ii(i){return i.color}function Ti(i){return i.color}function Pi(i){return i.color}function Xi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Yi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Fi(i){return i.layer}function Ui(i){return i.position==="before"}function Gi(i){return i!==0}function Hi(i){return i!==0}function Wi(i){return i!==0}function Bi(i){return i!==0}function zi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ji(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ki(i){return!v.checkIfNullOrUndefined(i.radius)}function Qi(i){return!v.checkIfNullOrUndefined(i.radius)}function Zi(i){return i.radius===void 0||i.radius===null}function _i(i,e){return{...i,id:`${e}`}}function en(i){const e=o.compilerRuntimeExports.c(142),{data:n,graphTitle:ne,colors:S,sources:We,graphDescription:f,showLabels:R,height:T,width:g,footNote:H,colorDomain:P,colorLegendTitle:ut,radius:Ct,xAxisTitle:Dt,yAxisTitle:xt,padding:oe,backgroundColor:Rt,leftMargin:kt,rightMargin:wt,topMargin:Ne,bottomMargin:W,tooltip:ft,relativeHeight:mt,onSeriesMouseOver:k,refXValues:Be,refYValues:j,highlightAreaSettings:N,showColorScale:ze,highlightedDataPoints:Je,graphID:$e,maxRadiusValue:se,maxXValue:Me,minXValue:$,maxYValue:Ke,minYValue:Qe,xSuffix:Ve,ySuffix:qe,xPrefix:De,yPrefix:Ie,onSeriesMouseClick:le,graphDownload:s,dataDownload:l,language:a,showNAColor:M,minHeight:V,annotations:q,customHighlightAreaSettings:dt,theme:pt,regressionLine:b,ariaLabel:E,resetSelectionOnDoubleClick:Te,detailsOnClick:X,noOfXTicks:Ze,noOfYTicks:ht,labelColor:re,styles:h,classNames:u,animate:St,dimmedOpacity:Et,precision:gt,customLayers:p,timeline:B}=i,ae=R===void 0?!1:R,ce=Ct===void 0?5:Ct,ue=Dt===void 0?"X Axis":Dt,xe=xt===void 0?"Y Axis":xt,fe=Rt===void 0?!1:Rt,Y=kt===void 0?0:kt,me=wt===void 0?10:wt,de=Ne===void 0?20:Ne,pe=W===void 0?50:W;let z;e[0]!==Be?(z=Be===void 0?[]:Be,e[0]=Be,e[1]=z):z=e[1];const he=z;let J;e[2]!==j?(J=j===void 0?[]:j,e[2]=j,e[3]=J):J=e[3];const ge=J;let K;e[4]!==N?(K=N===void 0?[]:N,e[4]=N,e[5]=K):K=e[5];const ye=K,F=ze===void 0?!0:ze;let Q;e[6]!==Je?(Q=Je===void 0?[]:Je,e[6]=Je,e[7]=Q):Q=e[7];const ve=Q,be=Ve===void 0?"":Ve,Ae=qe===void 0?"":qe,je=De===void 0?"":De,Oe=Ie===void 0?"":Ie,Z=s===void 0?!1:s,Pe=l===void 0?!1:l,_=a===void 0?"en":a,A=M===void 0?!0:M,y=V===void 0?0:V;let w;e[8]!==q?(w=q===void 0?[]:q,e[8]=q,e[9]=w):w=e[9];const _e=w;let c;e[10]!==dt?(c=dt===void 0?[]:dt,e[10]=dt,e[11]=c):c=e[11];const d=c,U=pt===void 0?"light":pt,Lt=b===void 0?!1:b,It=Te===void 0?!0:Te,Tt=Ze===void 0?5:Ze,Nt=ht===void 0?5:ht,Xe=St===void 0?!1:St,yt=Et===void 0?.3:Et,vt=gt===void 0?2:gt;let Ye;e[12]!==p?(Ye=p===void 0?[]:p,e[12]=p,e[13]=Ye):Ye=e[13];const bt=Ye;let et;e[14]!==B?(et=B===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:B,e[14]=B,e[15]=et):et=e[15];const r=et,[tt,Pt]=L.useState(0),[it,Xt]=L.useState(0),[O,Yt]=L.useState(r.autoplay);let G;if(e[16]!==n||e[17]!==r.dateFormat){let m;e[19]!==r.dateFormat?(m=te=>_t.parse(`${te.date}`,r.dateFormat||"yyyy",new Date).getTime(),e[19]=r.dateFormat,e[20]=m):m=e[20],G=[...new Set(n.filter(Ln).map(m))],G.sort(En),e[16]=n,e[17]=r.dateFormat,e[18]=G}else G=e[18];const x=G,[D,Ce]=L.useState(r.autoplay?0:x.length-1),[At,nt]=L.useState(void 0),Re=L.useRef(null),Fe=L.useRef(null);let Ue,ot;e[21]===Symbol.for("react.memo_cache_sentinel")?(Ue=()=>{const m=new ResizeObserver(te=>{Pt(te[0].target.clientWidth||620),Xt(te[0].target.clientHeight||480)});return Re.current&&m.observe(Re.current),()=>m.disconnect()},ot=[],e[21]=Ue,e[22]=ot):(Ue=e[21],ot=e[22]),L.useEffect(Ue,ot);let st,lt;e[23]!==O||e[24]!==r.speed||e[25]!==x?(st=()=>{const m=setInterval(()=>{Ce(te=>te<x.length-1?te+1:0)},(r.speed||2)*1e3);return O||clearInterval(m),()=>clearInterval(m)},lt=[x,O,r.speed],e[23]=O,e[24]=r.speed,e[25]=x,e[26]=st,e[27]=lt):(st=e[26],lt=e[27]),L.useEffect(st,lt);const jt=r.dateFormat||"yyyy";let Ge;e[28]!==D||e[29]!==jt||e[30]!==r.showOnlyActiveDate||e[31]!==x?(Ge=ei.getSliderMarks(x,D,r.showOnlyActiveDate,jt),e[28]=D,e[29]=jt,e[30]=r.showOnlyActiveDate,e[31]=x,e[32]=Ge):Ge=e[32];const rt=Ge,Ot=u?.graphContainer,at=h?.graphContainer;let ke;e[33]!==u?.description||e[34]!==u?.title||e[35]!==n||e[36]!==Pe||e[37]!==f||e[38]!==Z||e[39]!==ne||e[40]!==h?.description||e[41]!==h?.title||e[42]!==g?(ke=ne||f||Z||Pe?o.jsxRuntimeExports.jsx(Ri.GraphHeader,{styles:{title:h?.title,description:h?.description},classNames:{title:u?.title,description:u?.description},graphTitle:ne,graphDescription:f,width:g,graphDownload:Z?Fe:void 0,dataDownload:Pe?n.map(Sn).filter(wn).length>0?n.map(kn).filter(Rn):n.filter(Cn):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=n,e[36]=Pe,e[37]=f,e[38]=Z,e[39]=ne,e[40]=h?.description,e[41]=h?.title,e[42]=g,e[43]=ke):ke=e[43];let we;e[44]!==D||e[45]!==rt||e[46]!==O||e[47]!==r.enabled||e[48]!==x?(we=r.enabled&&x.length>0&&rt?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Yt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(ci.Pause,{}):o.jsxRuntimeExports.jsx(ci.Play,{})}),o.jsxRuntimeExports.jsx(ei.Nr,{min:x[0],max:x[x.length-1],marks:rt,step:null,defaultValue:x[x.length-1],value:x[D],onChangeComplete:m=>{Ce(x.indexOf(m))},onChange:m=>{Ce(x.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=D,e[45]=rt,e[46]=O,e[47]=r.enabled,e[48]=x,e[49]=we):we=e[49];let ee;e[50]!==u?.colorLegend||e[51]!==P||e[52]!==ut||e[53]!==S||e[54]!==n||e[55]!==F||e[56]!==A||e[57]!==U||e[58]!==g?(ee=F&&n.filter(On).length!==0&&n.length>0?o.jsxRuntimeExports.jsx(ki.ColorLegendWithMouseOver,{width:g,colorLegendTitle:ut,colors:S||ie.Colors[U].categoricalColors.colors,colorDomain:P||ui.uniqBy(n,"color",!0),setSelectedColor:nt,showNAColor:A,className:u?.colorLegend}):null,e[50]=u?.colorLegend,e[51]=P,e[52]=ut,e[53]=S,e[54]=n,e[55]=F,e[56]=A,e[57]=U,e[58]=g,e[59]=ee):ee=e[59];let Se;e[60]!==n.length?(Se=n.length===0&&o.jsxRuntimeExports.jsx(wi.EmptyState,{}),e[60]=n.length,e[61]=Se):Se=e[61];let Ee;e[62]!==Xe||e[63]!==_e||e[64]!==pe||e[65]!==u||e[66]!==P||e[67]!==S||e[68]!==d||e[69]!==bt||e[70]!==n||e[71]!==X||e[72]!==yt||e[73]!==ye||e[74]!==ve||e[75]!==D||e[76]!==re||e[77]!==_||e[78]!==Y||e[79]!==se||e[80]!==Me||e[81]!==Ke||e[82]!==$||e[83]!==Qe||e[84]!==Tt||e[85]!==Nt||e[86]!==le||e[87]!==k||e[88]!==vt||e[89]!==ce||e[90]!==he||e[91]!==ge||e[92]!==Lt||e[93]!==It||e[94]!==me||e[95]!==At||e[96]!==ae||e[97]!==h||e[98]!==it||e[99]!==tt||e[100]!==U||e[101]!==r.dateFormat||e[102]!==r.enabled||e[103]!==ft||e[104]!==de||e[105]!==x||e[106]!==ue||e[107]!==je||e[108]!==be||e[109]!==xe||e[110]!==Oe||e[111]!==Ae?(Ee=tt&&it&&n.length>0?o.jsxRuntimeExports.jsx(Ei,{data:Si.ensureCompleteDataForScatterPlot(n,r.dateFormat||"yyyy").filter(m=>r.enabled?m.date===_t.format(new Date(x[D]),r.dateFormat||"yyyy"):m),width:tt,height:it,colorDomain:n.filter(jn).length===0?[]:P||ui.uniqBy(n,"color",!0),colors:n.filter(An).length===0?S?[S]:[ie.Colors.primaryColors["blue-600"]]:S||ie.Colors[U].categoricalColors.colors,xAxisTitle:ue,yAxisTitle:xe,refXValues:he,refYValues:ge,showLabels:ae,radius:ce,leftMargin:Y,rightMargin:me,topMargin:de,bottomMargin:pe,tooltip:ft,onSeriesMouseOver:k,highlightAreaSettings:ye,highlightedDataPoints:n.filter(bn).length===0?[]:ve,selectedColor:At,maxRadiusValue:v.checkIfNullOrUndefined(se)?Math.max(...n.map(vn).filter(yn)):se,maxXValue:v.checkIfNullOrUndefined(Me)?Math.max(...n.map(gn).filter(hn))>0?Math.max(...n.map(pn).filter(dn)):0:Me,minXValue:v.checkIfNullOrUndefined($)?Math.min(...n.map(mn).filter(fn))>0?0:Math.min(...n.map(xn).filter(un)):$,maxYValue:v.checkIfNullOrUndefined(Ke)?Math.max(...n.map(cn).filter(an))>0?Math.max(...n.map(rn).filter(ln)):0:Ke,minYValue:v.checkIfNullOrUndefined(Qe)?Math.min(...n.map(sn).filter(on))>0?0:Math.min(...n.map(nn).filter(tn)):Qe,onSeriesMouseClick:le,rtl:_==="he"||_==="ar",annotations:_e,customHighlightAreaSettings:d,regressionLine:Lt,resetSelectionOnDoubleClick:It,detailsOnClick:X,noOfXTicks:Tt,noOfYTicks:Nt,labelColor:re,xSuffix:be,ySuffix:Ae,xPrefix:je,yPrefix:Oe,styles:h,classNames:u,animate:Xe===!0?{duration:.5,once:!0,amount:.5}:Xe||{duration:0,once:!0,amount:0},dimmedOpacity:yt,precision:vt,customLayers:bt}):null,e[62]=Xe,e[63]=_e,e[64]=pe,e[65]=u,e[66]=P,e[67]=S,e[68]=d,e[69]=bt,e[70]=n,e[71]=X,e[72]=yt,e[73]=ye,e[74]=ve,e[75]=D,e[76]=re,e[77]=_,e[78]=Y,e[79]=se,e[80]=Me,e[81]=Ke,e[82]=$,e[83]=Qe,e[84]=Tt,e[85]=Nt,e[86]=le,e[87]=k,e[88]=vt,e[89]=ce,e[90]=he,e[91]=ge,e[92]=Lt,e[93]=It,e[94]=me,e[95]=At,e[96]=ae,e[97]=h,e[98]=it,e[99]=tt,e[100]=U,e[101]=r.dateFormat,e[102]=r.enabled,e[103]=ft,e[104]=de,e[105]=x,e[106]=ue,e[107]=je,e[108]=be,e[109]=xe,e[110]=Oe,e[111]=Ae,e[112]=Ee):Ee=e[112];let Le;e[113]!==Se||e[114]!==Ee?(Le=o.jsxRuntimeExports.jsxs(xi.GraphArea,{ref:Re,children:[Se,Ee]}),e[113]=Se,e[114]=Ee,e[115]=Le):Le=e[115];let I;e[116]!==u?.footnote||e[117]!==u?.source||e[118]!==H||e[119]!==We||e[120]!==h?.footnote||e[121]!==h?.source||e[122]!==g?(I=We||H?o.jsxRuntimeExports.jsx(Ci.GraphFooter,{styles:{footnote:h?.footnote,source:h?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:We,footNote:H,width:g}):null,e[116]=u?.footnote,e[117]=u?.source,e[118]=H,e[119]=We,e[120]=h?.footnote,e[121]=h?.source,e[122]=g,e[123]=I):I=e[123];let ct;return e[124]!==E||e[125]!==fe||e[126]!==$e||e[127]!==T||e[128]!==_||e[129]!==y||e[130]!==oe||e[131]!==mt||e[132]!==Ot||e[133]!==at||e[134]!==ke||e[135]!==we||e[136]!==ee||e[137]!==Le||e[138]!==I||e[139]!==U||e[140]!==g?(ct=o.jsxRuntimeExports.jsxs(xi.GraphContainer,{className:Ot,style:at,id:$e,ref:Fe,"aria-label":E,backgroundColor:fe,theme:U,language:_,minHeight:y,width:g,height:T,relativeHeight:mt,padding:oe,children:[ke,we,ee,Le,I]}),e[124]=E,e[125]=fe,e[126]=$e,e[127]=T,e[128]=_,e[129]=y,e[130]=oe,e[131]=mt,e[132]=Ot,e[133]=at,e[134]=ke,e[135]=we,e[136]=ee,e[137]=Le,e[138]=I,e[139]=U,e[140]=g,e[141]=ct):ct=e[141],ct}function tn(i){return i!=null}function nn(i){return i.y}function on(i){return i!=null}function sn(i){return i.y}function ln(i){return i!=null}function rn(i){return i.y}function an(i){return i!=null}function cn(i){return i.y}function un(i){return i!=null}function xn(i){return i.x}function fn(i){return i!=null}function mn(i){return i.x}function dn(i){return i!=null}function pn(i){return i.x}function hn(i){return i!=null}function gn(i){return i.x}function yn(i){return i!=null}function vn(i){return i.radius}function bn(i){return i.label}function An(i){return i.color}function jn(i){return i.color}function On(i){return i.color}function Cn(i){return i!==void 0}function Rn(i){return i!==void 0}function kn(i){return i.data}function wn(i){return i!==void 0}function Sn(i){return i.data}function En(i,e){return i-e}function Ln(i){return i.date}exports.ScatterPlot=en;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),_t=require("./parse-xYI9yrvL.cjs"),L=require("react"),ei=require("./getSliderMarks-CIuSoedo.cjs"),ti=require("./index-DQA8q5sC.cjs"),di=require("./index-Cno4Q0YE.cjs"),ii=require("./simple-statistics-xm8c0LQQ.cjs"),pi=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./Colors.cjs"),ni=require("./numberFormattingFunction-02t-wJta.cjs"),Zt=require("./customArea-B1LWQBmM.cjs"),oi=require("./Axis-Jt_tmhxS.cjs"),si=require("./AxisTitle-DV4n0RxE.cjs"),hi=require("./XTicksAndGridLines-CekrPykD.cjs"),li=require("./ReferenceLine-M9aP3dj-.cjs"),gi=require("./RegressionLine-Ci-Dh0w0.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),vi=require("./index-D69M6klB.cjs"),bi=require("./DetailsModal-DIRTulvr.cjs"),Ai=require("./pow-BnyPO-NX.cjs"),ri=require("./linear-CgUCbw9F.cjs"),ji=require("./delaunay-rcy0HhZi.cjs"),Ft=require("./proxy-C4-uo6nS.cjs"),Oi=require("./use-in-view-C3o_ntMv.cjs"),ai=require("./index-CoobIWNj.cjs"),Ci=require("./GraphFooter.cjs"),Ri=require("./GraphHeader.cjs"),ki=require("./ColorLegendWithMouseOver.cjs"),wi=require("./EmptyState-N1eHt3vq.cjs"),ci=require("./index-sbKVyHS2.cjs"),Si=require("./ensureCompleteData-D9bQTiVS.cjs"),ui=require("./uniqBy-O05lp2S5.cjs"),xi=require("./GraphContainer-B1EDxJ0S.cjs");function Ei(i){const e=o.compilerRuntimeExports.c(216),{data:n,width:ne,height:S,showLabels:We,colors:f,colorDomain:R,radius:T,xAxisTitle:g,yAxisTitle:H,leftMargin:P,rightMargin:ut,topMargin:Ct,bottomMargin:Dt,tooltip:xt,onSeriesMouseOver:oe,refXValues:Rt,refYValues:kt,highlightAreaSettings:wt,selectedColor:Ne,highlightedDataPoints:W,maxRadiusValue:ft,maxXValue:mt,minXValue:k,maxYValue:Be,minYValue:j,onSeriesMouseClick:N,rtl:ze,annotations:Je,customHighlightAreaSettings:$e,regressionLine:se,resetSelectionOnDoubleClick:Me,detailsOnClick:$,noOfXTicks:Ke,noOfYTicks:Qe,labelColor:Ve,xSuffix:qe,ySuffix:De,xPrefix:Ie,yPrefix:le,styles:s,classNames:l,animate:a,dimmedOpacity:M,precision:V,customLayers:q}=i,dt=L.useRef(null);let pt;e[0]!==a.amount||e[1]!==a.once?(pt={once:a.once,amount:a.amount},e[0]=a.amount,e[1]=a.once,e[2]=pt):pt=e[2];const b=Oi.useInView(dt,pt),[E,Te]=L.useState(void 0),[X,Ze]=L.useState(void 0),[ht,re]=L.useState(void 0),[h,u]=L.useState(void 0),St=g?Dt+50:Dt,Et=H?P+30:P;let gt;e[3]!==ut||e[4]!==St||e[5]!==Et||e[6]!==Ct?(gt={top:Ct,bottom:St,left:Et,right:ut},e[3]=ut,e[4]=St,e[5]=Et,e[6]=Ct,e[7]=gt):gt=e[7];const p=gt;let B,ae,ce,ue,xe,fe,Y,me,de,pe,z,he,J,ge,K,ye,F,Q;if(e[8]!==a||e[9]!==Je||e[10]!==l?.graphObjectValues||e[11]!==l?.regLine||e[12]!==l?.xAxis?.axis||e[13]!==l?.xAxis?.gridLines||e[14]!==l?.xAxis?.labels||e[15]!==l?.xAxis?.title||e[16]!==l?.yAxis?.gridLines||e[17]!==l?.yAxis?.labels||e[18]!==l?.yAxis?.title||e[19]!==R||e[20]!==f||e[21]!==$e||e[22]!==q||e[23]!==n||e[24]!==$||e[25]!==M||e[26]!==S||e[27]!==wt||e[28]!==W||e[29]!==b||e[30]!==Ve||e[31]!==P||e[32]!==p.bottom||e[33]!==p.left||e[34]!==p.right||e[35]!==p.top||e[36]!==ft||e[37]!==mt||e[38]!==Be||e[39]!==k||e[40]!==j||e[41]!==X||e[42]!==E||e[43]!==Ke||e[44]!==Qe||e[45]!==N||e[46]!==oe||e[47]!==V||e[48]!==T||e[49]!==Rt||e[50]!==kt||e[51]!==se||e[52]!==Me||e[53]!==ze||e[54]!==Ne||e[55]!==We||e[56]!==s?.graphObjectValues||e[57]!==s?.regLine||e[58]!==s?.xAxis?.axis||e[59]!==s?.xAxis?.gridLines||e[60]!==s?.xAxis?.labels||e[61]!==s?.xAxis?.title||e[62]!==s?.yAxis?.gridLines||e[63]!==s?.yAxis?.labels||e[64]!==s?.yAxis?.title||e[65]!==ne||e[66]!==g||e[67]!==Ie||e[68]!==qe||e[69]!==H||e[70]!==le||e[71]!==De){const _=n.map(_i),A=ne-p.left-p.right,y=S-p.top-p.bottom,w=n.filter(Zi).length!==n.length?Ai.sqrt().domain([0,ft]).range([.25,T]).nice():void 0,_e=_.filter(Qi).length===0?_:di.orderBy(_.filter(Ki),"radius","desc"),c=ri.linear().domain([k,mt]).range([0,A]).nice(),d=ri.linear().domain([j,Be]).range([y,0]).nice(),U=c.ticks(Ke),Lt=d.ticks(Qe),It=ji.Delaunay.from(_e.filter(Ji),t=>c(t.x),t=>d(t.y)).voronoi([0,0,A<0?0:A,y<0?0:y]),Tt=ii.linearRegression(n.filter(zi).map(t=>[c(t.x),d(t.y)])),Nt=ii.linearRegressionLine(Tt);ae=Ft.motion.svg,me=`${ne}px`,de=`${S}px`,pe=`0 0 ${ne} ${S}`,z="ltr",he=dt,ce=`translate(${p.left},${p.top})`;let Xe;e[90]!==a||e[91]!==$e||e[92]!==b||e[93]!==c||e[94]!==d?(Xe=o.jsxRuntimeExports.jsx(Zt.CustomArea,{areaSettings:$e,scaleX:c,scaleY:d,animate:a,isInView:b},"custom-area"),e[90]=a,e[91]=$e,e[92]=b,e[93]=c,e[94]=d,e[95]=Xe):Xe=e[95],ue=o.jsxRuntimeExports.jsxs(ai.AnimatePresence,{children:[o.jsxRuntimeExports.jsx(vi.HighlightAreaForScatterPlot,{areaSettings:wt,width:A,height:y,scaleX:c,scaleY:d,animate:a,isInView:b},"highlight-area"),Xe]});const yt=s?.yAxis?.gridLines,vt=s?.yAxis?.labels;let Ye;e[96]!==yt||e[97]!==vt?(Ye={gridLines:yt,labels:vt},e[96]=yt,e[97]=vt,e[98]=Ye):Ye=e[98];const bt=l?.yAxis?.gridLines,et=l?.yAxis?.labels;let r;e[99]!==bt||e[100]!==et?(r={gridLines:bt,labels:et},e[99]=bt,e[100]=et,e[101]=r):r=e[101];const tt=d(j<0?0:j),Pt=d(j<0?0:j),it=A+p.right,Xt=j<0?0:j;let O;e[102]!==V||e[103]!==Xt||e[104]!==le||e[105]!==De?(O=ni.numberFormattingFunction(Xt,"NA",V,le,De),e[102]=V,e[103]=Xt,e[104]=le,e[105]=De,e[106]=O):O=e[106];const Yt=d(j<0?0:j);let G;e[107]!==Yt?(G={x:0,y:Yt,dy:"0.33em",dx:-4},e[107]=Yt,e[108]=G):G=e[108];const x=l?.xAxis?.axis,D=l?.yAxis?.labels;let Ce;e[109]!==x||e[110]!==D?(Ce={axis:x,label:D},e[109]=x,e[110]=D,e[111]=Ce):Ce=e[111];const At=s?.xAxis?.axis;let nt;e[112]!==s?.yAxis?.labels?(nt=s?.yAxis?.labels||{},e[112]=s?.yAxis?.labels,e[113]=nt):nt=e[113];let Re;e[114]!==nt?(Re={textAnchor:"end",...nt},e[114]=nt,e[115]=Re):Re=e[115];let Fe;e[116]!==At||e[117]!==Re?(Fe={axis:At,label:Re},e[116]=At,e[117]=Re,e[118]=Fe):Fe=e[118];let Ue;e[119]!==tt||e[120]!==Pt||e[121]!==it||e[122]!==O||e[123]!==G||e[124]!==Ce||e[125]!==Fe?(Ue=o.jsxRuntimeExports.jsx(oi.Axis,{y1:tt,y2:Pt,x1:0,x2:it,label:O,labelPos:G,classNames:Ce,styles:Fe}),e[119]=tt,e[120]=Pt,e[121]=it,e[122]=O,e[123]=G,e[124]=Ce,e[125]=Fe,e[126]=Ue):Ue=e[126];const ot=0-P-15,st=y/2,lt=s?.yAxis?.title,jt=l?.yAxis?.title;let Ge;e[127]!==ot||e[128]!==st||e[129]!==lt||e[130]!==jt||e[131]!==H?(Ge=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:ot,y:st,style:lt,className:jt,text:H,rotate90:!0}),e[127]=ot,e[128]=st,e[129]=lt,e[130]=jt,e[131]=H,e[132]=Ge):Ge=e[132],xe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Lt.filter(Bi),y:Lt.filter(Wi).map(t=>d(t)),x1:0,x2:A+p.right,styles:Ye,classNames:r,suffix:De,prefix:le,labelType:"secondary",showGridLines:!0,labelPos:"side",precision:V}),Ue,Ge]});const rt=s?.xAxis?.gridLines,Ot=s?.xAxis?.labels;let at;e[133]!==rt||e[134]!==Ot?(at={gridLines:rt,labels:Ot},e[133]=rt,e[134]=Ot,e[135]=at):at=e[135];const ke=l?.xAxis?.gridLines,we=l?.xAxis?.labels;let ee;e[136]!==ke||e[137]!==we?(ee={gridLines:ke,labels:we},e[136]=ke,e[137]=we,e[138]=ee):ee=e[138];const Se=c(k<0?0:k),Ee=c(k<0?0:k),Le=k<0?0:k;let I;e[139]!==V||e[140]!==Le||e[141]!==Ie||e[142]!==qe?(I=ni.numberFormattingFunction(Le,"NA",V,Ie,qe),e[139]=V,e[140]=Le,e[141]=Ie,e[142]=qe,e[143]=I):I=e[143];const ct=c(k<0?0:k);let m;e[144]!==y||e[145]!==ct?(m={x:ct,y,dy:"1em",dx:0},e[144]=y,e[145]=ct,e[146]=m):m=e[146];const te=l?.xAxis?.axis,Ht=l?.yAxis?.labels;let $t;e[147]!==te||e[148]!==Ht?($t={axis:te,label:Ht},e[147]=te,e[148]=Ht,e[149]=$t):$t=e[149];const Wt=s?.xAxis?.axis;let Mt;e[150]!==s?.yAxis?.labels?(Mt=s?.yAxis?.labels||{},e[150]=s?.yAxis?.labels,e[151]=Mt):Mt=e[151];let Vt;e[152]!==Mt?(Vt={textAnchor:"middle",...Mt},e[152]=Mt,e[153]=Vt):Vt=e[153];let qt;e[154]!==Wt||e[155]!==Vt?(qt={axis:Wt,label:Vt},e[154]=Wt,e[155]=Vt,e[156]=qt):qt=e[156];let Ut;e[157]!==y||e[158]!==Se||e[159]!==Ee||e[160]!==I||e[161]!==m||e[162]!==$t||e[163]!==qt?(Ut=o.jsxRuntimeExports.jsx(oi.Axis,{x1:Se,x2:Ee,y1:0,y2:y,label:I,labelPos:m,classNames:$t,styles:qt}),e[157]=y,e[158]=Se,e[159]=Ee,e[160]=I,e[161]=m,e[162]=$t,e[163]=qt,e[164]=Ut):Ut=e[164];const Bt=A/2,zt=y+30,Jt=s?.xAxis?.title,Kt=l?.xAxis?.title;let Gt;e[165]!==Bt||e[166]!==zt||e[167]!==Jt||e[168]!==Kt||e[169]!==g?(Gt=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:Bt,y:zt,style:Jt,className:Kt,text:g}),e[165]=Bt,e[166]=zt,e[167]=Jt,e[168]=Kt,e[169]=g,e[170]=Gt):Gt=e[170],fe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(hi.XTicksAndGridLines,{values:U.filter(Hi),x:U.filter(Gi).map(t=>c(t)),y1:0,y2:y,styles:at,classNames:ee,suffix:qe,prefix:Ie,labelType:"primary",showGridLines:!0,precision:V}),Ut,Gt]}),e[171]!==q?(Y=q.filter(Ui).map(Fi),e[171]=q,e[172]=Y):Y=e[172],B=ai.AnimatePresence,J=_e.filter(Yi).map((t,He)=>o.jsxRuntimeExports.jsx("path",{d:It.renderCell(_e.findIndex(C=>C.id===t.id)),opacity:0,onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))}},`tesselation_${t.label||He}`)),ge=_e.filter(Xi).map((t,He)=>o.jsxRuntimeExports.jsxs(Ft.motion.g,{variants:{initial:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1},whileInView:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))},children:[o.jsxRuntimeExports.jsx(Ft.motion.circle,{cx:0,cy:0,exit:{r:0,transition:{duration:a.duration}},variants:{initial:{r:0,fill:n.filter(Pi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Ti).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray},whileInView:{r:w?w(t.radius||0):T,fill:n.filter(Ii).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Di).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",style:{fillOpacity:.6}}),We&&!v.checkIfNullOrUndefined(t.label)?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(qi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter(Vi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):W.length!==0&&!v.checkIfNullOrUndefined(t.label)&&W.indexOf(t.label)!==-1?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(Mi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter($i).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):null]},`${t.label||He}`)),K=Rt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineX,{text:t.text,color:t.color,x:c(t.value),y1:0,y2:y,textSide:c(t.value)>A*.75||ze?"left":"right",classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)),ye=kt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineY,{text:t.text,color:t.color,y:d(t.value),x1:0,x2:A,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He));const Qt=Je.map((t,He)=>{const C=Zt.getLineEndPoint({x:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?c(t.xCoordinate):0,y:t.yCoordinate?d(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),fi=t.showConnector?{y1:C.y,x1:C.x,y2:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?d(t.yCoordinate):0,cx:t.xCoordinate?c(t.xCoordinate):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,mi={y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:ze?0:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),width:ze?t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0):A+p.right-(t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return o.jsxRuntimeExports.jsx(Zt.Annotation,{color:t.color,connectorsSettings:fi,labelSettings:mi,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)});e[173]!==Qt?(F=o.jsxRuntimeExports.jsx("g",{children:Qt}),e[173]=Qt,e[174]=F):F=e[174],Q=se?o.jsxRuntimeExports.jsx(gi.RegressionLine,{x1:0,x2:A,y1:Nt(0),y2:Nt(A),graphHeight:y,graphWidth:A,className:l?.regLine,style:s?.regLine,color:typeof se=="string"?se:void 0,animate:a,isInView:b}):null,e[8]=a,e[9]=Je,e[10]=l?.graphObjectValues,e[11]=l?.regLine,e[12]=l?.xAxis?.axis,e[13]=l?.xAxis?.gridLines,e[14]=l?.xAxis?.labels,e[15]=l?.xAxis?.title,e[16]=l?.yAxis?.gridLines,e[17]=l?.yAxis?.labels,e[18]=l?.yAxis?.title,e[19]=R,e[20]=f,e[21]=$e,e[22]=q,e[23]=n,e[24]=$,e[25]=M,e[26]=S,e[27]=wt,e[28]=W,e[29]=b,e[30]=Ve,e[31]=P,e[32]=p.bottom,e[33]=p.left,e[34]=p.right,e[35]=p.top,e[36]=ft,e[37]=mt,e[38]=Be,e[39]=k,e[40]=j,e[41]=X,e[42]=E,e[43]=Ke,e[44]=Qe,e[45]=N,e[46]=oe,e[47]=V,e[48]=T,e[49]=Rt,e[50]=kt,e[51]=se,e[52]=Me,e[53]=ze,e[54]=Ne,e[55]=We,e[56]=s?.graphObjectValues,e[57]=s?.regLine,e[58]=s?.xAxis?.axis,e[59]=s?.xAxis?.gridLines,e[60]=s?.xAxis?.labels,e[61]=s?.xAxis?.title,e[62]=s?.yAxis?.gridLines,e[63]=s?.yAxis?.labels,e[64]=s?.yAxis?.title,e[65]=ne,e[66]=g,e[67]=Ie,e[68]=qe,e[69]=H,e[70]=le,e[71]=De,e[72]=B,e[73]=ae,e[74]=ce,e[75]=ue,e[76]=xe,e[77]=fe,e[78]=Y,e[79]=me,e[80]=de,e[81]=pe,e[82]=z,e[83]=he,e[84]=J,e[85]=ge,e[86]=K,e[87]=ye,e[88]=F,e[89]=Q}else B=e[72],ae=e[73],ce=e[74],ue=e[75],xe=e[76],fe=e[77],Y=e[78],me=e[79],de=e[80],pe=e[81],z=e[82],he=e[83],J=e[84],ge=e[85],K=e[86],ye=e[87],F=e[88],Q=e[89];let ve;e[175]!==B||e[176]!==J||e[177]!==ge||e[178]!==K||e[179]!==ye||e[180]!==F||e[181]!==Q?(ve=o.jsxRuntimeExports.jsxs(B,{children:[J,ge,K,ye,F,Q]}),e[175]=B,e[176]=J,e[177]=ge,e[178]=K,e[179]=ye,e[180]=F,e[181]=Q,e[182]=ve):ve=e[182];let be;e[183]!==q?(be=q.filter(Ni).map(Li),e[183]=q,e[184]=be):be=e[184];let Ae;e[185]!==ce||e[186]!==ue||e[187]!==xe||e[188]!==fe||e[189]!==Y||e[190]!==ve||e[191]!==be?(Ae=o.jsxRuntimeExports.jsxs("g",{transform:ce,children:[ue,xe,fe,Y,ve,be]}),e[185]=ce,e[186]=ue,e[187]=xe,e[188]=fe,e[189]=Y,e[190]=ve,e[191]=be,e[192]=Ae):Ae=e[192];let je;e[193]!==ae||e[194]!==me||e[195]!==de||e[196]!==pe||e[197]!==z||e[198]!==he||e[199]!==Ae?(je=o.jsxRuntimeExports.jsx(ae,{width:me,height:de,viewBox:pe,direction:z,ref:he,children:Ae}),e[193]=ae,e[194]=me,e[195]=de,e[196]=pe,e[197]=z,e[198]=he,e[199]=Ae,e[200]=je):je=e[200];let Oe;e[201]!==l?.tooltip||e[202]!==ht||e[203]!==h||e[204]!==E||e[205]!==s?.tooltip||e[206]!==xt?(Oe=E&&xt&&ht&&h?o.jsxRuntimeExports.jsx(pi.Tooltip,{data:E,body:xt,xPos:ht,yPos:h,backgroundStyle:s?.tooltip,className:l?.tooltip}):null,e[201]=l?.tooltip,e[202]=ht,e[203]=h,e[204]=E,e[205]=s?.tooltip,e[206]=xt,e[207]=Oe):Oe=e[207];let Z;e[208]!==l?.modal||e[209]!==$||e[210]!==X?(Z=$&&X!==void 0?o.jsxRuntimeExports.jsx(bi.DetailsModal,{body:$,data:X,setData:Ze,className:l?.modal}):null,e[208]=l?.modal,e[209]=$,e[210]=X,e[211]=Z):Z=e[211];let Pe;return e[212]!==je||e[213]!==Oe||e[214]!==Z?(Pe=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[je,Oe,Z]}),e[212]=je,e[213]=Oe,e[214]=Z,e[215]=Pe):Pe=e[215],Pe}function Li(i){return i.layer}function Ni(i){return i.position==="after"}function $i(i){return i.color}function Mi(i){return i.color}function Vi(i){return i.color}function qi(i){return i.color}function Di(i){return i.color}function Ii(i){return i.color}function Ti(i){return i.color}function Pi(i){return i.color}function Xi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Yi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Fi(i){return i.layer}function Ui(i){return i.position==="before"}function Gi(i){return i!==0}function Hi(i){return i!==0}function Wi(i){return i!==0}function Bi(i){return i!==0}function zi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ji(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ki(i){return!v.checkIfNullOrUndefined(i.radius)}function Qi(i){return!v.checkIfNullOrUndefined(i.radius)}function Zi(i){return i.radius===void 0||i.radius===null}function _i(i,e){return{...i,id:`${e}`}}function en(i){const e=o.compilerRuntimeExports.c(142),{data:n,graphTitle:ne,colors:S,sources:We,graphDescription:f,showLabels:R,height:T,width:g,footNote:H,colorDomain:P,colorLegendTitle:ut,radius:Ct,xAxisTitle:Dt,yAxisTitle:xt,padding:oe,backgroundColor:Rt,leftMargin:kt,rightMargin:wt,topMargin:Ne,bottomMargin:W,tooltip:ft,relativeHeight:mt,onSeriesMouseOver:k,refXValues:Be,refYValues:j,highlightAreaSettings:N,showColorScale:ze,highlightedDataPoints:Je,graphID:$e,maxRadiusValue:se,maxXValue:Me,minXValue:$,maxYValue:Ke,minYValue:Qe,xSuffix:Ve,ySuffix:qe,xPrefix:De,yPrefix:Ie,onSeriesMouseClick:le,graphDownload:s,dataDownload:l,language:a,showNAColor:M,minHeight:V,annotations:q,customHighlightAreaSettings:dt,theme:pt,regressionLine:b,ariaLabel:E,resetSelectionOnDoubleClick:Te,detailsOnClick:X,noOfXTicks:Ze,noOfYTicks:ht,labelColor:re,styles:h,classNames:u,animate:St,dimmedOpacity:Et,precision:gt,customLayers:p,timeline:B}=i,ae=R===void 0?!1:R,ce=Ct===void 0?5:Ct,ue=Dt===void 0?"X Axis":Dt,xe=xt===void 0?"Y Axis":xt,fe=Rt===void 0?!1:Rt,Y=kt===void 0?0:kt,me=wt===void 0?10:wt,de=Ne===void 0?20:Ne,pe=W===void 0?50:W;let z;e[0]!==Be?(z=Be===void 0?[]:Be,e[0]=Be,e[1]=z):z=e[1];const he=z;let J;e[2]!==j?(J=j===void 0?[]:j,e[2]=j,e[3]=J):J=e[3];const ge=J;let K;e[4]!==N?(K=N===void 0?[]:N,e[4]=N,e[5]=K):K=e[5];const ye=K,F=ze===void 0?!0:ze;let Q;e[6]!==Je?(Q=Je===void 0?[]:Je,e[6]=Je,e[7]=Q):Q=e[7];const ve=Q,be=Ve===void 0?"":Ve,Ae=qe===void 0?"":qe,je=De===void 0?"":De,Oe=Ie===void 0?"":Ie,Z=s===void 0?!1:s,Pe=l===void 0?!1:l,_=a===void 0?"en":a,A=M===void 0?!0:M,y=V===void 0?0:V;let w;e[8]!==q?(w=q===void 0?[]:q,e[8]=q,e[9]=w):w=e[9];const _e=w;let c;e[10]!==dt?(c=dt===void 0?[]:dt,e[10]=dt,e[11]=c):c=e[11];const d=c,U=pt===void 0?"light":pt,Lt=b===void 0?!1:b,It=Te===void 0?!0:Te,Tt=Ze===void 0?5:Ze,Nt=ht===void 0?5:ht,Xe=St===void 0?!1:St,yt=Et===void 0?.3:Et,vt=gt===void 0?2:gt;let Ye;e[12]!==p?(Ye=p===void 0?[]:p,e[12]=p,e[13]=Ye):Ye=e[13];const bt=Ye;let et;e[14]!==B?(et=B===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:B,e[14]=B,e[15]=et):et=e[15];const r=et,[tt,Pt]=L.useState(0),[it,Xt]=L.useState(0),[O,Yt]=L.useState(r.autoplay);let G;if(e[16]!==n||e[17]!==r.dateFormat){let m;e[19]!==r.dateFormat?(m=te=>_t.parse(`${te.date}`,r.dateFormat||"yyyy",new Date).getTime(),e[19]=r.dateFormat,e[20]=m):m=e[20],G=[...new Set(n.filter(Ln).map(m))],G.sort(En),e[16]=n,e[17]=r.dateFormat,e[18]=G}else G=e[18];const x=G,[D,Ce]=L.useState(r.autoplay?0:x.length-1),[At,nt]=L.useState(void 0),Re=L.useRef(null),Fe=L.useRef(null);let Ue,ot;e[21]===Symbol.for("react.memo_cache_sentinel")?(Ue=()=>{const m=new ResizeObserver(te=>{Pt(te[0].target.clientWidth||620),Xt(te[0].target.clientHeight||480)});return Re.current&&m.observe(Re.current),()=>m.disconnect()},ot=[],e[21]=Ue,e[22]=ot):(Ue=e[21],ot=e[22]),L.useEffect(Ue,ot);let st,lt;e[23]!==O||e[24]!==r.speed||e[25]!==x?(st=()=>{const m=setInterval(()=>{Ce(te=>te<x.length-1?te+1:0)},(r.speed||2)*1e3);return O||clearInterval(m),()=>clearInterval(m)},lt=[x,O,r.speed],e[23]=O,e[24]=r.speed,e[25]=x,e[26]=st,e[27]=lt):(st=e[26],lt=e[27]),L.useEffect(st,lt);const jt=r.dateFormat||"yyyy";let Ge;e[28]!==D||e[29]!==jt||e[30]!==r.showOnlyActiveDate||e[31]!==x?(Ge=ei.getSliderMarks(x,D,r.showOnlyActiveDate,jt),e[28]=D,e[29]=jt,e[30]=r.showOnlyActiveDate,e[31]=x,e[32]=Ge):Ge=e[32];const rt=Ge,Ot=u?.graphContainer,at=h?.graphContainer;let ke;e[33]!==u?.description||e[34]!==u?.title||e[35]!==n||e[36]!==Pe||e[37]!==f||e[38]!==Z||e[39]!==ne||e[40]!==h?.description||e[41]!==h?.title||e[42]!==g?(ke=ne||f||Z||Pe?o.jsxRuntimeExports.jsx(Ri.GraphHeader,{styles:{title:h?.title,description:h?.description},classNames:{title:u?.title,description:u?.description},graphTitle:ne,graphDescription:f,width:g,graphDownload:Z?Fe:void 0,dataDownload:Pe?n.map(Sn).filter(wn).length>0?n.map(kn).filter(Rn):n.filter(Cn):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=n,e[36]=Pe,e[37]=f,e[38]=Z,e[39]=ne,e[40]=h?.description,e[41]=h?.title,e[42]=g,e[43]=ke):ke=e[43];let we;e[44]!==D||e[45]!==rt||e[46]!==O||e[47]!==r.enabled||e[48]!==x?(we=r.enabled&&x.length>0&&rt?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Yt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(ci.Pause,{}):o.jsxRuntimeExports.jsx(ci.Play,{})}),o.jsxRuntimeExports.jsx(ei.Nr,{min:x[0],max:x[x.length-1],marks:rt,step:null,defaultValue:x[x.length-1],value:x[D],onChangeComplete:m=>{Ce(x.indexOf(m))},onChange:m=>{Ce(x.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=D,e[45]=rt,e[46]=O,e[47]=r.enabled,e[48]=x,e[49]=we):we=e[49];let ee;e[50]!==u?.colorLegend||e[51]!==P||e[52]!==ut||e[53]!==S||e[54]!==n||e[55]!==F||e[56]!==A||e[57]!==U||e[58]!==g?(ee=F&&n.filter(On).length!==0&&n.length>0?o.jsxRuntimeExports.jsx(ki.ColorLegendWithMouseOver,{width:g,colorLegendTitle:ut,colors:S||ie.Colors[U].categoricalColors.colors,colorDomain:P||ui.uniqBy(n,"color",!0),setSelectedColor:nt,showNAColor:A,className:u?.colorLegend}):null,e[50]=u?.colorLegend,e[51]=P,e[52]=ut,e[53]=S,e[54]=n,e[55]=F,e[56]=A,e[57]=U,e[58]=g,e[59]=ee):ee=e[59];let Se;e[60]!==n.length?(Se=n.length===0&&o.jsxRuntimeExports.jsx(wi.EmptyState,{}),e[60]=n.length,e[61]=Se):Se=e[61];let Ee;e[62]!==Xe||e[63]!==_e||e[64]!==pe||e[65]!==u||e[66]!==P||e[67]!==S||e[68]!==d||e[69]!==bt||e[70]!==n||e[71]!==X||e[72]!==yt||e[73]!==ye||e[74]!==ve||e[75]!==D||e[76]!==re||e[77]!==_||e[78]!==Y||e[79]!==se||e[80]!==Me||e[81]!==Ke||e[82]!==$||e[83]!==Qe||e[84]!==Tt||e[85]!==Nt||e[86]!==le||e[87]!==k||e[88]!==vt||e[89]!==ce||e[90]!==he||e[91]!==ge||e[92]!==Lt||e[93]!==It||e[94]!==me||e[95]!==At||e[96]!==ae||e[97]!==h||e[98]!==it||e[99]!==tt||e[100]!==U||e[101]!==r.dateFormat||e[102]!==r.enabled||e[103]!==ft||e[104]!==de||e[105]!==x||e[106]!==ue||e[107]!==je||e[108]!==be||e[109]!==xe||e[110]!==Oe||e[111]!==Ae?(Ee=tt&&it&&n.length>0?o.jsxRuntimeExports.jsx(Ei,{data:Si.ensureCompleteDataForScatterPlot(n,r.dateFormat||"yyyy").filter(m=>r.enabled?m.date===_t.format(new Date(x[D]),r.dateFormat||"yyyy"):m),width:tt,height:it,colorDomain:n.filter(jn).length===0?[]:P||ui.uniqBy(n,"color",!0),colors:n.filter(An).length===0?S?[S]:[ie.Colors.primaryColors["blue-600"]]:S||ie.Colors[U].categoricalColors.colors,xAxisTitle:ue,yAxisTitle:xe,refXValues:he,refYValues:ge,showLabels:ae,radius:ce,leftMargin:Y,rightMargin:me,topMargin:de,bottomMargin:pe,tooltip:ft,onSeriesMouseOver:k,highlightAreaSettings:ye,highlightedDataPoints:n.filter(bn).length===0?[]:ve,selectedColor:At,maxRadiusValue:v.checkIfNullOrUndefined(se)?Math.max(...n.map(vn).filter(yn)):se,maxXValue:v.checkIfNullOrUndefined(Me)?Math.max(...n.map(gn).filter(hn))>0?Math.max(...n.map(pn).filter(dn)):0:Me,minXValue:v.checkIfNullOrUndefined($)?Math.min(...n.map(mn).filter(fn))>0?0:Math.min(...n.map(xn).filter(un)):$,maxYValue:v.checkIfNullOrUndefined(Ke)?Math.max(...n.map(cn).filter(an))>0?Math.max(...n.map(rn).filter(ln)):0:Ke,minYValue:v.checkIfNullOrUndefined(Qe)?Math.min(...n.map(sn).filter(on))>0?0:Math.min(...n.map(nn).filter(tn)):Qe,onSeriesMouseClick:le,rtl:_==="he"||_==="ar",annotations:_e,customHighlightAreaSettings:d,regressionLine:Lt,resetSelectionOnDoubleClick:It,detailsOnClick:X,noOfXTicks:Tt,noOfYTicks:Nt,labelColor:re,xSuffix:be,ySuffix:Ae,xPrefix:je,yPrefix:Oe,styles:h,classNames:u,animate:Xe===!0?{duration:.5,once:!0,amount:.5}:Xe||{duration:0,once:!0,amount:0},dimmedOpacity:yt,precision:vt,customLayers:bt}):null,e[62]=Xe,e[63]=_e,e[64]=pe,e[65]=u,e[66]=P,e[67]=S,e[68]=d,e[69]=bt,e[70]=n,e[71]=X,e[72]=yt,e[73]=ye,e[74]=ve,e[75]=D,e[76]=re,e[77]=_,e[78]=Y,e[79]=se,e[80]=Me,e[81]=Ke,e[82]=$,e[83]=Qe,e[84]=Tt,e[85]=Nt,e[86]=le,e[87]=k,e[88]=vt,e[89]=ce,e[90]=he,e[91]=ge,e[92]=Lt,e[93]=It,e[94]=me,e[95]=At,e[96]=ae,e[97]=h,e[98]=it,e[99]=tt,e[100]=U,e[101]=r.dateFormat,e[102]=r.enabled,e[103]=ft,e[104]=de,e[105]=x,e[106]=ue,e[107]=je,e[108]=be,e[109]=xe,e[110]=Oe,e[111]=Ae,e[112]=Ee):Ee=e[112];let Le;e[113]!==Se||e[114]!==Ee?(Le=o.jsxRuntimeExports.jsxs(xi.GraphArea,{ref:Re,children:[Se,Ee]}),e[113]=Se,e[114]=Ee,e[115]=Le):Le=e[115];let I;e[116]!==u?.footnote||e[117]!==u?.source||e[118]!==H||e[119]!==We||e[120]!==h?.footnote||e[121]!==h?.source||e[122]!==g?(I=We||H?o.jsxRuntimeExports.jsx(Ci.GraphFooter,{styles:{footnote:h?.footnote,source:h?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:We,footNote:H,width:g}):null,e[116]=u?.footnote,e[117]=u?.source,e[118]=H,e[119]=We,e[120]=h?.footnote,e[121]=h?.source,e[122]=g,e[123]=I):I=e[123];let ct;return e[124]!==E||e[125]!==fe||e[126]!==$e||e[127]!==T||e[128]!==_||e[129]!==y||e[130]!==oe||e[131]!==mt||e[132]!==Ot||e[133]!==at||e[134]!==ke||e[135]!==we||e[136]!==ee||e[137]!==Le||e[138]!==I||e[139]!==U||e[140]!==g?(ct=o.jsxRuntimeExports.jsxs(xi.GraphContainer,{className:Ot,style:at,id:$e,ref:Fe,"aria-label":E,backgroundColor:fe,theme:U,language:_,minHeight:y,width:g,height:T,relativeHeight:mt,padding:oe,children:[ke,we,ee,Le,I]}),e[124]=E,e[125]=fe,e[126]=$e,e[127]=T,e[128]=_,e[129]=y,e[130]=oe,e[131]=mt,e[132]=Ot,e[133]=at,e[134]=ke,e[135]=we,e[136]=ee,e[137]=Le,e[138]=I,e[139]=U,e[140]=g,e[141]=ct):ct=e[141],ct}function tn(i){return i!=null}function nn(i){return i.y}function on(i){return i!=null}function sn(i){return i.y}function ln(i){return i!=null}function rn(i){return i.y}function an(i){return i!=null}function cn(i){return i.y}function un(i){return i!=null}function xn(i){return i.x}function fn(i){return i!=null}function mn(i){return i.x}function dn(i){return i!=null}function pn(i){return i.x}function hn(i){return i!=null}function gn(i){return i.x}function yn(i){return i!=null}function vn(i){return i.radius}function bn(i){return i.label}function An(i){return i.color}function jn(i){return i.color}function On(i){return i.color}function Cn(i){return i!==void 0}function Rn(i){return i!==void 0}function kn(i){return i.data}function wn(i){return i!==void 0}function Sn(i){return i.data}function En(i,e){return i-e}function Ln(i){return i.date}exports.ScatterPlot=en;
|
|
2
2
|
//# sourceMappingURL=ScatterPlot.cjs.map
|
package/dist/ScatterPlot.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { c as ai, j as l, m as _e } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as ai, j as l, m as _e } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { f as ui, p as mi } from "./parse-Dv4of-PN.js";
|
|
3
3
|
import { useRef as Ze, useState as qt, useEffect as ti } from "react";
|
|
4
|
-
import { g as xi, N as pi } from "./getSliderMarks-
|
|
4
|
+
import { g as xi, N as pi } from "./getSliderMarks-vXsR8RrR.js";
|
|
5
5
|
import { i as ei } from "./index-Bwrro8-q.js";
|
|
6
6
|
import { o as di } from "./index-BZQYSqar.js";
|
|
7
7
|
import { l as gi, a as hi } from "./simple-statistics-flVzqVtt.js";
|
|
8
|
-
import { T as yi } from "./Tooltip-
|
|
8
|
+
import { T as yi } from "./Tooltip-CohiIbLZ.js";
|
|
9
9
|
import { c as v } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
10
10
|
import { Colors as et } from "./Colors.js";
|
|
11
11
|
import { n as ii } from "./numberFormattingFunction-14YCbkN2.js";
|
|
12
|
-
import { g as vi, A as bi, C as Ai } from "./customArea-
|
|
13
|
-
import { A as oi } from "./Axis-
|
|
14
|
-
import { A as ni } from "./AxisTitle-
|
|
15
|
-
import { X as Oi } from "./XTicksAndGridLines-
|
|
16
|
-
import { R as Ci, a as wi } from "./ReferenceLine-
|
|
17
|
-
import { R as ji } from "./RegressionLine-
|
|
18
|
-
import { Y as Li } from "./YTicksAndGridLines-
|
|
19
|
-
import { a as $i } from "./index-
|
|
20
|
-
import { D as Si } from "./DetailsModal-
|
|
21
|
-
import { s as Vi } from "./pow-
|
|
22
|
-
import { a as si } from "./linear-
|
|
12
|
+
import { g as vi, A as bi, C as Ai } from "./customArea-Cc2whe6P.js";
|
|
13
|
+
import { A as oi } from "./Axis-RyGdzLrG.js";
|
|
14
|
+
import { A as ni } from "./AxisTitle-DGjX1_2v.js";
|
|
15
|
+
import { X as Oi } from "./XTicksAndGridLines-BDmF9etl.js";
|
|
16
|
+
import { R as Ci, a as wi } from "./ReferenceLine-CNEjAYvv.js";
|
|
17
|
+
import { R as ji } from "./RegressionLine-BDrndQxo.js";
|
|
18
|
+
import { Y as Li } from "./YTicksAndGridLines-C3GW1xFG.js";
|
|
19
|
+
import { a as $i } from "./index-D_dtv_T9.js";
|
|
20
|
+
import { D as Si } from "./DetailsModal-C3qlUyFK.js";
|
|
21
|
+
import { s as Vi } from "./pow-BXYLJHCq.js";
|
|
22
|
+
import { a as si } from "./linear-DNXM5Pdl.js";
|
|
23
23
|
import { D as Di } from "./delaunay-C1uAf38t.js";
|
|
24
|
-
import { m as Ee } from "./proxy
|
|
25
|
-
import { u as Mi } from "./use-in-view-
|
|
26
|
-
import { A as li } from "./index-
|
|
24
|
+
import { m as Ee } from "./proxy--_f6k3NR.js";
|
|
25
|
+
import { u as Mi } from "./use-in-view-DqvKAveg.js";
|
|
26
|
+
import { A as li } from "./index-Co3YGYe1.js";
|
|
27
27
|
import { GraphFooter as ki } from "./GraphFooter.js";
|
|
28
28
|
import { GraphHeader as Ni } from "./GraphHeader.js";
|
|
29
29
|
import { ColorLegendWithMouseOver as Pi } from "./ColorLegendWithMouseOver.js";
|
|
30
|
-
import { E as Ti } from "./EmptyState-
|
|
31
|
-
import { P as Xi, e as Yi } from "./index-
|
|
30
|
+
import { E as Ti } from "./EmptyState-D807L58h.js";
|
|
31
|
+
import { P as Xi, e as Yi } from "./index-CZ0elhKR.js";
|
|
32
32
|
import { a as Ri } from "./ensureCompleteData-CDIukSG6.js";
|
|
33
33
|
import { u as ri } from "./uniqBy-BHy4I8PK.js";
|
|
34
|
-
import { a as Ii, G as Fi } from "./GraphContainer-
|
|
34
|
+
import { a as Ii, G as Fi } from "./GraphContainer-DwMxWRCi.js";
|
|
35
35
|
function Hi(i) {
|
|
36
36
|
const t = ai.c(216), {
|
|
37
37
|
data: o,
|
package/dist/ScrollStory.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as V, j as h } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as V, j as h } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useState as W, useRef as _ } from "react";
|
|
3
3
|
import { SingleGraphDashboard as z } from "./SingleGraphDashboard.js";
|
|
4
|
-
import { m as G } from "./proxy
|
|
5
|
-
import { u as q } from "./use-in-view-
|
|
4
|
+
import { m as G } from "./proxy--_f6k3NR.js";
|
|
5
|
+
import { u as q } from "./use-in-view-DqvKAveg.js";
|
|
6
6
|
function O(B) {
|
|
7
7
|
const t = V.c(27), {
|
|
8
8
|
chapters: e,
|
package/dist/SimpleLineChart.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { c as Te, m as he, j as o } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as Te, m as he, j as o } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useRef as ye, useState as Pt, useEffect as $e } from "react";
|
|
3
3
|
import { p as A, f as Re } from "./parse-Dv4of-PN.js";
|
|
4
4
|
import { l as He, a as Fe } from "./simple-statistics-flVzqVtt.js";
|
|
5
5
|
import { o as Ie } from "./index-BZQYSqar.js";
|
|
6
6
|
import { n as Se } from "./numberFormattingFunction-14YCbkN2.js";
|
|
7
|
-
import { T as We } from "./Tooltip-
|
|
7
|
+
import { T as We } from "./Tooltip-CohiIbLZ.js";
|
|
8
8
|
import { c as Ot } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
9
|
-
import { g as Ye, A as Xe, C as Ge } from "./customArea-
|
|
10
|
-
import { A as Pe } from "./Axis-
|
|
11
|
-
import { A as Ee } from "./AxisTitle-
|
|
12
|
-
import { X as Be } from "./XTicksAndGridLines-
|
|
13
|
-
import { a as ze } from "./ReferenceLine-
|
|
14
|
-
import { R as Ue } from "./RegressionLine-
|
|
15
|
-
import { Y as qe } from "./YTicksAndGridLines-
|
|
16
|
-
import { H as Je } from "./index-
|
|
17
|
-
import { t as Ke } from "./time-
|
|
18
|
-
import { a as Qe } from "./linear-
|
|
9
|
+
import { g as Ye, A as Xe, C as Ge } from "./customArea-Cc2whe6P.js";
|
|
10
|
+
import { A as Pe } from "./Axis-RyGdzLrG.js";
|
|
11
|
+
import { A as Ee } from "./AxisTitle-DGjX1_2v.js";
|
|
12
|
+
import { X as Be } from "./XTicksAndGridLines-BDmF9etl.js";
|
|
13
|
+
import { a as ze } from "./ReferenceLine-CNEjAYvv.js";
|
|
14
|
+
import { R as Ue } from "./RegressionLine-BDrndQxo.js";
|
|
15
|
+
import { Y as qe } from "./YTicksAndGridLines-C3GW1xFG.js";
|
|
16
|
+
import { H as Je } from "./index-D_dtv_T9.js";
|
|
17
|
+
import { t as Ke } from "./time-vyz6Y89P.js";
|
|
18
|
+
import { a as Qe } from "./linear-DNXM5Pdl.js";
|
|
19
19
|
import { l as Ze, c as _e } from "./line-DFlZsxI1.js";
|
|
20
20
|
import { c as ti, s as ei, a as ii, m as oi } from "./step-BrDul-H4.js";
|
|
21
21
|
import { s as ni } from "./select-DKy99ogv.js";
|
|
22
|
-
import { m as ee } from "./proxy
|
|
22
|
+
import { m as ee } from "./proxy--_f6k3NR.js";
|
|
23
23
|
import { a as si } from "./init-BhZylTFx.js";
|
|
24
24
|
import { p as ai } from "./pointer-CWRWOsrb.js";
|
|
25
|
-
import { u as ri } from "./use-in-view-
|
|
25
|
+
import { u as ri } from "./use-in-view-DqvKAveg.js";
|
|
26
26
|
import { GraphFooter as li } from "./GraphFooter.js";
|
|
27
27
|
import { GraphHeader as ci } from "./GraphHeader.js";
|
|
28
28
|
import { Colors as mi } from "./Colors.js";
|
|
29
|
-
import { E as fi } from "./EmptyState-
|
|
30
|
-
import { a as ui, G as pi } from "./GraphContainer-
|
|
29
|
+
import { E as fi } from "./EmptyState-D807L58h.js";
|
|
30
|
+
import { a as ui, G as pi } from "./GraphContainer-DwMxWRCi.js";
|
|
31
31
|
import { g as xi } from "./getNoOfTicks-CpmRjcRF.js";
|
|
32
32
|
function di(i) {
|
|
33
33
|
const t = Te.c(110), {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),o=require("react"),te=require("./index-CyZ1lmi_.cjs"),q=require("./index-BS2TADPj.cjs"),le=require("./index-DQA8q5sC.cjs"),C=require("./DropdownSelect-NNpOs7DX.cjs"),d=require("./checkIfMultiple-DxnGtm3t.cjs"),ne=require("./Spinner-jTMOLuw_.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),re=require("./GraphEl-DjElfY07.cjs"),$=require("./fetchAndParseData-QTF6tjij.cjs"),U=require("./transformDataForAggregation-BFdha9Dx.cjs"),z=require("./getUniqValue-NX8DgwND.cjs"),se=require("./GraphHeader.cjs"),W=require("./filterData-T5DQBE9b.cjs"),oe=require("./getGraphList-DQ24IzAn.cjs"),J=require("./transformDataForSelect-YmStusCI.cjs"),ue=u=>{if(u.findIndex(n=>n.chartConfigId==="yMin")!==-1&&u.findIndex(n=>n.chartConfigId==="yMax")!==-1)return u;const i=[...u];return u.findIndex(n=>n.chartConfigId==="yMin")===-1&&i.push({chartConfigId:"yMin",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Min`}),u.findIndex(n=>n.chartConfigId==="yMax")===-1&&i.push({chartConfigId:"yMax",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Max`}),i},M=(u,i)=>{const n=i?.map(D=>{const b=u?.findIndex(s=>s.chartConfigId===D.chartConfigId);if(b===-1)return{};const w=u[b]?.allowedColumnIds?.findIndex(s=>s.value===D.columnId);return w===-1?{}:u[b].allowedColumnIds[w].graphSettings||{}})||[];return Object.assign({},...n)};function de(u){const{graphSettings:i,dataSettings:n,filters:D,graphType:b,dataTransform:w,graphDataConfiguration:s,dataFilters:A,debugMode:S,dataSelectionOptions:I,advancedDataSelectionOptions:N,readableHeader:B,noOfFiltersPerRow:p=4,updateFilters:K,uiMode:f="normal",highlightDataPointSettings:m}=u,[P,F]=o.useState(void 0),[c,Q]=o.useState(void 0),[v,j]=o.useState(s),[x,V]=o.useState({}),[E,X]=o.useState(void 0),[Y,Z]=o.useState([]),H=o.useRef(null),O=o.useRef(s),[R,k]=o.useState([]),G={ignoreCase:!0,ignoreAccents:!0,trim:!0},L=o.useEffectEvent(()=>{const e=(D||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,ui:r.ui,defaultValue:J.transformDefaultValue(r.defaultValue),value:J.transformDefaultValue(r.defaultValue),availableValues:z.getUniqValue(c,r.column).filter(a=>!r.excludeValues?.includes(`${a}`)).map(a=>({value:a,label:a})),allowSelectAll:r.allowSelectAll,width:r.width}));k(e)});o.useEffect(()=>{(async()=>{try{const r=n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?await $.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,S):n.fileType==="api"?await $.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,S):await $.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,S,n.delimiter,!0):await $.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):await $.transformColumnsToArray(n.data,n.columnsToArray);Q(r)}catch(r){console.error("Data fetching error:",r)}})(),L()},[n,S]),o.useEffect(()=>{L()},[D,c]);const _=o.useEffectEvent(()=>{if(!c||R.length===0)F(c);else{const e=c.filter(r=>R.every(a=>a.value&&q.flattenDeep([a.value]).length>0?te.intersection(q.flattenDeep([r[a.filter]]),q.flattenDeep([a.value]).map(t=>t.value)).length>0:!0));F(e)}});o.useEffect(()=>{_()},[R,c]),o.useEffect(()=>{I&&V(M(I,s))},[I,s]);const ee=o.useEffectEvent(()=>{m?.column&&P&&Z(z.getUniqValue(P,m.column).filter(e=>!m?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});o.useEffect(()=>{ee()},[m]),o.useEffect(()=>{le.isEqual(O.current,s)||(j(s),O.current=s)},[s]);const y=(e,r)=>{k(a=>a.map(t=>t.filter===e?{...t,value:r}:t))},ae=c?U.transformDataForGraph(w?U.transformDataForAggregation(W.filterData(c,A||[]),w.keyColumn,w.aggregationColumnsSetting):W.filterData(c,A||[]),b,b==="lineChartWithConfidenceInterval"&&v?ue(v):v):void 0;return l.jsxRuntimeExports.jsx(ie.GraphContainer,{className:i?.classNames?.graphContainer,style:i?.styles?.graphContainer,id:i?.graphID,ref:H,"aria-label":i?.ariaLabel,backgroundColor:i?.backgroundColor??!1,theme:i?.theme||"light",language:i?.language||"en",width:i?.width,height:i?.height,padding:i?.padding,minHeight:i?.minHeight,relativeHeight:i?.relativeHeight,children:c||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(b)!==-1?l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[x?.graphTitle||x?.graphDescription||i?.graphTitle||i?.graphDescription||i?.graphDownload||i?.dataDownload?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:x?.styles?.title||i?.styles?.title,description:x?.styles?.description||i?.styles?.description},classNames:{title:x?.classNames?.title||i?.classNames?.title,description:x?.classNames?.description||i?.classNames?.description},graphTitle:x?.graphTitle||i?.graphTitle,graphDescription:x?.graphDescription||i?.graphDescription,width:x?.width||i?.width,graphDownload:i?.graphDownload?H:void 0,dataDownload:i?.dataDownload&&c&&c.length>0?c:null}):null,R.length!==0||(I||[]).length!==0||(N||[]).length!==0||m?l.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[N?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{V(a?.graphSettings||{}),j(a?.dataConfiguration)}}):l.jsxRuntimeExports.jsx(d.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:f,onValueChange:a=>{const t=e.options[e.options.findIndex(g=>g.label===a)];V(t.graphSettings||{}),j(t.dataConfiguration)},children:e.options.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),I?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),d.checkIfMultiple(e.chartConfigId,v||[])?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:C.Du(G),onChange:a=>{const t={columnId:(a||[]).map(h=>h.value),chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)}}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:a.label,value:a.label},t))}):e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);V(M(I,g)),j(g)}}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const g={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},h=v?.map(T=>T.chartConfigId===g.chartConfigId?g:T);V(M(I,h)),j(h)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),R?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:e.defaultValue.value,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>t.value===a))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:`${a.label}`,value:`${a.value}`},t))}):l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?l.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{y(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),m?l.jsxRuntimeExports.jsxs("div",{style:{width:m.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:m.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:m.label||"Highlight data"}),l.jsxRuntimeExports.jsx(C.ja,{options:Y,variant:f,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:e=>{X(e?.map(r=>r.value))},value:E?.map(e=>({label:e,value:e})),defaultValue:m.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,l.jsxRuntimeExports.jsx(re.GraphEl,{graph:b,graphData:ae,graphDataConfiguration:v,debugMode:S,readableHeader:B||[],updateFilters:K,settings:{...i||{},...x,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",theme:i?.theme,...E?{highlightedDataPoints:E,highlightedIds:E?.map(e=>`${e}`),highlightedLines:E?.map(e=>e)}:{}}})]}):l.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:l.jsxRuntimeExports.jsx(ne.w,{})})})}exports.SingleGraphDashboard=de;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),o=require("react"),te=require("./index-CyZ1lmi_.cjs"),q=require("./index-BS2TADPj.cjs"),le=require("./index-DQA8q5sC.cjs"),C=require("./DropdownSelect-NNpOs7DX.cjs"),d=require("./checkIfMultiple-TOaaUwS7.cjs"),ne=require("./Spinner-jTMOLuw_.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),re=require("./GraphEl-DvwOOhF1.cjs"),$=require("./fetchAndParseData-QTF6tjij.cjs"),U=require("./transformDataForAggregation-BFdha9Dx.cjs"),z=require("./getUniqValue-NX8DgwND.cjs"),se=require("./GraphHeader.cjs"),W=require("./filterData-T5DQBE9b.cjs"),oe=require("./getGraphList-DQ24IzAn.cjs"),J=require("./transformDataForSelect-YmStusCI.cjs"),ue=u=>{if(u.findIndex(n=>n.chartConfigId==="yMin")!==-1&&u.findIndex(n=>n.chartConfigId==="yMax")!==-1)return u;const i=[...u];return u.findIndex(n=>n.chartConfigId==="yMin")===-1&&i.push({chartConfigId:"yMin",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Min`}),u.findIndex(n=>n.chartConfigId==="yMax")===-1&&i.push({chartConfigId:"yMax",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Max`}),i},M=(u,i)=>{const n=i?.map(D=>{const b=u?.findIndex(s=>s.chartConfigId===D.chartConfigId);if(b===-1)return{};const w=u[b]?.allowedColumnIds?.findIndex(s=>s.value===D.columnId);return w===-1?{}:u[b].allowedColumnIds[w].graphSettings||{}})||[];return Object.assign({},...n)};function de(u){const{graphSettings:i,dataSettings:n,filters:D,graphType:b,dataTransform:w,graphDataConfiguration:s,dataFilters:A,debugMode:S,dataSelectionOptions:I,advancedDataSelectionOptions:N,readableHeader:B,noOfFiltersPerRow:p=4,updateFilters:K,uiMode:f="normal",highlightDataPointSettings:m}=u,[P,F]=o.useState(void 0),[c,Q]=o.useState(void 0),[v,j]=o.useState(s),[x,V]=o.useState({}),[E,X]=o.useState(void 0),[Y,Z]=o.useState([]),H=o.useRef(null),O=o.useRef(s),[R,k]=o.useState([]),G={ignoreCase:!0,ignoreAccents:!0,trim:!0},L=o.useEffectEvent(()=>{const e=(D||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,ui:r.ui,defaultValue:J.transformDefaultValue(r.defaultValue),value:J.transformDefaultValue(r.defaultValue),availableValues:z.getUniqValue(c,r.column).filter(a=>!r.excludeValues?.includes(`${a}`)).map(a=>({value:a,label:a})),allowSelectAll:r.allowSelectAll,width:r.width}));k(e)});o.useEffect(()=>{(async()=>{try{const r=n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?await $.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,S):n.fileType==="api"?await $.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,S):await $.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,S,n.delimiter,!0):await $.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):await $.transformColumnsToArray(n.data,n.columnsToArray);Q(r)}catch(r){console.error("Data fetching error:",r)}})(),L()},[n,S]),o.useEffect(()=>{L()},[D,c]);const _=o.useEffectEvent(()=>{if(!c||R.length===0)F(c);else{const e=c.filter(r=>R.every(a=>a.value&&q.flattenDeep([a.value]).length>0?te.intersection(q.flattenDeep([r[a.filter]]),q.flattenDeep([a.value]).map(t=>t.value)).length>0:!0));F(e)}});o.useEffect(()=>{_()},[R,c]),o.useEffect(()=>{I&&V(M(I,s))},[I,s]);const ee=o.useEffectEvent(()=>{m?.column&&P&&Z(z.getUniqValue(P,m.column).filter(e=>!m?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});o.useEffect(()=>{ee()},[m]),o.useEffect(()=>{le.isEqual(O.current,s)||(j(s),O.current=s)},[s]);const y=(e,r)=>{k(a=>a.map(t=>t.filter===e?{...t,value:r}:t))},ae=c?U.transformDataForGraph(w?U.transformDataForAggregation(W.filterData(c,A||[]),w.keyColumn,w.aggregationColumnsSetting):W.filterData(c,A||[]),b,b==="lineChartWithConfidenceInterval"&&v?ue(v):v):void 0;return l.jsxRuntimeExports.jsx(ie.GraphContainer,{className:i?.classNames?.graphContainer,style:i?.styles?.graphContainer,id:i?.graphID,ref:H,"aria-label":i?.ariaLabel,backgroundColor:i?.backgroundColor??!1,theme:i?.theme||"light",language:i?.language||"en",width:i?.width,height:i?.height,padding:i?.padding,minHeight:i?.minHeight,relativeHeight:i?.relativeHeight,children:c||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(b)!==-1?l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[x?.graphTitle||x?.graphDescription||i?.graphTitle||i?.graphDescription||i?.graphDownload||i?.dataDownload?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:x?.styles?.title||i?.styles?.title,description:x?.styles?.description||i?.styles?.description},classNames:{title:x?.classNames?.title||i?.classNames?.title,description:x?.classNames?.description||i?.classNames?.description},graphTitle:x?.graphTitle||i?.graphTitle,graphDescription:x?.graphDescription||i?.graphDescription,width:x?.width||i?.width,graphDownload:i?.graphDownload?H:void 0,dataDownload:i?.dataDownload&&c&&c.length>0?c:null}):null,R.length!==0||(I||[]).length!==0||(N||[]).length!==0||m?l.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[N?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{V(a?.graphSettings||{}),j(a?.dataConfiguration)}}):l.jsxRuntimeExports.jsx(d.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:f,onValueChange:a=>{const t=e.options[e.options.findIndex(g=>g.label===a)];V(t.graphSettings||{}),j(t.dataConfiguration)},children:e.options.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),I?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),d.checkIfMultiple(e.chartConfigId,v||[])?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:C.Du(G),onChange:a=>{const t={columnId:(a||[]).map(h=>h.value),chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)}}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:a.label,value:a.label},t))}):e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);V(M(I,g)),j(g)}}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const g={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},h=v?.map(T=>T.chartConfigId===g.chartConfigId?g:T);V(M(I,h)),j(h)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),R?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:e.defaultValue.value,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>t.value===a))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:`${a.label}`,value:`${a.value}`},t))}):l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?l.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{y(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),m?l.jsxRuntimeExports.jsxs("div",{style:{width:m.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:m.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:m.label||"Highlight data"}),l.jsxRuntimeExports.jsx(C.ja,{options:Y,variant:f,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:e=>{X(e?.map(r=>r.value))},value:E?.map(e=>({label:e,value:e})),defaultValue:m.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,l.jsxRuntimeExports.jsx(re.GraphEl,{graph:b,graphData:ae,graphDataConfiguration:v,debugMode:S,readableHeader:B||[],updateFilters:K,settings:{...i||{},...x,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",theme:i?.theme,...E?{highlightedDataPoints:E,highlightedIds:E?.map(e=>`${e}`),highlightedLines:E?.map(e=>e)}:{}}})]}):l.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:l.jsxRuntimeExports.jsx(ne.w,{})})})}exports.SingleGraphDashboard=de;
|
|
2
2
|
//# sourceMappingURL=SingleGraphDashboard.cjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as t } from "./index-CHPV5EwG-
|
|
1
|
+
import { j as t } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useState as b, useRef as B, useEffectEvent as R, useEffect as w } from "react";
|
|
3
3
|
import { i as sa } from "./index-BuwmuDFJ.js";
|
|
4
4
|
import { f as F } from "./index-EArKRVKg.js";
|
|
5
5
|
import { i as ua } from "./index-Bwrro8-q.js";
|
|
6
|
-
import { j as V, D as M } from "./DropdownSelect-
|
|
7
|
-
import { b as A, y as H, h as O, c as da, $ as K, P as Q } from "./checkIfMultiple-
|
|
8
|
-
import { w as ha } from "./Spinner
|
|
9
|
-
import { G as ca } from "./GraphContainer-
|
|
10
|
-
import { G as fa } from "./GraphEl-
|
|
6
|
+
import { j as V, D as M } from "./DropdownSelect-B2WTeedJ.js";
|
|
7
|
+
import { b as A, y as H, h as O, c as da, $ as K, P as Q } from "./checkIfMultiple-B97uOUVq.js";
|
|
8
|
+
import { w as ha } from "./Spinner-CtJETd5V.js";
|
|
9
|
+
import { G as ca } from "./GraphContainer-DwMxWRCi.js";
|
|
10
|
+
import { G as fa } from "./GraphEl-CT3xPv2P.js";
|
|
11
11
|
import { f as ga, a as pa, b as ma, c as Ca, t as va } from "./fetchAndParseData-BAXhgTDM.js";
|
|
12
12
|
import { a as Ia, t as ba } from "./transformDataForAggregation-wdPf8bNt.js";
|
|
13
13
|
import { g as X } from "./getUniqValue-DsqSii6M.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as f, j as s } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as f, j as s } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useState as p, useEffect as c } from "react";
|
|
3
|
-
import { w as h } from "./Spinner
|
|
3
|
+
import { w as h } from "./Spinner-CtJETd5V.js";
|
|
4
4
|
import { SingleGraphDashboard as S } from "./SingleGraphDashboard.js";
|
|
5
5
|
import { f as m } from "./fetchAndParseData-BAXhgTDM.js";
|
|
6
6
|
function P(g) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as $, j as b } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as $, j as b } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useRef as E } from "react";
|
|
3
|
-
import { _ as P } from "./Typography-
|
|
3
|
+
import { _ as P } from "./Typography-HicNIA61.js";
|
|
4
4
|
import { GeoHubCompareMaps as R } from "./GeoHubCompareMaps.js";
|
|
5
5
|
import { GeoHubMap as W } from "./GeoHubMap.js";
|
|
6
6
|
import { GeoHubMapWithLayerSelection as B } from "./GeoHubMapWithLayerSelection.js";
|
|
7
7
|
import { GraphHeader as q } from "./GraphHeader.js";
|
|
8
|
-
import { G as A } from "./GraphContainer-
|
|
8
|
+
import { G as A } from "./GraphContainer-DwMxWRCi.js";
|
|
9
9
|
function F(S) {
|
|
10
10
|
const e = $.c(38), {
|
|
11
11
|
settings: t,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c, j as n } from "./index-CHPV5EwG-
|
|
1
|
+
import { c, j as n } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useState as d, useEffect as u } from "react";
|
|
3
|
-
import { w as l } from "./Spinner
|
|
3
|
+
import { w as l } from "./Spinner-CtJETd5V.js";
|
|
4
4
|
import { SingleGraphDashboardGeoHubMaps as m } from "./SingleGraphDashboardGeoHubMaps.js";
|
|
5
5
|
import { f as h } from "./fetchAndParseData-BAXhgTDM.js";
|
|
6
6
|
function j(f) {
|