@undp/data-viz 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.d.ts +11 -9
- package/dist/AreaChart.js +320 -322
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +15 -25
- package/dist/BarGraph.js +1694 -1694
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.d.ts +13 -9
- package/dist/BasicStatCard.js +79 -81
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +11 -9
- package/dist/BeeSwarmChart.js +335 -336
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +13 -3
- package/dist/BiVariateChoroplethMap.js +247 -245
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +11 -5
- package/dist/BulletChart.js +560 -559
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +11 -9
- package/dist/ButterflyChart.js +348 -350
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +11 -3
- package/dist/ChoroplethMap.js +213 -213
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +11 -9
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.d.ts +1 -1
- package/dist/DataCards.js +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.d.ts +4 -5
- package/dist/DataTable.js +114 -116
- package/dist/DataTable.js.map +1 -1
- package/dist/{DetailsModal-jmmKRMRM.cjs → DetailsModal-Du8Fr1QD.cjs} +2 -2
- package/dist/{DetailsModal-jmmKRMRM.cjs.map → DetailsModal-Du8Fr1QD.cjs.map} +1 -1
- package/dist/{DetailsModal-B2XBWR7w.js → DetailsModal-GqEbGHY2.js} +2 -2
- package/dist/{DetailsModal-B2XBWR7w.js.map → DetailsModal-GqEbGHY2.js.map} +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.d.ts +11 -9
- package/dist/DifferenceLineChart.js +502 -504
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +14 -9
- package/dist/DonutChart.js +174 -179
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.d.ts +1 -1
- package/dist/DotDensityMap.js +2 -2
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +13 -9
- package/dist/DualAxisLineChart.js +341 -351
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +11 -9
- package/dist/DumbbellChart.js +592 -593
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.d.ts +1 -1
- package/dist/GeoHubCompareMaps.js +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.d.ts +1 -1
- package/dist/GeoHubMap.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/GraphEl-B7x5ku_y.cjs +2 -0
- package/dist/GraphEl-B7x5ku_y.cjs.map +1 -0
- package/dist/GraphEl-B8tGXqWk.js +1829 -0
- package/dist/GraphEl-B8tGXqWk.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +28 -16
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +28 -16
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +11 -9
- package/dist/HeatMap.js +203 -205
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +11 -5
- package/dist/Histogram.js +88 -89
- package/dist/Histogram.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +11 -3
- package/dist/HybridMap.js +279 -279
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
- package/dist/LineChartWithConfidenceInterval.js +393 -395
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +28 -16
- package/dist/MultiGraphDashboardFromConfig.d.ts +28 -16
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +11 -9
- package/dist/MultiLineAltChart.js +411 -413
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.d.ts +11 -9
- package/dist/MultiLineChart.js +438 -440
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +13 -13
- package/dist/ParetoChart.js +347 -355
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +28 -16
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +28 -16
- package/dist/PerformanceIntensiveScrollStory.d.ts +28 -16
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +11 -5
- package/dist/RadarChart.js +213 -213
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +11 -9
- package/dist/SankeyChart.js +448 -450
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +13 -13
- package/dist/ScatterPlot.js +490 -498
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +28 -16
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.d.ts +11 -9
- package/dist/SimpleLineChart.js +362 -364
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +28 -16
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +28 -16
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +28 -16
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +28 -16
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +28 -16
- package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +28 -16
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.d.ts +1 -1
- package/dist/SlopeChart.js +2 -2
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +1 -1
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.d.ts +11 -9
- package/dist/StatCardFromData.js +113 -116
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +11 -9
- package/dist/StripChart.js +434 -435
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +11 -3
- package/dist/ThreeDGlobe.js +143 -143
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
- package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
- package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
- package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
- package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +11 -9
- package/dist/TreeMapGraph.js +369 -371
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +28 -16
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.d.ts +11 -5
- package/dist/UnitChart.js +118 -119
- package/dist/UnitChart.js.map +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +11 -9
- package/dist/WaterfallChart.js +306 -308
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
- package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
- package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
- package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
- package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
- package/dist/index-BPyj_6hG.js +375 -0
- package/dist/index-BPyj_6hG.js.map +1 -0
- package/dist/index-DuLvdHo2.cjs +2 -0
- package/dist/index-DuLvdHo2.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +105 -245
- package/dist/index.js +2 -2
- package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
- package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
- package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
- package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
- package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
- package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
- package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
- package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -2
- package/dist/GraphEl-B73N4RIA.js +0 -1906
- package/dist/GraphEl-B73N4RIA.js.map +0 -1
- package/dist/GraphEl-Lt1og0C-.cjs +0 -2
- package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
- package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
- package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
- package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
- package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
- package/dist/index-B0Awa_de.js +0 -377
- package/dist/index-B0Awa_de.js.map +0 -1
- package/dist/index-CP8cmNzt.cjs +0 -2
- package/dist/index-CP8cmNzt.cjs.map +0 -1
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
- package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
- package/dist/numberFormattingFunction-DqMf_v1m.js.map +0 -1
package/dist/SankeyChart.js
CHANGED
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import { o as
|
|
5
|
-
import { i as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { n as
|
|
8
|
-
import { T as
|
|
9
|
-
import { D as
|
|
10
|
-
import { m as
|
|
11
|
-
import { u as
|
|
12
|
-
import { A as
|
|
13
|
-
import { GraphHeader as
|
|
14
|
-
import { GraphFooter as
|
|
15
|
-
import { Colors as
|
|
16
|
-
import { g as
|
|
17
|
-
import { E as
|
|
18
|
-
import { u as
|
|
19
|
-
import { a as
|
|
20
|
-
function
|
|
1
|
+
import { c as ke, j as p, m as qt } from "./index-CHPV5EwG-BzibaIRc.js";
|
|
2
|
+
import { useRef as ie, useState as St, useEffectEvent as $e, useEffect as ue } from "react";
|
|
3
|
+
import { s as ce } from "./index-CeVNqhMO.js";
|
|
4
|
+
import { o as fe } from "./index-BZQYSqar.js";
|
|
5
|
+
import { i as Le } from "./index-Bwrro8-q.js";
|
|
6
|
+
import { _ as Ft } from "./Typography-BO0gQDIT.js";
|
|
7
|
+
import { n as he } from "./numberFormattingFunction-BUUV_luR.js";
|
|
8
|
+
import { T as Me } from "./Tooltip-3EYDVa3w.js";
|
|
9
|
+
import { D as Oe } from "./DetailsModal-GqEbGHY2.js";
|
|
10
|
+
import { m as Kt } from "./proxy-BsxtcZKa.js";
|
|
11
|
+
import { u as Se } from "./use-in-view-KOXq5Kmc.js";
|
|
12
|
+
import { A as Ve } from "./index-Cv_5q6Rb.js";
|
|
13
|
+
import { GraphHeader as Ne } from "./GraphHeader.js";
|
|
14
|
+
import { GraphFooter as Ce } from "./GraphFooter.js";
|
|
15
|
+
import { Colors as ge } from "./Colors.js";
|
|
16
|
+
import { g as De } from "./generateRandomString-za3IQGfQ.js";
|
|
17
|
+
import { E as Te } from "./EmptyState-CaxXCkiN.js";
|
|
18
|
+
import { u as Ht } from "./uniqBy-BHy4I8PK.js";
|
|
19
|
+
import { a as ze, G as Pe } from "./GraphContainer-B8ZqOzKI.js";
|
|
20
|
+
function de(e, t) {
|
|
21
21
|
let o;
|
|
22
22
|
if (t === void 0)
|
|
23
23
|
for (const s of e)
|
|
24
24
|
s != null && (o < s || o === void 0 && s >= s) && (o = s);
|
|
25
25
|
else {
|
|
26
26
|
let s = -1;
|
|
27
|
-
for (let
|
|
28
|
-
(
|
|
27
|
+
for (let l of e)
|
|
28
|
+
(l = t(l, ++s, e)) != null && (o < l || o === void 0 && l >= l) && (o = l);
|
|
29
29
|
}
|
|
30
30
|
return o;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function be(e, t) {
|
|
33
33
|
let o;
|
|
34
34
|
if (t === void 0)
|
|
35
35
|
for (const s of e)
|
|
36
36
|
s != null && (o > s || o === void 0 && s >= s) && (o = s);
|
|
37
37
|
else {
|
|
38
38
|
let s = -1;
|
|
39
|
-
for (let
|
|
40
|
-
(
|
|
39
|
+
for (let l of e)
|
|
40
|
+
(l = t(l, ++s, e)) != null && (o > l || o === void 0 && l >= l) && (o = l);
|
|
41
41
|
}
|
|
42
42
|
return o;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function te(e, t) {
|
|
45
45
|
let o = 0;
|
|
46
46
|
if (t === void 0)
|
|
47
47
|
for (let s of e)
|
|
48
48
|
(s = +s) && (o += s);
|
|
49
49
|
else {
|
|
50
50
|
let s = -1;
|
|
51
|
-
for (let
|
|
52
|
-
(
|
|
51
|
+
for (let l of e)
|
|
52
|
+
(l = +t(l, ++s, e)) && (o += l);
|
|
53
53
|
}
|
|
54
54
|
return o;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Ee(e) {
|
|
57
57
|
return e.target.depth;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function Be(e, t) {
|
|
60
60
|
return e.sourceLinks.length ? e.depth : t - 1;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
return e.targetLinks.length ? e.depth : e.sourceLinks.length ?
|
|
62
|
+
function ee(e) {
|
|
63
|
+
return e.targetLinks.length ? e.depth : e.sourceLinks.length ? be(e.sourceLinks, Ee) - 1 : 0;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Xt(e) {
|
|
66
66
|
return function() {
|
|
67
67
|
return e;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
70
|
+
function pe(e, t) {
|
|
71
|
+
return Yt(e.source, t.source) || e.index - t.index;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
73
|
+
function me(e, t) {
|
|
74
|
+
return Yt(e.target, t.target) || e.index - t.index;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Yt(e, t) {
|
|
77
77
|
return e.y0 - t.y0;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function ne(e) {
|
|
80
80
|
return e.value;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ie(e) {
|
|
83
83
|
return e.index;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Ae(e) {
|
|
86
86
|
return e.nodes;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function He(e) {
|
|
89
89
|
return e.links;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function ye(e, t) {
|
|
92
92
|
const o = e.get(t);
|
|
93
93
|
if (!o) throw new Error("missing: " + t);
|
|
94
94
|
return o;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function xe({ nodes: e }) {
|
|
97
97
|
for (const t of e) {
|
|
98
98
|
let o = t.y0, s = o;
|
|
99
|
-
for (const
|
|
100
|
-
|
|
101
|
-
for (const
|
|
102
|
-
|
|
99
|
+
for (const l of t.sourceLinks)
|
|
100
|
+
l.y0 = o + l.width / 2, o += l.width;
|
|
101
|
+
for (const l of t.targetLinks)
|
|
102
|
+
l.y1 = s + l.width / 2, s += l.width;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
let e = 0, t = 0, o = 1, s = 1,
|
|
105
|
+
function oe() {
|
|
106
|
+
let e = 0, t = 0, o = 1, s = 1, l = 24, m = 8, h, g = Ie, x = Be, w, j, L = Ae, P = He, v = 6;
|
|
107
107
|
function d() {
|
|
108
|
-
const n = { nodes:
|
|
109
|
-
return S(n),
|
|
108
|
+
const n = { nodes: L.apply(null, arguments), links: P.apply(null, arguments) };
|
|
109
|
+
return S(n), Z(n), $(n), D(n), U(n), xe(n), n;
|
|
110
110
|
}
|
|
111
111
|
d.update = function(n) {
|
|
112
|
-
return
|
|
112
|
+
return xe(n), n;
|
|
113
113
|
}, d.nodeId = function(n) {
|
|
114
|
-
return arguments.length ? (g = typeof n == "function" ? n :
|
|
114
|
+
return arguments.length ? (g = typeof n == "function" ? n : Xt(n), d) : g;
|
|
115
115
|
}, d.nodeAlign = function(n) {
|
|
116
|
-
return arguments.length ? (x = typeof n == "function" ? n :
|
|
116
|
+
return arguments.length ? (x = typeof n == "function" ? n : Xt(n), d) : x;
|
|
117
117
|
}, d.nodeSort = function(n) {
|
|
118
|
-
return arguments.length ? (
|
|
118
|
+
return arguments.length ? (w = n, d) : w;
|
|
119
119
|
}, d.nodeWidth = function(n) {
|
|
120
|
-
return arguments.length ? (
|
|
120
|
+
return arguments.length ? (l = +n, d) : l;
|
|
121
121
|
}, d.nodePadding = function(n) {
|
|
122
122
|
return arguments.length ? (m = h = +n, d) : m;
|
|
123
123
|
}, d.nodes = function(n) {
|
|
124
|
-
return arguments.length ? (
|
|
124
|
+
return arguments.length ? (L = typeof n == "function" ? n : Xt(n), d) : L;
|
|
125
125
|
}, d.links = function(n) {
|
|
126
|
-
return arguments.length ? (P = typeof n == "function" ? n :
|
|
126
|
+
return arguments.length ? (P = typeof n == "function" ? n : Xt(n), d) : P;
|
|
127
127
|
}, d.linkSort = function(n) {
|
|
128
|
-
return arguments.length ? (
|
|
128
|
+
return arguments.length ? (j = n, d) : j;
|
|
129
129
|
}, d.size = function(n) {
|
|
130
130
|
return arguments.length ? (e = t = 0, o = +n[0], s = +n[1], d) : [o - e, s - t];
|
|
131
131
|
}, d.extent = function(n) {
|
|
@@ -133,181 +133,181 @@ function ce() {
|
|
|
133
133
|
}, d.iterations = function(n) {
|
|
134
134
|
return arguments.length ? (v = +n, d) : v;
|
|
135
135
|
};
|
|
136
|
-
function S({ nodes: n, links:
|
|
137
|
-
for (const [
|
|
138
|
-
i.index =
|
|
139
|
-
const r = new Map(n.map((
|
|
140
|
-
for (const [
|
|
141
|
-
i.index =
|
|
136
|
+
function S({ nodes: n, links: a }) {
|
|
137
|
+
for (const [u, i] of n.entries())
|
|
138
|
+
i.index = u, i.sourceLinks = [], i.targetLinks = [];
|
|
139
|
+
const r = new Map(n.map((u, i) => [g(u, i, n), u]));
|
|
140
|
+
for (const [u, i] of a.entries()) {
|
|
141
|
+
i.index = u;
|
|
142
142
|
let { source: f, target: y } = i;
|
|
143
|
-
typeof f != "object" && (f = i.source =
|
|
143
|
+
typeof f != "object" && (f = i.source = ye(r, f)), typeof y != "object" && (y = i.target = ye(r, y)), f.sourceLinks.push(i), y.targetLinks.push(i);
|
|
144
144
|
}
|
|
145
|
-
if (
|
|
146
|
-
for (const { sourceLinks:
|
|
147
|
-
|
|
145
|
+
if (j != null)
|
|
146
|
+
for (const { sourceLinks: u, targetLinks: i } of n)
|
|
147
|
+
u.sort(j), i.sort(j);
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
for (const
|
|
151
|
-
|
|
149
|
+
function Z({ nodes: n }) {
|
|
150
|
+
for (const a of n)
|
|
151
|
+
a.value = a.fixedValue === void 0 ? Math.max(te(a.sourceLinks, ne), te(a.targetLinks, ne)) : a.fixedValue;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
const
|
|
155
|
-
let r = new Set(n),
|
|
153
|
+
function $({ nodes: n }) {
|
|
154
|
+
const a = n.length;
|
|
155
|
+
let r = new Set(n), u = /* @__PURE__ */ new Set(), i = 0;
|
|
156
156
|
for (; r.size; ) {
|
|
157
157
|
for (const f of r) {
|
|
158
158
|
f.depth = i;
|
|
159
159
|
for (const { target: y } of f.sourceLinks)
|
|
160
|
-
|
|
160
|
+
u.add(y);
|
|
161
161
|
}
|
|
162
|
-
if (++i >
|
|
163
|
-
r =
|
|
162
|
+
if (++i > a) throw new Error("circular link");
|
|
163
|
+
r = u, u = /* @__PURE__ */ new Set();
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
const
|
|
168
|
-
let r = new Set(n),
|
|
166
|
+
function D({ nodes: n }) {
|
|
167
|
+
const a = n.length;
|
|
168
|
+
let r = new Set(n), u = /* @__PURE__ */ new Set(), i = 0;
|
|
169
169
|
for (; r.size; ) {
|
|
170
170
|
for (const f of r) {
|
|
171
171
|
f.height = i;
|
|
172
172
|
for (const { source: y } of f.targetLinks)
|
|
173
|
-
|
|
173
|
+
u.add(y);
|
|
174
174
|
}
|
|
175
|
-
if (++i >
|
|
176
|
-
r =
|
|
175
|
+
if (++i > a) throw new Error("circular link");
|
|
176
|
+
r = u, u = /* @__PURE__ */ new Set();
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
function
|
|
180
|
-
const
|
|
179
|
+
function E({ nodes: n }) {
|
|
180
|
+
const a = de(n, (i) => i.depth) + 1, r = (o - e - l) / (a - 1), u = new Array(a);
|
|
181
181
|
for (const i of n) {
|
|
182
|
-
const f = Math.max(0, Math.min(
|
|
183
|
-
i.layer = f, i.x0 = e + f * r, i.x1 = i.x0 +
|
|
182
|
+
const f = Math.max(0, Math.min(a - 1, Math.floor(x.call(null, i, a))));
|
|
183
|
+
i.layer = f, i.x0 = e + f * r, i.x1 = i.x0 + l, u[f] ? u[f].push(i) : u[f] = [i];
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
186
|
-
i.sort(
|
|
187
|
-
return
|
|
185
|
+
if (w) for (const i of u)
|
|
186
|
+
i.sort(w);
|
|
187
|
+
return u;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
const
|
|
189
|
+
function W(n) {
|
|
190
|
+
const a = be(n, (r) => (s - t - (r.length - 1) * h) / te(r, ne));
|
|
191
191
|
for (const r of n) {
|
|
192
|
-
let
|
|
192
|
+
let u = t;
|
|
193
193
|
for (const i of r) {
|
|
194
|
-
i.y0 =
|
|
194
|
+
i.y0 = u, i.y1 = u + i.value * a, u = i.y1 + h;
|
|
195
195
|
for (const f of i.sourceLinks)
|
|
196
|
-
f.width = f.value *
|
|
196
|
+
f.width = f.value * a;
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
u = (s - u + h) / (r.length + 1);
|
|
199
199
|
for (let i = 0; i < r.length; ++i) {
|
|
200
200
|
const f = r[i];
|
|
201
|
-
f.y0 +=
|
|
201
|
+
f.y0 += u * (i + 1), f.y1 += u * (i + 1);
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
J(r);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
const
|
|
208
|
-
h = Math.min(m, (s - t) / (
|
|
206
|
+
function U(n) {
|
|
207
|
+
const a = E(n);
|
|
208
|
+
h = Math.min(m, (s - t) / (de(a, (r) => r.length) - 1)), W(a);
|
|
209
209
|
for (let r = 0; r < v; ++r) {
|
|
210
|
-
const
|
|
211
|
-
|
|
210
|
+
const u = Math.pow(0.99, r), i = Math.max(1 - u, (r + 1) / v);
|
|
211
|
+
nt(a, u, i), R(a, u, i);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
for (let
|
|
216
|
-
const f = n[
|
|
214
|
+
function R(n, a, r) {
|
|
215
|
+
for (let u = 1, i = n.length; u < i; ++u) {
|
|
216
|
+
const f = n[u];
|
|
217
217
|
for (const y of f) {
|
|
218
|
-
let
|
|
219
|
-
for (const { source:
|
|
220
|
-
let
|
|
221
|
-
|
|
218
|
+
let q = 0, I = 0;
|
|
219
|
+
for (const { source: K, value: A } of y.targetLinks) {
|
|
220
|
+
let G = A * (y.layer - K.layer);
|
|
221
|
+
q += C(K, y) * G, I += G;
|
|
222
222
|
}
|
|
223
|
-
if (!(
|
|
224
|
-
let
|
|
225
|
-
y.y0 +=
|
|
223
|
+
if (!(I > 0)) continue;
|
|
224
|
+
let z = (q / I - y.y0) * a;
|
|
225
|
+
y.y0 += z, y.y1 += z, kt(y);
|
|
226
226
|
}
|
|
227
|
-
|
|
227
|
+
w === void 0 && f.sort(Yt), Q(f, r);
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
for (let
|
|
230
|
+
function nt(n, a, r) {
|
|
231
|
+
for (let u = n.length, i = u - 2; i >= 0; --i) {
|
|
232
232
|
const f = n[i];
|
|
233
233
|
for (const y of f) {
|
|
234
|
-
let
|
|
235
|
-
for (const { target:
|
|
236
|
-
let
|
|
237
|
-
|
|
234
|
+
let q = 0, I = 0;
|
|
235
|
+
for (const { target: K, value: A } of y.sourceLinks) {
|
|
236
|
+
let G = A * (K.layer - y.layer);
|
|
237
|
+
q += k(y, K) * G, I += G;
|
|
238
238
|
}
|
|
239
|
-
if (!(
|
|
240
|
-
let
|
|
241
|
-
y.y0 +=
|
|
239
|
+
if (!(I > 0)) continue;
|
|
240
|
+
let z = (q / I - y.y0) * a;
|
|
241
|
+
y.y0 += z, y.y1 += z, kt(y);
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
w === void 0 && f.sort(Yt), Q(f, r);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
function
|
|
247
|
-
const r = n.length >> 1,
|
|
248
|
-
|
|
246
|
+
function Q(n, a) {
|
|
247
|
+
const r = n.length >> 1, u = n[r];
|
|
248
|
+
ot(n, u.y0 - h, r - 1, a), T(n, u.y1 + h, r + 1, a), ot(n, s, n.length - 1, a), T(n, t, 0, a);
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function T(n, a, r, u) {
|
|
251
251
|
for (; r < n.length; ++r) {
|
|
252
|
-
const i = n[r], f = (
|
|
253
|
-
f > 1e-6 && (i.y0 += f, i.y1 += f),
|
|
252
|
+
const i = n[r], f = (a - i.y0) * u;
|
|
253
|
+
f > 1e-6 && (i.y0 += f, i.y1 += f), a = i.y1 + h;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function ot(n, a, r, u) {
|
|
257
257
|
for (; r >= 0; --r) {
|
|
258
|
-
const i = n[r], f = (i.y1 -
|
|
259
|
-
f > 1e-6 && (i.y0 -= f, i.y1 -= f),
|
|
258
|
+
const i = n[r], f = (i.y1 - a) * u;
|
|
259
|
+
f > 1e-6 && (i.y0 -= f, i.y1 -= f), a = i.y0 - h;
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
function kt({ sourceLinks: n, targetLinks:
|
|
263
|
-
if (
|
|
264
|
-
for (const { source: { sourceLinks: r } } of
|
|
265
|
-
r.sort(
|
|
262
|
+
function kt({ sourceLinks: n, targetLinks: a }) {
|
|
263
|
+
if (j === void 0) {
|
|
264
|
+
for (const { source: { sourceLinks: r } } of a)
|
|
265
|
+
r.sort(me);
|
|
266
266
|
for (const { target: { targetLinks: r } } of n)
|
|
267
|
-
r.sort(
|
|
267
|
+
r.sort(pe);
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
if (
|
|
272
|
-
for (const { sourceLinks:
|
|
273
|
-
|
|
270
|
+
function J(n) {
|
|
271
|
+
if (j === void 0)
|
|
272
|
+
for (const { sourceLinks: a, targetLinks: r } of n)
|
|
273
|
+
a.sort(me), r.sort(pe);
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function C(n, a) {
|
|
276
276
|
let r = n.y0 - (n.sourceLinks.length - 1) * h / 2;
|
|
277
|
-
for (const { target:
|
|
278
|
-
if (
|
|
277
|
+
for (const { target: u, width: i } of n.sourceLinks) {
|
|
278
|
+
if (u === a) break;
|
|
279
279
|
r += i + h;
|
|
280
280
|
}
|
|
281
|
-
for (const { source:
|
|
282
|
-
if (
|
|
281
|
+
for (const { source: u, width: i } of a.targetLinks) {
|
|
282
|
+
if (u === n) break;
|
|
283
283
|
r -= i;
|
|
284
284
|
}
|
|
285
285
|
return r;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
let r =
|
|
289
|
-
for (const { source:
|
|
290
|
-
if (
|
|
287
|
+
function k(n, a) {
|
|
288
|
+
let r = a.y0 - (a.targetLinks.length - 1) * h / 2;
|
|
289
|
+
for (const { source: u, width: i } of a.targetLinks) {
|
|
290
|
+
if (u === n) break;
|
|
291
291
|
r += i + h;
|
|
292
292
|
}
|
|
293
|
-
for (const { target:
|
|
294
|
-
if (
|
|
293
|
+
for (const { target: u, width: i } of n.sourceLinks) {
|
|
294
|
+
if (u === a) break;
|
|
295
295
|
r -= i;
|
|
296
296
|
}
|
|
297
297
|
return r;
|
|
298
298
|
}
|
|
299
299
|
return d;
|
|
300
300
|
}
|
|
301
|
-
var
|
|
302
|
-
function
|
|
301
|
+
var re = Math.PI, se = 2 * re, Ct = 1e-6, We = se - Ct;
|
|
302
|
+
function le() {
|
|
303
303
|
this._x0 = this._y0 = // start of current subpath
|
|
304
304
|
this._x1 = this._y1 = null, this._ = "";
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
return new
|
|
306
|
+
function we() {
|
|
307
|
+
return new le();
|
|
308
308
|
}
|
|
309
|
-
|
|
310
|
-
constructor:
|
|
309
|
+
le.prototype = we.prototype = {
|
|
310
|
+
constructor: le,
|
|
311
311
|
moveTo: function(e, t) {
|
|
312
312
|
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t);
|
|
313
313
|
},
|
|
@@ -320,27 +320,27 @@ ge.prototype = Ve.prototype = {
|
|
|
320
320
|
quadraticCurveTo: function(e, t, o, s) {
|
|
321
321
|
this._ += "Q" + +e + "," + +t + "," + (this._x1 = +o) + "," + (this._y1 = +s);
|
|
322
322
|
},
|
|
323
|
-
bezierCurveTo: function(e, t, o, s,
|
|
324
|
-
this._ += "C" + +e + "," + +t + "," + +o + "," + +s + "," + (this._x1 = +
|
|
323
|
+
bezierCurveTo: function(e, t, o, s, l, m) {
|
|
324
|
+
this._ += "C" + +e + "," + +t + "," + +o + "," + +s + "," + (this._x1 = +l) + "," + (this._y1 = +m);
|
|
325
325
|
},
|
|
326
|
-
arcTo: function(e, t, o, s,
|
|
327
|
-
e = +e, t = +t, o = +o, s = +s,
|
|
328
|
-
var m = this._x1, h = this._y1, g = o - e, x = s - t,
|
|
329
|
-
if (
|
|
326
|
+
arcTo: function(e, t, o, s, l) {
|
|
327
|
+
e = +e, t = +t, o = +o, s = +s, l = +l;
|
|
328
|
+
var m = this._x1, h = this._y1, g = o - e, x = s - t, w = m - e, j = h - t, L = w * w + j * j;
|
|
329
|
+
if (l < 0) throw new Error("negative radius: " + l);
|
|
330
330
|
if (this._x1 === null)
|
|
331
331
|
this._ += "M" + (this._x1 = e) + "," + (this._y1 = t);
|
|
332
|
-
else if (
|
|
332
|
+
else if (L > Ct) if (!(Math.abs(j * g - x * w) > Ct) || !l)
|
|
333
333
|
this._ += "L" + (this._x1 = e) + "," + (this._y1 = t);
|
|
334
334
|
else {
|
|
335
|
-
var P = o - m, v = s - h, d = g * g + x * x, S = P * P + v * v,
|
|
336
|
-
Math.abs(
|
|
335
|
+
var P = o - m, v = s - h, d = g * g + x * x, S = P * P + v * v, Z = Math.sqrt(d), $ = Math.sqrt(L), D = l * Math.tan((re - Math.acos((d + L - S) / (2 * Z * $))) / 2), E = D / $, W = D / Z;
|
|
336
|
+
Math.abs(E - 1) > Ct && (this._ += "L" + (e + E * w) + "," + (t + E * j)), this._ += "A" + l + "," + l + ",0,0," + +(j * P > w * v) + "," + (this._x1 = e + W * g) + "," + (this._y1 = t + W * x);
|
|
337
337
|
}
|
|
338
338
|
},
|
|
339
|
-
arc: function(e, t, o, s,
|
|
339
|
+
arc: function(e, t, o, s, l, m) {
|
|
340
340
|
e = +e, t = +t, o = +o, m = !!m;
|
|
341
|
-
var h = o * Math.cos(s), g = o * Math.sin(s), x = e + h,
|
|
341
|
+
var h = o * Math.cos(s), g = o * Math.sin(s), x = e + h, w = t + g, j = 1 ^ m, L = m ? s - l : l - s;
|
|
342
342
|
if (o < 0) throw new Error("negative radius: " + o);
|
|
343
|
-
this._x1 === null ? this._ += "M" + x + "," +
|
|
343
|
+
this._x1 === null ? this._ += "M" + x + "," + w : (Math.abs(this._x1 - x) > Ct || Math.abs(this._y1 - w) > Ct) && (this._ += "L" + x + "," + w), o && (L < 0 && (L = L % se + se), L > We ? this._ += "A" + o + "," + o + ",0,1," + j + "," + (e - h) + "," + (t - g) + "A" + o + "," + o + ",0,1," + j + "," + (this._x1 = x) + "," + (this._y1 = w) : L > Ct && (this._ += "A" + o + "," + o + ",0," + +(L >= re) + "," + j + "," + (this._x1 = e + o * Math.cos(l)) + "," + (this._y1 = t + o * Math.sin(l))));
|
|
344
344
|
},
|
|
345
345
|
rect: function(e, t, o, s) {
|
|
346
346
|
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +o + "v" + +s + "h" + -o + "Z";
|
|
@@ -349,210 +349,211 @@ ge.prototype = Ve.prototype = {
|
|
|
349
349
|
return this._;
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
|
-
function
|
|
352
|
+
function ve(e) {
|
|
353
353
|
return function() {
|
|
354
354
|
return e;
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Re(e) {
|
|
358
358
|
return e[0];
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ge(e) {
|
|
361
361
|
return e[1];
|
|
362
362
|
}
|
|
363
|
-
var
|
|
364
|
-
function
|
|
363
|
+
var Ze = Array.prototype.slice;
|
|
364
|
+
function qe(e) {
|
|
365
365
|
return e.source;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Fe(e) {
|
|
368
368
|
return e.target;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
var t =
|
|
370
|
+
function Xe(e) {
|
|
371
|
+
var t = qe, o = Fe, s = Re, l = Ge, m = null;
|
|
372
372
|
function h() {
|
|
373
|
-
var g, x =
|
|
374
|
-
if (m || (m = g =
|
|
373
|
+
var g, x = Ze.call(arguments), w = t.apply(this, x), j = o.apply(this, x);
|
|
374
|
+
if (m || (m = g = we()), e(m, +s.apply(this, (x[0] = w, x)), +l.apply(this, x), +s.apply(this, (x[0] = j, x)), +l.apply(this, x)), g) return m = null, g + "" || null;
|
|
375
375
|
}
|
|
376
376
|
return h.source = function(g) {
|
|
377
377
|
return arguments.length ? (t = g, h) : t;
|
|
378
378
|
}, h.target = function(g) {
|
|
379
379
|
return arguments.length ? (o = g, h) : o;
|
|
380
380
|
}, h.x = function(g) {
|
|
381
|
-
return arguments.length ? (s = typeof g == "function" ? g :
|
|
381
|
+
return arguments.length ? (s = typeof g == "function" ? g : ve(+g), h) : s;
|
|
382
382
|
}, h.y = function(g) {
|
|
383
|
-
return arguments.length ? (
|
|
383
|
+
return arguments.length ? (l = typeof g == "function" ? g : ve(+g), h) : l;
|
|
384
384
|
}, h.context = function(g) {
|
|
385
385
|
return arguments.length ? (m = g ?? null, h) : m;
|
|
386
386
|
}, h;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
e.moveTo(t, o), e.bezierCurveTo(t = (t + s) / 2, o, t,
|
|
388
|
+
function Ye(e, t, o, s, l) {
|
|
389
|
+
e.moveTo(t, o), e.bezierCurveTo(t = (t + s) / 2, o, t, l, s, l);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
return
|
|
391
|
+
function _e() {
|
|
392
|
+
return Xe(Ye);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function Ue(e) {
|
|
395
395
|
return [e.source.x1, e.y0];
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Qe(e) {
|
|
398
398
|
return [e.target.x0, e.y1];
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
400
|
+
function Je() {
|
|
401
|
+
return _e().source(Ue).target(Qe);
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
const t =
|
|
403
|
+
function Ke(e) {
|
|
404
|
+
const t = ke.c(142), {
|
|
405
405
|
data: o,
|
|
406
406
|
showLabels: s,
|
|
407
|
-
leftMargin:
|
|
407
|
+
leftMargin: l,
|
|
408
408
|
rightMargin: m,
|
|
409
409
|
truncateBy: h,
|
|
410
410
|
width: g,
|
|
411
411
|
height: x,
|
|
412
|
-
topMargin:
|
|
413
|
-
bottomMargin:
|
|
414
|
-
tooltip:
|
|
412
|
+
topMargin: w,
|
|
413
|
+
bottomMargin: j,
|
|
414
|
+
tooltip: L,
|
|
415
415
|
onSeriesMouseOver: P,
|
|
416
416
|
suffix: v,
|
|
417
417
|
prefix: d,
|
|
418
418
|
showValues: S,
|
|
419
|
-
onSeriesMouseClick:
|
|
420
|
-
nodePadding:
|
|
421
|
-
nodeWidth:
|
|
422
|
-
id:
|
|
423
|
-
highlightedSourceDataPoints:
|
|
424
|
-
highlightedTargetDataPoints:
|
|
425
|
-
defaultLinkOpacity:
|
|
426
|
-
sourceTitle:
|
|
427
|
-
targetTitle:
|
|
428
|
-
animate:
|
|
429
|
-
sortNodes:
|
|
419
|
+
onSeriesMouseClick: Z,
|
|
420
|
+
nodePadding: $,
|
|
421
|
+
nodeWidth: D,
|
|
422
|
+
id: E,
|
|
423
|
+
highlightedSourceDataPoints: W,
|
|
424
|
+
highlightedTargetDataPoints: U,
|
|
425
|
+
defaultLinkOpacity: R,
|
|
426
|
+
sourceTitle: nt,
|
|
427
|
+
targetTitle: Q,
|
|
428
|
+
animate: T,
|
|
429
|
+
sortNodes: ot,
|
|
430
430
|
resetSelectionOnDoubleClick: kt,
|
|
431
|
-
detailsOnClick:
|
|
432
|
-
styles:
|
|
433
|
-
classNames:
|
|
431
|
+
detailsOnClick: J,
|
|
432
|
+
styles: C,
|
|
433
|
+
classNames: k,
|
|
434
434
|
precision: n,
|
|
435
|
-
customLayers:
|
|
436
|
-
locale: r
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
435
|
+
customLayers: a,
|
|
436
|
+
locale: r,
|
|
437
|
+
padZeros: u
|
|
438
|
+
} = e, i = ie(null);
|
|
439
|
+
let f;
|
|
440
|
+
t[0] !== T.amount || t[1] !== T.once ? (f = {
|
|
441
|
+
once: T.once,
|
|
442
|
+
amount: T.amount
|
|
443
|
+
}, t[0] = T.amount, t[1] = T.once, t[2] = f) : f = t[2];
|
|
444
|
+
const y = Se(i, f), [q, I] = St(void 0), [z, K] = St(void 0), [A, G] = St(void 0), [M, V] = St(void 0), [Vt, Lt] = St(void 0);
|
|
445
|
+
let N;
|
|
446
|
+
t[3] !== j || t[4] !== l || t[5] !== m || t[6] !== w ? (N = {
|
|
447
|
+
top: w,
|
|
448
|
+
bottom: j,
|
|
449
|
+
left: l,
|
|
449
450
|
right: m
|
|
450
|
-
}, t[3] =
|
|
451
|
-
const
|
|
452
|
-
let
|
|
453
|
-
if (t[8] !==
|
|
454
|
-
const
|
|
455
|
-
nodes:
|
|
456
|
-
links:
|
|
457
|
-
} =
|
|
458
|
-
|
|
451
|
+
}, t[3] = j, t[4] = l, t[5] = m, t[6] = w, t[7] = N) : N = t[7];
|
|
452
|
+
const b = N, bt = g - b.left - b.right, wt = x - b.top - b.bottom;
|
|
453
|
+
let at, ut, ct, tt, ft, it, F, X, ht, gt, et, dt, pt, mt, O, yt;
|
|
454
|
+
if (t[8] !== T.duration || t[9] !== k?.graphObjectValues || t[10] !== a || t[11] !== o || t[12] !== R || t[13] !== J || t[14] !== wt || t[15] !== bt || t[16] !== x || t[17] !== W || t[18] !== U || t[19] !== E || t[20] !== y || t[21] !== l || t[22] !== r || t[23] !== b.left || t[24] !== b.right || t[25] !== b.top || t[26] !== z || t[27] !== $ || t[28] !== D || t[29] !== Z || t[30] !== P || t[31] !== u || t[32] !== n || t[33] !== d || t[34] !== kt || t[35] !== m || t[36] !== A || t[37] !== s || t[38] !== S || t[39] !== ot || t[40] !== nt || t[41] !== C?.graphObjectValues || t[42] !== v || t[43] !== Q || t[44] !== h || t[45] !== g) {
|
|
455
|
+
const Tt = ot === "mostReadable" ? oe().nodeWidth(D).nodePadding($).size([bt, wt]).nodeAlign(ee) : ot === "none" ? oe().nodeWidth(D).nodePadding($).size([bt, wt]).nodeAlign(ee).nodeSort(null).linkSort(null) : oe().nodeWidth(D).nodePadding($).size([bt, wt]).nodeAlign(ee).nodeSort(ot === "desc" ? an : ln), {
|
|
456
|
+
nodes: Wt,
|
|
457
|
+
links: zt
|
|
458
|
+
} = Tt(o), Rt = Je();
|
|
459
|
+
ut = Kt.svg, O = `${g}px`, yt = `${x}px`, ct = `0 0 ${g} ${x}`, t[62] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (tt = {
|
|
459
460
|
marginLeft: "auto",
|
|
460
461
|
marginRight: "auto"
|
|
461
|
-
}, t[
|
|
462
|
+
}, t[62] = tt) : tt = t[62], ft = "ltr", it = i, t[63] !== b.left || t[64] !== b.top || t[65] !== nt ? (F = nt ? /* @__PURE__ */ p.jsx("text", { x: b.left, y: b.top - 10, className: "text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100", style: {
|
|
462
463
|
textAnchor: "start"
|
|
463
|
-
}, children:
|
|
464
|
+
}, children: nt }) : null, t[63] = b.left, t[64] = b.top, t[65] = nt, t[66] = F) : F = t[66], t[67] !== b.right || t[68] !== b.top || t[69] !== Q || t[70] !== g ? (X = Q ? /* @__PURE__ */ p.jsx("text", { x: g - b.right, y: b.top - 10, className: "text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100", style: {
|
|
464
465
|
textAnchor: "end"
|
|
465
|
-
}, children:
|
|
466
|
-
let
|
|
467
|
-
t[
|
|
468
|
-
|
|
466
|
+
}, children: Q }) : null, t[67] = b.right, t[68] = b.top, t[69] = Q, t[70] = g, t[71] = X) : X = t[71], gt = `translate(${b.left},${b.top})`, t[72] !== a ? (et = a.filter(sn).map(rn), t[72] = a, t[73] = et) : et = t[73];
|
|
467
|
+
let jt;
|
|
468
|
+
t[74] !== k?.graphObjectValues || t[75] !== l || t[76] !== r || t[77] !== $ || t[78] !== u || t[79] !== n || t[80] !== d || t[81] !== s || t[82] !== S || t[83] !== C?.graphObjectValues || t[84] !== v || t[85] !== h ? (jt = (c, _) => /* @__PURE__ */ p.jsx("g", { onMouseEnter: () => {
|
|
469
|
+
G(c);
|
|
469
470
|
}, onMouseLeave: () => {
|
|
470
|
-
|
|
471
|
-
}, children: /* @__PURE__ */ p.jsxs("g", { transform: `translate(${
|
|
472
|
-
/* @__PURE__ */ p.jsx("rect", { x: 0, y: 0, width: (
|
|
473
|
-
fill:
|
|
471
|
+
G(void 0);
|
|
472
|
+
}, children: /* @__PURE__ */ p.jsxs("g", { transform: `translate(${c.x0},${c.y0})`, children: [
|
|
473
|
+
/* @__PURE__ */ p.jsx("rect", { x: 0, y: 0, width: (c.x1 || 0) - (c.x0 || 0), height: (c.y1 || 0) - (c.y0 || 0), style: {
|
|
474
|
+
fill: c.color
|
|
474
475
|
} }),
|
|
475
|
-
s || S ? /* @__PURE__ */ p.jsx("foreignObject", { y: 0 -
|
|
476
|
-
height: `${(
|
|
476
|
+
s || S ? /* @__PURE__ */ p.jsx("foreignObject", { y: 0 - $ / 2, x: 0 - l, width: l, height: (c.y1 || 0) - (c.y0 || 0) + $, children: /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-0.5 justify-center py-0 px-1.5", style: {
|
|
477
|
+
height: `${(c.y1 || 0) - (c.y0 || 0) + $}px`,
|
|
477
478
|
overflow: "visible"
|
|
478
479
|
}, children: [
|
|
479
|
-
s ? /* @__PURE__ */ p.jsx(
|
|
480
|
+
s ? /* @__PURE__ */ p.jsx(Ft, { marginBottom: S ? "3xs" : "none", size: "sm", leading: "none", className: qt("sankey-right-label text-right", k?.graphObjectValues), style: {
|
|
480
481
|
hyphens: "auto",
|
|
481
|
-
color:
|
|
482
|
-
...
|
|
483
|
-
}, children: `${
|
|
484
|
-
S ? /* @__PURE__ */ p.jsx(
|
|
482
|
+
color: c.color,
|
|
483
|
+
...C?.graphObjectValues
|
|
484
|
+
}, children: `${c.label}`.length < h ? `${c.label}` : `${`${c.label}`.substring(0, h)}...` }) : null,
|
|
485
|
+
S ? /* @__PURE__ */ p.jsx(Ft, { marginBottom: "none", size: "sm", leading: "none", className: qt("sankey-right-value text-right font-bold", k?.graphObjectValues), style: {
|
|
485
486
|
hyphens: "auto",
|
|
486
|
-
color:
|
|
487
|
-
...
|
|
488
|
-
}, children:
|
|
487
|
+
color: c.color,
|
|
488
|
+
...C?.graphObjectValues
|
|
489
|
+
}, children: he(c.value, void 0, n, d, v, r, u) }) : null
|
|
489
490
|
] }) }) : null
|
|
490
|
-
] }) },
|
|
491
|
-
let
|
|
492
|
-
t[
|
|
493
|
-
|
|
491
|
+
] }) }, _), t[74] = k?.graphObjectValues, t[75] = l, t[76] = r, t[77] = $, t[78] = u, t[79] = n, t[80] = d, t[81] = s, t[82] = S, t[83] = C?.graphObjectValues, t[84] = v, t[85] = h, t[86] = jt) : jt = t[86], dt = Wt.filter(on).map(jt);
|
|
492
|
+
let Ot;
|
|
493
|
+
t[87] !== k?.graphObjectValues || t[88] !== r || t[89] !== $ || t[90] !== D || t[91] !== u || t[92] !== n || t[93] !== d || t[94] !== m || t[95] !== s || t[96] !== S || t[97] !== C?.graphObjectValues || t[98] !== v || t[99] !== h ? (Ot = (c, _) => /* @__PURE__ */ p.jsx("g", { onMouseEnter: () => {
|
|
494
|
+
G(c);
|
|
494
495
|
}, onMouseLeave: () => {
|
|
495
|
-
|
|
496
|
-
}, children: /* @__PURE__ */ p.jsxs("g", { transform: `translate(${
|
|
497
|
-
/* @__PURE__ */ p.jsx("rect", { x: 0, y: 0, width: (
|
|
498
|
-
fill:
|
|
496
|
+
G(void 0);
|
|
497
|
+
}, children: /* @__PURE__ */ p.jsxs("g", { transform: `translate(${c.x0},${c.y0})`, children: [
|
|
498
|
+
/* @__PURE__ */ p.jsx("rect", { x: 0, y: 0, width: (c.x1 || 0) - (c.x0 || 0), height: (c.y1 || 0) - (c.y0 || 0), style: {
|
|
499
|
+
fill: c.color
|
|
499
500
|
} }),
|
|
500
|
-
s || S ? /* @__PURE__ */ p.jsx("foreignObject", { y: 0 -
|
|
501
|
-
height: `${(
|
|
501
|
+
s || S ? /* @__PURE__ */ p.jsx("foreignObject", { y: 0 - $ / 2, x: D, width: m - D, height: (c.y1 || 0) - (c.y0 || 0) + $, children: /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-0.5 justify-center py-0 px-1.5", style: {
|
|
502
|
+
height: `${(c.y1 || 0) - (c.y0 || 0) + $}px`
|
|
502
503
|
}, children: [
|
|
503
|
-
s ? /* @__PURE__ */ p.jsx(
|
|
504
|
+
s ? /* @__PURE__ */ p.jsx(Ft, { marginBottom: S ? "3xs" : "none", size: "sm", leading: "none", className: qt("sankey-left-label text-left", k?.graphObjectValues), style: {
|
|
504
505
|
hyphens: "auto",
|
|
505
|
-
color:
|
|
506
|
-
...
|
|
507
|
-
}, children: `${
|
|
508
|
-
S ? /* @__PURE__ */ p.jsx(
|
|
506
|
+
color: c.color,
|
|
507
|
+
...C?.graphObjectValues
|
|
508
|
+
}, children: `${c.label}`.length < h ? `${c.label}` : `${`${c.label}`.substring(0, h)}...` }) : null,
|
|
509
|
+
S ? /* @__PURE__ */ p.jsx(Ft, { size: "sm", leading: "none", marginBottom: "none", className: qt("sankey-left-value text-left font-bold", k?.graphObjectValues), style: {
|
|
509
510
|
hyphens: "auto",
|
|
510
|
-
color:
|
|
511
|
-
...
|
|
512
|
-
}, children:
|
|
511
|
+
color: c.color,
|
|
512
|
+
...C?.graphObjectValues
|
|
513
|
+
}, children: he(c.value, void 0, n, d, v, r, u) }) : null
|
|
513
514
|
] }) }) : null
|
|
514
|
-
] }) },
|
|
515
|
-
let
|
|
516
|
-
t[
|
|
515
|
+
] }) }, _), t[87] = k?.graphObjectValues, t[88] = r, t[89] = $, t[90] = D, t[91] = u, t[92] = n, t[93] = d, t[94] = m, t[95] = s, t[96] = S, t[97] = C?.graphObjectValues, t[98] = v, t[99] = h, t[100] = Ot) : Ot = t[100], pt = Wt.filter(nn).map(Ot);
|
|
516
|
+
let $t;
|
|
517
|
+
t[101] !== E ? ($t = (c, _) => /* @__PURE__ */ p.jsxs("linearGradient", { id: `${E}-gradient-${_}`, x1: "0%", y1: "0%", x2: "100%", y2: "0%", gradientUnits: "userSpaceOnUse", children: [
|
|
517
518
|
/* @__PURE__ */ p.jsx("stop", { offset: "0%", style: {
|
|
518
|
-
stopColor:
|
|
519
|
+
stopColor: c.source.color,
|
|
519
520
|
stopOpacity: 1
|
|
520
521
|
} }),
|
|
521
522
|
/* @__PURE__ */ p.jsx("stop", { offset: "100%", style: {
|
|
522
|
-
stopColor:
|
|
523
|
+
stopColor: c.target.color,
|
|
523
524
|
stopOpacity: 1
|
|
524
525
|
} })
|
|
525
|
-
] },
|
|
526
|
-
|
|
527
|
-
}, onMouseMove: (
|
|
528
|
-
|
|
526
|
+
] }, _), t[101] = E, t[102] = $t) : $t = t[102], mt = /* @__PURE__ */ p.jsx("defs", { children: zt.map($t) }), at = Ve, ht = zt.map((c, _) => /* @__PURE__ */ p.jsx(Kt.g, { className: "undp-viz-g-with-hover", onMouseEnter: (vt) => {
|
|
527
|
+
I(c.data), Lt(vt.clientY), V(vt.clientX), P?.(c);
|
|
528
|
+
}, onMouseMove: (vt) => {
|
|
529
|
+
I(c.data), Lt(vt.clientY), V(vt.clientX);
|
|
529
530
|
}, onClick: () => {
|
|
530
|
-
(
|
|
531
|
+
(Z || J) && (Le(z, c.data) && kt ? (K(void 0), Z?.(void 0)) : (K(c.data), Z?.(c.data)));
|
|
531
532
|
}, onMouseLeave: () => {
|
|
532
|
-
|
|
533
|
+
I(void 0), V(void 0), Lt(void 0), P?.(void 0);
|
|
533
534
|
}, variants: {
|
|
534
535
|
initial: {
|
|
535
|
-
opacity:
|
|
536
|
+
opacity: A ? c.source.name === A.name || c.target.name === A.name ? 0.85 : R : (W || U) && (W?.indexOf(c.source.label) !== -1 || U?.indexOf(c.target.label) !== -1) ? 0.85 : R
|
|
536
537
|
},
|
|
537
538
|
whileInView: {
|
|
538
|
-
opacity:
|
|
539
|
+
opacity: A ? c.source.name === A.name || c.target.name === A.name ? 0.85 : R : (W || U) && (W?.indexOf(c.source.label) !== -1 || U?.indexOf(c.target.label) !== -1) ? 0.85 : R,
|
|
539
540
|
transition: {
|
|
540
|
-
duration:
|
|
541
|
+
duration: T.duration
|
|
541
542
|
}
|
|
542
543
|
}
|
|
543
|
-
}, initial: "initial", animate:
|
|
544
|
+
}, initial: "initial", animate: y ? "whileInView" : "initial", exit: {
|
|
544
545
|
opacity: 0,
|
|
545
546
|
transition: {
|
|
546
|
-
duration:
|
|
547
|
+
duration: T.duration
|
|
547
548
|
}
|
|
548
|
-
}, children: /* @__PURE__ */ p.jsx(
|
|
549
|
-
stroke: `url(#${
|
|
550
|
-
strokeWidth:
|
|
549
|
+
}, children: /* @__PURE__ */ p.jsx(Kt.path, { d: Rt(c) || "", style: {
|
|
550
|
+
stroke: `url(#${E}-gradient-${_})`,
|
|
551
|
+
strokeWidth: c.width,
|
|
551
552
|
fill: "none"
|
|
552
553
|
}, exit: {
|
|
553
554
|
opacity: 0,
|
|
554
555
|
transition: {
|
|
555
|
-
duration:
|
|
556
|
+
duration: T.duration
|
|
556
557
|
}
|
|
557
558
|
}, variants: {
|
|
558
559
|
initial: {
|
|
@@ -563,232 +564,229 @@ function ln(e) {
|
|
|
563
564
|
pathLength: 1,
|
|
564
565
|
opacity: 1,
|
|
565
566
|
transition: {
|
|
566
|
-
duration:
|
|
567
|
+
duration: T.duration
|
|
567
568
|
}
|
|
568
569
|
}
|
|
569
|
-
}, initial: "initial", animate:
|
|
570
|
+
}, initial: "initial", animate: y ? "whileInView" : "initial" }, `${c.source}-${c.target}`) }, `${c.source}-${c.target}`)), t[8] = T.duration, t[9] = k?.graphObjectValues, t[10] = a, t[11] = o, t[12] = R, t[13] = J, t[14] = wt, t[15] = bt, t[16] = x, t[17] = W, t[18] = U, t[19] = E, t[20] = y, t[21] = l, t[22] = r, t[23] = b.left, t[24] = b.right, t[25] = b.top, t[26] = z, t[27] = $, t[28] = D, t[29] = Z, t[30] = P, t[31] = u, t[32] = n, t[33] = d, t[34] = kt, t[35] = m, t[36] = A, t[37] = s, t[38] = S, t[39] = ot, t[40] = nt, t[41] = C?.graphObjectValues, t[42] = v, t[43] = Q, t[44] = h, t[45] = g, t[46] = at, t[47] = ut, t[48] = ct, t[49] = tt, t[50] = ft, t[51] = it, t[52] = F, t[53] = X, t[54] = ht, t[55] = gt, t[56] = et, t[57] = dt, t[58] = pt, t[59] = mt, t[60] = O, t[61] = yt;
|
|
570
571
|
} else
|
|
571
|
-
|
|
572
|
-
let
|
|
573
|
-
t[
|
|
574
|
-
let
|
|
575
|
-
t[
|
|
576
|
-
let yt;
|
|
577
|
-
t[105] !== pt || t[106] !== mt || t[107] !== ht || t[108] !== tt || t[109] !== nt || t[110] !== ot || t[111] !== it ? (yt = /* @__PURE__ */ p.jsxs("g", { transform: ht, children: [
|
|
578
|
-
tt,
|
|
579
|
-
nt,
|
|
580
|
-
ot,
|
|
581
|
-
it,
|
|
582
|
-
pt,
|
|
583
|
-
mt
|
|
584
|
-
] }), t[105] = pt, t[106] = mt, t[107] = ht, t[108] = tt, t[109] = nt, t[110] = ot, t[111] = it, t[112] = yt) : yt = t[112];
|
|
572
|
+
at = t[46], ut = t[47], ct = t[48], tt = t[49], ft = t[50], it = t[51], F = t[52], X = t[53], ht = t[54], gt = t[55], et = t[56], dt = t[57], pt = t[58], mt = t[59], O = t[60], yt = t[61];
|
|
573
|
+
let rt;
|
|
574
|
+
t[103] !== at || t[104] !== ht ? (rt = /* @__PURE__ */ p.jsx("g", { children: /* @__PURE__ */ p.jsx(at, { children: ht }) }), t[103] = at, t[104] = ht, t[105] = rt) : rt = t[105];
|
|
575
|
+
let st;
|
|
576
|
+
t[106] !== a ? (st = a.filter(en).map(tn), t[106] = a, t[107] = st) : st = t[107];
|
|
585
577
|
let xt;
|
|
586
|
-
t[
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
|
|
578
|
+
t[108] !== rt || t[109] !== st || t[110] !== gt || t[111] !== et || t[112] !== dt || t[113] !== pt || t[114] !== mt ? (xt = /* @__PURE__ */ p.jsxs("g", { transform: gt, children: [
|
|
579
|
+
et,
|
|
580
|
+
dt,
|
|
581
|
+
pt,
|
|
582
|
+
mt,
|
|
583
|
+
rt,
|
|
584
|
+
st
|
|
585
|
+
] }), t[108] = rt, t[109] = st, t[110] = gt, t[111] = et, t[112] = dt, t[113] = pt, t[114] = mt, t[115] = xt) : xt = t[115];
|
|
586
|
+
let Y;
|
|
587
|
+
t[116] !== ut || t[117] !== ct || t[118] !== tt || t[119] !== ft || t[120] !== it || t[121] !== F || t[122] !== X || t[123] !== xt || t[124] !== O || t[125] !== yt ? (Y = /* @__PURE__ */ p.jsxs(ut, { width: O, height: yt, viewBox: ct, style: tt, direction: ft, ref: it, children: [
|
|
588
|
+
F,
|
|
589
|
+
X,
|
|
590
|
+
xt
|
|
591
|
+
] }), t[116] = ut, t[117] = ct, t[118] = tt, t[119] = ft, t[120] = it, t[121] = F, t[122] = X, t[123] = xt, t[124] = O, t[125] = yt, t[126] = Y) : Y = t[126];
|
|
592
|
+
let Mt;
|
|
593
|
+
t[127] !== k?.tooltip || t[128] !== M || t[129] !== Vt || t[130] !== q || t[131] !== C?.tooltip || t[132] !== L ? (Mt = q && L && M && Vt ? /* @__PURE__ */ p.jsx(Me, { data: q, body: L, xPos: M, yPos: Vt, backgroundStyle: C?.tooltip, className: k?.tooltip }) : null, t[127] = k?.tooltip, t[128] = M, t[129] = Vt, t[130] = q, t[131] = C?.tooltip, t[132] = L, t[133] = Mt) : Mt = t[133];
|
|
594
|
+
let lt;
|
|
595
|
+
t[134] !== k?.modal || t[135] !== J || t[136] !== z ? (lt = J && z !== void 0 ? /* @__PURE__ */ p.jsx(Oe, { body: J, data: z, setData: K, className: k?.modal }) : null, t[134] = k?.modal, t[135] = J, t[136] = z, t[137] = lt) : lt = t[137];
|
|
596
|
+
let Dt;
|
|
597
|
+
return t[138] !== Y || t[139] !== Mt || t[140] !== lt ? (Dt = /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
598
|
+
Y,
|
|
599
|
+
Mt,
|
|
600
|
+
lt
|
|
601
|
+
] }), t[138] = Y, t[139] = Mt, t[140] = lt, t[141] = Dt) : Dt = t[141], Dt;
|
|
602
|
+
}
|
|
603
|
+
function tn(e) {
|
|
603
604
|
return e.layer;
|
|
604
605
|
}
|
|
605
|
-
function
|
|
606
|
+
function en(e) {
|
|
606
607
|
return e.position === "after";
|
|
607
608
|
}
|
|
608
|
-
function
|
|
609
|
+
function nn(e) {
|
|
609
610
|
return e.type === "target";
|
|
610
611
|
}
|
|
611
|
-
function
|
|
612
|
+
function on(e) {
|
|
612
613
|
return e.type === "source";
|
|
613
614
|
}
|
|
614
|
-
function
|
|
615
|
+
function rn(e) {
|
|
615
616
|
return e.layer;
|
|
616
617
|
}
|
|
617
|
-
function
|
|
618
|
+
function sn(e) {
|
|
618
619
|
return e.position === "before";
|
|
619
620
|
}
|
|
620
|
-
function
|
|
621
|
+
function ln(e, t) {
|
|
621
622
|
return (e.value || 0) - (t.value || 0);
|
|
622
623
|
}
|
|
623
|
-
function
|
|
624
|
+
function an(e, t) {
|
|
624
625
|
return (t.value || 0) - (e.value || 0);
|
|
625
626
|
}
|
|
626
|
-
function
|
|
627
|
-
const t =
|
|
627
|
+
function Bn(e) {
|
|
628
|
+
const t = ke.c(96), {
|
|
628
629
|
data: o,
|
|
629
630
|
graphTitle: s,
|
|
630
|
-
sources:
|
|
631
|
+
sources: l,
|
|
631
632
|
graphDescription: m,
|
|
632
633
|
showLabels: h,
|
|
633
634
|
leftMargin: g,
|
|
634
635
|
rightMargin: x,
|
|
635
|
-
topMargin:
|
|
636
|
-
bottomMargin:
|
|
637
|
-
truncateBy:
|
|
636
|
+
topMargin: w,
|
|
637
|
+
bottomMargin: j,
|
|
638
|
+
truncateBy: L,
|
|
638
639
|
height: P,
|
|
639
640
|
width: v,
|
|
640
641
|
footNote: d,
|
|
641
642
|
padding: S,
|
|
642
|
-
backgroundColor:
|
|
643
|
-
tooltip:
|
|
644
|
-
onSeriesMouseOver:
|
|
645
|
-
|
|
646
|
-
prefix: A,
|
|
647
|
-
relativeHeight: X,
|
|
643
|
+
backgroundColor: Z,
|
|
644
|
+
tooltip: $,
|
|
645
|
+
onSeriesMouseOver: D,
|
|
646
|
+
relativeHeight: E,
|
|
648
647
|
showValues: W,
|
|
649
|
-
graphID:
|
|
648
|
+
graphID: U,
|
|
650
649
|
onSeriesMouseClick: R,
|
|
651
|
-
graphDownload:
|
|
652
|
-
dataDownload:
|
|
653
|
-
fillContainer:
|
|
654
|
-
language:
|
|
655
|
-
minHeight:
|
|
656
|
-
theme:
|
|
657
|
-
ariaLabel:
|
|
658
|
-
sourceColors:
|
|
659
|
-
targetColors:
|
|
660
|
-
sourceColorDomain:
|
|
661
|
-
targetColorDomain:
|
|
662
|
-
nodePadding:
|
|
663
|
-
nodeWidth:
|
|
664
|
-
highlightedSourceDataPoints:
|
|
665
|
-
highlightedTargetDataPoints:
|
|
666
|
-
defaultLinkOpacity:
|
|
667
|
-
sourceTitle:
|
|
668
|
-
targetTitle:
|
|
669
|
-
sortNodes:
|
|
670
|
-
resetSelectionOnDoubleClick:
|
|
671
|
-
detailsOnClick:
|
|
672
|
-
styles:
|
|
673
|
-
classNames:
|
|
674
|
-
animate:
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
name: `source_${E}`,
|
|
650
|
+
graphDownload: nt,
|
|
651
|
+
dataDownload: Q,
|
|
652
|
+
fillContainer: T,
|
|
653
|
+
language: ot,
|
|
654
|
+
minHeight: kt,
|
|
655
|
+
theme: J,
|
|
656
|
+
ariaLabel: C,
|
|
657
|
+
sourceColors: k,
|
|
658
|
+
targetColors: n,
|
|
659
|
+
sourceColorDomain: a,
|
|
660
|
+
targetColorDomain: r,
|
|
661
|
+
nodePadding: u,
|
|
662
|
+
nodeWidth: i,
|
|
663
|
+
highlightedSourceDataPoints: f,
|
|
664
|
+
highlightedTargetDataPoints: y,
|
|
665
|
+
defaultLinkOpacity: q,
|
|
666
|
+
sourceTitle: I,
|
|
667
|
+
targetTitle: z,
|
|
668
|
+
sortNodes: K,
|
|
669
|
+
resetSelectionOnDoubleClick: A,
|
|
670
|
+
detailsOnClick: G,
|
|
671
|
+
styles: M,
|
|
672
|
+
classNames: V,
|
|
673
|
+
animate: Vt,
|
|
674
|
+
customLayers: Lt,
|
|
675
|
+
numberDisplayOptions: N
|
|
676
|
+
} = e, b = h === void 0 ? !0 : h, bt = g === void 0 ? 75 : g, wt = x === void 0 ? 75 : x, at = w === void 0 ? 30 : w, ut = j === void 0 ? 10 : j, ct = L === void 0 ? 999 : L, tt = Z === void 0 ? !1 : Z, ft = W === void 0 ? !0 : W, it = nt === void 0 ? !1 : nt, F = Q === void 0 ? !1 : Q, X = T === void 0 ? !0 : T, ht = ot === void 0 ? "en" : ot, gt = kt === void 0 ? 0 : kt, et = J === void 0 ? "light" : J, dt = u === void 0 ? 5 : u, pt = i === void 0 ? 5 : i, mt = q === void 0 ? 0.3 : q, O = K === void 0 ? "mostReadable" : K, yt = A === void 0 ? !0 : A, rt = Vt === void 0 ? !1 : Vt;
|
|
677
|
+
let st;
|
|
678
|
+
t[0] !== Lt ? (st = Lt === void 0 ? [] : Lt, t[0] = Lt, t[1] = st) : st = t[1];
|
|
679
|
+
const xt = st, [Y, Mt] = St(0), [lt, Dt] = St(0), [Tt, Wt] = St(void 0), zt = ie(null), Rt = ie(null);
|
|
680
|
+
let jt;
|
|
681
|
+
t[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (jt = (Nt) => {
|
|
682
|
+
Wt(Nt);
|
|
683
|
+
}, t[2] = jt) : jt = t[2];
|
|
684
|
+
const Ot = $e(jt);
|
|
685
|
+
let $t;
|
|
686
|
+
t[3] !== o || t[4] !== O || t[5] !== a || t[6] !== k || t[7] !== r || t[8] !== n || t[9] !== Ot ? ($t = () => {
|
|
687
|
+
const Nt = Ht(o, "source", !0).map((B) => ({
|
|
688
|
+
name: `source_${B}`,
|
|
691
689
|
type: "source",
|
|
692
|
-
label: `${
|
|
693
|
-
color: typeof
|
|
694
|
-
totalValue:
|
|
695
|
-
})),
|
|
696
|
-
name: `target_${
|
|
690
|
+
label: `${B}`,
|
|
691
|
+
color: typeof k == "string" || !k ? k || ge.graphMainColor : k[(a || Ht(o, "source", !0)).findIndex((H) => `${H}` == `${B}`) > k.length ? k.length - 1 : (a || Ht(o, "source", !0)).findIndex((H) => `${H}` == `${B}`)],
|
|
692
|
+
totalValue: ce(o.filter((H) => `${H.source}` == `${B}`).map(yn))
|
|
693
|
+
})), Zt = O === "asc" || O === "desc" ? fe(Nt, ["totalValue"], [O]) : Nt, ae = Ht(o, "target", !0).map((B) => ({
|
|
694
|
+
name: `target_${B}`,
|
|
697
695
|
type: "target",
|
|
698
|
-
label: `${
|
|
699
|
-
color: typeof
|
|
700
|
-
totalValue:
|
|
701
|
-
})),
|
|
702
|
-
|
|
703
|
-
nodes:
|
|
704
|
-
links: o.map((
|
|
705
|
-
source:
|
|
706
|
-
target:
|
|
707
|
-
value:
|
|
696
|
+
label: `${B}`,
|
|
697
|
+
color: typeof n == "string" || !n ? n || ge.graphMainColor : n[(r || Ht(o, "target", !0)).findIndex((H) => `${H}` == `${B}`) > n.length ? n.length - 1 : (r || Ht(o, "target", !0)).findIndex((H) => `${H}` == `${B}`)],
|
|
698
|
+
totalValue: ce(o.filter((H) => `${H.target}` == `${B}`).map(mn))
|
|
699
|
+
})), je = O === "asc" || O === "desc" ? fe(ae, ["totalValue"], [O]) : ae, Jt = [...Zt, ...je];
|
|
700
|
+
Ot({
|
|
701
|
+
nodes: Jt,
|
|
702
|
+
links: o.map((B) => ({
|
|
703
|
+
source: Jt.findIndex((H) => H.name === `source_${B.source}`),
|
|
704
|
+
target: Jt.findIndex((H) => H.name === `target_${B.target}`),
|
|
705
|
+
value: B.value,
|
|
708
706
|
data: {
|
|
709
|
-
...
|
|
707
|
+
...B
|
|
710
708
|
}
|
|
711
709
|
}))
|
|
712
710
|
});
|
|
713
|
-
}, t[3] = o, t[4] = O, t[5] =
|
|
714
|
-
let
|
|
715
|
-
t[11] !== o || t[12] !== O || t[13] !==
|
|
716
|
-
let
|
|
717
|
-
t[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
718
|
-
const
|
|
719
|
-
|
|
711
|
+
}, t[3] = o, t[4] = O, t[5] = a, t[6] = k, t[7] = r, t[8] = n, t[9] = Ot, t[10] = $t) : $t = t[10];
|
|
712
|
+
let c;
|
|
713
|
+
t[11] !== o || t[12] !== O || t[13] !== a || t[14] !== k || t[15] !== r || t[16] !== n ? (c = [o, O, a, k, r, n], t[11] = o, t[12] = O, t[13] = a, t[14] = k, t[15] = r, t[16] = n, t[17] = c) : c = t[17], ue($t, c);
|
|
714
|
+
let _, vt;
|
|
715
|
+
t[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = () => {
|
|
716
|
+
const Nt = new ResizeObserver((Zt) => {
|
|
717
|
+
Mt(Zt[0].target.clientWidth || 620), Dt(Zt[0].target.clientHeight || 480);
|
|
720
718
|
});
|
|
721
|
-
return
|
|
722
|
-
},
|
|
723
|
-
const
|
|
724
|
-
let
|
|
725
|
-
t[20] !==
|
|
726
|
-
title: V?.title,
|
|
727
|
-
description: V?.description
|
|
728
|
-
}, classNames: {
|
|
719
|
+
return zt.current && Nt.observe(zt.current), () => Nt.disconnect();
|
|
720
|
+
}, vt = [], t[18] = _, t[19] = vt) : (_ = t[18], vt = t[19]), ue(_, vt);
|
|
721
|
+
const _t = V?.graphContainer, Ut = M?.graphContainer, Qt = X ? void 0 : v;
|
|
722
|
+
let Pt;
|
|
723
|
+
t[20] !== V?.description || t[21] !== V?.title || t[22] !== o || t[23] !== F || t[24] !== m || t[25] !== it || t[26] !== s || t[27] !== M?.description || t[28] !== M?.title || t[29] !== v ? (Pt = s || m || it || F ? /* @__PURE__ */ p.jsx(Ne, { styles: {
|
|
729
724
|
title: M?.title,
|
|
730
725
|
description: M?.description
|
|
731
|
-
},
|
|
732
|
-
|
|
733
|
-
|
|
726
|
+
}, classNames: {
|
|
727
|
+
title: V?.title,
|
|
728
|
+
description: V?.description
|
|
729
|
+
}, graphTitle: s, graphDescription: m, width: v, graphDownload: it ? Rt : void 0, dataDownload: F ? o.map(pn).filter(dn).length > 0 ? o.map(gn).filter(hn) : o.filter(fn) : null }) : null, t[20] = V?.description, t[21] = V?.title, t[22] = o, t[23] = F, t[24] = m, t[25] = it, t[26] = s, t[27] = M?.description, t[28] = M?.title, t[29] = v, t[30] = Pt) : Pt = t[30];
|
|
734
730
|
let Et;
|
|
735
|
-
t[
|
|
731
|
+
t[31] !== o.length ? (Et = o.length === 0 && /* @__PURE__ */ p.jsx(Te, {}), t[31] = o.length, t[32] = Et) : Et = t[32];
|
|
732
|
+
let Bt;
|
|
733
|
+
t[33] !== rt || t[34] !== ut || t[35] !== V || t[36] !== xt || t[37] !== o.length || t[38] !== mt || t[39] !== G || t[40] !== X || t[41] !== f || t[42] !== y || t[43] !== bt || t[44] !== dt || t[45] !== pt || t[46] !== N?.locale || t[47] !== N?.padZeros || t[48] !== N?.precision || t[49] !== N?.prefix || t[50] !== N?.suffix || t[51] !== R || t[52] !== D || t[53] !== yt || t[54] !== wt || t[55] !== Tt || t[56] !== b || t[57] !== ft || t[58] !== O || t[59] !== I || t[60] !== M || t[61] !== lt || t[62] !== Y || t[63] !== z || t[64] !== $ || t[65] !== at || t[66] !== ct || t[67] !== v ? (Bt = Y && lt && Tt && o.length > 0 ? /* @__PURE__ */ p.jsx(Ke, { data: Tt, nodePadding: dt, nodeWidth: pt, width: X || !v || Y < v ? Y : v, height: lt, showLabels: b, leftMargin: bt, rightMargin: wt, topMargin: at, bottomMargin: ut, truncateBy: ct, tooltip: $, onSeriesMouseOver: D, showValues: ft, onSeriesMouseClick: R, id: De(8), highlightedSourceDataPoints: f?.map(cn), highlightedTargetDataPoints: y?.map(un), defaultLinkOpacity: mt, sourceTitle: I, targetTitle: z, sortNodes: O, resetSelectionOnDoubleClick: yt, styles: M, classNames: V, detailsOnClick: G, animate: rt === !0 ? {
|
|
736
734
|
duration: 0.5,
|
|
737
735
|
once: !0,
|
|
738
736
|
amount: 0.5
|
|
739
|
-
} :
|
|
737
|
+
} : rt || {
|
|
740
738
|
duration: 0,
|
|
741
739
|
once: !0,
|
|
742
740
|
amount: 0
|
|
743
|
-
},
|
|
744
|
-
let Bt;
|
|
745
|
-
t[68] !== Pt || t[69] !== Et ? (Bt = /* @__PURE__ */ p.jsxs(We, { ref: Kt, children: [
|
|
746
|
-
Pt,
|
|
747
|
-
Et
|
|
748
|
-
] }), t[68] = Pt, t[69] = Et, t[70] = Bt) : Bt = t[70];
|
|
741
|
+
}, customLayers: xt, locale: N?.locale || "en", padZeros: N?.padZeros || !1, suffix: N?.suffix || "", prefix: N?.prefix || "", precision: N?.precision ?? 2 }) : null, t[33] = rt, t[34] = ut, t[35] = V, t[36] = xt, t[37] = o.length, t[38] = mt, t[39] = G, t[40] = X, t[41] = f, t[42] = y, t[43] = bt, t[44] = dt, t[45] = pt, t[46] = N?.locale, t[47] = N?.padZeros, t[48] = N?.precision, t[49] = N?.prefix, t[50] = N?.suffix, t[51] = R, t[52] = D, t[53] = yt, t[54] = wt, t[55] = Tt, t[56] = b, t[57] = ft, t[58] = O, t[59] = I, t[60] = M, t[61] = lt, t[62] = Y, t[63] = z, t[64] = $, t[65] = at, t[66] = ct, t[67] = v, t[68] = Bt) : Bt = t[68];
|
|
749
742
|
let It;
|
|
750
|
-
t[
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
},
|
|
743
|
+
t[69] !== Et || t[70] !== Bt ? (It = /* @__PURE__ */ p.jsxs(ze, { ref: zt, children: [
|
|
744
|
+
Et,
|
|
745
|
+
Bt
|
|
746
|
+
] }), t[69] = Et, t[70] = Bt, t[71] = It) : It = t[71];
|
|
747
|
+
let At;
|
|
748
|
+
t[72] !== V?.footnote || t[73] !== V?.source || t[74] !== d || t[75] !== l || t[76] !== M?.footnote || t[77] !== M?.source || t[78] !== v ? (At = l || d ? /* @__PURE__ */ p.jsx(Ce, { styles: {
|
|
754
749
|
footnote: M?.footnote,
|
|
755
750
|
source: M?.source
|
|
756
|
-
},
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
751
|
+
}, classNames: {
|
|
752
|
+
footnote: V?.footnote,
|
|
753
|
+
source: V?.source
|
|
754
|
+
}, sources: l, footNote: d, width: v }) : null, t[72] = V?.footnote, t[73] = V?.source, t[74] = d, t[75] = l, t[76] = M?.footnote, t[77] = M?.source, t[78] = v, t[79] = At) : At = t[79];
|
|
755
|
+
let Gt;
|
|
756
|
+
return t[80] !== C || t[81] !== tt || t[82] !== U || t[83] !== P || t[84] !== ht || t[85] !== gt || t[86] !== S || t[87] !== E || t[88] !== _t || t[89] !== Ut || t[90] !== Qt || t[91] !== Pt || t[92] !== It || t[93] !== At || t[94] !== et ? (Gt = /* @__PURE__ */ p.jsxs(Pe, { className: _t, style: Ut, id: U, ref: Rt, "aria-label": C, backgroundColor: tt, theme: et, language: ht, minHeight: gt, width: Qt, height: P, relativeHeight: E, padding: S, children: [
|
|
757
|
+
Pt,
|
|
758
|
+
It,
|
|
759
|
+
At
|
|
760
|
+
] }), t[80] = C, t[81] = tt, t[82] = U, t[83] = P, t[84] = ht, t[85] = gt, t[86] = S, t[87] = E, t[88] = _t, t[89] = Ut, t[90] = Qt, t[91] = Pt, t[92] = It, t[93] = At, t[94] = et, t[95] = Gt) : Gt = t[95], Gt;
|
|
763
761
|
}
|
|
764
|
-
function
|
|
762
|
+
function un(e) {
|
|
765
763
|
return `${e}`;
|
|
766
764
|
}
|
|
767
|
-
function
|
|
765
|
+
function cn(e) {
|
|
768
766
|
return `${e}`;
|
|
769
767
|
}
|
|
770
|
-
function
|
|
768
|
+
function fn(e) {
|
|
771
769
|
return e !== void 0;
|
|
772
770
|
}
|
|
773
|
-
function
|
|
771
|
+
function hn(e) {
|
|
774
772
|
return e !== void 0;
|
|
775
773
|
}
|
|
776
|
-
function
|
|
774
|
+
function gn(e) {
|
|
777
775
|
return e.data;
|
|
778
776
|
}
|
|
779
|
-
function
|
|
777
|
+
function dn(e) {
|
|
780
778
|
return e !== void 0;
|
|
781
779
|
}
|
|
782
|
-
function
|
|
780
|
+
function pn(e) {
|
|
783
781
|
return e.data;
|
|
784
782
|
}
|
|
785
|
-
function
|
|
783
|
+
function mn(e) {
|
|
786
784
|
return e.value;
|
|
787
785
|
}
|
|
788
|
-
function
|
|
786
|
+
function yn(e) {
|
|
789
787
|
return e.value;
|
|
790
788
|
}
|
|
791
789
|
export {
|
|
792
|
-
|
|
790
|
+
Bn as SankeyChart
|
|
793
791
|
};
|
|
794
792
|
//# sourceMappingURL=SankeyChart.js.map
|