@orbcharts/plugins-basic 3.0.0-beta.1 → 3.0.0-beta.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.
Files changed (181) hide show
  1. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBars.d.ts +2 -2
  2. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBarsTriangle.d.ts +2 -2
  3. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseDots.d.ts +2 -2
  4. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseGroupAxis.d.ts +2 -2
  5. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLegend.d.ts +1 -1
  6. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLineAreas.d.ts +3 -3
  7. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLines.d.ts +3 -3
  8. package/dist/{src/base/BaseBarStack.d.ts → orbcharts-plugins-basic/src/base/BaseStackedBar.d.ts} +6 -6
  9. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseValueAxis.d.ts +3 -2
  10. package/dist/{src → orbcharts-plugins-basic/src}/grid/defaults.d.ts +4 -4
  11. package/dist/{src → orbcharts-plugins-basic/src}/grid/gridObservables.d.ts +5 -5
  12. package/dist/{src → orbcharts-plugins-basic/src}/grid/index.d.ts +2 -2
  13. package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedBar.d.ts +1 -0
  14. package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedValueAxis.d.ts +1 -0
  15. package/dist/orbcharts-plugins-basic/src/index.d.ts +7 -0
  16. package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/defaults.d.ts +4 -4
  17. package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/index.d.ts +3 -3
  18. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedBar.d.ts +1 -0
  19. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedValueAxis.d.ts +1 -0
  20. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/OverlappingStackedValueAxes.d.ts +1 -0
  21. package/dist/orbcharts-plugins-basic/src/multiValue/defaults.d.ts +9 -0
  22. package/dist/orbcharts-plugins-basic/src/multiValue/index.d.ts +8 -0
  23. package/dist/orbcharts-plugins-basic/src/multiValue/multiValueObservables.d.ts +33 -0
  24. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/MultiValueLegend.d.ts +1 -0
  25. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/MultiValueTooltip.d.ts +1 -0
  26. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/Scatter.d.ts +3 -0
  27. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/ScatterBubbles.d.ts +3 -0
  28. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYAux.d.ts +3 -0
  29. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYAxes.d.ts +3 -0
  30. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYZoom.d.ts +1 -0
  31. package/dist/orbcharts-plugins-basic/src/relationship/defaults.d.ts +6 -0
  32. package/dist/orbcharts-plugins-basic/src/relationship/index.d.ts +5 -0
  33. package/dist/orbcharts-plugins-basic/src/relationship/plugins/ForceDirected.d.ts +3 -0
  34. package/dist/orbcharts-plugins-basic/src/relationship/plugins/ForceDirectedBubbles.d.ts +3 -0
  35. package/dist/orbcharts-plugins-basic/src/relationship/plugins/RelationshipLegend.d.ts +1 -0
  36. package/dist/orbcharts-plugins-basic/src/relationship/plugins/RelationshipTooltip.d.ts +1 -0
  37. package/dist/orbcharts-plugins-basic/src/relationship/relationshipObservables.d.ts +1 -0
  38. package/dist/{src → orbcharts-plugins-basic/src}/series/seriesObservables.d.ts +3 -3
  39. package/dist/{src → orbcharts-plugins-basic/src}/utils/commonUtils.d.ts +1 -1
  40. package/dist/{src → orbcharts-plugins-basic/src}/utils/d3Utils.d.ts +2 -2
  41. package/dist/{src → orbcharts-plugins-basic/src}/utils/observables.d.ts +1 -1
  42. package/dist/{src → orbcharts-plugins-basic/src}/utils/orbchartsUtils.d.ts +3 -3
  43. package/dist/orbcharts-plugins-basic.es.js +13327 -10361
  44. package/dist/orbcharts-plugins-basic.umd.js +99 -49
  45. package/dist/src/index.d.ts +1 -5
  46. package/package.json +4 -4
  47. package/src/base/BaseBars.ts +5 -5
  48. package/src/base/BaseBarsTriangle.ts +6 -4
  49. package/src/base/BaseDots.ts +3 -54
  50. package/src/base/BaseGroupAxis.ts +50 -50
  51. package/src/base/BaseLegend.ts +25 -21
  52. package/src/base/BaseLineAreas.ts +4 -4
  53. package/src/base/BaseLines.ts +3 -3
  54. package/src/base/{BaseBarStack.ts → BaseStackedBar.ts} +22 -20
  55. package/src/base/BaseTooltip.ts +5 -2
  56. package/src/base/BaseValueAxis.ts +84 -81
  57. package/src/grid/defaults.ts +15 -13
  58. package/src/grid/gridObservables.ts +56 -47
  59. package/src/grid/index.ts +2 -2
  60. package/src/grid/plugins/GridLegend.ts +2 -2
  61. package/src/grid/plugins/GridZoom.ts +20 -20
  62. package/src/grid/plugins/GroupAux.ts +216 -211
  63. package/src/grid/plugins/{BarStack.ts → StackedBar.ts} +7 -7
  64. package/src/grid/plugins/{ValueStackAxis.ts → StackedValueAxis.ts} +6 -5
  65. package/src/grid/plugins/ValueAxis.ts +1 -0
  66. package/src/index.ts +2 -5
  67. package/src/multiGrid/defaults.ts +11 -11
  68. package/src/multiGrid/index.ts +3 -3
  69. package/src/multiGrid/plugins/MultiBars.ts +1 -1
  70. package/src/multiGrid/plugins/MultiBarsTriangle.ts +1 -1
  71. package/src/multiGrid/plugins/MultiGridLegend.ts +2 -2
  72. package/src/multiGrid/plugins/MultiGroupAxis.ts +1 -1
  73. package/src/multiGrid/plugins/{MultiBarStack.ts → MultiStackedBar.ts} +8 -8
  74. package/src/multiGrid/plugins/{MultiValueStackAxis.ts → MultiStackedValueAxis.ts} +4 -3
  75. package/src/multiGrid/plugins/MultiValueAxis.ts +2 -1
  76. package/src/multiGrid/plugins/{OverlappingValueStackAxes.ts → OverlappingStackedValueAxes.ts} +9 -8
  77. package/src/multiGrid/plugins/OverlappingValueAxes.ts +4 -3
  78. package/src/multiValue/defaults.ts +167 -0
  79. package/src/multiValue/index.ts +9 -0
  80. package/src/multiValue/multiValueObservables.ts +297 -0
  81. package/src/multiValue/plugins/MultiValueLegend.ts +107 -0
  82. package/src/multiValue/plugins/MultiValueTooltip.ts +66 -0
  83. package/src/multiValue/plugins/Scatter.ts +426 -0
  84. package/src/multiValue/plugins/ScatterBubbles.ts +554 -0
  85. package/src/multiValue/plugins/XYAux.ts +682 -0
  86. package/src/multiValue/plugins/XYAxes.ts +685 -0
  87. package/src/multiValue/plugins/XYZoom.ts +300 -0
  88. package/src/noneData/plugins/Container.ts +23 -23
  89. package/src/noneData/plugins/Tooltip.ts +365 -365
  90. package/src/relationship/defaults.ts +197 -0
  91. package/src/relationship/index.ts +5 -0
  92. package/src/relationship/plugins/ForceDirected.ts +1169 -0
  93. package/src/relationship/plugins/ForceDirectedBubbles.ts +1394 -0
  94. package/src/relationship/plugins/RelationshipLegend.ts +100 -0
  95. package/src/relationship/plugins/RelationshipTooltip.ts +66 -0
  96. package/src/relationship/relationshipObservables.ts +50 -0
  97. package/src/series/defaults.ts +13 -12
  98. package/src/series/plugins/Bubbles.ts +22 -22
  99. package/src/series/plugins/Pie.ts +2 -2
  100. package/src/series/plugins/PieEventTexts.ts +22 -21
  101. package/src/series/plugins/PieLabels.ts +2 -2
  102. package/src/series/plugins/Rose.ts +2 -2
  103. package/src/series/plugins/RoseLabels.ts +2 -2
  104. package/src/series/plugins/SeriesLegend.ts +4 -4
  105. package/src/series/seriesObservables.ts +3 -3
  106. package/src/tree/defaults.ts +3 -3
  107. package/src/tree/plugins/TreeLegend.ts +3 -10
  108. package/src/utils/commonUtils.ts +5 -5
  109. package/src/utils/d3Utils.ts +4 -3
  110. package/src/utils/observables.ts +2 -2
  111. package/src/utils/orbchartsUtils.ts +28 -12
  112. package/dist/src/grid/plugins/BarStack.d.ts +0 -1
  113. package/dist/src/grid/plugins/ValueStackAxis.d.ts +0 -1
  114. package/dist/src/multiGrid/plugins/MultiBarStack.d.ts +0 -1
  115. package/dist/src/multiGrid/plugins/MultiValueStackAxis.d.ts +0 -1
  116. package/dist/src/multiGrid/plugins/OverlappingValueStackAxes.d.ts +0 -1
  117. package/dist/src/multiValue/plugins/Scatter.d.ts +0 -0
  118. package/dist/src/multiValue/plugins/ScatterAxes.d.ts +0 -0
  119. package/dist/src/noneData/plugins/Container.d.ts +0 -1
  120. package/dist/src/noneData/plugins/Tooltip.d.ts +0 -3
  121. package/dist/src/relationship/index.d.ts +0 -0
  122. package/dist/src/relationship/plugins/Relationship.d.ts +0 -0
  123. package/src/base/BaseGroupArea.ts +0 -0
  124. package/src/multiValue/plugins/ScatterAxes.ts +0 -0
  125. package/src/relationship/plugins/Relationship.ts +0 -0
  126. /package/dist/{lib → orbcharts-plugins-basic/lib}/core-types.d.ts +0 -0
  127. /package/dist/{lib → orbcharts-plugins-basic/lib}/core.d.ts +0 -0
  128. /package/dist/{lib → orbcharts-plugins-basic/lib}/plugins-basic-types.d.ts +0 -0
  129. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseTooltip.d.ts +0 -0
  130. /package/dist/{src → orbcharts-plugins-basic/src}/base/types.d.ts +0 -0
  131. /package/dist/{src → orbcharts-plugins-basic/src}/const.d.ts +0 -0
  132. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Bars.d.ts +0 -0
  133. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarsPN.d.ts +0 -0
  134. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarsTriangle.d.ts +0 -0
  135. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Dots.d.ts +0 -0
  136. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GridLegend.d.ts +0 -0
  137. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GridTooltip.d.ts +0 -0
  138. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GridZoom.d.ts +0 -0
  139. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GroupAux.d.ts +0 -0
  140. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GroupAxis.d.ts +0 -0
  141. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/LineAreas.d.ts +0 -0
  142. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Lines.d.ts +0 -0
  143. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/ValueAxis.d.ts +0 -0
  144. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/multiGridObservables.d.ts +0 -0
  145. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBars.d.ts +0 -0
  146. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBarsTriangle.d.ts +0 -0
  147. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiDots.d.ts +0 -0
  148. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGridLegend.d.ts +0 -0
  149. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGridTooltip.d.ts +0 -0
  150. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGroupAxis.d.ts +0 -0
  151. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiLineAreas.d.ts +0 -0
  152. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiLines.d.ts +0 -0
  153. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiValueAxis.d.ts +0 -0
  154. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/OverlappingValueAxes.d.ts +0 -0
  155. /package/dist/{src/grid → orbcharts-plugins-basic/src/multiValue}/plugins/Ranking.d.ts +0 -0
  156. /package/dist/{src/grid → orbcharts-plugins-basic/src/multiValue}/plugins/RankingAxis.d.ts +0 -0
  157. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/defaults.d.ts +0 -0
  158. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/index.d.ts +0 -0
  159. /package/dist/{src/base/BaseGroupArea.d.ts → orbcharts-plugins-basic/src/noneData/plugins/Container.d.ts} +0 -0
  160. /package/dist/{src/multiValue/index.d.ts → orbcharts-plugins-basic/src/noneData/plugins/Tooltip.d.ts} +0 -0
  161. /package/dist/{src → orbcharts-plugins-basic/src}/series/defaults.d.ts +0 -0
  162. /package/dist/{src → orbcharts-plugins-basic/src}/series/index.d.ts +0 -0
  163. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Bubbles.d.ts +0 -0
  164. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Pie.d.ts +0 -0
  165. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/PieEventTexts.d.ts +0 -0
  166. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/PieLabels.d.ts +0 -0
  167. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Rose.d.ts +0 -0
  168. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/RoseLabels.d.ts +0 -0
  169. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/SeriesLegend.d.ts +0 -0
  170. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/SeriesTooltip.d.ts +0 -0
  171. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Waffle.d.ts +0 -0
  172. /package/dist/{src → orbcharts-plugins-basic/src}/series/seriesUtils.d.ts +0 -0
  173. /package/dist/{src → orbcharts-plugins-basic/src}/tree/defaults.d.ts +0 -0
  174. /package/dist/{src → orbcharts-plugins-basic/src}/tree/index.d.ts +0 -0
  175. /package/dist/{src → orbcharts-plugins-basic/src}/tree/plugins/TreeLegend.d.ts +0 -0
  176. /package/dist/{src → orbcharts-plugins-basic/src}/tree/plugins/TreeMap.d.ts +0 -0
  177. /package/dist/{src → orbcharts-plugins-basic/src}/tree/plugins/TreeTooltip.d.ts +0 -0
  178. /package/dist/{src → orbcharts-plugins-basic/src}/utils/d3Graphics.d.ts +0 -0
  179. /package/dist/{vite.config.d.ts → orbcharts-plugins-basic/vite.config.d.ts} +0 -0
  180. /package/src/{grid → multiValue}/plugins/Ranking.ts +0 -0
  181. /package/src/{grid → multiValue}/plugins/RankingAxis.ts +0 -0
@@ -1,11 +1,11 @@
1
- (function(Z,fn){typeof exports=="object"&&typeof module<"u"?fn(exports):typeof define=="function"&&define.amd?define(["exports"],fn):(Z=typeof globalThis<"u"?globalThis:Z||self,fn(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";function fn(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function V2(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}const yp={lineCurve:"curveLinear",lineWidth:2},bp={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},xp={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Wu={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:20,labelRotate:0};Wu.labelTextFormat.toString=()=>"text => text";const Xo={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},q2={...Xo},vp={barWidth:0,barGroupPadding:10,barRadius:!1},_p={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Hu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"};Hu.tickFormat.toString=()=>"text => text";const Xu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},$p={...Xu},wp={},Sp={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},ju={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e})=>{const n=e.textSizePx*.7,r=e.textSizePx/2-n/2,i=`<g><text dominant-baseline="hanging" font-size="${e.textSizePx}">${t.groupLabel}</text></g>`,o=t.groups.reduce((l,c)=>{const f=`${c.seriesLabel}${c.value}`;return f.length>l.length?f:l},""),s=fn(o,e.textSizePx)+e.textSizePx*2,u=t.groups.map((l,c)=>{const f=c*e.textSizePx*1.5,h=l.id===(t.datum&&t.datum.id);return`<g transform="translate(0, ${e.textSizePx*2})">
2
- <rect width="${n}" height="${n}" x="${r}" y="${f+r}" rx="${n/2}" fill="${l.color}"></rect>
3
- <text x="${e.textSizePx*1.5}" y="${f}" font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
4
- <tspan font-weight="${h?"bold":""}">${l.seriesLabel}</tspan>
5
- <tspan font-weight="bold" text-anchor="end" x="${s}">${l.value}</tspan>
1
+ (function(H,Dr){typeof exports=="object"&&typeof module<"u"?Dr(exports):typeof define=="function"&&define.amd?define(["exports"],Dr):(H=typeof globalThis<"u"?globalThis:H||self,Dr(H["orbcharts-plugins-basic"]={}))})(this,function(H){"use strict";const Dr={lineCurve:"curveLinear",lineWidth:2},td={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},ed={radius:4,fillColorType:"white",strokeColorType:"label",strokeWidth:2,onlyShowHighlighted:!1},bu={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:20,labelRotate:0};bu.labelTextFormat.toString=()=>"text => text";const ga={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},U2={...ga},nd={barWidth:0,barGroupPadding:10,barRadius:!1},rd={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},xu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"};xu.tickFormat.toString=()=>"text => text";const ma={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"};ma.tickFormat.toString=()=>"v => v";const id={...ma},od={},ad={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},vu={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e,utils:n})=>{const r=e.textSizePx*.7,i=e.textSizePx/2-r/2,o=`<g><text dominant-baseline="hanging" font-size="${e.textSizePx}">${t.groupLabel}</text></g>`,a=t.groups.reduce((c,f)=>{const h=`${f.seriesLabel}${f.value}`;return h.length>c.length?h:c},""),l=n.measureTextWidth(a,e.textSizePx)+e.textSizePx*2,u=t.groups.map((c,f)=>{const h=f*e.textSizePx*1.5,p=c.id===(t.datum&&t.datum.id);return`<g transform="translate(0, ${e.textSizePx*2})">
2
+ <rect width="${r}" height="${r}" x="${i}" y="${h+i}" rx="${r/2}" fill="${c.color}"></rect>
3
+ <text x="${e.textSizePx*1.5}" y="${h}" font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
4
+ <tspan font-weight="${p?"bold":""}">${c.seriesLabel}</tspan>
5
+ <tspan font-weight="bold" text-anchor="end" x="${l}">${c.value}</tspan>
6
6
  </text>
7
- </g>`}).join("");return`${i}
8
- ${u}`}};ju.renderFn.toString=()=>`(eventData, { styles }) => {
7
+ </g>`}).join("");return`${o}
8
+ ${u}`}};vu.renderFn.toString=()=>`(eventData, { styles, utils }) => {
9
9
  const bulletWidth = styles.textSizePx * 0.7
10
10
  const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
11
11
 
@@ -14,7 +14,7 @@ ${u}`}};ju.renderFn.toString=()=>`(eventData, { styles }) => {
14
14
  const text = \`\${group.seriesLabel}\${group.value}\`
15
15
  return text.length > acc.length ? text : acc
16
16
  }, '')
17
- const maxTextWidth = measureTextWidth(maxLengthText, styles.textSizePx)
17
+ const maxTextWidth = utils.measureTextWidth(maxLengthText, styles.textSizePx)
18
18
  const lineEndX = maxTextWidth + styles.textSizePx * 2
19
19
  const contentSvg = eventData.groups
20
20
  .map((group, i) => {
@@ -31,38 +31,38 @@ ${u}`}};ju.renderFn.toString=()=>`(eventData, { styles }) => {
31
31
  .join('')
32
32
  return \`\${titleSvg}
33
33
  \${contentSvg}\`
34
- }`;var Vu=function(t,e){return Vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Vu(t,e)};function kn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Vu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function Z2(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{l(r.next(c))}catch(f){a(f)}}function u(c){try{l(r.throw(c))}catch(f){a(f)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(t,e||[])).next())})}function Ap(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function mr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function yr(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function _i(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function br(t){return this instanceof br?(this.v=t,this):new br(t)}function K2(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,f)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,b){o.push([p,g,m,b])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{l(r[p](d))}catch(g){h(o[0][3],g)}}function l(p){p.value instanceof br?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){u("next",p)}function f(p){u("throw",p)}function h(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function Q2(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof mr=="function"?mr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function yt(t){return typeof t=="function"}function qu(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Zu=qu(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
34
+ }`;var $u=function(t,e){return $u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},$u(t,e)};function ze(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");$u(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function H2(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(f){a(f)}}function l(c){try{u(r.throw(c))}catch(f){a(f)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})}function sd(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Cr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function zn(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Mr(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Lr(t){return this instanceof Lr?(this.v=t,this):new Lr(t)}function j2(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,f)}}function s(p,d){r[p]&&(i[p]=function(m){return new Promise(function(g,y){o.push([p,m,g,y])>1||l(p,m)})},d&&(i[p]=d(i[p])))}function l(p,d){try{u(r[p](d))}catch(m){h(o[0][3],m)}}function u(p){p.value instanceof Lr?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){l("next",p)}function f(p){l("throw",p)}function h(p,d){p(d),o.shift(),o.length&&l(o[0][0],o[0][1])}}function q2(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Cr=="function"?Cr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,l){a=t[o](a),i(s,l,a.done,a.value)})}}function i(o,a,s,l){Promise.resolve(l).then(function(u){o({value:u,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function xt(t){return typeof t=="function"}function _u(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var wu=_u(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
35
35
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
36
- `):"",this.name="UnsubscriptionError",this.errors=n}});function Ku(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var jo=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=mr(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(yt(c))try{c()}catch(g){o=g instanceof Zu?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=mr(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{Mp(d)}catch(g){o=o??[],g instanceof Zu?o=_i(_i([],yr(o)),yr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Zu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Mp(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Ku(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ku(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Tp=jo.EMPTY;function Pp(t){return t instanceof jo||t&&"closed"in t&&yt(t.remove)&&yt(t.add)&&yt(t.unsubscribe)}function Mp(t){yt(t)?t():t.unsubscribe()}var Dp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Cp={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,_i([t,e],yr(n)))},clearTimeout:function(t){var e=Cp.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Lp(t){Cp.setTimeout(function(){throw t})}function Qu(){}function Vo(t){t()}var Ju=function(t){kn(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Pp(n)&&n.add(r)):r.destination=n_,r}return e.create=function(n,r,i){return new $i(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(jo),J2=Function.prototype.bind;function tl(t,e){return J2.call(t,e)}var t_=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){qo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){qo(r)}else qo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){qo(n)}},t}(),$i=function(t){kn(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(yt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Dp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&tl(n.next,s),error:n.error&&tl(n.error,s),complete:n.complete&&tl(n.complete,s)}):a=n}return o.destination=new t_(a),o}return e}(Ju);function qo(t){Lp(t)}function e_(t){throw t}var n_={closed:!0,next:Qu,error:e_,complete:Qu},el=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function xr(t){return t}function r_(t){return t.length===0?xr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var gt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=o_(e)?e:new $i(e,n,r);return Vo(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=kp(n),new n(function(i,o){var a=new $i({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[el]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return r_(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=kp(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function kp(t){var e;return(e=t??Dp.Promise)!==null&&e!==void 0?e:Promise}function i_(t){return t&&yt(t.next)&&yt(t.error)&&yt(t.complete)}function o_(t){return t&&t instanceof Ju||i_(t)&&Pp(t)}function a_(t){return yt(t==null?void 0:t.lift)}function pe(t){return function(e){if(a_(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function se(t,e,n,r,i){return new s_(t,e,n,r,i)}var s_=function(t){kn(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Ju),u_=qu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),et=function(t){kn(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Rp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new u_},e.prototype.next=function(n){var r=this;Vo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=mr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Vo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Vo(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Tp:(this.currentObservers=null,s.push(n),new jo(function(){r.currentObservers=null,Ku(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new gt;return n.source=this,n},e.create=function(n,r){return new Rp(n,r)},e}(gt),Rp=function(t){kn(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Tp},e}(et),l_=function(t){kn(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(et),Ep={now:function(){return(Ep.delegate||Date).now()},delegate:void 0},c_=function(t){kn(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Ep);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(et),Ip=new gt(function(t){return t.complete()});function f_(t){return t&&yt(t.schedule)}function nl(t){return t[t.length-1]}function h_(t){return yt(nl(t))?t.pop():void 0}function rl(t){return f_(nl(t))?t.pop():void 0}function p_(t,e){return typeof nl(t)=="number"?t.pop():e}var il=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Np(t){return yt(t==null?void 0:t.then)}function Bp(t){return yt(t[el])}function Fp(t){return Symbol.asyncIterator&&yt(t==null?void 0:t[Symbol.asyncIterator])}function Op(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function d_(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var zp=d_();function Gp(t){return yt(t==null?void 0:t[zp])}function Yp(t){return K2(this,arguments,function(){var n,r,i,o;return Ap(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,br(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,br(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,br(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Up(t){return yt(t==null?void 0:t.getReader)}function de(t){if(t instanceof gt)return t;if(t!=null){if(Bp(t))return g_(t);if(il(t))return m_(t);if(Np(t))return y_(t);if(Fp(t))return Wp(t);if(Gp(t))return b_(t);if(Up(t))return x_(t)}throw Op(t)}function g_(t){return new gt(function(e){var n=t[el]();if(yt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function m_(t){return new gt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function y_(t){return new gt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Lp)})}function b_(t){return new gt(function(e){var n,r;try{for(var i=mr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Wp(t){return new gt(function(e){v_(t,e).catch(function(n){return e.error(n)})})}function x_(t){return Wp(Yp(t))}function v_(t,e){var n,r,i,o;return Z2(this,void 0,void 0,function(){var a,s;return Ap(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=Q2(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function hn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Hp(t,e){return e===void 0&&(e=0),pe(function(n,r){n.subscribe(se(r,function(i){return hn(r,t,function(){return r.next(i)},e)},function(){return hn(r,t,function(){return r.complete()},e)},function(i){return hn(r,t,function(){return r.error(i)},e)}))})}function Xp(t,e){return e===void 0&&(e=0),pe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function __(t,e){return de(t).pipe(Xp(e),Hp(e))}function $_(t,e){return de(t).pipe(Xp(e),Hp(e))}function w_(t,e){return new gt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function S_(t,e){return new gt(function(n){var r;return hn(n,e,function(){r=t[zp](),hn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return yt(r==null?void 0:r.return)&&r.return()}})}function jp(t,e){if(!t)throw new Error("Iterable cannot be null");return new gt(function(n){hn(n,e,function(){var r=t[Symbol.asyncIterator]();hn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function A_(t,e){return jp(Yp(t),e)}function T_(t,e){if(t!=null){if(Bp(t))return __(t,e);if(il(t))return w_(t,e);if(Np(t))return $_(t,e);if(Fp(t))return jp(t,e);if(Gp(t))return S_(t,e);if(Up(t))return A_(t,e)}throw Op(t)}function Zo(t,e){return e?T_(t,e):de(t)}function Ko(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rl(t);return Zo(t,n)}var Vp=qu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function B(t,e){return pe(function(n,r){var i=0;n.subscribe(se(r,function(o){r.next(t.call(e,o,i++))}))})}var P_=Array.isArray;function M_(t,e){return P_(e)?t.apply(void 0,_i([],yr(e))):t(e)}function qp(t){return B(function(e){return M_(t,e)})}var D_=Array.isArray,C_=Object.getPrototypeOf,L_=Object.prototype,k_=Object.keys;function R_(t){if(t.length===1){var e=t[0];if(D_(e))return{args:e,keys:null};if(E_(e)){var n=k_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function E_(t){return t&&typeof t=="object"&&C_(t)===L_}function I_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function U(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rl(t),r=h_(t),i=R_(t),o=i.args,a=i.keys;if(o.length===0)return Zo([],n);var s=new gt(N_(o,n,a?function(u){return I_(a,u)}:xr));return r?s.pipe(qp(r)):s}function N_(t,e,n){return n===void 0&&(n=xr),function(r){Zp(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(c){Zp(e,function(){var f=Zo(t[c],e),h=!1;f.subscribe(se(r,function(p){o[c]=p,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},l=0;l<i;l++)u(l)},r)}}function Zp(t,e,n){t?hn(n,t,e):e()}function B_(t,e,n,r,i,o,a,s){var u=[],l=0,c=0,f=!1,h=function(){f&&!u.length&&!l&&e.complete()},p=function(g){return l<r?d(g):u.push(g)},d=function(g){l++;var m=!1;de(n(g,c++)).subscribe(se(e,function(b){e.next(b)},function(){m=!0},void 0,function(){if(m)try{l--;for(var b=function(){var y=u.shift();a||d(y)};u.length&&l<r;)b();h()}catch(y){e.error(y)}}))};return t.subscribe(se(e,p,function(){f=!0,h()})),function(){}}function ol(t,e,n){return n===void 0&&(n=1/0),yt(e)?ol(function(r,i){return B(function(o,a){return e(r,o,i,a)})(de(t(r,i)))},n):(typeof e=="number"&&(n=e),pe(function(r,i){return B_(r,i,t,n)}))}function F_(t){return t===void 0&&(t=1/0),ol(xr,t)}function O_(t){return new gt(function(e){de(t()).subscribe(e)})}var z_=["addListener","removeListener"],G_=["addEventListener","removeEventListener"],Y_=["on","off"];function al(t,e,n,r){if(yt(n)&&(r=n,n=void 0),r)return al(t,e,n).pipe(qp(r));var i=yr(H_(t)?G_.map(function(s){return function(u){return t[s](e,u,n)}}):U_(t)?z_.map(Kp(t,e)):W_(t)?Y_.map(Kp(t,e)):[],2),o=i[0],a=i[1];if(!o&&il(t))return ol(function(s){return al(s,e,n)})(de(t));if(!o)throw new TypeError("Invalid event target");return new gt(function(s){var u=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return s.next(1<l.length?l:l[0])};return o(u),function(){return a(u)}})}function Kp(t,e){return function(n){return function(r){return t[n](e,r)}}}function U_(t){return yt(t.addListener)&&yt(t.removeListener)}function W_(t){return yt(t.on)&&yt(t.off)}function H_(t){return yt(t.addEventListener)&&yt(t.removeEventListener)}function Qp(t,e,n){return O_(function(){return t()?e:n})}function sl(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rl(t),r=p_(t,1/0),i=t;return i.length?i.length===1?de(i[0]):F_(r)(Zo(i,n)):Ip}function wi(t,e){return pe(function(n,r){var i=0;n.subscribe(se(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function X_(t){return pe(function(e,n){var r=!1;e.subscribe(se(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function j_(t){return t<=0?function(){return Ip}:pe(function(e,n){var r=0;e.subscribe(se(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function tt(t,e){return e===void 0&&(e=xr),t=t??V_,pe(function(n,r){var i,o=!0;n.subscribe(se(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function V_(t,e){return t===e}function q_(t){return t===void 0&&(t=Z_),pe(function(e,n){var r=!1;e.subscribe(se(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function Z_(){return new Vp}function K_(t,e){var n=arguments.length>=2;return function(r){return r.pipe(xr,j_(1),n?X_(e):q_(function(){return new Vp}))}}function Q_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new et}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(l){var c,f,h,p=0,d=!1,g=!1,m=function(){f==null||f.unsubscribe(),f=void 0},b=function(){m(),c=h=void 0,d=g=!1},y=function(){var _=c;b(),_==null||_.unsubscribe()};return pe(function(_,x){p++,!g&&!d&&m();var w=h=h??n();x.add(function(){p--,p===0&&!g&&!d&&(f=ul(y,u))}),w.subscribe(x),!c&&p>0&&(c=new $i({next:function($){return w.next($)},error:function($){g=!0,m(),f=ul(b,i,$),w.error($)},complete:function(){d=!0,m(),f=ul(b,a),w.complete()}}),de(_).subscribe(c))})(l)}}function ul(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new $i({next:function(){i.unsubscribe(),t()}});return de(e.apply(void 0,_i([],yr(n)))).subscribe(i)}}function vt(t,e,n){var r,i=!1;return r=t,Q_({connector:function(){return new c_(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function W(t,e){return pe(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(se(r,function(u){i==null||i.unsubscribe();var l=0,c=o++;de(t(u,c)).subscribe(i=se(r,function(f){return r.next(e?e(u,f,c,l++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function N(t){return pe(function(e,n){de(t).subscribe(se(n,function(){return n.complete()},Qu)),!n.closed&&e.subscribe(n)})}const vr={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""};function _r(t){return Object.prototype.toString.call(t)==="[object Object]"}function J_(t){return Object.prototype.toString.call(t)==="[object Function]"}function ll(t,e){if(_r(t)===!1||_r(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;_r(r[a])&&_r(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}function t$(t,e){const n={string:i=>typeof i=="string",number:i=>typeof i=="number",boolean:i=>typeof i=="boolean",object:i=>_r(i),"object[]":i=>Array.isArray(i)&&i.every(o=>_r(o)),"string[]":i=>Array.isArray(i)&&i.every(o=>typeof o=="string"),"number[]":i=>Array.isArray(i)&&i.every(o=>typeof o=="number"),Function:i=>J_(i),null:i=>i===null,undefined:i=>i===void 0},r={ColorType:i=>i==="none"||i==="series"||i==="primary"||i==="secondary"||i==="white"||i==="background"};return Object.keys(t).find(i=>{if(e[i]){const o=e[i],a=t[i];if(o.toBeTypes){if(o.toBeTypes.some(s=>n[s](a))===!1)return!0}else if(o.toBe){const{toBe:s,test:u}=o;if(u(a)===!1)return!0}else if(o.toBeOption){const s=o.toBeOption;if(r[s](a)===!1)return!0}}return!1})}function e$(t,e){const n=t$(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}function Qo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function n$(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Jp(t){let e,n,r;t.length!==2?(e=Qo,n=(s,u)=>Qo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Qo||t===n$?t:r$,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function r$(){return 0}function i$(t){return t===null?NaN:+t}const o$=Jp(Qo),td=o$.right;Jp(i$).center;const a$=Math.sqrt(50),s$=Math.sqrt(10),u$=Math.sqrt(2);function Jo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=a$?10:o>=s$?5:o>=u$?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?Jo(t,e,n*2):[s,u,l]}function l$(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Jo(e,t,n):Jo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function cl(t,e,n){return e=+e,t=+t,n=+n,Jo(t,e,n)[2]}function c$(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?cl(e,t,n):cl(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var f$={value:()=>{}};function ed(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ta(n)}function ta(t){this._=t}function h$(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ta.prototype=ed.prototype={constructor:ta,on:function(t,e){var n=this._,r=h$(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=p$(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=nd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=nd(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ta(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function p$(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function nd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=f$,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var fl="http://www.w3.org/1999/xhtml";const rd={svg:"http://www.w3.org/2000/svg",xhtml:fl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ea(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),rd.hasOwnProperty(e)?{space:rd[e],local:t}:t}function d$(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===fl&&e.documentElement.namespaceURI===fl?e.createElement(t):e.createElementNS(n,t)}}function g$(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function id(t){var e=ea(t);return(e.local?g$:d$)(e)}function m$(){}function hl(t){return t==null?m$:function(){return this.querySelector(t)}}function y$(t){typeof t!="function"&&(t=hl(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new $e(r,this._parents)}function b$(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function x$(){return[]}function od(t){return t==null?x$:function(){return this.querySelectorAll(t)}}function v$(t){return function(){return b$(t.apply(this,arguments))}}function _$(t){typeof t=="function"?t=v$(t):t=od(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new $e(r,i)}function ad(t){return function(){return this.matches(t)}}function sd(t){return function(e){return e.matches(t)}}var $$=Array.prototype.find;function w$(t){return function(){return $$.call(this.children,t)}}function S$(){return this.firstElementChild}function A$(t){return this.select(t==null?S$:w$(typeof t=="function"?t:sd(t)))}var T$=Array.prototype.filter;function P$(){return Array.from(this.children)}function M$(t){return function(){return T$.call(this.children,t)}}function D$(t){return this.selectAll(t==null?P$:M$(typeof t=="function"?t:sd(t)))}function C$(t){typeof t!="function"&&(t=ad(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new $e(r,this._parents)}function ud(t){return new Array(t.length)}function L$(){return new $e(this._enter||this._groups.map(ud),this._parents)}function na(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}na.prototype={constructor:na,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function k$(t){return function(){return t}}function R$(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new na(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function E$(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(h[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new na(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(h[s])===u&&(i[s]=u)}function I$(t){return t.__data__}function N$(t,e){if(!arguments.length)return Array.from(this,I$);var n=e?E$:R$,r=this._parents,i=this._groups;typeof t!="function"&&(t=k$(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],f=i[l],h=f.length,p=B$(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),b=u[l]=new Array(h);n(c,f,g,m,b,p,e);for(var y=0,_=0,x,w;y<d;++y)if(x=g[y]){for(y>=_&&(_=y+1);!(w=m[_])&&++_<d;);x._next=w||null}}return a=new $e(a,r),a._enter=s,a._exit=u,a}function B$(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function F$(){return new $e(this._exit||this._groups.map(ud),this._parents)}function O$(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function z$(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l=n[u],c=r[u],f=l.length,h=s[u]=new Array(f),p,d=0;d<f;++d)(p=l[d]||c[d])&&(h[d]=p);for(;u<i;++u)s[u]=n[u];return new $e(s,this._parents)}function G$(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Y$(t){t||(t=U$);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new $e(i,this._parents).order()}function U$(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function W$(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function H$(){return Array.from(this)}function X$(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function j$(){let t=0;for(const e of this)++t;return t}function V$(){return!this.node()}function q$(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Z$(t){return function(){this.removeAttribute(t)}}function K$(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Q$(t,e){return function(){this.setAttribute(t,e)}}function J$(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function tw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function ew(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function nw(t,e){var n=ea(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?K$:Z$:typeof e=="function"?n.local?ew:tw:n.local?J$:Q$)(n,e))}function ld(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function rw(t){return function(){this.style.removeProperty(t)}}function iw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ow(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function aw(t,e,n){return arguments.length>1?this.each((e==null?rw:typeof e=="function"?ow:iw)(t,e,n??"")):$r(this.node(),t)}function $r(t,e){return t.style.getPropertyValue(e)||ld(t).getComputedStyle(t,null).getPropertyValue(e)}function sw(t){return function(){delete this[t]}}function uw(t,e){return function(){this[t]=e}}function lw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function cw(t,e){return arguments.length>1?this.each((e==null?sw:typeof e=="function"?lw:uw)(t,e)):this.node()[t]}function cd(t){return t.trim().split(/^|\s+/)}function pl(t){return t.classList||new fd(t)}function fd(t){this._node=t,this._names=cd(t.getAttribute("class")||"")}fd.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function hd(t,e){for(var n=pl(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function pd(t,e){for(var n=pl(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function fw(t){return function(){hd(this,t)}}function hw(t){return function(){pd(this,t)}}function pw(t,e){return function(){(e.apply(this,arguments)?hd:pd)(this,t)}}function dw(t,e){var n=cd(t+"");if(arguments.length<2){for(var r=pl(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?pw:e?fw:hw)(n,e))}function gw(){this.textContent=""}function mw(t){return function(){this.textContent=t}}function yw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function bw(t){return arguments.length?this.each(t==null?gw:(typeof t=="function"?yw:mw)(t)):this.node().textContent}function xw(){this.innerHTML=""}function vw(t){return function(){this.innerHTML=t}}function _w(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function $w(t){return arguments.length?this.each(t==null?xw:(typeof t=="function"?_w:vw)(t)):this.node().innerHTML}function ww(){this.nextSibling&&this.parentNode.appendChild(this)}function Sw(){return this.each(ww)}function Aw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tw(){return this.each(Aw)}function Pw(t){var e=typeof t=="function"?t:id(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Mw(){return null}function Dw(t,e){var n=typeof t=="function"?t:id(t),r=e==null?Mw:typeof e=="function"?e:hl(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Cw(){var t=this.parentNode;t&&t.removeChild(this)}function Lw(){return this.each(Cw)}function kw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Rw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ew(t){return this.select(t?Rw:kw)}function Iw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Nw(t){return function(e){t.call(this,e,this.__data__)}}function Bw(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Fw(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function Ow(t,e,n){return function(){var r=this.__on,i,o=Nw(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function zw(t,e,n){var r=Bw(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?Ow:Fw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function dd(t,e,n){var r=ld(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Gw(t,e){return function(){return dd(this,t,e)}}function Yw(t,e){return function(){return dd(this,t,e.apply(this,arguments))}}function Uw(t,e){return this.each((typeof e=="function"?Yw:Gw)(t,e))}function*Ww(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Hw=[null];function $e(t,e){this._groups=t,this._parents=e}function Si(){return new $e([[document.documentElement]],Hw)}function Xw(){return this}$e.prototype=Si.prototype={constructor:$e,select:y$,selectAll:_$,selectChild:A$,selectChildren:D$,filter:C$,data:N$,enter:L$,exit:F$,join:O$,merge:z$,selection:Xw,order:G$,sort:Y$,call:W$,nodes:H$,node:X$,size:j$,empty:V$,each:q$,attr:nw,style:aw,property:cw,classed:dw,text:bw,html:$w,raise:Sw,lower:Tw,append:Pw,insert:Dw,remove:Lw,clone:Ew,datum:Iw,on:zw,dispatch:Uw,[Symbol.iterator]:Ww};function dl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function gd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ai(){}var Ti=.7,ra=1/Ti,wr="\\s*([+-]?\\d+)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jw=/^#([0-9a-f]{3,8})$/,Vw=new RegExp(`^rgb\\(${wr},${wr},${wr}\\)$`),qw=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),Zw=new RegExp(`^rgba\\(${wr},${wr},${wr},${Pi}\\)$`),Kw=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${Pi}\\)$`),Qw=new RegExp(`^hsl\\(${Pi},${Ee},${Ee}\\)$`),Jw=new RegExp(`^hsla\\(${Pi},${Ee},${Ee},${Pi}\\)$`),md={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};dl(Ai,Rn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:yd,formatHex:yd,formatHex8:tS,formatHsl:eS,formatRgb:bd,toString:bd});function yd(){return this.rgb().formatHex()}function tS(){return this.rgb().formatHex8()}function eS(){return wd(this).formatHsl()}function bd(){return this.rgb().formatRgb()}function Rn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=jw.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?xd(e):n===3?new ne(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ia(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ia(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Vw.exec(t))?new ne(e[1],e[2],e[3],1):(e=qw.exec(t))?new ne(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Zw.exec(t))?ia(e[1],e[2],e[3],e[4]):(e=Kw.exec(t))?ia(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Qw.exec(t))?$d(e[1],e[2]/100,e[3]/100,1):(e=Jw.exec(t))?$d(e[1],e[2]/100,e[3]/100,e[4]):md.hasOwnProperty(t)?xd(md[t]):t==="transparent"?new ne(NaN,NaN,NaN,0):null}function xd(t){return new ne(t>>16&255,t>>8&255,t&255,1)}function ia(t,e,n,r){return r<=0&&(t=e=n=NaN),new ne(t,e,n,r)}function nS(t){return t instanceof Ai||(t=Rn(t)),t?(t=t.rgb(),new ne(t.r,t.g,t.b,t.opacity)):new ne}function gl(t,e,n,r){return arguments.length===1?nS(t):new ne(t,e,n,r??1)}function ne(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}dl(ne,gl,gd(Ai,{brighter(t){return t=t==null?ra:Math.pow(ra,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ti:Math.pow(Ti,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ne(En(this.r),En(this.g),En(this.b),oa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vd,formatHex:vd,formatHex8:rS,formatRgb:_d,toString:_d}));function vd(){return`#${In(this.r)}${In(this.g)}${In(this.b)}`}function rS(){return`#${In(this.r)}${In(this.g)}${In(this.b)}${In((isNaN(this.opacity)?1:this.opacity)*255)}`}function _d(){const t=oa(this.opacity);return`${t===1?"rgb(":"rgba("}${En(this.r)}, ${En(this.g)}, ${En(this.b)}${t===1?")":`, ${t})`}`}function oa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function En(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function In(t){return t=En(t),(t<16?"0":"")+t.toString(16)}function $d(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new we(t,e,n,r)}function wd(t){if(t instanceof we)return new we(t.h,t.s,t.l,t.opacity);if(t instanceof Ai||(t=Rn(t)),!t)return new we;if(t instanceof we)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new we(a,s,u,t.opacity)}function iS(t,e,n,r){return arguments.length===1?wd(t):new we(t,e,n,r??1)}function we(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}dl(we,iS,gd(Ai,{brighter(t){return t=t==null?ra:Math.pow(ra,t),new we(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ti:Math.pow(Ti,t),new we(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ne(ml(t>=240?t-240:t+120,i,r),ml(t,i,r),ml(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new we(Sd(this.h),aa(this.s),aa(this.l),oa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=oa(this.opacity);return`${t===1?"hsl(":"hsla("}${Sd(this.h)}, ${aa(this.s)*100}%, ${aa(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Sd(t){return t=(t||0)%360,t<0?t+360:t}function aa(t){return Math.max(0,Math.min(1,t||0))}function ml(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const yl=t=>()=>t;function oS(t,e){return function(n){return t+n*e}}function aS(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function sS(t){return(t=+t)==1?Ad:function(e,n){return n-e?aS(e,n,t):yl(isNaN(e)?n:e)}}function Ad(t,e){var n=e-t;return n?oS(t,n):yl(isNaN(t)?e:t)}const sa=function t(e){var n=sS(e);function r(i,o){var a=n((i=gl(i)).r,(o=gl(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=Ad(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function uS(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function lS(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function cS(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=vl(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function fS(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Se(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function hS(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=vl(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var bl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xl=new RegExp(bl.source,"g");function pS(t){return function(){return t}}function dS(t){return function(e){return t(e)+""}}function Td(t,e){var n=bl.lastIndex=xl.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=bl.exec(t))&&(i=xl.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Se(r,i)})),n=xl.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?dS(u[0].x):pS(e):(e=u.length,function(l){for(var c=0,f;c<e;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function vl(t,e){var n=typeof e,r;return e==null||n==="boolean"?yl(e):(n==="number"?Se:n==="string"?(r=Rn(e))?(e=r,sa):Td:e instanceof Rn?sa:e instanceof Date?fS:lS(e)?uS:Array.isArray(e)?cS:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?hS:Se)(t,e)}function gS(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Pd=180/Math.PI,Md={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Dd(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Pd,skewX:Math.atan(u)*Pd,scaleX:a,scaleY:s}}var ua;function mS(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Md:Dd(e.a,e.b,e.c,e.d,e.e,e.f)}function yS(t){return t==null||(ua||(ua=document.createElementNS("http://www.w3.org/2000/svg","g")),ua.setAttribute("transform",t),!(t=ua.transform.baseVal.consolidate()))?Md:(t=t.matrix,Dd(t.a,t.b,t.c,t.d,t.e,t.f))}function Cd(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:Se(l,f)},{i:g-2,x:Se(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Se(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Se(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Se(l,f)},{i:g-2,x:Se(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),a(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,g=h.length,m;++d<g;)f[(m=h[d]).i]=m.x(p);return f.join("")}}}var bS=Cd(mS,"px, ","px)","deg)"),xS=Cd(yS,", ",")",")"),Sr=0,Mi=0,Di=0,Ld=1e3,la,Ci,ca=0,Nn=0,fa=0,Li=typeof performance=="object"&&performance.now?performance:Date,kd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function _l(){return Nn||(kd(vS),Nn=Li.now()+fa)}function vS(){Nn=0}function ha(){this._call=this._time=this._next=null}ha.prototype=Rd.prototype={constructor:ha,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?_l():+n)+(e==null?0:+e),!this._next&&Ci!==this&&(Ci?Ci._next=this:la=this,Ci=this),this._call=t,this._time=n,$l()},stop:function(){this._call&&(this._call=null,this._time=1/0,$l())}};function Rd(t,e,n){var r=new ha;return r.restart(t,e,n),r}function _S(){_l(),++Sr;for(var t=la,e;t;)(e=Nn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Sr}function Ed(){Nn=(ca=Li.now())+fa,Sr=Mi=0;try{_S()}finally{Sr=0,wS(),Nn=0}}function $S(){var t=Li.now(),e=t-ca;e>Ld&&(fa-=e,ca=t)}function wS(){for(var t,e=la,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:la=n);Ci=t,$l(r)}function $l(t){if(!Sr){Mi&&(Mi=clearTimeout(Mi));var e=t-Nn;e>24?(t<1/0&&(Mi=setTimeout(Ed,t-Li.now()-fa)),Di&&(Di=clearInterval(Di))):(Di||(ca=Li.now(),Di=setInterval($S,Ld)),Sr=1,kd(Ed))}}function Id(t,e,n){var r=new ha;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var SS=ed("start","end","cancel","interrupt"),AS=[],Nd=0,Bd=1,wl=2,pa=3,Fd=4,Sl=5,da=6;function ga(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;TS(t,n,{name:e,index:r,group:i,on:SS,tween:AS,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Nd})}function Al(t,e){var n=Ae(t,e);if(n.state>Nd)throw new Error("too late; already scheduled");return n}function Ie(t,e){var n=Ae(t,e);if(n.state>pa)throw new Error("too late; already running");return n}function Ae(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function TS(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Rd(o,0,n.time);function o(l){n.state=Bd,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,f,h,p;if(n.state!==Bd)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===pa)return Id(a);p.state===Fd?(p.state=da,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=da,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(Id(function(){n.state===pa&&(n.state=Fd,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=wl,n.on.call("start",t,t.__data__,n.index,n.group),n.state===wl){for(n.state=pa,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=Sl,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===Sl&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=da,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function PS(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>wl&&r.state<Sl,r.state=da,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function MS(t){return this.each(function(){PS(this,t)})}function DS(t,e){var n,r;return function(){var i=Ie(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function CS(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ie(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function LS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Ae(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?DS:CS)(n,t,e))}function Tl(t,e,n){var r=t._id;return t.each(function(){var i=Ie(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Ae(i,r).value[e]}}function Od(t,e){var n;return(typeof e=="number"?Se:e instanceof Rn?sa:(n=Rn(e))?(e=n,sa):Td)(t,e)}function kS(t){return function(){this.removeAttribute(t)}}function RS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ES(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function IS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function NS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function BS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function FS(t,e){var n=ea(t),r=n==="transform"?xS:Od;return this.attrTween(t,typeof e=="function"?(n.local?BS:NS)(n,r,Tl(this,"attr."+t,e)):e==null?(n.local?RS:kS)(n):(n.local?IS:ES)(n,r,e))}function OS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function GS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&zS(t,o)),n}return i._value=e,i}function YS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&OS(t,o)),n}return i._value=e,i}function US(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ea(t);return this.tween(n,(r.local?GS:YS)(r,e))}function WS(t,e){return function(){Al(this,t).delay=+e.apply(this,arguments)}}function HS(t,e){return e=+e,function(){Al(this,t).delay=e}}function XS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?WS:HS)(e,t)):Ae(this.node(),e).delay}function jS(t,e){return function(){Ie(this,t).duration=+e.apply(this,arguments)}}function VS(t,e){return e=+e,function(){Ie(this,t).duration=e}}function qS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?jS:VS)(e,t)):Ae(this.node(),e).duration}function ZS(t,e){if(typeof e!="function")throw new Error;return function(){Ie(this,t).ease=e}}function KS(t){var e=this._id;return arguments.length?this.each(ZS(e,t)):Ae(this.node(),e).ease}function QS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ie(this,t).ease=n}}function JS(t){if(typeof t!="function")throw new Error;return this.each(QS(this._id,t))}function tA(t){typeof t!="function"&&(t=ad(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ve(r,this._parents,this._name,this._id)}function eA(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],l=n[s],c=u.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=u[p]||l[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new Ve(a,this._parents,this._name,this._id)}function nA(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function rA(t,e,n){var r,i,o=nA(e)?Al:Ie;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function iA(t,e){var n=this._id;return arguments.length<2?Ae(this.node(),n).on.on(t):this.each(rA(n,t,e))}function oA(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function aA(){return this.on("end.remove",oA(this._id))}function sA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=hl(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,l=o[a]=new Array(u),c,f,h=0;h<u;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f,ga(l[h],e,n,h,l,Ae(c,n)));return new Ve(o,this._parents,e,n)}function uA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=od(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,f=0;f<l;++f)if(c=u[f]){for(var h=t.call(c,c.__data__,f,u),p,d=Ae(c,n),g=0,m=h.length;g<m;++g)(p=h[g])&&ga(p,e,n,g,h,d);o.push(h),a.push(c)}return new Ve(o,a,e,n)}var lA=Si.prototype.constructor;function cA(){return new lA(this._groups,this._parents)}function fA(t,e){var n,r,i;return function(){var o=$r(this,t),a=(this.style.removeProperty(t),$r(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function zd(t){return function(){this.style.removeProperty(t)}}function hA(t,e,n){var r,i=n+"",o;return function(){var a=$r(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function pA(t,e,n){var r,i,o;return function(){var a=$r(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),$r(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function dA(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ie(this,t),l=u.on,c=u.value[o]==null?s||(s=zd(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function gA(t,e,n){var r=(t+="")=="transform"?bS:Od;return e==null?this.styleTween(t,fA(t,r)).on("end.style."+t,zd(t)):typeof e=="function"?this.styleTween(t,pA(t,r,Tl(this,"style."+t,e))).each(dA(this._id,t)):this.styleTween(t,hA(t,r,e),n).on("end.style."+t,null)}function mA(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function yA(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&mA(t,a,n)),r}return o._value=e,o}function bA(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,yA(t,e,n??""))}function xA(t){return function(){this.textContent=t}}function vA(t){return function(){var e=t(this);this.textContent=e??""}}function _A(t){return this.tween("text",typeof t=="function"?vA(Tl(this,"text",t)):xA(t==null?"":t+""))}function $A(t){return function(e){this.textContent=t.call(this,e)}}function wA(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&$A(i)),e}return r._value=t,r}function SA(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,wA(t))}function AA(){for(var t=this._name,e=this._id,n=Gd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=Ae(u,e);ga(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ve(r,this._parents,t,n)}function TA(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var l=Ie(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var PA=0;function Ve(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Gd(){return++PA}var qe=Si.prototype;Ve.prototype={constructor:Ve,select:sA,selectAll:uA,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:tA,merge:eA,selection:cA,transition:AA,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:iA,attr:FS,attrTween:US,style:gA,styleTween:bA,text:_A,textTween:SA,remove:aA,tween:LS,delay:XS,duration:qS,ease:KS,easeVarying:JS,end:TA,[Symbol.iterator]:qe[Symbol.iterator]};function MA(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var DA={time:null,delay:0,duration:250,ease:MA};function CA(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function LA(t){var e,n;t instanceof Ve?(e=t._id,t=t._name):(e=Gd(),(n=DA).time=_l(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&ga(u,t,e,l,a,n||CA(u,e));return new Ve(r,this._parents,t,e)}Si.prototype.interrupt=MS,Si.prototype.transition=LA;function kA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ma(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ar(t){return t=ma(Math.abs(t)),t?t[1]:NaN}function RA(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function EA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var IA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ya(t){if(!(e=IA.exec(t)))throw new Error("invalid format: "+t);var e;return new Pl({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ya.prototype=Pl.prototype;function Pl(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Pl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function NA(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Yd;function BA(t,e){var n=ma(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Yd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ma(t,Math.max(0,e+o-1))[0]}function Ud(t,e){var n=ma(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Wd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:kA,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ud(t*100,e),r:Ud,s:BA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Hd(t){return t}var Xd=Array.prototype.map,jd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function FA(t){var e=t.grouping===void 0||t.thousands===void 0?Hd:RA(Xd.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Hd:EA(Xd.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function l(f){f=ya(f);var h=f.fill,p=f.align,d=f.sign,g=f.symbol,m=f.zero,b=f.width,y=f.comma,_=f.precision,x=f.trim,w=f.type;w==="n"?(y=!0,w="g"):Wd[w]||(_===void 0&&(_=12),x=!0,w="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",R=g==="$"?r:/[%p]/.test(w)?a:"",A=Wd[w],D=/[defgprs%]/.test(w);_=_===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function I(v){var L=$,T=R,S,M,P;if(w==="c")T=A(v)+T,v="";else{v=+v;var G=v<0||1/v<0;if(v=isNaN(v)?u:A(Math.abs(v),_),x&&(v=NA(v)),G&&+v==0&&d!=="+"&&(G=!1),L=(G?d==="("?d:s:d==="-"||d==="("?"":d)+L,T=(w==="s"?jd[8+Yd/3]:"")+T+(G&&d==="("?")":""),D){for(S=-1,M=v.length;++S<M;)if(P=v.charCodeAt(S),48>P||P>57){T=(P===46?i+v.slice(S+1):v.slice(S))+T,v=v.slice(0,S);break}}}y&&!m&&(v=e(v,1/0));var O=L.length+v.length+T.length,k=O<b?new Array(b-O+1).join(h):"";switch(y&&m&&(v=e(k+v,k.length?b-T.length:1/0),k=""),p){case"<":v=L+v+T+k;break;case"=":v=L+k+v+T;break;case"^":v=k.slice(0,O=k.length>>1)+L+v+T+k.slice(O);break;default:v=k+L+v+T;break}return o(v)}return I.toString=function(){return f+""},I}function c(f,h){var p=l((f=ya(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Ar(h)/3)))*3,g=Math.pow(10,-d),m=jd[8+d/3];return function(b){return p(g*b)+m}}return{format:l,formatPrefix:c}}var ba,Vd,qd;OA({thousands:",",grouping:[3],currency:["$",""]});function OA(t){return ba=FA(t),Vd=ba.format,qd=ba.formatPrefix,ba}function zA(t){return Math.max(0,-Ar(Math.abs(t)))}function GA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ar(e)/3)))*3-Ar(Math.abs(t)))}function YA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ar(e)-Ar(t))+1}function Zd(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function UA(t){return function(){return t}}function WA(t){return+t}var Kd=[0,1];function Tr(t){return t}function Ml(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:UA(isNaN(e)?NaN:.5)}function HA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function XA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ml(i,r),o=n(a,o)):(r=Ml(r,i),o=n(o,a)),function(s){return o(r(s))}}function jA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ml(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=td(t,s,1,r)-1;return o[u](i[u](s))}}function VA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function qA(){var t=Kd,e=Kd,n=vl,r,i,o,a=Tr,s,u,l;function c(){var h=Math.min(t.length,e.length);return a!==Tr&&(a=HA(t[0],t[h-1])),s=h>2?jA:XA,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(e,t.map(r),Se)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,WA),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=gS,c()},f.clamp=function(h){return arguments.length?(a=h?!0:Tr,c()):a!==Tr},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function ZA(){return qA()(Tr,Tr)}function KA(t,e,n,r){var i=c$(t,e,n),o;switch(r=ya(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=GA(i,a))&&(r.precision=o),qd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=YA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=zA(i))&&(r.precision=o-(r.type==="%")*2);break}}return Vd(r)}function Qd(t){var e=t.domain;return t.ticks=function(n){var r=e();return l$(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return KA(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=cl(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function Jd(){var t=ZA();return t.copy=function(){return VA(t,Jd())},Zd.apply(t,arguments),Qd(t)}function tg(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[td(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return tg().domain([t,e]).range(i).unknown(o)},Zd.apply(Qd(a),arguments)}function ki(t,e,n){this.k=t,this.x=e,this.y=n}ki.prototype={constructor:ki,scale:function(t){return t===1?this:new ki(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ki(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},ki.prototype;function QA(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function eg(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:QA(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),c=(t.width-r*(o-1))/o,f=(t.height-r*(i-1))/i,h=u*c+u*r,p=l*f+l*r,d=[h,p],g=[c/t.width,f/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:d,scale:g}})}var Dl=function(t,e){return Dl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Dl(t,e)};function Ne(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Dl(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function JA(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{l(r.next(c))}catch(f){a(f)}}function u(c){try{l(r.throw(c))}catch(f){a(f)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(t,[])).next())})}function ng(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Pr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Mr(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Dr(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Cr(t){return this instanceof Cr?(this.v=t,this):new Cr(t)}function tT(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,f)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,b){o.push([p,g,m,b])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{l(r[p](d))}catch(g){h(o[0][3],g)}}function l(p){p.value instanceof Cr?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){u("next",p)}function f(p){u("throw",p)}function h(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function eT(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Pr=="function"?Pr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(l){o({value:l,done:s})},a)}}function Dt(t){return typeof t=="function"}function Cl(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ll=Cl(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
36
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function ya(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Gi=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Cr(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(m){e={error:m}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(xt(c))try{c()}catch(m){o=m instanceof wu?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Cr(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{cd(d)}catch(m){o=o??[],m instanceof wu?o=Mr(Mr([],zn(o)),zn(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new wu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)cd(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&ya(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ya(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ld=Gi.EMPTY;function ud(t){return t instanceof Gi||t&&"closed"in t&&xt(t.remove)&&xt(t.add)&&xt(t.unsubscribe)}function cd(t){xt(t)?t():t.unsubscribe()}var fd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},hd={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Mr([t,e],zn(n)))},clearTimeout:function(t){var e=hd.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function pd(t){hd.setTimeout(function(){throw t})}function Su(){}function ba(t){t()}var Tu=function(t){ze(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ud(n)&&n.add(r)):r.destination=J2,r}return e.create=function(n,r,i){return new Yi(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Gi),Z2=Function.prototype.bind;function Au(t,e){return Z2.call(t,e)}var K2=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){xa(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){xa(r)}else xa(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){xa(n)}},t}(),Yi=function(t){ze(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(xt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&fd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Au(n.next,s),error:n.error&&Au(n.error,s),complete:n.complete&&Au(n.complete,s)}):a=n}return o.destination=new K2(a),o}return e}(Tu);function xa(t){pd(t)}function Q2(t){throw t}var J2={closed:!0,next:Su,error:Q2,complete:Su},Pu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function kr(t){return t}function t_(t){return t.length===0?kr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var dt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=n_(e)?e:new Yi(e,n,r);return ba(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=dd(n),new n(function(i,o){var a=new Yi({next:function(s){try{e(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Pu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t_(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=dd(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function dd(t){var e;return(e=t??fd.Promise)!==null&&e!==void 0?e:Promise}function e_(t){return t&&xt(t.next)&&xt(t.error)&&xt(t.complete)}function n_(t){return t&&t instanceof Tu||e_(t)&&ud(t)}function r_(t){return xt(t==null?void 0:t.lift)}function fe(t){return function(e){if(r_(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new i_(t,e,n,r,i)}var i_=function(t){ze(e,t);function e(n,r,i,o,a,s){var l=t.call(this,n)||this;return l.onFinalize=a,l.shouldUnsubscribe=s,l._next=r?function(u){try{r(u)}catch(c){n.error(c)}}:t.prototype._next,l._error=o?function(u){try{o(u)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,l._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,l}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Tu),o_=_u(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),J=function(t){ze(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new gd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new o_},e.prototype.next=function(n){var r=this;ba(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Cr(r.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ba(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ba(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?ld:(this.currentObservers=null,s.push(n),new Gi(function(){r.currentObservers=null,ya(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new dt;return n.source=this,n},e.create=function(n,r){return new gd(n,r)},e}(dt),gd=function(t){ze(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ld},e}(J),Du=function(t){ze(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(J),Cu={now:function(){return(Cu.delegate||Date).now()},delegate:void 0},a_=function(t){ze(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Cu);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,l=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+l)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!n.closed;l+=o?1:2)n.next(s[l]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,c=1;c<o.length&&o[c]<=l;c+=2)u=c;u&&o.splice(0,u+1)}},e}(J),s_=function(t){ze(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Gi),Mu={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Mr([t,e],zn(n)))},clearInterval:function(t){var e=Mu.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},l_=function(t){ze(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Mu.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Mu.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ya(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(s_),md=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=Cu.now,t}(),u_=function(t){ze(e,t);function e(n,r){r===void 0&&(r=md.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(md),c_=new u_(l_),va=new dt(function(t){return t.complete()});function f_(t){return t&&xt(t.schedule)}function Lu(t){return t[t.length-1]}function h_(t){return xt(Lu(t))?t.pop():void 0}function ku(t){return f_(Lu(t))?t.pop():void 0}function p_(t,e){return typeof Lu(t)=="number"?t.pop():e}var Ru=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function yd(t){return xt(t==null?void 0:t.then)}function bd(t){return xt(t[Pu])}function xd(t){return Symbol.asyncIterator&&xt(t==null?void 0:t[Symbol.asyncIterator])}function vd(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function d_(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var $d=d_();function _d(t){return xt(t==null?void 0:t[$d])}function wd(t){return j2(this,arguments,function(){var n,r,i,o;return sd(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Lr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Lr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Lr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Sd(t){return xt(t==null?void 0:t.getReader)}function xe(t){if(t instanceof dt)return t;if(t!=null){if(bd(t))return g_(t);if(Ru(t))return m_(t);if(yd(t))return y_(t);if(xd(t))return Td(t);if(_d(t))return b_(t);if(Sd(t))return x_(t)}throw vd(t)}function g_(t){return new dt(function(e){var n=t[Pu]();if(xt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function m_(t){return new dt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function y_(t){return new dt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,pd)})}function b_(t){return new dt(function(e){var n,r;try{for(var i=Cr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Td(t){return new dt(function(e){v_(t,e).catch(function(n){return e.error(n)})})}function x_(t){return Td(wd(t))}function v_(t,e){var n,r,i,o;return H2(this,void 0,void 0,function(){var a,s;return sd(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=q2(t),l.label=1;case 1:return[4,n.next()];case 2:if(r=l.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function $n(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Ad(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(oe(r,function(i){return $n(r,t,function(){return r.next(i)},e)},function(){return $n(r,t,function(){return r.complete()},e)},function(i){return $n(r,t,function(){return r.error(i)},e)}))})}function Pd(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function $_(t,e){return xe(t).pipe(Pd(e),Ad(e))}function __(t,e){return xe(t).pipe(Pd(e),Ad(e))}function w_(t,e){return new dt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function S_(t,e){return new dt(function(n){var r;return $n(n,e,function(){r=t[$d](),$n(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return xt(r==null?void 0:r.return)&&r.return()}})}function Dd(t,e){if(!t)throw new Error("Iterable cannot be null");return new dt(function(n){$n(n,e,function(){var r=t[Symbol.asyncIterator]();$n(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function T_(t,e){return Dd(wd(t),e)}function A_(t,e){if(t!=null){if(bd(t))return $_(t,e);if(Ru(t))return w_(t,e);if(yd(t))return __(t,e);if(xd(t))return Dd(t,e);if(_d(t))return S_(t,e);if(Sd(t))return T_(t,e)}throw vd(t)}function $a(t,e){return e?A_(t,e):xe(t)}function _a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ku(t);return $a(t,n)}var Cd=_u(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function R(t,e){return fe(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var P_=Array.isArray;function D_(t,e){return P_(e)?t.apply(void 0,Mr([],zn(e))):t(e)}function Md(t){return R(function(e){return D_(t,e)})}var C_=Array.isArray,M_=Object.getPrototypeOf,L_=Object.prototype,k_=Object.keys;function R_(t){if(t.length===1){var e=t[0];if(C_(e))return{args:e,keys:null};if(E_(e)){var n=k_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function E_(t){return t&&typeof t=="object"&&M_(t)===L_}function I_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function Y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ku(t),r=h_(t),i=R_(t),o=i.args,a=i.keys;if(o.length===0)return $a([],n);var s=new dt(B_(o,n,a?function(l){return I_(a,l)}:kr));return r?s.pipe(Md(r)):s}function B_(t,e,n){return n===void 0&&(n=kr),function(r){Ld(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,l=function(c){Ld(e,function(){var f=$a(t[c],e),h=!1;f.subscribe(oe(r,function(p){o[c]=p,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)l(u)},r)}}function Ld(t,e,n){t?$n(n,t,e):e()}function N_(t,e,n,r,i,o,a,s){var l=[],u=0,c=0,f=!1,h=function(){f&&!l.length&&!u&&e.complete()},p=function(m){return u<r?d(m):l.push(m)},d=function(m){u++;var g=!1;xe(n(m,c++)).subscribe(oe(e,function(y){e.next(y)},function(){g=!0},void 0,function(){if(g)try{u--;for(var y=function(){var b=l.shift();a||d(b)};l.length&&u<r;)y();h()}catch(b){e.error(b)}}))};return t.subscribe(oe(e,p,function(){f=!0,h()})),function(){}}function Eu(t,e,n){return n===void 0&&(n=1/0),xt(e)?Eu(function(r,i){return R(function(o,a){return e(r,o,i,a)})(xe(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return N_(r,i,t,n)}))}function F_(t){return t===void 0&&(t=1/0),Eu(kr,t)}function z_(t){return new dt(function(e){xe(t()).subscribe(e)})}var O_=["addListener","removeListener"],G_=["addEventListener","removeEventListener"],Y_=["on","off"];function Iu(t,e,n,r){if(xt(n)&&(r=n,n=void 0),r)return Iu(t,e,n).pipe(Md(r));var i=zn(V_(t)?G_.map(function(s){return function(l){return t[s](e,l,n)}}):W_(t)?O_.map(kd(t,e)):X_(t)?Y_.map(kd(t,e)):[],2),o=i[0],a=i[1];if(!o&&Ru(t))return Eu(function(s){return Iu(s,e,n)})(xe(t));if(!o)throw new TypeError("Invalid event target");return new dt(function(s){var l=function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return s.next(1<u.length?u:u[0])};return o(l),function(){return a(l)}})}function kd(t,e){return function(n){return function(r){return t[n](e,r)}}}function W_(t){return xt(t.addListener)&&xt(t.removeListener)}function X_(t){return xt(t.on)&&xt(t.off)}function V_(t){return xt(t.addEventListener)&&xt(t.removeEventListener)}function Wi(t,e,n){return z_(function(){return t()?e:n})}function Bu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ku(t),r=p_(t,1/0),i=t;return i.length?i.length===1?xe(i[0]):F_(r)($a(i,n)):va}function Rr(t,e){return fe(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function U_(t,e){return e===void 0&&(e=c_),fe(function(n,r){var i=null,o=null,a=null,s=function(){if(i){i.unsubscribe(),i=null;var u=o;o=null,r.next(u)}};function l(){var u=a+t,c=e.now();if(c<u){i=this.schedule(void 0,u-c),r.add(i);return}s()}n.subscribe(oe(r,function(u){o=u,a=e.now(),i||(i=e.schedule(l,t),r.add(i))},function(){s(),r.complete()},void 0,function(){o=i=null}))})}function H_(t){return fe(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function j_(t){return t<=0?function(){return va}:fe(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function tt(t,e){return e===void 0&&(e=kr),t=t??q_,fe(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function q_(t,e){return t===e}function Z_(t){return t===void 0&&(t=K_),fe(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function K_(){return new Cd}function Xi(t,e){var n=arguments.length>=2;return function(r){return r.pipe(kr,j_(1),n?H_(e):Z_(function(){return new Cd}))}}function Q_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new J}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,l=s===void 0?!0:s;return function(u){var c,f,h,p=0,d=!1,m=!1,g=function(){f==null||f.unsubscribe(),f=void 0},y=function(){g(),c=h=void 0,d=m=!1},b=function(){var v=c;y(),v==null||v.unsubscribe()};return fe(function(v,x){p++,!m&&!d&&g();var _=h=h??n();x.add(function(){p--,p===0&&!m&&!d&&(f=Nu(b,l))}),_.subscribe(x),!c&&p>0&&(c=new Yi({next:function(A){return _.next(A)},error:function(A){m=!0,g(),f=Nu(y,i,A),_.error(A)},complete:function(){d=!0,g(),f=Nu(y,a),_.complete()}}),xe(v).subscribe(c))})(u)}}function Nu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new Yi({next:function(){i.unsubscribe(),t()}});return xe(e.apply(void 0,Mr([],zn(n)))).subscribe(i)}}function pt(t,e,n){var r,i=!1;return r=t,Q_({connector:function(){return new a_(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function G(t,e){return fe(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(l){i==null||i.unsubscribe();var u=0,c=o++;xe(t(l,c)).subscribe(i=oe(r,function(f){return r.next(e?e(l,f,c,u++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function L(t){return fe(function(e,n){xe(t).subscribe(oe(n,function(){return n.complete()},Su)),!n.closed&&e.subscribe(n)})}const he={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},J_={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},tw={gap:120,rowAmount:1,columnAmount:1},ew={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...he},groupAxis:{...J_},separateSeries:!1},nw={type:"grid",visibleFilter:(t,e)=>!0,...ew,container:{...tw}};nw.visibleFilter.toString=()=>"(datum, context) => true";function Er(t){return Object.prototype.toString.call(t)==="[object Object]"}function rw(t){return Object.prototype.toString.call(t)==="[object Function]"}function Fu(t,e){if(Er(t)===!1||Er(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;Er(r[a])&&Er(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}function iw(t,e){const n={string:i=>typeof i=="string",number:i=>typeof i=="number",boolean:i=>typeof i=="boolean",object:i=>Er(i),"object[]":i=>Array.isArray(i)&&i.every(o=>Er(o)),"string[]":i=>Array.isArray(i)&&i.every(o=>typeof o=="string"),"number[]":i=>Array.isArray(i)&&i.every(o=>typeof o=="number"),Function:i=>rw(i),null:i=>i===null,undefined:i=>i===void 0},r={ColorType:i=>i==="none"||i==="label"||i==="primary"||i==="secondary"||i==="white"||i==="background"};return Object.keys(t).find(i=>{if(e[i]){const o=e[i],a=t[i];if(o.toBeTypes){if(o.toBeTypes.some(s=>n[s](a))===!1)return!0}else if(o.toBe){const{toBe:s,test:l}=o;if(l(a)===!1)return!0}else if(o.toBeOption){const s=o.toBeOption;if(r[s](a)===!1)return!0}}return!1})}function ow(t,e){const n=iw(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}function wa(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aw(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Rd(t){let e,n,r;t.length!==2?(e=wa,n=(s,l)=>wa(t(s),l),r=(s,l)=>t(s)-l):(e=t===wa||t===aw?t:sw,n=t,r=t);function i(s,l,u=0,c=s.length){if(u<c){if(e(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){if(u<c){if(e(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){const f=i(s,l,u,c-1);return f>u&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:a,right:o}}function sw(){return 0}function lw(t){return t===null?NaN:+t}const uw=Rd(wa),Ed=uw.right;Rd(lw).center;const cw=Math.sqrt(50),fw=Math.sqrt(10),hw=Math.sqrt(2);function Sa(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=cw?10:o>=fw?5:o>=hw?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),l=Math.round(e*u),s/u<t&&++s,l/u>e&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),l=Math.round(e/u),s*u<t&&++s,l*u>e&&--l),l<s&&.5<=n&&n<2?Sa(t,e,n*2):[s,l,u]}function pw(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Sa(e,t,n):Sa(t,e,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(o-u)/-a;else for(let u=0;u<s;++u)l[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(i+u)/-a;else for(let u=0;u<s;++u)l[u]=(i+u)*a;return l}function zu(t,e,n){return e=+e,t=+t,n=+n,Sa(t,e,n)[2]}function dw(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?zu(e,t,n):zu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var gw={value:()=>{}};function Id(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ta(n)}function Ta(t){this._=t}function mw(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ta.prototype=Id.prototype={constructor:Ta,on:function(t,e){var n=this._,r=mw(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=yw(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Bd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Bd(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ta(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function yw(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Bd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=gw,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ou="http://www.w3.org/1999/xhtml";const Nd={svg:"http://www.w3.org/2000/svg",xhtml:Ou,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Aa(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Nd.hasOwnProperty(e)?{space:Nd[e],local:t}:t}function bw(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ou&&e.documentElement.namespaceURI===Ou?e.createElement(t):e.createElementNS(n,t)}}function xw(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Fd(t){var e=Aa(t);return(e.local?xw:bw)(e)}function vw(){}function Gu(t){return t==null?vw:function(){return this.querySelector(t)}}function $w(t){typeof t!="function"&&(t=Gu(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=t.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new De(r,this._parents)}function _w(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function ww(){return[]}function zd(t){return t==null?ww:function(){return this.querySelectorAll(t)}}function Sw(t){return function(){return _w(t.apply(this,arguments))}}function Tw(t){typeof t=="function"?t=Sw(t):t=zd(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(t.call(l,l.__data__,u,a)),i.push(l));return new De(r,i)}function Od(t){return function(){return this.matches(t)}}function Gd(t){return function(e){return e.matches(t)}}var Aw=Array.prototype.find;function Pw(t){return function(){return Aw.call(this.children,t)}}function Dw(){return this.firstElementChild}function Cw(t){return this.select(t==null?Dw:Pw(typeof t=="function"?t:Gd(t)))}var Mw=Array.prototype.filter;function Lw(){return Array.from(this.children)}function kw(t){return function(){return Mw.call(this.children,t)}}function Rw(t){return this.selectAll(t==null?Lw:kw(typeof t=="function"?t:Gd(t)))}function Ew(t){typeof t!="function"&&(t=Od(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new De(r,this._parents)}function Yd(t){return new Array(t.length)}function Iw(){return new De(this._enter||this._groups.map(Yd),this._parents)}function Pa(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Pa.prototype={constructor:Pa,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Bw(t){return function(){return t}}function Nw(t,e,n,r,i,o){for(var a=0,s,l=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Pa(t,o[a]);for(;a<l;++a)(s=e[a])&&(i[a]=s)}function Fw(t,e,n,r,i,o,a){var s,l,u=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(l=e[s])&&(h[s]=p=a.call(l,l.__data__,s,e)+"",u.has(p)?i[s]=l:u.set(p,l));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(l=u.get(p))?(r[s]=l,l.__data__=o[s],u.delete(p)):n[s]=new Pa(t,o[s]);for(s=0;s<c;++s)(l=e[s])&&u.get(h[s])===l&&(i[s]=l)}function zw(t){return t.__data__}function Ow(t,e){if(!arguments.length)return Array.from(this,zw);var n=e?Fw:Nw,r=this._parents,i=this._groups;typeof t!="function"&&(t=Bw(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],h=f.length,p=Gw(t.call(c,c&&c.__data__,u,r)),d=p.length,m=s[u]=new Array(d),g=a[u]=new Array(d),y=l[u]=new Array(h);n(c,f,m,g,y,p,e);for(var b=0,v=0,x,_;b<d;++b)if(x=m[b]){for(b>=v&&(v=b+1);!(_=g[v])&&++v<d;);x._next=_||null}}return a=new De(a,r),a._enter=s,a._exit=l,a}function Gw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Yw(){return new De(this._exit||this._groups.map(Yd),this._parents)}function Ww(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Xw(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=r[l],f=u.length,h=s[l]=new Array(f),p,d=0;d<f;++d)(p=u[d]||c[d])&&(h[d]=p);for(;l<i;++l)s[l]=n[l];return new De(s,this._parents)}function Vw(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Uw(t){t||(t=Hw);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(e)}return new De(i,this._parents).order()}function Hw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function jw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function qw(){return Array.from(this)}function Zw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Kw(){let t=0;for(const e of this)++t;return t}function Qw(){return!this.node()}function Jw(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function tS(t){return function(){this.removeAttribute(t)}}function eS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nS(t,e){return function(){this.setAttribute(t,e)}}function rS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function iS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function oS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function aS(t,e){var n=Aa(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?eS:tS:typeof e=="function"?n.local?oS:iS:n.local?rS:nS)(n,e))}function Wd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function sS(t){return function(){this.style.removeProperty(t)}}function lS(t,e,n){return function(){this.style.setProperty(t,e,n)}}function uS(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function cS(t,e,n){return arguments.length>1?this.each((e==null?sS:typeof e=="function"?uS:lS)(t,e,n??"")):Ir(this.node(),t)}function Ir(t,e){return t.style.getPropertyValue(e)||Wd(t).getComputedStyle(t,null).getPropertyValue(e)}function fS(t){return function(){delete this[t]}}function hS(t,e){return function(){this[t]=e}}function pS(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function dS(t,e){return arguments.length>1?this.each((e==null?fS:typeof e=="function"?pS:hS)(t,e)):this.node()[t]}function Xd(t){return t.trim().split(/^|\s+/)}function Yu(t){return t.classList||new Vd(t)}function Vd(t){this._node=t,this._names=Xd(t.getAttribute("class")||"")}Vd.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ud(t,e){for(var n=Yu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Hd(t,e){for(var n=Yu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function gS(t){return function(){Ud(this,t)}}function mS(t){return function(){Hd(this,t)}}function yS(t,e){return function(){(e.apply(this,arguments)?Ud:Hd)(this,t)}}function bS(t,e){var n=Xd(t+"");if(arguments.length<2){for(var r=Yu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?yS:e?gS:mS)(n,e))}function xS(){this.textContent=""}function vS(t){return function(){this.textContent=t}}function $S(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function _S(t){return arguments.length?this.each(t==null?xS:(typeof t=="function"?$S:vS)(t)):this.node().textContent}function wS(){this.innerHTML=""}function SS(t){return function(){this.innerHTML=t}}function TS(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function AS(t){return arguments.length?this.each(t==null?wS:(typeof t=="function"?TS:SS)(t)):this.node().innerHTML}function PS(){this.nextSibling&&this.parentNode.appendChild(this)}function DS(){return this.each(PS)}function CS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function MS(){return this.each(CS)}function LS(t){var e=typeof t=="function"?t:Fd(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function kS(){return null}function RS(t,e){var n=typeof t=="function"?t:Fd(t),r=e==null?kS:typeof e=="function"?e:Gu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ES(){var t=this.parentNode;t&&t.removeChild(this)}function IS(){return this.each(ES)}function BS(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function NS(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function FS(t){return this.select(t?NS:BS)}function zS(t){return arguments.length?this.property("__data__",t):this.node().__data__}function OS(t){return function(e){t.call(this,e,this.__data__)}}function GS(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function YS(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function WS(t,e,n){return function(){var r=this.__on,i,o=OS(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function XS(t,e,n){var r=GS(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?WS:YS,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function jd(t,e,n){var r=Wd(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function VS(t,e){return function(){return jd(this,t,e)}}function US(t,e){return function(){return jd(this,t,e.apply(this,arguments))}}function HS(t,e){return this.each((typeof e=="function"?US:VS)(t,e))}function*jS(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var qS=[null];function De(t,e){this._groups=t,this._parents=e}function Vi(){return new De([[document.documentElement]],qS)}function ZS(){return this}De.prototype=Vi.prototype={constructor:De,select:$w,selectAll:Tw,selectChild:Cw,selectChildren:Rw,filter:Ew,data:Ow,enter:Iw,exit:Yw,join:Ww,merge:Xw,selection:ZS,order:Vw,sort:Uw,call:jw,nodes:qw,node:Zw,size:Kw,empty:Qw,each:Jw,attr:aS,style:cS,property:dS,classed:bS,text:_S,html:AS,raise:DS,lower:MS,append:LS,insert:RS,remove:IS,clone:FS,datum:zS,on:XS,dispatch:HS,[Symbol.iterator]:jS};function Wu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function qd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ui(){}var Hi=.7,Da=1/Hi,Br="\\s*([+-]?\\d+)\\s*",ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KS=/^#([0-9a-f]{3,8})$/,QS=new RegExp(`^rgb\\(${Br},${Br},${Br}\\)$`),JS=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),tT=new RegExp(`^rgba\\(${Br},${Br},${Br},${ji}\\)$`),eT=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${ji}\\)$`),nT=new RegExp(`^hsl\\(${ji},${Oe},${Oe}\\)$`),rT=new RegExp(`^hsla\\(${ji},${Oe},${Oe},${ji}\\)$`),Zd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Wu(Ui,On,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kd,formatHex:Kd,formatHex8:iT,formatHsl:oT,formatRgb:Qd,toString:Qd});function Kd(){return this.rgb().formatHex()}function iT(){return this.rgb().formatHex8()}function oT(){return rg(this).formatHsl()}function Qd(){return this.rgb().formatRgb()}function On(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=KS.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Jd(e):n===3?new ae(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ca(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ca(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=QS.exec(t))?new ae(e[1],e[2],e[3],1):(e=JS.exec(t))?new ae(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=tT.exec(t))?Ca(e[1],e[2],e[3],e[4]):(e=eT.exec(t))?Ca(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=nT.exec(t))?ng(e[1],e[2]/100,e[3]/100,1):(e=rT.exec(t))?ng(e[1],e[2]/100,e[3]/100,e[4]):Zd.hasOwnProperty(t)?Jd(Zd[t]):t==="transparent"?new ae(NaN,NaN,NaN,0):null}function Jd(t){return new ae(t>>16&255,t>>8&255,t&255,1)}function Ca(t,e,n,r){return r<=0&&(t=e=n=NaN),new ae(t,e,n,r)}function aT(t){return t instanceof Ui||(t=On(t)),t?(t=t.rgb(),new ae(t.r,t.g,t.b,t.opacity)):new ae}function Xu(t,e,n,r){return arguments.length===1?aT(t):new ae(t,e,n,r??1)}function ae(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Wu(ae,Xu,qd(Ui,{brighter(t){return t=t==null?Da:Math.pow(Da,t),new ae(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Hi:Math.pow(Hi,t),new ae(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ae(Gn(this.r),Gn(this.g),Gn(this.b),Ma(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tg,formatHex:tg,formatHex8:sT,formatRgb:eg,toString:eg}));function tg(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}`}function sT(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}${Yn((isNaN(this.opacity)?1:this.opacity)*255)}`}function eg(){const t=Ma(this.opacity);return`${t===1?"rgb(":"rgba("}${Gn(this.r)}, ${Gn(this.g)}, ${Gn(this.b)}${t===1?")":`, ${t})`}`}function Ma(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Yn(t){return t=Gn(t),(t<16?"0":"")+t.toString(16)}function ng(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ce(t,e,n,r)}function rg(t){if(t instanceof Ce)return new Ce(t.h,t.s,t.l,t.opacity);if(t instanceof Ui||(t=On(t)),!t)return new Ce;if(t instanceof Ce)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ce(a,s,l,t.opacity)}function lT(t,e,n,r){return arguments.length===1?rg(t):new Ce(t,e,n,r??1)}function Ce(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Wu(Ce,lT,qd(Ui,{brighter(t){return t=t==null?Da:Math.pow(Da,t),new Ce(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Hi:Math.pow(Hi,t),new Ce(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ae(Vu(t>=240?t-240:t+120,i,r),Vu(t,i,r),Vu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ce(ig(this.h),La(this.s),La(this.l),Ma(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ma(this.opacity);return`${t===1?"hsl(":"hsla("}${ig(this.h)}, ${La(this.s)*100}%, ${La(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ig(t){return t=(t||0)%360,t<0?t+360:t}function La(t){return Math.max(0,Math.min(1,t||0))}function Vu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Uu=t=>()=>t;function uT(t,e){return function(n){return t+n*e}}function cT(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function fT(t){return(t=+t)==1?og:function(e,n){return n-e?cT(e,n,t):Uu(isNaN(e)?n:e)}}function og(t,e){var n=e-t;return n?uT(t,n):Uu(isNaN(t)?e:t)}const ka=function t(e){var n=fT(e);function r(i,o){var a=n((i=Xu(i)).r,(o=Xu(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=og(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=t,r}(1);function hT(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function pT(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function dT(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=qu(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function gT(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Me(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function mT(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=qu(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Hu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ju=new RegExp(Hu.source,"g");function yT(t){return function(){return t}}function bT(t){return function(e){return t(e)+""}}function ag(t,e){var n=Hu.lastIndex=ju.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(t=t+"",e=e+"";(r=Hu.exec(t))&&(i=ju.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Me(r,i)})),n=ju.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?bT(l[0].x):yT(e):(e=l.length,function(u){for(var c=0,f;c<e;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function qu(t,e){var n=typeof e,r;return e==null||n==="boolean"?Uu(e):(n==="number"?Me:n==="string"?(r=On(e))?(e=r,ka):ag:e instanceof On?ka:e instanceof Date?gT:pT(e)?hT:Array.isArray(e)?dT:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?mT:Me)(t,e)}function xT(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var sg=180/Math.PI,lg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ug(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*sg,skewX:Math.atan(l)*sg,scaleX:a,scaleY:s}}var Ra;function vT(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?lg:ug(e.a,e.b,e.c,e.d,e.e,e.f)}function $T(t){return t==null||(Ra||(Ra=document.createElementNS("http://www.w3.org/2000/svg","g")),Ra.setAttribute("transform",t),!(t=Ra.transform.baseVal.consolidate()))?lg:(t=t.matrix,ug(t.a,t.b,t.c,t.d,t.e,t.f))}function cg(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,f,h,p,d){if(u!==f||c!==h){var m=p.push("translate(",null,e,null,n);d.push({i:m-4,x:Me(u,f)},{i:m-2,x:Me(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Me(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Me(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function l(u,c,f,h,p,d){if(u!==f||c!==h){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:Me(u,f)},{i:m-2,x:Me(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=t(u),c=t(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,h),a(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var d=-1,m=h.length,g;++d<m;)f[(g=h[d]).i]=g.x(p);return f.join("")}}}var _T=cg(vT,"px, ","px)","deg)"),wT=cg($T,", ",")",")"),Nr=0,qi=0,Zi=0,fg=1e3,Ea,Ki,Ia=0,Wn=0,Ba=0,Qi=typeof performance=="object"&&performance.now?performance:Date,hg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zu(){return Wn||(hg(ST),Wn=Qi.now()+Ba)}function ST(){Wn=0}function Na(){this._call=this._time=this._next=null}Na.prototype=pg.prototype={constructor:Na,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Zu():+n)+(e==null?0:+e),!this._next&&Ki!==this&&(Ki?Ki._next=this:Ea=this,Ki=this),this._call=t,this._time=n,Ku()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ku())}};function pg(t,e,n){var r=new Na;return r.restart(t,e,n),r}function TT(){Zu(),++Nr;for(var t=Ea,e;t;)(e=Wn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Nr}function dg(){Wn=(Ia=Qi.now())+Ba,Nr=qi=0;try{TT()}finally{Nr=0,PT(),Wn=0}}function AT(){var t=Qi.now(),e=t-Ia;e>fg&&(Ba-=e,Ia=t)}function PT(){for(var t,e=Ea,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ea=n);Ki=t,Ku(r)}function Ku(t){if(!Nr){qi&&(qi=clearTimeout(qi));var e=t-Wn;e>24?(t<1/0&&(qi=setTimeout(dg,t-Qi.now()-Ba)),Zi&&(Zi=clearInterval(Zi))):(Zi||(Ia=Qi.now(),Zi=setInterval(AT,fg)),Nr=1,hg(dg))}}function gg(t,e,n){var r=new Na;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var DT=Id("start","end","cancel","interrupt"),CT=[],mg=0,yg=1,Qu=2,Fa=3,bg=4,Ju=5,za=6;function Oa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;MT(t,n,{name:e,index:r,group:i,on:DT,tween:CT,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:mg})}function tc(t,e){var n=Le(t,e);if(n.state>mg)throw new Error("too late; already scheduled");return n}function Ge(t,e){var n=Le(t,e);if(n.state>Fa)throw new Error("too late; already running");return n}function Le(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function MT(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=pg(o,0,n.time);function o(u){n.state=yg,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,f,h,p;if(n.state!==yg)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Fa)return gg(a);p.state===bg?(p.state=za,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=za,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(gg(function(){n.state===Fa&&(n.state=bg,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Qu,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Qu){for(n.state=Fa,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Ju,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===Ju&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=za,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function LT(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Qu&&r.state<Ju,r.state=za,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function kT(t){return this.each(function(){LT(this,t)})}function RT(t,e){var n,r;return function(){var i=Ge(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function ET(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ge(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function IT(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Le(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?RT:ET)(n,t,e))}function ec(t,e,n){var r=t._id;return t.each(function(){var i=Ge(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Le(i,r).value[e]}}function xg(t,e){var n;return(typeof e=="number"?Me:e instanceof On?ka:(n=On(e))?(e=n,ka):ag)(t,e)}function BT(t){return function(){this.removeAttribute(t)}}function NT(t){return function(){this.removeAttributeNS(t.space,t.local)}}function FT(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function zT(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function OT(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function GT(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function YT(t,e){var n=Aa(t),r=n==="transform"?wT:xg;return this.attrTween(t,typeof e=="function"?(n.local?GT:OT)(n,r,ec(this,"attr."+t,e)):e==null?(n.local?NT:BT)(n):(n.local?zT:FT)(n,r,e))}function WT(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function XT(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function VT(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&XT(t,o)),n}return i._value=e,i}function UT(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&WT(t,o)),n}return i._value=e,i}function HT(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Aa(t);return this.tween(n,(r.local?VT:UT)(r,e))}function jT(t,e){return function(){tc(this,t).delay=+e.apply(this,arguments)}}function qT(t,e){return e=+e,function(){tc(this,t).delay=e}}function ZT(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?jT:qT)(e,t)):Le(this.node(),e).delay}function KT(t,e){return function(){Ge(this,t).duration=+e.apply(this,arguments)}}function QT(t,e){return e=+e,function(){Ge(this,t).duration=e}}function JT(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?KT:QT)(e,t)):Le(this.node(),e).duration}function tA(t,e){if(typeof e!="function")throw new Error;return function(){Ge(this,t).ease=e}}function eA(t){var e=this._id;return arguments.length?this.each(tA(e,t)):Le(this.node(),e).ease}function nA(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ge(this,t).ease=n}}function rA(t){if(typeof t!="function")throw new Error;return this.each(nA(this._id,t))}function iA(t){typeof t!="function"&&(t=Od(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new tn(r,this._parents,this._name,this._id)}function oA(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=e[s],u=n[s],c=l.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=l[p]||u[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new tn(a,this._parents,this._name,this._id)}function aA(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function sA(t,e,n){var r,i,o=aA(e)?tc:Ge;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function lA(t,e){var n=this._id;return arguments.length<2?Le(this.node(),n).on.on(t):this.each(sA(n,t,e))}function uA(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function cA(){return this.on("end.remove",uA(this._id))}function fA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Gu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,f,h=0;h<l;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f,Oa(u[h],e,n,h,u,Le(c,n)));return new tn(o,this._parents,e,n)}function hA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=zd(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,f=0;f<u;++f)if(c=l[f]){for(var h=t.call(c,c.__data__,f,l),p,d=Le(c,n),m=0,g=h.length;m<g;++m)(p=h[m])&&Oa(p,e,n,m,h,d);o.push(h),a.push(c)}return new tn(o,a,e,n)}var pA=Vi.prototype.constructor;function dA(){return new pA(this._groups,this._parents)}function gA(t,e){var n,r,i;return function(){var o=Ir(this,t),a=(this.style.removeProperty(t),Ir(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function vg(t){return function(){this.style.removeProperty(t)}}function mA(t,e,n){var r,i=n+"",o;return function(){var a=Ir(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function yA(t,e,n){var r,i,o;return function(){var a=Ir(this,t),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),Ir(this,t))),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}function bA(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var l=Ge(this,t),u=l.on,c=l.value[o]==null?s||(s=vg(e)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function xA(t,e,n){var r=(t+="")=="transform"?_T:xg;return e==null?this.styleTween(t,gA(t,r)).on("end.style."+t,vg(t)):typeof e=="function"?this.styleTween(t,yA(t,r,ec(this,"style."+t,e))).each(bA(this._id,t)):this.styleTween(t,mA(t,r,e),n).on("end.style."+t,null)}function vA(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function $A(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&vA(t,a,n)),r}return o._value=e,o}function _A(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,$A(t,e,n??""))}function wA(t){return function(){this.textContent=t}}function SA(t){return function(){var e=t(this);this.textContent=e??""}}function TA(t){return this.tween("text",typeof t=="function"?SA(ec(this,"text",t)):wA(t==null?"":t+""))}function AA(t){return function(e){this.textContent=t.call(this,e)}}function PA(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&AA(i)),e}return r._value=t,r}function DA(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,PA(t))}function CA(){for(var t=this._name,e=this._id,n=$g(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Le(l,e);Oa(l,t,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new tn(r,this._parents,t,n)}function MA(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=Ge(this,r),c=u.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),u.on=e}),i===0&&o()})}var LA=0;function tn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function $g(){return++LA}var en=Vi.prototype;tn.prototype={constructor:tn,select:fA,selectAll:hA,selectChild:en.selectChild,selectChildren:en.selectChildren,filter:iA,merge:oA,selection:dA,transition:CA,call:en.call,nodes:en.nodes,node:en.node,size:en.size,empty:en.empty,each:en.each,on:lA,attr:YT,attrTween:HT,style:xA,styleTween:_A,text:TA,textTween:DA,remove:cA,tween:IT,delay:ZT,duration:JT,ease:eA,easeVarying:rA,end:MA,[Symbol.iterator]:en[Symbol.iterator]};function kA(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var RA={time:null,delay:0,duration:250,ease:kA};function EA(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function IA(t){var e,n;t instanceof tn?(e=t._id,t=t._name):(e=$g(),(n=RA).time=Zu(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&Oa(l,t,e,u,a,n||EA(l,e));return new tn(r,this._parents,t,e)}Vi.prototype.interrupt=kT,Vi.prototype.transition=IA;function BA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ga(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Fr(t){return t=Ga(Math.abs(t)),t?t[1]:NaN}function NA(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function FA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var zA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ya(t){if(!(e=zA.exec(t)))throw new Error("invalid format: "+t);var e;return new nc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ya.prototype=nc.prototype;function nc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}nc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function OA(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var _g;function GA(t,e){var n=Ga(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(_g=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ga(t,Math.max(0,e+o-1))[0]}function wg(t,e){var n=Ga(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Sg={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:BA,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>wg(t*100,e),r:wg,s:GA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Tg(t){return t}var Ag=Array.prototype.map,Pg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function YA(t){var e=t.grouping===void 0||t.thousands===void 0?Tg:NA(Ag.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Tg:FA(Ag.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=Ya(f);var h=f.fill,p=f.align,d=f.sign,m=f.symbol,g=f.zero,y=f.width,b=f.comma,v=f.precision,x=f.trim,_=f.type;_==="n"?(b=!0,_="g"):Sg[_]||(v===void 0&&(v=12),x=!0,_="g"),(g||h==="0"&&p==="=")&&(g=!0,h="0",p="=");var A=m==="$"?n:m==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w=m==="$"?r:/[%p]/.test(_)?a:"",P=Sg[_],C=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function B($){var k=A,M=w,T,S,D;if(_==="c")M=P($)+M,$="";else{$=+$;var F=$<0||1/$<0;if($=isNaN($)?l:P(Math.abs($),v),x&&($=OA($)),F&&+$==0&&d!=="+"&&(F=!1),k=(F?d==="("?d:s:d==="-"||d==="("?"":d)+k,M=(_==="s"?Pg[8+_g/3]:"")+M+(F&&d==="("?")":""),C){for(T=-1,S=$.length;++T<S;)if(D=$.charCodeAt(T),48>D||D>57){M=(D===46?i+$.slice(T+1):$.slice(T))+M,$=$.slice(0,T);break}}}b&&!g&&($=e($,1/0));var z=k.length+$.length+M.length,I=z<y?new Array(y-z+1).join(h):"";switch(b&&g&&($=e(I+$,I.length?y-M.length:1/0),I=""),p){case"<":$=k+$+M+I;break;case"=":$=k+I+$+M;break;case"^":$=I.slice(0,z=I.length>>1)+k+$+M+I.slice(z);break;default:$=I+k+$+M;break}return o($)}return B.toString=function(){return f+""},B}function c(f,h){var p=u((f=Ya(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Fr(h)/3)))*3,m=Math.pow(10,-d),g=Pg[8+d/3];return function(y){return p(m*y)+g}}return{format:u,formatPrefix:c}}var Wa,Dg,Cg;WA({thousands:",",grouping:[3],currency:["$",""]});function WA(t){return Wa=YA(t),Dg=Wa.format,Cg=Wa.formatPrefix,Wa}function XA(t){return Math.max(0,-Fr(Math.abs(t)))}function VA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fr(e)/3)))*3-Fr(Math.abs(t)))}function UA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Fr(e)-Fr(t))+1}function Mg(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function HA(t){return function(){return t}}function jA(t){return+t}var Lg=[0,1];function zr(t){return t}function rc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:HA(isNaN(e)?NaN:.5)}function qA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function ZA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=rc(i,r),o=n(a,o)):(r=rc(r,i),o=n(o,a)),function(s){return o(r(s))}}function KA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=rc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var l=Ed(t,s,1,r)-1;return o[l](i[l](s))}}function QA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function JA(){var t=Lg,e=Lg,n=qu,r,i,o,a=zr,s,l,u;function c(){var h=Math.min(t.length,e.length);return a!==zr&&(a=qA(t[0],t[h-1])),s=h>2?KA:ZA,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((u||(u=s(e,t.map(r),Me)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,jA),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=xT,c()},f.clamp=function(h){return arguments.length?(a=h?!0:zr,c()):a!==zr},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function tP(){return JA()(zr,zr)}function eP(t,e,n,r){var i=dw(t,e,n),o;switch(r=Ya(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=VA(i,a))&&(r.precision=o),Cg(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=UA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=XA(i))&&(r.precision=o-(r.type==="%")*2);break}}return Dg(r)}function kg(t){var e=t.domain;return t.ticks=function(n){var r=e();return pw(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return eP(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);c-- >0;){if(u=zu(a,s,n),u===l)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function Ji(){var t=tP();return t.copy=function(){return QA(t,Ji())},Mg.apply(t,arguments),kg(t)}function Rg(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[Ed(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*e-(l-n)*t)/(n+1);return a}return a.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,s()):[t,e]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Rg().domain([t,e]).range(i).unknown(o)},Mg.apply(kg(a),arguments)}function to(t,e,n){this.k=t,this.x=e,this.y=n}to.prototype={constructor:to,scale:function(t){return t===1?this:new to(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new to(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},to.prototype;function ic(t){const e=[0,0];return t.length?t.reduce((n,r)=>[r<n[0]?r:n[0],r>n[1]?r:n[1]],[t[0],t[0]]):e}function nP(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function Eg(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:nP(n);return new Array(n).fill(null).map((a,s)=>{const l=s%o,u=Math.floor(s/o),c=(t.width-r*(o-1))/o,f=(t.height-r*(i-1))/i,h=l*c+l*r,p=u*f+u*r,d=[h,p],m=[c/t.width,f/t.height];return{slotIndex:s,rowIndex:u,columnIndex:l,translate:d,scale:m}})}var oc=function(t,e){return oc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},oc(t,e)};function Ye(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");oc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function rP(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(f){a(f)}}function l(c){try{u(r.throw(c))}catch(f){a(f)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,[])).next())})}function Ig(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Or(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gr(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Yr(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Wr(t){return this instanceof Wr?(this.v=t,this):new Wr(t)}function iP(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,f)}}function s(p,d){r[p]&&(i[p]=function(m){return new Promise(function(g,y){o.push([p,m,g,y])>1||l(p,m)})},d&&(i[p]=d(i[p])))}function l(p,d){try{u(r[p](d))}catch(m){h(o[0][3],m)}}function u(p){p.value instanceof Wr?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){l("next",p)}function f(p){l("throw",p)}function h(p,d){p(d),o.shift(),o.length&&l(o[0][0],o[0][1])}}function oP(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Or=="function"?Or(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,l){a=t[o](a),i(s,l,a.done,a.value)})}}function i(o,a,s,l){Promise.resolve(l).then(function(u){o({value:u,done:s})},a)}}function Lt(t){return typeof t=="function"}function ac(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var sc=ac(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
37
37
  `+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
38
- `):"",this.name="UnsubscriptionError",this.errors=e}});function xa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Ri=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Pr(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(Dt(c))try{c()}catch(g){o=g instanceof Ll?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Pr(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{og(d)}catch(g){o=o??[],g instanceof Ll?o=Dr(Dr([],Mr(o)),Mr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Ll(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)og(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&xa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&xa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),rg=Ri.EMPTY;function ig(t){return t instanceof Ri||t&&"closed"in t&&Dt(t.remove)&&Dt(t.add)&&Dt(t.unsubscribe)}function og(t){Dt(t)?t():t.unsubscribe()}var ag={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},nT={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Dr([t,e],Mr(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function sg(t){nT.setTimeout(function(){throw t})}function kl(){}function va(t){t()}var Rl=function(t){Ne(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ig(n)&&n.add(r)):r.destination=aT,r}return e.create=function(n,r,i){return new Ei(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Ri),rT=Function.prototype.bind;function El(t,e){return rT.call(t,e)}var iT=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){_a(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){_a(r)}else _a(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){_a(n)}},t}(),Ei=function(t){Ne(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Dt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&ag.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&El(n.next,s),error:n.error&&El(n.error,s),complete:n.complete&&El(n.complete,s)}):a=n}return o.destination=new iT(a),o}return e}(Rl);function _a(t){sg(t)}function oT(t){throw t}var aT={closed:!0,next:kl,error:oT,complete:kl},Il=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function $a(t){return t}function sT(t){return t.length===0?$a:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var ue=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=lT(e)?e:new Ei(e,n,r);return va(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=ug(n),new n(function(i,o){var a=new Ei({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Il]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return sT(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=ug(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function ug(t){var e;return(e=t??ag.Promise)!==null&&e!==void 0?e:Promise}function uT(t){return t&&Dt(t.next)&&Dt(t.error)&&Dt(t.complete)}function lT(t){return t&&t instanceof Rl||uT(t)&&ig(t)}function cT(t){return Dt(t==null?void 0:t.lift)}function Bn(t){return function(e){if(cT(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Fn(t,e,n,r,i){return new fT(t,e,n,r,i)}var fT=function(t){Ne(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Rl),hT=Cl(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Lr=function(t){Ne(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new lg(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new hT},e.prototype.next=function(n){var r=this;va(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Pr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;va(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;va(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?rg:(this.currentObservers=null,s.push(n),new Ri(function(){r.currentObservers=null,xa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new ue;return n.source=this,n},e.create=function(n,r){return new lg(n,r)},e}(ue),lg=function(t){Ne(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:rg},e}(Lr),cg=function(t){Ne(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(Lr),Nl={now:function(){return(Nl.delegate||Date).now()},delegate:void 0},pT=function(t){Ne(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Nl);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(Lr),dT=function(t){Ne(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Ri),fg={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Dr([t,e],Mr(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},gT=function(t){Ne(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),fg.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&fg.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,xa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(dT),hg=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=Nl.now,t}(),mT=function(t){Ne(e,t);function e(n,r){r===void 0&&(r=hg.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(hg);new mT(gT);function yT(t){return t&&Dt(t.schedule)}function pg(t){return t[t.length-1]}function bT(t){return Dt(pg(t))?t.pop():void 0}function xT(t){return yT(pg(t))?t.pop():void 0}var dg=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function gg(t){return Dt(t==null?void 0:t.then)}function mg(t){return Dt(t[Il])}function yg(t){return Symbol.asyncIterator&&Dt(t==null?void 0:t[Symbol.asyncIterator])}function bg(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function vT(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var xg=vT();function vg(t){return Dt(t==null?void 0:t[xg])}function _g(t){return tT(this,arguments,function(){var e,n,r,i;return ng(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Cr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,Cr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Cr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function $g(t){return Dt(t==null?void 0:t.getReader)}function On(t){if(t instanceof ue)return t;if(t!=null){if(mg(t))return _T(t);if(dg(t))return $T(t);if(gg(t))return wT(t);if(yg(t))return wg(t);if(vg(t))return ST(t);if($g(t))return AT(t)}throw bg(t)}function _T(t){return new ue(function(e){var n=t[Il]();if(Dt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function $T(t){return new ue(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function wT(t){return new ue(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,sg)})}function ST(t){return new ue(function(e){var n,r;try{for(var i=Pr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function wg(t){return new ue(function(e){TT(t,e).catch(function(n){return e.error(n)})})}function AT(t){return wg(_g(t))}function TT(t,e){var n,r,i,o;return JA(this,void 0,void 0,function(){var a,s;return ng(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=eT(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function pn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Sg(t,e){return e===void 0&&(e=0),Bn(function(n,r){n.subscribe(Fn(r,function(i){return pn(r,t,function(){return r.next(i)},e)},function(){return pn(r,t,function(){return r.complete()},e)},function(i){return pn(r,t,function(){return r.error(i)},e)}))})}function Ag(t,e){return e===void 0&&(e=0),Bn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function PT(t,e){return On(t).pipe(Ag(e),Sg(e))}function MT(t,e){return On(t).pipe(Ag(e),Sg(e))}function DT(t,e){return new ue(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function CT(t,e){return new ue(function(n){var r;return pn(n,e,function(){r=t[xg](),pn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Dt(r==null?void 0:r.return)&&r.return()}})}function Tg(t,e){if(!t)throw new Error("Iterable cannot be null");return new ue(function(n){pn(n,e,function(){var r=t[Symbol.asyncIterator]();pn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function LT(t,e){return Tg(_g(t),e)}function kT(t,e){if(t!=null){if(mg(t))return PT(t,e);if(dg(t))return DT(t,e);if(gg(t))return MT(t,e);if(yg(t))return Tg(t,e);if(vg(t))return CT(t,e);if($g(t))return LT(t,e)}throw bg(t)}function Pg(t,e){return e?kT(t,e):On(t)}Cl(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function kr(t,e){return Bn(function(n,r){var i=0;n.subscribe(Fn(r,function(o){r.next(t.call(e,o,i++))}))})}var RT=Array.isArray;function ET(t,e){return RT(e)?t.apply(void 0,Dr([],Mr(e))):t(e)}function IT(t){return kr(function(e){return ET(t,e)})}var NT=Array.isArray,BT=Object.getPrototypeOf,FT=Object.prototype,OT=Object.keys;function zT(t){if(t.length===1){var e=t[0];if(NT(e))return{args:e,keys:null};if(GT(e)){var n=OT(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function GT(t){return t&&typeof t=="object"&&BT(t)===FT}function YT(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function Mg(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=xT(t),r=bT(t),i=zT(t),o=i.args,a=i.keys;if(o.length===0)return Pg([],n);var s=new ue(UT(o,n,a?function(u){return YT(a,u)}:$a));return r?s.pipe(IT(r)):s}function UT(t,e,n){return n===void 0&&(n=$a),function(r){Dg(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(c){Dg(e,function(){var f=Pg(t[c],e),h=!1;f.subscribe(Fn(r,function(p){o[c]=p,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},l=0;l<i;l++)u(l)},r)}}function Dg(t,e,n){t?pn(n,t,e):e()}function WT(t,e){return e===void 0&&(e=$a),t=t??HT,Bn(function(n,r){var i,o=!0;n.subscribe(Fn(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function HT(t,e){return t===e}function XT(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Lr}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(l){var c,f,h,p=0,d=!1,g=!1,m=function(){f==null||f.unsubscribe(),f=void 0},b=function(){m(),c=h=void 0,d=g=!1},y=function(){var _=c;b(),_==null||_.unsubscribe()};return Bn(function(_,x){p++,!g&&!d&&m();var w=h=h??n();x.add(function(){p--,p===0&&!g&&!d&&(f=Bl(y,u))}),w.subscribe(x),!c&&p>0&&(c=new Ei({next:function($){return w.next($)},error:function($){g=!0,m(),f=Bl(b,i,$),w.error($)},complete:function(){d=!0,m(),f=Bl(b,a),w.complete()}}),On(_).subscribe(c))})(l)}}function Bl(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new Ei({next:function(){i.unsubscribe(),t()}});return On(e.apply(void 0,Dr([],Mr(n)))).subscribe(i)}}function jT(t,e,n){var r,i=!1;return r=t,XT({connector:function(){return new pT(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Fl(t,e){return Bn(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(Fn(r,function(u){i==null||i.unsubscribe();var l=0,c=o++;On(t(u,c)).subscribe(i=Fn(r,function(f){return r.next(e?e(u,f,c,l++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function Cg(t){return Bn(function(e,n){On(t).subscribe(Fn(n,function(){return n.complete()},kl)),!n.closed&&e.subscribe(n)})}const VT=t=>t.pipe(kr(e=>e.styles.textSize),WT(),kr(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),Lg=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=vr.scaleDomain,scaleRange:i=vr.scaleRange})=>{const o=r[0]??vr.scaleDomain[0],a=r[1]??vr.scaleDomain[1],s=i[0]??vr.scaleRange[0],u=i[1]??vr.scaleRange[1];let l=o==="auto"?e<0?e:0:o==="min"?e:o,c=a==="auto"?t>=0?t:0:a==="max"?t:a;const f=t-(t-l)/(1-s),h=c/u;return Jd().domain([f,h]).range([0,n])},kg=({axisLabels:t,axisWidth:e,padding:n=0,reverse:r=!1})=>{let i=t.map((u,l)=>l);r&&i.reverse();const o=i.length-1+n*2,a=e/o,s=a*n-a*.5;return tg().domain([s,e-s]).range(i)},Rg=({fullDataFormatter$:t,layout$:e})=>{const n=new Lr;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,l=0,c=0,f=0,h=0;return i.position==="bottom"?o.position==="left"?(f=180,l=s):o.position==="right"?(f=180,h=180,u=a,l=s):(f=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,u=a):(f=180,l=s)):i.position==="left"?o.position==="bottom"?(c=-90,l=s):o.position==="top"?(c=-90,h=180):(f=180,l=s):i.position==="right"?o.position==="bottom"?(c=-90,f=180,l=s,u=a):o.position==="top"?(c=-90,f=180,h=180,u=a):(f=180,l=s):(f=180,l=s),{translate:[u,l],scale:[1,1],rotate:c,rotateX:f,rotateY:h,value:`translate(${u}px, ${l}px) rotate(${c}deg) rotateX(${f}deg) rotateY(${h}deg)`}}return new ue(i=>(Mg({fullDataFormatter:t,layout:e}).pipe(Cg(n),Fl(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},Eg=({gridAxesTransform$:t})=>t.pipe(kr(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotateX(${o}deg) rotateY(${a}deg) rotate(${i}deg)`}})),Ig=({computedData$:t,fullDataFormatter$:e,layout$:n})=>Mg({computedData:t,fullDataFormatter:e,layout:n}).pipe(Fl(async r=>r),kr(r=>{if(r.fullDataFormatter.grid.separateSeries)return eg(r.layout,r.fullDataFormatter.container,r.computedData.length);{const i=eg(r.layout,r.fullDataFormatter.container,1);return r.computedData.map((o,a)=>i[0])}}));function qT(t){return`[OrbCharts warn]: ${t.message}`}function ZT({columnName:t,expectToBe:e,from:n}){return`Invalid value: '${t}' must be '${e}'
38
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function Xa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var eo=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Or(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(m){e={error:m}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(Lt(c))try{c()}catch(m){o=m instanceof sc?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Or(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{Fg(d)}catch(m){o=o??[],m instanceof sc?o=Yr(Yr([],Gr(o)),Gr(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new sc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Fg(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Xa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Xa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Bg=eo.EMPTY;function Ng(t){return t instanceof eo||t&&"closed"in t&&Lt(t.remove)&&Lt(t.add)&&Lt(t.unsubscribe)}function Fg(t){Lt(t)?t():t.unsubscribe()}var zg={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},aP={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Yr([t,e],Gr(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Og(t){aP.setTimeout(function(){throw t})}function lc(){}function Va(t){t()}var uc=function(t){Ye(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Ng(n)&&n.add(r)):r.destination=cP,r}return e.create=function(n,r,i){return new no(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(eo),sP=Function.prototype.bind;function cc(t,e){return sP.call(t,e)}var lP=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Ua(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Ua(r)}else Ua(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Ua(n)}},t}(),no=function(t){Ye(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Lt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&zg.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&cc(n.next,s),error:n.error&&cc(n.error,s),complete:n.complete&&cc(n.complete,s)}):a=n}return o.destination=new lP(a),o}return e}(uc);function Ua(t){Og(t)}function uP(t){throw t}var cP={closed:!0,next:lc,error:uP,complete:lc},fc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ha(t){return t}function fP(t){return t.length===0?Ha:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var pe=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=pP(e)?e:new no(e,n,r);return Va(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Gg(n),new n(function(i,o){var a=new no({next:function(s){try{e(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[fc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return fP(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Gg(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Gg(t){var e;return(e=t??zg.Promise)!==null&&e!==void 0?e:Promise}function hP(t){return t&&Lt(t.next)&&Lt(t.error)&&Lt(t.complete)}function pP(t){return t&&t instanceof uc||hP(t)&&Ng(t)}function dP(t){return Lt(t==null?void 0:t.lift)}function Xn(t){return function(e){if(dP(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Vn(t,e,n,r,i){return new gP(t,e,n,r,i)}var gP=function(t){Ye(e,t);function e(n,r,i,o,a,s){var l=t.call(this,n)||this;return l.onFinalize=a,l.shouldUnsubscribe=s,l._next=r?function(u){try{r(u)}catch(c){n.error(c)}}:t.prototype._next,l._error=o?function(u){try{o(u)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,l._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,l}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(uc),mP=ac(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Xr=function(t){Ye(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Yg(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new mP},e.prototype.next=function(n){var r=this;Va(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Or(r.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Va(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Va(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Bg:(this.currentObservers=null,s.push(n),new eo(function(){r.currentObservers=null,Xa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new pe;return n.source=this,n},e.create=function(n,r){return new Yg(n,r)},e}(pe),Yg=function(t){Ye(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Bg},e}(Xr),Wg=function(t){Ye(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(Xr),hc={now:function(){return(hc.delegate||Date).now()},delegate:void 0},yP=function(t){Ye(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=hc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,l=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+l)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!n.closed;l+=o?1:2)n.next(s[l]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,c=1;c<o.length&&o[c]<=l;c+=2)u=c;u&&o.splice(0,u+1)}},e}(Xr),bP=function(t){Ye(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(eo),Xg={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Yr([t,e],Gr(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},xP=function(t){Ye(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Xg.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Xg.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Xa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(bP),Vg=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=hc.now,t}(),vP=function(t){Ye(e,t);function e(n,r){r===void 0&&(r=Vg.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(Vg);new vP(xP);function $P(t){return t&&Lt(t.schedule)}function Ug(t){return t[t.length-1]}function _P(t){return Lt(Ug(t))?t.pop():void 0}function wP(t){return $P(Ug(t))?t.pop():void 0}var Hg=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function jg(t){return Lt(t==null?void 0:t.then)}function qg(t){return Lt(t[fc])}function Zg(t){return Symbol.asyncIterator&&Lt(t==null?void 0:t[Symbol.asyncIterator])}function Kg(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function SP(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Qg=SP();function Jg(t){return Lt(t==null?void 0:t[Qg])}function t0(t){return iP(this,arguments,function(){var e,n,r,i;return Ig(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Wr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,Wr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Wr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function e0(t){return Lt(t==null?void 0:t.getReader)}function Un(t){if(t instanceof pe)return t;if(t!=null){if(qg(t))return TP(t);if(Hg(t))return AP(t);if(jg(t))return PP(t);if(Zg(t))return n0(t);if(Jg(t))return DP(t);if(e0(t))return CP(t)}throw Kg(t)}function TP(t){return new pe(function(e){var n=t[fc]();if(Lt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function AP(t){return new pe(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function PP(t){return new pe(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Og)})}function DP(t){return new pe(function(e){var n,r;try{for(var i=Or(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function n0(t){return new pe(function(e){MP(t,e).catch(function(n){return e.error(n)})})}function CP(t){return n0(t0(t))}function MP(t,e){var n,r,i,o;return rP(this,void 0,void 0,function(){var a,s;return Ig(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=oP(t),l.label=1;case 1:return[4,n.next()];case 2:if(r=l.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function _n(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function r0(t,e){return e===void 0&&(e=0),Xn(function(n,r){n.subscribe(Vn(r,function(i){return _n(r,t,function(){return r.next(i)},e)},function(){return _n(r,t,function(){return r.complete()},e)},function(i){return _n(r,t,function(){return r.error(i)},e)}))})}function i0(t,e){return e===void 0&&(e=0),Xn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function LP(t,e){return Un(t).pipe(i0(e),r0(e))}function kP(t,e){return Un(t).pipe(i0(e),r0(e))}function RP(t,e){return new pe(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function EP(t,e){return new pe(function(n){var r;return _n(n,e,function(){r=t[Qg](),_n(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Lt(r==null?void 0:r.return)&&r.return()}})}function o0(t,e){if(!t)throw new Error("Iterable cannot be null");return new pe(function(n){_n(n,e,function(){var r=t[Symbol.asyncIterator]();_n(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function IP(t,e){return o0(t0(t),e)}function BP(t,e){if(t!=null){if(qg(t))return LP(t,e);if(Hg(t))return RP(t,e);if(jg(t))return kP(t,e);if(Zg(t))return o0(t,e);if(Jg(t))return EP(t,e);if(e0(t))return IP(t,e)}throw Kg(t)}function a0(t,e){return e?BP(t,e):Un(t)}ac(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Vr(t,e){return Xn(function(n,r){var i=0;n.subscribe(Vn(r,function(o){r.next(t.call(e,o,i++))}))})}var NP=Array.isArray;function FP(t,e){return NP(e)?t.apply(void 0,Yr([],Gr(e))):t(e)}function zP(t){return Vr(function(e){return FP(t,e)})}var OP=Array.isArray,GP=Object.getPrototypeOf,YP=Object.prototype,WP=Object.keys;function XP(t){if(t.length===1){var e=t[0];if(OP(e))return{args:e,keys:null};if(VP(e)){var n=WP(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function VP(t){return t&&typeof t=="object"&&GP(t)===YP}function UP(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function s0(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=wP(t),r=_P(t),i=XP(t),o=i.args,a=i.keys;if(o.length===0)return a0([],n);var s=new pe(HP(o,n,a?function(l){return UP(a,l)}:Ha));return r?s.pipe(zP(r)):s}function HP(t,e,n){return n===void 0&&(n=Ha),function(r){l0(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,l=function(c){l0(e,function(){var f=a0(t[c],e),h=!1;f.subscribe(Vn(r,function(p){o[c]=p,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)l(u)},r)}}function l0(t,e,n){t?_n(n,t,e):e()}function jP(t,e){return e===void 0&&(e=Ha),t=t??qP,Xn(function(n,r){var i,o=!0;n.subscribe(Vn(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function qP(t,e){return t===e}function ZP(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Xr}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,l=s===void 0?!0:s;return function(u){var c,f,h,p=0,d=!1,m=!1,g=function(){f==null||f.unsubscribe(),f=void 0},y=function(){g(),c=h=void 0,d=m=!1},b=function(){var v=c;y(),v==null||v.unsubscribe()};return Xn(function(v,x){p++,!m&&!d&&g();var _=h=h??n();x.add(function(){p--,p===0&&!m&&!d&&(f=pc(b,l))}),_.subscribe(x),!c&&p>0&&(c=new no({next:function(A){return _.next(A)},error:function(A){m=!0,g(),f=pc(y,i,A),_.error(A)},complete:function(){d=!0,g(),f=pc(y,a),_.complete()}}),Un(v).subscribe(c))})(u)}}function pc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new no({next:function(){i.unsubscribe(),t()}});return Un(e.apply(void 0,Yr([],Gr(n)))).subscribe(i)}}function KP(t,e,n){var r,i=!1;return r=t,ZP({connector:function(){return new yP(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function dc(t,e){return Xn(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(Vn(r,function(l){i==null||i.unsubscribe();var u=0,c=o++;Un(t(l,c)).subscribe(i=Vn(r,function(f){return r.next(e?e(l,f,c,u++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function u0(t){return Xn(function(e,n){Un(t).subscribe(Vn(n,function(){return n.complete()},lc)),!n.closed&&e.subscribe(n)})}const QP=t=>t.pipe(Vr(e=>e.styles.textSize),jP(),Vr(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),ro=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=he.scaleDomain,scaleRange:i=he.scaleRange,reverse:o=!1})=>{const a=r[0]??he.scaleDomain[0],s=r[1]??he.scaleDomain[1],l=i[0]??he.scaleRange[0],u=i[1]??he.scaleRange[1];let c=a==="auto"?e<0?e:0:a==="min"?e:a,f=s==="auto"?t>=0?t:0:s==="max"?t:s;const h=t-(t-c)/(1-l),p=f/u;return o?Ji().domain([h,p]).range([n,0]):Ji().domain([h,p]).range([0,n])},c0=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=he.scaleDomain,scaleRange:i=he.scaleRange,reverse:o=!1})=>{e===t&&(t+=1,e-=1);const a=r[0]??he.scaleDomain[0],s=r[1]??he.scaleDomain[1],l=i[0]??he.scaleRange[0],u=i[1]??he.scaleRange[1];let c=a==="auto"?e<0?e:0:a==="min"?e:a,f=s==="auto"?t>=0?t:0:s==="max"?t:s;const h=t-(t-c)/(1-l),p=f/u;return o?Ji().domain([n,0]).range([h,p]):Ji().domain([0,n]).range([h,p])},f0=({axisLabels:t,axisWidth:e,padding:n=0,reverse:r=!1})=>{let i=t.map((l,u)=>u);r&&i.reverse();const o=i.length-1+n*2,a=e/o,s=a*n-a*.5;return Rg().domain([s,e-s]).range(i)},h0=({computedData$:t,fullDataFormatter$:e,layout$:n})=>s0({computedData:t,fullDataFormatter:e,layout:n}).pipe(dc(async r=>r),Vr(r=>{if(r.fullDataFormatter.separateSeries)return Eg(r.layout,r.fullDataFormatter.container,r.computedData.length);{const i=Eg(r.layout,r.fullDataFormatter.container,1);return r.computedData.map((o,a)=>i[0])}})),p0=({fullDataFormatter$:t,layout$:e})=>{const n=new Xr;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let l=0,u=0,c=0,f=0,h=0;return i.position==="bottom"?o.position==="left"?(f=180,u=s):o.position==="right"?(f=180,h=180,l=a,u=s):(f=180,u=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,l=a):(f=180,u=s)):i.position==="left"?o.position==="bottom"?(c=-90,u=s):o.position==="top"?(c=-90,h=180):(f=180,u=s):i.position==="right"?o.position==="bottom"?(c=-90,f=180,u=s,l=a):o.position==="top"?(c=-90,f=180,h=180,l=a):(f=180,u=s):(f=180,u=s),{translate:[l,u],scale:[1,1],rotate:c,rotateX:f,rotateY:h,value:`translate(${l}px, ${u}px) rotate(${c}deg) rotateX(${f}deg) rotateY(${h}deg)`}}return new pe(i=>(s0({fullDataFormatter:t,layout:e}).pipe(u0(n),dc(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.groupAxis,yAxis:o.fullDataFormatter.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},d0=({gridAxesTransform$:t})=>t.pipe(Vr(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotateX(${o}deg) rotateY(${a}deg) rotate(${i}deg)`}}));function JP(t){return`[OrbCharts warn]: ${t.message}`}function tD({columnName:t,expectToBe:e,from:n}){return`Invalid value: '${t}' must be '${e}'
39
39
 
40
- ----> find in '${n}'`}function KT({columnName:t,expectToBe:e,from:n}){return`Value is not correct: '${t}' suppose to be '${e}', it may cause unexpected errors.'
40
+ ----> find in '${n}'`}function eD({columnName:t,expectToBe:e,from:n}){return`Value is not correct: '${t}' suppose to be '${e}', it may cause unexpected errors.'
41
41
 
42
- ----> find in '${n}'`}function QT({chartType:t,config:e,initFn:n}){const r=new Lr,i=new WeakMap;let o=()=>{},a;const s=new cg(e.defaultParams),u=new cg({}),l=s.pipe(Fl(c=>u.pipe(Cg(r),kr(f=>{try{const{status:h,columnName:p,expectToBe:d}=e.validator(f,{validateColumns:e$});if(h==="error")throw new Error(ZT({columnName:p,expectToBe:d,from:`${e.name}.params$`}));h==="warning"&&console.warn(KT({columnName:p,expectToBe:d,from:`${e.name}.params$`}))}catch(h){console.error(qT(h))}return ll(f,c)}))),jT(1));return{params$:u,name:e.name,chartType:t,defaultParams:e.defaultParams,layerIndex:e.layerIndex,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:c=>{s.next(ll(c,e.defaultParams))},setContext:c=>{a=c,a.observer.fullParams$=l}}}const wa=t=>function(e){return function(n){return class{constructor(){const r=QT({chartType:t,config:e,initFn:n});this.params$=r.params$,this.name=r.name,this.chartType=r.chartType,this.defaultParams=r.defaultParams,this.layerIndex=r.layerIndex,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},dn=wa("series"),re=wa("grid"),le=wa("multiGrid"),Ol=wa("tree");function $t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ng(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sa(t){let e,n,r;t.length!==2?(e=$t,n=(s,u)=>$t(t(s),u),r=(s,u)=>t(s)-u):(e=t===$t||t===Ng?t:JT,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function JT(){return 0}function Aa(t){return t===null?NaN:+t}function*t3(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Bg=Sa($t),Fg=Bg.right,e3=Bg.left,n3=Sa(Aa).center,zn=Fg;function r3(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=zl(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const Og=zg(zl),i3=zg(o3);function zg(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),l=i.slice();return s&&u?(Rr(s,l,i,o,a),Rr(s,i,l,o,a),Rr(s,l,i,o,a),Er(u,i,l,o,a),Er(u,l,i,o,a),Er(u,i,l,o,a)):s?(Rr(s,i,l,o,a),Rr(s,l,i,o,a),Rr(s,i,l,o,a)):u&&(Er(u,i,l,o,a),Er(u,l,i,o,a),Er(u,i,l,o,a)),e}}function Rr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function Er(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function o3(t){const e=zl(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function zl(t){const e=Math.floor(t);if(e===t)return a3(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let l=e*o[a];const c=u*e,f=c+u;for(let h=a,p=a+c;h<p;h+=u)l+=o[Math.min(s,h)];for(let h=a,p=s;h<=p;h+=u)l+=o[Math.min(s,h+c)],i[h]=(l+n*(o[Math.max(a,h-f)]+o[Math.min(s,h+f)]))/r,l-=o[Math.max(a,h-c)]}}function a3(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let l=i,c=i+u;l<c;l+=a)s+=r[Math.min(o,l)];for(let l=i,c=o;l<=c;l+=a)s+=r[Math.min(o,l+u)],n[l]=s/e,s-=r[Math.max(i,l-u)]}}function Ta(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function s3(t){return t.length|0}function u3(t){return!(t>0)}function l3(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function c3(t){return e=>t(...e)}function f3(...t){const e=typeof t[t.length-1]=="function"&&c3(t.pop());t=t.map(l3);const n=t.map(s3),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(u3))return o;for(;;){o.push(i.map((s,u)=>t[u][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function h3(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function Gg(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function Yg(t,e){const n=Gg(t,e);return n&&Math.sqrt(n)}function Ii(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Ct{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function p3(t,e){const n=new Ct;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function d3(t,e){const n=new Ct;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Ni extends Map{constructor(e,n=Hg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Gl(this,e))}has(e){return super.has(Gl(this,e))}set(e,n){return super.set(Ug(this,e),n)}delete(e){return super.delete(Wg(this,e))}}class Gn extends Set{constructor(e,n=Hg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(Gl(this,e))}add(e){return super.add(Ug(this,e))}delete(e){return super.delete(Wg(this,e))}}function Gl({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Ug({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Wg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Hg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ir(t){return t}function Xg(t,...e){return Nr(t,Ir,Ir,e)}function jg(t,...e){return Nr(t,Array.from,Ir,e)}function Vg(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function g3(t,...e){return Vg(jg(t,...e),e)}function m3(t,e,...n){return Vg(Zg(t,e,...n),n)}function qg(t,e,...n){return Nr(t,Ir,e,n)}function Zg(t,e,...n){return Nr(t,Array.from,e,n)}function y3(t,...e){return Nr(t,Ir,Kg,e)}function b3(t,...e){return Nr(t,Array.from,Kg,e)}function Kg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Nr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Ni,u=r[a++];let l=-1;for(const c of o){const f=u(c,++l,o),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,a));return e(s)}(t,0)}function Qg(t,e){return Array.from(e,n=>t[n])}function Yl(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Br(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Br(n[i],n[o]))),Qg(t,r)}return t.sort(Ul(n))}function Ul(t=$t){if(t===$t)return Br;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Br(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function x3(t,e,n){return(e.length!==2?Yl(qg(t,e,n),([r,i],[o,a])=>$t(i,a)||$t(r,o)):Yl(Xg(t,n),([r,i],[o,a])=>e(i,a)||$t(r,o))).map(([r])=>r)}var v3=Array.prototype,_3=v3.slice;function Wl(t){return()=>t}const $3=Math.sqrt(50),w3=Math.sqrt(10),S3=Math.sqrt(2);function Pa(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=$3?10:o>=w3?5:o>=S3?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?Pa(t,e,n*2):[s,u,l]}function Yn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Pa(e,t,n):Pa(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function Un(t,e,n){return e=+e,t=+t,n=+n,Pa(t,e,n)[2]}function Ma(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Un(e,t,n):Un(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Hl(t,e,n){let r;for(;;){const i=Un(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Xl(t){return Math.max(1,Math.ceil(Math.log(Ta(t))/Math.LN2)+1)}function Jg(){var t=Ir,e=Ii,n=Xl;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,l=new Array(a);for(o=0;o<a;++o)l[o]=t(i[o],o,i);var c=e(l),f=c[0],h=c[1],p=n(l,f,h);if(!Array.isArray(p)){const _=h,x=+p;if(e===Ii&&([f,h]=Hl(f,h,x)),p=Yn(f,h,x),p[0]<=f&&(u=Un(f,h,x)),p[p.length-1]>=h)if(_>=h&&e===Ii){const w=Un(f,h,x);isFinite(w)&&(w>0?h=(Math.floor(h/w)+1)*w:w<0&&(h=(Math.ceil(h*-w)+1)/-w))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=f;)++g;for(;p[m-1]>h;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var b=new Array(d+1),y;for(o=0;o<=d;++o)y=b[o]=[],y.x0=o>0?p[o-1]:f,y.x1=o<d?p[o]:h;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=l[o])!=null&&f<=s&&s<=h&&b[Math.min(d,Math.floor((s-f)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=l[o])!=null&&f<=s&&s<=h){const _=Math.floor((f-s)*u);b[Math.min(d,_+(p[_]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=l[o])!=null&&f<=s&&s<=h&&b[zn(p,s,0,d)].push(i[o]);return b}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Wl(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Wl([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Wl(Array.isArray(i)?_3.call(i):i),r):n},r}function Bi(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function jl(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function Da(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Vl(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function Ca(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Br:Ul(i);r>n;){if(r-n>600){const u=r-n+1,l=e-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(e-l*f/u+h)),d=Math.min(r,Math.floor(e+(u-l)*f/u+h));Ca(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Fi(t,n,e),i(t[r],o)>0&&Fi(t,n,r);a<s;){for(Fi(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Fi(t,n,s):(++s,Fi(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Fi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function t0(t,e=$t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?$t(a,i)>0:$t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Oi(t,e,n){if(t=Float64Array.from(t3(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Da(t);if(e>=1)return Bi(t);var r,i=(r-1)*e,o=Math.floor(i),a=Bi(Ca(t,o).subarray(0,o+1)),s=Da(t.subarray(o+1));return a+(s-a)*(i-o)}}function e0(t,e,n=Aa){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function n0(t,e,n=Aa){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>Aa(n(t[u],u,t))),e<=0)return Vl(r);if(e>=1)return jl(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return Ca(i,a,0,o,(s,u)=>Br(r[s],r[u])),a=t0(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function A3(t,e,n){const r=Ta(t),i=Oi(t,.75)-Oi(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function T3(t,e,n){const r=Ta(t),i=Yg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function P3(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function M3(t,e){return Oi(t,.5,e)}function D3(t,e){return n0(t,.5,e)}function*C3(t){for(const e of t)yield*e}function ql(t){return Array.from(C3(t))}function L3(t,e){const n=new Ni;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function k3(t,e=R3){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function R3(t,e){return[t,e]}function gn(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function E3(t,e=$t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=$t);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===$t?(s,u)=>Br(n[s],n[u]):Ul(i)),t.forEach((s,u)=>{const l=i(s,o===void 0?s:o);l>=0?((o===void 0||l>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function I3(t,e=$t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?$t(a,i)<0:$t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function r0(t,e=$t){if(e.length===1)return Vl(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function N3(t,e=$t){if(e.length===1)return jl(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function B3(t,e){const n=r0(t,e);return n<0?void 0:n}const F3=i0(Math.random);function i0(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function o0(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function a0(t){if(!(o=t.length))return[];for(var e=-1,n=Da(t,O3),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function O3(t){return t.length}function z3(){return a0(arguments)}function G3(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function Y3(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function U3(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function W3(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function H3(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function X3(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function j3(t,...e){t=new Gn(t);for(const n of e)for(const r of n)t.delete(r);return t}function V3(t,e){const n=e[Symbol.iterator](),r=new Gn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function q3(t,...e){t=new Gn(t),e=e.map(Z3);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function Z3(t){return t instanceof Gn?t:new Gn(t)}function s0(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=u0(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=u0(a);if(r.add(u),Object.is(o,u))break}}return!0}function u0(t){return t!==null&&typeof t=="object"?t.valueOf():t}function K3(t,e){return s0(e,t)}function Q3(...t){const e=new Gn;for(const n of t)for(const r of n)e.add(r);return e}function J3(t){return t}var La=1,ka=2,Zl=3,zi=4,l0=1e-6;function t5(t){return"translate("+t+",0)"}function e5(t){return"translate(0,"+t+")"}function n5(t){return e=>+t(e)}function r5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function i5(){return!this.__axis}function Ra(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=t===La||t===zi?-1:1,c=t===zi||t===ka?"x":"y",f=t===La||t===Zl?t5:e5;function h(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):J3),m=Math.max(o,0)+s,b=e.range(),y=+b[0]+u,_=+b[b.length-1]+u,x=(e.bandwidth?r5:n5)(e.copy(),u),w=p.selection?p.selection():p,$=w.selectAll(".domain").data([null]),R=w.selectAll(".tick").data(d,e).order(),A=R.exit(),D=R.enter().append("g").attr("class","tick"),I=R.select("line"),v=R.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),R=R.merge(D),I=I.merge(D.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),v=v.merge(D.append("text").attr("fill","currentColor").attr(c,l*m).attr("dy",t===La?"0em":t===Zl?"0.71em":"0.32em")),p!==w&&($=$.transition(p),R=R.transition(p),I=I.transition(p),v=v.transition(p),A=A.transition(p).attr("opacity",l0).attr("transform",function(L){return isFinite(L=x(L))?f(L+u):this.getAttribute("transform")}),D.attr("opacity",l0).attr("transform",function(L){var T=this.parentNode.__axis;return f((T&&isFinite(T=T(L))?T:x(L))+u)})),A.remove(),$.attr("d",t===zi||t===ka?a?"M"+l*a+","+y+"H"+u+"V"+_+"H"+l*a:"M"+u+","+y+"V"+_:a?"M"+y+","+l*a+"V"+u+"H"+_+"V"+l*a:"M"+y+","+u+"H"+_),R.attr("opacity",1).attr("transform",function(L){return f(x(L)+u)}),I.attr(c+"2",l*o),v.attr(c,l*m).text(g),w.filter(i5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ka?"start":t===zi?"end":"middle"),w.each(function(){this.__axis=x})}return h.scale=function(p){return arguments.length?(e=p,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(o=a=+p,h):o},h.tickSizeInner=function(p){return arguments.length?(o=+p,h):o},h.tickSizeOuter=function(p){return arguments.length?(a=+p,h):a},h.tickPadding=function(p){return arguments.length?(s=+p,h):s},h.offset=function(p){return arguments.length?(u=+p,h):u},h}function o5(t){return Ra(La,t)}function a5(t){return Ra(ka,t)}function c0(t){return Ra(Zl,t)}function f0(t){return Ra(zi,t)}var s5={value:()=>{}};function Wn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ea(n)}function Ea(t){this._=t}function u5(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ea.prototype=Wn.prototype={constructor:Ea,on:function(t,e){var n=this._,r=u5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=l5(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=h0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=h0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ea(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function l5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function h0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=s5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Kl="http://www.w3.org/1999/xhtml";const Ql={svg:"http://www.w3.org/2000/svg",xhtml:Kl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Gi(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ql.hasOwnProperty(e)?{space:Ql[e],local:t}:t}function c5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Kl&&e.documentElement.namespaceURI===Kl?e.createElement(t):e.createElementNS(n,t)}}function f5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ia(t){var e=Gi(t);return(e.local?f5:c5)(e)}function h5(){}function Na(t){return t==null?h5:function(){return this.querySelector(t)}}function p5(t){typeof t!="function"&&(t=Na(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new Wt(r,this._parents)}function p0(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function d5(){return[]}function Jl(t){return t==null?d5:function(){return this.querySelectorAll(t)}}function g5(t){return function(){return p0(t.apply(this,arguments))}}function m5(t){typeof t=="function"?t=g5(t):t=Jl(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new Wt(r,i)}function tc(t){return function(){return this.matches(t)}}function d0(t){return function(e){return e.matches(t)}}var y5=Array.prototype.find;function b5(t){return function(){return y5.call(this.children,t)}}function x5(){return this.firstElementChild}function v5(t){return this.select(t==null?x5:b5(typeof t=="function"?t:d0(t)))}var _5=Array.prototype.filter;function $5(){return Array.from(this.children)}function w5(t){return function(){return _5.call(this.children,t)}}function S5(t){return this.selectAll(t==null?$5:w5(typeof t=="function"?t:d0(t)))}function A5(t){typeof t!="function"&&(t=tc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Wt(r,this._parents)}function g0(t){return new Array(t.length)}function T5(){return new Wt(this._enter||this._groups.map(g0),this._parents)}function Ba(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ba.prototype={constructor:Ba,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function P5(t){return function(){return t}}function M5(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ba(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function D5(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(h[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new Ba(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(h[s])===u&&(i[s]=u)}function C5(t){return t.__data__}function L5(t,e){if(!arguments.length)return Array.from(this,C5);var n=e?D5:M5,r=this._parents,i=this._groups;typeof t!="function"&&(t=P5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],f=i[l],h=f.length,p=k5(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),b=u[l]=new Array(h);n(c,f,g,m,b,p,e);for(var y=0,_=0,x,w;y<d;++y)if(x=g[y]){for(y>=_&&(_=y+1);!(w=m[_])&&++_<d;);x._next=w||null}}return a=new Wt(a,r),a._enter=s,a._exit=u,a}function k5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function R5(){return new Wt(this._exit||this._groups.map(g0),this._parents)}function E5(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function I5(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l=n[u],c=r[u],f=l.length,h=s[u]=new Array(f),p,d=0;d<f;++d)(p=l[d]||c[d])&&(h[d]=p);for(;u<i;++u)s[u]=n[u];return new Wt(s,this._parents)}function N5(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function B5(t){t||(t=F5);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new Wt(i,this._parents).order()}function F5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function O5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function z5(){return Array.from(this)}function G5(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Y5(){let t=0;for(const e of this)++t;return t}function U5(){return!this.node()}function W5(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function H5(t){return function(){this.removeAttribute(t)}}function X5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function j5(t,e){return function(){this.setAttribute(t,e)}}function V5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function q5(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Z5(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function K5(t,e){var n=Gi(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?X5:H5:typeof e=="function"?n.local?Z5:q5:n.local?V5:j5)(n,e))}function ec(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Q5(t){return function(){this.style.removeProperty(t)}}function J5(t,e,n){return function(){this.style.setProperty(t,e,n)}}function tP(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function eP(t,e,n){return arguments.length>1?this.each((e==null?Q5:typeof e=="function"?tP:J5)(t,e,n??"")):Hn(this.node(),t)}function Hn(t,e){return t.style.getPropertyValue(e)||ec(t).getComputedStyle(t,null).getPropertyValue(e)}function nP(t){return function(){delete this[t]}}function rP(t,e){return function(){this[t]=e}}function iP(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function oP(t,e){return arguments.length>1?this.each((e==null?nP:typeof e=="function"?iP:rP)(t,e)):this.node()[t]}function m0(t){return t.trim().split(/^|\s+/)}function nc(t){return t.classList||new y0(t)}function y0(t){this._node=t,this._names=m0(t.getAttribute("class")||"")}y0.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function b0(t,e){for(var n=nc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function x0(t,e){for(var n=nc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function aP(t){return function(){b0(this,t)}}function sP(t){return function(){x0(this,t)}}function uP(t,e){return function(){(e.apply(this,arguments)?b0:x0)(this,t)}}function lP(t,e){var n=m0(t+"");if(arguments.length<2){for(var r=nc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?uP:e?aP:sP)(n,e))}function cP(){this.textContent=""}function fP(t){return function(){this.textContent=t}}function hP(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function pP(t){return arguments.length?this.each(t==null?cP:(typeof t=="function"?hP:fP)(t)):this.node().textContent}function dP(){this.innerHTML=""}function gP(t){return function(){this.innerHTML=t}}function mP(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function yP(t){return arguments.length?this.each(t==null?dP:(typeof t=="function"?mP:gP)(t)):this.node().innerHTML}function bP(){this.nextSibling&&this.parentNode.appendChild(this)}function xP(){return this.each(bP)}function vP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _P(){return this.each(vP)}function $P(t){var e=typeof t=="function"?t:Ia(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function wP(){return null}function SP(t,e){var n=typeof t=="function"?t:Ia(t),r=e==null?wP:typeof e=="function"?e:Na(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function AP(){var t=this.parentNode;t&&t.removeChild(this)}function TP(){return this.each(AP)}function PP(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function MP(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function DP(t){return this.select(t?MP:PP)}function CP(t){return arguments.length?this.property("__data__",t):this.node().__data__}function LP(t){return function(e){t.call(this,e,this.__data__)}}function kP(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function RP(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function EP(t,e,n){return function(){var r=this.__on,i,o=LP(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function IP(t,e,n){var r=kP(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?EP:RP,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function v0(t,e,n){var r=ec(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function NP(t,e){return function(){return v0(this,t,e)}}function BP(t,e){return function(){return v0(this,t,e.apply(this,arguments))}}function FP(t,e){return this.each((typeof e=="function"?BP:NP)(t,e))}function*OP(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var rc=[null];function Wt(t,e){this._groups=t,this._parents=e}function Xn(){return new Wt([[document.documentElement]],rc)}function zP(){return this}Wt.prototype=Xn.prototype={constructor:Wt,select:p5,selectAll:m5,selectChild:v5,selectChildren:S5,filter:A5,data:L5,enter:T5,exit:R5,join:E5,merge:I5,selection:zP,order:N5,sort:B5,call:O5,nodes:z5,node:G5,size:Y5,empty:U5,each:W5,attr:K5,style:eP,property:oP,classed:lP,text:pP,html:yP,raise:xP,lower:_P,append:$P,insert:SP,remove:TP,clone:DP,datum:CP,on:IP,dispatch:FP,[Symbol.iterator]:OP};function q(t){return typeof t=="string"?new Wt([[document.querySelector(t)]],[document.documentElement]):new Wt([[t]],rc)}function GP(t){return q(Ia(t).call(document.documentElement))}var YP=0;function _0(){return new ic}function ic(){this._="@"+(++YP).toString(36)}ic.prototype=_0.prototype={constructor:ic,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function $0(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ce(t,e){if(t=$0(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function UP(t,e){return t.target&&(t=$0(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ce(n,e))}function WP(t){return typeof t=="string"?new Wt([document.querySelectorAll(t)],[document.documentElement]):new Wt([p0(t)],rc)}const HP={passive:!1},Yi={capture:!0,passive:!1};function oc(t){t.stopImmediatePropagation()}function Fr(t){t.preventDefault(),t.stopImmediatePropagation()}function Fa(t){var e=t.document.documentElement,n=q(t).on("dragstart.drag",Fr,Yi);"onselectstart"in e?n.on("selectstart.drag",Fr,Yi):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Oa(t,e){var n=t.document.documentElement,r=q(t).on("dragstart.drag",null);e&&(r.on("click.drag",Fr,Yi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const za=t=>()=>t;function ac(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}ac.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function XP(t){return!t.ctrlKey&&!t.button}function jP(){return this.parentNode}function VP(t,e){return e??{x:t.x,y:t.y}}function qP(){return navigator.maxTouchPoints||"ontouchstart"in this}function w0(){var t=XP,e=jP,n=VP,r=qP,i={},o=Wn("start","drag","end"),a=0,s,u,l,c,f=0;function h(x){x.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",b,HP).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(x,w){if(!(c||!t.call(this,x,w))){var $=_(this,e.call(this,x,w),x,w,"mouse");$&&(q(x.view).on("mousemove.drag",d,Yi).on("mouseup.drag",g,Yi),Fa(x.view),oc(x),l=!1,s=x.clientX,u=x.clientY,$("start",x))}}function d(x){if(Fr(x),!l){var w=x.clientX-s,$=x.clientY-u;l=w*w+$*$>f}i.mouse("drag",x)}function g(x){q(x.view).on("mousemove.drag mouseup.drag",null),Oa(x.view,l),Fr(x),i.mouse("end",x)}function m(x,w){if(t.call(this,x,w)){var $=x.changedTouches,R=e.call(this,x,w),A=$.length,D,I;for(D=0;D<A;++D)(I=_(this,R,x,w,$[D].identifier,$[D]))&&(oc(x),I("start",x,$[D]))}}function b(x){var w=x.changedTouches,$=w.length,R,A;for(R=0;R<$;++R)(A=i[w[R].identifier])&&(Fr(x),A("drag",x,w[R]))}function y(x){var w=x.changedTouches,$=w.length,R,A;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),R=0;R<$;++R)(A=i[w[R].identifier])&&(oc(x),A("end",x,w[R]))}function _(x,w,$,R,A,D){var I=o.copy(),v=ce(D||$,w),L,T,S;if((S=n.call(x,new ac("beforestart",{sourceEvent:$,target:h,identifier:A,active:a,x:v[0],y:v[1],dx:0,dy:0,dispatch:I}),R))!=null)return L=S.x-v[0]||0,T=S.y-v[1]||0,function M(P,G,O){var k=v,E;switch(P){case"start":i[A]=M,E=a++;break;case"end":delete i[A],--a;case"drag":v=ce(O||G,w),E=a;break}I.call(P,x,new ac(P,{sourceEvent:G,subject:S,target:h,identifier:A,active:E,x:v[0]+L,y:v[1]+T,dx:v[0]-k[0],dy:v[1]-k[1],dispatch:I}),R)}}return h.filter=function(x){return arguments.length?(t=typeof x=="function"?x:za(!!x),h):t},h.container=function(x){return arguments.length?(e=typeof x=="function"?x:za(x),h):e},h.subject=function(x){return arguments.length?(n=typeof x=="function"?x:za(x),h):n},h.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:za(!!x),h):r},h.on=function(){var x=o.on.apply(o,arguments);return x===o?h:x},h.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,h):Math.sqrt(f)},h}function Or(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ui(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function mn(){}var jn=.7,zr=1/jn,Gr="\\s*([+-]?\\d+)\\s*",Wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Be="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ZP=/^#([0-9a-f]{3,8})$/,KP=new RegExp(`^rgb\\(${Gr},${Gr},${Gr}\\)$`),QP=new RegExp(`^rgb\\(${Be},${Be},${Be}\\)$`),JP=new RegExp(`^rgba\\(${Gr},${Gr},${Gr},${Wi}\\)$`),t6=new RegExp(`^rgba\\(${Be},${Be},${Be},${Wi}\\)$`),e6=new RegExp(`^hsl\\(${Wi},${Be},${Be}\\)$`),n6=new RegExp(`^hsla\\(${Wi},${Be},${Be},${Wi}\\)$`),S0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Or(mn,yn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:A0,formatHex:A0,formatHex8:r6,formatHsl:i6,formatRgb:T0,toString:T0});function A0(){return this.rgb().formatHex()}function r6(){return this.rgb().formatHex8()}function i6(){return L0(this).formatHsl()}function T0(){return this.rgb().formatRgb()}function yn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ZP.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?P0(e):n===3?new Rt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ga(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ga(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=KP.exec(t))?new Rt(e[1],e[2],e[3],1):(e=QP.exec(t))?new Rt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=JP.exec(t))?Ga(e[1],e[2],e[3],e[4]):(e=t6.exec(t))?Ga(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=e6.exec(t))?C0(e[1],e[2]/100,e[3]/100,1):(e=n6.exec(t))?C0(e[1],e[2]/100,e[3]/100,e[4]):S0.hasOwnProperty(t)?P0(S0[t]):t==="transparent"?new Rt(NaN,NaN,NaN,0):null}function P0(t){return new Rt(t>>16&255,t>>8&255,t&255,1)}function Ga(t,e,n,r){return r<=0&&(t=e=n=NaN),new Rt(t,e,n,r)}function sc(t){return t instanceof mn||(t=yn(t)),t?(t=t.rgb(),new Rt(t.r,t.g,t.b,t.opacity)):new Rt}function Yr(t,e,n,r){return arguments.length===1?sc(t):new Rt(t,e,n,r??1)}function Rt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Or(Rt,Yr,Ui(mn,{brighter(t){return t=t==null?zr:Math.pow(zr,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?jn:Math.pow(jn,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rt(Vn(this.r),Vn(this.g),Vn(this.b),Ya(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:M0,formatHex:M0,formatHex8:o6,formatRgb:D0,toString:D0}));function M0(){return`#${qn(this.r)}${qn(this.g)}${qn(this.b)}`}function o6(){return`#${qn(this.r)}${qn(this.g)}${qn(this.b)}${qn((isNaN(this.opacity)?1:this.opacity)*255)}`}function D0(){const t=Ya(this.opacity);return`${t===1?"rgb(":"rgba("}${Vn(this.r)}, ${Vn(this.g)}, ${Vn(this.b)}${t===1?")":`, ${t})`}`}function Ya(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Vn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function qn(t){return t=Vn(t),(t<16?"0":"")+t.toString(16)}function C0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Te(t,e,n,r)}function L0(t){if(t instanceof Te)return new Te(t.h,t.s,t.l,t.opacity);if(t instanceof mn||(t=yn(t)),!t)return new Te;if(t instanceof Te)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Te(a,s,u,t.opacity)}function Ua(t,e,n,r){return arguments.length===1?L0(t):new Te(t,e,n,r??1)}function Te(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Or(Te,Ua,Ui(mn,{brighter(t){return t=t==null?zr:Math.pow(zr,t),new Te(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?jn:Math.pow(jn,t),new Te(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Rt(uc(t>=240?t-240:t+120,i,r),uc(t,i,r),uc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Te(k0(this.h),Wa(this.s),Wa(this.l),Ya(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ya(this.opacity);return`${t===1?"hsl(":"hsla("}${k0(this.h)}, ${Wa(this.s)*100}%, ${Wa(this.l)*100}%${t===1?")":`, ${t})`}`}}));function k0(t){return t=(t||0)%360,t<0?t+360:t}function Wa(t){return Math.max(0,Math.min(1,t||0))}function uc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const R0=Math.PI/180,E0=180/Math.PI,Ha=18,I0=.96422,N0=1,B0=.82521,F0=4/29,Ur=6/29,O0=3*Ur*Ur,a6=Ur*Ur*Ur;function z0(t){if(t instanceof Pe)return new Pe(t.l,t.a,t.b,t.opacity);if(t instanceof Fe)return Y0(t);t instanceof Rt||(t=sc(t));var e=hc(t.r),n=hc(t.g),r=hc(t.b),i=lc((.2225045*e+.7168786*n+.0606169*r)/N0),o,a;return e===n&&n===r?o=a=i:(o=lc((.4360747*e+.3850649*n+.1430804*r)/I0),a=lc((.0139322*e+.0971045*n+.7141733*r)/B0)),new Pe(116*i-16,500*(o-i),200*(i-a),t.opacity)}function s6(t,e){return new Pe(t,0,0,e??1)}function Xa(t,e,n,r){return arguments.length===1?z0(t):new Pe(t,e,n,r??1)}function Pe(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Or(Pe,Xa,Ui(mn,{brighter(t){return new Pe(this.l+Ha*(t??1),this.a,this.b,this.opacity)},darker(t){return new Pe(this.l-Ha*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=I0*cc(e),t=N0*cc(t),n=B0*cc(n),new Rt(fc(3.1338561*e-1.6168667*t-.4906146*n),fc(-.9787684*e+1.9161415*t+.033454*n),fc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function lc(t){return t>a6?Math.pow(t,1/3):t/O0+F0}function cc(t){return t>Ur?t*t*t:O0*(t-F0)}function fc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function hc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function G0(t){if(t instanceof Fe)return new Fe(t.h,t.c,t.l,t.opacity);if(t instanceof Pe||(t=z0(t)),t.a===0&&t.b===0)return new Fe(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E0;return new Fe(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function u6(t,e,n,r){return arguments.length===1?G0(t):new Fe(n,e,t,r??1)}function ja(t,e,n,r){return arguments.length===1?G0(t):new Fe(t,e,n,r??1)}function Fe(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Y0(t){if(isNaN(t.h))return new Pe(t.l,0,0,t.opacity);var e=t.h*R0;return new Pe(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Or(Fe,ja,Ui(mn,{brighter(t){return new Fe(this.h,this.c,this.l+Ha*(t??1),this.opacity)},darker(t){return new Fe(this.h,this.c,this.l-Ha*(t??1),this.opacity)},rgb(){return Y0(this).rgb()}}));var U0=-.14861,pc=1.78277,dc=-.29227,Va=-.90649,Hi=1.97294,W0=Hi*Va,H0=Hi*pc,X0=pc*dc-Va*U0;function l6(t){if(t instanceof Zn)return new Zn(t.h,t.s,t.l,t.opacity);t instanceof Rt||(t=sc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(X0*r+W0*e-H0*n)/(X0+W0-H0),o=r-i,a=(Hi*(n-i)-dc*o)/Va,s=Math.sqrt(a*a+o*o)/(Hi*i*(1-i)),u=s?Math.atan2(a,o)*E0-120:NaN;return new Zn(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?l6(t):new Zn(t,e,n,r??1)}function Zn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Or(Zn,Me,Ui(mn,{brighter(t){return t=t==null?zr:Math.pow(zr,t),new Zn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?jn:Math.pow(jn,t),new Zn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*R0,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Rt(255*(e+n*(U0*r+pc*i)),255*(e+n*(dc*r+Va*i)),255*(e+n*(Hi*r)),this.opacity)}}));function j0(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function V0(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return j0((n-r/e)*e,a,i,o,s)}}function q0(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return j0((n-r/e)*e,i,o,a,s)}}const qa=t=>()=>t;function Z0(t,e){return function(n){return t+n*e}}function c6(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Za(t,e){var n=e-t;return n?Z0(t,n>180||n<-180?n-360*Math.round(n/360):n):qa(isNaN(t)?e:t)}function f6(t){return(t=+t)==1?Et:function(e,n){return n-e?c6(e,n,t):qa(isNaN(e)?n:e)}}function Et(t,e){var n=e-t;return n?Z0(t,n):qa(isNaN(t)?e:t)}const Xi=function t(e){var n=f6(e);function r(i,o){var a=n((i=Yr(i)).r,(o=Yr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=Et(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function K0(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Yr(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var Q0=K0(V0),h6=K0(q0);function gc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function J0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function p6(t,e){return(J0(e)?gc:tm)(t,e)}function tm(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Ze(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function em(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ge(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function nm(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Ze(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var mc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yc=new RegExp(mc.source,"g");function d6(t){return function(){return t}}function g6(t){return function(e){return t(e)+""}}function bc(t,e){var n=mc.lastIndex=yc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=mc.exec(t))&&(i=yc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:ge(r,i)})),n=yc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?g6(u[0].x):d6(e):(e=u.length,function(l){for(var c=0,f;c<e;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function Ze(t,e){var n=typeof e,r;return e==null||n==="boolean"?qa(e):(n==="number"?ge:n==="string"?(r=yn(e))?(e=r,Xi):bc:e instanceof yn?Xi:e instanceof Date?em:J0(e)?gc:Array.isArray(e)?tm:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?nm:ge)(t,e)}function m6(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function y6(t,e){var n=Za(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ka(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var rm=180/Math.PI,xc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function im(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*rm,skewX:Math.atan(u)*rm,scaleX:a,scaleY:s}}var Qa;function b6(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?xc:im(e.a,e.b,e.c,e.d,e.e,e.f)}function x6(t){return t==null||(Qa||(Qa=document.createElementNS("http://www.w3.org/2000/svg","g")),Qa.setAttribute("transform",t),!(t=Qa.transform.baseVal.consolidate()))?xc:(t=t.matrix,im(t.a,t.b,t.c,t.d,t.e,t.f))}function om(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ge(l,f)},{i:g-2,x:ge(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:ge(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:ge(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ge(l,f)},{i:g-2,x:ge(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),a(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,g=h.length,m;++d<g;)f[(m=h[d]).i]=m.x(p);return f.join("")}}}var am=om(b6,"px, ","px)","deg)"),sm=om(x6,", ",")",")"),v6=1e-12;function um(t){return((t=Math.exp(t))+1/t)/2}function _6(t){return((t=Math.exp(t))-1/t)/2}function $6(t){return((t=Math.exp(2*t))-1)/(t+1)}const lm=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],l=o[2],c=a[0],f=a[1],h=a[2],p=c-s,d=f-u,g=p*p+d*d,m,b;if(g<v6)b=Math.log(h/l)/e,m=function(R){return[s+R*p,u+R*d,l*Math.exp(e*R*b)]};else{var y=Math.sqrt(g),_=(h*h-l*l+r*g)/(2*l*n*y),x=(h*h-l*l-r*g)/(2*h*n*y),w=Math.log(Math.sqrt(_*_+1)-_),$=Math.log(Math.sqrt(x*x+1)-x);b=($-w)/e,m=function(R){var A=R*b,D=um(w),I=l/(n*y)*(D*$6(e*A+w)-_6(w));return[s+I*p,u+I*d,l*D/um(e*A+w)]}}return m.duration=b*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function cm(t){return function(e,n){var r=t((e=Ua(e)).h,(n=Ua(n)).h),i=Et(e.s,n.s),o=Et(e.l,n.l),a=Et(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const w6=cm(Za);var S6=cm(Et);function A6(t,e){var n=Et((t=Xa(t)).l,(e=Xa(e)).l),r=Et(t.a,e.a),i=Et(t.b,e.b),o=Et(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function fm(t){return function(e,n){var r=t((e=ja(e)).h,(n=ja(n)).h),i=Et(e.c,n.c),o=Et(e.l,n.l),a=Et(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const T6=fm(Za);var P6=fm(Et);function hm(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Et(i.s,o.s),u=Et(i.l,o.l),l=Et(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=e,r}(1)}const M6=hm(Za);var Ja=hm(Et);function pm(t,e){e===void 0&&(e=t,t=Ze);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function D6(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Wr=0,ji=0,Vi=0,dm=1e3,ts,qi,es=0,Kn=0,ns=0,Zi=typeof performance=="object"&&performance.now?performance:Date,gm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ki(){return Kn||(gm(C6),Kn=Zi.now()+ns)}function C6(){Kn=0}function Qi(){this._call=this._time=this._next=null}Qi.prototype=rs.prototype={constructor:Qi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ki():+n)+(e==null?0:+e),!this._next&&qi!==this&&(qi?qi._next=this:ts=this,qi=this),this._call=t,this._time=n,vc()},stop:function(){this._call&&(this._call=null,this._time=1/0,vc())}};function rs(t,e,n){var r=new Qi;return r.restart(t,e,n),r}function mm(){Ki(),++Wr;for(var t=ts,e;t;)(e=Kn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Wr}function ym(){Kn=(es=Zi.now())+ns,Wr=ji=0;try{mm()}finally{Wr=0,k6(),Kn=0}}function L6(){var t=Zi.now(),e=t-es;e>dm&&(ns-=e,es=t)}function k6(){for(var t,e=ts,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ts=n);qi=t,vc(r)}function vc(t){if(!Wr){ji&&(ji=clearTimeout(ji));var e=t-Kn;e>24?(t<1/0&&(ji=setTimeout(ym,t-Zi.now()-ns)),Vi&&(Vi=clearInterval(Vi))):(Vi||(es=Zi.now(),Vi=setInterval(L6,dm)),Wr=1,gm(ym))}}function _c(t,e,n){var r=new Qi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function R6(t,e,n){var r=new Qi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?Ki():+s,r._restart(function u(l){l+=i,r._restart(u,i+=a,s),o(l)},a,s)},r.restart(t,e,n),r)}var E6=Wn("start","end","cancel","interrupt"),I6=[],bm=0,$c=1,wc=2,is=3,xm=4,Sc=5,os=6;function as(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;N6(t,n,{name:e,index:r,group:i,on:E6,tween:I6,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:bm})}function Ac(t,e){var n=De(t,e);if(n.state>bm)throw new Error("too late; already scheduled");return n}function Oe(t,e){var n=De(t,e);if(n.state>is)throw new Error("too late; already running");return n}function De(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function N6(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=rs(o,0,n.time);function o(l){n.state=$c,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,f,h,p;if(n.state!==$c)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===is)return _c(a);p.state===xm?(p.state=os,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=os,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(_c(function(){n.state===is&&(n.state=xm,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=wc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===wc){for(n.state=is,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=Sc,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===Sc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=os,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Qn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>wc&&r.state<Sc,r.state=os,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function B6(t){return this.each(function(){Qn(this,t)})}function F6(t,e){var n,r;return function(){var i=Oe(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function O6(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Oe(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function z6(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=De(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?F6:O6)(n,t,e))}function Tc(t,e,n){var r=t._id;return t.each(function(){var i=Oe(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return De(i,r).value[e]}}function vm(t,e){var n;return(typeof e=="number"?ge:e instanceof yn?Xi:(n=yn(e))?(e=n,Xi):bc)(t,e)}function G6(t){return function(){this.removeAttribute(t)}}function Y6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function U6(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function W6(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function H6(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function X6(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function j6(t,e){var n=Gi(t),r=n==="transform"?sm:vm;return this.attrTween(t,typeof e=="function"?(n.local?X6:H6)(n,r,Tc(this,"attr."+t,e)):e==null?(n.local?Y6:G6)(n):(n.local?W6:U6)(n,r,e))}function V6(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function q6(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Z6(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&q6(t,o)),n}return i._value=e,i}function K6(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&V6(t,o)),n}return i._value=e,i}function Q6(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Gi(t);return this.tween(n,(r.local?Z6:K6)(r,e))}function J6(t,e){return function(){Ac(this,t).delay=+e.apply(this,arguments)}}function t8(t,e){return e=+e,function(){Ac(this,t).delay=e}}function e8(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?J6:t8)(e,t)):De(this.node(),e).delay}function n8(t,e){return function(){Oe(this,t).duration=+e.apply(this,arguments)}}function r8(t,e){return e=+e,function(){Oe(this,t).duration=e}}function i8(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?n8:r8)(e,t)):De(this.node(),e).duration}function o8(t,e){if(typeof e!="function")throw new Error;return function(){Oe(this,t).ease=e}}function a8(t){var e=this._id;return arguments.length?this.each(o8(e,t)):De(this.node(),e).ease}function s8(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Oe(this,t).ease=n}}function u8(t){if(typeof t!="function")throw new Error;return this.each(s8(this._id,t))}function l8(t){typeof t!="function"&&(t=tc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new ze(r,this._parents,this._name,this._id)}function c8(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],l=n[s],c=u.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=u[p]||l[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new ze(a,this._parents,this._name,this._id)}function f8(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function h8(t,e,n){var r,i,o=f8(e)?Ac:Oe;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function p8(t,e){var n=this._id;return arguments.length<2?De(this.node(),n).on.on(t):this.each(h8(n,t,e))}function d8(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function g8(){return this.on("end.remove",d8(this._id))}function m8(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Na(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,l=o[a]=new Array(u),c,f,h=0;h<u;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f,as(l[h],e,n,h,l,De(c,n)));return new ze(o,this._parents,e,n)}function y8(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Jl(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,f=0;f<l;++f)if(c=u[f]){for(var h=t.call(c,c.__data__,f,u),p,d=De(c,n),g=0,m=h.length;g<m;++g)(p=h[g])&&as(p,e,n,g,h,d);o.push(h),a.push(c)}return new ze(o,a,e,n)}var b8=Xn.prototype.constructor;function x8(){return new b8(this._groups,this._parents)}function v8(t,e){var n,r,i;return function(){var o=Hn(this,t),a=(this.style.removeProperty(t),Hn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function _m(t){return function(){this.style.removeProperty(t)}}function _8(t,e,n){var r,i=n+"",o;return function(){var a=Hn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function $8(t,e,n){var r,i,o;return function(){var a=Hn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Hn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function w8(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Oe(this,t),l=u.on,c=u.value[o]==null?s||(s=_m(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function S8(t,e,n){var r=(t+="")=="transform"?am:vm;return e==null?this.styleTween(t,v8(t,r)).on("end.style."+t,_m(t)):typeof e=="function"?this.styleTween(t,$8(t,r,Tc(this,"style."+t,e))).each(w8(this._id,t)):this.styleTween(t,_8(t,r,e),n).on("end.style."+t,null)}function A8(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function T8(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&A8(t,a,n)),r}return o._value=e,o}function P8(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,T8(t,e,n??""))}function M8(t){return function(){this.textContent=t}}function D8(t){return function(){var e=t(this);this.textContent=e??""}}function C8(t){return this.tween("text",typeof t=="function"?D8(Tc(this,"text",t)):M8(t==null?"":t+""))}function L8(t){return function(e){this.textContent=t.call(this,e)}}function k8(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&L8(i)),e}return r._value=t,r}function R8(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,k8(t))}function E8(){for(var t=this._name,e=this._id,n=wm(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=De(u,e);as(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ze(r,this._parents,t,n)}function I8(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var l=Oe(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var N8=0;function ze(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function $m(t){return Xn().transition(t)}function wm(){return++N8}var Ke=Xn.prototype;ze.prototype=$m.prototype={constructor:ze,select:m8,selectAll:y8,selectChild:Ke.selectChild,selectChildren:Ke.selectChildren,filter:l8,merge:c8,selection:x8,transition:E8,call:Ke.call,nodes:Ke.nodes,node:Ke.node,size:Ke.size,empty:Ke.empty,each:Ke.each,on:p8,attr:j6,attrTween:Q6,style:S8,styleTween:P8,text:C8,textTween:R8,remove:g8,tween:z6,delay:e8,duration:i8,ease:a8,easeVarying:u8,end:I8,[Symbol.iterator]:Ke[Symbol.iterator]};const B8=t=>+t;function F8(t){return t*t}function O8(t){return t*(2-t)}function Sm(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function z8(t){return t*t*t}function G8(t){return--t*t*t+1}function Ji(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Pc=3,Y8=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(Pc),U8=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(Pc),Am=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(Pc),Tm=Math.PI,Pm=Tm/2;function W8(t){return+t==1?1:1-Math.cos(t*Pm)}function H8(t){return Math.sin(t*Pm)}function Mm(t){return(1-Math.cos(Tm*t))/2}function bn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function X8(t){return bn(1-+t)}function j8(t){return 1-bn(t)}function Dm(t){return((t*=2)<=1?bn(1-t):2-bn(t-1))/2}function V8(t){return 1-Math.sqrt(1-t*t)}function q8(t){return Math.sqrt(1- --t*t)}function Cm(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Mc=4/11,Z8=6/11,K8=8/11,Q8=3/4,J8=9/11,tM=10/11,eM=15/16,nM=21/22,rM=63/64,ss=1/Mc/Mc;function iM(t){return 1-to(1-t)}function to(t){return(t=+t)<Mc?ss*t*t:t<K8?ss*(t-=Z8)*t+Q8:t<tM?ss*(t-=J8)*t+eM:ss*(t-=nM)*t+rM}function oM(t){return((t*=2)<=1?1-to(1-t):to(t-1)+1)/2}var Dc=1.70158,aM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(Dc),sM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(Dc),Lm=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(Dc),Hr=2*Math.PI,Cc=1,Lc=.3,uM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Hr);function i(o){return e*bn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Hr)},i.period=function(o){return t(e,o)},i}(Cc,Lc),eo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Hr);function i(o){return 1-e*bn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Hr)},i.period=function(o){return t(e,o)},i}(Cc,Lc),lM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Hr);function i(o){return((o=o*2-1)<0?e*bn(-o)*Math.sin((r-o)/n):2-e*bn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Hr)},i.period=function(o){return t(e,o)},i}(Cc,Lc),cM={time:null,delay:0,duration:250,ease:Ji};function fM(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function hM(t){var e,n;t instanceof ze?(e=t._id,t=t._name):(e=wm(),(n=cM).time=Ki(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)(u=a[l])&&as(u,t,e,l,a,n||fM(u,e));return new ze(r,this._parents,t,e)}Xn.prototype.interrupt=B6,Xn.prototype.transition=hM;var pM=[null];function dM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>$c&&r.name===e)return new ze([[t]],pM,e,+i)}return null}const kc=t=>()=>t;function gM(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function mM(t){t.stopImmediatePropagation()}function Rc(t){t.preventDefault(),t.stopImmediatePropagation()}var km={name:"drag"},Ec={name:"space"},Xr={name:"handle"},jr={name:"center"};const{abs:Rm,max:Ft,min:Ot}=Math;function Em(t){return[+t[0],+t[1]]}function Ic(t){return[Em(t[0]),Em(t[1])]}var us={name:"x",handles:["w","e"].map(no),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ls={name:"y",handles:["n","s"].map(no),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},yM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(no),input:function(t){return t==null?null:Ic(t)},output:function(t){return t}},Qe={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Im={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Nm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},bM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},xM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function no(t){return{type:t}}function vM(t){return!t.ctrlKey&&!t.button}function _M(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function $M(){return navigator.maxTouchPoints||"ontouchstart"in this}function Nc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function wM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function SM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function AM(){return Bc(us)}function TM(){return Bc(ls)}function PM(){return Bc(yM)}function Bc(t){var e=_M,n=vM,r=$M,i=!0,o=Wn("start","brush","end"),a=6,s;function u(m){var b=m.property("__brush",g).selectAll(".overlay").data([no("overlay")]);b.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Qe.overlay).merge(b).each(function(){var _=Nc(this).extent;q(this).attr("x",_[0][0]).attr("y",_[0][1]).attr("width",_[1][0]-_[0][0]).attr("height",_[1][1]-_[0][1])}),m.selectAll(".selection").data([no("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Qe.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=m.selectAll(".handle").data(t.handles,function(_){return _.type});y.exit().remove(),y.enter().append("rect").attr("class",function(_){return"handle handle--"+_.type}).attr("cursor",function(_){return Qe[_.type]}),m.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,b,y){m.tween?m.on("start.brush",function(_){c(this,arguments).beforestart().start(_)}).on("interrupt.brush end.brush",function(_){c(this,arguments).end(_)}).tween("brush",function(){var _=this,x=_.__brush,w=c(_,arguments),$=x.selection,R=t.input(typeof b=="function"?b.apply(this,arguments):b,x.extent),A=Ze($,R);function D(I){x.selection=I===1&&R===null?null:A(I),l.call(_),w.brush()}return $!==null&&R!==null?D:D(1)}):m.each(function(){var _=this,x=arguments,w=_.__brush,$=t.input(typeof b=="function"?b.apply(_,x):b,w.extent),R=c(_,x).beforestart();Qn(_),w.selection=$===null?null:$,l.call(_),R.start(y).brush(y).end(y)})},u.clear=function(m,b){u.move(m,null,b)};function l(){var m=q(this),b=Nc(this).selection;b?(m.selectAll(".selection").style("display",null).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?b[1][0]-a/2:b[0][0]-a/2}).attr("y",function(y){return y.type[0]==="s"?b[1][1]-a/2:b[0][1]-a/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?b[1][0]-b[0][0]+a:a}).attr("height",function(y){return y.type==="e"||y.type==="w"?b[1][1]-b[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(m,b,y){var _=m.__brush.emitter;return _&&(!y||!_.clean)?_:new f(m,b,y)}function f(m,b,y){this.that=m,this.args=b,this.state=m.__brush,this.active=0,this.clean=y}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,b){return this.starting?(this.starting=!1,this.emit("start",m,b)):this.emit("brush",m),this},brush:function(m,b){return this.emit("brush",m,b),this},end:function(m,b){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,b)),this},emit:function(m,b,y){var _=q(this.that).datum();o.call(m,this.that,new gM(m,{sourceEvent:b,target:u,selection:t.output(this.state.selection),mode:y,dispatch:o}),_)}};function h(m){if(s&&!m.touches||!n.apply(this,arguments))return;var b=this,y=m.target.__data__.type,_=(i&&m.metaKey?y="overlay":y)==="selection"?km:i&&m.altKey?jr:Xr,x=t===ls?null:bM[y],w=t===us?null:xM[y],$=Nc(b),R=$.extent,A=$.selection,D=R[0][0],I,v,L=R[0][1],T,S,M=R[1][0],P,G,O=R[1][1],k,E,C=0,F=0,H,J=x&&w&&i&&m.shiftKey,z,V,Y=Array.from(m.touches||[m],ut=>{const Pt=ut.identifier;return ut=ce(ut,b),ut.point0=ut.slice(),ut.identifier=Pt,ut});Qn(b);var K=c(b,arguments,!0).beforestart();if(y==="overlay"){A&&(H=!0);const ut=[Y[0],Y[1]||Y[0]];$.selection=A=[[I=t===ls?D:Ot(ut[0][0],ut[1][0]),T=t===us?L:Ot(ut[0][1],ut[1][1])],[P=t===ls?M:Ft(ut[0][0],ut[1][0]),k=t===us?O:Ft(ut[0][1],ut[1][1])]],Y.length>1&&dt(m)}else I=A[0][0],T=A[0][1],P=A[1][0],k=A[1][1];v=I,S=T,G=P,E=k;var j=q(b).attr("pointer-events","none"),nt=j.selectAll(".overlay").attr("cursor",Qe[y]);if(m.touches)K.moved=X,K.ended=ft;else{var st=q(m.view).on("mousemove.brush",X,!0).on("mouseup.brush",ft,!0);i&&st.on("keydown.brush",Ut,!0).on("keyup.brush",ee,!0),Fa(m.view)}l.call(b),K.start(m,_.name);function X(ut){for(const Pt of ut.changedTouches||[ut])for(const Ho of Y)Ho.identifier===Pt.identifier&&(Ho.cur=ce(Pt,b));if(J&&!z&&!V&&Y.length===1){const Pt=Y[0];Rm(Pt.cur[0]-Pt[0])>Rm(Pt.cur[1]-Pt[1])?V=!0:z=!0}for(const Pt of Y)Pt.cur&&(Pt[0]=Pt.cur[0],Pt[1]=Pt.cur[1]);H=!0,Rc(ut),dt(ut)}function dt(ut){const Pt=Y[0],Ho=Pt.point0;var Ln;switch(C=Pt[0]-Ho[0],F=Pt[1]-Ho[1],_){case Ec:case km:{x&&(C=Ft(D-I,Ot(M-P,C)),v=I+C,G=P+C),w&&(F=Ft(L-T,Ot(O-k,F)),S=T+F,E=k+F);break}case Xr:{Y[1]?(x&&(v=Ft(D,Ot(M,Y[0][0])),G=Ft(D,Ot(M,Y[1][0])),x=1),w&&(S=Ft(L,Ot(O,Y[0][1])),E=Ft(L,Ot(O,Y[1][1])),w=1)):(x<0?(C=Ft(D-I,Ot(M-I,C)),v=I+C,G=P):x>0&&(C=Ft(D-P,Ot(M-P,C)),v=I,G=P+C),w<0?(F=Ft(L-T,Ot(O-T,F)),S=T+F,E=k):w>0&&(F=Ft(L-k,Ot(O-k,F)),S=T,E=k+F));break}case jr:{x&&(v=Ft(D,Ot(M,I-C*x)),G=Ft(D,Ot(M,P+C*x))),w&&(S=Ft(L,Ot(O,T-F*w)),E=Ft(L,Ot(O,k+F*w)));break}}G<v&&(x*=-1,Ln=I,I=P,P=Ln,Ln=v,v=G,G=Ln,y in Im&&nt.attr("cursor",Qe[y=Im[y]])),E<S&&(w*=-1,Ln=T,T=k,k=Ln,Ln=S,S=E,E=Ln,y in Nm&&nt.attr("cursor",Qe[y=Nm[y]])),$.selection&&(A=$.selection),z&&(v=A[0][0],G=A[1][0]),V&&(S=A[0][1],E=A[1][1]),(A[0][0]!==v||A[0][1]!==S||A[1][0]!==G||A[1][1]!==E)&&($.selection=[[v,S],[G,E]],l.call(b),K.brush(ut,_.name))}function ft(ut){if(mM(ut),ut.touches){if(ut.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Oa(ut.view,H),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);j.attr("pointer-events","all"),nt.attr("cursor",Qe.overlay),$.selection&&(A=$.selection),wM(A)&&($.selection=null,l.call(b)),K.end(ut,_.name)}function Ut(ut){switch(ut.keyCode){case 16:{J=x&&w;break}case 18:{_===Xr&&(x&&(P=G-C*x,I=v+C*x),w&&(k=E-F*w,T=S+F*w),_=jr,dt(ut));break}case 32:{(_===Xr||_===jr)&&(x<0?P=G-C:x>0&&(I=v-C),w<0?k=E-F:w>0&&(T=S-F),_=Ec,nt.attr("cursor",Qe.selection),dt(ut));break}default:return}Rc(ut)}function ee(ut){switch(ut.keyCode){case 16:{J&&(z=V=J=!1,dt(ut));break}case 18:{_===jr&&(x<0?P=G:x>0&&(I=v),w<0?k=E:w>0&&(T=S),_=Xr,dt(ut));break}case 32:{_===Ec&&(ut.altKey?(x&&(P=G-C*x,I=v+C*x),w&&(k=E-F*w,T=S+F*w),_=jr):(x<0?P=G:x>0&&(I=v),w<0?k=E:w>0&&(T=S),_=Xr),nt.attr("cursor",Qe[y]),dt(ut));break}default:return}Rc(ut)}}function p(m){c(this,arguments).moved(m)}function d(m){c(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=Ic(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:kc(Ic(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:kc(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:kc(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var Bm=Math.abs,Vr=Math.cos,qr=Math.sin,Fm=Math.PI,cs=Fm/2,Om=Fm*2,zm=Math.max,Fc=1e-12;function Oc(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function MM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function DM(){return zc(!1,!1)}function CM(){return zc(!1,!0)}function LM(){return zc(!0,!1)}function zc(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,l=new Array(u),c=Oc(0,u),f=new Array(u*u),h=new Array(u),p=0,d;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let b=0;b<u;++b)m+=s[g*u+b]+t*s[b*u+g];p+=l[g]=m}p=zm(0,Om-n*u)/p,d=p?n:Om/u;{let g=0;r&&c.sort((m,b)=>r(l[m],l[b]));for(const m of c){const b=g;if(t){const y=Oc(~u+1,u).filter(_=>_<0?s[~_*u+m]:s[m*u+_]);i&&y.sort((_,x)=>i(_<0?-s[~_*u+m]:s[m*u+_],x<0?-s[~x*u+m]:s[m*u+x]));for(const _ of y)if(_<0){const x=f[~_*u+m]||(f[~_*u+m]={source:null,target:null});x.target={index:m,startAngle:g,endAngle:g+=s[~_*u+m]*p,value:s[~_*u+m]}}else{const x=f[m*u+_]||(f[m*u+_]={source:null,target:null});x.source={index:m,startAngle:g,endAngle:g+=s[m*u+_]*p,value:s[m*u+_]}}h[m]={index:m,startAngle:b,endAngle:g,value:l[m]}}else{const y=Oc(0,u).filter(_=>s[m*u+_]||s[_*u+m]);i&&y.sort((_,x)=>i(s[m*u+_],s[m*u+x]));for(const _ of y){let x;if(m<_?(x=f[m*u+_]||(f[m*u+_]={source:null,target:null}),x.source={index:m,startAngle:g,endAngle:g+=s[m*u+_]*p,value:s[m*u+_]}):(x=f[_*u+m]||(f[_*u+m]={source:null,target:null}),x.target={index:m,startAngle:g,endAngle:g+=s[m*u+_]*p,value:s[m*u+_]},m===_&&(x.source=x.target)),x.source&&x.target&&x.source.value<x.target.value){const w=x.source;x.source=x.target,x.target=w}}h[m]={index:m,startAngle:b,endAngle:g,value:l[m]}}g+=d}}return f=Object.values(f),f.groups=h,o?f.sort(o):f}return a.padAngle=function(s){return arguments.length?(n=zm(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=MM(s))._=s,a):o&&o._},a}const Gc=Math.PI,Yc=2*Gc,Jn=1e-6,kM=Yc-Jn;function Gm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function RM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Gm;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let ro=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Gm:RM(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,l=i-n,c=a-e,f=s-n,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>Jn)if(!(Math.abs(f*u-l*c)>Jn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=u*u+l*l,m=p*p+d*d,b=Math.sqrt(g),y=Math.sqrt(h),_=o*Math.tan((Gc-Math.acos((g+h-m)/(2*b*y)))/2),x=_/y,w=_/b;Math.abs(x-1)>Jn&&this._append`L${e+x*c},${n+x*f}`,this._append`A${o},${o},0,0,${+(f*p>c*d)},${this._x1=e+w*u},${this._y1=n+w*l}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=e+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Jn||Math.abs(this._y1-c)>Jn)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%Yc+Yc),h>kM?this._append`A${r},${r},0,1,${f},${e-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>Jn&&this._append`A${r},${r},0,${+(h>=Gc)},${f},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Uc(){return new ro}Uc.prototype=ro.prototype;function EM(t=3){return new ro(+t)}var IM=Array.prototype.slice;function tr(t){return function(){return t}}function NM(t){return t.source}function BM(t){return t.target}function Ym(t){return t.radius}function FM(t){return t.startAngle}function OM(t){return t.endAngle}function zM(){return 0}function GM(){return 10}function Um(t){var e=NM,n=BM,r=Ym,i=Ym,o=FM,a=OM,s=zM,u=null;function l(){var c,f=e.apply(this,arguments),h=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=IM.call(arguments),g=+r.apply(this,(d[0]=f,d)),m=o.apply(this,d)-cs,b=a.apply(this,d)-cs,y=+i.apply(this,(d[0]=h,d)),_=o.apply(this,d)-cs,x=a.apply(this,d)-cs;if(u||(u=c=Uc()),p>Fc&&(Bm(b-m)>p*2+Fc?b>m?(m+=p,b-=p):(m-=p,b+=p):m=b=(m+b)/2,Bm(x-_)>p*2+Fc?x>_?(_+=p,x-=p):(_-=p,x+=p):_=x=(_+x)/2),u.moveTo(g*Vr(m),g*qr(m)),u.arc(0,0,g,m,b),m!==_||b!==x)if(t){var w=+t.apply(this,arguments),$=y-w,R=(_+x)/2;u.quadraticCurveTo(0,0,$*Vr(_),$*qr(_)),u.lineTo(y*Vr(R),y*qr(R)),u.lineTo($*Vr(x),$*qr(x))}else u.quadraticCurveTo(0,0,y*Vr(_),y*qr(_)),u.arc(0,0,y,_,x);if(u.quadraticCurveTo(0,0,g*Vr(m),g*qr(m)),u.closePath(),c)return u=null,c+""||null}return t&&(l.headRadius=function(c){return arguments.length?(t=typeof c=="function"?c:tr(+c),l):t}),l.radius=function(c){return arguments.length?(r=i=typeof c=="function"?c:tr(+c),l):r},l.sourceRadius=function(c){return arguments.length?(r=typeof c=="function"?c:tr(+c),l):r},l.targetRadius=function(c){return arguments.length?(i=typeof c=="function"?c:tr(+c),l):i},l.startAngle=function(c){return arguments.length?(o=typeof c=="function"?c:tr(+c),l):o},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:tr(+c),l):a},l.padAngle=function(c){return arguments.length?(s=typeof c=="function"?c:tr(+c),l):s},l.source=function(c){return arguments.length?(e=c,l):e},l.target=function(c){return arguments.length?(n=c,l):n},l.context=function(c){return arguments.length?(u=c??null,l):u},l}function YM(){return Um()}function UM(){return Um(GM)}var WM=Array.prototype,Wm=WM.slice;function HM(t,e){return t-e}function XM(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const xn=t=>()=>t;function jM(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=VM(t,e[n]))return i;return 0}function VM(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],l=u[0],c=u[1],f=t[s],h=f[0],p=f[1];if(qM(u,f,e))return 0;c>r!=p>r&&n<(h-l)*(r-c)/(p-c)+l&&(i=-i)}return i}function qM(t,e,n){var r;return ZM(t,e,n)&&KM(t[r=+(t[0]===e[0])],n[r],e[r])}function ZM(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function KM(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function QM(){}var Je=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Wc(){var t=1,e=1,n=Xl,r=u;function i(l){var c=n(l);if(Array.isArray(c))c=c.slice().sort(HM);else{const f=Ii(l,JM);for(c=Yn(...Hl(f[0],f[1],c),c);c[c.length-1]>=f[1];)c.pop();for(;c[1]<f[0];)c.shift()}return c.map(f=>o(l,f))}function o(l,c){const f=c==null?NaN:+c;if(isNaN(f))throw new Error(`invalid value: ${c}`);var h=[],p=[];return a(l,f,function(d){r(d,l,f),XM(d)>0?h.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=h.length,b;g<m;++g)if(jM((b=h[g])[0],d)!==-1){b.push(d);return}}),{type:"MultiPolygon",value:c,coordinates:h}}function a(l,c,f){var h=new Array,p=new Array,d,g,m,b,y,_;for(d=g=-1,b=er(l[0],c),Je[b<<1].forEach(x);++d<t-1;)m=b,b=er(l[d+1],c),Je[m|b<<1].forEach(x);for(Je[b<<0].forEach(x);++g<e-1;){for(d=-1,b=er(l[g*t+t],c),y=er(l[g*t],c),Je[b<<1|y<<2].forEach(x);++d<t-1;)m=b,b=er(l[g*t+t+d+1],c),_=y,y=er(l[g*t+d+1],c),Je[m|b<<1|y<<2|_<<3].forEach(x);Je[b|y<<3].forEach(x)}for(d=-1,y=l[g*t]>=c,Je[y<<2].forEach(x);++d<t-1;)_=y,y=er(l[g*t+d+1],c),Je[y<<2|_<<3].forEach(x);Je[y<<3].forEach(x);function x(w){var $=[w[0][0]+d,w[0][1]+g],R=[w[1][0]+d,w[1][1]+g],A=s($),D=s(R),I,v;(I=p[A])?(v=h[D])?(delete p[I.end],delete h[v.start],I===v?(I.ring.push(R),f(I.ring)):h[I.start]=p[v.end]={start:I.start,end:v.end,ring:I.ring.concat(v.ring)}):(delete p[I.end],I.ring.push(R),p[I.end=D]=I):(I=h[D])?(v=p[A])?(delete h[I.start],delete p[v.end],I===v?(I.ring.push(R),f(I.ring)):h[v.start]=p[I.end]={start:v.start,end:I.end,ring:v.ring.concat(I.ring)}):(delete h[I.start],I.ring.unshift($),h[I.start=A]=I):h[A]=p[D]={start:A,end:D,ring:[$,R]}}}function s(l){return l[0]*2+l[1]*(t+1)*4}function u(l,c,f){l.forEach(function(h){var p=h[0],d=h[1],g=p|0,m=d|0,b=Hc(c[m*t+g]);p>0&&p<t&&g===p&&(h[0]=Hm(p,Hc(c[m*t+g-1]),b,f)),d>0&&d<e&&m===d&&(h[1]=Hm(d,Hc(c[(m-1)*t+g]),b,f))})}return i.contour=o,i.size=function(l){if(!arguments.length)return[t,e];var c=Math.floor(l[0]),f=Math.floor(l[1]);if(!(c>=0&&f>=0))throw new Error("invalid size");return t=c,e=f,i},i.thresholds=function(l){return arguments.length?(n=typeof l=="function"?l:Array.isArray(l)?xn(Wm.call(l)):xn(l),i):n},i.smooth=function(l){return arguments.length?(r=l?u:QM,i):r===u},i}function JM(t){return isFinite(t)?t:NaN}function er(t,e){return t==null?!1:+t>=e}function Hc(t){return t==null||isNaN(t=+t)?-1/0:t}function Hm(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function t4(t){return t[0]}function e4(t){return t[1]}function n4(){return 1}function r4(){var t=t4,e=e4,n=n4,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,l=i+s*2>>a,c=xn(20);function f(y){var _=new Float32Array(u*l),x=Math.pow(2,-a),w=-1;for(const T of y){var $=(t(T,++w,y)+s)*x,R=(e(T,w,y)+s)*x,A=+n(T,w,y);if(A&&$>=0&&$<u&&R>=0&&R<l){var D=Math.floor($),I=Math.floor(R),v=$-D-.5,L=R-I-.5;_[D+I*u]+=(1-v)*(1-L)*A,_[D+1+I*u]+=v*(1-L)*A,_[D+1+(I+1)*u]+=v*L*A,_[D+(I+1)*u]+=(1-v)*L*A}}return Og({data:_,width:u,height:l},o*x),_}function h(y){var _=f(y),x=c(_),w=Math.pow(2,2*a);return Array.isArray(x)||(x=Yn(Number.MIN_VALUE,Bi(_)/w,x)),Wc().size([u,l]).thresholds(x.map($=>$*w))(_).map(($,R)=>($.value=+x[R],p($)))}h.contours=function(y){var _=f(y),x=Wc().size([u,l]),w=Math.pow(2,2*a),$=R=>{R=+R;var A=p(x.contour(_,R*w));return A.value=R,A};return Object.defineProperty($,"max",{get:()=>Bi(_)/w}),$};function p(y){return y.coordinates.forEach(d),y}function d(y){y.forEach(g)}function g(y){y.forEach(m)}function m(y){y[0]=y[0]*Math.pow(2,a)-s,y[1]=y[1]*Math.pow(2,a)-s}function b(){return s=o*3,u=r+s*2>>a,l=i+s*2>>a,h}return h.x=function(y){return arguments.length?(t=typeof y=="function"?y:xn(+y),h):t},h.y=function(y){return arguments.length?(e=typeof y=="function"?y:xn(+y),h):e},h.weight=function(y){return arguments.length?(n=typeof y=="function"?y:xn(+y),h):n},h.size=function(y){if(!arguments.length)return[r,i];var _=+y[0],x=+y[1];if(!(_>=0&&x>=0))throw new Error("invalid size");return r=_,i=x,b()},h.cellSize=function(y){if(!arguments.length)return 1<<a;if(!((y=+y)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(y)/Math.LN2),b()},h.thresholds=function(y){return arguments.length?(c=typeof y=="function"?y:Array.isArray(y)?xn(Wm.call(y)):xn(y),h):c},h.bandwidth=function(y){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((y=+y)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*y*y+1)-1)/2,b()},h}const tn=11102230246251565e-32,zt=134217729,i4=(3+8*tn)*tn;function Xc(t,e,n,r,i){let o,a,s,u,l=e[0],c=r[0],f=0,h=0;c>l==c>-l?(o=l,l=e[++f]):(o=c,c=r[++h]);let p=0;if(f<t&&h<n)for(c>l==c>-l?(a=l+o,s=o-(a-l),l=e[++f]):(a=c+o,s=o-(a-c),c=r[++h]),o=a,s!==0&&(i[p++]=s);f<t&&h<n;)c>l==c>-l?(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++f]):(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++h]),o=a,s!==0&&(i[p++]=s);for(;f<t;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++f],o=a,s!==0&&(i[p++]=s);for(;h<n;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++h],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function o4(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function io(t){return new Float64Array(t)}const a4=(3+16*tn)*tn,s4=(2+12*tn)*tn,u4=(9+64*tn)*tn*tn,Zr=io(4),Xm=io(8),jm=io(12),Vm=io(16),Ht=io(4);function l4(t,e,n,r,i,o,a){let s,u,l,c,f,h,p,d,g,m,b,y,_,x,w,$,R,A;const D=t-i,I=n-i,v=e-o,L=r-o;x=D*L,h=zt*D,p=h-(h-D),d=D-p,h=zt*L,g=h-(h-L),m=L-g,w=d*m-(x-p*g-d*g-p*m),$=v*I,h=zt*v,p=h-(h-v),d=v-p,h=zt*I,g=h-(h-I),m=I-g,R=d*m-($-p*g-d*g-p*m),b=w-R,f=w-b,Zr[0]=w-(b+f)+(f-R),y=x+b,f=y-x,_=x-(y-f)+(b-f),b=_-$,f=_-b,Zr[1]=_-(b+f)+(f-$),A=y+b,f=A-y,Zr[2]=y-(A-f)+(b-f),Zr[3]=A;let T=o4(4,Zr),S=s4*a;if(T>=S||-T>=S||(f=t-D,s=t-(D+f)+(f-i),f=n-I,l=n-(I+f)+(f-i),f=e-v,u=e-(v+f)+(f-o),f=r-L,c=r-(L+f)+(f-o),s===0&&u===0&&l===0&&c===0)||(S=u4*a+i4*Math.abs(T),T+=D*c+L*s-(v*l+I*u),T>=S||-T>=S))return T;x=s*L,h=zt*s,p=h-(h-s),d=s-p,h=zt*L,g=h-(h-L),m=L-g,w=d*m-(x-p*g-d*g-p*m),$=u*I,h=zt*u,p=h-(h-u),d=u-p,h=zt*I,g=h-(h-I),m=I-g,R=d*m-($-p*g-d*g-p*m),b=w-R,f=w-b,Ht[0]=w-(b+f)+(f-R),y=x+b,f=y-x,_=x-(y-f)+(b-f),b=_-$,f=_-b,Ht[1]=_-(b+f)+(f-$),A=y+b,f=A-y,Ht[2]=y-(A-f)+(b-f),Ht[3]=A;const M=Xc(4,Zr,4,Ht,Xm);x=D*c,h=zt*D,p=h-(h-D),d=D-p,h=zt*c,g=h-(h-c),m=c-g,w=d*m-(x-p*g-d*g-p*m),$=v*l,h=zt*v,p=h-(h-v),d=v-p,h=zt*l,g=h-(h-l),m=l-g,R=d*m-($-p*g-d*g-p*m),b=w-R,f=w-b,Ht[0]=w-(b+f)+(f-R),y=x+b,f=y-x,_=x-(y-f)+(b-f),b=_-$,f=_-b,Ht[1]=_-(b+f)+(f-$),A=y+b,f=A-y,Ht[2]=y-(A-f)+(b-f),Ht[3]=A;const P=Xc(M,Xm,4,Ht,jm);x=s*c,h=zt*s,p=h-(h-s),d=s-p,h=zt*c,g=h-(h-c),m=c-g,w=d*m-(x-p*g-d*g-p*m),$=u*l,h=zt*u,p=h-(h-u),d=u-p,h=zt*l,g=h-(h-l),m=l-g,R=d*m-($-p*g-d*g-p*m),b=w-R,f=w-b,Ht[0]=w-(b+f)+(f-R),y=x+b,f=y-x,_=x-(y-f)+(b-f),b=_-$,f=_-b,Ht[1]=_-(b+f)+(f-$),A=y+b,f=A-y,Ht[2]=y-(A-f)+(b-f),Ht[3]=A;const G=Xc(P,jm,4,Ht,Vm);return Vm[G-1]}function fs(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,l=Math.abs(a+s);return Math.abs(u)>=a4*l?u:-l4(t,e,n,r,i,o,l)}const qm=Math.pow(2,-52),hs=new Uint32Array(512);class ps{static from(e,n=d4,r=g4){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new ps(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,l=-1/0,c=-1/0;for(let D=0;D<a;D++){const I=e[2*D],v=e[2*D+1];I<s&&(s=I),v<u&&(u=v),I>l&&(l=I),v>c&&(c=v),this._ids[D]=D}const f=(s+l)/2,h=(u+c)/2;let p,d,g;for(let D=0,I=1/0;D<a;D++){const v=jc(f,h,e[2*D],e[2*D+1]);v<I&&(p=D,I=v)}const m=e[2*p],b=e[2*p+1];for(let D=0,I=1/0;D<a;D++){if(D===p)continue;const v=jc(m,b,e[2*D],e[2*D+1]);v<I&&v>0&&(d=D,I=v)}let y=e[2*d],_=e[2*d+1],x=1/0;for(let D=0;D<a;D++){if(D===p||D===d)continue;const I=h4(m,b,y,_,e[2*D],e[2*D+1]);I<x&&(g=D,x=I)}let w=e[2*g],$=e[2*g+1];if(x===1/0){for(let v=0;v<a;v++)this._dists[v]=e[2*v]-e[0]||e[2*v+1]-e[1];Kr(this._ids,this._dists,0,a-1);const D=new Uint32Array(a);let I=0;for(let v=0,L=-1/0;v<a;v++){const T=this._ids[v],S=this._dists[T];S>L&&(D[I++]=T,L=S)}this.hull=D.subarray(0,I),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(fs(m,b,y,_,w,$)<0){const D=d,I=y,v=_;d=g,y=w,_=$,g=D,w=I,$=v}const R=p4(m,b,y,_,w,$);this._cx=R.x,this._cy=R.y;for(let D=0;D<a;D++)this._dists[D]=jc(e[2*D],e[2*D+1],R.x,R.y);Kr(this._ids,this._dists,0,a-1),this._hullStart=p;let A=3;r[p]=n[g]=d,r[d]=n[p]=g,r[g]=n[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,b)]=p,o[this._hashKey(y,_)]=d,o[this._hashKey(w,$)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let D=0,I,v;D<this._ids.length;D++){const L=this._ids[D],T=e[2*L],S=e[2*L+1];if(D>0&&Math.abs(T-I)<=qm&&Math.abs(S-v)<=qm||(I=T,v=S,L===p||L===d||L===g))continue;let M=0;for(let E=0,C=this._hashKey(T,S);E<this._hashSize&&(M=o[(C+E)%this._hashSize],!(M!==-1&&M!==r[M]));E++);M=n[M];let P=M,G;for(;G=r[P],fs(T,S,e[2*P],e[2*P+1],e[2*G],e[2*G+1])>=0;)if(P=G,P===M){P=-1;break}if(P===-1)continue;let O=this._addTriangle(P,L,r[P],-1,-1,i[P]);i[L]=this._legalize(O+2),i[P]=O,A++;let k=r[P];for(;G=r[k],fs(T,S,e[2*k],e[2*k+1],e[2*G],e[2*G+1])<0;)O=this._addTriangle(k,L,G,i[L],-1,i[k]),i[L]=this._legalize(O+2),r[k]=k,A--,k=G;if(P===M)for(;G=n[P],fs(T,S,e[2*G],e[2*G+1],e[2*P],e[2*P+1])<0;)O=this._addTriangle(G,L,P,-1,i[P],i[G]),this._legalize(O+2),i[G]=O,r[P]=P,A--,P=G;this._hullStart=n[L]=P,r[P]=n[k]=L,r[L]=k,o[this._hashKey(T,S)]=L,o[this._hashKey(e[2*P],e[2*P+1])]=P}this.hull=new Uint32Array(A);for(let D=0,I=this._hullStart;D<A;D++)this.hull[D]=I,I=r[I];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(c4(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=hs[--o];continue}const l=s-s%3,c=u+(e+1)%3,f=l+(s+2)%3,h=n[a],p=n[e],d=n[c],g=n[f];if(f4(i[2*h],i[2*h+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=h;const b=r[f];if(b===-1){let _=this._hullStart;do{if(this._hullTri[_]===f){this._hullTri[_]=e;break}_=this._hullPrev[_]}while(_!==this._hullStart)}this._link(e,b),this._link(s,r[a]),this._link(a,f);const y=l+(s+1)%3;o<hs.length&&(hs[o++]=y)}else{if(o===0)break;e=hs[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function c4(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function jc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function f4(t,e,n,r,i,o,a,s){const u=t-a,l=e-s,c=n-a,f=r-s,h=i-a,p=o-s,d=u*u+l*l,g=c*c+f*f,m=h*h+p*p;return u*(f*m-g*p)-l*(c*m-g*h)+d*(c*p-f*h)<0}function h4(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,f=u*u+l*l,h=.5/(a*l-s*u),p=(l*c-s*f)*h,d=(a*f-u*c)*h;return p*p+d*d}function p4(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,f=u*u+l*l,h=.5/(a*l-s*u),p=t+(l*c-s*f)*h,d=e+(a*f-u*c)*h;return{x:p,y:d}}function Kr(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;oo(t,i,o),e[t[n]]>e[t[r]]&&oo(t,n,r),e[t[o]]>e[t[r]]&&oo(t,o,r),e[t[n]]>e[t[o]]&&oo(t,n,o);const s=t[o],u=e[s];for(;;){do o++;while(e[t[o]]<u);do a--;while(e[t[a]]>u);if(a<o)break;oo(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Kr(t,e,o,r),Kr(t,e,n,a-1)):(Kr(t,e,n,a-1),Kr(t,e,o,r))}}function oo(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function d4(t){return t[0]}function g4(t){return t[1]}const Zm=1e-6;class nr{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Zm||Math.abs(this._y1-o)>Zm)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Vc{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class Km{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,b=r.length,y,_;g<b;g+=3,m+=2){const x=r[g]*2,w=r[g+1]*2,$=r[g+2]*2,R=e[x],A=e[x+1],D=e[w],I=e[w+1],v=e[$],L=e[$+1],T=D-R,S=I-A,M=v-R,P=L-A,G=(T*P-S*M)*2;if(Math.abs(G)<1e-9){if(o===void 0){o=a=0;for(const k of n)o+=e[k*2],a+=e[k*2+1];o/=n.length,a/=n.length}const O=1e9*Math.sign((o-R)*P-(a-A)*M);y=(R+v)/2-O*P,_=(A+L)/2+O*M}else{const O=1/G,k=T*T+S*S,E=M*M+P*P;y=R+(P*k-S*E)*O,_=A+(T*E-M*k)*O}s[m]=y,s[m+1]=_}let u=n[n.length-1],l,c=u*4,f,h=e[2*u],p,d=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],l=c,f=h,p=d,c=u*4,h=e[2*u],d=e[2*u+1],i[l+2]=i[c]=p-d,i[l+3]=i[c+1]=h-f}render(e){const n=e==null?e=new nr:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let c=0,f=r.length;c<f;++c){const h=r[c];if(h<c)continue;const p=Math.floor(c/3)*2,d=Math.floor(h/3)*2,g=a[p],m=a[p+1],b=a[d],y=a[d+1];this._renderSegment(g,m,b,y,e)}let u,l=o[o.length-1];for(let c=0;c<o.length;++c){u=l,l=o[c];const f=Math.floor(i[l]/3)*2,h=a[f],p=a[f+1],d=u*4,g=this._project(h,p,s[d+2],s[d+3]);g&&this._renderSegment(h,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new nr:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new nr:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Vc;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const l=Math.floor(u/3);if(s.push(n[l*2],n[l*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],l,c=this._regioncode(s,u),f,h=0;for(let p=0;p<r;p+=2)if(o=s,a=u,s=n[p],u=n[p+1],l=c,c=this._regioncode(s,u),l===0&&c===0)f=h,h=0,i?i.push(s,u):i=[s,u];else{let d,g,m,b,y;if(l===0){if((d=this._clipSegment(o,a,s,u,l,c))===null)continue;[g,m,b,y]=d}else{if((d=this._clipSegment(s,u,o,a,c,l))===null)continue;[b,y,g,m]=d,f=h,h=this._edgecode(g,m),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(g,m):i=[g,m]}f=h,h=this._edgecode(b,y),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(b,y):i=[b,y]}if(i)f=h,h=this._edgecode(i[0],i[1]),f&&h&&this._edge(e,f,h,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,l,c=o||a;c&8?(u=e+(r-e)*(this.ymax-n)/(i-n),l=this.ymax):c&4?(u=e+(r-e)*(this.ymin-n)/(i-n),l=this.ymin):c&2?(l=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(l=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=l,o=this._regioncode(e,n)):(r=u,i=l,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let l=0,c=s.length,f,h=this._edgecode(s[c-2],s[c-1]);l<c;l+=2)f=h,h=this._edgecode(s[l],s[l+1]),f&&h&&(l=this._edge(e,f,h,s,l),c=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const m4=2*Math.PI,Qr=Math.pow;function y4(t){return t[0]}function b4(t){return t[1]}function x4(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function v4(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class qc{static from(e,n=y4,r=b4,i){return new qc("length"in e?_4(e,n,r,i):Float64Array.from($4(e,n,r,i)))}constructor(e){this._delaunator=new ps(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&x4(e)){this.collinear=Int32Array.from({length:n.length/2},(h,p)=>p).sort((h,p)=>n[2*h]-n[2*p]||n[2*h+1]-n[2*p+1]);const u=this.collinear[0],l=this.collinear[this.collinear.length-1],c=[n[2*u],n[2*u+1],n[2*l],n[2*l+1]],f=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let h=0,p=n.length/2;h<p;++h){const d=v4(n[2*h],n[2*h+1],f);n[2*h]=d[0],n[2*h+1]=d[1]}this._delaunator=new ps(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,l=r.length;u<l;++u){const c=o[u%3===2?u-2:u+1];(r[u]===-1||a[c]===-1)&&(a[c]=u)}for(let u=0,l=i.length;u<l;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new Km(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const f=s.indexOf(e);f>0&&(yield s[f-1]),f<s.length-1&&(yield s[f+1]);return}const u=n[e];if(u===-1)return;let l=u,c=-1;do{if(yield c=a[l],l=l%3===2?l-2:l+1,a[l]!==e)return;if(l=o[l],l===-1){const f=r[(i[e]+1)%r.length];f!==c&&(yield f);return}}while(l!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:l}=this;if(i[e]===-1||!l.length)return(e+1)%(l.length>>1);let c=e,f=Qr(n-l[e*2],2)+Qr(r-l[e*2+1],2);const h=i[e];let p=h;do{let d=u[p];const g=Qr(n-l[d*2],2)+Qr(r-l[d*2+1],2);if(g<f&&(f=g,c=d),p=p%3===2?p-2:p+1,u[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Qr(n-l[p*2],2)+Qr(r-l[p*2+1],2)<f)return p;break}}while(p!==h);return c}render(e){const n=e==null?e=new nr:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const l=o[a]*2,c=o[u]*2;e.moveTo(r[l],r[l+1]),e.lineTo(r[c],r[c+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new nr:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,m4)}return r&&r.value()}renderHull(e){const n=e==null?e=new nr:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Vc;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new nr:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Vc;return this.renderTriangle(e,n),n.value()}}function _4(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*$4(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var Qm={},Zc={},Kc=34,ao=10,Qc=13;function Jm(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function w4(t,e){var n=Jm(t);return function(r,i){return e(n(r),i,t)}}function t1(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ie(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function S4(t){return t<0?"-"+ie(-t,6):t>9999?"+"+ie(t,6):ie(t,4)}function A4(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":S4(t.getUTCFullYear())+"-"+ie(t.getUTCMonth()+1,2)+"-"+ie(t.getUTCDate(),2)+(i?"T"+ie(e,2)+":"+ie(n,2)+":"+ie(r,2)+"."+ie(i,3)+"Z":r?"T"+ie(e,2)+":"+ie(n,2)+":"+ie(r,2)+"Z":n||e?"T"+ie(e,2)+":"+ie(n,2)+"Z":"")}function ds(t){var e=new RegExp('["'+t+`
43
- \r]`),n=t.charCodeAt(0);function r(f,h){var p,d,g=i(f,function(m,b){if(p)return p(m,b-1);d=m,p=h?w4(m,h):Jm(m)});return g.columns=d||[],g}function i(f,h){var p=[],d=f.length,g=0,m=0,b,y=d<=0,_=!1;f.charCodeAt(d-1)===ao&&--d,f.charCodeAt(d-1)===Qc&&--d;function x(){if(y)return Zc;if(_)return _=!1,Qm;var $,R=g,A;if(f.charCodeAt(R)===Kc){for(;g++<d&&f.charCodeAt(g)!==Kc||f.charCodeAt(++g)===Kc;);return($=g)>=d?y=!0:(A=f.charCodeAt(g++))===ao?_=!0:A===Qc&&(_=!0,f.charCodeAt(g)===ao&&++g),f.slice(R+1,$-1).replace(/""/g,'"')}for(;g<d;){if((A=f.charCodeAt($=g++))===ao)_=!0;else if(A===Qc)_=!0,f.charCodeAt(g)===ao&&++g;else if(A!==n)continue;return f.slice(R,$)}return y=!0,f.slice(R,d)}for(;(b=x())!==Zc;){for(var w=[];b!==Qm&&b!==Zc;)w.push(b),b=x();h&&(w=h(w,m++))==null||p.push(w)}return p}function o(f,h){return f.map(function(p){return h.map(function(d){return c(p[d])}).join(t)})}function a(f,h){return h==null&&(h=t1(f)),[h.map(c).join(t)].concat(o(f,h)).join(`
44
- `)}function s(f,h){return h==null&&(h=t1(f)),o(f,h).join(`
45
- `)}function u(f){return f.map(l).join(`
46
- `)}function l(f){return f.map(c).join(t)}function c(f){return f==null?"":f instanceof Date?A4(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:l,formatValue:c}}var rr=ds(","),e1=rr.parse,T4=rr.parseRows,P4=rr.format,M4=rr.formatBody,D4=rr.formatRows,C4=rr.formatRow,L4=rr.formatValue,ir=ds(" "),n1=ir.parse,k4=ir.parseRows,R4=ir.format,E4=ir.formatBody,I4=ir.formatRows,N4=ir.formatRow,B4=ir.formatValue;function F4(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))O4&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const O4=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function z4(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function G4(t,e){return fetch(t,e).then(z4)}function Y4(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function U4(t,e){return fetch(t,e).then(Y4)}function W4(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function gs(t,e){return fetch(t,e).then(W4)}function r1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),gs(e,n).then(function(i){return t(i,r)})}}function H4(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=ds(t);return gs(e,n).then(function(o){return i.parse(o,r)})}var X4=r1(e1),j4=r1(n1);function V4(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function q4(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function Z4(t,e){return fetch(t,e).then(q4)}function Jc(t){return(e,n)=>gs(e,n).then(r=>new DOMParser().parseFromString(r,t))}const K4=Jc("application/xml");var Q4=Jc("text/html"),J4=Jc("image/svg+xml");function tD(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,l=0;for(o=0;o<a;++o)s=n[o],u+=s.x,l+=s.y;for(u=(u/a-t)*r,l=(l/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=l}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function eD(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return i1(this.cover(e,n),e,n,t)}function i1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,l=t._x1,c=t._y1,f,h,p,d,g,m,b,y;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(f=(s+l)/2))?s=f:l=f,(m=n>=(h=(u+c)/2))?u=h:c=h,i=o,!(o=o[b=m<<1|g]))return i[b]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)return a.next=o,i?i[b]=a:t._root=a,t;do i=i?i[b]=new Array(4):t._root=new Array(4),(g=e>=(f=(s+l)/2))?s=f:l=f,(m=n>=(h=(u+c)/2))?u=h:c=h;while((b=m<<1|g)===(y=(d>=h)<<1|p>=f));return i[y]=o,i[b]=a,t}function nD(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,l=1/0,c=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>c&&(c=i),o<l&&(l=o),o>f&&(f=o));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;n<r;++n)i1(this,a[n],s[n],t[n]);return this}function rD(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,l;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,u=new Array(4),u[l]=s,s=u,a*=2,l){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function iD(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function oD(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Xt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function aD(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,l,c=this._x1,f=this._y1,h=[],p=this._root,d,g;for(p&&h.push(new Xt(p,i,o,c,f)),n==null?n=1/0:(i=t-n,o=e-n,c=t+n,f=e+n,n*=n);d=h.pop();)if(!(!(p=d.node)||(a=d.x0)>c||(s=d.y0)>f||(u=d.x1)<i||(l=d.y1)<o))if(p.length){var m=(a+u)/2,b=(s+l)/2;h.push(new Xt(p[3],m,b,u,l),new Xt(p[2],a,b,m,l),new Xt(p[1],m,s,u,b),new Xt(p[0],a,s,m,b)),(g=(e>=b)<<1|t>=m)&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-g],h[h.length-1-g]=d)}else{var y=t-+this._x.call(null,p.data),_=e-+this._y.call(null,p.data),x=y*y+_*_;if(x<n){var w=Math.sqrt(n=x);i=t-w,o=e-w,c=t+w,f=e+w,r=p.data}}return r}function sD(t){if(isNaN(c=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,l=this._y1,c,f,h,p,d,g,m,b;if(!n)return this;if(n.length)for(;;){if((d=c>=(h=(a+u)/2))?a=h:u=h,(g=f>=(p=(s+l)/2))?s=p:l=p,e=n,!(n=n[m=g<<1|d]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,b=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[b]=n:this._root=n),this):(this._root=o,this)}function uD(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function lD(){return this._root}function cD(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function fD(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Xt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var l=(o+s)/2,c=(a+u)/2;(i=r[3])&&e.push(new Xt(i,l,c,s,u)),(i=r[2])&&e.push(new Xt(i,o,c,l,u)),(i=r[1])&&e.push(new Xt(i,l,a,s,c)),(i=r[0])&&e.push(new Xt(i,o,a,l,c))}return this}function hD(t){var e=[],n=[],r;for(this._root&&e.push(new Xt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,l=r.y1,c=(a+u)/2,f=(s+l)/2;(o=i[0])&&e.push(new Xt(o,a,s,c,f)),(o=i[1])&&e.push(new Xt(o,c,s,u,f)),(o=i[2])&&e.push(new Xt(o,a,f,c,l)),(o=i[3])&&e.push(new Xt(o,c,f,u,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function pD(t){return t[0]}function dD(t){return arguments.length?(this._x=t,this):this._x}function gD(t){return t[1]}function mD(t){return arguments.length?(this._y=t,this):this._y}function ms(t,e,n){var r=new tf(e??pD,n??gD,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function tf(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function o1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var jt=ms.prototype=tf.prototype;jt.copy=function(){var t=new tf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=o1(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=o1(r));return t},jt.add=eD,jt.addAll=nD,jt.cover=rD,jt.data=iD,jt.extent=oD,jt.find=aD,jt.remove=sD,jt.removeAll=uD,jt.root=lD,jt.size=cD,jt.visit=fD,jt.visitAfter=hD,jt.x=dD,jt.y=mD;function Lt(t){return function(){return t}}function vn(t){return(t()-.5)*1e-6}function yD(t){return t.x+t.vx}function bD(t){return t.y+t.vy}function a1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var l,c=e.length,f,h,p,d,g,m,b=0;b<o;++b)for(f=ms(e,yD,bD).visitAfter(s),l=0;l<c;++l)h=e[l],g=n[h.index],m=g*g,p=h.x+h.vx,d=h.y+h.vy,f.visit(y);function y(_,x,w,$,R){var A=_.data,D=_.r,I=g+D;if(A){if(A.index>h.index){var v=p-A.x-A.vx,L=d-A.y-A.vy,T=v*v+L*L;T<I*I&&(v===0&&(v=vn(r),T+=v*v),L===0&&(L=vn(r),T+=L*L),T=(I-(T=Math.sqrt(T)))/T*i,h.vx+=(v*=T)*(I=(D*=D)/(m+D)),h.vy+=(L*=T)*I,A.vx-=v*(I=1-I),A.vy-=L*I)}return}return x>p+I||$<p-I||w>d+I||R<d-I}}function s(l){if(l.data)return l.r=n[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(e){var l,c=e.length,f;for(n=new Array(c),l=0;l<c;++l)f=e[l],n[f.index]=+t(f,l,e)}}return a.initialize=function(l,c){e=l,r=c,u()},a.iterations=function(l){return arguments.length?(o=+l,a):o},a.strength=function(l){return arguments.length?(i=+l,a):i},a.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),a):t},a}function xD(t){return t.index}function s1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function vD(t){var e=xD,n=f,r,i=Lt(30),o,a,s,u,l,c=1;t==null&&(t=[]);function f(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function h(m){for(var b=0,y=t.length;b<c;++b)for(var _=0,x,w,$,R,A,D,I;_<y;++_)x=t[_],w=x.source,$=x.target,R=$.x+$.vx-w.x-w.vx||vn(l),A=$.y+$.vy-w.y-w.vy||vn(l),D=Math.sqrt(R*R+A*A),D=(D-o[_])/D*m*r[_],R*=D,A*=D,$.vx-=R*(I=u[_]),$.vy-=A*I,w.vx+=R*(I=1-I),w.vy+=A*I}function p(){if(a){var m,b=a.length,y=t.length,_=new Map(a.map((w,$)=>[e(w,$,a),w])),x;for(m=0,s=new Array(b);m<y;++m)x=t[m],x.index=m,typeof x.source!="object"&&(x.source=s1(_,x.source)),typeof x.target!="object"&&(x.target=s1(_,x.target)),s[x.source.index]=(s[x.source.index]||0)+1,s[x.target.index]=(s[x.target.index]||0)+1;for(m=0,u=new Array(y);m<y;++m)x=t[m],u[m]=s[x.source.index]/(s[x.source.index]+s[x.target.index]);r=new Array(y),d(),o=new Array(y),g()}}function d(){if(a)for(var m=0,b=t.length;m<b;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,b=t.length;m<b;++m)o[m]=+i(t[m],m,t)}return h.initialize=function(m,b){a=m,l=b,p()},h.links=function(m){return arguments.length?(t=m,p(),h):t},h.id=function(m){return arguments.length?(e=m,h):e},h.iterations=function(m){return arguments.length?(c=+m,h):c},h.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Lt(+m),d(),h):n},h.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),h):i},h}const _D=1664525,$D=1013904223,u1=4294967296;function wD(){let t=1;return()=>(t=(_D*t+$D)%u1)/u1}function SD(t){return t.x}function AD(t){return t.y}var TD=10,PD=Math.PI*(3-Math.sqrt(5));function l1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=rs(f),l=Wn("tick","end"),c=wD();t==null&&(t=[]);function f(){h(),l.call("tick",e),n<r&&(u.stop(),l.call("end",e))}function h(g){var m,b=t.length,y;g===void 0&&(g=1);for(var _=0;_<g;++_)for(n+=(o-n)*i,s.forEach(function(x){x(n)}),m=0;m<b;++m)y=t[m],y.fx==null?y.x+=y.vx*=a:(y.x=y.fx,y.vx=0),y.fy==null?y.y+=y.vy*=a:(y.y=y.fy,y.vy=0);return e}function p(){for(var g=0,m=t.length,b;g<m;++g){if(b=t[g],b.index=g,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var y=TD*Math.sqrt(.5+g),_=g*PD;b.x=y*Math.cos(_),b.y=y*Math.sin(_)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function d(g){return g.initialize&&g.initialize(t,c),g}return p(),e={tick:h,restart:function(){return u.restart(f),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,p(),s.forEach(d),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(c=g,s.forEach(d),e):c},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,d(m)),e):s.get(g)},find:function(g,m,b){var y=0,_=t.length,x,w,$,R,A;for(b==null?b=1/0:b*=b,y=0;y<_;++y)R=t[y],x=g-R.x,w=m-R.y,$=x*x+w*w,$<b&&(A=R,b=$);return A},on:function(g,m){return arguments.length>1?(l.on(g,m),e):l.on(g)}}}function c1(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function l(p){var d,g=t.length,m=ms(t,SD,AD).visitAfter(f);for(r=p,d=0;d<g;++d)e=t[d],m.visit(h)}function c(){if(t){var p,d=t.length,g;for(o=new Array(d),p=0;p<d;++p)g=t[p],o[g.index]=+i(g,p,t)}}function f(p){var d=0,g,m,b=0,y,_,x;if(p.length){for(y=_=x=0;x<4;++x)(g=p[x])&&(m=Math.abs(g.value))&&(d+=g.value,b+=m,y+=m*g.x,_+=m*g.y);p.x=y/b,p.y=_/b}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function h(p,d,g,m){if(!p.value)return!0;var b=p.x-e.x,y=p.y-e.y,_=m-d,x=b*b+y*y;if(_*_/u<x)return x<s&&(b===0&&(b=vn(n),x+=b*b),y===0&&(y=vn(n),x+=y*y),x<a&&(x=Math.sqrt(a*x)),e.vx+=b*p.value*r/x,e.vy+=y*p.value*r/x),!0;if(p.length||x>=s)return;(p.data!==e||p.next)&&(b===0&&(b=vn(n),x+=b*b),y===0&&(y=vn(n),x+=y*y),x<a&&(x=Math.sqrt(a*x)));do p.data!==e&&(_=o[p.data.index]*r/x,e.vx+=b*_,e.vy+=y*_);while(p=p.next)}return l.initialize=function(p,d){t=p,n=d,c()},l.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Lt(+p),c(),l):i},l.distanceMin=function(p){return arguments.length?(a=p*p,l):Math.sqrt(a)},l.distanceMax=function(p){return arguments.length?(s=p*p,l):Math.sqrt(s)},l.theta=function(p){return arguments.length?(u=p*p,l):Math.sqrt(u)},l}function MD(t,e,n){var r,i=Lt(.1),o,a;typeof t!="function"&&(t=Lt(+t)),e==null&&(e=0),n==null&&(n=0);function s(l){for(var c=0,f=r.length;c<f;++c){var h=r[c],p=h.x-e||1e-6,d=h.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[c]-g)*o[c]*l/g;h.vx+=p*m,h.vy+=d*m}}function u(){if(r){var l,c=r.length;for(o=new Array(c),a=new Array(c),l=0;l<c;++l)a[l]=+t(r[l],l,r),o[l]=isNaN(a[l])?0:+i(r[l],l,r)}}return s.initialize=function(l){r=l,u()},s.strength=function(l){return arguments.length?(i=typeof l=="function"?l:Lt(+l),u(),s):i},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),s):t},s.x=function(l){return arguments.length?(e=+l,s):e},s.y=function(l){return arguments.length?(n=+l,s):n},s}function f1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vx+=(i[u]-c.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function h1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vy+=(i[u]-c.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function DD(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ys(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Jr(t){return t=ys(Math.abs(t)),t?t[1]:NaN}function CD(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function LD(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var kD=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ti(t){if(!(e=kD.exec(t)))throw new Error("invalid format: "+t);var e;return new bs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ti.prototype=bs.prototype;function bs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}bs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function RD(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var p1;function ED(t,e){var n=ys(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(p1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ys(t,Math.max(0,e+o-1))[0]}function d1(t,e){var n=ys(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const g1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:DD,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>d1(t*100,e),r:d1,s:ED,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function m1(t){return t}var y1=Array.prototype.map,b1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function x1(t){var e=t.grouping===void 0||t.thousands===void 0?m1:CD(y1.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?m1:LD(y1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function l(f){f=ti(f);var h=f.fill,p=f.align,d=f.sign,g=f.symbol,m=f.zero,b=f.width,y=f.comma,_=f.precision,x=f.trim,w=f.type;w==="n"?(y=!0,w="g"):g1[w]||(_===void 0&&(_=12),x=!0,w="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",R=g==="$"?r:/[%p]/.test(w)?a:"",A=g1[w],D=/[defgprs%]/.test(w);_=_===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function I(v){var L=$,T=R,S,M,P;if(w==="c")T=A(v)+T,v="";else{v=+v;var G=v<0||1/v<0;if(v=isNaN(v)?u:A(Math.abs(v),_),x&&(v=RD(v)),G&&+v==0&&d!=="+"&&(G=!1),L=(G?d==="("?d:s:d==="-"||d==="("?"":d)+L,T=(w==="s"?b1[8+p1/3]:"")+T+(G&&d==="("?")":""),D){for(S=-1,M=v.length;++S<M;)if(P=v.charCodeAt(S),48>P||P>57){T=(P===46?i+v.slice(S+1):v.slice(S))+T,v=v.slice(0,S);break}}}y&&!m&&(v=e(v,1/0));var O=L.length+v.length+T.length,k=O<b?new Array(b-O+1).join(h):"";switch(y&&m&&(v=e(k+v,k.length?b-T.length:1/0),k=""),p){case"<":v=L+v+T+k;break;case"=":v=L+k+v+T;break;case"^":v=k.slice(0,O=k.length>>1)+L+v+T+k.slice(O);break;default:v=k+L+v+T;break}return o(v)}return I.toString=function(){return f+""},I}function c(f,h){var p=l((f=ti(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Jr(h)/3)))*3,g=Math.pow(10,-d),m=b1[8+d/3];return function(b){return p(g*b)+m}}return{format:l,formatPrefix:c}}var xs,so,ef;v1({thousands:",",grouping:[3],currency:["$",""]});function v1(t){return xs=x1(t),so=xs.format,ef=xs.formatPrefix,xs}function _1(t){return Math.max(0,-Jr(Math.abs(t)))}function $1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jr(e)/3)))*3-Jr(Math.abs(t)))}function w1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Jr(e)-Jr(t))+1}var it=1e-6,uo=1e-12,ht=Math.PI,At=ht/2,vs=ht/4,Vt=ht*2,bt=180/ht,at=ht/180,pt=Math.abs,ei=Math.atan,qt=Math.atan2,rt=Math.cos,_s=Math.ceil,S1=Math.exp,nf=Math.hypot,$s=Math.log,rf=Math.pow,Q=Math.sin,me=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,of=Math.tan;function A1(t){return t>1?0:t<-1?ht:Math.acos(t)}function Zt(t){return t>1?At:t<-1?-At:Math.asin(t)}function T1(t){return(t=Q(t/2))*t}function wt(){}function ws(t,e){t&&M1.hasOwnProperty(t.type)&&M1[t.type](t,e)}var P1={Feature:function(t,e){ws(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ws(n[r].geometry,e)}},M1={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){af(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)af(n[r],e,0)},Polygon:function(t,e){D1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)D1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ws(n[r],e)}};function af(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function D1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)af(t[n],e,1);e.polygonEnd()}function Ce(t,e){t&&P1.hasOwnProperty(t.type)?P1[t.type](t,e):ws(t,e)}var Ss=new Ct,As=new Ct,C1,L1,sf,uf,lf,Ge={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){Ss=new Ct,Ge.lineStart=ID,Ge.lineEnd=ND},polygonEnd:function(){var t=+Ss;As.add(t<0?Vt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){As.add(Vt)}};function ID(){Ge.point=BD}function ND(){k1(C1,L1)}function BD(t,e){Ge.point=k1,C1=t,L1=e,t*=at,e*=at,sf=t,uf=rt(e=e/2+vs),lf=Q(e)}function k1(t,e){t*=at,e*=at,e=e/2+vs;var n=t-sf,r=n>=0?1:-1,i=r*n,o=rt(e),a=Q(e),s=lf*a,u=uf*o+s*rt(i),l=s*r*Q(i);Ss.add(qt(l,u)),sf=t,uf=o,lf=a}function FD(t){return As=new Ct,Ce(t,Ge),As*2}function Ts(t){return[qt(t[1],t[0]),Zt(t[2])]}function or(t){var e=t[0],n=t[1],r=rt(n);return[r*rt(e),r*Q(e),Q(n)]}function Ps(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ni(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function cf(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ms(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Ds(t){var e=It(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var St,oe,Tt,fe,ar,R1,E1,ri,lo,_n,en,nn={point:ff,lineStart:N1,lineEnd:B1,polygonStart:function(){nn.point=F1,nn.lineStart=OD,nn.lineEnd=zD,lo=new Ct,Ge.polygonStart()},polygonEnd:function(){Ge.polygonEnd(),nn.point=ff,nn.lineStart=N1,nn.lineEnd=B1,Ss<0?(St=-(Tt=180),oe=-(fe=90)):lo>it?fe=90:lo<-it&&(oe=-90),en[0]=St,en[1]=Tt},sphere:function(){St=-(Tt=180),oe=-(fe=90)}};function ff(t,e){_n.push(en=[St=t,Tt=t]),e<oe&&(oe=e),e>fe&&(fe=e)}function I1(t,e){var n=or([t*at,e*at]);if(ri){var r=ni(ri,n),i=[r[1],-r[0],0],o=ni(i,r);Ds(o),o=Ts(o);var a=t-ar,s=a>0?1:-1,u=o[0]*bt*s,l,c=pt(a)>180;c^(s*ar<u&&u<s*t)?(l=o[1]*bt,l>fe&&(fe=l)):(u=(u+360)%360-180,c^(s*ar<u&&u<s*t)?(l=-o[1]*bt,l<oe&&(oe=l)):(e<oe&&(oe=e),e>fe&&(fe=e))),c?t<ar?he(St,t)>he(St,Tt)&&(Tt=t):he(t,Tt)>he(St,Tt)&&(St=t):Tt>=St?(t<St&&(St=t),t>Tt&&(Tt=t)):t>ar?he(St,t)>he(St,Tt)&&(Tt=t):he(t,Tt)>he(St,Tt)&&(St=t)}else _n.push(en=[St=t,Tt=t]);e<oe&&(oe=e),e>fe&&(fe=e),ri=n,ar=t}function N1(){nn.point=I1}function B1(){en[0]=St,en[1]=Tt,nn.point=ff,ri=null}function F1(t,e){if(ri){var n=t-ar;lo.add(pt(n)>180?n+(n>0?360:-360):n)}else R1=t,E1=e;Ge.point(t,e),I1(t,e)}function OD(){Ge.lineStart()}function zD(){F1(R1,E1),Ge.lineEnd(),pt(lo)>it&&(St=-(Tt=180)),en[0]=St,en[1]=Tt,ri=null}function he(t,e){return(e-=t)<0?e+360:e}function GD(t,e){return t[0]-e[0]}function O1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function YD(t){var e,n,r,i,o,a,s;if(fe=Tt=-(St=oe=1/0),_n=[],Ce(t,nn),n=_n.length){for(_n.sort(GD),e=1,r=_n[0],o=[r];e<n;++e)i=_n[e],O1(r,i[0])||O1(r,i[1])?(he(r[0],i[1])>he(r[0],r[1])&&(r[1]=i[1]),he(i[0],r[1])>he(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=he(r[1],i[0]))>a&&(a=s,St=i[0],Tt=r[1])}return _n=en=null,St===1/0||oe===1/0?[[NaN,NaN],[NaN,NaN]]:[[St,oe],[Tt,fe]]}var co,Cs,Ls,ks,Rs,Es,Is,Ns,hf,pf,df,z1,G1,Kt,Qt,Jt,Le={sphere:wt,point:gf,lineStart:Y1,lineEnd:U1,polygonStart:function(){Le.lineStart=HD,Le.lineEnd=XD},polygonEnd:function(){Le.lineStart=Y1,Le.lineEnd=U1}};function gf(t,e){t*=at,e*=at;var n=rt(e);fo(n*rt(t),n*Q(t),Q(e))}function fo(t,e,n){++co,Ls+=(t-Ls)/co,ks+=(e-ks)/co,Rs+=(n-Rs)/co}function Y1(){Le.point=UD}function UD(t,e){t*=at,e*=at;var n=rt(e);Kt=n*rt(t),Qt=n*Q(t),Jt=Q(e),Le.point=WD,fo(Kt,Qt,Jt)}function WD(t,e){t*=at,e*=at;var n=rt(e),r=n*rt(t),i=n*Q(t),o=Q(e),a=qt(It((a=Qt*o-Jt*i)*a+(a=Jt*r-Kt*o)*a+(a=Kt*i-Qt*r)*a),Kt*r+Qt*i+Jt*o);Cs+=a,Es+=a*(Kt+(Kt=r)),Is+=a*(Qt+(Qt=i)),Ns+=a*(Jt+(Jt=o)),fo(Kt,Qt,Jt)}function U1(){Le.point=gf}function HD(){Le.point=jD}function XD(){W1(z1,G1),Le.point=gf}function jD(t,e){z1=t,G1=e,t*=at,e*=at,Le.point=W1;var n=rt(e);Kt=n*rt(t),Qt=n*Q(t),Jt=Q(e),fo(Kt,Qt,Jt)}function W1(t,e){t*=at,e*=at;var n=rt(e),r=n*rt(t),i=n*Q(t),o=Q(e),a=Qt*o-Jt*i,s=Jt*r-Kt*o,u=Kt*i-Qt*r,l=nf(a,s,u),c=Zt(l),f=l&&-c/l;hf.add(f*a),pf.add(f*s),df.add(f*u),Cs+=c,Es+=c*(Kt+(Kt=r)),Is+=c*(Qt+(Qt=i)),Ns+=c*(Jt+(Jt=o)),fo(Kt,Qt,Jt)}function VD(t){co=Cs=Ls=ks=Rs=Es=Is=Ns=0,hf=new Ct,pf=new Ct,df=new Ct,Ce(t,Le);var e=+hf,n=+pf,r=+df,i=nf(e,n,r);return i<uo&&(e=Es,n=Is,r=Ns,Cs<it&&(e=Ls,n=ks,r=Rs),i=nf(e,n,r),i<uo)?[NaN,NaN]:[qt(n,e)*bt,Zt(r/i)*bt]}function ii(t){return function(){return t}}function mf(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function yf(t,e){return pt(t)>ht&&(t-=Math.round(t/Vt)*Vt),[t,e]}yf.invert=yf;function bf(t,e,n){return(t%=Vt)?e||n?mf(X1(t),j1(e,n)):X1(t):e||n?j1(e,n):yf}function H1(t){return function(e,n){return e+=t,pt(e)>ht&&(e-=Math.round(e/Vt)*Vt),[e,n]}}function X1(t){var e=H1(t);return e.invert=H1(-t),e}function j1(t,e){var n=rt(t),r=Q(t),i=rt(e),o=Q(e);function a(s,u){var l=rt(u),c=rt(s)*l,f=Q(s)*l,h=Q(u),p=h*n+c*r;return[qt(f*i-p*o,c*n-h*r),Zt(p*i+f*o)]}return a.invert=function(s,u){var l=rt(u),c=rt(s)*l,f=Q(s)*l,h=Q(u),p=h*i-f*o;return[qt(f*i+h*o,c*n+p*r),Zt(p*n-c*r)]},a}function V1(t){t=bf(t[0]*at,t[1]*at,t.length>2?t[2]*at:0);function e(n){return n=t(n[0]*at,n[1]*at),n[0]*=bt,n[1]*=bt,n}return e.invert=function(n){return n=t.invert(n[0]*at,n[1]*at),n[0]*=bt,n[1]*=bt,n},e}function q1(t,e,n,r,i,o){if(n){var a=rt(e),s=Q(e),u=r*n;i==null?(i=e+r*Vt,o=e-u/2):(i=Z1(a,i),o=Z1(a,o),(r>0?i<o:i>o)&&(i+=r*Vt));for(var l,c=i;r>0?c>o:c<o;c-=u)l=Ts([a,-s*rt(c),-s*Q(c)]),t.point(l[0],l[1])}}function Z1(t,e){e=or(e),e[0]-=t,Ds(e);var n=A1(-e[1]);return((-e[2]<0?-n:n)+Vt-it)%Vt}function qD(){var t=ii([0,0]),e=ii(90),n=ii(2),r,i,o={point:a};function a(u,l){r.push(u=i(u,l)),u[0]*=bt,u[1]*=bt}function s(){var u=t.apply(this,arguments),l=e.apply(this,arguments)*at,c=n.apply(this,arguments)*at;return r=[],i=bf(-u[0]*at,-u[1]*at,0).invert,q1(o,l,c,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:ii([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:ii(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:ii(+u),s):n},s}function K1(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Bs(t,e){return pt(t[0]-e[0])<it&&pt(t[1]-e[1])<it}function Fs(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Q1(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],b=d[g],y;if(Bs(m,b)){if(!m[2]&&!b[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=d[s])[0],m[1]);i.lineEnd();return}b[0]+=2*it}o.push(y=new Fs(m,d,null,!0)),a.push(y.o=new Fs(m,null,y,!1)),o.push(y=new Fs(b,d,null,!1)),a.push(y.o=new Fs(b,null,y,!0))}}),!!o.length){for(a.sort(e),J1(o),J1(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var l=o[0],c,f;;){for(var h=l,p=!0;h.v;)if((h=h.n)===l)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(s=0,u=c.length;s<u;++s)i.point((f=c[s])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,s=c.length-1;s>=0;--s)i.point((f=c[s])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,c=h.z,p=!p}while(!h.v);i.lineEnd()}}}function J1(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function xf(t){return pt(t[0])<=ht?t[0]:me(t[0])*((pt(t[0])+ht)%Vt-ht)}function ty(t,e){var n=xf(e),r=e[1],i=Q(r),o=[Q(n),-rt(n),0],a=0,s=0,u=new Ct;i===1?r=At+it:i===-1&&(r=-At-it);for(var l=0,c=t.length;l<c;++l)if(h=(f=t[l]).length)for(var f,h,p=f[h-1],d=xf(p),g=p[1]/2+vs,m=Q(g),b=rt(g),y=0;y<h;++y,d=x,m=$,b=R,p=_){var _=f[y],x=xf(_),w=_[1]/2+vs,$=Q(w),R=rt(w),A=x-d,D=A>=0?1:-1,I=D*A,v=I>ht,L=m*$;if(u.add(qt(L*D*Q(I),b*R+L*rt(I))),a+=v?A+D*Vt:A,v^d>=n^x>=n){var T=ni(or(p),or(_));Ds(T);var S=ni(o,T);Ds(S);var M=(v^A>=0?-1:1)*Zt(S[2]);(r>M||r===M&&(T[0]||T[1]))&&(s+=v^A>=0?1:-1)}}return(a<-it||a<it&&u<-uo)^s&1}function ey(t,e,n,r){return function(i){var o=e(i),a=K1(),s=e(a),u=!1,l,c,f,h={point:p,lineStart:g,lineEnd:m,polygonStart:function(){h.point=b,h.lineStart=y,h.lineEnd=_,c=[],l=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=m,c=ql(c);var x=ty(l,r);c.length?(u||(i.polygonStart(),u=!0),Q1(c,KD,x,n,i)):x&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),c=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(x,w){t(x,w)&&i.point(x,w)}function d(x,w){o.point(x,w)}function g(){h.point=d,o.lineStart()}function m(){h.point=p,o.lineEnd()}function b(x,w){f.push([x,w]),s.point(x,w)}function y(){s.lineStart(),f=[]}function _(){b(f[0][0],f[0][1]),s.lineEnd();var x=s.clean(),w=a.result(),$,R=w.length,A,D,I;if(f.pop(),l.push(f),f=null,!!R){if(x&1){if(D=w[0],(A=D.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),$=0;$<A;++$)i.point((I=D[$])[0],I[1]);i.lineEnd()}return}R>1&&x&2&&w.push(w.pop().concat(w.shift())),c.push(w.filter(ZD))}}return h}}function ZD(t){return t.length>1}function KD(t,e){return((t=t.x)[0]<0?t[1]-At-it:At-t[1])-((e=e.x)[0]<0?e[1]-At-it:At-e[1])}const vf=ey(function(){return!0},QD,tC,[-ht,-At]);function QD(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,u=pt(o-e);pt(u-ht)<it?(t.point(e,n=(n+a)/2>0?At:-At),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ht&&(pt(e-r)<it&&(e-=r*it),pt(o-s)<it&&(o-=s*it),n=JD(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function JD(t,e,n,r){var i,o,a=Q(t-n);return pt(a)>it?ei((Q(e)*(o=rt(r))*Q(n)-Q(r)*(i=rt(e))*Q(t))/(i*o*a)):(e+r)/2}function tC(t,e,n,r){var i;if(t==null)i=n*At,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(pt(t[0]-e[0])>it){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function ny(t){var e=rt(t),n=2*at,r=e>0,i=pt(e)>it;function o(c,f,h,p){q1(p,t,n,h,c,f)}function a(c,f){return rt(c)*rt(f)>e}function s(c){var f,h,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,b){var y=[m,b],_,x=a(m,b),w=r?x?0:l(m,b):x?l(m+(m<0?ht:-ht),b):0;if(!f&&(d=p=x)&&c.lineStart(),x!==p&&(_=u(f,y),(!_||Bs(f,_)||Bs(y,_))&&(y[2]=1)),x!==p)g=0,x?(c.lineStart(),_=u(y,f),c.point(_[0],_[1])):(_=u(f,y),c.point(_[0],_[1],2),c.lineEnd()),f=_;else if(i&&f&&r^x){var $;!(w&h)&&($=u(y,f,!0))&&(g=0,r?(c.lineStart(),c.point($[0][0],$[0][1]),c.point($[1][0],$[1][1]),c.lineEnd()):(c.point($[1][0],$[1][1]),c.lineEnd(),c.lineStart(),c.point($[0][0],$[0][1],3)))}x&&(!f||!Bs(f,y))&&c.point(y[0],y[1]),f=y,p=x,h=w},lineEnd:function(){p&&c.lineEnd(),f=null},clean:function(){return g|(d&&p)<<1}}}function u(c,f,h){var p=or(c),d=or(f),g=[1,0,0],m=ni(p,d),b=Ps(m,m),y=m[0],_=b-y*y;if(!_)return!h&&c;var x=e*b/_,w=-e*y/_,$=ni(g,m),R=Ms(g,x),A=Ms(m,w);cf(R,A);var D=$,I=Ps(R,D),v=Ps(D,D),L=I*I-v*(Ps(R,R)-1);if(!(L<0)){var T=It(L),S=Ms(D,(-I-T)/v);if(cf(S,R),S=Ts(S),!h)return S;var M=c[0],P=f[0],G=c[1],O=f[1],k;P<M&&(k=M,M=P,P=k);var E=P-M,C=pt(E-ht)<it,F=C||E<it;if(!C&&O<G&&(k=G,G=O,O=k),F?C?G+O>0^S[1]<(pt(S[0]-M)<it?G:O):G<=S[1]&&S[1]<=O:E>ht^(M<=S[0]&&S[0]<=P)){var H=Ms(D,(-I+T)/v);return cf(H,R),[S,Ts(H)]}}}function l(c,f){var h=r?t:ht-t,p=0;return c<-h?p|=1:c>h&&(p|=2),f<-h?p|=4:f>h&&(p|=8),p}return ey(a,s,o,r?[0,-t]:[-ht,t-ht])}function eC(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],l=e[1],c=0,f=1,h=u-a,p=l-s,d;if(d=n-a,!(!h&&d>0)){if(d/=h,h<0){if(d<c)return;d<f&&(f=d)}else if(h>0){if(d>f)return;d>c&&(c=d)}if(d=i-a,!(!h&&d<0)){if(d/=h,h<0){if(d>f)return;d>c&&(c=d)}else if(h>0){if(d<c)return;d<f&&(f=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<c)return;d<f&&(f=d)}else if(p>0){if(d>f)return;d>c&&(c=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>f)return;d>c&&(c=d)}else if(p>0){if(d<c)return;d<f&&(f=d)}return c>0&&(t[0]=a+c*h,t[1]=s+c*p),f<1&&(e[0]=a+f*h,e[1]=s+f*p),!0}}}}}var ho=1e9,Os=-ho;function zs(t,e,n,r){function i(l,c){return t<=l&&l<=n&&e<=c&&c<=r}function o(l,c,f,h){var p=0,d=0;if(l==null||(p=a(l,f))!==(d=a(c,f))||u(l,c)<0^f>0)do h.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+f+4)%4)!==d);else h.point(c[0],c[1])}function a(l,c){return pt(l[0]-t)<it?c>0?0:3:pt(l[0]-n)<it?c>0?2:1:pt(l[1]-e)<it?c>0?1:0:c>0?3:2}function s(l,c){return u(l.x,c.x)}function u(l,c){var f=a(l,1),h=a(c,1);return f!==h?f-h:f===0?c[1]-l[1]:f===1?l[0]-c[0]:f===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,f=K1(),h,p,d,g,m,b,y,_,x,w,$,R={point:A,lineStart:L,lineEnd:T,polygonStart:I,polygonEnd:v};function A(M,P){i(M,P)&&c.point(M,P)}function D(){for(var M=0,P=0,G=p.length;P<G;++P)for(var O=p[P],k=1,E=O.length,C=O[0],F,H,J=C[0],z=C[1];k<E;++k)F=J,H=z,C=O[k],J=C[0],z=C[1],H<=r?z>r&&(J-F)*(r-H)>(z-H)*(t-F)&&++M:z<=r&&(J-F)*(r-H)<(z-H)*(t-F)&&--M;return M}function I(){c=f,h=[],p=[],$=!0}function v(){var M=D(),P=$&&M,G=(h=ql(h)).length;(P||G)&&(l.polygonStart(),P&&(l.lineStart(),o(null,null,1,l),l.lineEnd()),G&&Q1(h,s,M,o,l),l.polygonEnd()),c=l,h=p=d=null}function L(){R.point=S,p&&p.push(d=[]),w=!0,x=!1,y=_=NaN}function T(){h&&(S(g,m),b&&x&&f.rejoin(),h.push(f.result())),R.point=A,x&&c.lineEnd()}function S(M,P){var G=i(M,P);if(p&&d.push([M,P]),w)g=M,m=P,b=G,w=!1,G&&(c.lineStart(),c.point(M,P));else if(G&&x)c.point(M,P);else{var O=[y=Math.max(Os,Math.min(ho,y)),_=Math.max(Os,Math.min(ho,_))],k=[M=Math.max(Os,Math.min(ho,M)),P=Math.max(Os,Math.min(ho,P))];eC(O,k,t,e,n,r)?(x||(c.lineStart(),c.point(O[0],O[1])),c.point(k[0],k[1]),G||c.lineEnd(),$=!1):G&&(c.lineStart(),c.point(M,P),$=!1)}y=M,_=P,x=G}return R}}function nC(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=zs(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var _f,$f,Gs,Ys,oi={sphere:wt,point:wt,lineStart:rC,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function rC(){oi.point=oC,oi.lineEnd=iC}function iC(){oi.point=oi.lineEnd=wt}function oC(t,e){t*=at,e*=at,$f=t,Gs=Q(e),Ys=rt(e),oi.point=aC}function aC(t,e){t*=at,e*=at;var n=Q(e),r=rt(e),i=pt(t-$f),o=rt(i),a=Q(i),s=r*a,u=Ys*n-Gs*r*o,l=Gs*n+Ys*r*o;_f.add(qt(It(s*s+u*u),l)),$f=t,Gs=n,Ys=r}function ry(t){return _f=new Ct,Ce(t,oi),+_f}var wf=[null,null],sC={type:"LineString",coordinates:wf};function Us(t,e){return wf[0]=t,wf[1]=e,ry(sC)}var iy={Feature:function(t,e){return Ws(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ws(n[r].geometry,e))return!0;return!1}},oy={Sphere:function(){return!0},Point:function(t,e){return ay(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(ay(n[r],e))return!0;return!1},LineString:function(t,e){return sy(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(sy(n[r],e))return!0;return!1},Polygon:function(t,e){return uy(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(uy(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ws(n[r],e))return!0;return!1}};function Ws(t,e){return t&&oy.hasOwnProperty(t.type)?oy[t.type](t,e):!1}function ay(t,e){return Us(t,e)===0}function sy(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Us(t[o],e),r===0||o>0&&(i=Us(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<uo*i))return!0;n=r}return!1}function uy(t,e){return!!ty(t.map(uC),ly(e))}function uC(t){return t=t.map(ly),t.pop(),t}function ly(t){return[t[0]*at,t[1]*at]}function lC(t,e){return(t&&iy.hasOwnProperty(t.type)?iy[t.type]:Ws)(t,e)}function cy(t,e,n){var r=gn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function fy(t,e,n){var r=gn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function hy(){var t,e,n,r,i,o,a,s,u=10,l=u,c=90,f=360,h,p,d,g,m=2.5;function b(){return{type:"MultiLineString",coordinates:y()}}function y(){return gn(_s(r/c)*c,n,c).map(d).concat(gn(_s(s/f)*f,a,f).map(g)).concat(gn(_s(e/u)*u,t,u).filter(function(_){return pt(_%c)>it}).map(h)).concat(gn(_s(o/l)*l,i,l).filter(function(_){return pt(_%f)>it}).map(p))}return b.lines=function(){return y().map(function(_){return{type:"LineString",coordinates:_}})},b.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(s).reverse().slice(1))]}},b.extent=function(_){return arguments.length?b.extentMajor(_).extentMinor(_):b.extentMinor()},b.extentMajor=function(_){return arguments.length?(r=+_[0][0],n=+_[1][0],s=+_[0][1],a=+_[1][1],r>n&&(_=r,r=n,n=_),s>a&&(_=s,s=a,a=_),b.precision(m)):[[r,s],[n,a]]},b.extentMinor=function(_){return arguments.length?(e=+_[0][0],t=+_[1][0],o=+_[0][1],i=+_[1][1],e>t&&(_=e,e=t,t=_),o>i&&(_=o,o=i,i=_),b.precision(m)):[[e,o],[t,i]]},b.step=function(_){return arguments.length?b.stepMajor(_).stepMinor(_):b.stepMinor()},b.stepMajor=function(_){return arguments.length?(c=+_[0],f=+_[1],b):[c,f]},b.stepMinor=function(_){return arguments.length?(u=+_[0],l=+_[1],b):[u,l]},b.precision=function(_){return arguments.length?(m=+_,h=cy(o,i,90),p=fy(e,t,m),d=cy(s,a,90),g=fy(r,n,m),b):m},b.extentMajor([[-180,-90+it],[180,90-it]]).extentMinor([[-180,-80-it],[180,80+it]])}function cC(){return hy()()}function fC(t,e){var n=t[0]*at,r=t[1]*at,i=e[0]*at,o=e[1]*at,a=rt(r),s=Q(r),u=rt(o),l=Q(o),c=a*rt(n),f=a*Q(n),h=u*rt(i),p=u*Q(i),d=2*Zt(It(T1(o-r)+a*u*T1(i-n))),g=Q(d),m=d?function(b){var y=Q(b*=d)/g,_=Q(d-b)/g,x=_*c+y*h,w=_*f+y*p,$=_*s+y*l;return[qt(w,x)*bt,qt($,It(x*x+w*w))*bt]}:function(){return[n*bt,r*bt]};return m.distance=d,m}const po=t=>t;var Sf=new Ct,Af=new Ct,py,dy,Tf,Pf,rn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){rn.lineStart=hC,rn.lineEnd=dC},polygonEnd:function(){rn.lineStart=rn.lineEnd=rn.point=wt,Sf.add(pt(Af)),Af=new Ct},result:function(){var t=Sf/2;return Sf=new Ct,t}};function hC(){rn.point=pC}function pC(t,e){rn.point=gy,py=Tf=t,dy=Pf=e}function gy(t,e){Af.add(Pf*t-Tf*e),Tf=t,Pf=e}function dC(){gy(py,dy)}var ai=1/0,Hs=ai,go=-ai,Xs=go,js={point:gC,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[ai,Hs],[go,Xs]];return go=Xs=-(Hs=ai=1/0),t}};function gC(t,e){t<ai&&(ai=t),t>go&&(go=t),e<Hs&&(Hs=e),e>Xs&&(Xs=e)}var Mf=0,Df=0,mo=0,Vs=0,qs=0,si=0,Cf=0,Lf=0,yo=0,my,yy,Ye,Ue,ye={point:sr,lineStart:by,lineEnd:xy,polygonStart:function(){ye.lineStart=bC,ye.lineEnd=xC},polygonEnd:function(){ye.point=sr,ye.lineStart=by,ye.lineEnd=xy},result:function(){var t=yo?[Cf/yo,Lf/yo]:si?[Vs/si,qs/si]:mo?[Mf/mo,Df/mo]:[NaN,NaN];return Mf=Df=mo=Vs=qs=si=Cf=Lf=yo=0,t}};function sr(t,e){Mf+=t,Df+=e,++mo}function by(){ye.point=mC}function mC(t,e){ye.point=yC,sr(Ye=t,Ue=e)}function yC(t,e){var n=t-Ye,r=e-Ue,i=It(n*n+r*r);Vs+=i*(Ye+t)/2,qs+=i*(Ue+e)/2,si+=i,sr(Ye=t,Ue=e)}function xy(){ye.point=sr}function bC(){ye.point=vC}function xC(){vy(my,yy)}function vC(t,e){ye.point=vy,sr(my=Ye=t,yy=Ue=e)}function vy(t,e){var n=t-Ye,r=e-Ue,i=It(n*n+r*r);Vs+=i*(Ye+t)/2,qs+=i*(Ue+e)/2,si+=i,i=Ue*t-Ye*e,Cf+=i*(Ye+t),Lf+=i*(Ue+e),yo+=i*3,sr(Ye=t,Ue=e)}function _y(t){this._context=t}_y.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Vt);break}}},result:wt};var kf=new Ct,Rf,$y,wy,bo,xo,vo={point:wt,lineStart:function(){vo.point=_C},lineEnd:function(){Rf&&Sy($y,wy),vo.point=wt},polygonStart:function(){Rf=!0},polygonEnd:function(){Rf=null},result:function(){var t=+kf;return kf=new Ct,t}};function _C(t,e){vo.point=Sy,$y=bo=t,wy=xo=e}function Sy(t,e){bo-=t,xo-=e,kf.add(It(bo*bo+xo*xo)),bo=t,xo=e}let Ay,Zs,Ty,Py;class My{constructor(e){this._append=e==null?Dy:$C(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Ty||this._append!==Zs){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Ty=r,Zs=this._append,Py=this._,this._=i}this._+=Py;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Dy(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function $C(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Dy;if(e!==Ay){const n=10**e;Ay=e,Zs=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Zs}function wC(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Ce(s,i(o))),o.result()}return a.area=function(s){return Ce(s,i(rn)),rn.result()},a.measure=function(s){return Ce(s,i(vo)),vo.result()},a.bounds=function(s){return Ce(s,i(js)),js.result()},a.centroid=function(s){return Ce(s,i(ye)),ye.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,po):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new My(n)):new _y(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const u=Math.floor(s);if(!(u>=0))throw new RangeError(`invalid digits: ${s}`);n=u}return e===null&&(o=new My(n)),a},a.projection(t).digits(n).context(e)}function SC(t){return{stream:_o(t)}}function _o(t){return function(e){var n=new Ef;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Ef(){}Ef.prototype={constructor:Ef,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function If(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Ce(n,t.stream(js)),e(js.result()),r!=null&&t.clipExtent(r),t}function Ks(t,e,n){return If(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function Nf(t,e,n){return Ks(t,[[0,0],e],n)}function Bf(t,e,n){return If(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function Ff(t,e,n){return If(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var Cy=16,AC=rt(30*at);function Ly(t,e){return+e?PC(t,e):TC(t)}function TC(t){return _o({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function PC(t,e){function n(r,i,o,a,s,u,l,c,f,h,p,d,g,m){var b=l-r,y=c-i,_=b*b+y*y;if(_>4*e&&g--){var x=a+h,w=s+p,$=u+d,R=It(x*x+w*w+$*$),A=Zt($/=R),D=pt(pt($)-1)<it||pt(o-f)<it?(o+f)/2:qt(w,x),I=t(D,A),v=I[0],L=I[1],T=v-r,S=L-i,M=y*T-b*S;(M*M/_>e||pt((b*T+y*S)/_-.5)>.3||a*h+s*p+u*d<AC)&&(n(r,i,o,a,s,u,v,L,D,x/=R,w/=R,$,g,m),m.point(v,L),n(v,L,D,x,w,$,l,c,f,h,p,d,g,m))}}return function(r){var i,o,a,s,u,l,c,f,h,p,d,g,m={point:b,lineStart:y,lineEnd:x,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=y}};function b(A,D){A=t(A,D),r.point(A[0],A[1])}function y(){f=NaN,m.point=_,r.lineStart()}function _(A,D){var I=or([A,D]),v=t(A,D);n(f,h,c,p,d,g,f=v[0],h=v[1],c=A,p=I[0],d=I[1],g=I[2],Cy,r),r.point(f,h)}function x(){m.point=b,r.lineEnd()}function w(){y(),m.point=$,m.lineEnd=R}function $(A,D){_(i=A,D),o=f,a=h,s=p,u=d,l=g,m.point=_}function R(){n(f,h,c,p,d,g,o,a,i,s,u,l,Cy,r),m.lineEnd=x,x()}return m}}var MC=_o({point:function(t,e){this.stream.point(t*at,e*at)}});function DC(t){return _o({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function CC(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function ky(t,e,n,r,i,o){if(!o)return CC(t,e,n,r,i);var a=rt(o),s=Q(o),u=a*t,l=s*t,c=a/t,f=s/t,h=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[u*g-l*m+e,n-l*g-u*m]}return d.invert=function(g,m){return[r*(c*g-f*m+h),i*(p-f*g-c*m)]},d}function We(t){return Of(function(){return t})()}function Of(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,l=0,c,f=0,h=1,p=1,d=null,g=vf,m=null,b,y,_,x=po,w=.5,$,R,A,D,I;function v(M){return A(M[0]*at,M[1]*at)}function L(M){return M=A.invert(M[0],M[1]),M&&[M[0]*bt,M[1]*bt]}v.stream=function(M){return D&&I===M?D:D=MC(DC(c)(g($(x(I=M)))))},v.preclip=function(M){return arguments.length?(g=M,d=void 0,S()):g},v.postclip=function(M){return arguments.length?(x=M,m=b=y=_=null,S()):x},v.clipAngle=function(M){return arguments.length?(g=+M?ny(d=M*at):(d=null,vf),S()):d*bt},v.clipExtent=function(M){return arguments.length?(x=M==null?(m=b=y=_=null,po):zs(m=+M[0][0],b=+M[0][1],y=+M[1][0],_=+M[1][1]),S()):m==null?null:[[m,b],[y,_]]},v.scale=function(M){return arguments.length?(n=+M,T()):n},v.translate=function(M){return arguments.length?(r=+M[0],i=+M[1],T()):[r,i]},v.center=function(M){return arguments.length?(o=M[0]%360*at,a=M[1]%360*at,T()):[o*bt,a*bt]},v.rotate=function(M){return arguments.length?(s=M[0]%360*at,u=M[1]%360*at,l=M.length>2?M[2]%360*at:0,T()):[s*bt,u*bt,l*bt]},v.angle=function(M){return arguments.length?(f=M%360*at,T()):f*bt},v.reflectX=function(M){return arguments.length?(h=M?-1:1,T()):h<0},v.reflectY=function(M){return arguments.length?(p=M?-1:1,T()):p<0},v.precision=function(M){return arguments.length?($=Ly(R,w=M*M),S()):It(w)},v.fitExtent=function(M,P){return Ks(v,M,P)},v.fitSize=function(M,P){return Nf(v,M,P)},v.fitWidth=function(M,P){return Bf(v,M,P)},v.fitHeight=function(M,P){return Ff(v,M,P)};function T(){var M=ky(n,0,0,h,p,f).apply(null,e(o,a)),P=ky(n,r-M[0],i-M[1],h,p,f);return c=bf(s,u,l),R=mf(e,P),A=mf(c,R),$=Ly(R,w),S()}function S(){return D=I=null,v}return function(){return e=t.apply(this,arguments),v.invert=e.invert&&L,T()}}function zf(t){var e=0,n=ht/3,r=Of(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*at,n=o[1]*at):[e*bt,n*bt]},i}function LC(t){var e=rt(t);function n(r,i){return[r*e,Q(i)/e]}return n.invert=function(r,i){return[r/e,Zt(i*e)]},n}function Ry(t,e){var n=Q(t),r=(n+Q(e))/2;if(pt(r)<it)return LC(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,u){var l=It(i-2*r*Q(u))/r;return[l*Q(s*=r),o-l*rt(s)]}return a.invert=function(s,u){var l=o-u,c=qt(s,pt(l))*me(l);return l*r<0&&(c-=ht*me(s)*me(l)),[c/r,Zt((i-(s*s+l*l)*r*r)/(2*r))]},a}function Qs(){return zf(Ry).scale(155.424).center([0,33.6442])}function Ey(){return Qs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function kC(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function RC(){var t,e,n=Ey(),r,i=Qs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Qs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,l={point:function(h,p){u=[h,p]}};function c(h){var p=h[0],d=h[1];return u=null,r.point(p,d),u||(o.point(p,d),u)||(s.point(p,d),u)}c.invert=function(h){var p=n.scale(),d=n.translate(),g=(h[0]-d[0])/p,m=(h[1]-d[1])/p;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(h)},c.stream=function(h){return t&&e===h?t:t=kC([n.stream(e=h),i.stream(h),a.stream(h)])},c.precision=function(h){return arguments.length?(n.precision(h),i.precision(h),a.precision(h),f()):n.precision()},c.scale=function(h){return arguments.length?(n.scale(h),i.scale(h*.35),a.scale(h),c.translate(n.translate())):n.scale()},c.translate=function(h){if(!arguments.length)return n.translate();var p=n.scale(),d=+h[0],g=+h[1];return r=n.translate(h).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(l),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+it,g+.12*p+it],[d-.214*p-it,g+.234*p-it]]).stream(l),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+it,g+.166*p+it],[d-.115*p-it,g+.234*p-it]]).stream(l),f()},c.fitExtent=function(h,p){return Ks(c,h,p)},c.fitSize=function(h,p){return Nf(c,h,p)},c.fitWidth=function(h,p){return Bf(c,h,p)},c.fitHeight=function(h,p){return Ff(c,h,p)};function f(){return t=e=null,c}return c.scale(1070)}function Iy(t){return function(e,n){var r=rt(e),i=rt(n),o=t(r*i);return o===1/0?[2,0]:[o*i*Q(e),o*Q(n)]}}function $o(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=Q(i),a=rt(i);return[qt(e*o,r*a),Zt(r&&n*o/r)]}}var Gf=Iy(function(t){return It(2/(1+t))});Gf.invert=$o(function(t){return 2*Zt(t/2)});function EC(){return We(Gf).scale(124.75).clipAngle(180-.001)}var Yf=Iy(function(t){return(t=A1(t))&&t/Q(t)});Yf.invert=$o(function(t){return t});function IC(){return We(Yf).scale(79.4188).clipAngle(180-.001)}function wo(t,e){return[t,$s(of((At+e)/2))]}wo.invert=function(t,e){return[t,2*ei(S1(e))-At]};function NC(){return Ny(wo).scale(961/Vt)}function Ny(t){var e=We(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,l;e.scale=function(f){return arguments.length?(r(f),c()):r()},e.translate=function(f){return arguments.length?(i(f),c()):i()},e.center=function(f){return arguments.length?(n(f),c()):n()},e.clipExtent=function(f){return arguments.length?(f==null?a=s=u=l=null:(a=+f[0][0],s=+f[0][1],u=+f[1][0],l=+f[1][1]),c()):a==null?null:[[a,s],[u,l]]};function c(){var f=ht*r(),h=e(V1(e.rotate()).invert([0,0]));return o(a==null?[[h[0]-f,h[1]-f],[h[0]+f,h[1]+f]]:t===wo?[[Math.max(h[0]-f,a),s],[Math.min(h[0]+f,u),l]]:[[a,Math.max(h[1]-f,s)],[u,Math.min(h[1]+f,l)]])}return c()}function Js(t){return of((At+t)/2)}function By(t,e){var n=rt(t),r=t===e?Q(t):$s(n/rt(e))/$s(Js(e)/Js(t)),i=n*rf(Js(t),r)/r;if(!r)return wo;function o(a,s){i>0?s<-At+it&&(s=-At+it):s>At-it&&(s=At-it);var u=i/rf(Js(s),r);return[u*Q(r*a),i-u*rt(r*a)]}return o.invert=function(a,s){var u=i-s,l=me(r)*It(a*a+u*u),c=qt(a,pt(u))*me(u);return u*r<0&&(c-=ht*me(a)*me(u)),[c/r,2*ei(rf(i/l,1/r))-At]},o}function BC(){return zf(By).scale(109.5).parallels([30,30])}function So(t,e){return[t,e]}So.invert=So;function FC(){return We(So).scale(152.63)}function Fy(t,e){var n=rt(t),r=t===e?Q(t):(n-rt(e))/(e-t),i=n/r+t;if(pt(r)<it)return So;function o(a,s){var u=i-s,l=r*a;return[u*Q(l),i-u*rt(l)]}return o.invert=function(a,s){var u=i-s,l=qt(a,pt(u))*me(u);return u*r<0&&(l-=ht*me(a)*me(u)),[l/r,i-me(r)*It(a*a+u*u)]},o}function OC(){return zf(Fy).scale(131.154).center([0,13.9389])}var Ao=1.340264,To=-.081106,Po=893e-6,Mo=.003796,tu=It(3)/2,zC=12;function Uf(t,e){var n=Zt(tu*Q(e)),r=n*n,i=r*r*r;return[t*rt(n)/(tu*(Ao+3*To*r+i*(7*Po+9*Mo*r))),n*(Ao+To*r+i*(Po+Mo*r))]}Uf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<zC&&(s=n*(Ao+To*r+i*(Po+Mo*r))-e,u=Ao+3*To*r+i*(7*Po+9*Mo*r),n-=a=s/u,r=n*n,i=r*r*r,!(pt(a)<uo));++o);return[tu*t*(Ao+3*To*r+i*(7*Po+9*Mo*r))/rt(n),Zt(Q(n)/tu)]};function GC(){return We(Uf).scale(177.158)}function Wf(t,e){var n=rt(e),r=rt(t)*n;return[n*Q(t)/r,Q(e)/r]}Wf.invert=$o(ei);function YC(){return We(Wf).scale(144.049).clipAngle(60)}function UC(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,l,c,f,h=1,p=1,d=_o({point:function(x,w){var $=_([x,w]);this.stream.point($[0],$[1])}}),g=po,m,b;function y(){return h=t*r,p=t*i,m=b=null,_}function _(x){var w=x[0]*h,$=x[1]*p;if(o){var R=$*a-w*s;w=w*a+$*s,$=R}return[w+e,$+n]}return _.invert=function(x){var w=x[0]-e,$=x[1]-n;if(o){var R=$*a+w*s;w=w*a-$*s,$=R}return[w/h,$/p]},_.stream=function(x){return m&&b===x?m:m=d(g(b=x))},_.postclip=function(x){return arguments.length?(g=x,u=l=c=f=null,y()):g},_.clipExtent=function(x){return arguments.length?(g=x==null?(u=l=c=f=null,po):zs(u=+x[0][0],l=+x[0][1],c=+x[1][0],f=+x[1][1]),y()):u==null?null:[[u,l],[c,f]]},_.scale=function(x){return arguments.length?(t=+x,y()):t},_.translate=function(x){return arguments.length?(e=+x[0],n=+x[1],y()):[e,n]},_.angle=function(x){return arguments.length?(o=x%360*at,s=Q(o),a=rt(o),y()):o*bt},_.reflectX=function(x){return arguments.length?(r=x?-1:1,y()):r<0},_.reflectY=function(x){return arguments.length?(i=x?-1:1,y()):i<0},_.fitExtent=function(x,w){return Ks(_,x,w)},_.fitSize=function(x,w){return Nf(_,x,w)},_.fitWidth=function(x,w){return Bf(_,x,w)},_.fitHeight=function(x,w){return Ff(_,x,w)},_}function Hf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Hf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(pt(i)>it&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function WC(){return We(Hf).scale(175.295)}function Xf(t,e){return[rt(e)*Q(t),Q(e)]}Xf.invert=$o(Zt);function HC(){return We(Xf).scale(249.5).clipAngle(90+it)}function jf(t,e){var n=rt(e),r=1+rt(t)*n;return[n*Q(t)/r,Q(e)/r]}jf.invert=$o(function(t){return 2*ei(t)});function XC(){return We(jf).scale(250).clipAngle(142)}function Vf(t,e){return[$s(of((At+e)/2)),-t]}Vf.invert=function(t,e){return[-e,2*ei(S1(t))-At]};function jC(){var t=Ny(Vf),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function VC(t,e){return t.parent===e.parent?1:2}function qC(t){return t.reduce(ZC,0)/t.length}function ZC(t,e){return t+e.x}function KC(t){return 1+t.reduce(QC,0)}function QC(t,e){return Math.max(t,e.y)}function JC(t){for(var e;e=t.children;)t=e[0];return t}function t7(t){for(var e;e=t.children;)t=e[e.length-1];return t}function e7(){var t=VC,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(h){var p=h.children;p?(h.x=qC(p),h.y=KC(p)):(h.x=a?s+=t(h,a):0,h.y=0,a=h)});var u=JC(o),l=t7(o),c=u.x-t(u,l)/2,f=l.x+t(l,u)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*e,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-c)/(f-c)*e,h.y=(1-(o.y?h.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function n7(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function r7(){return this.eachAfter(n7)}function i7(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function o7(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function a7(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function s7(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function u7(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function l7(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function c7(t){for(var e=this,n=f7(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function f7(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function h7(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function p7(){return Array.from(this)}function d7(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function g7(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*m7(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function eu(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=x7)):e===void 0&&(e=b7);for(var n=new ur(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new ur(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(Oy)}function y7(){return eu(this).eachBefore(v7)}function b7(t){return t.children}function x7(t){return Array.isArray(t)?t[1]:null}function v7(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Oy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ur(t){this.data=t,this.depth=this.height=0,this.parent=null}ur.prototype=eu.prototype={constructor:ur,count:r7,each:i7,eachAfter:a7,eachBefore:o7,find:s7,sum:u7,sort:l7,path:c7,ancestors:h7,descendants:p7,leaves:d7,links:g7,copy:y7,[Symbol.iterator]:m7};function nu(t){return t==null?null:zy(t)}function zy(t){if(typeof t!="function")throw new Error;return t}function lr(){return 0}function ui(t){return function(){return t}}const _7=1664525,$7=1013904223,Gy=4294967296;function qf(){let t=1;return()=>(t=(_7*t+$7)%Gy)/Gy}function w7(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function S7(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function A7(t){return Yy(t,qf())}function Yy(t,e){for(var n=0,r=(t=S7(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&Uy(a,o)?++n:(a=P7(i=T7(i,o)),n=0);return a}function T7(t,e){var n,r;if(Zf(e,t))return[e];for(n=0;n<t.length;++n)if(ru(e,t[n])&&Zf(Do(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(ru(Do(t[n],t[r]),e)&&ru(Do(t[n],e),t[r])&&ru(Do(t[r],e),t[n])&&Zf(Wy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function ru(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Uy(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Zf(t,e){for(var n=0;n<e.length;++n)if(!Uy(t,e[n]))return!1;return!0}function P7(t){switch(t.length){case 1:return M7(t[0]);case 2:return Do(t[0],t[1]);case 3:return Wy(t[0],t[1],t[2])}}function M7(t){return{x:t.x,y:t.y,r:t.r}}function Do(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,f=Math.sqrt(u*u+l*l);return{x:(n+o+u/f*c)/2,y:(r+a+l/f*c)/2,r:(f+i+s)/2}}function Wy(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,f=n.r,h=r-a,p=r-l,d=i-s,g=i-c,m=u-o,b=f-o,y=r*r+i*i-o*o,_=y-a*a-s*s+u*u,x=y-l*l-c*c+f*f,w=p*d-h*g,$=(d*x-g*_)/(w*2)-r,R=(g*m-d*b)/w,A=(p*_-h*x)/(w*2)-i,D=(h*b-p*m)/w,I=R*R+D*D-1,v=2*(o+$*R+A*D),L=$*$+A*A-o*o,T=-(Math.abs(I)>1e-6?(v+Math.sqrt(v*v-4*I*L))/(2*I):L/v);return{x:r+$+R*T,y:i+A+D*T,r:T}}function Hy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,l=r*r+a*a;l?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(l+u-o)/(2*l),s=Math.sqrt(Math.max(0,u/l-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(l+o-u)/(2*l),s=Math.sqrt(Math.max(0,o/l-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function Xy(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function jy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function iu(t){this._=t,this.next=null,this.previous=null}function Vy(t,e){if(!(o=(t=w7(t)).length))return 0;var n,r,i,o,a,s,u,l,c,f,h;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Hy(r,n,i=t[2]),n=new iu(n),r=new iu(r),i=new iu(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){Hy(n._,r._,i=t[u]),i=new iu(i),l=r.next,c=n.previous,f=r._.r,h=n._.r;do if(f<=h){if(Xy(l._,i._)){r=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.next}else{if(Xy(c._,i._)){n=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.previous}while(l!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=jy(n);(i=i.next)!==r;)(s=jy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Yy(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function D7(t){return Vy(t,qf()),t}function C7(t){return Math.sqrt(t.value)}function L7(){var t=null,e=1,n=1,r=lr;function i(o){const a=qf();return o.x=e/2,o.y=n/2,t?o.eachBefore(qy(t)).eachAfter(Kf(r,.5,a)).eachBefore(Zy(1)):o.eachBefore(qy(C7)).eachAfter(Kf(lr,1,a)).eachAfter(Kf(r,o.r/Math.min(e,n),a)).eachBefore(Zy(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=nu(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:ui(+o),i):r},i}function qy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Kf(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=Vy(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function Zy(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Ky(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Co(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,l=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}function k7(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(Ky),a}function o(a,s){return function(u){u.children&&Co(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var l=u.x0,c=u.y0,f=u.x1-n,h=u.y1-n;f<l&&(l=f=(l+f)/2),h<c&&(c=h=(c+h)/2),u.x0=l,u.y0=c,u.x1=f,u.y1=h}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var R7={depth:-1},Qy={},Qf={};function E7(t){return t.id}function I7(t){return t.parentId}function N7(){var t=E7,e=I7,n;function r(i){var o=Array.from(i),a=t,s=e,u,l,c,f,h,p,d,g,m=new Map;if(n!=null){const b=o.map((x,w)=>B7(n(x,w,i))),y=b.map(Jy),_=new Set(b).add("");for(const x of y)_.has(x)||(_.add(x),b.push(x),y.push(Jy(x)),o.push(Qf));a=(x,w)=>b[w],s=(x,w)=>y[w]}for(c=0,u=o.length;c<u;++c)l=o[c],p=o[c]=new ur(l),(d=a(l,c,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?Qy:p)),(d=s(l,c,i))!=null&&(d+="")&&(p.parent=d);for(c=0;c<u;++c)if(p=o[c],d=p.parent){if(h=m.get(d),!h)throw new Error("missing: "+d);if(h===Qy)throw new Error("ambiguous: "+d);h.children?h.children.push(p):h.children=[p],p.parent=h}else{if(f)throw new Error("multiple roots");f=p}if(!f)throw new Error("no root");if(n!=null){for(;f.data===Qf&&f.children.length===1;)f=f.children[0],--u;for(let b=o.length-1;b>=0&&(p=o[b],p.data===Qf);--b)p.data=null}if(f.parent=R7,f.eachBefore(function(b){b.depth=b.parent.depth+1,--u}).eachBefore(Oy),f.parent=null,u>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=nu(i),r):t},r.parentId=function(i){return arguments.length?(e=nu(i),r):e},r.path=function(i){return arguments.length?(n=nu(i),r):n},r}function B7(t){t=`${t}`;let e=t.length;return Jf(t,e-1)&&!Jf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Jy(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Jf(t,e););return t.slice(0,e)}function Jf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function F7(t,e){return t.parent===e.parent?1:2}function th(t){var e=t.children;return e?e[0]:t.t}function eh(t){var e=t.children;return e?e[e.length-1]:t.t}function O7(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function z7(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function G7(t,e,n){return t.a.parent===e.parent?t.a:n}function ou(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}ou.prototype=Object.create(ur.prototype);function Y7(t){for(var e=new ou(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new ou(o[a],a)),i.parent=n;return(e.parent=new ou(null,0)).children=[e],e}function U7(){var t=F7,e=1,n=1,r=null;function i(l){var c=Y7(l);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)l.eachBefore(u);else{var f=l,h=l,p=l;l.eachBefore(function(y){y.x<f.x&&(f=y),y.x>h.x&&(h=y),y.depth>p.depth&&(p=y)});var d=f===h?1:t(f,h)/2,g=d-f.x,m=e/(h.x+d+g),b=n/(p.depth||1);l.eachBefore(function(y){y.x=(y.x+g)*m,y.y=y.depth*b})}return l}function o(l){var c=l.children,f=l.parent.children,h=l.i?f[l.i-1]:null;if(c){z7(l);var p=(c[0].z+c[c.length-1].z)/2;h?(l.z=h.z+t(l._,h._),l.m=l.z-p):l.z=p}else h&&(l.z=h.z+t(l._,h._));l.parent.A=s(l,h,l.parent.A||f[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,c,f){if(c){for(var h=l,p=l,d=c,g=h.parent.children[0],m=h.m,b=p.m,y=d.m,_=g.m,x;d=eh(d),h=th(h),d&&h;)g=th(g),p=eh(p),p.a=l,x=d.z+y-h.z-m+t(d._,h._),x>0&&(O7(G7(d,l,f),l,x),m+=x,b+=x),y+=d.m,m+=h.m,_+=g.m,b+=p.m;d&&!eh(p)&&(p.t=d,p.m+=y-b),h&&!th(g)&&(g.t=h,g.m+=m-_,f=l)}return f}function u(l){l.x*=e,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(t=l,i):t},i.size=function(l){return arguments.length?(r=!1,e=+l[0],n=+l[1],i):r?null:[e,n]},i.nodeSize=function(l){return arguments.length?(r=!0,e=+l[0],n=+l[1],i):r?[e,n]:null},i}function au(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,l=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}var tb=(1+Math.sqrt(5))/2;function eb(t,e,n,r,i,o){for(var a=[],s=e.children,u,l,c=0,f=0,h=s.length,p,d,g=e.value,m,b,y,_,x,w,$;c<h;){p=i-n,d=o-r;do m=s[f++].value;while(!m&&f<h);for(b=y=m,w=Math.max(d/p,p/d)/(g*t),$=m*m*w,x=Math.max(y/$,$/b);f<h;++f){if(m+=l=s[f].value,l<b&&(b=l),l>y&&(y=l),$=m*m*w,_=Math.max(y/$,$/b),_>x){m-=l;break}x=_}a.push(u={value:m,dice:p<d,children:s.slice(c,f)}),u.dice?Co(u,n,r,i,g?r+=d*m/g:o):au(u,n,r,g?n+=p*m/g:i,o),g-=m,c=f}return a}const nh=function t(e){function n(r,i,o,a,s){eb(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(tb);function nb(){var t=nh,e=!1,n=1,r=1,i=[0],o=lr,a=lr,s=lr,u=lr,l=lr;function c(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(f),i=[0],e&&h.eachBefore(Ky),h}function f(h){var p=i[h.depth],d=h.x0+p,g=h.y0+p,m=h.x1-p,b=h.y1-p;m<d&&(d=m=(d+m)/2),b<g&&(g=b=(g+b)/2),h.x0=d,h.y0=g,h.x1=m,h.y1=b,h.children&&(p=i[h.depth+1]=o(h)/2,d+=l(h)-p,g+=a(h)-p,m-=s(h)-p,b-=u(h)-p,m<d&&(d=m=(d+m)/2),b<g&&(g=b=(g+b)/2),t(h,d,g,m,b))}return c.round=function(h){return arguments.length?(e=!!h,c):e},c.size=function(h){return arguments.length?(n=+h[0],r=+h[1],c):[n,r]},c.tile=function(h){return arguments.length?(t=zy(h),c):t},c.padding=function(h){return arguments.length?c.paddingInner(h).paddingOuter(h):c.paddingInner()},c.paddingInner=function(h){return arguments.length?(o=typeof h=="function"?h:ui(+h),c):o},c.paddingOuter=function(h){return arguments.length?c.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):c.paddingTop()},c.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:ui(+h),c):a},c.paddingRight=function(h){return arguments.length?(s=typeof h=="function"?h:ui(+h),c):s},c.paddingBottom=function(h){return arguments.length?(u=typeof h=="function"?h:ui(+h),c):u},c.paddingLeft=function(h){return arguments.length?(l=typeof h=="function"?h:ui(+h),c):l},c}function W7(t,e,n,r,i){var o=t.children,a,s=o.length,u,l=new Array(s+1);for(l[0]=u=a=0;a<s;++a)l[a+1]=u+=o[a].value;c(0,s,t.value,e,n,r,i);function c(f,h,p,d,g,m,b){if(f>=h-1){var y=o[f];y.x0=d,y.y0=g,y.x1=m,y.y1=b;return}for(var _=l[f],x=p/2+_,w=f+1,$=h-1;w<$;){var R=w+$>>>1;l[R]<x?w=R+1:$=R}x-l[w-1]<l[w]-x&&f+1<w&&--w;var A=l[w]-_,D=p-A;if(m-d>b-g){var I=p?(d*D+m*A)/p:m;c(f,w,A,d,g,I,b),c(w,h,D,I,g,m,b)}else{var v=p?(g*D+b*A)/p:b;c(f,w,A,d,g,m,v),c(w,h,D,d,v,m,b)}}}function H7(t,e,n,r,i){(t.depth&1?au:Co)(t,e,n,r,i)}const X7=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,l,c,f,h=-1,p,d=u.length,g=r.value;++h<d;){for(l=u[h],c=l.children,f=l.value=0,p=c.length;f<p;++f)l.value+=c[f].value;l.dice?Co(l,i,o,a,g?o+=(s-o)*l.value/g:s):au(l,i,o,g?i+=(a-i)*l.value/g:a,s),g-=l.value}else r._squarify=u=eb(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(tb);function j7(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function V7(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,u=0;++e<n;)o=a,a=t[e],u+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return u*=3,[r/u,i/u]}function q7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Z7(t,e){return t[0]-e[0]||t[1]-e[1]}function rb(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&q7(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function K7(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Z7),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=rb(r),a=rb(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],l=[];for(e=o.length-1;e>=0;--e)l.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)l.push(t[r[a[e]][2]]);return l}function Q7(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,l,c=!1,f=0;f<n;++f)r=t[f],u=r[0],l=r[1],l>o!=s>o&&i<(a-u)*(o-l)/(s-l)+u&&(c=!c),a=u,s=l;return c}function J7(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],u=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,u+=Math.hypot(i,o);return u}const Bt=Math.random,tL=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Bt),eL=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Bt),rh=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Bt),nL=function t(e){var n=rh.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Bt),ib=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Bt),rL=function t(e){var n=ib.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Bt),iL=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Bt),oL=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Bt),aL=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Bt),ob=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Bt),ih=function t(e){var n=rh.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var l=n(),c=1+s*l;while(c<=0);c*=c*c;var f=1-e()}while(f>=1-.0331*l*l*l*l&&Math.log(f)>=.5*l*l+a*(1-c+Math.log(c)));return a*c*u()*o}}return r.source=t,r}(Bt),ab=function t(e){var n=ih.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(Bt),sb=function t(e){var n=ob.source(e),r=ab.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,l=a;u*l>16&&u*(1-l)>16;){var c=Math.floor((u+1)*l),f=r(c,u-c+1)();f<=l?(s+=c,u-=c,l=(l-f)/(1-f)):(u=c-1,l/=f)}for(var h=l<.5,p=h?l:1-l,d=n(p),g=d(),m=0;g<=u;++m)g+=d();return s+(h?m:u-m)}}return i.source=t,i}(Bt),sL=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Bt),uL=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Bt),lL=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Bt),cL=function t(e){var n=ih.source(e),r=sb.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),l=n(u)();if(l>s)return a+r(u-1,s/l)();a+=u,s-=l}for(var c=-Math.log1p(-e()),f=0;c<=s;++f)c-=Math.log1p(-e());return a+f}}return i.source=t,i}(Bt),fL=1664525,hL=1013904223,ub=1/4294967296;function pL(t=Math.random()){let e=(0<=t&&t<1?t/ub:Math.abs(t))|0;return()=>(e=fL*e+hL|0,ub*(e>>>0))}function be(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function on(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const oh=Symbol("implicit");function ah(){var t=new Ni,e=[],n=[],r=oh;function i(o){let a=t.get(o);if(a===void 0){if(r!==oh)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ni;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ah(e,n).unknown(r)},be.apply(i,arguments),i}function sh(){var t=ah().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,c=.5;delete t.unknown;function f(){var h=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,h-u+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(h-u))*c,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=gn(h).map(function(b){return d+o*b});return n(p?m.reverse():m)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,f()):s},t.padding=function(h){return arguments.length?(u=Math.min(1,l=+h),f()):u},t.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),f()):u},t.paddingOuter=function(h){return arguments.length?(l=+h,f()):l},t.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},t.copy=function(){return sh(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},be.apply(f(),arguments)}function lb(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return lb(e())},t}function uh(){return lb(sh.apply(null,arguments).paddingInner(1))}function dL(t){return function(){return t}}function su(t){return+t}var cb=[0,1];function te(t){return t}function lh(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:dL(isNaN(e)?NaN:.5)}function gL(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function mL(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=lh(i,r),o=n(a,o)):(r=lh(r,i),o=n(o,a)),function(s){return o(r(s))}}function yL(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=lh(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=zn(t,s,1,r)-1;return o[u](i[u](s))}}function Lo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function uu(){var t=cb,e=cb,n=Ze,r,i,o,a=te,s,u,l;function c(){var h=Math.min(t.length,e.length);return a!==te&&(a=gL(t[0],t[h-1])),s=h>2?yL:mL,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(e,t.map(r),ge)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,su),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=Ka,c()},f.clamp=function(h){return arguments.length?(a=h?!0:te,c()):a!==te},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function ch(){return uu()(te,te)}function fb(t,e,n,r){var i=Ma(t,e,n),o;switch(r=ti(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=$1(i,a))&&(r.precision=o),ef(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=w1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=_1(i))&&(r.precision=o-(r.type==="%")*2);break}}return so(r)}function $n(t){var e=t.domain;return t.ticks=function(n){var r=e();return Yn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return fb(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=Un(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function ko(){var t=ch();return t.copy=function(){return Lo(t,ko())},be.apply(t,arguments),$n(t)}function hb(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,su),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return hb(t).unknown(e)},t=arguments.length?Array.from(t,su):[0,1],$n(n)}function pb(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function db(t){return Math.log(t)}function gb(t){return Math.exp(t)}function bL(t){return-Math.log(-t)}function xL(t){return-Math.exp(-t)}function vL(t){return isFinite(t)?+("1e"+t):t<0?0:t}function _L(t){return t===10?vL:t===Math.E?Math.exp:e=>Math.pow(t,e)}function $L(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function mb(t){return(e,n)=>-t(-e,n)}function fh(t){const e=t(db,gb),n=e.domain;let r=10,i,o;function a(){return i=$L(r),o=_L(r),n()[0]<0?(i=mb(i),o=mb(o),t(bL,xL)):t(db,gb),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=i(l),p=i(c),d,g;const m=s==null?10:+s;let b=[];if(!(r%1)&&p-h<m){if(h=Math.floor(h),p=Math.ceil(p),l>0){for(;h<=p;++h)for(d=1;d<r;++d)if(g=h<0?d/o(-h):d*o(h),!(g<l)){if(g>c)break;b.push(g)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(g=h>0?d/o(-h):d*o(h),!(g<l)){if(g>c)break;b.push(g)}b.length*2<m&&(b=Yn(l,c,m))}else b=Yn(h,p,Math.min(p-h,m)).map(o);return f?b.reverse():b},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=ti(u)).precision==null&&(u.trim=!0),u=so(u)),s===1/0)return u;const l=Math.max(1,r*s/e.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},e.nice=()=>n(pb(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function yb(){const t=fh(uu()).domain([1,10]);return t.copy=()=>Lo(t,yb()).base(t.base()),be.apply(t,arguments),t}function bb(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function xb(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function hh(t){var e=1,n=t(bb(e),xb(e));return n.constant=function(r){return arguments.length?t(bb(e=+r),xb(e)):e},$n(n)}function vb(){var t=hh(uu());return t.copy=function(){return Lo(t,vb()).constant(t.constant())},be.apply(t,arguments)}function _b(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function wL(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function SL(t){return t<0?-t*t:t*t}function ph(t){var e=t(te,te),n=1;function r(){return n===1?t(te,te):n===.5?t(wL,SL):t(_b(n),_b(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},$n(e)}function li(){var t=ph(uu());return t.copy=function(){return Lo(t,li()).exponent(t.exponent())},be.apply(t,arguments),t}function AL(){return li.apply(null,arguments).exponent(.5)}function $b(t){return Math.sign(t)*t*t}function TL(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function wb(){var t=ch(),e=[0,1],n=!1,r;function i(o){var a=TL(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert($b(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,su)).map($b)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return wb(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},be.apply(i,arguments),$n(i)}function Sb(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=e0(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[zn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort($t),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Sb().domain(t).range(e).unknown(r)},be.apply(o,arguments)}function Ab(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[zn(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Ab().domain([t,e]).range(i).unknown(o)},be.apply($n(a),arguments)}function Tb(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[zn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Tb().domain(t).range(e).unknown(n)},be.apply(i,arguments)}const dh=new Date,gh=new Date;function Mt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let l;do u.push(l=new Date(+o)),e(o,s),t(o);while(l<o&&o<a);return u},i.filter=o=>Mt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(dh.setTime(+o),gh.setTime(+a),t(dh),t(gh),Math.floor(n(dh,gh))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const ci=Mt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ci.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Mt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):ci);const Pb=ci.range,an=1e3,xe=an*60,sn=xe*60,un=sn*24,mh=un*7,Mb=un*30,yh=un*365,ln=Mt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*an)},(t,e)=>(e-t)/an,t=>t.getUTCSeconds()),Db=ln.range,lu=Mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*an)},(t,e)=>{t.setTime(+t+e*xe)},(t,e)=>(e-t)/xe,t=>t.getMinutes()),PL=lu.range,cu=Mt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*xe)},(t,e)=>(e-t)/xe,t=>t.getUTCMinutes()),ML=cu.range,fu=Mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*an-t.getMinutes()*xe)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getHours()),DL=fu.range,hu=Mt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getUTCHours()),CL=hu.range,fi=Mt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*xe)/un,t=>t.getDate()-1),LL=fi.range,Ro=Mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/un,t=>t.getUTCDate()-1),kL=Ro.range,bh=Mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/un,t=>Math.floor(t/un)),RL=bh.range;function cr(t){return Mt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*xe)/mh)}const hi=cr(0),Eo=cr(1),Cb=cr(2),Lb=cr(3),fr=cr(4),kb=cr(5),Rb=cr(6),Eb=hi.range,EL=Eo.range,IL=Cb.range,NL=Lb.range,BL=fr.range,FL=kb.range,OL=Rb.range;function hr(t){return Mt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/mh)}const pi=hr(0),Io=hr(1),Ib=hr(2),Nb=hr(3),pr=hr(4),Bb=hr(5),Fb=hr(6),Ob=pi.range,zL=Io.range,GL=Ib.range,YL=Nb.range,UL=pr.range,WL=Bb.range,HL=Fb.range,pu=Mt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),XL=pu.range,du=Mt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),jL=du.range,He=Mt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());He.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Mt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const VL=He.range,Xe=Mt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Xe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Mt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const qL=Xe.range;function zb(t,e,n,r,i,o){const a=[[ln,1,an],[ln,5,5*an],[ln,15,15*an],[ln,30,30*an],[o,1,xe],[o,5,5*xe],[o,15,15*xe],[o,30,30*xe],[i,1,sn],[i,3,3*sn],[i,6,6*sn],[i,12,12*sn],[r,1,un],[r,2,2*un],[n,1,mh],[e,1,Mb],[e,3,3*Mb],[t,1,yh]];function s(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const p=f&&typeof f.range=="function"?f:u(l,c,f),d=p?p.range(l,+c+1):[];return h?d.reverse():d}function u(l,c,f){const h=Math.abs(c-l)/f,p=Sa(([,,m])=>m).right(a,h);if(p===a.length)return t.every(Ma(l/yh,c/yh,f));if(p===0)return ci.every(Math.max(Ma(l,c,f),1));const[d,g]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return d.every(g)}return[s,u]}const[Gb,Yb]=zb(Xe,du,pi,bh,hu,cu),[Ub,Wb]=zb(He,pu,hi,fi,fu,lu);function xh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function vh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function No(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Hb(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=Bo(i),c=Fo(i),f=Bo(o),h=Fo(o),p=Bo(a),d=Fo(a),g=Bo(s),m=Fo(s),b=Bo(u),y=Fo(u),_={a:G,A:O,b:k,B:E,c:null,d:Kb,e:Kb,f:b9,g:M9,G:C9,H:g9,I:m9,j:y9,L:Qb,m:x9,M:v9,p:C,q:F,Q:ix,s:ox,S:_9,u:$9,U:w9,V:S9,w:A9,W:T9,x:null,X:null,y:P9,Y:D9,Z:L9,"%":rx},x={a:H,A:J,b:z,B:V,c:null,d:tx,e:tx,f:I9,g:H9,G:j9,H:k9,I:R9,j:E9,L:ex,m:N9,M:B9,p:Y,q:K,Q:ix,s:ox,S:F9,u:O9,U:z9,V:G9,w:Y9,W:U9,x:null,X:null,y:W9,Y:X9,Z:V9,"%":rx},w={a:I,A:v,b:L,B:T,c:S,d:qb,e:qb,f:f9,g:Vb,G:jb,H:Zb,I:Zb,j:s9,L:c9,m:a9,M:u9,p:D,q:o9,Q:p9,s:d9,S:l9,u:t9,U:e9,V:n9,w:JL,W:r9,x:M,X:P,y:Vb,Y:jb,Z:i9,"%":h9};_.x=$(n,_),_.X=$(r,_),_.c=$(e,_),x.x=$(n,x),x.X=$(r,x),x.c=$(e,x);function $(j,nt){return function(st){var X=[],dt=-1,ft=0,Ut=j.length,ee,ut,Pt;for(st instanceof Date||(st=new Date(+st));++dt<Ut;)j.charCodeAt(dt)===37&&(X.push(j.slice(ft,dt)),(ut=Xb[ee=j.charAt(++dt)])!=null?ee=j.charAt(++dt):ut=ee==="e"?" ":"0",(Pt=nt[ee])&&(ee=Pt(st,ut)),X.push(ee),ft=dt+1);return X.push(j.slice(ft,dt)),X.join("")}}function R(j,nt){return function(st){var X=No(1900,void 0,1),dt=A(X,j,st+="",0),ft,Ut;if(dt!=st.length)return null;if("Q"in X)return new Date(X.Q);if("s"in X)return new Date(X.s*1e3+("L"in X?X.L:0));if(nt&&!("Z"in X)&&(X.Z=0),"p"in X&&(X.H=X.H%12+X.p*12),X.m===void 0&&(X.m="q"in X?X.q:0),"V"in X){if(X.V<1||X.V>53)return null;"w"in X||(X.w=1),"Z"in X?(ft=vh(No(X.y,0,1)),Ut=ft.getUTCDay(),ft=Ut>4||Ut===0?Io.ceil(ft):Io(ft),ft=Ro.offset(ft,(X.V-1)*7),X.y=ft.getUTCFullYear(),X.m=ft.getUTCMonth(),X.d=ft.getUTCDate()+(X.w+6)%7):(ft=xh(No(X.y,0,1)),Ut=ft.getDay(),ft=Ut>4||Ut===0?Eo.ceil(ft):Eo(ft),ft=fi.offset(ft,(X.V-1)*7),X.y=ft.getFullYear(),X.m=ft.getMonth(),X.d=ft.getDate()+(X.w+6)%7)}else("W"in X||"U"in X)&&("w"in X||(X.w="u"in X?X.u%7:"W"in X?1:0),Ut="Z"in X?vh(No(X.y,0,1)).getUTCDay():xh(No(X.y,0,1)).getDay(),X.m=0,X.d="W"in X?(X.w+6)%7+X.W*7-(Ut+5)%7:X.w+X.U*7-(Ut+6)%7);return"Z"in X?(X.H+=X.Z/100|0,X.M+=X.Z%100,vh(X)):xh(X)}}function A(j,nt,st,X){for(var dt=0,ft=nt.length,Ut=st.length,ee,ut;dt<ft;){if(X>=Ut)return-1;if(ee=nt.charCodeAt(dt++),ee===37){if(ee=nt.charAt(dt++),ut=w[ee in Xb?nt.charAt(dt++):ee],!ut||(X=ut(j,st,X))<0)return-1}else if(ee!=st.charCodeAt(X++))return-1}return X}function D(j,nt,st){var X=l.exec(nt.slice(st));return X?(j.p=c.get(X[0].toLowerCase()),st+X[0].length):-1}function I(j,nt,st){var X=p.exec(nt.slice(st));return X?(j.w=d.get(X[0].toLowerCase()),st+X[0].length):-1}function v(j,nt,st){var X=f.exec(nt.slice(st));return X?(j.w=h.get(X[0].toLowerCase()),st+X[0].length):-1}function L(j,nt,st){var X=b.exec(nt.slice(st));return X?(j.m=y.get(X[0].toLowerCase()),st+X[0].length):-1}function T(j,nt,st){var X=g.exec(nt.slice(st));return X?(j.m=m.get(X[0].toLowerCase()),st+X[0].length):-1}function S(j,nt,st){return A(j,e,nt,st)}function M(j,nt,st){return A(j,n,nt,st)}function P(j,nt,st){return A(j,r,nt,st)}function G(j){return a[j.getDay()]}function O(j){return o[j.getDay()]}function k(j){return u[j.getMonth()]}function E(j){return s[j.getMonth()]}function C(j){return i[+(j.getHours()>=12)]}function F(j){return 1+~~(j.getMonth()/3)}function H(j){return a[j.getUTCDay()]}function J(j){return o[j.getUTCDay()]}function z(j){return u[j.getUTCMonth()]}function V(j){return s[j.getUTCMonth()]}function Y(j){return i[+(j.getUTCHours()>=12)]}function K(j){return 1+~~(j.getUTCMonth()/3)}return{format:function(j){var nt=$(j+="",_);return nt.toString=function(){return j},nt},parse:function(j){var nt=R(j+="",!1);return nt.toString=function(){return j},nt},utcFormat:function(j){var nt=$(j+="",x);return nt.toString=function(){return j},nt},utcParse:function(j){var nt=R(j+="",!0);return nt.toString=function(){return j},nt}}}var Xb={"-":"",_:" ",0:"0"},Nt=/^\s*\d+/,ZL=/^%/,KL=/[\\^$*+?|[\]().{}]/g;function mt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function QL(t){return t.replace(KL,"\\$&")}function Bo(t){return new RegExp("^(?:"+t.map(QL).join("|")+")","i")}function Fo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function JL(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function t9(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function e9(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function n9(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function r9(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function jb(t,e,n){var r=Nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Vb(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function i9(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function o9(t,e,n){var r=Nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function a9(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function qb(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function s9(t,e,n){var r=Nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Zb(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function u9(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function l9(t,e,n){var r=Nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function c9(t,e,n){var r=Nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function f9(t,e,n){var r=Nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function h9(t,e,n){var r=ZL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function p9(t,e,n){var r=Nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function d9(t,e,n){var r=Nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Kb(t,e){return mt(t.getDate(),e,2)}function g9(t,e){return mt(t.getHours(),e,2)}function m9(t,e){return mt(t.getHours()%12||12,e,2)}function y9(t,e){return mt(1+fi.count(He(t),t),e,3)}function Qb(t,e){return mt(t.getMilliseconds(),e,3)}function b9(t,e){return Qb(t,e)+"000"}function x9(t,e){return mt(t.getMonth()+1,e,2)}function v9(t,e){return mt(t.getMinutes(),e,2)}function _9(t,e){return mt(t.getSeconds(),e,2)}function $9(t){var e=t.getDay();return e===0?7:e}function w9(t,e){return mt(hi.count(He(t)-1,t),e,2)}function Jb(t){var e=t.getDay();return e>=4||e===0?fr(t):fr.ceil(t)}function S9(t,e){return t=Jb(t),mt(fr.count(He(t),t)+(He(t).getDay()===4),e,2)}function A9(t){return t.getDay()}function T9(t,e){return mt(Eo.count(He(t)-1,t),e,2)}function P9(t,e){return mt(t.getFullYear()%100,e,2)}function M9(t,e){return t=Jb(t),mt(t.getFullYear()%100,e,2)}function D9(t,e){return mt(t.getFullYear()%1e4,e,4)}function C9(t,e){var n=t.getDay();return t=n>=4||n===0?fr(t):fr.ceil(t),mt(t.getFullYear()%1e4,e,4)}function L9(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+mt(e/60|0,"0",2)+mt(e%60,"0",2)}function tx(t,e){return mt(t.getUTCDate(),e,2)}function k9(t,e){return mt(t.getUTCHours(),e,2)}function R9(t,e){return mt(t.getUTCHours()%12||12,e,2)}function E9(t,e){return mt(1+Ro.count(Xe(t),t),e,3)}function ex(t,e){return mt(t.getUTCMilliseconds(),e,3)}function I9(t,e){return ex(t,e)+"000"}function N9(t,e){return mt(t.getUTCMonth()+1,e,2)}function B9(t,e){return mt(t.getUTCMinutes(),e,2)}function F9(t,e){return mt(t.getUTCSeconds(),e,2)}function O9(t){var e=t.getUTCDay();return e===0?7:e}function z9(t,e){return mt(pi.count(Xe(t)-1,t),e,2)}function nx(t){var e=t.getUTCDay();return e>=4||e===0?pr(t):pr.ceil(t)}function G9(t,e){return t=nx(t),mt(pr.count(Xe(t),t)+(Xe(t).getUTCDay()===4),e,2)}function Y9(t){return t.getUTCDay()}function U9(t,e){return mt(Io.count(Xe(t)-1,t),e,2)}function W9(t,e){return mt(t.getUTCFullYear()%100,e,2)}function H9(t,e){return t=nx(t),mt(t.getUTCFullYear()%100,e,2)}function X9(t,e){return mt(t.getUTCFullYear()%1e4,e,4)}function j9(t,e){var n=t.getUTCDay();return t=n>=4||n===0?pr(t):pr.ceil(t),mt(t.getUTCFullYear()%1e4,e,4)}function V9(){return"+0000"}function rx(){return"%"}function ix(t){return+t}function ox(t){return Math.floor(+t/1e3)}var di,_h,ax,gu,$h;sx({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function sx(t){return di=Hb(t),_h=di.format,ax=di.parse,gu=di.utcFormat,$h=di.utcParse,di}var ux="%Y-%m-%dT%H:%M:%S.%LZ";function q9(t){return t.toISOString()}var Z9=Date.prototype.toISOString?q9:gu(ux);const K9=Z9;function Q9(t){var e=new Date(t);return isNaN(e)?null:e}var J9=+new Date("2000-01-01T00:00:00.000Z")?Q9:$h(ux);const tk=J9;function ek(t){return new Date(t)}function nk(t){return t instanceof Date?+t:+new Date(+t)}function wh(t,e,n,r,i,o,a,s,u,l){var c=ch(),f=c.invert,h=c.domain,p=l(".%L"),d=l(":%S"),g=l("%I:%M"),m=l("%I %p"),b=l("%a %d"),y=l("%b %d"),_=l("%B"),x=l("%Y");function w($){return(u($)<$?p:s($)<$?d:a($)<$?g:o($)<$?m:r($)<$?i($)<$?b:y:n($)<$?_:x)($)}return c.invert=function($){return new Date(f($))},c.domain=function($){return arguments.length?h(Array.from($,nk)):h().map(ek)},c.ticks=function($){var R=h();return t(R[0],R[R.length-1],$??10)},c.tickFormat=function($,R){return R==null?w:l(R)},c.nice=function($){var R=h();return(!$||typeof $.range!="function")&&($=e(R[0],R[R.length-1],$??10)),$?h(pb(R,$)):c},c.copy=function(){return Lo(c,wh(t,e,n,r,i,o,a,s,u,l))},c}function rk(){return be.apply(wh(Ub,Wb,He,pu,hi,fi,fu,lu,ln,_h).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ik(){return be.apply(wh(Gb,Yb,Xe,du,pi,Ro,hu,cu,ln,gu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function mu(){var t=0,e=1,n,r,i,o,a=te,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:a(i===0?.5:(f=(o(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(a=f,l):a};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,a=f(p,d),l):[a(0),a(1)]}}return l.range=c(Ze),l.rangeRound=c(Ka),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return o=f,n=f(t),r=f(e),i=n===r?0:1/(r-n),l}}function wn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function lx(){var t=$n(mu()(te));return t.copy=function(){return wn(t,lx())},on.apply(t,arguments)}function cx(){var t=fh(mu()).domain([1,10]);return t.copy=function(){return wn(t,cx()).base(t.base())},on.apply(t,arguments)}function fx(){var t=hh(mu());return t.copy=function(){return wn(t,fx()).constant(t.constant())},on.apply(t,arguments)}function Sh(){var t=ph(mu());return t.copy=function(){return wn(t,Sh()).exponent(t.exponent())},on.apply(t,arguments)}function ok(){return Sh.apply(null,arguments).exponent(.5)}function hx(){var t=[],e=te;function n(r){if(r!=null&&!isNaN(r=+r))return e((zn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort($t),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Oi(t,o/r))},n.copy=function(){return hx(e).domain(t)},on.apply(n,arguments)}function yu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,l=te,c,f=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+c(g))-o)*(r*g<r*o?s:u),l(f?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=c(t=+t),o=c(e=+e),a=c(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(g){return arguments.length?(f=!!g,p):f},p.interpolator=function(g){return arguments.length?(l=g,p):l};function d(g){return function(m){var b,y,_;return arguments.length?([b,y,_]=m,l=pm(g,[b,y,_]),p):[l(0),l(.5),l(1)]}}return p.range=d(Ze),p.rangeRound=d(Ka),p.unknown=function(g){return arguments.length?(h=g,p):h},function(g){return c=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function px(){var t=$n(yu()(te));return t.copy=function(){return wn(t,px())},on.apply(t,arguments)}function dx(){var t=fh(yu()).domain([.1,1,10]);return t.copy=function(){return wn(t,dx()).base(t.base())},on.apply(t,arguments)}function gx(){var t=hh(yu());return t.copy=function(){return wn(t,gx()).constant(t.constant())},on.apply(t,arguments)}function Ah(){var t=ph(yu());return t.copy=function(){return wn(t,Ah()).exponent(t.exponent())},on.apply(t,arguments)}function ak(){return Ah.apply(null,arguments).exponent(.5)}function ct(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const sk=ct("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),uk=ct("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),lk=ct("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),ck=ct("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),fk=ct("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),hk=ct("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),pk=ct("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),dk=ct("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),gk=ct("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),mk=ct("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),yk=ct("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),xt=t=>Q0(t[t.length-1]);var mx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ct);const bk=xt(mx);var yx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ct);const xk=xt(yx);var bx=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ct);const vk=xt(bx);var xx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ct);const _k=xt(xx);var vx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ct);const $k=xt(vx);var _x=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ct);const wk=xt(_x);var $x=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ct);const Sk=xt($x);var wx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ct);const Ak=xt(wx);var Sx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ct);const Tk=xt(Sx);var Ax=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ct);const Pk=xt(Ax);var Tx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ct);const Mk=xt(Tx);var Px=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ct);const Dk=xt(Px);var Mx=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ct);const Ck=xt(Mx);var Dx=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ct);const Lk=xt(Dx);var Cx=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ct);const kk=xt(Cx);var Lx=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ct);const Rk=xt(Lx);var kx=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ct);const Ek=xt(kx);var Rx=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ct);const Ik=xt(Rx);var Ex=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ct);const Nk=xt(Ex);var Ix=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ct);const Bk=xt(Ix);var Nx=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ct);const Fk=xt(Nx);var Bx=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ct);const Ok=xt(Bx);var Fx=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ct);const zk=xt(Fx);var Ox=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ct);const Gk=xt(Ox);var zx=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ct);const Yk=xt(zx);var Gx=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ct);const Uk=xt(Gx);var Yx=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ct);const Wk=xt(Yx);function Hk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const Xk=Ja(Me(300,.5,0),Me(-240,.5,1));var jk=Ja(Me(-100,.75,.35),Me(80,1.5,.8)),Vk=Ja(Me(260,.75,.35),Me(80,1.5,.8)),bu=Me();function qk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return bu.h=360*t-100,bu.s=1.5-1.5*e,bu.l=.8-.9*e,bu+""}var xu=Yr(),Zk=Math.PI/3,Kk=Math.PI*2/3;function Qk(t){var e;return t=(.5-t)*Math.PI,xu.r=255*(e=Math.sin(t))*e,xu.g=255*(e=Math.sin(t+Zk))*e,xu.b=255*(e=Math.sin(t+Kk))*e,xu+""}function Jk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function vu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const tR=vu(ct("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var eR=vu(ct("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),nR=vu(ct("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),rR=vu(ct("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function lt(t){return function(){return t}}const Ux=Math.abs,Gt=Math.atan2,cn=Math.cos,iR=Math.max,gi=Math.min,ae=Math.sin,_t=Math.sqrt,Yt=1e-12,Sn=Math.PI,_u=Sn/2,An=2*Sn;function oR(t){return t>1?0:t<-1?Sn:Math.acos(t)}function Wx(t){return t>=1?_u:t<=-1?-_u:Math.asin(t)}function Oo(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new ro(e)}function aR(t){return t.innerRadius}function sR(t){return t.outerRadius}function uR(t){return t.startAngle}function lR(t){return t.endAngle}function cR(t){return t&&t.padAngle}function fR(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,f=s-o,h=f*u-c*l;if(!(h*h<Yt))return h=(c*(e-o)-f*(t-i))/h,[t+h*u,e+h*l]}function $u(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/_t(s*s+u*u),c=l*u,f=-l*s,h=t+c,p=e+f,d=n+c,g=r+f,m=(h+d)/2,b=(p+g)/2,y=d-h,_=g-p,x=y*y+_*_,w=i-o,$=h*g-d*p,R=(_<0?-1:1)*_t(iR(0,w*w*x-$*$)),A=($*_-y*R)/x,D=(-$*y-_*R)/x,I=($*_+y*R)/x,v=(-$*y+_*R)/x,L=A-m,T=D-b,S=I-m,M=v-b;return L*L+T*T>S*S+M*M&&(A=I,D=v),{cx:A,cy:D,x01:-c,y01:-f,x11:A*(i/w-1),y11:D*(i/w-1)}}function wu(){var t=aR,e=sR,n=lt(0),r=null,i=uR,o=lR,a=cR,s=null,u=Oo(l);function l(){var c,f,h=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-_u,g=o.apply(this,arguments)-_u,m=Ux(g-d),b=g>d;if(s||(s=c=u()),p<h&&(f=p,p=h,h=f),!(p>Yt))s.moveTo(0,0);else if(m>An-Yt)s.moveTo(p*cn(d),p*ae(d)),s.arc(0,0,p,d,g,!b),h>Yt&&(s.moveTo(h*cn(g),h*ae(g)),s.arc(0,0,h,g,d,b));else{var y=d,_=g,x=d,w=g,$=m,R=m,A=a.apply(this,arguments)/2,D=A>Yt&&(r?+r.apply(this,arguments):_t(h*h+p*p)),I=gi(Ux(p-h)/2,+n.apply(this,arguments)),v=I,L=I,T,S;if(D>Yt){var M=Wx(D/h*ae(A)),P=Wx(D/p*ae(A));($-=M*2)>Yt?(M*=b?1:-1,x+=M,w-=M):($=0,x=w=(d+g)/2),(R-=P*2)>Yt?(P*=b?1:-1,y+=P,_-=P):(R=0,y=_=(d+g)/2)}var G=p*cn(y),O=p*ae(y),k=h*cn(w),E=h*ae(w);if(I>Yt){var C=p*cn(_),F=p*ae(_),H=h*cn(x),J=h*ae(x),z;if(m<Sn)if(z=fR(G,O,H,J,C,F,k,E)){var V=G-z[0],Y=O-z[1],K=C-z[0],j=F-z[1],nt=1/ae(oR((V*K+Y*j)/(_t(V*V+Y*Y)*_t(K*K+j*j)))/2),st=_t(z[0]*z[0]+z[1]*z[1]);v=gi(I,(h-st)/(nt-1)),L=gi(I,(p-st)/(nt+1))}else v=L=0}R>Yt?L>Yt?(T=$u(H,J,G,O,p,L,b),S=$u(C,F,k,E,p,L,b),s.moveTo(T.cx+T.x01,T.cy+T.y01),L<I?s.arc(T.cx,T.cy,L,Gt(T.y01,T.x01),Gt(S.y01,S.x01),!b):(s.arc(T.cx,T.cy,L,Gt(T.y01,T.x01),Gt(T.y11,T.x11),!b),s.arc(0,0,p,Gt(T.cy+T.y11,T.cx+T.x11),Gt(S.cy+S.y11,S.cx+S.x11),!b),s.arc(S.cx,S.cy,L,Gt(S.y11,S.x11),Gt(S.y01,S.x01),!b))):(s.moveTo(G,O),s.arc(0,0,p,y,_,!b)):s.moveTo(G,O),!(h>Yt)||!($>Yt)?s.lineTo(k,E):v>Yt?(T=$u(k,E,C,F,h,-v,b),S=$u(G,O,H,J,h,-v,b),s.lineTo(T.cx+T.x01,T.cy+T.y01),v<I?s.arc(T.cx,T.cy,v,Gt(T.y01,T.x01),Gt(S.y01,S.x01),!b):(s.arc(T.cx,T.cy,v,Gt(T.y01,T.x01),Gt(T.y11,T.x11),!b),s.arc(0,0,h,Gt(T.cy+T.y11,T.cx+T.x11),Gt(S.cy+S.y11,S.cx+S.x11),b),s.arc(S.cx,S.cy,v,Gt(S.y11,S.x11),Gt(S.y01,S.x01),!b))):s.arc(0,0,h,w,x,b)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Sn/2;return[cn(f)*c,ae(f)*c]},l.innerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:lt(+c),l):t},l.outerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:lt(+c),l):e},l.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:lt(+c),l):n},l.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:lt(+c),l):r},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:lt(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:lt(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:lt(+c),l):a},l.context=function(c){return arguments.length?(s=c??null,l):s},l}var hR=Array.prototype.slice;function Su(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Hx(t){this._context=t}Hx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Au(t){return new Hx(t)}function Th(t){return t[0]}function Ph(t){return t[1]}function Tu(t,e){var n=lt(!0),r=null,i=Au,o=null,a=Oo(s);t=typeof t=="function"?t:t===void 0?Th:lt(t),e=typeof e=="function"?e:e===void 0?Ph:lt(e);function s(u){var l,c=(u=Su(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l<c&&n(f=u[l],l,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(f,l,u),+e(f,l,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:lt(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:lt(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:lt(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function Mh(t,e,n){var r=null,i=lt(!0),o=null,a=Au,s=null,u=Oo(l);t=typeof t=="function"?t:t===void 0?Th:lt(+t),e=typeof e=="function"?e:lt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Ph:lt(+n);function l(f){var h,p,d,g=(f=Su(f)).length,m,b=!1,y,_=new Array(g),x=new Array(g);for(o==null&&(s=a(y=u())),h=0;h<=g;++h){if(!(h<g&&i(m=f[h],h,f))===b)if(b=!b)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=h-1;d>=p;--d)s.point(_[d],x[d]);s.lineEnd(),s.areaEnd()}b&&(_[h]=+t(m,h,f),x[h]=+e(m,h,f),s.point(r?+r(m,h,f):_[h],n?+n(m,h,f):x[h]))}if(y)return s=null,y+""||null}function c(){return Tu().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:lt(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:lt(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:lt(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:lt(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:lt(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:lt(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(n)},l.lineX1=function(){return c().x(r).y(e)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:lt(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}function pR(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function dR(t){return t}function Xx(){var t=dR,e=pR,n=null,r=lt(0),i=lt(An),o=lt(0);function a(s){var u,l=(s=Su(s)).length,c,f,h=0,p=new Array(l),d=new Array(l),g=+r.apply(this,arguments),m=Math.min(An,Math.max(-An,i.apply(this,arguments)-g)),b,y=Math.min(Math.abs(m)/l,o.apply(this,arguments)),_=y*(m<0?-1:1),x;for(u=0;u<l;++u)(x=d[p[u]=u]=+t(s[u],u,s))>0&&(h+=x);for(e!=null?p.sort(function(w,$){return e(d[w],d[$])}):n!=null&&p.sort(function(w,$){return n(s[w],s[$])}),u=0,f=h?(m-l*_)/h:0;u<l;++u,g=b)c=p[u],x=d[c],b=g+(x>0?x*f:0)+_,d[c]={data:s[c],index:u,value:x,startAngle:g,endAngle:b,padAngle:y};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:lt(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:lt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:lt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:lt(+s),a):o},a}var jx=Dh(Au);function Vx(t){this._curve=t}Vx.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function Dh(t){function e(n){return new Vx(t(n))}return e._curve=t,e}function zo(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(Dh(n)):e()._curve},t}function qx(){return zo(Tu().curve(jx))}function Zx(){var t=Mh().curve(jx),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return zo(n())},delete t.lineX0,t.lineEndAngle=function(){return zo(r())},delete t.lineX1,t.lineInnerRadius=function(){return zo(i())},delete t.lineY0,t.lineOuterRadius=function(){return zo(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(Dh(a)):e()._curve},t}function Go(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Kx{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class gR{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=Go(this._x0,this._y0),i=Go(this._x0,this._y0=(this._y0+n)/2),o=Go(e,this._y0),a=Go(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Qx(t){return new Kx(t,!0)}function Jx(t){return new Kx(t,!1)}function mR(t){return new gR(t)}function yR(t){return t.source}function bR(t){return t.target}function Pu(t){let e=yR,n=bR,r=Th,i=Ph,o=null,a=null,s=Oo(u);function u(){let l;const c=hR.call(arguments),f=e.apply(this,c),h=n.apply(this,c);if(o==null&&(a=t(l=s())),a.lineStart(),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=h,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),l)return a=null,l+""||null}return u.source=function(l){return arguments.length?(e=l,u):e},u.target=function(l){return arguments.length?(n=l,u):n},u.x=function(l){return arguments.length?(r=typeof l=="function"?l:lt(+l),u):r},u.y=function(l){return arguments.length?(i=typeof l=="function"?l:lt(+l),u):i},u.context=function(l){return arguments.length?(l==null?o=a=null:a=t(o=l),u):o},u}function xR(){return Pu(Qx)}function vR(){return Pu(Jx)}function _R(){const t=Pu(mR);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const $R=_t(3),tv={draw(t,e){const n=_t(e+gi(e/28,.75))*.59436,r=n/2,i=r*$R;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},Mu={draw(t,e){const n=_t(e/Sn);t.moveTo(n,0),t.arc(0,0,n,0,An)}},ev={draw(t,e){const n=_t(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},nv=_t(1/3),wR=nv*2,rv={draw(t,e){const n=_t(e/wR),r=n*nv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},iv={draw(t,e){const n=_t(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},ov={draw(t,e){const n=_t(e-gi(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},av={draw(t,e){const n=_t(e),r=-n/2;t.rect(r,r,n,n)}},sv={draw(t,e){const n=_t(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},SR=.8908130915292852,uv=ae(Sn/10)/ae(7*Sn/10),AR=ae(An/10)*uv,TR=-cn(An/10)*uv,lv={draw(t,e){const n=_t(e*SR),r=AR*n,i=TR*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=An*o/5,s=cn(a),u=ae(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},Ch=_t(3),cv={draw(t,e){const n=-_t(e/(Ch*3));t.moveTo(0,n*2),t.lineTo(-Ch*n,-n),t.lineTo(Ch*n,-n),t.closePath()}},PR=_t(3),fv={draw(t,e){const n=_t(e)*.6824,r=n/2,i=n*PR/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ve=-.5,_e=_t(3)/2,Lh=1/_t(12),MR=(Lh/2+1)*3,hv={draw(t,e){const n=_t(e/MR),r=n/2,i=n*Lh,o=r,a=n*Lh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ve*r-_e*i,_e*r+ve*i),t.lineTo(ve*o-_e*a,_e*o+ve*a),t.lineTo(ve*s-_e*u,_e*s+ve*u),t.lineTo(ve*r+_e*i,ve*i-_e*r),t.lineTo(ve*o+_e*a,ve*a-_e*o),t.lineTo(ve*s+_e*u,ve*u-_e*s),t.closePath()}},kh={draw(t,e){const n=_t(e-gi(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},pv=[Mu,ev,rv,av,lv,cv,hv],DR=[Mu,ov,kh,fv,tv,sv,iv];function CR(t,e){let n=null,r=Oo(i);t=typeof t=="function"?t:lt(t||Mu),e=typeof e=="function"?e:lt(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:lt(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Tn(){}function Du(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Cu(t){this._context=t}Cu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Du(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Du(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function LR(t){return new Cu(t)}function dv(t){this._context=t}dv.prototype={areaStart:Tn,areaEnd:Tn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Du(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function kR(t){return new dv(t)}function gv(t){this._context=t}gv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Du(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function RR(t){return new gv(t)}function mv(t,e){this._basis=new Cu(t),this._beta=e}mv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const ER=function t(e){function n(r){return e===1?new Cu(r):new mv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function Lu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Rh(t,e){this._context=t,this._k=(1-e)/6}Rh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Lu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Lu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const IR=function t(e){function n(r){return new Rh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Eh(t,e){this._context=t,this._k=(1-e)/6}Eh.prototype={areaStart:Tn,areaEnd:Tn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Lu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const NR=function t(e){function n(r){return new Eh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Ih(t,e){this._context=t,this._k=(1-e)/6}Ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Lu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const BR=function t(e){function n(r){return new Ih(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Nh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Yt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Yt){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function yv(t,e){this._context=t,this._alpha=e}yv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Nh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const FR=function t(e){function n(r){return e?new yv(r,e):new Rh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function bv(t,e){this._context=t,this._alpha=e}bv.prototype={areaStart:Tn,areaEnd:Tn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Nh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const OR=function t(e){function n(r){return e?new bv(r,e):new Eh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function xv(t,e){this._context=t,this._alpha=e}xv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Nh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zR=function t(e){function n(r){return e?new xv(r,e):new Ih(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function vv(t){this._context=t}vv.prototype={areaStart:Tn,areaEnd:Tn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function GR(t){return new vv(t)}function _v(t){return t<0?-1:1}function $v(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(_v(o)+_v(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function wv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Bh(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function ku(t){this._context=t}ku.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Bh(this,this._t0,wv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Bh(this,wv(this,n=$v(this,t,e)),n);break;default:Bh(this,this._t0,n=$v(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Sv(t){this._context=new Av(t)}(Sv.prototype=Object.create(ku.prototype)).point=function(t,e){ku.prototype.point.call(this,e,t)};function Av(t){this._context=t}Av.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function YR(t){return new ku(t)}function UR(t){return new Sv(t)}function Tv(t){this._context=t}Tv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Pv(t),i=Pv(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Pv(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function WR(t){return new Tv(t)}function Ru(t,e){this._context=t,this._t=e}Ru.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function HR(t){return new Ru(t,.5)}function XR(t){return new Ru(t,0)}function jR(t){return new Ru(t,1)}function mi(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function yi(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function VR(t,e){return t[e]}function qR(t){const e=[];return e.key=t,e}function ZR(){var t=lt([]),e=yi,n=mi,r=VR;function i(o){var a=Array.from(t.apply(this,arguments),qR),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s<u;++s)(a[s][l]=[0,+r(f,a[s].key,l,o)]).data=f;for(s=0,c=Su(e(a));s<u;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:lt(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:lt(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?yi:typeof o=="function"?o:lt(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??mi,i):n},i}function KR(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}mi(t,e)}}function QR(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,l=t[e[0]].length;r<l;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function JR(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}mi(t,e)}}function tE(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,l=0;s<a;++s){for(var c=t[e[s]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<s;++d){var g=t[e[d]],m=g[r][1]||0,b=g[r-1][1]||0;p+=m-b}u+=f,l+=p*f}i[r-1][1]+=i[r-1][0]=n,u&&(n-=l/u)}i[r-1][1]+=i[r-1][0]=n,mi(t,e)}}function Mv(t){var e=t.map(eE);return yi(t).sort(function(n,r){return e[n]-e[r]})}function eE(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function Dv(t){var e=t.map(Cv);return yi(t).sort(function(n,r){return e[n]-e[r]})}function Cv(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function nE(t){return Dv(t).reverse()}function rE(t){var e=t.length,n,r,i=t.map(Cv),o=Mv(t),a=0,s=0,u=[],l=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],l.push(r));return l.reverse().concat(u)}function iE(t){return yi(t).reverse()}const Eu=t=>()=>t;function oE(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function je(t,e,n){this.k=t,this.x=e,this.y=n}je.prototype={constructor:je,scale:function(t){return t===1?this:new je(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new je(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Iu=new je(1,0,0);Lv.prototype=je.prototype;function Lv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Iu;return t.__zoom}function Fh(t){t.stopImmediatePropagation()}function Yo(t){t.preventDefault(),t.stopImmediatePropagation()}function aE(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function sE(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function kv(){return this.__zoom||Iu}function uE(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function lE(){return navigator.maxTouchPoints||"ontouchstart"in this}function cE(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Oh(){var t=aE,e=sE,n=cE,r=uE,i=lE,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=lm,l=Wn("start","zoom","end"),c,f,h,p=500,d=150,g=0,m=10;function b(S){S.property("__zoom",kv).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",I).filter(i).on("touchstart.zoom",v).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(S,M,P,G){var O=S.selection?S.selection():S;O.property("__zoom",kv),S!==O?w(S,M,P,G):O.interrupt().each(function(){$(this,arguments).event(G).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},b.scaleBy=function(S,M,P,G){b.scaleTo(S,function(){var O=this.__zoom.k,k=typeof M=="function"?M.apply(this,arguments):M;return O*k},P,G)},b.scaleTo=function(S,M,P,G){b.transform(S,function(){var O=e.apply(this,arguments),k=this.__zoom,E=P==null?x(O):typeof P=="function"?P.apply(this,arguments):P,C=k.invert(E),F=typeof M=="function"?M.apply(this,arguments):M;return n(_(y(k,F),E,C),O,a)},P,G)},b.translateBy=function(S,M,P,G){b.transform(S,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),a)},null,G)},b.translateTo=function(S,M,P,G,O){b.transform(S,function(){var k=e.apply(this,arguments),E=this.__zoom,C=G==null?x(k):typeof G=="function"?G.apply(this,arguments):G;return n(Iu.translate(C[0],C[1]).scale(E.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof P=="function"?-P.apply(this,arguments):-P),k,a)},G,O)};function y(S,M){return M=Math.max(o[0],Math.min(o[1],M)),M===S.k?S:new je(M,S.x,S.y)}function _(S,M,P){var G=M[0]-P[0]*S.k,O=M[1]-P[1]*S.k;return G===S.x&&O===S.y?S:new je(S.k,G,O)}function x(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function w(S,M,P,G){S.on("start.zoom",function(){$(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(G).end()}).tween("zoom",function(){var O=this,k=arguments,E=$(O,k).event(G),C=e.apply(O,k),F=P==null?x(C):typeof P=="function"?P.apply(O,k):P,H=Math.max(C[1][0]-C[0][0],C[1][1]-C[0][1]),J=O.__zoom,z=typeof M=="function"?M.apply(O,k):M,V=u(J.invert(F).concat(H/J.k),z.invert(F).concat(H/z.k));return function(Y){if(Y===1)Y=z;else{var K=V(Y),j=H/K[2];Y=new je(j,F[0]-K[0]*j,F[1]-K[1]*j)}E.zoom(null,Y)}})}function $(S,M,P){return!P&&S.__zooming||new R(S,M)}function R(S,M){this.that=S,this.args=M,this.active=0,this.sourceEvent=null,this.extent=e.apply(S,M),this.taps=0}R.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,M){return this.mouse&&S!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var M=q(this.that).datum();l.call(S,this.that,new oE(S,{sourceEvent:this.sourceEvent,target:b,type:S,transform:this.that.__zoom,dispatch:l}),M)}};function A(S,...M){if(!t.apply(this,arguments))return;var P=$(this,M).event(S),G=this.__zoom,O=Math.max(o[0],Math.min(o[1],G.k*Math.pow(2,r.apply(this,arguments)))),k=ce(S);if(P.wheel)(P.mouse[0][0]!==k[0]||P.mouse[0][1]!==k[1])&&(P.mouse[1]=G.invert(P.mouse[0]=k)),clearTimeout(P.wheel);else{if(G.k===O)return;P.mouse=[k,G.invert(k)],Qn(this),P.start()}Yo(S),P.wheel=setTimeout(E,d),P.zoom("mouse",n(_(y(G,O),P.mouse[0],P.mouse[1]),P.extent,a));function E(){P.wheel=null,P.end()}}function D(S,...M){if(h||!t.apply(this,arguments))return;var P=S.currentTarget,G=$(this,M,!0).event(S),O=q(S.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",H,!0),k=ce(S,P),E=S.clientX,C=S.clientY;Fa(S.view),Fh(S),G.mouse=[k,this.__zoom.invert(k)],Qn(this),G.start();function F(J){if(Yo(J),!G.moved){var z=J.clientX-E,V=J.clientY-C;G.moved=z*z+V*V>g}G.event(J).zoom("mouse",n(_(G.that.__zoom,G.mouse[0]=ce(J,P),G.mouse[1]),G.extent,a))}function H(J){O.on("mousemove.zoom mouseup.zoom",null),Oa(J.view,G.moved),Yo(J),G.event(J).end()}}function I(S,...M){if(t.apply(this,arguments)){var P=this.__zoom,G=ce(S.changedTouches?S.changedTouches[0]:S,this),O=P.invert(G),k=P.k*(S.shiftKey?.5:2),E=n(_(y(P,k),G,O),e.apply(this,M),a);Yo(S),s>0?q(this).transition().duration(s).call(w,E,G,S):q(this).call(b.transform,E,G,S)}}function v(S,...M){if(t.apply(this,arguments)){var P=S.touches,G=P.length,O=$(this,M,S.changedTouches.length===G).event(S),k,E,C,F;for(Fh(S),E=0;E<G;++E)C=P[E],F=ce(C,this),F=[F,this.__zoom.invert(F),C.identifier],O.touch0?!O.touch1&&O.touch0[2]!==F[2]&&(O.touch1=F,O.taps=0):(O.touch0=F,k=!0,O.taps=1+!!c);c&&(c=clearTimeout(c)),k&&(O.taps<2&&(f=F[0],c=setTimeout(function(){c=null},p)),Qn(this),O.start())}}function L(S,...M){if(this.__zooming){var P=$(this,M).event(S),G=S.changedTouches,O=G.length,k,E,C,F;for(Yo(S),k=0;k<O;++k)E=G[k],C=ce(E,this),P.touch0&&P.touch0[2]===E.identifier?P.touch0[0]=C:P.touch1&&P.touch1[2]===E.identifier&&(P.touch1[0]=C);if(E=P.that.__zoom,P.touch1){var H=P.touch0[0],J=P.touch0[1],z=P.touch1[0],V=P.touch1[1],Y=(Y=z[0]-H[0])*Y+(Y=z[1]-H[1])*Y,K=(K=V[0]-J[0])*K+(K=V[1]-J[1])*K;E=y(E,Math.sqrt(Y/K)),C=[(H[0]+z[0])/2,(H[1]+z[1])/2],F=[(J[0]+V[0])/2,(J[1]+V[1])/2]}else if(P.touch0)C=P.touch0[0],F=P.touch0[1];else return;P.zoom("touch",n(_(E,C,F),P.extent,a))}}function T(S,...M){if(this.__zooming){var P=$(this,M).event(S),G=S.changedTouches,O=G.length,k,E;for(Fh(S),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),k=0;k<O;++k)E=G[k],P.touch0&&P.touch0[2]===E.identifier?delete P.touch0:P.touch1&&P.touch1[2]===E.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(E=ce(E,this),Math.hypot(f[0]-E[0],f[1]-E[1])<m)){var C=q(this).on("dblclick.zoom");C&&C.apply(this,arguments)}}}return b.wheelDelta=function(S){return arguments.length?(r=typeof S=="function"?S:Eu(+S),b):r},b.filter=function(S){return arguments.length?(t=typeof S=="function"?S:Eu(!!S),b):t},b.touchable=function(S){return arguments.length?(i=typeof S=="function"?S:Eu(!!S),b):i},b.extent=function(S){return arguments.length?(e=typeof S=="function"?S:Eu([[+S[0][0],+S[0][1]],[+S[1][0],+S[1][1]]]),b):e},b.scaleExtent=function(S){return arguments.length?(o[0]=+S[0],o[1]=+S[1],b):[o[0],o[1]]},b.translateExtent=function(S){return arguments.length?(a[0][0]=+S[0][0],a[1][0]=+S[1][0],a[0][1]=+S[0][1],a[1][1]=+S[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(S){return arguments.length?(n=S,b):n},b.duration=function(S){return arguments.length?(s=+S,b):s},b.interpolate=function(S){return arguments.length?(u=S,b):u},b.on=function(){var S=l.on.apply(l,arguments);return S===l?b:S},b.clickDistance=function(S){return arguments.length?(g=(S=+S)*S,b):Math.sqrt(g)},b.tapDistance=function(S){return arguments.length?(m=+S,b):m},b}const zh=Object.freeze(Object.defineProperty({__proto__:null,Adder:Ct,Delaunay:qc,FormatSpecifier:bs,InternMap:Ni,InternSet:Gn,Node:ur,Path:ro,Voronoi:Km,ZoomTransform:je,active:dM,arc:wu,area:Mh,areaRadial:Zx,ascending:$t,autoType:F4,axisBottom:c0,axisLeft:f0,axisRight:a5,axisTop:o5,bin:Jg,bisect:zn,bisectCenter:n3,bisectLeft:e3,bisectRight:Fg,bisector:Sa,blob:G4,blur:r3,blur2:Og,blurImage:i3,brush:PM,brushSelection:SM,brushX:AM,brushY:TM,buffer:U4,chord:DM,chordDirected:LM,chordTranspose:CM,cluster:e7,color:yn,contourDensity:r4,contours:Wc,count:Ta,create:GP,creator:Ia,cross:f3,csv:X4,csvFormat:P4,csvFormatBody:M4,csvFormatRow:C4,csvFormatRows:D4,csvFormatValue:L4,csvParse:e1,csvParseRows:T4,cubehelix:Me,cumsum:h3,curveBasis:LR,curveBasisClosed:kR,curveBasisOpen:RR,curveBumpX:Qx,curveBumpY:Jx,curveBundle:ER,curveCardinal:IR,curveCardinalClosed:NR,curveCardinalOpen:BR,curveCatmullRom:FR,curveCatmullRomClosed:OR,curveCatmullRomOpen:zR,curveLinear:Au,curveLinearClosed:GR,curveMonotoneX:YR,curveMonotoneY:UR,curveNatural:WR,curveStep:HR,curveStepAfter:jR,curveStepBefore:XR,descending:Ng,deviation:Yg,difference:j3,disjoint:V3,dispatch:Wn,drag:w0,dragDisable:Fa,dragEnable:Oa,dsv:H4,dsvFormat:ds,easeBack:Lm,easeBackIn:aM,easeBackInOut:Lm,easeBackOut:sM,easeBounce:to,easeBounceIn:iM,easeBounceInOut:oM,easeBounceOut:to,easeCircle:Cm,easeCircleIn:V8,easeCircleInOut:Cm,easeCircleOut:q8,easeCubic:Ji,easeCubicIn:z8,easeCubicInOut:Ji,easeCubicOut:G8,easeElastic:eo,easeElasticIn:uM,easeElasticInOut:lM,easeElasticOut:eo,easeExp:Dm,easeExpIn:X8,easeExpInOut:Dm,easeExpOut:j8,easeLinear:B8,easePoly:Am,easePolyIn:Y8,easePolyInOut:Am,easePolyOut:U8,easeQuad:Sm,easeQuadIn:F8,easeQuadInOut:Sm,easeQuadOut:O8,easeSin:Mm,easeSinIn:W8,easeSinInOut:Mm,easeSinOut:H8,every:G3,extent:Ii,fcumsum:d3,filter:U3,flatGroup:g3,flatRollup:m3,forceCenter:tD,forceCollide:a1,forceLink:vD,forceManyBody:c1,forceRadial:MD,forceSimulation:l1,forceX:f1,forceY:h1,get format(){return so},formatDefaultLocale:v1,formatLocale:x1,get formatPrefix(){return ef},formatSpecifier:ti,fsum:p3,geoAlbers:Ey,geoAlbersUsa:RC,geoArea:FD,geoAzimuthalEqualArea:EC,geoAzimuthalEqualAreaRaw:Gf,geoAzimuthalEquidistant:IC,geoAzimuthalEquidistantRaw:Yf,geoBounds:YD,geoCentroid:VD,geoCircle:qD,geoClipAntimeridian:vf,geoClipCircle:ny,geoClipExtent:nC,geoClipRectangle:zs,geoConicConformal:BC,geoConicConformalRaw:By,geoConicEqualArea:Qs,geoConicEqualAreaRaw:Ry,geoConicEquidistant:OC,geoConicEquidistantRaw:Fy,geoContains:lC,geoDistance:Us,geoEqualEarth:GC,geoEqualEarthRaw:Uf,geoEquirectangular:FC,geoEquirectangularRaw:So,geoGnomonic:YC,geoGnomonicRaw:Wf,geoGraticule:hy,geoGraticule10:cC,geoIdentity:UC,geoInterpolate:fC,geoLength:ry,geoMercator:NC,geoMercatorRaw:wo,geoNaturalEarth1:WC,geoNaturalEarth1Raw:Hf,geoOrthographic:HC,geoOrthographicRaw:Xf,geoPath:wC,geoProjection:We,geoProjectionMutator:Of,geoRotation:V1,geoStereographic:XC,geoStereographicRaw:jf,geoStream:Ce,geoTransform:SC,geoTransverseMercator:jC,geoTransverseMercatorRaw:Vf,gray:s6,greatest:t0,greatestIndex:N3,group:Xg,groupSort:x3,groups:jg,hcl:ja,hierarchy:eu,histogram:Jg,hsl:Ua,html:Q4,image:V4,index:y3,indexes:b3,interpolate:Ze,interpolateArray:p6,interpolateBasis:V0,interpolateBasisClosed:q0,interpolateBlues:Ok,interpolateBrBG:bk,interpolateBuGn:Pk,interpolateBuPu:Mk,interpolateCividis:Hk,interpolateCool:Vk,interpolateCubehelix:M6,interpolateCubehelixDefault:Xk,interpolateCubehelixLong:Ja,interpolateDate:em,interpolateDiscrete:m6,interpolateGnBu:Dk,interpolateGreens:zk,interpolateGreys:Gk,interpolateHcl:T6,interpolateHclLong:P6,interpolateHsl:w6,interpolateHslLong:S6,interpolateHue:y6,interpolateInferno:nR,interpolateLab:A6,interpolateMagma:eR,interpolateNumber:ge,interpolateNumberArray:gc,interpolateObject:nm,interpolateOrRd:Ck,interpolateOranges:Wk,interpolatePRGn:xk,interpolatePiYG:vk,interpolatePlasma:rR,interpolatePuBu:kk,interpolatePuBuGn:Lk,interpolatePuOr:_k,interpolatePuRd:Rk,interpolatePurples:Yk,interpolateRainbow:qk,interpolateRdBu:$k,interpolateRdGy:wk,interpolateRdPu:Ek,interpolateRdYlBu:Sk,interpolateRdYlGn:Ak,interpolateReds:Uk,interpolateRgb:Xi,interpolateRgbBasis:Q0,interpolateRgbBasisClosed:h6,interpolateRound:Ka,interpolateSinebow:Qk,interpolateSpectral:Tk,interpolateString:bc,interpolateTransformCss:am,interpolateTransformSvg:sm,interpolateTurbo:Jk,interpolateViridis:tR,interpolateWarm:jk,interpolateYlGn:Nk,interpolateYlGnBu:Ik,interpolateYlOrBr:Bk,interpolateYlOrRd:Fk,interpolateZoom:lm,interrupt:Qn,intersection:q3,interval:R6,isoFormat:K9,isoParse:tk,json:Z4,lab:Xa,lch:u6,least:I3,leastIndex:r0,line:Tu,lineRadial:qx,link:Pu,linkHorizontal:xR,linkRadial:_R,linkVertical:vR,local:_0,map:W3,matcher:tc,max:Bi,maxIndex:jl,mean:P3,median:M3,medianIndex:D3,merge:ql,min:Da,minIndex:Vl,mode:L3,namespace:Gi,namespaces:Ql,nice:Hl,now:Ki,pack:L7,packEnclose:A7,packSiblings:D7,pairs:k3,partition:k7,path:Uc,pathRound:EM,permute:Qg,pie:Xx,piecewise:pm,pointRadial:Go,pointer:ce,pointers:UP,polygonArea:j7,polygonCentroid:V7,polygonContains:Q7,polygonHull:K7,polygonLength:J7,precisionFixed:_1,precisionPrefix:$1,precisionRound:w1,quadtree:ms,quantile:Oi,quantileIndex:n0,quantileSorted:e0,quantize:D6,quickselect:Ca,radialArea:Zx,radialLine:qx,randomBates:rL,randomBernoulli:aL,randomBeta:ab,randomBinomial:sb,randomCauchy:uL,randomExponential:iL,randomGamma:ih,randomGeometric:ob,randomInt:eL,randomIrwinHall:ib,randomLcg:pL,randomLogNormal:nL,randomLogistic:lL,randomNormal:rh,randomPareto:oL,randomPoisson:cL,randomUniform:tL,randomWeibull:sL,range:gn,rank:E3,reduce:H3,reverse:X3,rgb:Yr,ribbon:YM,ribbonArrow:UM,rollup:qg,rollups:Zg,scaleBand:sh,scaleDiverging:px,scaleDivergingLog:dx,scaleDivergingPow:Ah,scaleDivergingSqrt:ak,scaleDivergingSymlog:gx,scaleIdentity:hb,scaleImplicit:oh,scaleLinear:ko,scaleLog:yb,scaleOrdinal:ah,scalePoint:uh,scalePow:li,scaleQuantile:Sb,scaleQuantize:Ab,scaleRadial:wb,scaleSequential:lx,scaleSequentialLog:cx,scaleSequentialPow:Sh,scaleSequentialQuantile:hx,scaleSequentialSqrt:ok,scaleSequentialSymlog:fx,scaleSqrt:AL,scaleSymlog:vb,scaleThreshold:Tb,scaleTime:rk,scaleUtc:ik,scan:B3,schemeAccent:uk,schemeBlues:Bx,schemeBrBG:mx,schemeBuGn:Ax,schemeBuPu:Tx,schemeCategory10:sk,schemeDark2:lk,schemeGnBu:Px,schemeGreens:Fx,schemeGreys:Ox,schemeObservable10:ck,schemeOrRd:Mx,schemeOranges:Yx,schemePRGn:yx,schemePaired:fk,schemePastel1:hk,schemePastel2:pk,schemePiYG:bx,schemePuBu:Cx,schemePuBuGn:Dx,schemePuOr:xx,schemePuRd:Lx,schemePurples:zx,schemeRdBu:vx,schemeRdGy:_x,schemeRdPu:kx,schemeRdYlBu:$x,schemeRdYlGn:wx,schemeReds:Gx,schemeSet1:dk,schemeSet2:gk,schemeSet3:mk,schemeSpectral:Sx,schemeTableau10:yk,schemeYlGn:Ex,schemeYlGnBu:Rx,schemeYlOrBr:Ix,schemeYlOrRd:Nx,select:q,selectAll:WP,selection:Xn,selector:Na,selectorAll:Jl,shuffle:F3,shuffler:i0,some:Y3,sort:Yl,stack:ZR,stackOffsetDiverging:QR,stackOffsetExpand:KR,stackOffsetNone:mi,stackOffsetSilhouette:JR,stackOffsetWiggle:tE,stackOrderAppearance:Mv,stackOrderAscending:Dv,stackOrderDescending:nE,stackOrderInsideOut:rE,stackOrderNone:yi,stackOrderReverse:iE,stratify:N7,style:Hn,subset:K3,sum:o0,superset:s0,svg:J4,symbol:CR,symbolAsterisk:tv,symbolCircle:Mu,symbolCross:ev,symbolDiamond:rv,symbolDiamond2:iv,symbolPlus:ov,symbolSquare:av,symbolSquare2:sv,symbolStar:lv,symbolTimes:kh,symbolTriangle:cv,symbolTriangle2:fv,symbolWye:hv,symbolX:kh,symbols:pv,symbolsFill:pv,symbolsStroke:DR,text:gs,thresholdFreedmanDiaconis:A3,thresholdScott:T3,thresholdSturges:Xl,tickFormat:fb,tickIncrement:Un,tickStep:Ma,ticks:Yn,timeDay:fi,timeDays:LL,get timeFormat(){return _h},timeFormatDefaultLocale:sx,timeFormatLocale:Hb,timeFriday:kb,timeFridays:FL,timeHour:fu,timeHours:DL,timeInterval:Mt,timeMillisecond:ci,timeMilliseconds:Pb,timeMinute:lu,timeMinutes:PL,timeMonday:Eo,timeMondays:EL,timeMonth:pu,timeMonths:XL,get timeParse(){return ax},timeSaturday:Rb,timeSaturdays:OL,timeSecond:ln,timeSeconds:Db,timeSunday:hi,timeSundays:Eb,timeThursday:fr,timeThursdays:BL,timeTickInterval:Wb,timeTicks:Ub,timeTuesday:Cb,timeTuesdays:IL,timeWednesday:Lb,timeWednesdays:NL,timeWeek:hi,timeWeeks:Eb,timeYear:He,timeYears:VL,timeout:_c,timer:rs,timerFlush:mm,transition:$m,transpose:a0,tree:U7,treemap:nb,treemapBinary:W7,treemapDice:Co,treemapResquarify:X7,treemapSlice:au,treemapSliceDice:H7,treemapSquarify:nh,tsv:j4,tsvFormat:R4,tsvFormatBody:E4,tsvFormatRow:N4,tsvFormatRows:I4,tsvFormatValue:B4,tsvParse:n1,tsvParseRows:k4,union:Q3,unixDay:bh,unixDays:RL,utcDay:Ro,utcDays:kL,get utcFormat(){return gu},utcFriday:Bb,utcFridays:WL,utcHour:hu,utcHours:CL,utcMillisecond:ci,utcMilliseconds:Pb,utcMinute:cu,utcMinutes:ML,utcMonday:Io,utcMondays:zL,utcMonth:du,utcMonths:jL,get utcParse(){return $h},utcSaturday:Fb,utcSaturdays:HL,utcSecond:ln,utcSeconds:Db,utcSunday:pi,utcSundays:Ob,utcThursday:pr,utcThursdays:UL,utcTickInterval:Yb,utcTicks:Gb,utcTuesday:Ib,utcTuesdays:GL,utcWednesday:Nb,utcWednesdays:YL,utcWeek:pi,utcWeeks:Ob,utcYear:Xe,utcYears:qL,variance:Gg,window:ec,xml:K4,zip:z3,zoom:Oh,zoomIdentity:Iu,zoomTransform:Lv},Symbol.toStringTag,{value:"Module"}));function Rv(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function fE(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function Uo(t){return t.substring(0,4)!=="ease"?Ji:zh[t]??Ji}function Nu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=ko().domain([0,1]).range([0,t/2]),a=o(n);return wu().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Gh=(t,e)=>e instanceof Function?e(t):so(e)(t);function hE(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return V2(e)}function kt(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function Pn({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function ot(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function Mn(t,e){const r=Math.random().toString(36).substr(2,5);return ot(t,e,r)}function Yh(t,e){let n=new gt(()=>{});return t.each(function(){const r=al(this,e);n=sl(n,r)}),n}const dr=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=ot(e,"series"),u=ot(e,"axes"),l=ot(e,"graphic"),c=r.pipe(B((d,g)=>t.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((b,y,_)=>{q(_[y]).selectAll(`g.${u}`).data([y]).join(x=>x.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((w,$,R)=>{q(R[$]).selectAll("defs").data([$]).join("defs"),q(R[$]).selectAll("g").data([$]).join("g").classed(l,!0)}),x=>x,x=>x.remove())}),m=>m,m=>m.remove())),vt(1));U({seriesSelection:c,gridContainerPosition:i}).pipe(W(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(g,m)=>{const b=d.gridContainerPosition[m]??d.gridContainerPosition[0],y=b.translate,_=b.scale;return`translate(${y[0]}, ${y[1]}) scale(${_[0]}, ${_[1]})`})});const f=U({seriesSelection:c,gridAxesTransform:o}).pipe(W(async d=>d),B(d=>d.seriesSelection.select(`g.${u}`).style("transform",d.gridAxesTransform.value)),vt(1)),h=f.pipe(B(d=>d.select("defs")),vt(1)),p=U({axesSelection:f,gridGraphicTransform:a}).pipe(W(async d=>d),B(d=>{const g=d.axesSelection.select(`g.${l}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),vt(1));return{seriesSelection$:c,axesSelection$:f,defsSelection$:h,graphicGSelection$:p}},Ev=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r,gridContainerPosition$:i,layout$:o})=>{const a=new et,s=U({fullDataFormatter:t,gridAxesSize:e,computedData:n}).pipe(W(async h=>h),B(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.grid.groupAxis.scaleDomain[0]-h.fullDataFormatter.grid.groupAxis.scalePadding,g=h.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="max"?p+h.fullDataFormatter.grid.groupAxis.scalePadding:h.fullDataFormatter.grid.groupAxis.scaleDomain[1]+h.fullDataFormatter.grid.groupAxis.scalePadding;return[d,g]}),vt(1)),u=U({fullDataFormatter:t,computedData:n}).pipe(W(async h=>h),B(h=>h.fullDataFormatter.grid.seriesDirection==="row"?(h.computedData[0]??[]).map(p=>p.groupLabel):h.computedData.map(p=>p[0].groupLabel))),l=U({groupScaleDomain:s,groupLabels:u}).pipe(W(async h=>h),B(h=>h.groupLabels.filter((p,d)=>d>=h.groupScaleDomain[0]&&d<=h.groupScaleDomain[1]))),c=i.pipe(B(h=>h.reduce((d,g)=>g.columnIndex>d?g.columnIndex:d,0)+1),tt()),f=i.pipe(B(h=>h.reduce((d,g)=>g.rowIndex>d?g.rowIndex:d,0)+1),tt());return new gt(h=>{U({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:l,groupLabels:u,groupScaleDomain:s,columnAmount:c,rowAmount:f,layout:o}).pipe(N(a),W(async p=>p)).subscribe(p=>{const d=p.dataFormatter.grid.valueAxis.position==="right"||p.dataFormatter.grid.valueAxis.position==="bottom",g=kg({axisLabels:p.scaleRangeGroupLabels,axisWidth:p.axisSize.width,padding:p.dataFormatter.grid.groupAxis.scalePadding,reverse:d}),m=y=>p.dataFormatter.grid.groupAxis.position==="bottom"||p.dataFormatter.grid.groupAxis.position==="top"?y.offsetX-p.fullChartParams.padding.left:y.offsetY-p.fullChartParams.padding.top,b=y=>{const _={offsetX:y.offsetX*p.columnAmount%p.layout.rootWidth,offsetY:y.offsetY*p.rowAmount%p.layout.rootHeight},x=m(_),w=g(x),$=Math.ceil(p.groupScaleDomain[0]),R=w+$;return{groupIndex:R,groupLabel:p.groupLabels[R]??""}};return h.next(b),function(){a.next(void 0)}})})},pE=({rootSelection:t,fullDataFormatter$:e,gridAxesSize$:n,computedData$:r,fullChartParams$:i,gridContainerPosition$:o,layout$:a})=>{const s=Yh(t,"mousemove"),u=U({fullDataFormatter:e,gridAxesSize:n,computedData:r}).pipe(W(async y=>y),B(y=>{const _=y.computedData[0]?y.computedData[0].length-1:0,x=y.fullDataFormatter.grid.groupAxis.scaleDomain[0]-y.fullDataFormatter.grid.groupAxis.scalePadding,w=y.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="max"?_+y.fullDataFormatter.grid.groupAxis.scalePadding:y.fullDataFormatter.grid.groupAxis.scaleDomain[1]+y.fullDataFormatter.grid.groupAxis.scalePadding;return[x,w]}),vt(1)),l=U({fullDataFormatter:e,computedData:r}).pipe(W(async y=>y),B(y=>y.fullDataFormatter.grid.seriesDirection==="row"?(y.computedData[0]??[]).map(_=>_.groupLabel):y.computedData.map(_=>_[0].groupLabel))),c=U({groupScaleDomain:u,groupLabels:l}).pipe(W(async y=>y),B(y=>y.groupLabels.filter((_,x)=>x>=y.groupScaleDomain[0]&&x<=y.groupScaleDomain[1]))),f=e.pipe(B(y=>y.grid.valueAxis.position==="right"||y.grid.valueAxis.position==="bottom")),h=U({reverse:f,gridAxesSize:n,scaleRangeGroupLabels:c,fullDataFormatter:e}).pipe(W(async y=>y),B(y=>kg({axisLabels:y.scaleRangeGroupLabels,axisWidth:y.gridAxesSize.width,padding:y.fullDataFormatter.grid.groupAxis.scalePadding,reverse:y.reverse}))),p=o.pipe(B(y=>y.reduce((x,w)=>w.columnIndex>x?w.columnIndex:x,0)+1),tt()),d=o.pipe(B(y=>y.reduce((x,w)=>w.rowIndex>x?w.rowIndex:x,0)+1),tt()),g=U({fullDataFormatter:e,fullChartParams:i,rootMousemove:s,columnAmount:p,rowAmount:d,layout:a}).pipe(W(async y=>y),B(y=>{const _={offsetX:y.rootMousemove.offsetX*y.columnAmount%y.layout.rootWidth,offsetY:y.rootMousemove.offsetY*y.rowAmount%y.layout.rootHeight};return y.fullDataFormatter.grid.groupAxis.position==="bottom"||y.fullDataFormatter.grid.groupAxis.position==="top"?_.offsetX-y.fullChartParams.padding.left:_.offsetY-y.fullChartParams.padding.top})),m=U({xIndexScale:h,axisValue:g,groupScaleDomain:u}).pipe(W(async y=>y),B(y=>{const _=y.xIndexScale(y.axisValue),x=Math.ceil(y.groupScaleDomain[0]);return _+x})),b=U({groupIndex:m,groupLabels:l}).pipe(W(async y=>y),B(y=>y.groupLabels[y.groupIndex]??""));return U({groupIndex:m,groupLabel:b}).pipe(W(async y=>y),B(y=>({groupIndex:y.groupIndex,groupLabel:y.groupLabel})))};function dE(t="curveLinear"){return Tu().x(e=>e.axisX).y(e=>e.axisY).curve(zh[t])}function gE(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function mE({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function yE({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?q(o[i]).style("opacity",1):q(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function bE({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{q(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Uo(r)).tween("tween",(l,c,f)=>h=>{const p=l.width*h;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const Iv=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,allContainerPosition$:b,layout$:y,event$:_})=>{const x=new et,w=Mn(t,"clipPath-box"),$=ot(t,"path"),{seriesSelection$:R,axesSelection$:A,defsSelection$:D,graphicGSelection$:I}=dr({selection:e,pluginName:t,clipPathID:w,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p}),v=new gt(O=>{const k=l.pipe(N(x)).subscribe(E=>{if(!E)return;const C=dE(E.lineCurve);O.next(C)});return()=>{k.unsubscribe()}}),L=f.pipe(B(O=>O.transitionDuration),tt()),T=f.pipe(B(O=>O.transitionEase),tt());U({defsSelection:D,seriesLabels:a,axisSize:d,transitionDuration:L,transitionEase:T}).pipe(N(x),W(async O=>O)).subscribe(O=>{const E=[{id:w,width:O.axisSize.width,height:O.axisSize.height}].concat(O.seriesLabels.map(C=>({id:`orbcharts__clipPath_${C}`,width:O.axisSize.width,height:O.axisSize.height})));bE({defsSelection:O.defsSelection,clipPathData:E,transitionDuration:O.transitionDuration,transitionEase:O.transitionEase})});const S=n.pipe(B(O=>{const k=new Map;return O.flat().forEach(E=>k.set(E.id,E)),k})),M=Ev({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:b,layout$:y}),P=f.pipe(N(x),B(O=>O.highlightTarget),tt()),G=U({graphicGSelection:I,visibleComputedLayoutData:o,linePath:v,params:l}).pipe(N(x),W(async O=>O),B(O=>{let k=[];return O.graphicGSelection.each((E,C,F)=>{const H=gE(O.visibleComputedLayoutData[C]??[]);k[C]=mE({selection:q(F[C]),pathClassName:$,linePath:O.linePath,segmentData:H,params:O.params})}),k}));return U({pathSelectionArr:G,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:P,gridGroupPositionFn:M}).pipe(N(x),W(async O=>O)).subscribe(O=>{O.pathSelectionArr.forEach(k=>{k.on("mouseover",(E,C)=>{E.stopPropagation();const F=C[0]?C[0].seriesLabel:"",{groupIndex:H,groupLabel:J}=O.gridGroupPositionFn(E),Y=O.GroupDataMap.get(J).find(K=>K.seriesLabel===F)??C[0];_.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:O.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:O.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:O.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:E,data:O.computedData})}).on("mousemove",(E,C)=>{E.stopPropagation();const F=C[0]?C[0].seriesLabel:"",{groupIndex:H,groupLabel:J}=O.gridGroupPositionFn(E),Y=O.GroupDataMap.get(J).find(K=>K.seriesLabel===F)??C[0];_.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:O.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:O.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:O.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:E,data:O.computedData})}).on("mouseout",(E,C)=>{E.stopPropagation();const F=C[0]?C[0].seriesLabel:"",{groupIndex:H,groupLabel:J}=O.gridGroupPositionFn(E),Y=O.GroupDataMap.get(J).find(K=>K.seriesLabel===F)??C[0];_.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:O.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:O.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:O.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:E,data:O.computedData})}).on("click",(E,C)=>{E.stopPropagation();const F=C[0]?C[0].seriesLabel:"",{groupIndex:H,groupLabel:J}=O.gridGroupPositionFn(E),Y=O.GroupDataMap.get(J).find(K=>K.seriesLabel===F)??C[0];_.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:O.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:O.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:O.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:E,data:O.computedData})})})}),f.pipe(N(x),wi(O=>O.highlightTarget==="series"),W(O=>U({graphicGSelection:I,gridHighlight:g,DataMap:S,fullChartParams:f}).pipe(N(x),W(async k=>k)))).subscribe(O=>{const k=O.gridHighlight[0]?O.gridHighlight[0].seriesLabel:null;yE({selection:O.graphicGSelection,seriesLabel:k,fullChartParams:O.fullChartParams})}),()=>{x.next(void 0)}},xE=0,Dn=2,vE=3,Nv=4,ke=5,Bv=6,Uh=7,Bu=8,Fu=9,Fv="Lines",_E=re({name:Fv,defaultParams:yp,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new et,a=Iv(Fv,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,allContainerPosition$:r.gridContainerPosition$,layout$:r.layout$,event$:i.event$});return()=>{o.next(void 0),a()}});function $E(t="curveLinear",e){return Mh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(zh[t])}function wE(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function SE({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,u)=>s.length?`${s[0].id}_${s[s.length-1].id}`:u).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,u)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function AE({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?q(o[i]).style("opacity",1):q(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function TE({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
42
+ ----> find in '${n}'`}function nD({chartType:t,config:e,initFn:n}){const r=new Xr,i=new WeakMap;let o=()=>{},a;const s=new Wg(e.defaultParams),l=new Wg({}),u=s.pipe(dc(c=>l.pipe(u0(r),Vr(f=>{try{const{status:h,columnName:p,expectToBe:d}=e.validator(f,{validateColumns:ow});if(h==="error")throw new Error(tD({columnName:p,expectToBe:d,from:`${e.name}.params$`}));h==="warning"&&console.warn(eD({columnName:p,expectToBe:d,from:`${e.name}.params$`}))}catch(h){console.error(JP(h))}return Fu(f,c)}))),KP(1));return{params$:l,name:e.name,chartType:t,defaultParams:e.defaultParams,layerIndex:e.layerIndex,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:c=>{s.next(Fu(c,e.defaultParams))},setContext:c=>{a=c,a.observer.fullParams$=u}}}const Ur=t=>function(e){return function(n){return class{constructor(){const r=nD({chartType:t,config:e,initFn:n});this.params$=r.params$,this.name=r.name,this.chartType=r.chartType,this.defaultParams=r.defaultParams,this.layerIndex=r.layerIndex,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},wn=Ur("series"),se=Ur("grid"),de=Ur("multiGrid"),Hn=Ur("multiValue"),ja=Ur("relationship"),gc=Ur("tree");function wt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function g0(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qa(t){let e,n,r;t.length!==2?(e=wt,n=(s,l)=>wt(t(s),l),r=(s,l)=>t(s)-l):(e=t===wt||t===g0?t:rD,n=t,r=t);function i(s,l,u=0,c=s.length){if(u<c){if(e(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){if(u<c){if(e(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){const f=i(s,l,u,c-1);return f>u&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:a,right:o}}function rD(){return 0}function Za(t){return t===null?NaN:+t}function*iD(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const m0=qa(wt),y0=m0.right,oD=m0.left,aD=qa(Za).center,jn=y0;function sD(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=mc(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const b0=x0(mc),lD=x0(uD);function x0(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),l=r&&t(r),u=i.slice();return s&&l?(Hr(s,u,i,o,a),Hr(s,i,u,o,a),Hr(s,u,i,o,a),jr(l,i,u,o,a),jr(l,u,i,o,a),jr(l,i,u,o,a)):s?(Hr(s,i,u,o,a),Hr(s,u,i,o,a),Hr(s,i,u,o,a)):l&&(jr(l,i,u,o,a),jr(l,u,i,o,a),jr(l,i,u,o,a)),e}}function Hr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function jr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function uD(t){const e=mc(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function mc(t){const e=Math.floor(t);if(e===t)return cD(t);const n=t-e,r=2*t+1;return(i,o,a,s,l)=>{if(!((s-=l)>=a))return;let u=e*o[a];const c=l*e,f=c+l;for(let h=a,p=a+c;h<p;h+=l)u+=o[Math.min(s,h)];for(let h=a,p=s;h<=p;h+=l)u+=o[Math.min(s,h+c)],i[h]=(u+n*(o[Math.max(a,h-f)]+o[Math.min(s,h+f)]))/r,u-=o[Math.max(a,h-c)]}}function cD(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const l=a*t;for(let u=i,c=i+l;u<c;u+=a)s+=r[Math.min(o,u)];for(let u=i,c=o;u<=c;u+=a)s+=r[Math.min(o,u+l)],n[u]=s/e,s-=r[Math.max(i,u-l)]}}function Ka(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function fD(t){return t.length|0}function hD(t){return!(t>0)}function pD(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function dD(t){return e=>t(...e)}function gD(...t){const e=typeof t[t.length-1]=="function"&&dD(t.pop());t=t.map(pD);const n=t.map(fD),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(hD))return o;for(;;){o.push(i.map((s,l)=>t[l][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function mD(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function v0(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function $0(t,e){const n=v0(t,e);return n&&Math.sqrt(n)}function io(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class kt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function yD(t,e){const n=new kt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function bD(t,e){const n=new kt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class oo extends Map{constructor(e,n=S0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(yc(this,e))}has(e){return super.has(yc(this,e))}set(e,n){return super.set(_0(this,e),n)}delete(e){return super.delete(w0(this,e))}}class qn extends Set{constructor(e,n=S0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(yc(this,e))}add(e){return super.add(_0(this,e))}delete(e){return super.delete(w0(this,e))}}function yc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function _0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function w0({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function S0(t){return t!==null&&typeof t=="object"?t.valueOf():t}function qr(t){return t}function T0(t,...e){return Zr(t,qr,qr,e)}function A0(t,...e){return Zr(t,Array.from,qr,e)}function P0(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function xD(t,...e){return P0(A0(t,...e),e)}function vD(t,e,...n){return P0(C0(t,e,...n),n)}function D0(t,e,...n){return Zr(t,qr,e,n)}function C0(t,e,...n){return Zr(t,Array.from,e,n)}function $D(t,...e){return Zr(t,qr,M0,e)}function _D(t,...e){return Zr(t,Array.from,M0,e)}function M0(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Zr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new oo,l=r[a++];let u=-1;for(const c of o){const f=l(c,++u,o),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,a));return e(s)}(t,0)}function L0(t,e){return Array.from(e,n=>t[n])}function bc(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Kr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Kr(n[i],n[o]))),L0(t,r)}return t.sort(xc(n))}function xc(t=wt){if(t===wt)return Kr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Kr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function wD(t,e,n){return(e.length!==2?bc(D0(t,e,n),([r,i],[o,a])=>wt(i,a)||wt(r,o)):bc(T0(t,n),([r,i],[o,a])=>e(i,a)||wt(r,o))).map(([r])=>r)}var SD=Array.prototype,TD=SD.slice;function vc(t){return()=>t}const AD=Math.sqrt(50),PD=Math.sqrt(10),DD=Math.sqrt(2);function Qa(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=AD?10:o>=PD?5:o>=DD?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),l=Math.round(e*u),s/u<t&&++s,l/u>e&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),l=Math.round(e/u),s*u<t&&++s,l*u>e&&--l),l<s&&.5<=n&&n<2?Qa(t,e,n*2):[s,l,u]}function Zn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Qa(e,t,n):Qa(t,e,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(o-u)/-a;else for(let u=0;u<s;++u)l[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(i+u)/-a;else for(let u=0;u<s;++u)l[u]=(i+u)*a;return l}function Kn(t,e,n){return e=+e,t=+t,n=+n,Qa(t,e,n)[2]}function Ja(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Kn(e,t,n):Kn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function $c(t,e,n){let r;for(;;){const i=Kn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function _c(t){return Math.max(1,Math.ceil(Math.log(Ka(t))/Math.LN2)+1)}function k0(){var t=qr,e=io,n=_c;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,l,u=new Array(a);for(o=0;o<a;++o)u[o]=t(i[o],o,i);var c=e(u),f=c[0],h=c[1],p=n(u,f,h);if(!Array.isArray(p)){const v=h,x=+p;if(e===io&&([f,h]=$c(f,h,x)),p=Zn(f,h,x),p[0]<=f&&(l=Kn(f,h,x)),p[p.length-1]>=h)if(v>=h&&e===io){const _=Kn(f,h,x);isFinite(_)&&(_>0?h=(Math.floor(h/_)+1)*_:_<0&&(h=(Math.ceil(h*-_)+1)/-_))}else p.pop()}for(var d=p.length,m=0,g=d;p[m]<=f;)++m;for(;p[g-1]>h;)--g;(m||g<d)&&(p=p.slice(m,g),d=g-m);var y=new Array(d+1),b;for(o=0;o<=d;++o)b=y[o]=[],b.x0=o>0?p[o-1]:f,b.x1=o<d?p[o]:h;if(isFinite(l)){if(l>0)for(o=0;o<a;++o)(s=u[o])!=null&&f<=s&&s<=h&&y[Math.min(d,Math.floor((s-f)/l))].push(i[o]);else if(l<0){for(o=0;o<a;++o)if((s=u[o])!=null&&f<=s&&s<=h){const v=Math.floor((f-s)*l);y[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=u[o])!=null&&f<=s&&s<=h&&y[jn(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:vc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:vc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:vc(Array.isArray(i)?TD.call(i):i),r):n},r}function ao(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function wc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ts(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Sc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function es(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Kr:xc(i);r>n;){if(r-n>600){const l=r-n+1,u=e-n+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(n,Math.floor(e-u*f/l+h)),d=Math.min(r,Math.floor(e+(l-u)*f/l+h));es(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(so(t,n,e),i(t[r],o)>0&&so(t,n,r);a<s;){for(so(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?so(t,n,s):(++s,so(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function so(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function R0(t,e=wt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?wt(a,i)>0:wt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function lo(t,e,n){if(t=Float64Array.from(iD(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return ts(t);if(e>=1)return ao(t);var r,i=(r-1)*e,o=Math.floor(i),a=ao(es(t,o).subarray(0,o+1)),s=ts(t.subarray(o+1));return a+(s-a)*(i-o)}}function E0(t,e,n=Za){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function I0(t,e,n=Za){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,l)=>Za(n(t[l],l,t))),e<=0)return Sc(r);if(e>=1)return wc(r);var r,i=Uint32Array.from(t,(s,l)=>l),o=r.length-1,a=Math.floor(o*e);return es(i,a,0,o,(s,l)=>Kr(r[s],r[l])),a=R0(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function CD(t,e,n){const r=Ka(t),i=lo(t,.75)-lo(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function MD(t,e,n){const r=Ka(t),i=$0(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function LD(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function kD(t,e){return lo(t,.5,e)}function RD(t,e){return I0(t,.5,e)}function*ED(t){for(const e of t)yield*e}function Tc(t){return Array.from(ED(t))}function ID(t,e){const n=new oo;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function BD(t,e=ND){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function ND(t,e){return[t,e]}function Sn(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function FD(t,e=wt){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=wt);const i=(s,l)=>e(n[s],n[l]);let o,a;return t=Uint32Array.from(n,(s,l)=>l),t.sort(e===wt?(s,l)=>Kr(n[s],n[l]):xc(i)),t.forEach((s,l)=>{const u=i(s,o===void 0?s:o);u>=0?((o===void 0||u>0)&&(o=s,a=l),r[s]=a):r[s]=NaN}),r}function zD(t,e=wt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?wt(a,i)<0:wt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function B0(t,e=wt){if(e.length===1)return Sc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function OD(t,e=wt){if(e.length===1)return wc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function GD(t,e){const n=B0(t,e);return n<0?void 0:n}const YD=N0(Math.random);function N0(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function Ac(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function F0(t){if(!(o=t.length))return[];for(var e=-1,n=ts(t,WD),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function WD(t){return t.length}function XD(){return F0(arguments)}function VD(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function UD(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function HD(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function jD(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function qD(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function ZD(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function KD(t,...e){t=new qn(t);for(const n of e)for(const r of n)t.delete(r);return t}function QD(t,e){const n=e[Symbol.iterator](),r=new qn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function JD(t,...e){t=new qn(t),e=e.map(tC);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function tC(t){return t instanceof qn?t:new qn(t)}function z0(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=O0(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const l=O0(a);if(r.add(l),Object.is(o,l))break}}return!0}function O0(t){return t!==null&&typeof t=="object"?t.valueOf():t}function eC(t,e){return z0(e,t)}function nC(...t){const e=new qn;for(const n of t)for(const r of n)e.add(r);return e}function rC(t){return t}var ns=1,rs=2,Pc=3,uo=4,G0=1e-6;function iC(t){return"translate("+t+",0)"}function oC(t){return"translate(0,"+t+")"}function aC(t){return e=>+t(e)}function sC(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function lC(){return!this.__axis}function is(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===ns||t===uo?-1:1,c=t===uo||t===rs?"x":"y",f=t===ns||t===Pc?iC:oC;function h(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),m=i??(e.tickFormat?e.tickFormat.apply(e,n):rC),g=Math.max(o,0)+s,y=e.range(),b=+y[0]+l,v=+y[y.length-1]+l,x=(e.bandwidth?sC:aC)(e.copy(),l),_=p.selection?p.selection():p,A=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(d,e).order(),P=w.exit(),C=w.enter().append("g").attr("class","tick"),B=w.select("line"),$=w.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(C),B=B.merge(C.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),$=$.merge(C.append("text").attr("fill","currentColor").attr(c,u*g).attr("dy",t===ns?"0em":t===Pc?"0.71em":"0.32em")),p!==_&&(A=A.transition(p),w=w.transition(p),B=B.transition(p),$=$.transition(p),P=P.transition(p).attr("opacity",G0).attr("transform",function(k){return isFinite(k=x(k))?f(k+l):this.getAttribute("transform")}),C.attr("opacity",G0).attr("transform",function(k){var M=this.parentNode.__axis;return f((M&&isFinite(M=M(k))?M:x(k))+l)})),P.remove(),A.attr("d",t===uo||t===rs?a?"M"+u*a+","+b+"H"+l+"V"+v+"H"+u*a:"M"+l+","+b+"V"+v:a?"M"+b+","+u*a+"V"+l+"H"+v+"V"+u*a:"M"+b+","+l+"H"+v),w.attr("opacity",1).attr("transform",function(k){return f(x(k)+l)}),B.attr(c+"2",u*o),$.attr(c,u*g).text(m),_.filter(lC).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===rs?"start":t===uo?"end":"middle"),_.each(function(){this.__axis=x})}return h.scale=function(p){return arguments.length?(e=p,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(o=a=+p,h):o},h.tickSizeInner=function(p){return arguments.length?(o=+p,h):o},h.tickSizeOuter=function(p){return arguments.length?(a=+p,h):a},h.tickPadding=function(p){return arguments.length?(s=+p,h):s},h.offset=function(p){return arguments.length?(l=+p,h):l},h}function uC(t){return is(ns,t)}function cC(t){return is(rs,t)}function Dc(t){return is(Pc,t)}function Cc(t){return is(uo,t)}var fC={value:()=>{}};function Qn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new os(n)}function os(t){this._=t}function hC(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}os.prototype=Qn.prototype={constructor:os,on:function(t,e){var n=this._,r=hC(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=pC(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Y0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Y0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new os(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function pC(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Y0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=fC,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Mc="http://www.w3.org/1999/xhtml";const Lc={svg:"http://www.w3.org/2000/svg",xhtml:Mc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function co(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Lc.hasOwnProperty(e)?{space:Lc[e],local:t}:t}function dC(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Mc&&e.documentElement.namespaceURI===Mc?e.createElement(t):e.createElementNS(n,t)}}function gC(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function as(t){var e=co(t);return(e.local?gC:dC)(e)}function mC(){}function ss(t){return t==null?mC:function(){return this.querySelector(t)}}function yC(t){typeof t!="function"&&(t=ss(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=t.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Ht(r,this._parents)}function W0(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function bC(){return[]}function kc(t){return t==null?bC:function(){return this.querySelectorAll(t)}}function xC(t){return function(){return W0(t.apply(this,arguments))}}function vC(t){typeof t=="function"?t=xC(t):t=kc(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(t.call(l,l.__data__,u,a)),i.push(l));return new Ht(r,i)}function Rc(t){return function(){return this.matches(t)}}function X0(t){return function(e){return e.matches(t)}}var $C=Array.prototype.find;function _C(t){return function(){return $C.call(this.children,t)}}function wC(){return this.firstElementChild}function SC(t){return this.select(t==null?wC:_C(typeof t=="function"?t:X0(t)))}var TC=Array.prototype.filter;function AC(){return Array.from(this.children)}function PC(t){return function(){return TC.call(this.children,t)}}function DC(t){return this.selectAll(t==null?AC:PC(typeof t=="function"?t:X0(t)))}function CC(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new Ht(r,this._parents)}function V0(t){return new Array(t.length)}function MC(){return new Ht(this._enter||this._groups.map(V0),this._parents)}function ls(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ls.prototype={constructor:ls,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function LC(t){return function(){return t}}function kC(t,e,n,r,i,o){for(var a=0,s,l=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new ls(t,o[a]);for(;a<l;++a)(s=e[a])&&(i[a]=s)}function RC(t,e,n,r,i,o,a){var s,l,u=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(l=e[s])&&(h[s]=p=a.call(l,l.__data__,s,e)+"",u.has(p)?i[s]=l:u.set(p,l));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(l=u.get(p))?(r[s]=l,l.__data__=o[s],u.delete(p)):n[s]=new ls(t,o[s]);for(s=0;s<c;++s)(l=e[s])&&u.get(h[s])===l&&(i[s]=l)}function EC(t){return t.__data__}function IC(t,e){if(!arguments.length)return Array.from(this,EC);var n=e?RC:kC,r=this._parents,i=this._groups;typeof t!="function"&&(t=LC(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],h=f.length,p=BC(t.call(c,c&&c.__data__,u,r)),d=p.length,m=s[u]=new Array(d),g=a[u]=new Array(d),y=l[u]=new Array(h);n(c,f,m,g,y,p,e);for(var b=0,v=0,x,_;b<d;++b)if(x=m[b]){for(b>=v&&(v=b+1);!(_=g[v])&&++v<d;);x._next=_||null}}return a=new Ht(a,r),a._enter=s,a._exit=l,a}function BC(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function NC(){return new Ht(this._exit||this._groups.map(V0),this._parents)}function FC(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function zC(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=r[l],f=u.length,h=s[l]=new Array(f),p,d=0;d<f;++d)(p=u[d]||c[d])&&(h[d]=p);for(;l<i;++l)s[l]=n[l];return new Ht(s,this._parents)}function OC(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function GC(t){t||(t=YC);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(e)}return new Ht(i,this._parents).order()}function YC(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function WC(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function XC(){return Array.from(this)}function VC(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function UC(){let t=0;for(const e of this)++t;return t}function HC(){return!this.node()}function jC(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function qC(t){return function(){this.removeAttribute(t)}}function ZC(t){return function(){this.removeAttributeNS(t.space,t.local)}}function KC(t,e){return function(){this.setAttribute(t,e)}}function QC(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function JC(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function tM(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function eM(t,e){var n=co(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ZC:qC:typeof e=="function"?n.local?tM:JC:n.local?QC:KC)(n,e))}function Ec(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function nM(t){return function(){this.style.removeProperty(t)}}function rM(t,e,n){return function(){this.style.setProperty(t,e,n)}}function iM(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function oM(t,e,n){return arguments.length>1?this.each((e==null?nM:typeof e=="function"?iM:rM)(t,e,n??"")):Jn(this.node(),t)}function Jn(t,e){return t.style.getPropertyValue(e)||Ec(t).getComputedStyle(t,null).getPropertyValue(e)}function aM(t){return function(){delete this[t]}}function sM(t,e){return function(){this[t]=e}}function lM(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function uM(t,e){return arguments.length>1?this.each((e==null?aM:typeof e=="function"?lM:sM)(t,e)):this.node()[t]}function U0(t){return t.trim().split(/^|\s+/)}function Ic(t){return t.classList||new H0(t)}function H0(t){this._node=t,this._names=U0(t.getAttribute("class")||"")}H0.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function j0(t,e){for(var n=Ic(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function q0(t,e){for(var n=Ic(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function cM(t){return function(){j0(this,t)}}function fM(t){return function(){q0(this,t)}}function hM(t,e){return function(){(e.apply(this,arguments)?j0:q0)(this,t)}}function pM(t,e){var n=U0(t+"");if(arguments.length<2){for(var r=Ic(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?hM:e?cM:fM)(n,e))}function dM(){this.textContent=""}function gM(t){return function(){this.textContent=t}}function mM(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function yM(t){return arguments.length?this.each(t==null?dM:(typeof t=="function"?mM:gM)(t)):this.node().textContent}function bM(){this.innerHTML=""}function xM(t){return function(){this.innerHTML=t}}function vM(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function $M(t){return arguments.length?this.each(t==null?bM:(typeof t=="function"?vM:xM)(t)):this.node().innerHTML}function _M(){this.nextSibling&&this.parentNode.appendChild(this)}function wM(){return this.each(_M)}function SM(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function TM(){return this.each(SM)}function AM(t){var e=typeof t=="function"?t:as(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function PM(){return null}function DM(t,e){var n=typeof t=="function"?t:as(t),r=e==null?PM:typeof e=="function"?e:ss(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function CM(){var t=this.parentNode;t&&t.removeChild(this)}function MM(){return this.each(CM)}function LM(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kM(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function RM(t){return this.select(t?kM:LM)}function EM(t){return arguments.length?this.property("__data__",t):this.node().__data__}function IM(t){return function(e){t.call(this,e,this.__data__)}}function BM(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function NM(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function FM(t,e,n){return function(){var r=this.__on,i,o=IM(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function zM(t,e,n){var r=BM(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?FM:NM,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Z0(t,e,n){var r=Ec(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function OM(t,e){return function(){return Z0(this,t,e)}}function GM(t,e){return function(){return Z0(this,t,e.apply(this,arguments))}}function YM(t,e){return this.each((typeof e=="function"?GM:OM)(t,e))}function*WM(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Bc=[null];function Ht(t,e){this._groups=t,this._parents=e}function tr(){return new Ht([[document.documentElement]],Bc)}function XM(){return this}Ht.prototype=tr.prototype={constructor:Ht,select:yC,selectAll:vC,selectChild:SC,selectChildren:DC,filter:CC,data:IC,enter:MC,exit:NC,join:FC,merge:zC,selection:XM,order:OC,sort:GC,call:WC,nodes:XC,node:VC,size:UC,empty:HC,each:jC,attr:eM,style:oM,property:uM,classed:pM,text:yM,html:$M,raise:wM,lower:TM,append:AM,insert:DM,remove:MM,clone:RM,datum:EM,on:zM,dispatch:YM,[Symbol.iterator]:WM};function V(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],Bc)}function VM(t){return V(as(t).call(document.documentElement))}var UM=0;function K0(){return new Nc}function Nc(){this._="@"+(++UM).toString(36)}Nc.prototype=K0.prototype={constructor:Nc,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Q0(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ge(t,e){if(t=Q0(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function HM(t,e){return t.target&&(t=Q0(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ge(n,e))}function jM(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([W0(t)],Bc)}const qM={passive:!1},fo={capture:!0,passive:!1};function Fc(t){t.stopImmediatePropagation()}function Qr(t){t.preventDefault(),t.stopImmediatePropagation()}function us(t){var e=t.document.documentElement,n=V(t).on("dragstart.drag",Qr,fo);"onselectstart"in e?n.on("selectstart.drag",Qr,fo):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function cs(t,e){var n=t.document.documentElement,r=V(t).on("dragstart.drag",null);e&&(r.on("click.drag",Qr,fo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const fs=t=>()=>t;function zc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}zc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function ZM(t){return!t.ctrlKey&&!t.button}function KM(){return this.parentNode}function QM(t,e){return e??{x:t.x,y:t.y}}function JM(){return navigator.maxTouchPoints||"ontouchstart"in this}function hs(){var t=ZM,e=KM,n=QM,r=JM,i={},o=Qn("start","drag","end"),a=0,s,l,u,c,f=0;function h(x){x.on("mousedown.drag",p).filter(r).on("touchstart.drag",g).on("touchmove.drag",y,qM).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(x,_){if(!(c||!t.call(this,x,_))){var A=v(this,e.call(this,x,_),x,_,"mouse");A&&(V(x.view).on("mousemove.drag",d,fo).on("mouseup.drag",m,fo),us(x.view),Fc(x),u=!1,s=x.clientX,l=x.clientY,A("start",x))}}function d(x){if(Qr(x),!u){var _=x.clientX-s,A=x.clientY-l;u=_*_+A*A>f}i.mouse("drag",x)}function m(x){V(x.view).on("mousemove.drag mouseup.drag",null),cs(x.view,u),Qr(x),i.mouse("end",x)}function g(x,_){if(t.call(this,x,_)){var A=x.changedTouches,w=e.call(this,x,_),P=A.length,C,B;for(C=0;C<P;++C)(B=v(this,w,x,_,A[C].identifier,A[C]))&&(Fc(x),B("start",x,A[C]))}}function y(x){var _=x.changedTouches,A=_.length,w,P;for(w=0;w<A;++w)(P=i[_[w].identifier])&&(Qr(x),P("drag",x,_[w]))}function b(x){var _=x.changedTouches,A=_.length,w,P;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),w=0;w<A;++w)(P=i[_[w].identifier])&&(Fc(x),P("end",x,_[w]))}function v(x,_,A,w,P,C){var B=o.copy(),$=ge(C||A,_),k,M,T;if((T=n.call(x,new zc("beforestart",{sourceEvent:A,target:h,identifier:P,active:a,x:$[0],y:$[1],dx:0,dy:0,dispatch:B}),w))!=null)return k=T.x-$[0]||0,M=T.y-$[1]||0,function S(D,F,z){var I=$,N;switch(D){case"start":i[P]=S,N=a++;break;case"end":delete i[P],--a;case"drag":$=ge(z||F,_),N=a;break}B.call(D,x,new zc(D,{sourceEvent:F,subject:T,target:h,identifier:P,active:N,x:$[0]+k,y:$[1]+M,dx:$[0]-I[0],dy:$[1]-I[1],dispatch:B}),w)}}return h.filter=function(x){return arguments.length?(t=typeof x=="function"?x:fs(!!x),h):t},h.container=function(x){return arguments.length?(e=typeof x=="function"?x:fs(x),h):e},h.subject=function(x){return arguments.length?(n=typeof x=="function"?x:fs(x),h):n},h.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:fs(!!x),h):r},h.on=function(){var x=o.on.apply(o,arguments);return x===o?h:x},h.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,h):Math.sqrt(f)},h}function Jr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ho(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Tn(){}var er=.7,ti=1/er,ei="\\s*([+-]?\\d+)\\s*",po="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",We="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tL=/^#([0-9a-f]{3,8})$/,eL=new RegExp(`^rgb\\(${ei},${ei},${ei}\\)$`),nL=new RegExp(`^rgb\\(${We},${We},${We}\\)$`),rL=new RegExp(`^rgba\\(${ei},${ei},${ei},${po}\\)$`),iL=new RegExp(`^rgba\\(${We},${We},${We},${po}\\)$`),oL=new RegExp(`^hsl\\(${po},${We},${We}\\)$`),aL=new RegExp(`^hsla\\(${po},${We},${We},${po}\\)$`),J0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Jr(Tn,An,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:tm,formatHex:tm,formatHex8:sL,formatHsl:lL,formatRgb:em,toString:em});function tm(){return this.rgb().formatHex()}function sL(){return this.rgb().formatHex8()}function lL(){return am(this).formatHsl()}function em(){return this.rgb().formatRgb()}function An(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=tL.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?nm(e):n===3?new It(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ps(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ps(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=eL.exec(t))?new It(e[1],e[2],e[3],1):(e=nL.exec(t))?new It(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=rL.exec(t))?ps(e[1],e[2],e[3],e[4]):(e=iL.exec(t))?ps(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=oL.exec(t))?om(e[1],e[2]/100,e[3]/100,1):(e=aL.exec(t))?om(e[1],e[2]/100,e[3]/100,e[4]):J0.hasOwnProperty(t)?nm(J0[t]):t==="transparent"?new It(NaN,NaN,NaN,0):null}function nm(t){return new It(t>>16&255,t>>8&255,t&255,1)}function ps(t,e,n,r){return r<=0&&(t=e=n=NaN),new It(t,e,n,r)}function Oc(t){return t instanceof Tn||(t=An(t)),t?(t=t.rgb(),new It(t.r,t.g,t.b,t.opacity)):new It}function ni(t,e,n,r){return arguments.length===1?Oc(t):new It(t,e,n,r??1)}function It(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Jr(It,ni,ho(Tn,{brighter(t){return t=t==null?ti:Math.pow(ti,t),new It(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?er:Math.pow(er,t),new It(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new It(nr(this.r),nr(this.g),nr(this.b),ds(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rm,formatHex:rm,formatHex8:uL,formatRgb:im,toString:im}));function rm(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function uL(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function im(){const t=ds(this.opacity);return`${t===1?"rgb(":"rgba("}${nr(this.r)}, ${nr(this.g)}, ${nr(this.b)}${t===1?")":`, ${t})`}`}function ds(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function nr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rr(t){return t=nr(t),(t<16?"0":"")+t.toString(16)}function om(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ke(t,e,n,r)}function am(t){if(t instanceof ke)return new ke(t.h,t.s,t.l,t.opacity);if(t instanceof Tn||(t=An(t)),!t)return new ke;if(t instanceof ke)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ke(a,s,l,t.opacity)}function gs(t,e,n,r){return arguments.length===1?am(t):new ke(t,e,n,r??1)}function ke(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Jr(ke,gs,ho(Tn,{brighter(t){return t=t==null?ti:Math.pow(ti,t),new ke(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?er:Math.pow(er,t),new ke(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new It(Gc(t>=240?t-240:t+120,i,r),Gc(t,i,r),Gc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ke(sm(this.h),ms(this.s),ms(this.l),ds(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ds(this.opacity);return`${t===1?"hsl(":"hsla("}${sm(this.h)}, ${ms(this.s)*100}%, ${ms(this.l)*100}%${t===1?")":`, ${t})`}`}}));function sm(t){return t=(t||0)%360,t<0?t+360:t}function ms(t){return Math.max(0,Math.min(1,t||0))}function Gc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const lm=Math.PI/180,um=180/Math.PI,ys=18,cm=.96422,fm=1,hm=.82521,pm=4/29,ri=6/29,dm=3*ri*ri,cL=ri*ri*ri;function gm(t){if(t instanceof Re)return new Re(t.l,t.a,t.b,t.opacity);if(t instanceof Xe)return ym(t);t instanceof It||(t=Oc(t));var e=Vc(t.r),n=Vc(t.g),r=Vc(t.b),i=Yc((.2225045*e+.7168786*n+.0606169*r)/fm),o,a;return e===n&&n===r?o=a=i:(o=Yc((.4360747*e+.3850649*n+.1430804*r)/cm),a=Yc((.0139322*e+.0971045*n+.7141733*r)/hm)),new Re(116*i-16,500*(o-i),200*(i-a),t.opacity)}function fL(t,e){return new Re(t,0,0,e??1)}function bs(t,e,n,r){return arguments.length===1?gm(t):new Re(t,e,n,r??1)}function Re(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Jr(Re,bs,ho(Tn,{brighter(t){return new Re(this.l+ys*(t??1),this.a,this.b,this.opacity)},darker(t){return new Re(this.l-ys*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=cm*Wc(e),t=fm*Wc(t),n=hm*Wc(n),new It(Xc(3.1338561*e-1.6168667*t-.4906146*n),Xc(-.9787684*e+1.9161415*t+.033454*n),Xc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Yc(t){return t>cL?Math.pow(t,1/3):t/dm+pm}function Wc(t){return t>ri?t*t*t:dm*(t-pm)}function Xc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Vc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function mm(t){if(t instanceof Xe)return new Xe(t.h,t.c,t.l,t.opacity);if(t instanceof Re||(t=gm(t)),t.a===0&&t.b===0)return new Xe(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*um;return new Xe(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function hL(t,e,n,r){return arguments.length===1?mm(t):new Xe(n,e,t,r??1)}function xs(t,e,n,r){return arguments.length===1?mm(t):new Xe(t,e,n,r??1)}function Xe(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function ym(t){if(isNaN(t.h))return new Re(t.l,0,0,t.opacity);var e=t.h*lm;return new Re(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Jr(Xe,xs,ho(Tn,{brighter(t){return new Xe(this.h,this.c,this.l+ys*(t??1),this.opacity)},darker(t){return new Xe(this.h,this.c,this.l-ys*(t??1),this.opacity)},rgb(){return ym(this).rgb()}}));var bm=-.14861,Uc=1.78277,Hc=-.29227,vs=-.90649,go=1.97294,xm=go*vs,vm=go*Uc,$m=Uc*Hc-vs*bm;function pL(t){if(t instanceof ir)return new ir(t.h,t.s,t.l,t.opacity);t instanceof It||(t=Oc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=($m*r+xm*e-vm*n)/($m+xm-vm),o=r-i,a=(go*(n-i)-Hc*o)/vs,s=Math.sqrt(a*a+o*o)/(go*i*(1-i)),l=s?Math.atan2(a,o)*um-120:NaN;return new ir(l<0?l+360:l,s,i,t.opacity)}function Ee(t,e,n,r){return arguments.length===1?pL(t):new ir(t,e,n,r??1)}function ir(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Jr(ir,Ee,ho(Tn,{brighter(t){return t=t==null?ti:Math.pow(ti,t),new ir(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?er:Math.pow(er,t),new ir(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*lm,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new It(255*(e+n*(bm*r+Uc*i)),255*(e+n*(Hc*r+vs*i)),255*(e+n*(go*r)),this.opacity)}}));function _m(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function wm(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return _m((n-r/e)*e,a,i,o,s)}}function Sm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return _m((n-r/e)*e,i,o,a,s)}}const $s=t=>()=>t;function Tm(t,e){return function(n){return t+n*e}}function dL(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function _s(t,e){var n=e-t;return n?Tm(t,n>180||n<-180?n-360*Math.round(n/360):n):$s(isNaN(t)?e:t)}function gL(t){return(t=+t)==1?Bt:function(e,n){return n-e?dL(e,n,t):$s(isNaN(e)?n:e)}}function Bt(t,e){var n=e-t;return n?Tm(t,n):$s(isNaN(t)?e:t)}const mo=function t(e){var n=gL(e);function r(i,o){var a=n((i=ni(i)).r,(o=ni(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=Bt(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=t,r}(1);function Am(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=ni(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=o(l),s+""}}}var Pm=Am(wm),mL=Am(Sm);function jc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function Dm(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function yL(t,e){return(Dm(e)?jc:Cm)(t,e)}function Cm(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=nn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Mm(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ve(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Lm(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=nn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var qc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zc=new RegExp(qc.source,"g");function bL(t){return function(){return t}}function xL(t){return function(e){return t(e)+""}}function Kc(t,e){var n=qc.lastIndex=Zc.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(t=t+"",e=e+"";(r=qc.exec(t))&&(i=Zc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:ve(r,i)})),n=Zc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?xL(l[0].x):bL(e):(e=l.length,function(u){for(var c=0,f;c<e;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function nn(t,e){var n=typeof e,r;return e==null||n==="boolean"?$s(e):(n==="number"?ve:n==="string"?(r=An(e))?(e=r,mo):Kc:e instanceof An?mo:e instanceof Date?Mm:Dm(e)?jc:Array.isArray(e)?Cm:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Lm:ve)(t,e)}function vL(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function $L(t,e){var n=_s(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function ws(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var km=180/Math.PI,Qc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rm(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*km,skewX:Math.atan(l)*km,scaleX:a,scaleY:s}}var Ss;function _L(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Qc:Rm(e.a,e.b,e.c,e.d,e.e,e.f)}function wL(t){return t==null||(Ss||(Ss=document.createElementNS("http://www.w3.org/2000/svg","g")),Ss.setAttribute("transform",t),!(t=Ss.transform.baseVal.consolidate()))?Qc:(t=t.matrix,Rm(t.a,t.b,t.c,t.d,t.e,t.f))}function Em(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,f,h,p,d){if(u!==f||c!==h){var m=p.push("translate(",null,e,null,n);d.push({i:m-4,x:ve(u,f)},{i:m-2,x:ve(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:ve(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:ve(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function l(u,c,f,h,p,d){if(u!==f||c!==h){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:ve(u,f)},{i:m-2,x:ve(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=t(u),c=t(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,h),a(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var d=-1,m=h.length,g;++d<m;)f[(g=h[d]).i]=g.x(p);return f.join("")}}}var Im=Em(_L,"px, ","px)","deg)"),Bm=Em(wL,", ",")",")"),SL=1e-12;function Nm(t){return((t=Math.exp(t))+1/t)/2}function TL(t){return((t=Math.exp(t))-1/t)/2}function AL(t){return((t=Math.exp(2*t))-1)/(t+1)}const Fm=function t(e,n,r){function i(o,a){var s=o[0],l=o[1],u=o[2],c=a[0],f=a[1],h=a[2],p=c-s,d=f-l,m=p*p+d*d,g,y;if(m<SL)y=Math.log(h/u)/e,g=function(w){return[s+w*p,l+w*d,u*Math.exp(e*w*y)]};else{var b=Math.sqrt(m),v=(h*h-u*u+r*m)/(2*u*n*b),x=(h*h-u*u-r*m)/(2*h*n*b),_=Math.log(Math.sqrt(v*v+1)-v),A=Math.log(Math.sqrt(x*x+1)-x);y=(A-_)/e,g=function(w){var P=w*y,C=Nm(_),B=u/(n*b)*(C*AL(e*P+_)-TL(_));return[s+B*p,l+B*d,u*C/Nm(e*P+_)]}}return g.duration=y*1e3*e/Math.SQRT2,g}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,l=s*s;return t(a,s,l)},i}(Math.SQRT2,2,4);function zm(t){return function(e,n){var r=t((e=gs(e)).h,(n=gs(n)).h),i=Bt(e.s,n.s),o=Bt(e.l,n.l),a=Bt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const PL=zm(_s);var DL=zm(Bt);function CL(t,e){var n=Bt((t=bs(t)).l,(e=bs(e)).l),r=Bt(t.a,e.a),i=Bt(t.b,e.b),o=Bt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function Om(t){return function(e,n){var r=t((e=xs(e)).h,(n=xs(n)).h),i=Bt(e.c,n.c),o=Bt(e.l,n.l),a=Bt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const ML=Om(_s);var LL=Om(Bt);function Gm(t){return function e(n){n=+n;function r(i,o){var a=t((i=Ee(i)).h,(o=Ee(o)).h),s=Bt(i.s,o.s),l=Bt(i.l,o.l),u=Bt(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=l(Math.pow(c,n)),i.opacity=u(c),i+""}}return r.gamma=e,r}(1)}const kL=Gm(_s);var Ts=Gm(Bt);function Ym(t,e){e===void 0&&(e=t,t=nn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function RL(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var ii=0,yo=0,bo=0,Wm=1e3,As,xo,Ps=0,or=0,Ds=0,vo=typeof performance=="object"&&performance.now?performance:Date,Xm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function $o(){return or||(Xm(EL),or=vo.now()+Ds)}function EL(){or=0}function _o(){this._call=this._time=this._next=null}_o.prototype=Cs.prototype={constructor:_o,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?$o():+n)+(e==null?0:+e),!this._next&&xo!==this&&(xo?xo._next=this:As=this,xo=this),this._call=t,this._time=n,Jc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jc())}};function Cs(t,e,n){var r=new _o;return r.restart(t,e,n),r}function Vm(){$o(),++ii;for(var t=As,e;t;)(e=or-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ii}function Um(){or=(Ps=vo.now())+Ds,ii=yo=0;try{Vm()}finally{ii=0,BL(),or=0}}function IL(){var t=vo.now(),e=t-Ps;e>Wm&&(Ds-=e,Ps=t)}function BL(){for(var t,e=As,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:As=n);xo=t,Jc(r)}function Jc(t){if(!ii){yo&&(yo=clearTimeout(yo));var e=t-or;e>24?(t<1/0&&(yo=setTimeout(Um,t-vo.now()-Ds)),bo&&(bo=clearInterval(bo))):(bo||(Ps=vo.now(),bo=setInterval(IL,Wm)),ii=1,Xm(Um))}}function tf(t,e,n){var r=new _o;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function NL(t,e,n){var r=new _o,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?$o():+s,r._restart(function l(u){u+=i,r._restart(l,i+=a,s),o(u)},a,s)},r.restart(t,e,n),r)}var FL=Qn("start","end","cancel","interrupt"),zL=[],Hm=0,ef=1,nf=2,Ms=3,jm=4,rf=5,Ls=6;function ks(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;OL(t,n,{name:e,index:r,group:i,on:FL,tween:zL,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Hm})}function of(t,e){var n=Ie(t,e);if(n.state>Hm)throw new Error("too late; already scheduled");return n}function Ve(t,e){var n=Ie(t,e);if(n.state>Ms)throw new Error("too late; already running");return n}function Ie(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function OL(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Cs(o,0,n.time);function o(u){n.state=ef,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,f,h,p;if(n.state!==ef)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Ms)return tf(a);p.state===jm?(p.state=Ls,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=Ls,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(tf(function(){n.state===Ms&&(n.state=jm,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=nf,n.on.call("start",t,t.__data__,n.index,n.group),n.state===nf){for(n.state=Ms,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=rf,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===rf&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Ls,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function ar(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>nf&&r.state<rf,r.state=Ls,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function GL(t){return this.each(function(){ar(this,t)})}function YL(t,e){var n,r;return function(){var i=Ve(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function WL(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ve(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function XL(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Ie(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?YL:WL)(n,t,e))}function af(t,e,n){var r=t._id;return t.each(function(){var i=Ve(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Ie(i,r).value[e]}}function qm(t,e){var n;return(typeof e=="number"?ve:e instanceof An?mo:(n=An(e))?(e=n,mo):Kc)(t,e)}function VL(t){return function(){this.removeAttribute(t)}}function UL(t){return function(){this.removeAttributeNS(t.space,t.local)}}function HL(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function jL(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function qL(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function ZL(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function KL(t,e){var n=co(t),r=n==="transform"?Bm:qm;return this.attrTween(t,typeof e=="function"?(n.local?ZL:qL)(n,r,af(this,"attr."+t,e)):e==null?(n.local?UL:VL)(n):(n.local?jL:HL)(n,r,e))}function QL(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function JL(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function t3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&JL(t,o)),n}return i._value=e,i}function e3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&QL(t,o)),n}return i._value=e,i}function n3(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=co(t);return this.tween(n,(r.local?t3:e3)(r,e))}function r3(t,e){return function(){of(this,t).delay=+e.apply(this,arguments)}}function i3(t,e){return e=+e,function(){of(this,t).delay=e}}function o3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?r3:i3)(e,t)):Ie(this.node(),e).delay}function a3(t,e){return function(){Ve(this,t).duration=+e.apply(this,arguments)}}function s3(t,e){return e=+e,function(){Ve(this,t).duration=e}}function l3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?a3:s3)(e,t)):Ie(this.node(),e).duration}function u3(t,e){if(typeof e!="function")throw new Error;return function(){Ve(this,t).ease=e}}function c3(t){var e=this._id;return arguments.length?this.each(u3(e,t)):Ie(this.node(),e).ease}function f3(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ve(this,t).ease=n}}function h3(t){if(typeof t!="function")throw new Error;return this.each(f3(this._id,t))}function p3(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new Ue(r,this._parents,this._name,this._id)}function d3(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=e[s],u=n[s],c=l.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=l[p]||u[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new Ue(a,this._parents,this._name,this._id)}function g3(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function m3(t,e,n){var r,i,o=g3(e)?of:Ve;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function y3(t,e){var n=this._id;return arguments.length<2?Ie(this.node(),n).on.on(t):this.each(m3(n,t,e))}function b3(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function x3(){return this.on("end.remove",b3(this._id))}function v3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ss(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,f,h=0;h<l;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f,ks(u[h],e,n,h,u,Ie(c,n)));return new Ue(o,this._parents,e,n)}function $3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=kc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,f=0;f<u;++f)if(c=l[f]){for(var h=t.call(c,c.__data__,f,l),p,d=Ie(c,n),m=0,g=h.length;m<g;++m)(p=h[m])&&ks(p,e,n,m,h,d);o.push(h),a.push(c)}return new Ue(o,a,e,n)}var _3=tr.prototype.constructor;function w3(){return new _3(this._groups,this._parents)}function S3(t,e){var n,r,i;return function(){var o=Jn(this,t),a=(this.style.removeProperty(t),Jn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Zm(t){return function(){this.style.removeProperty(t)}}function T3(t,e,n){var r,i=n+"",o;return function(){var a=Jn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function A3(t,e,n){var r,i,o;return function(){var a=Jn(this,t),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),Jn(this,t))),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}function P3(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var l=Ve(this,t),u=l.on,c=l.value[o]==null?s||(s=Zm(e)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function D3(t,e,n){var r=(t+="")=="transform"?Im:qm;return e==null?this.styleTween(t,S3(t,r)).on("end.style."+t,Zm(t)):typeof e=="function"?this.styleTween(t,A3(t,r,af(this,"style."+t,e))).each(P3(this._id,t)):this.styleTween(t,T3(t,r,e),n).on("end.style."+t,null)}function C3(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function M3(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&C3(t,a,n)),r}return o._value=e,o}function L3(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,M3(t,e,n??""))}function k3(t){return function(){this.textContent=t}}function R3(t){return function(){var e=t(this);this.textContent=e??""}}function E3(t){return this.tween("text",typeof t=="function"?R3(af(this,"text",t)):k3(t==null?"":t+""))}function I3(t){return function(e){this.textContent=t.call(this,e)}}function B3(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&I3(i)),e}return r._value=t,r}function N3(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,B3(t))}function F3(){for(var t=this._name,e=this._id,n=Qm(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Ie(l,e);ks(l,t,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ue(r,this._parents,t,n)}function z3(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=Ve(this,r),c=u.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),u.on=e}),i===0&&o()})}var O3=0;function Ue(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Km(t){return tr().transition(t)}function Qm(){return++O3}var rn=tr.prototype;Ue.prototype=Km.prototype={constructor:Ue,select:v3,selectAll:$3,selectChild:rn.selectChild,selectChildren:rn.selectChildren,filter:p3,merge:d3,selection:w3,transition:F3,call:rn.call,nodes:rn.nodes,node:rn.node,size:rn.size,empty:rn.empty,each:rn.each,on:y3,attr:KL,attrTween:n3,style:D3,styleTween:L3,text:E3,textTween:N3,remove:x3,tween:XL,delay:o3,duration:l3,ease:c3,easeVarying:h3,end:z3,[Symbol.iterator]:rn[Symbol.iterator]};const G3=t=>+t;function Y3(t){return t*t}function W3(t){return t*(2-t)}function Jm(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function X3(t){return t*t*t}function V3(t){return--t*t*t+1}function wo(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var sf=3,U3=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(sf),H3=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(sf),ty=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(sf),ey=Math.PI,ny=ey/2;function j3(t){return+t==1?1:1-Math.cos(t*ny)}function q3(t){return Math.sin(t*ny)}function ry(t){return(1-Math.cos(ey*t))/2}function Pn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function Z3(t){return Pn(1-+t)}function K3(t){return 1-Pn(t)}function iy(t){return((t*=2)<=1?Pn(1-t):2-Pn(t-1))/2}function Q3(t){return 1-Math.sqrt(1-t*t)}function J3(t){return Math.sqrt(1- --t*t)}function oy(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var lf=4/11,t5=6/11,e5=8/11,n5=3/4,r5=9/11,i5=10/11,o5=15/16,a5=21/22,s5=63/64,Rs=1/lf/lf;function l5(t){return 1-So(1-t)}function So(t){return(t=+t)<lf?Rs*t*t:t<e5?Rs*(t-=t5)*t+n5:t<i5?Rs*(t-=r5)*t+o5:Rs*(t-=a5)*t+s5}function u5(t){return((t*=2)<=1?1-So(1-t):So(t-1)+1)/2}var uf=1.70158,c5=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(uf),f5=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(uf),ay=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(uf),oi=2*Math.PI,cf=1,ff=.3,h5=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oi);function i(o){return e*Pn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*oi)},i.period=function(o){return t(e,o)},i}(cf,ff),sr=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oi);function i(o){return 1-e*Pn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*oi)},i.period=function(o){return t(e,o)},i}(cf,ff),p5=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oi);function i(o){return((o=o*2-1)<0?e*Pn(-o)*Math.sin((r-o)/n):2-e*Pn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*oi)},i.period=function(o){return t(e,o)},i}(cf,ff),d5={time:null,delay:0,duration:250,ease:wo};function g5(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function m5(t){var e,n;t instanceof Ue?(e=t._id,t=t._name):(e=Qm(),(n=d5).time=$o(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&ks(l,t,e,u,a,n||g5(l,e));return new Ue(r,this._parents,t,e)}tr.prototype.interrupt=GL,tr.prototype.transition=m5;var y5=[null];function b5(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>ef&&r.name===e)return new Ue([[t]],y5,e,+i)}return null}const hf=t=>()=>t;function x5(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function v5(t){t.stopImmediatePropagation()}function pf(t){t.preventDefault(),t.stopImmediatePropagation()}var sy={name:"drag"},df={name:"space"},ai={name:"handle"},si={name:"center"};const{abs:ly,max:Gt,min:Yt}=Math;function uy(t){return[+t[0],+t[1]]}function gf(t){return[uy(t[0]),uy(t[1])]}var Es={name:"x",handles:["w","e"].map(To),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Is={name:"y",handles:["n","s"].map(To),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},$5={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(To),input:function(t){return t==null?null:gf(t)},output:function(t){return t}},on={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},cy={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},fy={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},_5={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},w5={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function To(t){return{type:t}}function S5(t){return!t.ctrlKey&&!t.button}function T5(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function A5(){return navigator.maxTouchPoints||"ontouchstart"in this}function mf(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function P5(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function D5(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function C5(){return yf(Es)}function M5(){return yf(Is)}function L5(){return yf($5)}function yf(t){var e=T5,n=S5,r=A5,i=!0,o=Qn("start","brush","end"),a=6,s;function l(g){var y=g.property("__brush",m).selectAll(".overlay").data([To("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",on.overlay).merge(y).each(function(){var v=mf(this).extent;V(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),g.selectAll(".selection").data([To("selection")]).enter().append("rect").attr("class","selection").attr("cursor",on.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var b=g.selectAll(".handle").data(t.handles,function(v){return v.type});b.exit().remove(),b.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return on[v.type]}),g.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(g,y,b){g.tween?g.on("start.brush",function(v){c(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){c(this,arguments).end(v)}).tween("brush",function(){var v=this,x=v.__brush,_=c(v,arguments),A=x.selection,w=t.input(typeof y=="function"?y.apply(this,arguments):y,x.extent),P=nn(A,w);function C(B){x.selection=B===1&&w===null?null:P(B),u.call(v),_.brush()}return A!==null&&w!==null?C:C(1)}):g.each(function(){var v=this,x=arguments,_=v.__brush,A=t.input(typeof y=="function"?y.apply(v,x):y,_.extent),w=c(v,x).beforestart();ar(v),_.selection=A===null?null:A,u.call(v),w.start(b).brush(b).end(b)})},l.clear=function(g,y){l.move(g,null,y)};function u(){var g=V(this),y=mf(this).selection;y?(g.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),g.selectAll(".handle").style("display",null).attr("x",function(b){return b.type[b.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(b){return b.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(b){return b.type==="n"||b.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(b){return b.type==="e"||b.type==="w"?y[1][1]-y[0][1]+a:a})):g.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(g,y,b){var v=g.__brush.emitter;return v&&(!b||!v.clean)?v:new f(g,y,b)}function f(g,y,b){this.that=g,this.args=y,this.state=g.__brush,this.active=0,this.clean=b}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(g,y){return this.starting?(this.starting=!1,this.emit("start",g,y)):this.emit("brush",g),this},brush:function(g,y){return this.emit("brush",g,y),this},end:function(g,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",g,y)),this},emit:function(g,y,b){var v=V(this.that).datum();o.call(g,this.that,new x5(g,{sourceEvent:y,target:l,selection:t.output(this.state.selection),mode:b,dispatch:o}),v)}};function h(g){if(s&&!g.touches||!n.apply(this,arguments))return;var y=this,b=g.target.__data__.type,v=(i&&g.metaKey?b="overlay":b)==="selection"?sy:i&&g.altKey?si:ai,x=t===Is?null:_5[b],_=t===Es?null:w5[b],A=mf(y),w=A.extent,P=A.selection,C=w[0][0],B,$,k=w[0][1],M,T,S=w[1][0],D,F,z=w[1][1],I,N,E=0,O=0,j,it=x&&_&&i&&g.shiftKey,W,Q,X=Array.from(g.touches||[g],lt=>{const Dt=lt.identifier;return lt=ge(lt,y),lt.point0=lt.slice(),lt.identifier=Dt,lt});ar(y);var K=c(y,arguments,!0).beforestart();if(b==="overlay"){P&&(j=!0);const lt=[X[0],X[1]||X[0]];A.selection=P=[[B=t===Is?C:Yt(lt[0][0],lt[1][0]),M=t===Es?k:Yt(lt[0][1],lt[1][1])],[D=t===Is?S:Gt(lt[0][0],lt[1][0]),I=t===Es?z:Gt(lt[0][1],lt[1][1])]],X.length>1&&mt(g)}else B=P[0][0],M=P[0][1],D=P[1][0],I=P[1][1];$=B,T=M,F=D,N=I;var q=V(y).attr("pointer-events","none"),nt=q.selectAll(".overlay").attr("cursor",on[b]);if(g.touches)K.moved=U,K.ended=ft;else{var st=V(g.view).on("mousemove.brush",U,!0).on("mouseup.brush",ft,!0);i&&st.on("keydown.brush",Et,!0).on("keyup.brush",ie,!0),us(g.view)}u.call(y),K.start(g,v.name);function U(lt){for(const Dt of lt.changedTouches||[lt])for(const da of X)da.identifier===Dt.identifier&&(da.cur=ge(Dt,y));if(it&&!W&&!Q&&X.length===1){const Dt=X[0];ly(Dt.cur[0]-Dt[0])>ly(Dt.cur[1]-Dt[1])?Q=!0:W=!0}for(const Dt of X)Dt.cur&&(Dt[0]=Dt.cur[0],Dt[1]=Dt.cur[1]);j=!0,pf(lt),mt(lt)}function mt(lt){const Dt=X[0],da=Dt.point0;var Fn;switch(E=Dt[0]-da[0],O=Dt[1]-da[1],v){case df:case sy:{x&&(E=Gt(C-B,Yt(S-D,E)),$=B+E,F=D+E),_&&(O=Gt(k-M,Yt(z-I,O)),T=M+O,N=I+O);break}case ai:{X[1]?(x&&($=Gt(C,Yt(S,X[0][0])),F=Gt(C,Yt(S,X[1][0])),x=1),_&&(T=Gt(k,Yt(z,X[0][1])),N=Gt(k,Yt(z,X[1][1])),_=1)):(x<0?(E=Gt(C-B,Yt(S-B,E)),$=B+E,F=D):x>0&&(E=Gt(C-D,Yt(S-D,E)),$=B,F=D+E),_<0?(O=Gt(k-M,Yt(z-M,O)),T=M+O,N=I):_>0&&(O=Gt(k-I,Yt(z-I,O)),T=M,N=I+O));break}case si:{x&&($=Gt(C,Yt(S,B-E*x)),F=Gt(C,Yt(S,D+E*x))),_&&(T=Gt(k,Yt(z,M-O*_)),N=Gt(k,Yt(z,I+O*_)));break}}F<$&&(x*=-1,Fn=B,B=D,D=Fn,Fn=$,$=F,F=Fn,b in cy&&nt.attr("cursor",on[b=cy[b]])),N<T&&(_*=-1,Fn=M,M=I,I=Fn,Fn=T,T=N,N=Fn,b in fy&&nt.attr("cursor",on[b=fy[b]])),A.selection&&(P=A.selection),W&&($=P[0][0],F=P[1][0]),Q&&(T=P[0][1],N=P[1][1]),(P[0][0]!==$||P[0][1]!==T||P[1][0]!==F||P[1][1]!==N)&&(A.selection=[[$,T],[F,N]],u.call(y),K.brush(lt,v.name))}function ft(lt){if(v5(lt),lt.touches){if(lt.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else cs(lt.view,j),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),nt.attr("cursor",on.overlay),A.selection&&(P=A.selection),P5(P)&&(A.selection=null,u.call(y)),K.end(lt,v.name)}function Et(lt){switch(lt.keyCode){case 16:{it=x&&_;break}case 18:{v===ai&&(x&&(D=F-E*x,B=$+E*x),_&&(I=N-O*_,M=T+O*_),v=si,mt(lt));break}case 32:{(v===ai||v===si)&&(x<0?D=F-E:x>0&&(B=$-E),_<0?I=N-O:_>0&&(M=T-O),v=df,nt.attr("cursor",on.selection),mt(lt));break}default:return}pf(lt)}function ie(lt){switch(lt.keyCode){case 16:{it&&(W=Q=it=!1,mt(lt));break}case 18:{v===si&&(x<0?D=F:x>0&&(B=$),_<0?I=N:_>0&&(M=T),v=ai,mt(lt));break}case 32:{v===df&&(lt.altKey?(x&&(D=F-E*x,B=$+E*x),_&&(I=N-O*_,M=T+O*_),v=si):(x<0?D=F:x>0&&(B=$),_<0?I=N:_>0&&(M=T),v=ai),nt.attr("cursor",on[b]),mt(lt));break}default:return}pf(lt)}}function p(g){c(this,arguments).moved(g)}function d(g){c(this,arguments).ended(g)}function m(){var g=this.__brush||{selection:null};return g.extent=gf(e.apply(this,arguments)),g.dim=t,g}return l.extent=function(g){return arguments.length?(e=typeof g=="function"?g:hf(gf(g)),l):e},l.filter=function(g){return arguments.length?(n=typeof g=="function"?g:hf(!!g),l):n},l.touchable=function(g){return arguments.length?(r=typeof g=="function"?g:hf(!!g),l):r},l.handleSize=function(g){return arguments.length?(a=+g,l):a},l.keyModifiers=function(g){return arguments.length?(i=!!g,l):i},l.on=function(){var g=o.on.apply(o,arguments);return g===o?l:g},l}var hy=Math.abs,li=Math.cos,ui=Math.sin,py=Math.PI,Bs=py/2,dy=py*2,gy=Math.max,bf=1e-12;function xf(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function k5(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function R5(){return vf(!1,!1)}function E5(){return vf(!1,!0)}function I5(){return vf(!0,!1)}function vf(t,e){var n=0,r=null,i=null,o=null;function a(s){var l=s.length,u=new Array(l),c=xf(0,l),f=new Array(l*l),h=new Array(l),p=0,d;s=Float64Array.from({length:l*l},e?(m,g)=>s[g%l][g/l|0]:(m,g)=>s[g/l|0][g%l]);for(let m=0;m<l;++m){let g=0;for(let y=0;y<l;++y)g+=s[m*l+y]+t*s[y*l+m];p+=u[m]=g}p=gy(0,dy-n*l)/p,d=p?n:dy/l;{let m=0;r&&c.sort((g,y)=>r(u[g],u[y]));for(const g of c){const y=m;if(t){const b=xf(~l+1,l).filter(v=>v<0?s[~v*l+g]:s[g*l+v]);i&&b.sort((v,x)=>i(v<0?-s[~v*l+g]:s[g*l+v],x<0?-s[~x*l+g]:s[g*l+x]));for(const v of b)if(v<0){const x=f[~v*l+g]||(f[~v*l+g]={source:null,target:null});x.target={index:g,startAngle:m,endAngle:m+=s[~v*l+g]*p,value:s[~v*l+g]}}else{const x=f[g*l+v]||(f[g*l+v]={source:null,target:null});x.source={index:g,startAngle:m,endAngle:m+=s[g*l+v]*p,value:s[g*l+v]}}h[g]={index:g,startAngle:y,endAngle:m,value:u[g]}}else{const b=xf(0,l).filter(v=>s[g*l+v]||s[v*l+g]);i&&b.sort((v,x)=>i(s[g*l+v],s[g*l+x]));for(const v of b){let x;if(g<v?(x=f[g*l+v]||(f[g*l+v]={source:null,target:null}),x.source={index:g,startAngle:m,endAngle:m+=s[g*l+v]*p,value:s[g*l+v]}):(x=f[v*l+g]||(f[v*l+g]={source:null,target:null}),x.target={index:g,startAngle:m,endAngle:m+=s[g*l+v]*p,value:s[g*l+v]},g===v&&(x.source=x.target)),x.source&&x.target&&x.source.value<x.target.value){const _=x.source;x.source=x.target,x.target=_}}h[g]={index:g,startAngle:y,endAngle:m,value:u[g]}}m+=d}}return f=Object.values(f),f.groups=h,o?f.sort(o):f}return a.padAngle=function(s){return arguments.length?(n=gy(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=k5(s))._=s,a):o&&o._},a}const $f=Math.PI,_f=2*$f,lr=1e-6,B5=_f-lr;function my(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function N5(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return my;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Ao=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?my:N5(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-e,u=i-n,c=a-e,f=s-n,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>lr)if(!(Math.abs(f*l-u*c)>lr)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,m=l*l+u*u,g=p*p+d*d,y=Math.sqrt(m),b=Math.sqrt(h),v=o*Math.tan(($f-Math.acos((m+h-g)/(2*y*b)))/2),x=v/b,_=v/y;Math.abs(x-1)>lr&&this._append`L${e+x*c},${n+x*f}`,this._append`A${o},${o},0,0,${+(f*p>c*d)},${this._x1=e+_*l},${this._y1=n+_*u}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=e+s,c=n+l,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>lr||Math.abs(this._y1-c)>lr)&&this._append`L${u},${c}`,r&&(h<0&&(h=h%_f+_f),h>B5?this._append`A${r},${r},0,1,${f},${e-s},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=c}`:h>lr&&this._append`A${r},${r},0,${+(h>=$f)},${f},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function wf(){return new Ao}wf.prototype=Ao.prototype;function F5(t=3){return new Ao(+t)}var z5=Array.prototype.slice;function ur(t){return function(){return t}}function O5(t){return t.source}function G5(t){return t.target}function yy(t){return t.radius}function Y5(t){return t.startAngle}function W5(t){return t.endAngle}function X5(){return 0}function V5(){return 10}function by(t){var e=O5,n=G5,r=yy,i=yy,o=Y5,a=W5,s=X5,l=null;function u(){var c,f=e.apply(this,arguments),h=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=z5.call(arguments),m=+r.apply(this,(d[0]=f,d)),g=o.apply(this,d)-Bs,y=a.apply(this,d)-Bs,b=+i.apply(this,(d[0]=h,d)),v=o.apply(this,d)-Bs,x=a.apply(this,d)-Bs;if(l||(l=c=wf()),p>bf&&(hy(y-g)>p*2+bf?y>g?(g+=p,y-=p):(g-=p,y+=p):g=y=(g+y)/2,hy(x-v)>p*2+bf?x>v?(v+=p,x-=p):(v-=p,x+=p):v=x=(v+x)/2),l.moveTo(m*li(g),m*ui(g)),l.arc(0,0,m,g,y),g!==v||y!==x)if(t){var _=+t.apply(this,arguments),A=b-_,w=(v+x)/2;l.quadraticCurveTo(0,0,A*li(v),A*ui(v)),l.lineTo(b*li(w),b*ui(w)),l.lineTo(A*li(x),A*ui(x))}else l.quadraticCurveTo(0,0,b*li(v),b*ui(v)),l.arc(0,0,b,v,x);if(l.quadraticCurveTo(0,0,m*li(g),m*ui(g)),l.closePath(),c)return l=null,c+""||null}return t&&(u.headRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ur(+c),u):t}),u.radius=function(c){return arguments.length?(r=i=typeof c=="function"?c:ur(+c),u):r},u.sourceRadius=function(c){return arguments.length?(r=typeof c=="function"?c:ur(+c),u):r},u.targetRadius=function(c){return arguments.length?(i=typeof c=="function"?c:ur(+c),u):i},u.startAngle=function(c){return arguments.length?(o=typeof c=="function"?c:ur(+c),u):o},u.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ur(+c),u):a},u.padAngle=function(c){return arguments.length?(s=typeof c=="function"?c:ur(+c),u):s},u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.context=function(c){return arguments.length?(l=c??null,u):l},u}function U5(){return by()}function H5(){return by(V5)}var j5=Array.prototype,xy=j5.slice;function q5(t,e){return t-e}function Z5(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const Dn=t=>()=>t;function K5(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=Q5(t,e[n]))return i;return 0}function Q5(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var l=t[o],u=l[0],c=l[1],f=t[s],h=f[0],p=f[1];if(J5(l,f,e))return 0;c>r!=p>r&&n<(h-u)*(r-c)/(p-c)+u&&(i=-i)}return i}function J5(t,e,n){var r;return t6(t,e,n)&&e6(t[r=+(t[0]===e[0])],n[r],e[r])}function t6(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function e6(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function n6(){}var an=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Sf(){var t=1,e=1,n=_c,r=l;function i(u){var c=n(u);if(Array.isArray(c))c=c.slice().sort(q5);else{const f=io(u,r6);for(c=Zn(...$c(f[0],f[1],c),c);c[c.length-1]>=f[1];)c.pop();for(;c[1]<f[0];)c.shift()}return c.map(f=>o(u,f))}function o(u,c){const f=c==null?NaN:+c;if(isNaN(f))throw new Error(`invalid value: ${c}`);var h=[],p=[];return a(u,f,function(d){r(d,u,f),Z5(d)>0?h.push([d]):p.push(d)}),p.forEach(function(d){for(var m=0,g=h.length,y;m<g;++m)if(K5((y=h[m])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:c,coordinates:h}}function a(u,c,f){var h=new Array,p=new Array,d,m,g,y,b,v;for(d=m=-1,y=cr(u[0],c),an[y<<1].forEach(x);++d<t-1;)g=y,y=cr(u[d+1],c),an[g|y<<1].forEach(x);for(an[y<<0].forEach(x);++m<e-1;){for(d=-1,y=cr(u[m*t+t],c),b=cr(u[m*t],c),an[y<<1|b<<2].forEach(x);++d<t-1;)g=y,y=cr(u[m*t+t+d+1],c),v=b,b=cr(u[m*t+d+1],c),an[g|y<<1|b<<2|v<<3].forEach(x);an[y|b<<3].forEach(x)}for(d=-1,b=u[m*t]>=c,an[b<<2].forEach(x);++d<t-1;)v=b,b=cr(u[m*t+d+1],c),an[b<<2|v<<3].forEach(x);an[b<<3].forEach(x);function x(_){var A=[_[0][0]+d,_[0][1]+m],w=[_[1][0]+d,_[1][1]+m],P=s(A),C=s(w),B,$;(B=p[P])?($=h[C])?(delete p[B.end],delete h[$.start],B===$?(B.ring.push(w),f(B.ring)):h[B.start]=p[$.end]={start:B.start,end:$.end,ring:B.ring.concat($.ring)}):(delete p[B.end],B.ring.push(w),p[B.end=C]=B):(B=h[C])?($=p[P])?(delete h[B.start],delete p[$.end],B===$?(B.ring.push(w),f(B.ring)):h[$.start]=p[B.end]={start:$.start,end:B.end,ring:$.ring.concat(B.ring)}):(delete h[B.start],B.ring.unshift(A),h[B.start=P]=B):h[P]=p[C]={start:P,end:C,ring:[A,w]}}}function s(u){return u[0]*2+u[1]*(t+1)*4}function l(u,c,f){u.forEach(function(h){var p=h[0],d=h[1],m=p|0,g=d|0,y=Tf(c[g*t+m]);p>0&&p<t&&m===p&&(h[0]=vy(p,Tf(c[g*t+m-1]),y,f)),d>0&&d<e&&g===d&&(h[1]=vy(d,Tf(c[(g-1)*t+m]),y,f))})}return i.contour=o,i.size=function(u){if(!arguments.length)return[t,e];var c=Math.floor(u[0]),f=Math.floor(u[1]);if(!(c>=0&&f>=0))throw new Error("invalid size");return t=c,e=f,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?Dn(xy.call(u)):Dn(u),i):n},i.smooth=function(u){return arguments.length?(r=u?l:n6,i):r===l},i}function r6(t){return isFinite(t)?t:NaN}function cr(t,e){return t==null?!1:+t>=e}function Tf(t){return t==null||isNaN(t=+t)?-1/0:t}function vy(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function i6(t){return t[0]}function o6(t){return t[1]}function a6(){return 1}function s6(){var t=i6,e=o6,n=a6,r=960,i=500,o=20,a=2,s=o*3,l=r+s*2>>a,u=i+s*2>>a,c=Dn(20);function f(b){var v=new Float32Array(l*u),x=Math.pow(2,-a),_=-1;for(const M of b){var A=(t(M,++_,b)+s)*x,w=(e(M,_,b)+s)*x,P=+n(M,_,b);if(P&&A>=0&&A<l&&w>=0&&w<u){var C=Math.floor(A),B=Math.floor(w),$=A-C-.5,k=w-B-.5;v[C+B*l]+=(1-$)*(1-k)*P,v[C+1+B*l]+=$*(1-k)*P,v[C+1+(B+1)*l]+=$*k*P,v[C+(B+1)*l]+=(1-$)*k*P}}return b0({data:v,width:l,height:u},o*x),v}function h(b){var v=f(b),x=c(v),_=Math.pow(2,2*a);return Array.isArray(x)||(x=Zn(Number.MIN_VALUE,ao(v)/_,x)),Sf().size([l,u]).thresholds(x.map(A=>A*_))(v).map((A,w)=>(A.value=+x[w],p(A)))}h.contours=function(b){var v=f(b),x=Sf().size([l,u]),_=Math.pow(2,2*a),A=w=>{w=+w;var P=p(x.contour(v,w*_));return P.value=w,P};return Object.defineProperty(A,"max",{get:()=>ao(v)/_}),A};function p(b){return b.coordinates.forEach(d),b}function d(b){b.forEach(m)}function m(b){b.forEach(g)}function g(b){b[0]=b[0]*Math.pow(2,a)-s,b[1]=b[1]*Math.pow(2,a)-s}function y(){return s=o*3,l=r+s*2>>a,u=i+s*2>>a,h}return h.x=function(b){return arguments.length?(t=typeof b=="function"?b:Dn(+b),h):t},h.y=function(b){return arguments.length?(e=typeof b=="function"?b:Dn(+b),h):e},h.weight=function(b){return arguments.length?(n=typeof b=="function"?b:Dn(+b),h):n},h.size=function(b){if(!arguments.length)return[r,i];var v=+b[0],x=+b[1];if(!(v>=0&&x>=0))throw new Error("invalid size");return r=v,i=x,y()},h.cellSize=function(b){if(!arguments.length)return 1<<a;if(!((b=+b)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(b)/Math.LN2),y()},h.thresholds=function(b){return arguments.length?(c=typeof b=="function"?b:Array.isArray(b)?Dn(xy.call(b)):Dn(b),h):c},h.bandwidth=function(b){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((b=+b)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*b*b+1)-1)/2,y()},h}const sn=11102230246251565e-32,Wt=134217729,l6=(3+8*sn)*sn;function Af(t,e,n,r,i){let o,a,s,l,u=e[0],c=r[0],f=0,h=0;c>u==c>-u?(o=u,u=e[++f]):(o=c,c=r[++h]);let p=0;if(f<t&&h<n)for(c>u==c>-u?(a=u+o,s=o-(a-u),u=e[++f]):(a=c+o,s=o-(a-c),c=r[++h]),o=a,s!==0&&(i[p++]=s);f<t&&h<n;)c>u==c>-u?(a=o+u,l=a-o,s=o-(a-l)+(u-l),u=e[++f]):(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=r[++h]),o=a,s!==0&&(i[p++]=s);for(;f<t;)a=o+u,l=a-o,s=o-(a-l)+(u-l),u=e[++f],o=a,s!==0&&(i[p++]=s);for(;h<n;)a=o+c,l=a-o,s=o-(a-l)+(c-l),c=r[++h],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function u6(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Po(t){return new Float64Array(t)}const c6=(3+16*sn)*sn,f6=(2+12*sn)*sn,h6=(9+64*sn)*sn*sn,ci=Po(4),$y=Po(8),_y=Po(12),wy=Po(16),jt=Po(4);function p6(t,e,n,r,i,o,a){let s,l,u,c,f,h,p,d,m,g,y,b,v,x,_,A,w,P;const C=t-i,B=n-i,$=e-o,k=r-o;x=C*k,h=Wt*C,p=h-(h-C),d=C-p,h=Wt*k,m=h-(h-k),g=k-m,_=d*g-(x-p*m-d*m-p*g),A=$*B,h=Wt*$,p=h-(h-$),d=$-p,h=Wt*B,m=h-(h-B),g=B-m,w=d*g-(A-p*m-d*m-p*g),y=_-w,f=_-y,ci[0]=_-(y+f)+(f-w),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-A,f=v-y,ci[1]=v-(y+f)+(f-A),P=b+y,f=P-b,ci[2]=b-(P-f)+(y-f),ci[3]=P;let M=u6(4,ci),T=f6*a;if(M>=T||-M>=T||(f=t-C,s=t-(C+f)+(f-i),f=n-B,u=n-(B+f)+(f-i),f=e-$,l=e-($+f)+(f-o),f=r-k,c=r-(k+f)+(f-o),s===0&&l===0&&u===0&&c===0)||(T=h6*a+l6*Math.abs(M),M+=C*c+k*s-($*u+B*l),M>=T||-M>=T))return M;x=s*k,h=Wt*s,p=h-(h-s),d=s-p,h=Wt*k,m=h-(h-k),g=k-m,_=d*g-(x-p*m-d*m-p*g),A=l*B,h=Wt*l,p=h-(h-l),d=l-p,h=Wt*B,m=h-(h-B),g=B-m,w=d*g-(A-p*m-d*m-p*g),y=_-w,f=_-y,jt[0]=_-(y+f)+(f-w),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-A,f=v-y,jt[1]=v-(y+f)+(f-A),P=b+y,f=P-b,jt[2]=b-(P-f)+(y-f),jt[3]=P;const S=Af(4,ci,4,jt,$y);x=C*c,h=Wt*C,p=h-(h-C),d=C-p,h=Wt*c,m=h-(h-c),g=c-m,_=d*g-(x-p*m-d*m-p*g),A=$*u,h=Wt*$,p=h-(h-$),d=$-p,h=Wt*u,m=h-(h-u),g=u-m,w=d*g-(A-p*m-d*m-p*g),y=_-w,f=_-y,jt[0]=_-(y+f)+(f-w),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-A,f=v-y,jt[1]=v-(y+f)+(f-A),P=b+y,f=P-b,jt[2]=b-(P-f)+(y-f),jt[3]=P;const D=Af(S,$y,4,jt,_y);x=s*c,h=Wt*s,p=h-(h-s),d=s-p,h=Wt*c,m=h-(h-c),g=c-m,_=d*g-(x-p*m-d*m-p*g),A=l*u,h=Wt*l,p=h-(h-l),d=l-p,h=Wt*u,m=h-(h-u),g=u-m,w=d*g-(A-p*m-d*m-p*g),y=_-w,f=_-y,jt[0]=_-(y+f)+(f-w),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-A,f=v-y,jt[1]=v-(y+f)+(f-A),P=b+y,f=P-b,jt[2]=b-(P-f)+(y-f),jt[3]=P;const F=Af(D,_y,4,jt,wy);return wy[F-1]}function Ns(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),l=a-s,u=Math.abs(a+s);return Math.abs(l)>=c6*u?l:-p6(t,e,n,r,i,o,u)}const Sy=Math.pow(2,-52),Fs=new Uint32Array(512);class zs{static from(e,n=b6,r=x6){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new zs(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,l=1/0,u=-1/0,c=-1/0;for(let C=0;C<a;C++){const B=e[2*C],$=e[2*C+1];B<s&&(s=B),$<l&&(l=$),B>u&&(u=B),$>c&&(c=$),this._ids[C]=C}const f=(s+u)/2,h=(l+c)/2;let p,d,m;for(let C=0,B=1/0;C<a;C++){const $=Pf(f,h,e[2*C],e[2*C+1]);$<B&&(p=C,B=$)}const g=e[2*p],y=e[2*p+1];for(let C=0,B=1/0;C<a;C++){if(C===p)continue;const $=Pf(g,y,e[2*C],e[2*C+1]);$<B&&$>0&&(d=C,B=$)}let b=e[2*d],v=e[2*d+1],x=1/0;for(let C=0;C<a;C++){if(C===p||C===d)continue;const B=m6(g,y,b,v,e[2*C],e[2*C+1]);B<x&&(m=C,x=B)}let _=e[2*m],A=e[2*m+1];if(x===1/0){for(let $=0;$<a;$++)this._dists[$]=e[2*$]-e[0]||e[2*$+1]-e[1];fi(this._ids,this._dists,0,a-1);const C=new Uint32Array(a);let B=0;for(let $=0,k=-1/0;$<a;$++){const M=this._ids[$],T=this._dists[M];T>k&&(C[B++]=M,k=T)}this.hull=C.subarray(0,B),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Ns(g,y,b,v,_,A)<0){const C=d,B=b,$=v;d=m,b=_,v=A,m=C,_=B,A=$}const w=y6(g,y,b,v,_,A);this._cx=w.x,this._cy=w.y;for(let C=0;C<a;C++)this._dists[C]=Pf(e[2*C],e[2*C+1],w.x,w.y);fi(this._ids,this._dists,0,a-1),this._hullStart=p;let P=3;r[p]=n[m]=d,r[d]=n[p]=m,r[m]=n[d]=p,i[p]=0,i[d]=1,i[m]=2,o.fill(-1),o[this._hashKey(g,y)]=p,o[this._hashKey(b,v)]=d,o[this._hashKey(_,A)]=m,this.trianglesLen=0,this._addTriangle(p,d,m,-1,-1,-1);for(let C=0,B,$;C<this._ids.length;C++){const k=this._ids[C],M=e[2*k],T=e[2*k+1];if(C>0&&Math.abs(M-B)<=Sy&&Math.abs(T-$)<=Sy||(B=M,$=T,k===p||k===d||k===m))continue;let S=0;for(let N=0,E=this._hashKey(M,T);N<this._hashSize&&(S=o[(E+N)%this._hashSize],!(S!==-1&&S!==r[S]));N++);S=n[S];let D=S,F;for(;F=r[D],Ns(M,T,e[2*D],e[2*D+1],e[2*F],e[2*F+1])>=0;)if(D=F,D===S){D=-1;break}if(D===-1)continue;let z=this._addTriangle(D,k,r[D],-1,-1,i[D]);i[k]=this._legalize(z+2),i[D]=z,P++;let I=r[D];for(;F=r[I],Ns(M,T,e[2*I],e[2*I+1],e[2*F],e[2*F+1])<0;)z=this._addTriangle(I,k,F,i[k],-1,i[I]),i[k]=this._legalize(z+2),r[I]=I,P--,I=F;if(D===S)for(;F=n[D],Ns(M,T,e[2*F],e[2*F+1],e[2*D],e[2*D+1])<0;)z=this._addTriangle(F,k,D,-1,i[D],i[F]),this._legalize(z+2),i[F]=z,r[D]=D,P--,D=F;this._hullStart=n[k]=D,r[D]=n[I]=k,r[k]=I,o[this._hashKey(M,T)]=k,o[this._hashKey(e[2*D],e[2*D+1])]=D}this.hull=new Uint32Array(P);for(let C=0,B=this._hullStart;C<P;C++)this.hull[C]=B,B=r[B];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(d6(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],l=e-e%3;if(a=l+(e+2)%3,s===-1){if(o===0)break;e=Fs[--o];continue}const u=s-s%3,c=l+(e+1)%3,f=u+(s+2)%3,h=n[a],p=n[e],d=n[c],m=n[f];if(g6(i[2*h],i[2*h+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*m],i[2*m+1])){n[e]=m,n[s]=h;const y=r[f];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===f){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,f);const b=u+(s+1)%3;o<Fs.length&&(Fs[o++]=b)}else{if(o===0)break;e=Fs[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function d6(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Pf(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function g6(t,e,n,r,i,o,a,s){const l=t-a,u=e-s,c=n-a,f=r-s,h=i-a,p=o-s,d=l*l+u*u,m=c*c+f*f,g=h*h+p*p;return l*(f*g-m*p)-u*(c*g-m*h)+d*(c*p-f*h)<0}function m6(t,e,n,r,i,o){const a=n-t,s=r-e,l=i-t,u=o-e,c=a*a+s*s,f=l*l+u*u,h=.5/(a*u-s*l),p=(u*c-s*f)*h,d=(a*f-l*c)*h;return p*p+d*d}function y6(t,e,n,r,i,o){const a=n-t,s=r-e,l=i-t,u=o-e,c=a*a+s*s,f=l*l+u*u,h=.5/(a*u-s*l),p=t+(u*c-s*f)*h,d=e+(a*f-l*c)*h;return{x:p,y:d}}function fi(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Do(t,i,o),e[t[n]]>e[t[r]]&&Do(t,n,r),e[t[o]]>e[t[r]]&&Do(t,o,r),e[t[n]]>e[t[o]]&&Do(t,n,o);const s=t[o],l=e[s];for(;;){do o++;while(e[t[o]]<l);do a--;while(e[t[a]]>l);if(a<o)break;Do(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(fi(t,e,o,r),fi(t,e,n,a-1)):(fi(t,e,n,a-1),fi(t,e,o,r))}}function Do(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b6(t){return t[0]}function x6(t){return t[1]}const Ty=1e-6;class fr{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Ty||Math.abs(this._y1-o)>Ty)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Df{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class Ay{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let m=0,g=0,y=r.length,b,v;m<y;m+=3,g+=2){const x=r[m]*2,_=r[m+1]*2,A=r[m+2]*2,w=e[x],P=e[x+1],C=e[_],B=e[_+1],$=e[A],k=e[A+1],M=C-w,T=B-P,S=$-w,D=k-P,F=(M*D-T*S)*2;if(Math.abs(F)<1e-9){if(o===void 0){o=a=0;for(const I of n)o+=e[I*2],a+=e[I*2+1];o/=n.length,a/=n.length}const z=1e9*Math.sign((o-w)*D-(a-P)*S);b=(w+$)/2-z*D,v=(P+k)/2+z*S}else{const z=1/F,I=M*M+T*T,N=S*S+D*D;b=w+(D*I-T*N)*z,v=P+(M*N-S*I)*z}s[g]=b,s[g+1]=v}let l=n[n.length-1],u,c=l*4,f,h=e[2*l],p,d=e[2*l+1];i.fill(0);for(let m=0;m<n.length;++m)l=n[m],u=c,f=h,p=d,c=l*4,h=e[2*l],d=e[2*l+1],i[u+2]=i[c]=p-d,i[u+3]=i[c+1]=h-f}render(e){const n=e==null?e=new fr:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let c=0,f=r.length;c<f;++c){const h=r[c];if(h<c)continue;const p=Math.floor(c/3)*2,d=Math.floor(h/3)*2,m=a[p],g=a[p+1],y=a[d],b=a[d+1];this._renderSegment(m,g,y,b,e)}let l,u=o[o.length-1];for(let c=0;c<o.length;++c){l=u,u=o[c];const f=Math.floor(i[u]/3)*2,h=a[f],p=a[f+1],d=l*4,m=this._project(h,p,s[d+2],s[d+3]);m&&this._renderSegment(h,p,m[0],m[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new fr:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new fr:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Df;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),l=this._regioncode(r,i);s===0&&l===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,l))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,l=i.length;s<l;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+l-2)%l]&&n[(o+3)%a]===i[(s+l-1)%l]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let l=a;do{const u=Math.floor(l/3);if(s.push(n[u*2],n[u*2+1]),l=l%3===2?l-2:l+1,o[l]!==e)break;l=i[l]}while(l!==a&&l!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],l=n[r-1],u,c=this._regioncode(s,l),f,h=0;for(let p=0;p<r;p+=2)if(o=s,a=l,s=n[p],l=n[p+1],u=c,c=this._regioncode(s,l),u===0&&c===0)f=h,h=0,i?i.push(s,l):i=[s,l];else{let d,m,g,y,b;if(u===0){if((d=this._clipSegment(o,a,s,l,u,c))===null)continue;[m,g,y,b]=d}else{if((d=this._clipSegment(s,l,o,a,c,u))===null)continue;[y,b,m,g]=d,f=h,h=this._edgecode(m,g),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(m,g):i=[m,g]}f=h,h=this._edgecode(y,b),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(y,b):i=[y,b]}if(i)f=h,h=this._edgecode(i[0],i[1]),f&&h&&this._edge(e,f,h,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let l,u,c=o||a;c&8?(l=e+(r-e)*(this.ymax-n)/(i-n),u=this.ymax):c&4?(l=e+(r-e)*(this.ymin-n)/(i-n),u=this.ymin):c&2?(u=n+(i-n)*(this.xmax-e)/(r-e),l=this.xmax):(u=n+(i-n)*(this.xmin-e)/(r-e),l=this.xmin),o?(e=l,n=u,o=this._regioncode(e,n)):(r=l,i=u,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),l;if((l=this._project(s[0],s[1],r,i))&&s.unshift(l[0],l[1]),(l=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(l[0],l[1]),s=this._clipFinite(e,s))for(let u=0,c=s.length,f,h=this._edgecode(s[c-2],s[c-1]);u<c;u+=2)f=h,h=this._edgecode(s[u],s[u+1]),f&&h&&(u=this._edge(e,f,h,s,u),c=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,l;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(l=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(l=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,l=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,l=n+(o=a)*i)}return[s,l]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const v6=2*Math.PI,hi=Math.pow;function $6(t){return t[0]}function _6(t){return t[1]}function w6(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function S6(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Cf{static from(e,n=$6,r=_6,i){return new Cf("length"in e?T6(e,n,r,i):Float64Array.from(A6(e,n,r,i)))}constructor(e){this._delaunator=new zs(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&w6(e)){this.collinear=Int32Array.from({length:n.length/2},(h,p)=>p).sort((h,p)=>n[2*h]-n[2*p]||n[2*h+1]-n[2*p+1]);const l=this.collinear[0],u=this.collinear[this.collinear.length-1],c=[n[2*l],n[2*l+1],n[2*u],n[2*u+1]],f=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let h=0,p=n.length/2;h<p;++h){const d=S6(n[2*h],n[2*h+1],f);n[2*h]=d[0],n[2*h+1]=d[1]}this._delaunator=new zs(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let l=0,u=r.length;l<u;++l){const c=o[l%3===2?l-2:l+1];(r[l]===-1||a[c]===-1)&&(a[c]=l)}for(let l=0,u=i.length;l<u;++l)s[i[l]]=l;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new Ay(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const f=s.indexOf(e);f>0&&(yield s[f-1]),f<s.length-1&&(yield s[f+1]);return}const l=n[e];if(l===-1)return;let u=l,c=-1;do{if(yield c=a[u],u=u%3===2?u-2:u+1,a[u]!==e)return;if(u=o[u],u===-1){const f=r[(i[e]+1)%r.length];f!==c&&(yield f);return}}while(u!==l)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:l,points:u}=this;if(i[e]===-1||!u.length)return(e+1)%(u.length>>1);let c=e,f=hi(n-u[e*2],2)+hi(r-u[e*2+1],2);const h=i[e];let p=h;do{let d=l[p];const m=hi(n-u[d*2],2)+hi(r-u[d*2+1],2);if(m<f&&(f=m,c=d),p=p%3===2?p-2:p+1,l[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&hi(n-u[p*2],2)+hi(r-u[p*2+1],2)<f)return p;break}}while(p!==h);return c}render(e){const n=e==null?e=new fr:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const l=i[a];if(l<a)continue;const u=o[a]*2,c=o[l]*2;e.moveTo(r[u],r[u+1]),e.lineTo(r[c],r[c+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new fr:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],l=i[o+1];e.moveTo(s+n,l),e.arc(s,l,n,0,v6)}return r&&r.value()}renderHull(e){const n=e==null?e=new fr:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const l=2*r[s];e.lineTo(i[l],i[l+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Df;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new fr:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,l=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[l],i[l+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Df;return this.renderTriangle(e,n),n.value()}}function T6(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*A6(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var Py={},Mf={},Lf=34,Co=10,kf=13;function Dy(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function P6(t,e){var n=Dy(t);return function(r,i){return e(n(r),i,t)}}function Cy(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function le(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function D6(t){return t<0?"-"+le(-t,6):t>9999?"+"+le(t,6):le(t,4)}function C6(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":D6(t.getUTCFullYear())+"-"+le(t.getUTCMonth()+1,2)+"-"+le(t.getUTCDate(),2)+(i?"T"+le(e,2)+":"+le(n,2)+":"+le(r,2)+"."+le(i,3)+"Z":r?"T"+le(e,2)+":"+le(n,2)+":"+le(r,2)+"Z":n||e?"T"+le(e,2)+":"+le(n,2)+"Z":"")}function Os(t){var e=new RegExp('["'+t+`
43
+ \r]`),n=t.charCodeAt(0);function r(f,h){var p,d,m=i(f,function(g,y){if(p)return p(g,y-1);d=g,p=h?P6(g,h):Dy(g)});return m.columns=d||[],m}function i(f,h){var p=[],d=f.length,m=0,g=0,y,b=d<=0,v=!1;f.charCodeAt(d-1)===Co&&--d,f.charCodeAt(d-1)===kf&&--d;function x(){if(b)return Mf;if(v)return v=!1,Py;var A,w=m,P;if(f.charCodeAt(w)===Lf){for(;m++<d&&f.charCodeAt(m)!==Lf||f.charCodeAt(++m)===Lf;);return(A=m)>=d?b=!0:(P=f.charCodeAt(m++))===Co?v=!0:P===kf&&(v=!0,f.charCodeAt(m)===Co&&++m),f.slice(w+1,A-1).replace(/""/g,'"')}for(;m<d;){if((P=f.charCodeAt(A=m++))===Co)v=!0;else if(P===kf)v=!0,f.charCodeAt(m)===Co&&++m;else if(P!==n)continue;return f.slice(w,A)}return b=!0,f.slice(w,d)}for(;(y=x())!==Mf;){for(var _=[];y!==Py&&y!==Mf;)_.push(y),y=x();h&&(_=h(_,g++))==null||p.push(_)}return p}function o(f,h){return f.map(function(p){return h.map(function(d){return c(p[d])}).join(t)})}function a(f,h){return h==null&&(h=Cy(f)),[h.map(c).join(t)].concat(o(f,h)).join(`
44
+ `)}function s(f,h){return h==null&&(h=Cy(f)),o(f,h).join(`
45
+ `)}function l(f){return f.map(u).join(`
46
+ `)}function u(f){return f.map(c).join(t)}function c(f){return f==null?"":f instanceof Date?C6(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:u,formatValue:c}}var hr=Os(","),My=hr.parse,M6=hr.parseRows,L6=hr.format,k6=hr.formatBody,R6=hr.formatRows,E6=hr.formatRow,I6=hr.formatValue,pr=Os(" "),Ly=pr.parse,B6=pr.parseRows,N6=pr.format,F6=pr.formatBody,z6=pr.formatRows,O6=pr.formatRow,G6=pr.formatValue;function Y6(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))W6&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const W6=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function X6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function V6(t,e){return fetch(t,e).then(X6)}function U6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function H6(t,e){return fetch(t,e).then(U6)}function j6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Gs(t,e){return fetch(t,e).then(j6)}function ky(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Gs(e,n).then(function(i){return t(i,r)})}}function q6(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Os(t);return Gs(e,n).then(function(o){return i.parse(o,r)})}var Z6=ky(My),K6=ky(Ly);function Q6(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function J6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function t8(t,e){return fetch(t,e).then(J6)}function Rf(t){return(e,n)=>Gs(e,n).then(r=>new DOMParser().parseFromString(r,t))}const e8=Rf("application/xml");var n8=Rf("text/html"),r8=Rf("image/svg+xml");function Ef(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,l=0,u=0;for(o=0;o<a;++o)s=n[o],l+=s.x,u+=s.y;for(l=(l/a-t)*r,u=(u/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=l,s.y-=u}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function i8(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Ry(this.cover(e,n),e,n,t)}function Ry(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,l=t._y0,u=t._x1,c=t._y1,f,h,p,d,m,g,y,b;if(!o)return t._root=a,t;for(;o.length;)if((m=e>=(f=(s+u)/2))?s=f:u=f,(g=n>=(h=(l+c)/2))?l=h:c=h,i=o,!(o=o[y=g<<1|m]))return i[y]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(m=e>=(f=(s+u)/2))?s=f:u=f,(g=n>=(h=(l+c)/2))?l=h:c=h;while((y=g<<1|m)===(b=(d>=h)<<1|p>=f));return i[b]=o,i[y]=a,t}function o8(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),l=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<l&&(l=i),i>c&&(c=i),o<u&&(u=o),o>f&&(f=o));if(l>c||u>f)return this;for(this.cover(l,u).cover(c,f),n=0;n<r;++n)Ry(this,a[n],s[n],t[n]);return this}function a8(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,l,u;n>t||t>=i||r>e||e>=o;)switch(u=(e<r)<<1|t<n,l=new Array(4),l[u]=s,s=l,a*=2,u){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function s8(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function l8(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function u8(t,e,n){var r,i=this._x0,o=this._y0,a,s,l,u,c=this._x1,f=this._y1,h=[],p=this._root,d,m;for(p&&h.push(new qt(p,i,o,c,f)),n==null?n=1/0:(i=t-n,o=e-n,c=t+n,f=e+n,n*=n);d=h.pop();)if(!(!(p=d.node)||(a=d.x0)>c||(s=d.y0)>f||(l=d.x1)<i||(u=d.y1)<o))if(p.length){var g=(a+l)/2,y=(s+u)/2;h.push(new qt(p[3],g,y,l,u),new qt(p[2],a,y,g,u),new qt(p[1],g,s,l,y),new qt(p[0],a,s,g,y)),(m=(e>=y)<<1|t>=g)&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-m],h[h.length-1-m]=d)}else{var b=t-+this._x.call(null,p.data),v=e-+this._y.call(null,p.data),x=b*b+v*v;if(x<n){var _=Math.sqrt(n=x);i=t-_,o=e-_,c=t+_,f=e+_,r=p.data}}return r}function c8(t){if(isNaN(c=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,l=this._x1,u=this._y1,c,f,h,p,d,m,g,y;if(!n)return this;if(n.length)for(;;){if((d=c>=(h=(a+l)/2))?a=h:l=h,(m=f>=(p=(s+u)/2))?s=p:u=p,e=n,!(n=n[g=m<<1|d]))return this;if(!n.length)break;(e[g+1&3]||e[g+2&3]||e[g+3&3])&&(r=e,y=g)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[g]=o:delete e[g],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function f8(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function h8(){return this._root}function p8(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function d8(t){var e=[],n,r=this._root,i,o,a,s,l;for(r&&e.push(new qt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,l=n.y1)&&r.length){var u=(o+s)/2,c=(a+l)/2;(i=r[3])&&e.push(new qt(i,u,c,s,l)),(i=r[2])&&e.push(new qt(i,o,c,u,l)),(i=r[1])&&e.push(new qt(i,u,a,s,c)),(i=r[0])&&e.push(new qt(i,o,a,u,c))}return this}function g8(t){var e=[],n=[],r;for(this._root&&e.push(new qt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,l=r.x1,u=r.y1,c=(a+l)/2,f=(s+u)/2;(o=i[0])&&e.push(new qt(o,a,s,c,f)),(o=i[1])&&e.push(new qt(o,c,s,l,f)),(o=i[2])&&e.push(new qt(o,a,f,c,u)),(o=i[3])&&e.push(new qt(o,c,f,l,u))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function m8(t){return t[0]}function y8(t){return arguments.length?(this._x=t,this):this._x}function b8(t){return t[1]}function x8(t){return arguments.length?(this._y=t,this):this._y}function Ys(t,e,n){var r=new If(e??m8,n??b8,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function If(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Ey(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Zt=Ys.prototype=If.prototype;Zt.copy=function(){var t=new If(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=Ey(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=Ey(r));return t},Zt.add=i8,Zt.addAll=o8,Zt.cover=a8,Zt.data=s8,Zt.extent=l8,Zt.find=u8,Zt.remove=c8,Zt.removeAll=f8,Zt.root=h8,Zt.size=p8,Zt.visit=d8,Zt.visitAfter=g8,Zt.x=y8,Zt.y=x8;function Rt(t){return function(){return t}}function Cn(t){return(t()-.5)*1e-6}function v8(t){return t.x+t.vx}function $8(t){return t.y+t.vy}function Ws(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Rt(t==null?1:+t));function a(){for(var u,c=e.length,f,h,p,d,m,g,y=0;y<o;++y)for(f=Ys(e,v8,$8).visitAfter(s),u=0;u<c;++u)h=e[u],m=n[h.index],g=m*m,p=h.x+h.vx,d=h.y+h.vy,f.visit(b);function b(v,x,_,A,w){var P=v.data,C=v.r,B=m+C;if(P){if(P.index>h.index){var $=p-P.x-P.vx,k=d-P.y-P.vy,M=$*$+k*k;M<B*B&&($===0&&($=Cn(r),M+=$*$),k===0&&(k=Cn(r),M+=k*k),M=(B-(M=Math.sqrt(M)))/M*i,h.vx+=($*=M)*(B=(C*=C)/(g+C)),h.vy+=(k*=M)*B,P.vx-=$*(B=1-B),P.vy-=k*B)}return}return x>p+B||A<p-B||_>d+B||w<d-B}}function s(u){if(u.data)return u.r=n[u.data.index];for(var c=u.r=0;c<4;++c)u[c]&&u[c].r>u.r&&(u.r=u[c].r)}function l(){if(e){var u,c=e.length,f;for(n=new Array(c),u=0;u<c;++u)f=e[u],n[f.index]=+t(f,u,e)}}return a.initialize=function(u,c){e=u,r=c,l()},a.iterations=function(u){return arguments.length?(o=+u,a):o},a.strength=function(u){return arguments.length?(i=+u,a):i},a.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Rt(+u),l(),a):t},a}function _8(t){return t.index}function Iy(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Bf(t){var e=_8,n=f,r,i=Rt(30),o,a,s,l,u,c=1;t==null&&(t=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function h(g){for(var y=0,b=t.length;y<c;++y)for(var v=0,x,_,A,w,P,C,B;v<b;++v)x=t[v],_=x.source,A=x.target,w=A.x+A.vx-_.x-_.vx||Cn(u),P=A.y+A.vy-_.y-_.vy||Cn(u),C=Math.sqrt(w*w+P*P),C=(C-o[v])/C*g*r[v],w*=C,P*=C,A.vx-=w*(B=l[v]),A.vy-=P*B,_.vx+=w*(B=1-B),_.vy+=P*B}function p(){if(a){var g,y=a.length,b=t.length,v=new Map(a.map((_,A)=>[e(_,A,a),_])),x;for(g=0,s=new Array(y);g<b;++g)x=t[g],x.index=g,typeof x.source!="object"&&(x.source=Iy(v,x.source)),typeof x.target!="object"&&(x.target=Iy(v,x.target)),s[x.source.index]=(s[x.source.index]||0)+1,s[x.target.index]=(s[x.target.index]||0)+1;for(g=0,l=new Array(b);g<b;++g)x=t[g],l[g]=s[x.source.index]/(s[x.source.index]+s[x.target.index]);r=new Array(b),d(),o=new Array(b),m()}}function d(){if(a)for(var g=0,y=t.length;g<y;++g)r[g]=+n(t[g],g,t)}function m(){if(a)for(var g=0,y=t.length;g<y;++g)o[g]=+i(t[g],g,t)}return h.initialize=function(g,y){a=g,u=y,p()},h.links=function(g){return arguments.length?(t=g,p(),h):t},h.id=function(g){return arguments.length?(e=g,h):e},h.iterations=function(g){return arguments.length?(c=+g,h):c},h.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Rt(+g),d(),h):n},h.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Rt(+g),m(),h):i},h}const w8=1664525,S8=1013904223,By=4294967296;function T8(){let t=1;return()=>(t=(w8*t+S8)%By)/By}function A8(t){return t.x}function P8(t){return t.y}var D8=10,C8=Math.PI*(3-Math.sqrt(5));function Xs(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,l=Cs(f),u=Qn("tick","end"),c=T8();t==null&&(t=[]);function f(){h(),u.call("tick",e),n<r&&(l.stop(),u.call("end",e))}function h(m){var g,y=t.length,b;m===void 0&&(m=1);for(var v=0;v<m;++v)for(n+=(o-n)*i,s.forEach(function(x){x(n)}),g=0;g<y;++g)b=t[g],b.fx==null?b.x+=b.vx*=a:(b.x=b.fx,b.vx=0),b.fy==null?b.y+=b.vy*=a:(b.y=b.fy,b.vy=0);return e}function p(){for(var m=0,g=t.length,y;m<g;++m){if(y=t[m],y.index=m,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var b=D8*Math.sqrt(.5+m),v=m*C8;y.x=b*Math.cos(v),y.y=b*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(m){return m.initialize&&m.initialize(t,c),m}return p(),e={tick:h,restart:function(){return l.restart(f),e},stop:function(){return l.stop(),e},nodes:function(m){return arguments.length?(t=m,p(),s.forEach(d),e):t},alpha:function(m){return arguments.length?(n=+m,e):n},alphaMin:function(m){return arguments.length?(r=+m,e):r},alphaDecay:function(m){return arguments.length?(i=+m,e):+i},alphaTarget:function(m){return arguments.length?(o=+m,e):o},velocityDecay:function(m){return arguments.length?(a=1-m,e):1-a},randomSource:function(m){return arguments.length?(c=m,s.forEach(d),e):c},force:function(m,g){return arguments.length>1?(g==null?s.delete(m):s.set(m,d(g)),e):s.get(m)},find:function(m,g,y){var b=0,v=t.length,x,_,A,w,P;for(y==null?y=1/0:y*=y,b=0;b<v;++b)w=t[b],x=m-w.x,_=g-w.y,A=x*x+_*_,A<y&&(P=w,y=A);return P},on:function(m,g){return arguments.length>1?(u.on(m,g),e):u.on(m)}}}function Vs(){var t,e,n,r,i=Rt(-30),o,a=1,s=1/0,l=.81;function u(p){var d,m=t.length,g=Ys(t,A8,P8).visitAfter(f);for(r=p,d=0;d<m;++d)e=t[d],g.visit(h)}function c(){if(t){var p,d=t.length,m;for(o=new Array(d),p=0;p<d;++p)m=t[p],o[m.index]=+i(m,p,t)}}function f(p){var d=0,m,g,y=0,b,v,x;if(p.length){for(b=v=x=0;x<4;++x)(m=p[x])&&(g=Math.abs(m.value))&&(d+=m.value,y+=g,b+=g*m.x,v+=g*m.y);p.x=b/y,p.y=v/y}else{m=p,m.x=m.data.x,m.y=m.data.y;do d+=o[m.data.index];while(m=m.next)}p.value=d}function h(p,d,m,g){if(!p.value)return!0;var y=p.x-e.x,b=p.y-e.y,v=g-d,x=y*y+b*b;if(v*v/l<x)return x<s&&(y===0&&(y=Cn(n),x+=y*y),b===0&&(b=Cn(n),x+=b*b),x<a&&(x=Math.sqrt(a*x)),e.vx+=y*p.value*r/x,e.vy+=b*p.value*r/x),!0;if(p.length||x>=s)return;(p.data!==e||p.next)&&(y===0&&(y=Cn(n),x+=y*y),b===0&&(b=Cn(n),x+=b*b),x<a&&(x=Math.sqrt(a*x)));do p.data!==e&&(v=o[p.data.index]*r/x,e.vx+=y*v,e.vy+=b*v);while(p=p.next)}return u.initialize=function(p,d){t=p,n=d,c()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Rt(+p),c(),u):i},u.distanceMin=function(p){return arguments.length?(a=p*p,u):Math.sqrt(a)},u.distanceMax=function(p){return arguments.length?(s=p*p,u):Math.sqrt(s)},u.theta=function(p){return arguments.length?(l=p*p,u):Math.sqrt(l)},u}function M8(t,e,n){var r,i=Rt(.1),o,a;typeof t!="function"&&(t=Rt(+t)),e==null&&(e=0),n==null&&(n=0);function s(u){for(var c=0,f=r.length;c<f;++c){var h=r[c],p=h.x-e||1e-6,d=h.y-n||1e-6,m=Math.sqrt(p*p+d*d),g=(a[c]-m)*o[c]*u/m;h.vx+=p*g,h.vy+=d*g}}function l(){if(r){var u,c=r.length;for(o=new Array(c),a=new Array(c),u=0;u<c;++u)a[u]=+t(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,l()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Rt(+u),l(),s):i},s.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Rt(+u),l(),s):t},s.x=function(u){return arguments.length?(e=+u,s):e},s.y=function(u){return arguments.length?(n=+u,s):n},s}function Ny(t){var e=Rt(.1),n,r,i;typeof t!="function"&&(t=Rt(t==null?0:+t));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vx+=(i[l]-c.x)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Rt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Rt(+s),a(),o):t},o}function Fy(t){var e=Rt(.1),n,r,i;typeof t!="function"&&(t=Rt(t==null?0:+t));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vy+=(i[l]-c.y)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Rt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Rt(+s),a(),o):t},o}function L8(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Us(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function pi(t){return t=Us(Math.abs(t)),t?t[1]:NaN}function k8(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function R8(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var E8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function di(t){if(!(e=E8.exec(t)))throw new Error("invalid format: "+t);var e;return new Hs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}di.prototype=Hs.prototype;function Hs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Hs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function I8(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var zy;function B8(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(zy=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Us(t,Math.max(0,e+o-1))[0]}function Oy(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Gy={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:L8,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Oy(t*100,e),r:Oy,s:B8,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Yy(t){return t}var Wy=Array.prototype.map,Xy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vy(t){var e=t.grouping===void 0||t.thousands===void 0?Yy:k8(Wy.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Yy:R8(Wy.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=di(f);var h=f.fill,p=f.align,d=f.sign,m=f.symbol,g=f.zero,y=f.width,b=f.comma,v=f.precision,x=f.trim,_=f.type;_==="n"?(b=!0,_="g"):Gy[_]||(v===void 0&&(v=12),x=!0,_="g"),(g||h==="0"&&p==="=")&&(g=!0,h="0",p="=");var A=m==="$"?n:m==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w=m==="$"?r:/[%p]/.test(_)?a:"",P=Gy[_],C=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function B($){var k=A,M=w,T,S,D;if(_==="c")M=P($)+M,$="";else{$=+$;var F=$<0||1/$<0;if($=isNaN($)?l:P(Math.abs($),v),x&&($=I8($)),F&&+$==0&&d!=="+"&&(F=!1),k=(F?d==="("?d:s:d==="-"||d==="("?"":d)+k,M=(_==="s"?Xy[8+zy/3]:"")+M+(F&&d==="("?")":""),C){for(T=-1,S=$.length;++T<S;)if(D=$.charCodeAt(T),48>D||D>57){M=(D===46?i+$.slice(T+1):$.slice(T))+M,$=$.slice(0,T);break}}}b&&!g&&($=e($,1/0));var z=k.length+$.length+M.length,I=z<y?new Array(y-z+1).join(h):"";switch(b&&g&&($=e(I+$,I.length?y-M.length:1/0),I=""),p){case"<":$=k+$+M+I;break;case"=":$=k+I+$+M;break;case"^":$=I.slice(0,z=I.length>>1)+k+$+M+I.slice(z);break;default:$=I+k+$+M;break}return o($)}return B.toString=function(){return f+""},B}function c(f,h){var p=u((f=di(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(pi(h)/3)))*3,m=Math.pow(10,-d),g=Xy[8+d/3];return function(y){return p(m*y)+g}}return{format:u,formatPrefix:c}}var js,Mo,Nf;Uy({thousands:",",grouping:[3],currency:["$",""]});function Uy(t){return js=Vy(t),Mo=js.format,Nf=js.formatPrefix,js}function Hy(t){return Math.max(0,-pi(Math.abs(t)))}function jy(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pi(e)/3)))*3-pi(Math.abs(t)))}function qy(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,pi(e)-pi(t))+1}var ot=1e-6,Lo=1e-12,ht=Math.PI,At=ht/2,qs=ht/4,Kt=ht*2,vt=180/ht,at=ht/180,gt=Math.abs,gi=Math.atan,Qt=Math.atan2,rt=Math.cos,Zs=Math.ceil,Zy=Math.exp,Ff=Math.hypot,Ks=Math.log,zf=Math.pow,et=Math.sin,$e=Math.sign||function(t){return t>0?1:t<0?-1:0},Nt=Math.sqrt,Of=Math.tan;function Ky(t){return t>1?0:t<-1?ht:Math.acos(t)}function Jt(t){return t>1?At:t<-1?-At:Math.asin(t)}function Qy(t){return(t=et(t/2))*t}function St(){}function Qs(t,e){t&&t1.hasOwnProperty(t.type)&&t1[t.type](t,e)}var Jy={Feature:function(t,e){Qs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Qs(n[r].geometry,e)}},t1={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Gf(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Gf(n[r],e,0)},Polygon:function(t,e){e1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)e1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Qs(n[r],e)}};function Gf(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function e1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Gf(t[n],e,1);e.polygonEnd()}function Be(t,e){t&&Jy.hasOwnProperty(t.type)?Jy[t.type](t,e):Qs(t,e)}var Js=new kt,tl=new kt,n1,r1,Yf,Wf,Xf,He={point:St,lineStart:St,lineEnd:St,polygonStart:function(){Js=new kt,He.lineStart=N8,He.lineEnd=F8},polygonEnd:function(){var t=+Js;tl.add(t<0?Kt+t:t),this.lineStart=this.lineEnd=this.point=St},sphere:function(){tl.add(Kt)}};function N8(){He.point=z8}function F8(){i1(n1,r1)}function z8(t,e){He.point=i1,n1=t,r1=e,t*=at,e*=at,Yf=t,Wf=rt(e=e/2+qs),Xf=et(e)}function i1(t,e){t*=at,e*=at,e=e/2+qs;var n=t-Yf,r=n>=0?1:-1,i=r*n,o=rt(e),a=et(e),s=Xf*a,l=Wf*o+s*rt(i),u=s*r*et(i);Js.add(Qt(u,l)),Yf=t,Wf=o,Xf=a}function O8(t){return tl=new kt,Be(t,He),tl*2}function el(t){return[Qt(t[1],t[0]),Jt(t[2])]}function dr(t){var e=t[0],n=t[1],r=rt(n);return[r*rt(e),r*et(e),et(n)]}function nl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function mi(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Vf(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rl(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function il(t){var e=Nt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Tt,ue,Pt,me,gr,o1,a1,yi,ko,Mn,ln,un={point:Uf,lineStart:l1,lineEnd:u1,polygonStart:function(){un.point=c1,un.lineStart=G8,un.lineEnd=Y8,ko=new kt,He.polygonStart()},polygonEnd:function(){He.polygonEnd(),un.point=Uf,un.lineStart=l1,un.lineEnd=u1,Js<0?(Tt=-(Pt=180),ue=-(me=90)):ko>ot?me=90:ko<-ot&&(ue=-90),ln[0]=Tt,ln[1]=Pt},sphere:function(){Tt=-(Pt=180),ue=-(me=90)}};function Uf(t,e){Mn.push(ln=[Tt=t,Pt=t]),e<ue&&(ue=e),e>me&&(me=e)}function s1(t,e){var n=dr([t*at,e*at]);if(yi){var r=mi(yi,n),i=[r[1],-r[0],0],o=mi(i,r);il(o),o=el(o);var a=t-gr,s=a>0?1:-1,l=o[0]*vt*s,u,c=gt(a)>180;c^(s*gr<l&&l<s*t)?(u=o[1]*vt,u>me&&(me=u)):(l=(l+360)%360-180,c^(s*gr<l&&l<s*t)?(u=-o[1]*vt,u<ue&&(ue=u)):(e<ue&&(ue=e),e>me&&(me=e))),c?t<gr?ye(Tt,t)>ye(Tt,Pt)&&(Pt=t):ye(t,Pt)>ye(Tt,Pt)&&(Tt=t):Pt>=Tt?(t<Tt&&(Tt=t),t>Pt&&(Pt=t)):t>gr?ye(Tt,t)>ye(Tt,Pt)&&(Pt=t):ye(t,Pt)>ye(Tt,Pt)&&(Tt=t)}else Mn.push(ln=[Tt=t,Pt=t]);e<ue&&(ue=e),e>me&&(me=e),yi=n,gr=t}function l1(){un.point=s1}function u1(){ln[0]=Tt,ln[1]=Pt,un.point=Uf,yi=null}function c1(t,e){if(yi){var n=t-gr;ko.add(gt(n)>180?n+(n>0?360:-360):n)}else o1=t,a1=e;He.point(t,e),s1(t,e)}function G8(){He.lineStart()}function Y8(){c1(o1,a1),He.lineEnd(),gt(ko)>ot&&(Tt=-(Pt=180)),ln[0]=Tt,ln[1]=Pt,yi=null}function ye(t,e){return(e-=t)<0?e+360:e}function W8(t,e){return t[0]-e[0]}function f1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function X8(t){var e,n,r,i,o,a,s;if(me=Pt=-(Tt=ue=1/0),Mn=[],Be(t,un),n=Mn.length){for(Mn.sort(W8),e=1,r=Mn[0],o=[r];e<n;++e)i=Mn[e],f1(r,i[0])||f1(r,i[1])?(ye(r[0],i[1])>ye(r[0],r[1])&&(r[1]=i[1]),ye(i[0],r[1])>ye(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ye(r[1],i[0]))>a&&(a=s,Tt=i[0],Pt=r[1])}return Mn=ln=null,Tt===1/0||ue===1/0?[[NaN,NaN],[NaN,NaN]]:[[Tt,ue],[Pt,me]]}var Ro,ol,al,sl,ll,ul,cl,fl,Hf,jf,qf,h1,p1,te,ee,ne,Ne={sphere:St,point:Zf,lineStart:d1,lineEnd:g1,polygonStart:function(){Ne.lineStart=H8,Ne.lineEnd=j8},polygonEnd:function(){Ne.lineStart=d1,Ne.lineEnd=g1}};function Zf(t,e){t*=at,e*=at;var n=rt(e);Eo(n*rt(t),n*et(t),et(e))}function Eo(t,e,n){++Ro,al+=(t-al)/Ro,sl+=(e-sl)/Ro,ll+=(n-ll)/Ro}function d1(){Ne.point=V8}function V8(t,e){t*=at,e*=at;var n=rt(e);te=n*rt(t),ee=n*et(t),ne=et(e),Ne.point=U8,Eo(te,ee,ne)}function U8(t,e){t*=at,e*=at;var n=rt(e),r=n*rt(t),i=n*et(t),o=et(e),a=Qt(Nt((a=ee*o-ne*i)*a+(a=ne*r-te*o)*a+(a=te*i-ee*r)*a),te*r+ee*i+ne*o);ol+=a,ul+=a*(te+(te=r)),cl+=a*(ee+(ee=i)),fl+=a*(ne+(ne=o)),Eo(te,ee,ne)}function g1(){Ne.point=Zf}function H8(){Ne.point=q8}function j8(){m1(h1,p1),Ne.point=Zf}function q8(t,e){h1=t,p1=e,t*=at,e*=at,Ne.point=m1;var n=rt(e);te=n*rt(t),ee=n*et(t),ne=et(e),Eo(te,ee,ne)}function m1(t,e){t*=at,e*=at;var n=rt(e),r=n*rt(t),i=n*et(t),o=et(e),a=ee*o-ne*i,s=ne*r-te*o,l=te*i-ee*r,u=Ff(a,s,l),c=Jt(u),f=u&&-c/u;Hf.add(f*a),jf.add(f*s),qf.add(f*l),ol+=c,ul+=c*(te+(te=r)),cl+=c*(ee+(ee=i)),fl+=c*(ne+(ne=o)),Eo(te,ee,ne)}function Z8(t){Ro=ol=al=sl=ll=ul=cl=fl=0,Hf=new kt,jf=new kt,qf=new kt,Be(t,Ne);var e=+Hf,n=+jf,r=+qf,i=Ff(e,n,r);return i<Lo&&(e=ul,n=cl,r=fl,ol<ot&&(e=al,n=sl,r=ll),i=Ff(e,n,r),i<Lo)?[NaN,NaN]:[Qt(n,e)*vt,Jt(r/i)*vt]}function bi(t){return function(){return t}}function Kf(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Qf(t,e){return gt(t)>ht&&(t-=Math.round(t/Kt)*Kt),[t,e]}Qf.invert=Qf;function Jf(t,e,n){return(t%=Kt)?e||n?Kf(b1(t),x1(e,n)):b1(t):e||n?x1(e,n):Qf}function y1(t){return function(e,n){return e+=t,gt(e)>ht&&(e-=Math.round(e/Kt)*Kt),[e,n]}}function b1(t){var e=y1(t);return e.invert=y1(-t),e}function x1(t,e){var n=rt(t),r=et(t),i=rt(e),o=et(e);function a(s,l){var u=rt(l),c=rt(s)*u,f=et(s)*u,h=et(l),p=h*n+c*r;return[Qt(f*i-p*o,c*n-h*r),Jt(p*i+f*o)]}return a.invert=function(s,l){var u=rt(l),c=rt(s)*u,f=et(s)*u,h=et(l),p=h*i-f*o;return[Qt(f*i+h*o,c*n+p*r),Jt(p*n-c*r)]},a}function v1(t){t=Jf(t[0]*at,t[1]*at,t.length>2?t[2]*at:0);function e(n){return n=t(n[0]*at,n[1]*at),n[0]*=vt,n[1]*=vt,n}return e.invert=function(n){return n=t.invert(n[0]*at,n[1]*at),n[0]*=vt,n[1]*=vt,n},e}function $1(t,e,n,r,i,o){if(n){var a=rt(e),s=et(e),l=r*n;i==null?(i=e+r*Kt,o=e-l/2):(i=_1(a,i),o=_1(a,o),(r>0?i<o:i>o)&&(i+=r*Kt));for(var u,c=i;r>0?c>o:c<o;c-=l)u=el([a,-s*rt(c),-s*et(c)]),t.point(u[0],u[1])}}function _1(t,e){e=dr(e),e[0]-=t,il(e);var n=Ky(-e[1]);return((-e[2]<0?-n:n)+Kt-ot)%Kt}function K8(){var t=bi([0,0]),e=bi(90),n=bi(2),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=vt,l[1]*=vt}function s(){var l=t.apply(this,arguments),u=e.apply(this,arguments)*at,c=n.apply(this,arguments)*at;return r=[],i=Jf(-l[0]*at,-l[1]*at,0).invert,$1(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(t=typeof l=="function"?l:bi([+l[0],+l[1]]),s):t},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:bi(+l),s):e},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:bi(+l),s):n},s}function w1(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:St,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function hl(t,e){return gt(t[0]-e[0])<ot&&gt(t[1]-e[1])<ot}function pl(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function S1(t,e,n,r,i){var o=[],a=[],s,l;if(t.forEach(function(d){if(!((m=d.length-1)<=0)){var m,g=d[0],y=d[m],b;if(hl(g,y)){if(!g[2]&&!y[2]){for(i.lineStart(),s=0;s<m;++s)i.point((g=d[s])[0],g[1]);i.lineEnd();return}y[0]+=2*ot}o.push(b=new pl(g,d,null,!0)),a.push(b.o=new pl(g,null,b,!1)),o.push(b=new pl(y,d,null,!1)),a.push(b.o=new pl(y,null,b,!0))}}),!!o.length){for(a.sort(e),T1(o),T1(a),s=0,l=a.length;s<l;++s)a[s].e=n=!n;for(var u=o[0],c,f;;){for(var h=u,p=!0;h.v;)if((h=h.n)===u)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(s=0,l=c.length;s<l;++s)i.point((f=c[s])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,s=c.length-1;s>=0;--s)i.point((f=c[s])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,c=h.z,p=!p}while(!h.v);i.lineEnd()}}}function T1(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function th(t){return gt(t[0])<=ht?t[0]:$e(t[0])*((gt(t[0])+ht)%Kt-ht)}function A1(t,e){var n=th(e),r=e[1],i=et(r),o=[et(n),-rt(n),0],a=0,s=0,l=new kt;i===1?r=At+ot:i===-1&&(r=-At-ot);for(var u=0,c=t.length;u<c;++u)if(h=(f=t[u]).length)for(var f,h,p=f[h-1],d=th(p),m=p[1]/2+qs,g=et(m),y=rt(m),b=0;b<h;++b,d=x,g=A,y=w,p=v){var v=f[b],x=th(v),_=v[1]/2+qs,A=et(_),w=rt(_),P=x-d,C=P>=0?1:-1,B=C*P,$=B>ht,k=g*A;if(l.add(Qt(k*C*et(B),y*w+k*rt(B))),a+=$?P+C*Kt:P,$^d>=n^x>=n){var M=mi(dr(p),dr(v));il(M);var T=mi(o,M);il(T);var S=($^P>=0?-1:1)*Jt(T[2]);(r>S||r===S&&(M[0]||M[1]))&&(s+=$^P>=0?1:-1)}}return(a<-ot||a<ot&&l<-Lo)^s&1}function P1(t,e,n,r){return function(i){var o=e(i),a=w1(),s=e(a),l=!1,u,c,f,h={point:p,lineStart:m,lineEnd:g,polygonStart:function(){h.point=y,h.lineStart=b,h.lineEnd=v,c=[],u=[]},polygonEnd:function(){h.point=p,h.lineStart=m,h.lineEnd=g,c=Tc(c);var x=A1(u,r);c.length?(l||(i.polygonStart(),l=!0),S1(c,J8,x,n,i)):x&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(x,_){t(x,_)&&i.point(x,_)}function d(x,_){o.point(x,_)}function m(){h.point=d,o.lineStart()}function g(){h.point=p,o.lineEnd()}function y(x,_){f.push([x,_]),s.point(x,_)}function b(){s.lineStart(),f=[]}function v(){y(f[0][0],f[0][1]),s.lineEnd();var x=s.clean(),_=a.result(),A,w=_.length,P,C,B;if(f.pop(),u.push(f),f=null,!!w){if(x&1){if(C=_[0],(P=C.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),A=0;A<P;++A)i.point((B=C[A])[0],B[1]);i.lineEnd()}return}w>1&&x&2&&_.push(_.pop().concat(_.shift())),c.push(_.filter(Q8))}}return h}}function Q8(t){return t.length>1}function J8(t,e){return((t=t.x)[0]<0?t[1]-At-ot:At-t[1])-((e=e.x)[0]<0?e[1]-At-ot:At-e[1])}const eh=P1(function(){return!0},t4,n4,[-ht,-At]);function t4(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,l=gt(o-e);gt(l-ht)<ot?(t.point(e,n=(n+a)/2>0?At:-At),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&l>=ht&&(gt(e-r)<ot&&(e-=r*ot),gt(o-s)<ot&&(o-=s*ot),n=e4(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function e4(t,e,n,r){var i,o,a=et(t-n);return gt(a)>ot?gi((et(e)*(o=rt(r))*et(n)-et(r)*(i=rt(e))*et(t))/(i*o*a)):(e+r)/2}function n4(t,e,n,r){var i;if(t==null)i=n*At,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(gt(t[0]-e[0])>ot){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function D1(t){var e=rt(t),n=2*at,r=e>0,i=gt(e)>ot;function o(c,f,h,p){$1(p,t,n,h,c,f)}function a(c,f){return rt(c)*rt(f)>e}function s(c){var f,h,p,d,m;return{lineStart:function(){d=p=!1,m=1},point:function(g,y){var b=[g,y],v,x=a(g,y),_=r?x?0:u(g,y):x?u(g+(g<0?ht:-ht),y):0;if(!f&&(d=p=x)&&c.lineStart(),x!==p&&(v=l(f,b),(!v||hl(f,v)||hl(b,v))&&(b[2]=1)),x!==p)m=0,x?(c.lineStart(),v=l(b,f),c.point(v[0],v[1])):(v=l(f,b),c.point(v[0],v[1],2),c.lineEnd()),f=v;else if(i&&f&&r^x){var A;!(_&h)&&(A=l(b,f,!0))&&(m=0,r?(c.lineStart(),c.point(A[0][0],A[0][1]),c.point(A[1][0],A[1][1]),c.lineEnd()):(c.point(A[1][0],A[1][1]),c.lineEnd(),c.lineStart(),c.point(A[0][0],A[0][1],3)))}x&&(!f||!hl(f,b))&&c.point(b[0],b[1]),f=b,p=x,h=_},lineEnd:function(){p&&c.lineEnd(),f=null},clean:function(){return m|(d&&p)<<1}}}function l(c,f,h){var p=dr(c),d=dr(f),m=[1,0,0],g=mi(p,d),y=nl(g,g),b=g[0],v=y-b*b;if(!v)return!h&&c;var x=e*y/v,_=-e*b/v,A=mi(m,g),w=rl(m,x),P=rl(g,_);Vf(w,P);var C=A,B=nl(w,C),$=nl(C,C),k=B*B-$*(nl(w,w)-1);if(!(k<0)){var M=Nt(k),T=rl(C,(-B-M)/$);if(Vf(T,w),T=el(T),!h)return T;var S=c[0],D=f[0],F=c[1],z=f[1],I;D<S&&(I=S,S=D,D=I);var N=D-S,E=gt(N-ht)<ot,O=E||N<ot;if(!E&&z<F&&(I=F,F=z,z=I),O?E?F+z>0^T[1]<(gt(T[0]-S)<ot?F:z):F<=T[1]&&T[1]<=z:N>ht^(S<=T[0]&&T[0]<=D)){var j=rl(C,(-B+M)/$);return Vf(j,w),[T,el(j)]}}}function u(c,f){var h=r?t:ht-t,p=0;return c<-h?p|=1:c>h&&(p|=2),f<-h?p|=4:f>h&&(p|=8),p}return P1(a,s,o,r?[0,-t]:[-ht,t-ht])}function r4(t,e,n,r,i,o){var a=t[0],s=t[1],l=e[0],u=e[1],c=0,f=1,h=l-a,p=u-s,d;if(d=n-a,!(!h&&d>0)){if(d/=h,h<0){if(d<c)return;d<f&&(f=d)}else if(h>0){if(d>f)return;d>c&&(c=d)}if(d=i-a,!(!h&&d<0)){if(d/=h,h<0){if(d>f)return;d>c&&(c=d)}else if(h>0){if(d<c)return;d<f&&(f=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<c)return;d<f&&(f=d)}else if(p>0){if(d>f)return;d>c&&(c=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>f)return;d>c&&(c=d)}else if(p>0){if(d<c)return;d<f&&(f=d)}return c>0&&(t[0]=a+c*h,t[1]=s+c*p),f<1&&(e[0]=a+f*h,e[1]=s+f*p),!0}}}}}var Io=1e9,dl=-Io;function gl(t,e,n,r){function i(u,c){return t<=u&&u<=n&&e<=c&&c<=r}function o(u,c,f,h){var p=0,d=0;if(u==null||(p=a(u,f))!==(d=a(c,f))||l(u,c)<0^f>0)do h.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+f+4)%4)!==d);else h.point(c[0],c[1])}function a(u,c){return gt(u[0]-t)<ot?c>0?0:3:gt(u[0]-n)<ot?c>0?2:1:gt(u[1]-e)<ot?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var f=a(u,1),h=a(c,1);return f!==h?f-h:f===0?c[1]-u[1]:f===1?u[0]-c[0]:f===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,f=w1(),h,p,d,m,g,y,b,v,x,_,A,w={point:P,lineStart:k,lineEnd:M,polygonStart:B,polygonEnd:$};function P(S,D){i(S,D)&&c.point(S,D)}function C(){for(var S=0,D=0,F=p.length;D<F;++D)for(var z=p[D],I=1,N=z.length,E=z[0],O,j,it=E[0],W=E[1];I<N;++I)O=it,j=W,E=z[I],it=E[0],W=E[1],j<=r?W>r&&(it-O)*(r-j)>(W-j)*(t-O)&&++S:W<=r&&(it-O)*(r-j)<(W-j)*(t-O)&&--S;return S}function B(){c=f,h=[],p=[],A=!0}function $(){var S=C(),D=A&&S,F=(h=Tc(h)).length;(D||F)&&(u.polygonStart(),D&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),F&&S1(h,s,S,o,u),u.polygonEnd()),c=u,h=p=d=null}function k(){w.point=T,p&&p.push(d=[]),_=!0,x=!1,b=v=NaN}function M(){h&&(T(m,g),y&&x&&f.rejoin(),h.push(f.result())),w.point=P,x&&c.lineEnd()}function T(S,D){var F=i(S,D);if(p&&d.push([S,D]),_)m=S,g=D,y=F,_=!1,F&&(c.lineStart(),c.point(S,D));else if(F&&x)c.point(S,D);else{var z=[b=Math.max(dl,Math.min(Io,b)),v=Math.max(dl,Math.min(Io,v))],I=[S=Math.max(dl,Math.min(Io,S)),D=Math.max(dl,Math.min(Io,D))];r4(z,I,t,e,n,r)?(x||(c.lineStart(),c.point(z[0],z[1])),c.point(I[0],I[1]),F||c.lineEnd(),A=!1):F&&(c.lineStart(),c.point(S,D),A=!1)}b=S,v=D,x=F}return w}}function i4(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=gl(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var nh,rh,ml,yl,xi={sphere:St,point:St,lineStart:o4,lineEnd:St,polygonStart:St,polygonEnd:St};function o4(){xi.point=s4,xi.lineEnd=a4}function a4(){xi.point=xi.lineEnd=St}function s4(t,e){t*=at,e*=at,rh=t,ml=et(e),yl=rt(e),xi.point=l4}function l4(t,e){t*=at,e*=at;var n=et(e),r=rt(e),i=gt(t-rh),o=rt(i),a=et(i),s=r*a,l=yl*n-ml*r*o,u=ml*n+yl*r*o;nh.add(Qt(Nt(s*s+l*l),u)),rh=t,ml=n,yl=r}function C1(t){return nh=new kt,Be(t,xi),+nh}var ih=[null,null],u4={type:"LineString",coordinates:ih};function bl(t,e){return ih[0]=t,ih[1]=e,C1(u4)}var M1={Feature:function(t,e){return xl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(xl(n[r].geometry,e))return!0;return!1}},L1={Sphere:function(){return!0},Point:function(t,e){return k1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(k1(n[r],e))return!0;return!1},LineString:function(t,e){return R1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(R1(n[r],e))return!0;return!1},Polygon:function(t,e){return E1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(E1(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(xl(n[r],e))return!0;return!1}};function xl(t,e){return t&&L1.hasOwnProperty(t.type)?L1[t.type](t,e):!1}function k1(t,e){return bl(t,e)===0}function R1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=bl(t[o],e),r===0||o>0&&(i=bl(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Lo*i))return!0;n=r}return!1}function E1(t,e){return!!A1(t.map(c4),I1(e))}function c4(t){return t=t.map(I1),t.pop(),t}function I1(t){return[t[0]*at,t[1]*at]}function f4(t,e){return(t&&M1.hasOwnProperty(t.type)?M1[t.type]:xl)(t,e)}function B1(t,e,n){var r=Sn(t,e-ot,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function N1(t,e,n){var r=Sn(t,e-ot,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function F1(){var t,e,n,r,i,o,a,s,l=10,u=l,c=90,f=360,h,p,d,m,g=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return Sn(Zs(r/c)*c,n,c).map(d).concat(Sn(Zs(s/f)*f,a,f).map(m)).concat(Sn(Zs(e/l)*l,t,l).filter(function(v){return gt(v%c)>ot}).map(h)).concat(Sn(Zs(o/u)*u,i,u).filter(function(v){return gt(v%f)>ot}).map(p))}return y.lines=function(){return b().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(m(a).slice(1),d(n).reverse().slice(1),m(s).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],s=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),s>a&&(v=s,s=a,a=v),y.precision(g)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(g)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(c=+v[0],f=+v[1],y):[c,f]},y.stepMinor=function(v){return arguments.length?(l=+v[0],u=+v[1],y):[l,u]},y.precision=function(v){return arguments.length?(g=+v,h=B1(o,i,90),p=N1(e,t,g),d=B1(s,a,90),m=N1(r,n,g),y):g},y.extentMajor([[-180,-90+ot],[180,90-ot]]).extentMinor([[-180,-80-ot],[180,80+ot]])}function h4(){return F1()()}function p4(t,e){var n=t[0]*at,r=t[1]*at,i=e[0]*at,o=e[1]*at,a=rt(r),s=et(r),l=rt(o),u=et(o),c=a*rt(n),f=a*et(n),h=l*rt(i),p=l*et(i),d=2*Jt(Nt(Qy(o-r)+a*l*Qy(i-n))),m=et(d),g=d?function(y){var b=et(y*=d)/m,v=et(d-y)/m,x=v*c+b*h,_=v*f+b*p,A=v*s+b*u;return[Qt(_,x)*vt,Qt(A,Nt(x*x+_*_))*vt]}:function(){return[n*vt,r*vt]};return g.distance=d,g}const Bo=t=>t;var oh=new kt,ah=new kt,z1,O1,sh,lh,cn={point:St,lineStart:St,lineEnd:St,polygonStart:function(){cn.lineStart=d4,cn.lineEnd=m4},polygonEnd:function(){cn.lineStart=cn.lineEnd=cn.point=St,oh.add(gt(ah)),ah=new kt},result:function(){var t=oh/2;return oh=new kt,t}};function d4(){cn.point=g4}function g4(t,e){cn.point=G1,z1=sh=t,O1=lh=e}function G1(t,e){ah.add(lh*t-sh*e),sh=t,lh=e}function m4(){G1(z1,O1)}var vi=1/0,vl=vi,No=-vi,$l=No,_l={point:y4,lineStart:St,lineEnd:St,polygonStart:St,polygonEnd:St,result:function(){var t=[[vi,vl],[No,$l]];return No=$l=-(vl=vi=1/0),t}};function y4(t,e){t<vi&&(vi=t),t>No&&(No=t),e<vl&&(vl=e),e>$l&&($l=e)}var uh=0,ch=0,Fo=0,wl=0,Sl=0,$i=0,fh=0,hh=0,zo=0,Y1,W1,je,qe,_e={point:mr,lineStart:X1,lineEnd:V1,polygonStart:function(){_e.lineStart=v4,_e.lineEnd=$4},polygonEnd:function(){_e.point=mr,_e.lineStart=X1,_e.lineEnd=V1},result:function(){var t=zo?[fh/zo,hh/zo]:$i?[wl/$i,Sl/$i]:Fo?[uh/Fo,ch/Fo]:[NaN,NaN];return uh=ch=Fo=wl=Sl=$i=fh=hh=zo=0,t}};function mr(t,e){uh+=t,ch+=e,++Fo}function X1(){_e.point=b4}function b4(t,e){_e.point=x4,mr(je=t,qe=e)}function x4(t,e){var n=t-je,r=e-qe,i=Nt(n*n+r*r);wl+=i*(je+t)/2,Sl+=i*(qe+e)/2,$i+=i,mr(je=t,qe=e)}function V1(){_e.point=mr}function v4(){_e.point=_4}function $4(){U1(Y1,W1)}function _4(t,e){_e.point=U1,mr(Y1=je=t,W1=qe=e)}function U1(t,e){var n=t-je,r=e-qe,i=Nt(n*n+r*r);wl+=i*(je+t)/2,Sl+=i*(qe+e)/2,$i+=i,i=qe*t-je*e,fh+=i*(je+t),hh+=i*(qe+e),zo+=i*3,mr(je=t,qe=e)}function H1(t){this._context=t}H1.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Kt);break}}},result:St};var ph=new kt,dh,j1,q1,Oo,Go,Yo={point:St,lineStart:function(){Yo.point=w4},lineEnd:function(){dh&&Z1(j1,q1),Yo.point=St},polygonStart:function(){dh=!0},polygonEnd:function(){dh=null},result:function(){var t=+ph;return ph=new kt,t}};function w4(t,e){Yo.point=Z1,j1=Oo=t,q1=Go=e}function Z1(t,e){Oo-=t,Go-=e,ph.add(Nt(Oo*Oo+Go*Go)),Oo=t,Go=e}let K1,Tl,Q1,J1;class tb{constructor(e){this._append=e==null?eb:S4(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Q1||this._append!==Tl){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Q1=r,Tl=this._append,J1=this._,this._=i}this._+=J1;break}}}result(){const e=this._;return this._="",e.length?e:null}}function eb(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function S4(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return eb;if(e!==K1){const n=10**e;K1=e,Tl=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Tl}function T4(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Be(s,i(o))),o.result()}return a.area=function(s){return Be(s,i(cn)),cn.result()},a.measure=function(s){return Be(s,i(Yo)),Yo.result()},a.bounds=function(s){return Be(s,i(_l)),_l.result()},a.centroid=function(s){return Be(s,i(_e)),_e.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,Bo):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new tb(n)):new H1(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const l=Math.floor(s);if(!(l>=0))throw new RangeError(`invalid digits: ${s}`);n=l}return e===null&&(o=new tb(n)),a},a.projection(t).digits(n).context(e)}function A4(t){return{stream:Wo(t)}}function Wo(t){return function(e){var n=new gh;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gh(){}gh.prototype={constructor:gh,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function mh(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Be(n,t.stream(_l)),e(_l.result()),r!=null&&t.clipExtent(r),t}function Al(t,e,n){return mh(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,l])},n)}function yh(t,e,n){return Al(t,[[0,0],e],n)}function bh(t,e,n){return mh(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function xh(t,e,n){return mh(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var nb=16,P4=rt(30*at);function rb(t,e){return+e?C4(t,e):D4(t)}function D4(t){return Wo({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function C4(t,e){function n(r,i,o,a,s,l,u,c,f,h,p,d,m,g){var y=u-r,b=c-i,v=y*y+b*b;if(v>4*e&&m--){var x=a+h,_=s+p,A=l+d,w=Nt(x*x+_*_+A*A),P=Jt(A/=w),C=gt(gt(A)-1)<ot||gt(o-f)<ot?(o+f)/2:Qt(_,x),B=t(C,P),$=B[0],k=B[1],M=$-r,T=k-i,S=b*M-y*T;(S*S/v>e||gt((y*M+b*T)/v-.5)>.3||a*h+s*p+l*d<P4)&&(n(r,i,o,a,s,l,$,k,C,x/=w,_/=w,A,m,g),g.point($,k),n($,k,C,x,_,A,u,c,f,h,p,d,m,g))}}return function(r){var i,o,a,s,l,u,c,f,h,p,d,m,g={point:y,lineStart:b,lineEnd:x,polygonStart:function(){r.polygonStart(),g.lineStart=_},polygonEnd:function(){r.polygonEnd(),g.lineStart=b}};function y(P,C){P=t(P,C),r.point(P[0],P[1])}function b(){f=NaN,g.point=v,r.lineStart()}function v(P,C){var B=dr([P,C]),$=t(P,C);n(f,h,c,p,d,m,f=$[0],h=$[1],c=P,p=B[0],d=B[1],m=B[2],nb,r),r.point(f,h)}function x(){g.point=y,r.lineEnd()}function _(){b(),g.point=A,g.lineEnd=w}function A(P,C){v(i=P,C),o=f,a=h,s=p,l=d,u=m,g.point=v}function w(){n(f,h,c,p,d,m,o,a,i,s,l,u,nb,r),g.lineEnd=x,x()}return g}}var M4=Wo({point:function(t,e){this.stream.point(t*at,e*at)}});function L4(t){return Wo({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function k4(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function ib(t,e,n,r,i,o){if(!o)return k4(t,e,n,r,i);var a=rt(o),s=et(o),l=a*t,u=s*t,c=a/t,f=s/t,h=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(m,g){return m*=r,g*=i,[l*m-u*g+e,n-u*m-l*g]}return d.invert=function(m,g){return[r*(c*m-f*g+h),i*(p-f*m-c*g)]},d}function Ze(t){return vh(function(){return t})()}function vh(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,l=0,u=0,c,f=0,h=1,p=1,d=null,m=eh,g=null,y,b,v,x=Bo,_=.5,A,w,P,C,B;function $(S){return P(S[0]*at,S[1]*at)}function k(S){return S=P.invert(S[0],S[1]),S&&[S[0]*vt,S[1]*vt]}$.stream=function(S){return C&&B===S?C:C=M4(L4(c)(m(A(x(B=S)))))},$.preclip=function(S){return arguments.length?(m=S,d=void 0,T()):m},$.postclip=function(S){return arguments.length?(x=S,g=y=b=v=null,T()):x},$.clipAngle=function(S){return arguments.length?(m=+S?D1(d=S*at):(d=null,eh),T()):d*vt},$.clipExtent=function(S){return arguments.length?(x=S==null?(g=y=b=v=null,Bo):gl(g=+S[0][0],y=+S[0][1],b=+S[1][0],v=+S[1][1]),T()):g==null?null:[[g,y],[b,v]]},$.scale=function(S){return arguments.length?(n=+S,M()):n},$.translate=function(S){return arguments.length?(r=+S[0],i=+S[1],M()):[r,i]},$.center=function(S){return arguments.length?(o=S[0]%360*at,a=S[1]%360*at,M()):[o*vt,a*vt]},$.rotate=function(S){return arguments.length?(s=S[0]%360*at,l=S[1]%360*at,u=S.length>2?S[2]%360*at:0,M()):[s*vt,l*vt,u*vt]},$.angle=function(S){return arguments.length?(f=S%360*at,M()):f*vt},$.reflectX=function(S){return arguments.length?(h=S?-1:1,M()):h<0},$.reflectY=function(S){return arguments.length?(p=S?-1:1,M()):p<0},$.precision=function(S){return arguments.length?(A=rb(w,_=S*S),T()):Nt(_)},$.fitExtent=function(S,D){return Al($,S,D)},$.fitSize=function(S,D){return yh($,S,D)},$.fitWidth=function(S,D){return bh($,S,D)},$.fitHeight=function(S,D){return xh($,S,D)};function M(){var S=ib(n,0,0,h,p,f).apply(null,e(o,a)),D=ib(n,r-S[0],i-S[1],h,p,f);return c=Jf(s,l,u),w=Kf(e,D),P=Kf(c,w),A=rb(w,_),T()}function T(){return C=B=null,$}return function(){return e=t.apply(this,arguments),$.invert=e.invert&&k,M()}}function $h(t){var e=0,n=ht/3,r=vh(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*at,n=o[1]*at):[e*vt,n*vt]},i}function R4(t){var e=rt(t);function n(r,i){return[r*e,et(i)/e]}return n.invert=function(r,i){return[r/e,Jt(i*e)]},n}function ob(t,e){var n=et(t),r=(n+et(e))/2;if(gt(r)<ot)return R4(t);var i=1+n*(2*r-n),o=Nt(i)/r;function a(s,l){var u=Nt(i-2*r*et(l))/r;return[u*et(s*=r),o-u*rt(s)]}return a.invert=function(s,l){var u=o-l,c=Qt(s,gt(u))*$e(u);return u*r<0&&(c-=ht*$e(s)*$e(u)),[c/r,Jt((i-(s*s+u*u)*r*r)/(2*r))]},a}function Pl(){return $h(ob).scale(155.424).center([0,33.6442])}function ab(){return Pl().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function E4(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function I4(){var t,e,n=ab(),r,i=Pl().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Pl().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,u={point:function(h,p){l=[h,p]}};function c(h){var p=h[0],d=h[1];return l=null,r.point(p,d),l||(o.point(p,d),l)||(s.point(p,d),l)}c.invert=function(h){var p=n.scale(),d=n.translate(),m=(h[0]-d[0])/p,g=(h[1]-d[1])/p;return(g>=.12&&g<.234&&m>=-.425&&m<-.214?i:g>=.166&&g<.234&&m>=-.214&&m<-.115?a:n).invert(h)},c.stream=function(h){return t&&e===h?t:t=E4([n.stream(e=h),i.stream(h),a.stream(h)])},c.precision=function(h){return arguments.length?(n.precision(h),i.precision(h),a.precision(h),f()):n.precision()},c.scale=function(h){return arguments.length?(n.scale(h),i.scale(h*.35),a.scale(h),c.translate(n.translate())):n.scale()},c.translate=function(h){if(!arguments.length)return n.translate();var p=n.scale(),d=+h[0],m=+h[1];return r=n.translate(h).clipExtent([[d-.455*p,m-.238*p],[d+.455*p,m+.238*p]]).stream(u),o=i.translate([d-.307*p,m+.201*p]).clipExtent([[d-.425*p+ot,m+.12*p+ot],[d-.214*p-ot,m+.234*p-ot]]).stream(u),s=a.translate([d-.205*p,m+.212*p]).clipExtent([[d-.214*p+ot,m+.166*p+ot],[d-.115*p-ot,m+.234*p-ot]]).stream(u),f()},c.fitExtent=function(h,p){return Al(c,h,p)},c.fitSize=function(h,p){return yh(c,h,p)},c.fitWidth=function(h,p){return bh(c,h,p)},c.fitHeight=function(h,p){return xh(c,h,p)};function f(){return t=e=null,c}return c.scale(1070)}function sb(t){return function(e,n){var r=rt(e),i=rt(n),o=t(r*i);return o===1/0?[2,0]:[o*i*et(e),o*et(n)]}}function Xo(t){return function(e,n){var r=Nt(e*e+n*n),i=t(r),o=et(i),a=rt(i);return[Qt(e*o,r*a),Jt(r&&n*o/r)]}}var _h=sb(function(t){return Nt(2/(1+t))});_h.invert=Xo(function(t){return 2*Jt(t/2)});function B4(){return Ze(_h).scale(124.75).clipAngle(180-.001)}var wh=sb(function(t){return(t=Ky(t))&&t/et(t)});wh.invert=Xo(function(t){return t});function N4(){return Ze(wh).scale(79.4188).clipAngle(180-.001)}function Vo(t,e){return[t,Ks(Of((At+e)/2))]}Vo.invert=function(t,e){return[t,2*gi(Zy(e))-At]};function F4(){return lb(Vo).scale(961/Kt)}function lb(t){var e=Ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,l,u;e.scale=function(f){return arguments.length?(r(f),c()):r()},e.translate=function(f){return arguments.length?(i(f),c()):i()},e.center=function(f){return arguments.length?(n(f),c()):n()},e.clipExtent=function(f){return arguments.length?(f==null?a=s=l=u=null:(a=+f[0][0],s=+f[0][1],l=+f[1][0],u=+f[1][1]),c()):a==null?null:[[a,s],[l,u]]};function c(){var f=ht*r(),h=e(v1(e.rotate()).invert([0,0]));return o(a==null?[[h[0]-f,h[1]-f],[h[0]+f,h[1]+f]]:t===Vo?[[Math.max(h[0]-f,a),s],[Math.min(h[0]+f,l),u]]:[[a,Math.max(h[1]-f,s)],[l,Math.min(h[1]+f,u)]])}return c()}function Dl(t){return Of((At+t)/2)}function ub(t,e){var n=rt(t),r=t===e?et(t):Ks(n/rt(e))/Ks(Dl(e)/Dl(t)),i=n*zf(Dl(t),r)/r;if(!r)return Vo;function o(a,s){i>0?s<-At+ot&&(s=-At+ot):s>At-ot&&(s=At-ot);var l=i/zf(Dl(s),r);return[l*et(r*a),i-l*rt(r*a)]}return o.invert=function(a,s){var l=i-s,u=$e(r)*Nt(a*a+l*l),c=Qt(a,gt(l))*$e(l);return l*r<0&&(c-=ht*$e(a)*$e(l)),[c/r,2*gi(zf(i/u,1/r))-At]},o}function z4(){return $h(ub).scale(109.5).parallels([30,30])}function Uo(t,e){return[t,e]}Uo.invert=Uo;function O4(){return Ze(Uo).scale(152.63)}function cb(t,e){var n=rt(t),r=t===e?et(t):(n-rt(e))/(e-t),i=n/r+t;if(gt(r)<ot)return Uo;function o(a,s){var l=i-s,u=r*a;return[l*et(u),i-l*rt(u)]}return o.invert=function(a,s){var l=i-s,u=Qt(a,gt(l))*$e(l);return l*r<0&&(u-=ht*$e(a)*$e(l)),[u/r,i-$e(r)*Nt(a*a+l*l)]},o}function G4(){return $h(cb).scale(131.154).center([0,13.9389])}var Ho=1.340264,jo=-.081106,qo=893e-6,Zo=.003796,Cl=Nt(3)/2,Y4=12;function Sh(t,e){var n=Jt(Cl*et(e)),r=n*n,i=r*r*r;return[t*rt(n)/(Cl*(Ho+3*jo*r+i*(7*qo+9*Zo*r))),n*(Ho+jo*r+i*(qo+Zo*r))]}Sh.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,l;o<Y4&&(s=n*(Ho+jo*r+i*(qo+Zo*r))-e,l=Ho+3*jo*r+i*(7*qo+9*Zo*r),n-=a=s/l,r=n*n,i=r*r*r,!(gt(a)<Lo));++o);return[Cl*t*(Ho+3*jo*r+i*(7*qo+9*Zo*r))/rt(n),Jt(et(n)/Cl)]};function W4(){return Ze(Sh).scale(177.158)}function Th(t,e){var n=rt(e),r=rt(t)*n;return[n*et(t)/r,et(e)/r]}Th.invert=Xo(gi);function X4(){return Ze(Th).scale(144.049).clipAngle(60)}function V4(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,l=null,u,c,f,h=1,p=1,d=Wo({point:function(x,_){var A=v([x,_]);this.stream.point(A[0],A[1])}}),m=Bo,g,y;function b(){return h=t*r,p=t*i,g=y=null,v}function v(x){var _=x[0]*h,A=x[1]*p;if(o){var w=A*a-_*s;_=_*a+A*s,A=w}return[_+e,A+n]}return v.invert=function(x){var _=x[0]-e,A=x[1]-n;if(o){var w=A*a+_*s;_=_*a-A*s,A=w}return[_/h,A/p]},v.stream=function(x){return g&&y===x?g:g=d(m(y=x))},v.postclip=function(x){return arguments.length?(m=x,l=u=c=f=null,b()):m},v.clipExtent=function(x){return arguments.length?(m=x==null?(l=u=c=f=null,Bo):gl(l=+x[0][0],u=+x[0][1],c=+x[1][0],f=+x[1][1]),b()):l==null?null:[[l,u],[c,f]]},v.scale=function(x){return arguments.length?(t=+x,b()):t},v.translate=function(x){return arguments.length?(e=+x[0],n=+x[1],b()):[e,n]},v.angle=function(x){return arguments.length?(o=x%360*at,s=et(o),a=rt(o),b()):o*vt},v.reflectX=function(x){return arguments.length?(r=x?-1:1,b()):r<0},v.reflectY=function(x){return arguments.length?(i=x?-1:1,b()):i<0},v.fitExtent=function(x,_){return Al(v,x,_)},v.fitSize=function(x,_){return yh(v,x,_)},v.fitWidth=function(x,_){return bh(v,x,_)},v.fitHeight=function(x,_){return xh(v,x,_)},v}function Ah(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Ah.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(gt(i)>ot&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function U4(){return Ze(Ah).scale(175.295)}function Ph(t,e){return[rt(e)*et(t),et(e)]}Ph.invert=Xo(Jt);function H4(){return Ze(Ph).scale(249.5).clipAngle(90+ot)}function Dh(t,e){var n=rt(e),r=1+rt(t)*n;return[n*et(t)/r,et(e)/r]}Dh.invert=Xo(function(t){return 2*gi(t)});function j4(){return Ze(Dh).scale(250).clipAngle(142)}function Ch(t,e){return[Ks(Of((At+e)/2)),-t]}Ch.invert=function(t,e){return[-e,2*gi(Zy(t))-At]};function q4(){var t=lb(Ch),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function Z4(t,e){return t.parent===e.parent?1:2}function K4(t){return t.reduce(Q4,0)/t.length}function Q4(t,e){return t+e.x}function J4(t){return 1+t.reduce(t7,0)}function t7(t,e){return Math.max(t,e.y)}function e7(t){for(var e;e=t.children;)t=e[0];return t}function n7(t){for(var e;e=t.children;)t=e[e.length-1];return t}function r7(){var t=Z4,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(h){var p=h.children;p?(h.x=K4(p),h.y=J4(p)):(h.x=a?s+=t(h,a):0,h.y=0,a=h)});var l=e7(o),u=n7(o),c=l.x-t(l,u)/2,f=u.x+t(u,l)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*e,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-c)/(f-c)*e,h.y=(1-(o.y?h.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function i7(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function o7(){return this.eachAfter(i7)}function a7(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function s7(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function l7(t,e){for(var n=this,r=[n],i=[],o,a,s,l=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++l,this);return this}function u7(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function c7(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function f7(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function h7(t){for(var e=this,n=p7(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function p7(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function d7(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function g7(){return Array.from(this)}function m7(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function y7(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*b7(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Ml(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=$7)):e===void 0&&(e=v7);for(var n=new yr(t),r,i=[n],o,a,s,l;r=i.pop();)if((a=e(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,s=l-1;s>=0;--s)i.push(o=a[s]=new yr(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(fb)}function x7(){return Ml(this).eachBefore(_7)}function v7(t){return t.children}function $7(t){return Array.isArray(t)?t[1]:null}function _7(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function fb(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function yr(t){this.data=t,this.depth=this.height=0,this.parent=null}yr.prototype=Ml.prototype={constructor:yr,count:o7,each:a7,eachAfter:l7,eachBefore:s7,find:u7,sum:c7,sort:f7,path:h7,ancestors:d7,descendants:g7,leaves:m7,links:y7,copy:x7,[Symbol.iterator]:b7};function Ll(t){return t==null?null:hb(t)}function hb(t){if(typeof t!="function")throw new Error;return t}function br(){return 0}function _i(t){return function(){return t}}const w7=1664525,S7=1013904223,pb=4294967296;function Mh(){let t=1;return()=>(t=(w7*t+S7)%pb)/pb}function T7(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function A7(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function P7(t){return db(t,Mh())}function db(t,e){for(var n=0,r=(t=A7(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&gb(a,o)?++n:(a=C7(i=D7(i,o)),n=0);return a}function D7(t,e){var n,r;if(Lh(e,t))return[e];for(n=0;n<t.length;++n)if(kl(e,t[n])&&Lh(Ko(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(kl(Ko(t[n],t[r]),e)&&kl(Ko(t[n],e),t[r])&&kl(Ko(t[r],e),t[n])&&Lh(mb(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function kl(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function gb(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Lh(t,e){for(var n=0;n<e.length;++n)if(!gb(t,e[n]))return!1;return!0}function C7(t){switch(t.length){case 1:return M7(t[0]);case 2:return Ko(t[0],t[1]);case 3:return mb(t[0],t[1],t[2])}}function M7(t){return{x:t.x,y:t.y,r:t.r}}function Ko(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,l=o-n,u=a-r,c=s-i,f=Math.sqrt(l*l+u*u);return{x:(n+o+l/f*c)/2,y:(r+a+u/f*c)/2,r:(f+i+s)/2}}function mb(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,l=e.r,u=n.x,c=n.y,f=n.r,h=r-a,p=r-u,d=i-s,m=i-c,g=l-o,y=f-o,b=r*r+i*i-o*o,v=b-a*a-s*s+l*l,x=b-u*u-c*c+f*f,_=p*d-h*m,A=(d*x-m*v)/(_*2)-r,w=(m*g-d*y)/_,P=(p*v-h*x)/(_*2)-i,C=(h*y-p*g)/_,B=w*w+C*C-1,$=2*(o+A*w+P*C),k=A*A+P*P-o*o,M=-(Math.abs(B)>1e-6?($+Math.sqrt($*$-4*B*k))/(2*B):k/$);return{x:r+A+w*M,y:i+P+C*M,r:M}}function yb(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,l,u=r*r+a*a;u?(o=e.r+n.r,o*=o,l=t.r+n.r,l*=l,o>l?(i=(u+l-o)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function bb(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function xb(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Rl(t){this._=t,this.next=null,this.previous=null}function vb(t,e){if(!(o=(t=T7(t)).length))return 0;var n,r,i,o,a,s,l,u,c,f,h;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;yb(r,n,i=t[2]),n=new Rl(n),r=new Rl(r),i=new Rl(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<o;++l){yb(n._,r._,i=t[l]),i=new Rl(i),u=r.next,c=n.previous,f=r._.r,h=n._.r;do if(f<=h){if(bb(u._,i._)){r=u,n.next=r,r.previous=n,--l;continue t}f+=u._.r,u=u.next}else{if(bb(c._,i._)){n=c,n.next=r,r.previous=n,--l;continue t}h+=c._.r,c=c.previous}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=xb(n);(i=i.next)!==r;)(s=xb(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=db(n,e),l=0;l<o;++l)n=t[l],n.x-=i.x,n.y-=i.y;return i.r}function L7(t){return vb(t,Mh()),t}function k7(t){return Math.sqrt(t.value)}function R7(){var t=null,e=1,n=1,r=br;function i(o){const a=Mh();return o.x=e/2,o.y=n/2,t?o.eachBefore($b(t)).eachAfter(kh(r,.5,a)).eachBefore(_b(1)):o.eachBefore($b(k7)).eachAfter(kh(br,1,a)).eachAfter(kh(r,o.r/Math.min(e,n),a)).eachBefore(_b(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Ll(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:_i(+o),i):r},i}function $b(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kh(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,l;if(s)for(o=0;o<a;++o)i[o].r+=s;if(l=vb(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=l+s}}}function _b(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function wb(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qo(t,e,n,r,i){for(var o=t.children,a,s=-1,l=o.length,u=t.value&&(r-e)/t.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function E7(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(wb),a}function o(a,s){return function(l){l.children&&Qo(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var u=l.x0,c=l.y0,f=l.x1-n,h=l.y1-n;f<u&&(u=f=(u+f)/2),h<c&&(c=h=(c+h)/2),l.x0=u,l.y0=c,l.x1=f,l.y1=h}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var I7={depth:-1},Sb={},Rh={};function B7(t){return t.id}function N7(t){return t.parentId}function F7(){var t=B7,e=N7,n;function r(i){var o=Array.from(i),a=t,s=e,l,u,c,f,h,p,d,m,g=new Map;if(n!=null){const y=o.map((x,_)=>z7(n(x,_,i))),b=y.map(Tb),v=new Set(y).add("");for(const x of b)v.has(x)||(v.add(x),y.push(x),b.push(Tb(x)),o.push(Rh));a=(x,_)=>y[_],s=(x,_)=>b[_]}for(c=0,l=o.length;c<l;++c)u=o[c],p=o[c]=new yr(u),(d=a(u,c,i))!=null&&(d+="")&&(m=p.id=d,g.set(m,g.has(m)?Sb:p)),(d=s(u,c,i))!=null&&(d+="")&&(p.parent=d);for(c=0;c<l;++c)if(p=o[c],d=p.parent){if(h=g.get(d),!h)throw new Error("missing: "+d);if(h===Sb)throw new Error("ambiguous: "+d);h.children?h.children.push(p):h.children=[p],p.parent=h}else{if(f)throw new Error("multiple roots");f=p}if(!f)throw new Error("no root");if(n!=null){for(;f.data===Rh&&f.children.length===1;)f=f.children[0],--l;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Rh);--y)p.data=null}if(f.parent=I7,f.eachBefore(function(y){y.depth=y.parent.depth+1,--l}).eachBefore(fb),f.parent=null,l>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=Ll(i),r):t},r.parentId=function(i){return arguments.length?(e=Ll(i),r):e},r.path=function(i){return arguments.length?(n=Ll(i),r):n},r}function z7(t){t=`${t}`;let e=t.length;return Eh(t,e-1)&&!Eh(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Tb(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Eh(t,e););return t.slice(0,e)}function Eh(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function O7(t,e){return t.parent===e.parent?1:2}function Ih(t){var e=t.children;return e?e[0]:t.t}function Bh(t){var e=t.children;return e?e[e.length-1]:t.t}function G7(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Y7(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function W7(t,e,n){return t.a.parent===e.parent?t.a:n}function El(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}El.prototype=Object.create(yr.prototype);function X7(t){for(var e=new El(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new El(o[a],a)),i.parent=n;return(e.parent=new El(null,0)).children=[e],e}function V7(){var t=O7,e=1,n=1,r=null;function i(u){var c=X7(u);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)u.eachBefore(l);else{var f=u,h=u,p=u;u.eachBefore(function(b){b.x<f.x&&(f=b),b.x>h.x&&(h=b),b.depth>p.depth&&(p=b)});var d=f===h?1:t(f,h)/2,m=d-f.x,g=e/(h.x+d+m),y=n/(p.depth||1);u.eachBefore(function(b){b.x=(b.x+m)*g,b.y=b.depth*y})}return u}function o(u){var c=u.children,f=u.parent.children,h=u.i?f[u.i-1]:null;if(c){Y7(u);var p=(c[0].z+c[c.length-1].z)/2;h?(u.z=h.z+t(u._,h._),u.m=u.z-p):u.z=p}else h&&(u.z=h.z+t(u._,h._));u.parent.A=s(u,h,u.parent.A||f[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,c,f){if(c){for(var h=u,p=u,d=c,m=h.parent.children[0],g=h.m,y=p.m,b=d.m,v=m.m,x;d=Bh(d),h=Ih(h),d&&h;)m=Ih(m),p=Bh(p),p.a=u,x=d.z+b-h.z-g+t(d._,h._),x>0&&(G7(W7(d,u,f),u,x),g+=x,y+=x),b+=d.m,g+=h.m,v+=m.m,y+=p.m;d&&!Bh(p)&&(p.t=d,p.m+=b-y),h&&!Ih(m)&&(m.t=h,m.m+=g-v,f=u)}return f}function l(u){u.x*=e,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(t=u,i):t},i.size=function(u){return arguments.length?(r=!1,e=+u[0],n=+u[1],i):r?null:[e,n]},i.nodeSize=function(u){return arguments.length?(r=!0,e=+u[0],n=+u[1],i):r?[e,n]:null},i}function Il(t,e,n,r,i){for(var o=t.children,a,s=-1,l=o.length,u=t.value&&(i-n)/t.value;++s<l;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var Ab=(1+Math.sqrt(5))/2;function Pb(t,e,n,r,i,o){for(var a=[],s=e.children,l,u,c=0,f=0,h=s.length,p,d,m=e.value,g,y,b,v,x,_,A;c<h;){p=i-n,d=o-r;do g=s[f++].value;while(!g&&f<h);for(y=b=g,_=Math.max(d/p,p/d)/(m*t),A=g*g*_,x=Math.max(b/A,A/y);f<h;++f){if(g+=u=s[f].value,u<y&&(y=u),u>b&&(b=u),A=g*g*_,v=Math.max(b/A,A/y),v>x){g-=u;break}x=v}a.push(l={value:g,dice:p<d,children:s.slice(c,f)}),l.dice?Qo(l,n,r,i,m?r+=d*g/m:o):Il(l,n,r,m?n+=p*g/m:i,o),m-=g,c=f}return a}const Nh=function t(e){function n(r,i,o,a,s){Pb(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Ab);function Db(){var t=Nh,e=!1,n=1,r=1,i=[0],o=br,a=br,s=br,l=br,u=br;function c(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(f),i=[0],e&&h.eachBefore(wb),h}function f(h){var p=i[h.depth],d=h.x0+p,m=h.y0+p,g=h.x1-p,y=h.y1-p;g<d&&(d=g=(d+g)/2),y<m&&(m=y=(m+y)/2),h.x0=d,h.y0=m,h.x1=g,h.y1=y,h.children&&(p=i[h.depth+1]=o(h)/2,d+=u(h)-p,m+=a(h)-p,g-=s(h)-p,y-=l(h)-p,g<d&&(d=g=(d+g)/2),y<m&&(m=y=(m+y)/2),t(h,d,m,g,y))}return c.round=function(h){return arguments.length?(e=!!h,c):e},c.size=function(h){return arguments.length?(n=+h[0],r=+h[1],c):[n,r]},c.tile=function(h){return arguments.length?(t=hb(h),c):t},c.padding=function(h){return arguments.length?c.paddingInner(h).paddingOuter(h):c.paddingInner()},c.paddingInner=function(h){return arguments.length?(o=typeof h=="function"?h:_i(+h),c):o},c.paddingOuter=function(h){return arguments.length?c.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):c.paddingTop()},c.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:_i(+h),c):a},c.paddingRight=function(h){return arguments.length?(s=typeof h=="function"?h:_i(+h),c):s},c.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:_i(+h),c):l},c.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:_i(+h),c):u},c}function U7(t,e,n,r,i){var o=t.children,a,s=o.length,l,u=new Array(s+1);for(u[0]=l=a=0;a<s;++a)u[a+1]=l+=o[a].value;c(0,s,t.value,e,n,r,i);function c(f,h,p,d,m,g,y){if(f>=h-1){var b=o[f];b.x0=d,b.y0=m,b.x1=g,b.y1=y;return}for(var v=u[f],x=p/2+v,_=f+1,A=h-1;_<A;){var w=_+A>>>1;u[w]<x?_=w+1:A=w}x-u[_-1]<u[_]-x&&f+1<_&&--_;var P=u[_]-v,C=p-P;if(g-d>y-m){var B=p?(d*C+g*P)/p:g;c(f,_,P,d,m,B,y),c(_,h,C,B,m,g,y)}else{var $=p?(m*C+y*P)/p:y;c(f,_,P,d,m,g,$),c(_,h,C,d,$,g,y)}}}function H7(t,e,n,r,i){(t.depth&1?Il:Qo)(t,e,n,r,i)}const j7=function t(e){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===e)for(var l,u,c,f,h=-1,p,d=l.length,m=r.value;++h<d;){for(u=l[h],c=u.children,f=u.value=0,p=c.length;f<p;++f)u.value+=c[f].value;u.dice?Qo(u,i,o,a,m?o+=(s-o)*u.value/m:s):Il(u,i,o,m?i+=(a-i)*u.value/m:a,s),m-=u.value}else r._squarify=l=Pb(e,r,i,o,a,s),l.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Ab);function q7(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function Z7(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,l=0;++e<n;)o=a,a=t[e],l+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[r/l,i/l]}function K7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Q7(t,e){return t[0]-e[0]||t[1]-e[1]}function Cb(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&K7(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function J7(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Q7),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Cb(r),a=Cb(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(e=o.length-1;e>=0;--e)u.push(t[r[o[e]][2]]);for(e=+s;e<a.length-l;++e)u.push(t[r[a[e]][2]]);return u}function tk(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],l,u,c=!1,f=0;f<n;++f)r=t[f],l=r[0],u=r[1],u>o!=s>o&&i<(a-l)*(o-u)/(s-u)+l&&(c=!c),a=l,s=u;return c}function ek(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],l=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,l+=Math.hypot(i,o);return l}const Ot=Math.random,nk=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Ot),rk=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Ot),Fh=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Ot),ik=function t(e){var n=Fh.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Ot),Mb=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Ot),ok=function t(e){var n=Mb.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Ot),ak=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Ot),sk=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Ot),lk=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Ot),Lb=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Ot),zh=function t(e){var n=Fh.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),l=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var u=n(),c=1+s*u;while(c<=0);c*=c*c;var f=1-e()}while(f>=1-.0331*u*u*u*u&&Math.log(f)>=.5*u*u+a*(1-c+Math.log(c)));return a*c*l()*o}}return r.source=t,r}(Ot),kb=function t(e){var n=zh.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var l=a();return l===0?0:l/(l+s())}}return r.source=t,r}(Ot),Rb=function t(e){var n=Lb.source(e),r=kb.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,l=o,u=a;l*u>16&&l*(1-u)>16;){var c=Math.floor((l+1)*u),f=r(c,l-c+1)();f<=u?(s+=c,l-=c,u=(u-f)/(1-f)):(l=c-1,u/=f)}for(var h=u<.5,p=h?u:1-u,d=n(p),m=d(),g=0;m<=l;++g)m+=d();return s+(h?g:l-g)}}return i.source=t,i}(Ot),uk=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Ot),ck=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Ot),fk=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Ot),hk=function t(e){var n=zh.source(e),r=Rb.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var l=Math.floor(.875*s),u=n(l)();if(u>s)return a+r(l-1,s/u)();a+=l,s-=u}for(var c=-Math.log1p(-e()),f=0;c<=s;++f)c-=Math.log1p(-e());return a+f}}return i.source=t,i}(Ot),pk=1664525,dk=1013904223,Eb=1/4294967296;function gk(t=Math.random()){let e=(0<=t&&t<1?t/Eb:Math.abs(t))|0;return()=>(e=pk*e+dk|0,Eb*(e>>>0))}function we(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function fn(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Oh=Symbol("implicit");function Gh(){var t=new oo,e=[],n=[],r=Oh;function i(o){let a=t.get(o);if(a===void 0){if(r!==Oh)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new oo;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Gh(e,n).unknown(r)},we.apply(i,arguments),i}function Yh(){var t=Gh().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,l=0,u=0,c=.5;delete t.unknown;function f(){var h=e().length,p=i<r,d=p?i:r,m=p?r:i;o=(m-d)/Math.max(1,h-l+u*2),s&&(o=Math.floor(o)),d+=(m-d-o*(h-l))*c,a=o*(1-l),s&&(d=Math.round(d),a=Math.round(a));var g=Sn(h).map(function(y){return d+o*y});return n(p?g.reverse():g)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,f()):s},t.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},t.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},t.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},t.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},t.copy=function(){return Yh(e(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},we.apply(f(),arguments)}function Ib(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ib(e())},t}function Wh(){return Ib(Yh.apply(null,arguments).paddingInner(1))}function mk(t){return function(){return t}}function Bl(t){return+t}var Bb=[0,1];function re(t){return t}function Xh(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:mk(isNaN(e)?NaN:.5)}function yk(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function bk(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Xh(i,r),o=n(a,o)):(r=Xh(r,i),o=n(o,a)),function(s){return o(r(s))}}function xk(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Xh(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var l=jn(t,s,1,r)-1;return o[l](i[l](s))}}function Jo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Nl(){var t=Bb,e=Bb,n=nn,r,i,o,a=re,s,l,u;function c(){var h=Math.min(t.length,e.length);return a!==re&&(a=yk(t[0],t[h-1])),s=h>2?xk:bk,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((u||(u=s(e,t.map(r),ve)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Bl),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=ws,c()},f.clamp=function(h){return arguments.length?(a=h?!0:re,c()):a!==re},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function Vh(){return Nl()(re,re)}function Nb(t,e,n,r){var i=Ja(t,e,n),o;switch(r=di(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=jy(i,a))&&(r.precision=o),Nf(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=qy(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Hy(i))&&(r.precision=o-(r.type==="%")*2);break}}return Mo(r)}function Ln(t){var e=t.domain;return t.ticks=function(n){var r=e();return Zn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Nb(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);c-- >0;){if(u=Kn(a,s,n),u===l)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function xr(){var t=Vh();return t.copy=function(){return Jo(t,xr())},we.apply(t,arguments),Ln(t)}function Fb(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Bl),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Fb(t).unknown(e)},t=arguments.length?Array.from(t,Bl):[0,1],Ln(n)}function zb(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Ob(t){return Math.log(t)}function Gb(t){return Math.exp(t)}function vk(t){return-Math.log(-t)}function $k(t){return-Math.exp(-t)}function _k(t){return isFinite(t)?+("1e"+t):t<0?0:t}function wk(t){return t===10?_k:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Sk(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Yb(t){return(e,n)=>-t(-e,n)}function Uh(t){const e=t(Ob,Gb),n=e.domain;let r=10,i,o;function a(){return i=Sk(r),o=wk(r),n()[0]<0?(i=Yb(i),o=Yb(o),t(vk,$k)):t(Ob,Gb),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let h=i(u),p=i(c),d,m;const g=s==null?10:+s;let y=[];if(!(r%1)&&p-h<g){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(d=1;d<r;++d)if(m=h<0?d/o(-h):d*o(h),!(m<u)){if(m>c)break;y.push(m)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(m=h>0?d/o(-h):d*o(h),!(m<u)){if(m>c)break;y.push(m)}y.length*2<g&&(y=Zn(u,c,g))}else y=Zn(h,p,Math.min(p-h,g)).map(o);return f?y.reverse():y},e.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=di(l)).precision==null&&(l.trim=!0),l=Mo(l)),s===1/0)return l;const u=Math.max(1,r*s/e.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},e.nice=()=>n(zb(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Wb(){const t=Uh(Nl()).domain([1,10]);return t.copy=()=>Jo(t,Wb()).base(t.base()),we.apply(t,arguments),t}function Xb(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Vb(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hh(t){var e=1,n=t(Xb(e),Vb(e));return n.constant=function(r){return arguments.length?t(Xb(e=+r),Vb(e)):e},Ln(n)}function Ub(){var t=Hh(Nl());return t.copy=function(){return Jo(t,Ub()).constant(t.constant())},we.apply(t,arguments)}function Hb(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Tk(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ak(t){return t<0?-t*t:t*t}function jh(t){var e=t(re,re),n=1;function r(){return n===1?t(re,re):n===.5?t(Tk,Ak):t(Hb(n),Hb(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},Ln(e)}function kn(){var t=jh(Nl());return t.copy=function(){return Jo(t,kn()).exponent(t.exponent())},we.apply(t,arguments),t}function Pk(){return kn.apply(null,arguments).exponent(.5)}function jb(t){return Math.sign(t)*t*t}function Dk(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function qb(){var t=Vh(),e=[0,1],n=!1,r;function i(o){var a=Dk(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(jb(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Bl)).map(jb)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return qb(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},we.apply(i,arguments),Ln(i)}function Zb(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=E0(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[jn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(wt),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Zb().domain(t).range(e).unknown(r)},we.apply(o,arguments)}function Kb(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[jn(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*e-(l-n)*t)/(n+1);return a}return a.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,s()):[t,e]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Kb().domain([t,e]).range(i).unknown(o)},we.apply(Ln(a),arguments)}function Qb(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[jn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Qb().domain(t).range(e).unknown(n)},we.apply(i,arguments)}const qh=new Date,Zh=new Date;function Mt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let u;do l.push(u=new Date(+o)),e(o,s),t(o);while(u<o&&o<a);return l},i.filter=o=>Mt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(qh.setTime(+o),Zh.setTime(+a),t(qh),t(Zh),Math.floor(n(qh,Zh))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const wi=Mt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);wi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Mt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):wi);const Jb=wi.range,hn=1e3,Se=hn*60,pn=Se*60,dn=pn*24,Kh=dn*7,tx=dn*30,Qh=dn*365,gn=Mt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*hn)},(t,e)=>(e-t)/hn,t=>t.getUTCSeconds()),ex=gn.range,Fl=Mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*hn)},(t,e)=>{t.setTime(+t+e*Se)},(t,e)=>(e-t)/Se,t=>t.getMinutes()),Ck=Fl.range,zl=Mt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Se)},(t,e)=>(e-t)/Se,t=>t.getUTCMinutes()),Mk=zl.range,Ol=Mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*hn-t.getMinutes()*Se)},(t,e)=>{t.setTime(+t+e*pn)},(t,e)=>(e-t)/pn,t=>t.getHours()),Lk=Ol.range,Gl=Mt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*pn)},(t,e)=>(e-t)/pn,t=>t.getUTCHours()),kk=Gl.range,Si=Mt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Se)/dn,t=>t.getDate()-1),Rk=Si.range,ta=Mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dn,t=>t.getUTCDate()-1),Ek=ta.range,Jh=Mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dn,t=>Math.floor(t/dn)),Ik=Jh.range;function vr(t){return Mt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Se)/Kh)}const Ti=vr(0),ea=vr(1),nx=vr(2),rx=vr(3),$r=vr(4),ix=vr(5),ox=vr(6),ax=Ti.range,Bk=ea.range,Nk=nx.range,Fk=rx.range,zk=$r.range,Ok=ix.range,Gk=ox.range;function _r(t){return Mt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Kh)}const Ai=_r(0),na=_r(1),sx=_r(2),lx=_r(3),wr=_r(4),ux=_r(5),cx=_r(6),fx=Ai.range,Yk=na.range,Wk=sx.range,Xk=lx.range,Vk=wr.range,Uk=ux.range,Hk=cx.range,Yl=Mt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),jk=Yl.range,Wl=Mt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),qk=Wl.range,Ke=Mt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Ke.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Mt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const Zk=Ke.range,Qe=Mt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Qe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Mt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const Kk=Qe.range;function hx(t,e,n,r,i,o){const a=[[gn,1,hn],[gn,5,5*hn],[gn,15,15*hn],[gn,30,30*hn],[o,1,Se],[o,5,5*Se],[o,15,15*Se],[o,30,30*Se],[i,1,pn],[i,3,3*pn],[i,6,6*pn],[i,12,12*pn],[r,1,dn],[r,2,2*dn],[n,1,Kh],[e,1,tx],[e,3,3*tx],[t,1,Qh]];function s(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),d=p?p.range(u,+c+1):[];return h?d.reverse():d}function l(u,c,f){const h=Math.abs(c-u)/f,p=qa(([,,g])=>g).right(a,h);if(p===a.length)return t.every(Ja(u/Qh,c/Qh,f));if(p===0)return wi.every(Math.max(Ja(u,c,f),1));const[d,m]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return d.every(m)}return[s,l]}const[px,dx]=hx(Qe,Wl,Ai,Jh,Gl,zl),[gx,mx]=hx(Ke,Yl,Ti,Si,Ol,Fl);function tp(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ep(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ra(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function yx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,u=ia(i),c=oa(i),f=ia(o),h=oa(o),p=ia(a),d=oa(a),m=ia(s),g=oa(s),y=ia(l),b=oa(l),v={a:F,A:z,b:I,B:N,c:null,d:wx,e:wx,f:v9,g:M9,G:k9,H:y9,I:b9,j:x9,L:Sx,m:$9,M:_9,p:E,q:O,Q:Mx,s:Lx,S:w9,u:S9,U:T9,V:A9,w:P9,W:D9,x:null,X:null,y:C9,Y:L9,Z:R9,"%":Cx},x={a:j,A:it,b:W,B:Q,c:null,d:Ax,e:Ax,f:N9,g:H9,G:q9,H:E9,I:I9,j:B9,L:Px,m:F9,M:z9,p:X,q:K,Q:Mx,s:Lx,S:O9,u:G9,U:Y9,V:W9,w:X9,W:V9,x:null,X:null,y:U9,Y:j9,Z:Z9,"%":Cx},_={a:B,A:$,b:k,B:M,c:T,d:$x,e:$x,f:p9,g:vx,G:xx,H:_x,I:_x,j:u9,L:h9,m:l9,M:c9,p:C,q:s9,Q:g9,s:m9,S:f9,u:n9,U:r9,V:i9,w:e9,W:o9,x:S,X:D,y:vx,Y:xx,Z:a9,"%":d9};v.x=A(n,v),v.X=A(r,v),v.c=A(e,v),x.x=A(n,x),x.X=A(r,x),x.c=A(e,x);function A(q,nt){return function(st){var U=[],mt=-1,ft=0,Et=q.length,ie,lt,Dt;for(st instanceof Date||(st=new Date(+st));++mt<Et;)q.charCodeAt(mt)===37&&(U.push(q.slice(ft,mt)),(lt=bx[ie=q.charAt(++mt)])!=null?ie=q.charAt(++mt):lt=ie==="e"?" ":"0",(Dt=nt[ie])&&(ie=Dt(st,lt)),U.push(ie),ft=mt+1);return U.push(q.slice(ft,mt)),U.join("")}}function w(q,nt){return function(st){var U=ra(1900,void 0,1),mt=P(U,q,st+="",0),ft,Et;if(mt!=st.length)return null;if("Q"in U)return new Date(U.Q);if("s"in U)return new Date(U.s*1e3+("L"in U?U.L:0));if(nt&&!("Z"in U)&&(U.Z=0),"p"in U&&(U.H=U.H%12+U.p*12),U.m===void 0&&(U.m="q"in U?U.q:0),"V"in U){if(U.V<1||U.V>53)return null;"w"in U||(U.w=1),"Z"in U?(ft=ep(ra(U.y,0,1)),Et=ft.getUTCDay(),ft=Et>4||Et===0?na.ceil(ft):na(ft),ft=ta.offset(ft,(U.V-1)*7),U.y=ft.getUTCFullYear(),U.m=ft.getUTCMonth(),U.d=ft.getUTCDate()+(U.w+6)%7):(ft=tp(ra(U.y,0,1)),Et=ft.getDay(),ft=Et>4||Et===0?ea.ceil(ft):ea(ft),ft=Si.offset(ft,(U.V-1)*7),U.y=ft.getFullYear(),U.m=ft.getMonth(),U.d=ft.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),Et="Z"in U?ep(ra(U.y,0,1)).getUTCDay():tp(ra(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(Et+5)%7:U.w+U.U*7-(Et+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,ep(U)):tp(U)}}function P(q,nt,st,U){for(var mt=0,ft=nt.length,Et=st.length,ie,lt;mt<ft;){if(U>=Et)return-1;if(ie=nt.charCodeAt(mt++),ie===37){if(ie=nt.charAt(mt++),lt=_[ie in bx?nt.charAt(mt++):ie],!lt||(U=lt(q,st,U))<0)return-1}else if(ie!=st.charCodeAt(U++))return-1}return U}function C(q,nt,st){var U=u.exec(nt.slice(st));return U?(q.p=c.get(U[0].toLowerCase()),st+U[0].length):-1}function B(q,nt,st){var U=p.exec(nt.slice(st));return U?(q.w=d.get(U[0].toLowerCase()),st+U[0].length):-1}function $(q,nt,st){var U=f.exec(nt.slice(st));return U?(q.w=h.get(U[0].toLowerCase()),st+U[0].length):-1}function k(q,nt,st){var U=y.exec(nt.slice(st));return U?(q.m=b.get(U[0].toLowerCase()),st+U[0].length):-1}function M(q,nt,st){var U=m.exec(nt.slice(st));return U?(q.m=g.get(U[0].toLowerCase()),st+U[0].length):-1}function T(q,nt,st){return P(q,e,nt,st)}function S(q,nt,st){return P(q,n,nt,st)}function D(q,nt,st){return P(q,r,nt,st)}function F(q){return a[q.getDay()]}function z(q){return o[q.getDay()]}function I(q){return l[q.getMonth()]}function N(q){return s[q.getMonth()]}function E(q){return i[+(q.getHours()>=12)]}function O(q){return 1+~~(q.getMonth()/3)}function j(q){return a[q.getUTCDay()]}function it(q){return o[q.getUTCDay()]}function W(q){return l[q.getUTCMonth()]}function Q(q){return s[q.getUTCMonth()]}function X(q){return i[+(q.getUTCHours()>=12)]}function K(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var nt=A(q+="",v);return nt.toString=function(){return q},nt},parse:function(q){var nt=w(q+="",!1);return nt.toString=function(){return q},nt},utcFormat:function(q){var nt=A(q+="",x);return nt.toString=function(){return q},nt},utcParse:function(q){var nt=w(q+="",!0);return nt.toString=function(){return q},nt}}}var bx={"-":"",_:" ",0:"0"},Ft=/^\s*\d+/,Qk=/^%/,Jk=/[\\^$*+?|[\]().{}]/g;function yt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function t9(t){return t.replace(Jk,"\\$&")}function ia(t){return new RegExp("^(?:"+t.map(t9).join("|")+")","i")}function oa(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function e9(t,e,n){var r=Ft.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function n9(t,e,n){var r=Ft.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function r9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function i9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function o9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function xx(t,e,n){var r=Ft.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function vx(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function a9(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function s9(t,e,n){var r=Ft.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function l9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function $x(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function u9(t,e,n){var r=Ft.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function _x(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function c9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function f9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function h9(t,e,n){var r=Ft.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function p9(t,e,n){var r=Ft.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function d9(t,e,n){var r=Qk.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function g9(t,e,n){var r=Ft.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function m9(t,e,n){var r=Ft.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function wx(t,e){return yt(t.getDate(),e,2)}function y9(t,e){return yt(t.getHours(),e,2)}function b9(t,e){return yt(t.getHours()%12||12,e,2)}function x9(t,e){return yt(1+Si.count(Ke(t),t),e,3)}function Sx(t,e){return yt(t.getMilliseconds(),e,3)}function v9(t,e){return Sx(t,e)+"000"}function $9(t,e){return yt(t.getMonth()+1,e,2)}function _9(t,e){return yt(t.getMinutes(),e,2)}function w9(t,e){return yt(t.getSeconds(),e,2)}function S9(t){var e=t.getDay();return e===0?7:e}function T9(t,e){return yt(Ti.count(Ke(t)-1,t),e,2)}function Tx(t){var e=t.getDay();return e>=4||e===0?$r(t):$r.ceil(t)}function A9(t,e){return t=Tx(t),yt($r.count(Ke(t),t)+(Ke(t).getDay()===4),e,2)}function P9(t){return t.getDay()}function D9(t,e){return yt(ea.count(Ke(t)-1,t),e,2)}function C9(t,e){return yt(t.getFullYear()%100,e,2)}function M9(t,e){return t=Tx(t),yt(t.getFullYear()%100,e,2)}function L9(t,e){return yt(t.getFullYear()%1e4,e,4)}function k9(t,e){var n=t.getDay();return t=n>=4||n===0?$r(t):$r.ceil(t),yt(t.getFullYear()%1e4,e,4)}function R9(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+yt(e/60|0,"0",2)+yt(e%60,"0",2)}function Ax(t,e){return yt(t.getUTCDate(),e,2)}function E9(t,e){return yt(t.getUTCHours(),e,2)}function I9(t,e){return yt(t.getUTCHours()%12||12,e,2)}function B9(t,e){return yt(1+ta.count(Qe(t),t),e,3)}function Px(t,e){return yt(t.getUTCMilliseconds(),e,3)}function N9(t,e){return Px(t,e)+"000"}function F9(t,e){return yt(t.getUTCMonth()+1,e,2)}function z9(t,e){return yt(t.getUTCMinutes(),e,2)}function O9(t,e){return yt(t.getUTCSeconds(),e,2)}function G9(t){var e=t.getUTCDay();return e===0?7:e}function Y9(t,e){return yt(Ai.count(Qe(t)-1,t),e,2)}function Dx(t){var e=t.getUTCDay();return e>=4||e===0?wr(t):wr.ceil(t)}function W9(t,e){return t=Dx(t),yt(wr.count(Qe(t),t)+(Qe(t).getUTCDay()===4),e,2)}function X9(t){return t.getUTCDay()}function V9(t,e){return yt(na.count(Qe(t)-1,t),e,2)}function U9(t,e){return yt(t.getUTCFullYear()%100,e,2)}function H9(t,e){return t=Dx(t),yt(t.getUTCFullYear()%100,e,2)}function j9(t,e){return yt(t.getUTCFullYear()%1e4,e,4)}function q9(t,e){var n=t.getUTCDay();return t=n>=4||n===0?wr(t):wr.ceil(t),yt(t.getUTCFullYear()%1e4,e,4)}function Z9(){return"+0000"}function Cx(){return"%"}function Mx(t){return+t}function Lx(t){return Math.floor(+t/1e3)}var Pi,np,kx,Xl,rp;Rx({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Rx(t){return Pi=yx(t),np=Pi.format,kx=Pi.parse,Xl=Pi.utcFormat,rp=Pi.utcParse,Pi}var Ex="%Y-%m-%dT%H:%M:%S.%LZ";function K9(t){return t.toISOString()}var Q9=Date.prototype.toISOString?K9:Xl(Ex);const J9=Q9;function tR(t){var e=new Date(t);return isNaN(e)?null:e}var eR=+new Date("2000-01-01T00:00:00.000Z")?tR:rp(Ex);const nR=eR;function rR(t){return new Date(t)}function iR(t){return t instanceof Date?+t:+new Date(+t)}function ip(t,e,n,r,i,o,a,s,l,u){var c=Vh(),f=c.invert,h=c.domain,p=u(".%L"),d=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),b=u("%b %d"),v=u("%B"),x=u("%Y");function _(A){return(l(A)<A?p:s(A)<A?d:a(A)<A?m:o(A)<A?g:r(A)<A?i(A)<A?y:b:n(A)<A?v:x)(A)}return c.invert=function(A){return new Date(f(A))},c.domain=function(A){return arguments.length?h(Array.from(A,iR)):h().map(rR)},c.ticks=function(A){var w=h();return t(w[0],w[w.length-1],A??10)},c.tickFormat=function(A,w){return w==null?_:u(w)},c.nice=function(A){var w=h();return(!A||typeof A.range!="function")&&(A=e(w[0],w[w.length-1],A??10)),A?h(zb(w,A)):c},c.copy=function(){return Jo(c,ip(t,e,n,r,i,o,a,s,l,u))},c}function oR(){return we.apply(ip(gx,mx,Ke,Yl,Ti,Si,Ol,Fl,gn,np).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function aR(){return we.apply(ip(px,dx,Qe,Wl,Ai,ta,Gl,zl,gn,Xl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vl(){var t=0,e=1,n,r,i,o,a=re,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:a(i===0?.5:(f=(o(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([t,e]=f,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),u):[t,e]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(a=f,u):a};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,a=f(p,d),u):[a(0),a(1)]}}return u.range=c(nn),u.rangeRound=c(ws),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return o=f,n=f(t),r=f(e),i=n===r?0:1/(r-n),u}}function Rn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ix(){var t=Ln(Vl()(re));return t.copy=function(){return Rn(t,Ix())},fn.apply(t,arguments)}function Bx(){var t=Uh(Vl()).domain([1,10]);return t.copy=function(){return Rn(t,Bx()).base(t.base())},fn.apply(t,arguments)}function Nx(){var t=Hh(Vl());return t.copy=function(){return Rn(t,Nx()).constant(t.constant())},fn.apply(t,arguments)}function op(){var t=jh(Vl());return t.copy=function(){return Rn(t,op()).exponent(t.exponent())},fn.apply(t,arguments)}function sR(){return op.apply(null,arguments).exponent(.5)}function Fx(){var t=[],e=re;function n(r){if(r!=null&&!isNaN(r=+r))return e((jn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(wt),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>lo(t,o/r))},n.copy=function(){return Fx(e).domain(t)},fn.apply(n,arguments)}function Ul(){var t=0,e=.5,n=1,r=1,i,o,a,s,l,u=re,c,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-o)*(r*m<r*o?s:l),u(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([t,e,n]=m,i=c(t=+t),o=c(e=+e),a=c(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(u=m,p):u};function d(m){return function(g){var y,b,v;return arguments.length?([y,b,v]=g,u=Ym(m,[y,b,v]),p):[u(0),u(.5),u(1)]}}return p.range=d(nn),p.rangeRound=d(ws),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return c=m,i=m(t),o=m(e),a=m(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function zx(){var t=Ln(Ul()(re));return t.copy=function(){return Rn(t,zx())},fn.apply(t,arguments)}function Ox(){var t=Uh(Ul()).domain([.1,1,10]);return t.copy=function(){return Rn(t,Ox()).base(t.base())},fn.apply(t,arguments)}function Gx(){var t=Hh(Ul());return t.copy=function(){return Rn(t,Gx()).constant(t.constant())},fn.apply(t,arguments)}function ap(){var t=jh(Ul());return t.copy=function(){return Rn(t,ap()).exponent(t.exponent())},fn.apply(t,arguments)}function lR(){return ap.apply(null,arguments).exponent(.5)}function ct(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const uR=ct("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),cR=ct("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),fR=ct("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),hR=ct("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),pR=ct("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),dR=ct("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),gR=ct("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),mR=ct("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),yR=ct("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bR=ct("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),xR=ct("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$t=t=>Pm(t[t.length-1]);var Yx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ct);const vR=$t(Yx);var Wx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ct);const $R=$t(Wx);var Xx=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ct);const _R=$t(Xx);var Vx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ct);const wR=$t(Vx);var Ux=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ct);const SR=$t(Ux);var Hx=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ct);const TR=$t(Hx);var jx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ct);const AR=$t(jx);var qx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ct);const PR=$t(qx);var Zx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ct);const DR=$t(Zx);var Kx=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ct);const CR=$t(Kx);var Qx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ct);const MR=$t(Qx);var Jx=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ct);const LR=$t(Jx);var tv=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ct);const kR=$t(tv);var ev=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ct);const RR=$t(ev);var nv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ct);const ER=$t(nv);var rv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ct);const IR=$t(rv);var iv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ct);const BR=$t(iv);var ov=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ct);const NR=$t(ov);var av=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ct);const FR=$t(av);var sv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ct);const zR=$t(sv);var lv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ct);const OR=$t(lv);var uv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ct);const GR=$t(uv);var cv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ct);const YR=$t(cv);var fv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ct);const WR=$t(fv);var hv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ct);const XR=$t(hv);var pv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ct);const VR=$t(pv);var dv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ct);const UR=$t(dv);function HR(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const jR=Ts(Ee(300,.5,0),Ee(-240,.5,1));var qR=Ts(Ee(-100,.75,.35),Ee(80,1.5,.8)),ZR=Ts(Ee(260,.75,.35),Ee(80,1.5,.8)),Hl=Ee();function KR(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Hl.h=360*t-100,Hl.s=1.5-1.5*e,Hl.l=.8-.9*e,Hl+""}var jl=ni(),QR=Math.PI/3,JR=Math.PI*2/3;function tE(t){var e;return t=(.5-t)*Math.PI,jl.r=255*(e=Math.sin(t))*e,jl.g=255*(e=Math.sin(t+QR))*e,jl.b=255*(e=Math.sin(t+JR))*e,jl+""}function eE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function ql(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const nE=ql(ct("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var rE=ql(ct("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),iE=ql(ct("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),oE=ql(ct("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ut(t){return function(){return t}}const gv=Math.abs,Xt=Math.atan2,mn=Math.cos,aE=Math.max,Di=Math.min,ce=Math.sin,_t=Math.sqrt,Vt=1e-12,En=Math.PI,Zl=En/2,In=2*En;function sE(t){return t>1?0:t<-1?En:Math.acos(t)}function mv(t){return t>=1?Zl:t<=-1?-Zl:Math.asin(t)}function aa(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Ao(e)}function lE(t){return t.innerRadius}function uE(t){return t.outerRadius}function cE(t){return t.startAngle}function fE(t){return t.endAngle}function hE(t){return t&&t.padAngle}function pE(t,e,n,r,i,o,a,s){var l=n-t,u=r-e,c=a-i,f=s-o,h=f*l-c*u;if(!(h*h<Vt))return h=(c*(e-o)-f*(t-i))/h,[t+h*l,e+h*u]}function Kl(t,e,n,r,i,o,a){var s=t-n,l=e-r,u=(a?o:-o)/_t(s*s+l*l),c=u*l,f=-u*s,h=t+c,p=e+f,d=n+c,m=r+f,g=(h+d)/2,y=(p+m)/2,b=d-h,v=m-p,x=b*b+v*v,_=i-o,A=h*m-d*p,w=(v<0?-1:1)*_t(aE(0,_*_*x-A*A)),P=(A*v-b*w)/x,C=(-A*b-v*w)/x,B=(A*v+b*w)/x,$=(-A*b+v*w)/x,k=P-g,M=C-y,T=B-g,S=$-y;return k*k+M*M>T*T+S*S&&(P=B,C=$),{cx:P,cy:C,x01:-c,y01:-f,x11:P*(i/_-1),y11:C*(i/_-1)}}function Ql(){var t=lE,e=uE,n=ut(0),r=null,i=cE,o=fE,a=hE,s=null,l=aa(u);function u(){var c,f,h=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-Zl,m=o.apply(this,arguments)-Zl,g=gv(m-d),y=m>d;if(s||(s=c=l()),p<h&&(f=p,p=h,h=f),!(p>Vt))s.moveTo(0,0);else if(g>In-Vt)s.moveTo(p*mn(d),p*ce(d)),s.arc(0,0,p,d,m,!y),h>Vt&&(s.moveTo(h*mn(m),h*ce(m)),s.arc(0,0,h,m,d,y));else{var b=d,v=m,x=d,_=m,A=g,w=g,P=a.apply(this,arguments)/2,C=P>Vt&&(r?+r.apply(this,arguments):_t(h*h+p*p)),B=Di(gv(p-h)/2,+n.apply(this,arguments)),$=B,k=B,M,T;if(C>Vt){var S=mv(C/h*ce(P)),D=mv(C/p*ce(P));(A-=S*2)>Vt?(S*=y?1:-1,x+=S,_-=S):(A=0,x=_=(d+m)/2),(w-=D*2)>Vt?(D*=y?1:-1,b+=D,v-=D):(w=0,b=v=(d+m)/2)}var F=p*mn(b),z=p*ce(b),I=h*mn(_),N=h*ce(_);if(B>Vt){var E=p*mn(v),O=p*ce(v),j=h*mn(x),it=h*ce(x),W;if(g<En)if(W=pE(F,z,j,it,E,O,I,N)){var Q=F-W[0],X=z-W[1],K=E-W[0],q=O-W[1],nt=1/ce(sE((Q*K+X*q)/(_t(Q*Q+X*X)*_t(K*K+q*q)))/2),st=_t(W[0]*W[0]+W[1]*W[1]);$=Di(B,(h-st)/(nt-1)),k=Di(B,(p-st)/(nt+1))}else $=k=0}w>Vt?k>Vt?(M=Kl(j,it,F,z,p,k,y),T=Kl(E,O,I,N,p,k,y),s.moveTo(M.cx+M.x01,M.cy+M.y01),k<B?s.arc(M.cx,M.cy,k,Xt(M.y01,M.x01),Xt(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,k,Xt(M.y01,M.x01),Xt(M.y11,M.x11),!y),s.arc(0,0,p,Xt(M.cy+M.y11,M.cx+M.x11),Xt(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,k,Xt(T.y11,T.x11),Xt(T.y01,T.x01),!y))):(s.moveTo(F,z),s.arc(0,0,p,b,v,!y)):s.moveTo(F,z),!(h>Vt)||!(A>Vt)?s.lineTo(I,N):$>Vt?(M=Kl(I,N,E,O,h,-$,y),T=Kl(F,z,j,it,h,-$,y),s.lineTo(M.cx+M.x01,M.cy+M.y01),$<B?s.arc(M.cx,M.cy,$,Xt(M.y01,M.x01),Xt(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,$,Xt(M.y01,M.x01),Xt(M.y11,M.x11),!y),s.arc(0,0,h,Xt(M.cy+M.y11,M.cx+M.x11),Xt(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,$,Xt(T.y11,T.x11),Xt(T.y01,T.x01),!y))):s.arc(0,0,h,_,x,y)}if(s.closePath(),c)return s=null,c+""||null}return u.centroid=function(){var c=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-En/2;return[mn(f)*c,ce(f)*c]},u.innerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ut(+c),u):t},u.outerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:ut(+c),u):e},u.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:ut(+c),u):n},u.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:ut(+c),u):r},u.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:ut(+c),u):i},u.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:ut(+c),u):o},u.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ut(+c),u):a},u.context=function(c){return arguments.length?(s=c??null,u):s},u}var dE=Array.prototype.slice;function Jl(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yv(t){this._context=t}yv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function tu(t){return new yv(t)}function sp(t){return t[0]}function lp(t){return t[1]}function eu(t,e){var n=ut(!0),r=null,i=tu,o=null,a=aa(s);t=typeof t=="function"?t:t===void 0?sp:ut(t),e=typeof e=="function"?e:e===void 0?lp:ut(e);function s(l){var u,c=(l=Jl(l)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),u=0;u<=c;++u)!(u<c&&n(f=l[u],u,l))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(f,u,l),+e(f,u,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:ut(+l),s):t},s.y=function(l){return arguments.length?(e=typeof l=="function"?l:ut(+l),s):e},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ut(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function up(t,e,n){var r=null,i=ut(!0),o=null,a=tu,s=null,l=aa(u);t=typeof t=="function"?t:t===void 0?sp:ut(+t),e=typeof e=="function"?e:ut(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?lp:ut(+n);function u(f){var h,p,d,m=(f=Jl(f)).length,g,y=!1,b,v=new Array(m),x=new Array(m);for(o==null&&(s=a(b=l())),h=0;h<=m;++h){if(!(h<m&&i(g=f[h],h,f))===y)if(y=!y)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=h-1;d>=p;--d)s.point(v[d],x[d]);s.lineEnd(),s.areaEnd()}y&&(v[h]=+t(g,h,f),x[h]=+e(g,h,f),s.point(r?+r(g,h,f):v[h],n?+n(g,h,f):x[h]))}if(b)return s=null,b+""||null}function c(){return eu().defined(i).curve(a).context(o)}return u.x=function(f){return arguments.length?(t=typeof f=="function"?f:ut(+f),r=null,u):t},u.x0=function(f){return arguments.length?(t=typeof f=="function"?f:ut(+f),u):t},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ut(+f),u):r},u.y=function(f){return arguments.length?(e=typeof f=="function"?f:ut(+f),n=null,u):e},u.y0=function(f){return arguments.length?(e=typeof f=="function"?f:ut(+f),u):e},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ut(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ut(!!f),u):i},u.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),u):a},u.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),u):o},u}function gE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function mE(t){return t}function bv(){var t=mE,e=gE,n=null,r=ut(0),i=ut(In),o=ut(0);function a(s){var l,u=(s=Jl(s)).length,c,f,h=0,p=new Array(u),d=new Array(u),m=+r.apply(this,arguments),g=Math.min(In,Math.max(-In,i.apply(this,arguments)-m)),y,b=Math.min(Math.abs(g)/u,o.apply(this,arguments)),v=b*(g<0?-1:1),x;for(l=0;l<u;++l)(x=d[p[l]=l]=+t(s[l],l,s))>0&&(h+=x);for(e!=null?p.sort(function(_,A){return e(d[_],d[A])}):n!=null&&p.sort(function(_,A){return n(s[_],s[A])}),l=0,f=h?(g-u*v)/h:0;l<u;++l,m=y)c=p[l],x=d[c],y=m+(x>0?x*f:0)+v,d[c]={data:s[c],index:l,value:x,startAngle:m,endAngle:y,padAngle:b};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ut(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ut(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ut(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ut(+s),a):o},a}var xv=cp(tu);function vv(t){this._curve=t}vv.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function cp(t){function e(n){return new vv(t(n))}return e._curve=t,e}function sa(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(cp(n)):e()._curve},t}function $v(){return sa(eu().curve(xv))}function _v(){var t=up().curve(xv),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return sa(n())},delete t.lineX0,t.lineEndAngle=function(){return sa(r())},delete t.lineX1,t.lineInnerRadius=function(){return sa(i())},delete t.lineY0,t.lineOuterRadius=function(){return sa(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(cp(a)):e()._curve},t}function la(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class wv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class yE{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=la(this._x0,this._y0),i=la(this._x0,this._y0=(this._y0+n)/2),o=la(e,this._y0),a=la(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Sv(t){return new wv(t,!0)}function Tv(t){return new wv(t,!1)}function bE(t){return new yE(t)}function xE(t){return t.source}function vE(t){return t.target}function nu(t){let e=xE,n=vE,r=sp,i=lp,o=null,a=null,s=aa(l);function l(){let u;const c=dE.call(arguments),f=e.apply(this,c),h=n.apply(this,c);if(o==null&&(a=t(u=s())),a.lineStart(),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=h,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),u)return a=null,u+""||null}return l.source=function(u){return arguments.length?(e=u,l):e},l.target=function(u){return arguments.length?(n=u,l):n},l.x=function(u){return arguments.length?(r=typeof u=="function"?u:ut(+u),l):r},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:ut(+u),l):i},l.context=function(u){return arguments.length?(u==null?o=a=null:a=t(o=u),l):o},l}function $E(){return nu(Sv)}function _E(){return nu(Tv)}function wE(){const t=nu(bE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const SE=_t(3),Av={draw(t,e){const n=_t(e+Di(e/28,.75))*.59436,r=n/2,i=r*SE;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},ru={draw(t,e){const n=_t(e/En);t.moveTo(n,0),t.arc(0,0,n,0,In)}},Pv={draw(t,e){const n=_t(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Dv=_t(1/3),TE=Dv*2,Cv={draw(t,e){const n=_t(e/TE),r=n*Dv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Mv={draw(t,e){const n=_t(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Lv={draw(t,e){const n=_t(e-Di(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},kv={draw(t,e){const n=_t(e),r=-n/2;t.rect(r,r,n,n)}},Rv={draw(t,e){const n=_t(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},AE=.8908130915292852,Ev=ce(En/10)/ce(7*En/10),PE=ce(In/10)*Ev,DE=-mn(In/10)*Ev,Iv={draw(t,e){const n=_t(e*AE),r=PE*n,i=DE*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=In*o/5,s=mn(a),l=ce(a);t.lineTo(l*n,-s*n),t.lineTo(s*r-l*i,l*r+s*i)}t.closePath()}},fp=_t(3),Bv={draw(t,e){const n=-_t(e/(fp*3));t.moveTo(0,n*2),t.lineTo(-fp*n,-n),t.lineTo(fp*n,-n),t.closePath()}},CE=_t(3),Nv={draw(t,e){const n=_t(e)*.6824,r=n/2,i=n*CE/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},Te=-.5,Ae=_t(3)/2,hp=1/_t(12),ME=(hp/2+1)*3,Fv={draw(t,e){const n=_t(e/ME),r=n/2,i=n*hp,o=r,a=n*hp+n,s=-o,l=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,l),t.lineTo(Te*r-Ae*i,Ae*r+Te*i),t.lineTo(Te*o-Ae*a,Ae*o+Te*a),t.lineTo(Te*s-Ae*l,Ae*s+Te*l),t.lineTo(Te*r+Ae*i,Te*i-Ae*r),t.lineTo(Te*o+Ae*a,Te*a-Ae*o),t.lineTo(Te*s+Ae*l,Te*l-Ae*s),t.closePath()}},pp={draw(t,e){const n=_t(e-Di(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},zv=[ru,Pv,Cv,kv,Iv,Bv,Fv],LE=[ru,Lv,pp,Nv,Av,Rv,Mv];function kE(t,e){let n=null,r=aa(i);t=typeof t=="function"?t:ut(t||ru),e=typeof e=="function"?e:ut(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:ut(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:ut(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Bn(){}function iu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ou(t){this._context=t}ou.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:iu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:iu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function RE(t){return new ou(t)}function Ov(t){this._context=t}Ov.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:iu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function EE(t){return new Ov(t)}function Gv(t){this._context=t}Gv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:iu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function IE(t){return new Gv(t)}function Yv(t,e){this._basis=new ou(t),this._beta=e}Yv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+l*o),this._beta*e[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const BE=function t(e){function n(r){return e===1?new ou(r):new Yv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function au(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function dp(t,e){this._context=t,this._k=(1-e)/6}dp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:au(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:au(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const NE=function t(e){function n(r){return new dp(r,e)}return n.tension=function(r){return t(+r)},n}(0);function gp(t,e){this._context=t,this._k=(1-e)/6}gp.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:au(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const FE=function t(e){function n(r){return new gp(r,e)}return n.tension=function(r){return t(+r)},n}(0);function mp(t,e){this._context=t,this._k=(1-e)/6}mp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:au(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zE=function t(e){function n(r){return new mp(r,e)}return n.tension=function(r){return t(+r)},n}(0);function yp(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Vt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Wv(t,e){this._context=t,this._alpha=e}Wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:yp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const OE=function t(e){function n(r){return e?new Wv(r,e):new dp(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Xv(t,e){this._context=t,this._alpha=e}Xv.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:yp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const GE=function t(e){function n(r){return e?new Xv(r,e):new gp(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Vv(t,e){this._context=t,this._alpha=e}Vv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const YE=function t(e){function n(r){return e?new Vv(r,e):new mp(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Uv(t){this._context=t}Uv.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function WE(t){return new Uv(t)}function Hv(t){return t<0?-1:1}function jv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Hv(o)+Hv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function qv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function bp(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function su(t){this._context=t}su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:bp(this,this._t0,qv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,bp(this,qv(this,n=jv(this,t,e)),n);break;default:bp(this,this._t0,n=jv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Zv(t){this._context=new Kv(t)}(Zv.prototype=Object.create(su.prototype)).point=function(t,e){su.prototype.point.call(this,e,t)};function Kv(t){this._context=t}Kv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function XE(t){return new su(t)}function VE(t){return new Zv(t)}function Qv(t){this._context=t}Qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Jv(t),i=Jv(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Jv(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function UE(t){return new Qv(t)}function lu(t,e){this._context=t,this._t=e}lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function HE(t){return new lu(t,.5)}function jE(t){return new lu(t,0)}function qE(t){return new lu(t,1)}function Ci(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Mi(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function ZE(t,e){return t[e]}function KE(t){const e=[];return e.key=t,e}function QE(){var t=ut([]),e=Mi,n=Ci,r=ZE;function i(o){var a=Array.from(t.apply(this,arguments),KE),s,l=a.length,u=-1,c;for(const f of o)for(s=0,++u;s<l;++s)(a[s][u]=[0,+r(f,a[s].key,u,o)]).data=f;for(s=0,c=Jl(e(a));s<l;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:ut(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ut(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?Mi:typeof o=="function"?o:ut(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??Ci,i):n},i}function JE(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}Ci(t,e)}}function tI(t,e){if((l=t.length)>0)for(var n,r=0,i,o,a,s,l,u=t[e[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function eI(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Ci(t,e)}}function nI(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=t[e[s]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<s;++d){var m=t[e[d]],g=m[r][1]||0,y=m[r-1][1]||0;p+=g-y}l+=f,u+=p*f}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,Ci(t,e)}}function t$(t){var e=t.map(rI);return Mi(t).sort(function(n,r){return e[n]-e[r]})}function rI(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function e$(t){var e=t.map(n$);return Mi(t).sort(function(n,r){return e[n]-e[r]})}function n$(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function iI(t){return e$(t).reverse()}function oI(t){var e=t.length,n,r,i=t.map(n$),o=t$(t),a=0,s=0,l=[],u=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],l.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(l)}function aI(t){return Mi(t).reverse()}const uu=t=>()=>t;function sI(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Je(t,e,n){this.k=t,this.x=e,this.y=n}Je.prototype={constructor:Je,scale:function(t){return t===1?this:new Je(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Je(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Li=new Je(1,0,0);r$.prototype=Je.prototype;function r$(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Li;return t.__zoom}function xp(t){t.stopImmediatePropagation()}function ua(t){t.preventDefault(),t.stopImmediatePropagation()}function lI(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function uI(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function i$(){return this.__zoom||Li}function cI(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function fI(){return navigator.maxTouchPoints||"ontouchstart"in this}function hI(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function yn(){var t=lI,e=uI,n=hI,r=cI,i=fI,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Fm,u=Qn("start","zoom","end"),c,f,h,p=500,d=150,m=0,g=10;function y(T){T.property("__zoom",i$).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",$).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,S,D,F){var z=T.selection?T.selection():T;z.property("__zoom",i$),T!==z?_(T,S,D,F):z.interrupt().each(function(){A(this,arguments).event(F).start().zoom(null,typeof S=="function"?S.apply(this,arguments):S).end()})},y.scaleBy=function(T,S,D,F){y.scaleTo(T,function(){var z=this.__zoom.k,I=typeof S=="function"?S.apply(this,arguments):S;return z*I},D,F)},y.scaleTo=function(T,S,D,F){y.transform(T,function(){var z=e.apply(this,arguments),I=this.__zoom,N=D==null?x(z):typeof D=="function"?D.apply(this,arguments):D,E=I.invert(N),O=typeof S=="function"?S.apply(this,arguments):S;return n(v(b(I,O),N,E),z,a)},D,F)},y.translateBy=function(T,S,D,F){y.transform(T,function(){return n(this.__zoom.translate(typeof S=="function"?S.apply(this,arguments):S,typeof D=="function"?D.apply(this,arguments):D),e.apply(this,arguments),a)},null,F)},y.translateTo=function(T,S,D,F,z){y.transform(T,function(){var I=e.apply(this,arguments),N=this.__zoom,E=F==null?x(I):typeof F=="function"?F.apply(this,arguments):F;return n(Li.translate(E[0],E[1]).scale(N.k).translate(typeof S=="function"?-S.apply(this,arguments):-S,typeof D=="function"?-D.apply(this,arguments):-D),I,a)},F,z)};function b(T,S){return S=Math.max(o[0],Math.min(o[1],S)),S===T.k?T:new Je(S,T.x,T.y)}function v(T,S,D){var F=S[0]-D[0]*T.k,z=S[1]-D[1]*T.k;return F===T.x&&z===T.y?T:new Je(T.k,F,z)}function x(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function _(T,S,D,F){T.on("start.zoom",function(){A(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(F).end()}).tween("zoom",function(){var z=this,I=arguments,N=A(z,I).event(F),E=e.apply(z,I),O=D==null?x(E):typeof D=="function"?D.apply(z,I):D,j=Math.max(E[1][0]-E[0][0],E[1][1]-E[0][1]),it=z.__zoom,W=typeof S=="function"?S.apply(z,I):S,Q=l(it.invert(O).concat(j/it.k),W.invert(O).concat(j/W.k));return function(X){if(X===1)X=W;else{var K=Q(X),q=j/K[2];X=new Je(q,O[0]-K[0]*q,O[1]-K[1]*q)}N.zoom(null,X)}})}function A(T,S,D){return!D&&T.__zooming||new w(T,S)}function w(T,S){this.that=T,this.args=S,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,S),this.taps=0}w.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,S){return this.mouse&&T!=="mouse"&&(this.mouse[1]=S.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=S.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=S.invert(this.touch1[0])),this.that.__zoom=S,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var S=V(this.that).datum();u.call(T,this.that,new sI(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:u}),S)}};function P(T,...S){if(!t.apply(this,arguments))return;var D=A(this,S).event(T),F=this.__zoom,z=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,r.apply(this,arguments)))),I=ge(T);if(D.wheel)(D.mouse[0][0]!==I[0]||D.mouse[0][1]!==I[1])&&(D.mouse[1]=F.invert(D.mouse[0]=I)),clearTimeout(D.wheel);else{if(F.k===z)return;D.mouse=[I,F.invert(I)],ar(this),D.start()}ua(T),D.wheel=setTimeout(N,d),D.zoom("mouse",n(v(b(F,z),D.mouse[0],D.mouse[1]),D.extent,a));function N(){D.wheel=null,D.end()}}function C(T,...S){if(h||!t.apply(this,arguments))return;var D=T.currentTarget,F=A(this,S,!0).event(T),z=V(T.view).on("mousemove.zoom",O,!0).on("mouseup.zoom",j,!0),I=ge(T,D),N=T.clientX,E=T.clientY;us(T.view),xp(T),F.mouse=[I,this.__zoom.invert(I)],ar(this),F.start();function O(it){if(ua(it),!F.moved){var W=it.clientX-N,Q=it.clientY-E;F.moved=W*W+Q*Q>m}F.event(it).zoom("mouse",n(v(F.that.__zoom,F.mouse[0]=ge(it,D),F.mouse[1]),F.extent,a))}function j(it){z.on("mousemove.zoom mouseup.zoom",null),cs(it.view,F.moved),ua(it),F.event(it).end()}}function B(T,...S){if(t.apply(this,arguments)){var D=this.__zoom,F=ge(T.changedTouches?T.changedTouches[0]:T,this),z=D.invert(F),I=D.k*(T.shiftKey?.5:2),N=n(v(b(D,I),F,z),e.apply(this,S),a);ua(T),s>0?V(this).transition().duration(s).call(_,N,F,T):V(this).call(y.transform,N,F,T)}}function $(T,...S){if(t.apply(this,arguments)){var D=T.touches,F=D.length,z=A(this,S,T.changedTouches.length===F).event(T),I,N,E,O;for(xp(T),N=0;N<F;++N)E=D[N],O=ge(E,this),O=[O,this.__zoom.invert(O),E.identifier],z.touch0?!z.touch1&&z.touch0[2]!==O[2]&&(z.touch1=O,z.taps=0):(z.touch0=O,I=!0,z.taps=1+!!c);c&&(c=clearTimeout(c)),I&&(z.taps<2&&(f=O[0],c=setTimeout(function(){c=null},p)),ar(this),z.start())}}function k(T,...S){if(this.__zooming){var D=A(this,S).event(T),F=T.changedTouches,z=F.length,I,N,E,O;for(ua(T),I=0;I<z;++I)N=F[I],E=ge(N,this),D.touch0&&D.touch0[2]===N.identifier?D.touch0[0]=E:D.touch1&&D.touch1[2]===N.identifier&&(D.touch1[0]=E);if(N=D.that.__zoom,D.touch1){var j=D.touch0[0],it=D.touch0[1],W=D.touch1[0],Q=D.touch1[1],X=(X=W[0]-j[0])*X+(X=W[1]-j[1])*X,K=(K=Q[0]-it[0])*K+(K=Q[1]-it[1])*K;N=b(N,Math.sqrt(X/K)),E=[(j[0]+W[0])/2,(j[1]+W[1])/2],O=[(it[0]+Q[0])/2,(it[1]+Q[1])/2]}else if(D.touch0)E=D.touch0[0],O=D.touch0[1];else return;D.zoom("touch",n(v(N,E,O),D.extent,a))}}function M(T,...S){if(this.__zooming){var D=A(this,S).event(T),F=T.changedTouches,z=F.length,I,N;for(xp(T),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),I=0;I<z;++I)N=F[I],D.touch0&&D.touch0[2]===N.identifier?delete D.touch0:D.touch1&&D.touch1[2]===N.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(N=ge(N,this),Math.hypot(f[0]-N[0],f[1]-N[1])<g)){var E=V(this).on("dblclick.zoom");E&&E.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:uu(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:uu(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:uu(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:uu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):e},y.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],y):[o[0],o[1]]},y.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(T){return arguments.length?(n=T,y):n},y.duration=function(T){return arguments.length?(s=+T,y):s},y.interpolate=function(T){return arguments.length?(l=T,y):l},y.on=function(){var T=u.on.apply(u,arguments);return T===u?y:T},y.clickDistance=function(T){return arguments.length?(m=(T=+T)*T,y):Math.sqrt(m)},y.tapDistance=function(T){return arguments.length?(g=+T,y):g},y}const vp=Object.freeze(Object.defineProperty({__proto__:null,Adder:kt,Delaunay:Cf,FormatSpecifier:Hs,InternMap:oo,InternSet:qn,Node:yr,Path:Ao,Voronoi:Ay,ZoomTransform:Je,active:b5,arc:Ql,area:up,areaRadial:_v,ascending:wt,autoType:Y6,axisBottom:Dc,axisLeft:Cc,axisRight:cC,axisTop:uC,bin:k0,bisect:jn,bisectCenter:aD,bisectLeft:oD,bisectRight:y0,bisector:qa,blob:V6,blur:sD,blur2:b0,blurImage:lD,brush:L5,brushSelection:D5,brushX:C5,brushY:M5,buffer:H6,chord:R5,chordDirected:I5,chordTranspose:E5,cluster:r7,color:An,contourDensity:s6,contours:Sf,count:Ka,create:VM,creator:as,cross:gD,csv:Z6,csvFormat:L6,csvFormatBody:k6,csvFormatRow:E6,csvFormatRows:R6,csvFormatValue:I6,csvParse:My,csvParseRows:M6,cubehelix:Ee,cumsum:mD,curveBasis:RE,curveBasisClosed:EE,curveBasisOpen:IE,curveBumpX:Sv,curveBumpY:Tv,curveBundle:BE,curveCardinal:NE,curveCardinalClosed:FE,curveCardinalOpen:zE,curveCatmullRom:OE,curveCatmullRomClosed:GE,curveCatmullRomOpen:YE,curveLinear:tu,curveLinearClosed:WE,curveMonotoneX:XE,curveMonotoneY:VE,curveNatural:UE,curveStep:HE,curveStepAfter:qE,curveStepBefore:jE,descending:g0,deviation:$0,difference:KD,disjoint:QD,dispatch:Qn,drag:hs,dragDisable:us,dragEnable:cs,dsv:q6,dsvFormat:Os,easeBack:ay,easeBackIn:c5,easeBackInOut:ay,easeBackOut:f5,easeBounce:So,easeBounceIn:l5,easeBounceInOut:u5,easeBounceOut:So,easeCircle:oy,easeCircleIn:Q3,easeCircleInOut:oy,easeCircleOut:J3,easeCubic:wo,easeCubicIn:X3,easeCubicInOut:wo,easeCubicOut:V3,easeElastic:sr,easeElasticIn:h5,easeElasticInOut:p5,easeElasticOut:sr,easeExp:iy,easeExpIn:Z3,easeExpInOut:iy,easeExpOut:K3,easeLinear:G3,easePoly:ty,easePolyIn:U3,easePolyInOut:ty,easePolyOut:H3,easeQuad:Jm,easeQuadIn:Y3,easeQuadInOut:Jm,easeQuadOut:W3,easeSin:ry,easeSinIn:j3,easeSinInOut:ry,easeSinOut:q3,every:VD,extent:io,fcumsum:bD,filter:HD,flatGroup:xD,flatRollup:vD,forceCenter:Ef,forceCollide:Ws,forceLink:Bf,forceManyBody:Vs,forceRadial:M8,forceSimulation:Xs,forceX:Ny,forceY:Fy,get format(){return Mo},formatDefaultLocale:Uy,formatLocale:Vy,get formatPrefix(){return Nf},formatSpecifier:di,fsum:yD,geoAlbers:ab,geoAlbersUsa:I4,geoArea:O8,geoAzimuthalEqualArea:B4,geoAzimuthalEqualAreaRaw:_h,geoAzimuthalEquidistant:N4,geoAzimuthalEquidistantRaw:wh,geoBounds:X8,geoCentroid:Z8,geoCircle:K8,geoClipAntimeridian:eh,geoClipCircle:D1,geoClipExtent:i4,geoClipRectangle:gl,geoConicConformal:z4,geoConicConformalRaw:ub,geoConicEqualArea:Pl,geoConicEqualAreaRaw:ob,geoConicEquidistant:G4,geoConicEquidistantRaw:cb,geoContains:f4,geoDistance:bl,geoEqualEarth:W4,geoEqualEarthRaw:Sh,geoEquirectangular:O4,geoEquirectangularRaw:Uo,geoGnomonic:X4,geoGnomonicRaw:Th,geoGraticule:F1,geoGraticule10:h4,geoIdentity:V4,geoInterpolate:p4,geoLength:C1,geoMercator:F4,geoMercatorRaw:Vo,geoNaturalEarth1:U4,geoNaturalEarth1Raw:Ah,geoOrthographic:H4,geoOrthographicRaw:Ph,geoPath:T4,geoProjection:Ze,geoProjectionMutator:vh,geoRotation:v1,geoStereographic:j4,geoStereographicRaw:Dh,geoStream:Be,geoTransform:A4,geoTransverseMercator:q4,geoTransverseMercatorRaw:Ch,gray:fL,greatest:R0,greatestIndex:OD,group:T0,groupSort:wD,groups:A0,hcl:xs,hierarchy:Ml,histogram:k0,hsl:gs,html:n8,image:Q6,index:$D,indexes:_D,interpolate:nn,interpolateArray:yL,interpolateBasis:wm,interpolateBasisClosed:Sm,interpolateBlues:GR,interpolateBrBG:vR,interpolateBuGn:CR,interpolateBuPu:MR,interpolateCividis:HR,interpolateCool:ZR,interpolateCubehelix:kL,interpolateCubehelixDefault:jR,interpolateCubehelixLong:Ts,interpolateDate:Mm,interpolateDiscrete:vL,interpolateGnBu:LR,interpolateGreens:YR,interpolateGreys:WR,interpolateHcl:ML,interpolateHclLong:LL,interpolateHsl:PL,interpolateHslLong:DL,interpolateHue:$L,interpolateInferno:iE,interpolateLab:CL,interpolateMagma:rE,interpolateNumber:ve,interpolateNumberArray:jc,interpolateObject:Lm,interpolateOrRd:kR,interpolateOranges:UR,interpolatePRGn:$R,interpolatePiYG:_R,interpolatePlasma:oE,interpolatePuBu:ER,interpolatePuBuGn:RR,interpolatePuOr:wR,interpolatePuRd:IR,interpolatePurples:XR,interpolateRainbow:KR,interpolateRdBu:SR,interpolateRdGy:TR,interpolateRdPu:BR,interpolateRdYlBu:AR,interpolateRdYlGn:PR,interpolateReds:VR,interpolateRgb:mo,interpolateRgbBasis:Pm,interpolateRgbBasisClosed:mL,interpolateRound:ws,interpolateSinebow:tE,interpolateSpectral:DR,interpolateString:Kc,interpolateTransformCss:Im,interpolateTransformSvg:Bm,interpolateTurbo:eE,interpolateViridis:nE,interpolateWarm:qR,interpolateYlGn:FR,interpolateYlGnBu:NR,interpolateYlOrBr:zR,interpolateYlOrRd:OR,interpolateZoom:Fm,interrupt:ar,intersection:JD,interval:NL,isoFormat:J9,isoParse:nR,json:t8,lab:bs,lch:hL,least:zD,leastIndex:B0,line:eu,lineRadial:$v,link:nu,linkHorizontal:$E,linkRadial:wE,linkVertical:_E,local:K0,map:jD,matcher:Rc,max:ao,maxIndex:wc,mean:LD,median:kD,medianIndex:RD,merge:Tc,min:ts,minIndex:Sc,mode:ID,namespace:co,namespaces:Lc,nice:$c,now:$o,pack:R7,packEnclose:P7,packSiblings:L7,pairs:BD,partition:E7,path:wf,pathRound:F5,permute:L0,pie:bv,piecewise:Ym,pointRadial:la,pointer:ge,pointers:HM,polygonArea:q7,polygonCentroid:Z7,polygonContains:tk,polygonHull:J7,polygonLength:ek,precisionFixed:Hy,precisionPrefix:jy,precisionRound:qy,quadtree:Ys,quantile:lo,quantileIndex:I0,quantileSorted:E0,quantize:RL,quickselect:es,radialArea:_v,radialLine:$v,randomBates:ok,randomBernoulli:lk,randomBeta:kb,randomBinomial:Rb,randomCauchy:ck,randomExponential:ak,randomGamma:zh,randomGeometric:Lb,randomInt:rk,randomIrwinHall:Mb,randomLcg:gk,randomLogNormal:ik,randomLogistic:fk,randomNormal:Fh,randomPareto:sk,randomPoisson:hk,randomUniform:nk,randomWeibull:uk,range:Sn,rank:FD,reduce:qD,reverse:ZD,rgb:ni,ribbon:U5,ribbonArrow:H5,rollup:D0,rollups:C0,scaleBand:Yh,scaleDiverging:zx,scaleDivergingLog:Ox,scaleDivergingPow:ap,scaleDivergingSqrt:lR,scaleDivergingSymlog:Gx,scaleIdentity:Fb,scaleImplicit:Oh,scaleLinear:xr,scaleLog:Wb,scaleOrdinal:Gh,scalePoint:Wh,scalePow:kn,scaleQuantile:Zb,scaleQuantize:Kb,scaleRadial:qb,scaleSequential:Ix,scaleSequentialLog:Bx,scaleSequentialPow:op,scaleSequentialQuantile:Fx,scaleSequentialSqrt:sR,scaleSequentialSymlog:Nx,scaleSqrt:Pk,scaleSymlog:Ub,scaleThreshold:Qb,scaleTime:oR,scaleUtc:aR,scan:GD,schemeAccent:cR,schemeBlues:uv,schemeBrBG:Yx,schemeBuGn:Kx,schemeBuPu:Qx,schemeCategory10:uR,schemeDark2:fR,schemeGnBu:Jx,schemeGreens:cv,schemeGreys:fv,schemeObservable10:hR,schemeOrRd:tv,schemeOranges:dv,schemePRGn:Wx,schemePaired:pR,schemePastel1:dR,schemePastel2:gR,schemePiYG:Xx,schemePuBu:nv,schemePuBuGn:ev,schemePuOr:Vx,schemePuRd:rv,schemePurples:hv,schemeRdBu:Ux,schemeRdGy:Hx,schemeRdPu:iv,schemeRdYlBu:jx,schemeRdYlGn:qx,schemeReds:pv,schemeSet1:mR,schemeSet2:yR,schemeSet3:bR,schemeSpectral:Zx,schemeTableau10:xR,schemeYlGn:av,schemeYlGnBu:ov,schemeYlOrBr:sv,schemeYlOrRd:lv,select:V,selectAll:jM,selection:tr,selector:ss,selectorAll:kc,shuffle:YD,shuffler:N0,some:UD,sort:bc,stack:QE,stackOffsetDiverging:tI,stackOffsetExpand:JE,stackOffsetNone:Ci,stackOffsetSilhouette:eI,stackOffsetWiggle:nI,stackOrderAppearance:t$,stackOrderAscending:e$,stackOrderDescending:iI,stackOrderInsideOut:oI,stackOrderNone:Mi,stackOrderReverse:aI,stratify:F7,style:Jn,subset:eC,sum:Ac,superset:z0,svg:r8,symbol:kE,symbolAsterisk:Av,symbolCircle:ru,symbolCross:Pv,symbolDiamond:Cv,symbolDiamond2:Mv,symbolPlus:Lv,symbolSquare:kv,symbolSquare2:Rv,symbolStar:Iv,symbolTimes:pp,symbolTriangle:Bv,symbolTriangle2:Nv,symbolWye:Fv,symbolX:pp,symbols:zv,symbolsFill:zv,symbolsStroke:LE,text:Gs,thresholdFreedmanDiaconis:CD,thresholdScott:MD,thresholdSturges:_c,tickFormat:Nb,tickIncrement:Kn,tickStep:Ja,ticks:Zn,timeDay:Si,timeDays:Rk,get timeFormat(){return np},timeFormatDefaultLocale:Rx,timeFormatLocale:yx,timeFriday:ix,timeFridays:Ok,timeHour:Ol,timeHours:Lk,timeInterval:Mt,timeMillisecond:wi,timeMilliseconds:Jb,timeMinute:Fl,timeMinutes:Ck,timeMonday:ea,timeMondays:Bk,timeMonth:Yl,timeMonths:jk,get timeParse(){return kx},timeSaturday:ox,timeSaturdays:Gk,timeSecond:gn,timeSeconds:ex,timeSunday:Ti,timeSundays:ax,timeThursday:$r,timeThursdays:zk,timeTickInterval:mx,timeTicks:gx,timeTuesday:nx,timeTuesdays:Nk,timeWednesday:rx,timeWednesdays:Fk,timeWeek:Ti,timeWeeks:ax,timeYear:Ke,timeYears:Zk,timeout:tf,timer:Cs,timerFlush:Vm,transition:Km,transpose:F0,tree:V7,treemap:Db,treemapBinary:U7,treemapDice:Qo,treemapResquarify:j7,treemapSlice:Il,treemapSliceDice:H7,treemapSquarify:Nh,tsv:K6,tsvFormat:N6,tsvFormatBody:F6,tsvFormatRow:O6,tsvFormatRows:z6,tsvFormatValue:G6,tsvParse:Ly,tsvParseRows:B6,union:nC,unixDay:Jh,unixDays:Ik,utcDay:ta,utcDays:Ek,get utcFormat(){return Xl},utcFriday:ux,utcFridays:Uk,utcHour:Gl,utcHours:kk,utcMillisecond:wi,utcMilliseconds:Jb,utcMinute:zl,utcMinutes:Mk,utcMonday:na,utcMondays:Yk,utcMonth:Wl,utcMonths:qk,get utcParse(){return rp},utcSaturday:cx,utcSaturdays:Hk,utcSecond:gn,utcSeconds:ex,utcSunday:Ai,utcSundays:fx,utcThursday:wr,utcThursdays:Vk,utcTickInterval:dx,utcTicks:px,utcTuesday:sx,utcTuesdays:Wk,utcWednesday:lx,utcWednesdays:Xk,utcWeek:Ai,utcWeeks:fx,utcYear:Qe,utcYears:Kk,variance:v0,window:Ec,xml:e8,zip:XD,zoom:yn,zoomIdentity:Li,zoomTransform:r$},Symbol.toStringTag,{value:"Module"}));function o$(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function pI(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function ca(t){return t.substring(0,4)!=="ease"?wo:vp[t]??wo}function cu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=xr().domain([0,1]).range([0,t/2]),a=o(n);return Ql().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Sr=(t,e)=>{if(e instanceof Function){const n=e(t);return String(n??"")}return Mo(e)(t)};function fa(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function bt(t,e){const n=e.colors[e.colorScheme];return t==="label"?n.label[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function Ct({datum:t,colorType:e,fullChartParams:n}){return e==="label"?t.color?t.color:n.colors[n.colorScheme].label[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function Z(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function Pe(t,e){const r=Math.random().toString(36).substr(2,5);return Z(t,e,r)}function ha(t,e){let n=new dt(()=>{});return t.each(function(){const r=Iu(this,e);n=Bu(n,r)}),n}const Tr=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=Z(e,"series"),l=Z(e,"axes"),u=Z(e,"graphic"),c=r.pipe(R((d,m)=>t.selectAll(`g.${s}`).data(d,g=>g).join(g=>g.append("g").classed(s,!0).each((y,b,v)=>{V(v[b]).selectAll(`g.${l}`).data([b]).join(x=>x.append("g").classed(l,!0).attr("clip-path",`url(#${n})`).each((_,A,w)=>{V(w[A]).selectAll("defs").data([A]).join("defs"),V(w[A]).selectAll("g").data([A]).join("g").classed(u,!0)}),x=>x,x=>x.remove())}),g=>g,g=>g.remove())),pt(1));Y({seriesSelection:c,gridContainerPosition:i}).pipe(G(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(m,g)=>{const y=d.gridContainerPosition[g]??d.gridContainerPosition[0],b=y.translate,v=y.scale;return`translate(${b[0]}, ${b[1]}) scale(${v[0]}, ${v[1]})`})});const f=Y({seriesSelection:c,gridAxesTransform:o}).pipe(G(async d=>d),R(d=>d.seriesSelection.select(`g.${l}`).style("transform",d.gridAxesTransform.value)),pt(1)),h=f.pipe(R(d=>d.select("defs")),pt(1)),p=Y({axesSelection:f,gridGraphicTransform:a}).pipe(G(async d=>d),R(d=>{const m=d.axesSelection.select(`g.${u}`);return m.transition().duration(50).style("transform",d.gridGraphicTransform.value),m}),pt(1));return{seriesSelection$:c,axesSelection$:f,defsSelection$:h,graphicGSelection$:p}},a$=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r,gridContainerPosition$:i,layout$:o})=>{const a=new J,s=Y({fullDataFormatter:t,gridAxesSize:e,computedData:n}).pipe(G(async h=>h),R(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.groupAxis.scaleDomain[0]-h.fullDataFormatter.groupAxis.scalePadding,m=h.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?p+h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[1]+h.fullDataFormatter.groupAxis.scalePadding;return[d,m]}),pt(1)),l=Y({fullDataFormatter:t,computedData:n}).pipe(G(async h=>h),R(h=>h.fullDataFormatter.seriesDirection==="row"?(h.computedData[0]??[]).map(p=>p.groupLabel):h.computedData.map(p=>p[0].groupLabel))),u=Y({groupScaleDomain:s,groupLabels:l}).pipe(G(async h=>h),R(h=>h.groupLabels.filter((p,d)=>d>=h.groupScaleDomain[0]&&d<=h.groupScaleDomain[1]))),c=i.pipe(R(h=>h.reduce((d,m)=>m.columnIndex>d?m.columnIndex:d,0)+1),tt()),f=i.pipe(R(h=>h.reduce((d,m)=>m.rowIndex>d?m.rowIndex:d,0)+1),tt());return new dt(h=>{Y({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:u,groupLabels:l,groupScaleDomain:s,columnAmount:c,rowAmount:f,layout:o}).pipe(L(a),G(async p=>p)).subscribe(p=>{const d=p.dataFormatter.valueAxis.position==="right"||p.dataFormatter.valueAxis.position==="bottom",m=f0({axisLabels:p.scaleRangeGroupLabels,axisWidth:p.axisSize.width,padding:p.dataFormatter.groupAxis.scalePadding,reverse:d}),g=b=>p.dataFormatter.groupAxis.position==="bottom"||p.dataFormatter.groupAxis.position==="top"?b.offsetX-p.fullChartParams.padding.left:b.offsetY-p.fullChartParams.padding.top,y=b=>{const v={offsetX:b.offsetX*p.columnAmount%p.layout.rootWidth,offsetY:b.offsetY*p.rowAmount%p.layout.rootHeight},x=g(v),_=m(x),A=Math.ceil(p.groupScaleDomain[0]),w=_+A;return{groupIndex:w,groupLabel:p.groupLabels[w]??""}};return h.next(y),function(){a.next(void 0)}})})},dI=({rootSelection:t,fullDataFormatter$:e,gridAxesSize$:n,computedData$:r,fullChartParams$:i,gridContainerPosition$:o,layout$:a})=>{const s=ha(t,"mousemove"),l=Y({fullDataFormatter:e,gridAxesSize:n,computedData:r}).pipe(G(async b=>b),R(b=>{const v=b.computedData[0]?b.computedData[0].length-1:0,x=b.fullDataFormatter.groupAxis.scaleDomain[0]-b.fullDataFormatter.groupAxis.scalePadding,_=b.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?v+b.fullDataFormatter.groupAxis.scalePadding:b.fullDataFormatter.groupAxis.scaleDomain[1]+b.fullDataFormatter.groupAxis.scalePadding;return[x,_]}),pt(1)),u=Y({fullDataFormatter:e,computedData:r}).pipe(G(async b=>b),R(b=>b.fullDataFormatter.seriesDirection==="row"?(b.computedData[0]??[]).map(v=>v.groupLabel):b.computedData.map(v=>v[0].groupLabel))),c=Y({groupScaleDomain:l,groupLabels:u}).pipe(G(async b=>b),R(b=>b.groupLabels.filter((v,x)=>x>=b.groupScaleDomain[0]&&x<=b.groupScaleDomain[1]))),f=e.pipe(R(b=>b.valueAxis.position==="right"||b.valueAxis.position==="bottom")),h=Y({reverse:f,gridAxesSize:n,scaleRangeGroupLabels:c,fullDataFormatter:e}).pipe(G(async b=>b),R(b=>f0({axisLabels:b.scaleRangeGroupLabels,axisWidth:b.gridAxesSize.width,padding:b.fullDataFormatter.groupAxis.scalePadding,reverse:b.reverse}))),p=o.pipe(R(b=>b.reduce((x,_)=>_.columnIndex>x?_.columnIndex:x,0)+1),tt()),d=o.pipe(R(b=>b.reduce((x,_)=>_.rowIndex>x?_.rowIndex:x,0)+1),tt()),m=Y({fullDataFormatter:e,fullChartParams:i,rootMousemove:s,columnAmount:p,rowAmount:d,layout:a}).pipe(G(async b=>b),R(b=>{const v={offsetX:b.rootMousemove.offsetX*b.columnAmount%b.layout.rootWidth,offsetY:b.rootMousemove.offsetY*b.rowAmount%b.layout.rootHeight};return b.fullDataFormatter.groupAxis.position==="bottom"||b.fullDataFormatter.groupAxis.position==="top"?v.offsetX-b.fullChartParams.padding.left:v.offsetY-b.fullChartParams.padding.top})),g=Y({xIndexScale:h,axisValue:m,groupScaleDomain:l}).pipe(G(async b=>b),R(b=>{const v=b.xIndexScale(b.axisValue),x=Math.ceil(b.groupScaleDomain[0]);return v+x})),y=Y({groupIndex:g,groupLabels:u}).pipe(G(async b=>b),R(b=>b.groupLabels[b.groupIndex]??""));return Y({groupIndex:g,groupLabel:y}).pipe(G(async b=>b),R(b=>({groupIndex:b.groupIndex,groupLabel:b.groupLabel})))};function gI(t="curveLinear"){return eu().x(e=>e.axisX).y(e=>e.axisY).curve(vp[t])}function mI(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function yI({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function bI({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function xI({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const l=s.append("rect");return l.transition().duration(n).ease(ca(r)).tween("tween",(u,c,f)=>h=>{const p=u.width*h;l.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),l},s=>s.attr("x",0).attr("y",0).attr("width",l=>l.width).attr("height",l=>l.height),s=>s.remove())})}const s$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,allContainerPosition$:y,layout$:b,event$:v})=>{const x=new J,_=Pe(t,"clipPath-box"),A=Z(t,"path"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:e,pluginName:t,clipPathID:_,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p}),$=new dt(z=>{const I=u.pipe(L(x)).subscribe(N=>{if(!N)return;const E=gI(N.lineCurve);z.next(E)});return()=>{I.unsubscribe()}}),k=f.pipe(R(z=>z.transitionDuration),tt()),M=f.pipe(R(z=>z.transitionEase),tt());Y({defsSelection:C,seriesLabels:a,axisSize:d,transitionDuration:k,transitionEase:M}).pipe(L(x),G(async z=>z)).subscribe(z=>{const N=[{id:_,width:z.axisSize.width,height:z.axisSize.height}].concat(z.seriesLabels.map(E=>({id:`orbcharts__clipPath_${E}`,width:z.axisSize.width,height:z.axisSize.height})));xI({defsSelection:z.defsSelection,clipPathData:N,transitionDuration:z.transitionDuration,transitionEase:z.transitionEase})});const T=n.pipe(R(z=>{const I=new Map;return z.flat().forEach(N=>I.set(N.id,N)),I})),S=a$({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:y,layout$:b}),D=f.pipe(L(x),R(z=>z.highlightTarget),tt()),F=Y({graphicGSelection:B,visibleComputedLayoutData:o,linePath:$,params:u}).pipe(L(x),G(async z=>z),R(z=>{let I=[];return z.graphicGSelection.each((N,E,O)=>{const j=mI(z.visibleComputedLayoutData[E]??[]);I[E]=yI({selection:V(O[E]),pathClassName:A,linePath:z.linePath,segmentData:j,params:z.params})}),I}));return Y({pathSelectionArr:F,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:D,gridGroupPositionFn:S}).pipe(L(x),G(async z=>z)).subscribe(z=>{z.pathSelectionArr.forEach(I=>{I.on("mouseover",(N,E)=>{N.stopPropagation();const O=E[0]?E[0].seriesLabel:"",{groupIndex:j,groupLabel:it}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(it).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:z.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:N,data:z.computedData})}).on("mousemove",(N,E)=>{N.stopPropagation();const O=E[0]?E[0].seriesLabel:"",{groupIndex:j,groupLabel:it}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(it).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:z.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:N,data:z.computedData})}).on("mouseout",(N,E)=>{N.stopPropagation();const O=E[0]?E[0].seriesLabel:"",{groupIndex:j,groupLabel:it}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(it).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:z.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:N,data:z.computedData})}).on("click",(N,E)=>{N.stopPropagation();const O=E[0]?E[0].seriesLabel:"",{groupIndex:j,groupLabel:it}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(it).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:z.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:N,data:z.computedData})})})}),f.pipe(L(x),Rr(z=>z.highlightTarget==="series"),G(z=>Y({graphicGSelection:B,gridHighlight:m,DataMap:T,fullChartParams:f}).pipe(L(x),G(async I=>I)))).subscribe(z=>{const I=z.gridHighlight[0]?z.gridHighlight[0].seriesLabel:null;bI({selection:z.graphicGSelection,seriesLabel:I,fullChartParams:z.fullChartParams})}),()=>{x.next(void 0)}},l$=0,bn=2,u$=3,c$=4,be=5,fu=6,$p=7,ki=8,Ri=9,f$="Lines",vI=se({name:f$,defaultParams:Dr,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new J,a=s$(f$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,allContainerPosition$:r.gridContainerPosition$,layout$:r.layout$,event$:i.event$});return()=>{o.next(void 0),a()}});function $I(t="curveLinear",e){return up().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(vp[t])}function _I(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function wI({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,l)=>s.length?`${s[0].id}_${s[s.length-1].id}`:l).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,l)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function SI({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function TI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
47
47
  <stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
48
48
  <stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
49
- `})}function PE({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{q(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Uo(r)).tween("tween",(l,c,f)=>h=>{const p=l.width*h;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const Ov=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:b,event$:y})=>{const _=new et,x=Mn(t,"clipPath-box"),w=ot(t,"path"),{seriesSelection$:$,axesSelection$:R,defsSelection$:A,graphicGSelection$:D}=dr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p}),I=p.pipe(N(_),B(k=>-k.translate[1]/k.scale[1])),v=new gt(k=>{const E=U({fullParams:l,valueAxisStart:I}).pipe(N(_)).subscribe(C=>{const F=$E(C.fullParams.lineCurve,C.valueAxisStart);k.next(F)});return()=>{E.unsubscribe()}}),L=f.pipe(B(k=>k.transitionDuration),tt()),T=f.pipe(B(k=>k.transitionEase),tt());U({defsSelection:A,seriesLabels:a,axisSize:d,transitionDuration:L,transitionEase:T}).pipe(N(_),W(async k=>k)).subscribe(k=>{const C=[{id:x,width:k.axisSize.width,height:k.axisSize.height}].concat(k.seriesLabels.map(F=>({id:`orbcharts__clipPath_${F}`,width:k.axisSize.width,height:k.axisSize.height})));PE({defsSelection:k.defsSelection,clipPathData:C,transitionDuration:k.transitionDuration,transitionEase:k.transitionEase})});const S=n.pipe(B(k=>{const E=new Map;return k.flat().forEach(C=>E.set(C.id,C)),E})),M=Ev({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:m,layout$:b}),P=f.pipe(N(_),B(k=>k.highlightTarget),tt()),G=a.pipe(N(_),B(k=>k.map((E,C)=>Mn(t,`lineargradient-${E}`)))),O=U({graphicGSelection:D,defsSelection:A,visibleComputedLayoutData:o,linearGradientIds:G,areaPath:v,params:l}).pipe(N(_),W(async k=>k),B(k=>{let E=[];return k.graphicGSelection.each((C,F,H)=>{const J=wE(k.visibleComputedLayoutData[F]??[]);E[F]=SE({selection:q(H[F]),pathClassName:w,areaPath:k.areaPath,segmentData:J,linearGradientIds:k.linearGradientIds,params:k.params}),TE({defsSelection:k.defsSelection,computedData:k.visibleComputedLayoutData,linearGradientIds:k.linearGradientIds,params:k.params})}),E}));return U({pathSelectionArr:O,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:P,gridGroupPositionFn:M}).pipe(N(_),W(async k=>k)).subscribe(k=>{k.pathSelectionArr.forEach(E=>{E.on("mouseover",(C,F)=>{const H=F[0]?F[0].seriesLabel:"",{groupIndex:J,groupLabel:z}=k.gridGroupPositionFn(C),K=k.GroupDataMap.get(z).find(j=>j.seriesLabel===H)??F[0];y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:K,gridIndex:K.gridIndex,series:k.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:k.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:C,data:k.computedData})}).on("mousemove",(C,F)=>{const H=F[0]?F[0].seriesLabel:"",{groupIndex:J,groupLabel:z}=k.gridGroupPositionFn(C),K=k.GroupDataMap.get(z).find(j=>j.seriesLabel===H)??F[0];y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:K,gridIndex:K.gridIndex,series:k.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:k.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:C,data:k.computedData})}).on("mouseout",(C,F)=>{const H=F[0]?F[0].seriesLabel:"",{groupIndex:J,groupLabel:z}=k.gridGroupPositionFn(C),K=k.GroupDataMap.get(z).find(j=>j.seriesLabel===H)??F[0];y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:K,gridIndex:K.gridIndex,series:k.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:k.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:C,data:k.computedData})}).on("click",(C,F)=>{const H=F[0]?F[0].seriesLabel:"",{groupIndex:J,groupLabel:z}=k.gridGroupPositionFn(C),K=k.GroupDataMap.get(z).find(j=>j.seriesLabel===H)??F[0];y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:K,gridIndex:K.gridIndex,series:k.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:k.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:C,data:k.computedData})})})}),f.pipe(N(_),wi(k=>k.highlightTarget==="series"),W(k=>U({graphicGSelection:D,gridHighlight:g,DataMap:S,fullChartParams:f}).pipe(N(_),W(async E=>E)))).subscribe(k=>{const E=k.gridHighlight[0]?k.gridHighlight[0].seriesLabel:null;AE({selection:k.graphicGSelection,seriesLabel:E,fullChartParams:k.fullChartParams})}),()=>{_.next(void 0)}},zv="LineAreas",ME=re({name:zv,defaultParams:bp,layerIndex:Nv,validator:(t,{validateColumns:e})=>e(t,{lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=Ov(zv,{selection:t,computedData$:n.computedData$,visibleComputedData$:n.visibleComputedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,allContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),Gv=.3;function Yv({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function DE(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return uh().domain(e).range([-i/2+r,i/2-r])}function CE(t,e){return t<=1?0:e/(t-1)*Gv}function LE(t,e){return t<=1?e:e*(1-Gv)}function kE({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:l,delayGroup:c,transitionItem:f,isSeriesSeprate:h}){const p=u/2;return t.each((g,m,b)=>{q(b[m]).selectAll(`rect.${e}`).data(n[m]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",_=>0),y=>y,y=>y.remove()).attr("transform",(y,_)=>`translate(${(y?y.axisX:0)-p}, 0)`).attr("fill",y=>y.color).attr("y",y=>y.axisY<r[m]?y.axisY:r[m]).attr("x",y=>h?0:o(y.seriesLabel)).attr("width",u).attr("rx",l[m][0]??1).attr("ry",l[m][1]??1).transition().duration(f).ease(Uo(s.transitionEase)).delay((y,_)=>y.groupIndex*c).attr("height",y=>Math.abs(y.axisYFromZero))}),t.selectAll(`rect.${e}`)}function RE({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{q(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function EE({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?q(o[i]).style("opacity",1):q(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Wh=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:b,event$:y})=>{const _=new et,x=Mn(t,"clipPath-box"),w=ot(t,"rect"),{seriesSelection$:$,axesSelection$:R,defsSelection$:A,graphicGSelection$:D}=dr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),I=o.pipe(N(_),B(E=>E.map(C=>C[0]?C[0].axisY-C[0].axisYFromZero:0)),tt()),v=U({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:b}).pipe(N(_),W(async E=>E),B(E=>E.params.barWidth?E.params.barWidth:E.isSeriesSeprate?Yv({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:1,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}):Yv({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:E.visibleComputedData.length,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding})),tt()),L=U({computedData:n,barWidth:v,params:l,gridGraphicReverseScale:p}).pipe(N(_),W(async E=>E),B(E=>{const C=E.barWidth/2,F=E.params.barRadius===!0?C:E.params.barRadius===!1?0:typeof E.params.barRadius=="number"?E.params.barRadius:0;return E.computedData.map((H,J)=>{const z=E.gridGraphicReverseScale[J]??E.gridGraphicReverseScale[0];let V=F*z[0],Y=F*z[1];if(V>C){const K=C/V;V=V*K,Y=Y*K}return[V,Y]})})),T=i.pipe(N(_),B(E=>{const C=new Set;return E.forEach(F=>{F.forEach(H=>{C.add(H.groupLabel)})}),Array.from(C)})),S=U({seriesLabels:a,barWidth:v,params:l}).pipe(N(_),W(async E=>E),B(E=>DE(E.barWidth,E.seriesLabels,E.params))),M=c.pipe(N(_),B(E=>E.transitionDuration),tt()),P=new gt(E=>{U({groupLabels:T,transitionDuration:M}).pipe(W(async C=>C)).subscribe(C=>{const F=CE(C.groupLabels.length,C.transitionDuration);E.next(F)})}).pipe(N(_),tt()),G=new gt(E=>{U({groupLabels:T,transitionDuration:M}).pipe(W(async C=>C)).subscribe(C=>{const F=LE(C.groupLabels.length,C.transitionDuration);E.next(F)})}).pipe(N(_),tt());U({defsSelection:A,gridAxesSize:d}).pipe(N(_),W(async E=>E)).subscribe(E=>{const C=[{id:x,width:E.gridAxesSize.width,height:E.gridAxesSize.height}];RE({defsSelection:E.defsSelection,clipPathData:C})});const O=c.pipe(N(_),B(E=>E.highlightTarget),tt()),k=U({graphicGSelection:D,visibleComputedLayoutData:o,zeroYArr:I,groupLabels:T,barScale:S,params:l,chartParams:c,highlightTarget:O,barWidth:v,transformedBarRadius:L,delayGroup:P,transitionItem:G,isSeriesSeprate:b}).pipe(N(_),W(async E=>E),B(E=>kE({graphicGSelection:E.graphicGSelection,rectClassName:w,visibleComputedLayoutData:E.visibleComputedLayoutData,zeroYArr:E.zeroYArr,groupLabels:E.groupLabels,barScale:E.barScale,params:E.params,chartParams:E.chartParams,barWidth:E.barWidth,transformedBarRadius:E.transformedBarRadius,delayGroup:E.delayGroup,transitionItem:E.transitionItem,isSeriesSeprate:E.isSeriesSeprate})));return U({barSelection:k,computedData:n,highlightTarget:O,SeriesDataMap:s,GroupDataMap:u}).pipe(N(_),W(async E=>E)).subscribe(E=>{E.barSelection.on("mouseover",(C,F)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:E.computedData})}).on("mousemove",(C,F)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:E.computedData})}).on("mouseout",(C,F)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:E.computedData})}).on("click",(C,F)=>{C.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:C,data:E.computedData})})}),U({barSelection:k,highlight:g.pipe(B(E=>E.map(C=>C.id))),fullChartParams:c}).pipe(N(_),W(async E=>E)).subscribe(E=>{EE({selection:E.barSelection,ids:E.highlight,fullChartParams:E.fullChartParams})}),()=>{_.next(void 0)}},Uv="Bars",IE=re({name:Uv,defaultParams:Xo,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Wh(Uv,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),Wv="BarsPN",NE=re({name:Wv,defaultParams:Xo,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Wh(Wv,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Ko(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),Hv=.3;function BE({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function FE(t,e){return t<=1?0:e/(t-1)*Hv}function OE(t,e){return t<=1?e:e*(1-Hv)}function zE({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:l,transitionItem:c,isSeriesSeprate:f}){const h=s/2;return t.each((d,g,m)=>{q(m[g]).selectAll(`rect.${e}`).data(n[g]??[],b=>b.id).join(b=>b.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",y=>0),b=>b,b=>b.remove()).attr("transform",(b,y)=>`translate(${(b?b.axisX:0)-h}, 0)`).attr("fill",b=>b.color).attr("y",b=>r).attr("x",b=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(c).ease(Uo(a.transitionEase)).delay((b,y)=>b.groupIndex*l).attr("y",b=>b._barStartY).attr("height",b=>Math.abs(b._barHeight))}),t.selectAll(`rect.${e}`)}function GE({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{q(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function YE({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?q(o[i]).style("opacity",1):q(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Xv=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:b,isSeriesSeprate$:y,event$:_})=>{const x=new et,w=Mn(t,"clipPath-box"),$=ot(t,"rect"),{seriesSelection$:R,axesSelection$:A,defsSelection$:D,graphicGSelection$:I}=dr({selection:e,pluginName:t,clipPathID:w,seriesLabels$:a,gridContainerPosition$:b,gridAxesTransform$:h,gridGraphicTransform$:p}),v=o.pipe(N(x),B(z=>z[0]&&z[0][0]?z[0][0].axisY-z[0][0].axisYFromZero:0),tt()),L=U({computedData:n,params:l,axisSize:g,isSeriesSeprate:y}).pipe(N(x),W(async z=>z),B(z=>z.params.barWidth?z.params.barWidth:BE({axisWidth:z.axisSize.width,groupAmount:z.computedData[0]?z.computedData[0].length:0,barGroupPadding:z.params.barGroupPadding})),tt()),T=U({computedData:n,barWidth:L,params:l,gridGraphicReverseScale:d}).pipe(N(x),W(async z=>z),B(z=>{const V=z.barWidth/2,Y=z.params.barRadius===!0?V:z.params.barRadius===!1?0:typeof z.params.barRadius=="number"?z.params.barRadius:0;return z.computedData.map((K,j)=>{const nt=z.gridGraphicReverseScale[j]??z.gridGraphicReverseScale[0],st=Y*nt[0],X=Y*nt[1];return[st,X]})})),S=i.pipe(N(x),B(z=>{const V=new Set;return z.forEach(Y=>{Y.forEach(K=>{V.add(K.groupLabel)})}),Array.from(V)}),vt(1)),M=f.pipe(N(x),B(z=>z.transitionDuration),tt()),P=new gt(z=>{U({groupLabels:S,transitionDuration:M}).pipe(W(async V=>V)).subscribe(V=>{const Y=FE(V.groupLabels.length,V.transitionDuration);z.next(Y)})}).pipe(N(x),tt()),G=new gt(z=>{U({groupLabels:S,transitionDuration:M}).pipe(W(async V=>V)).subscribe(V=>{const Y=OE(V.groupLabels.length,V.transitionDuration);z.next(Y)})}).pipe(N(x),tt()),O=U({computedData:n,dataFormatter:c}).pipe(N(x),W(async z=>z),B(z=>{const V=z.computedData[0]?z.computedData[0].length-1:0,Y=z.dataFormatter.grid.groupAxis.scaleDomain[0],K=z.dataFormatter.grid.groupAxis.scaleDomain[1]==="max"?V:z.dataFormatter.grid.groupAxis.scaleDomain[1];return[Y,K]})),k=U({visibleComputedLayoutData:o,groupScaleDomain:O}).pipe(N(x),W(async z=>z),B(z=>{const V=z.groupScaleDomain[0],Y=z.groupScaleDomain[1],j=z.visibleComputedLayoutData.map(dt=>dt.filter((ft,Ut)=>ft.groupIndex>=V&&ft.groupIndex<=Y)).flat();if(j.length<=1)return 1;const nt=j.reduce((dt,ft)=>ft.value>dt.value?ft:dt,j[0]),st=nt.groupIndex,X=j.filter(dt=>dt.groupIndex===st).reduce((dt,ft)=>dt+ft.value,0);return nt.value/X})),E=U({computedLayoutData:r,yRatio:k,zeroY:v}).pipe(N(x),B(z=>{let V=z.computedLayoutData[0]?z.computedLayoutData[0].map(()=>z.zeroY):[];return z.computedLayoutData.map((Y,K)=>Y.map((j,nt)=>{const st=V[nt];let X=0;return j.visible&&(X=j.axisYFromZero*z.yRatio,V[nt]=V[nt]+X),{...j,_barStartY:st,_barHeight:X}}))})),C=U({computedLayoutData:r,zeroY:v}).pipe(N(x),B(z=>z.computedLayoutData.map((V,Y)=>V.map((K,j)=>({...K,_barStartY:z.zeroY,_barHeight:K.axisYFromZero}))))),F=y.pipe(W(z=>Qp(()=>z,C,E)));U({defsSelection:D,gridAxesSize:g}).pipe(N(x),W(async z=>z)).subscribe(z=>{const V=[{id:w,width:z.gridAxesSize.width,height:z.gridAxesSize.height}];GE({defsSelection:z.defsSelection,clipPathData:V})});const H=f.pipe(N(x),B(z=>z.highlightTarget),tt()),J=U({graphicGSelection:I,graphicData:F,zeroY:v,groupLabels:S,params:l,chartParams:f,highlightTarget:H,barWidth:L,transformedBarRadius:T,delayGroup:P,transitionItem:G,isSeriesSeprate:y}).pipe(N(x),W(async z=>z),B(z=>zE({graphicGSelection:z.graphicGSelection,rectClassName:$,barData:z.graphicData,zeroY:z.zeroY,groupLabels:z.groupLabels,params:z.params,chartParams:z.chartParams,barWidth:z.barWidth,transformedBarRadius:z.transformedBarRadius,delayGroup:z.delayGroup,transitionItem:z.transitionItem,isSeriesSeprate:z.isSeriesSeprate})));return U({barSelection:J,computedData:n,highlightTarget:H,SeriesDataMap:s,GroupDataMap:u}).subscribe(z=>{z.barSelection.on("mouseover",(V,Y)=>{V.stopPropagation(),_.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:z.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:z.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:z.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:V,data:z.computedData})}).on("mousemove",(V,Y)=>{V.stopPropagation(),_.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:z.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:z.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:z.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:V,data:z.computedData})}).on("mouseout",(V,Y)=>{V.stopPropagation(),_.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:z.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:z.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:z.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:V,data:z.computedData})}).on("click",(V,Y)=>{V.stopPropagation(),_.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:z.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:z.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:z.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:V,data:z.computedData})})}),U({barSelection:J,highlight:m.pipe(B(z=>z.map(V=>V.id))),fullChartParams:f}).pipe(N(x),W(async z=>z)).subscribe(z=>{YE({selection:z.barSelection,ids:z.highlight,fullChartParams:z.fullChartParams})}),()=>{x.next(void 0)}},jv="BarStack",UE=re({name:jv,defaultParams:vp,layerIndex:5,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Xv(jv,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),Vv=.3;function qv({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function WE(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return uh().domain(e).range([-i/2+r,i/2-r])}function HE(t,e){return t<=1?0:e/(t-1)*Vv}function XE(t,e){return t<=1?e:e*(1-Vv)}function jE({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:l,barWidth:c,delayGroup:f,transitionItem:h,isSeriesSeprate:p}){const d=c/2;return t.each((m,b,y)=>{q(y[b]).selectAll(`g.${e}`).data(r[b]??[]).join(x=>{const w=x.append("g").classed(e,!0).attr("cursor","pointer");return w.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",$=>{const R=-d,A=o[b],D=o[b];return`M${R},${A} L${R+c/2},${D} ${R+c},${A}`}),w},x=>x,x=>x.remove()).attr("transform",x=>`translate(${p?0:s(x.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",x=>Math.abs(x.axisYFromZero)).attr("y",x=>x.axisY<o[b]?x.axisY:o[b]).attr("x",x=>p?0:s(x.seriesLabel)).style("fill",x=>`url(#${i[x.seriesIndex]})`).attr("stroke",x=>x.color).attr("transform",x=>`translate(${x?x.axisX:0}, 0)`).transition().duration(h).ease(Uo(l.transitionEase)).delay((x,w)=>x.groupIndex*f).attr("d",x=>{const w=-d,$=o[b],R=x.axisY;return`M${w},${$} L${w+c/2},${R} ${w+c},${$}`})}),t.selectAll(`path.${n}`)}function VE({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
49
+ `})}function AI({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const l=s.append("rect");return l.transition().duration(n).ease(ca(r)).tween("tween",(u,c,f)=>h=>{const p=u.width*h;l.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),l},s=>s.attr("x",0).attr("y",0).attr("width",l=>l.width).attr("height",l=>l.height),s=>s.remove())})}const h$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,layout$:y,event$:b})=>{const v=new J,x=Pe(t,"clipPath-box"),_=Z(t,"path"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p}),B=p.pipe(L(v),R(I=>-I.translate[1]/I.scale[1])),$=new dt(I=>{const N=Y({fullParams:u,valueAxisStart:B}).pipe(L(v)).subscribe(E=>{const O=$I(E.fullParams.lineCurve,E.valueAxisStart);I.next(O)});return()=>{N.unsubscribe()}}),k=f.pipe(R(I=>I.transitionDuration),tt()),M=f.pipe(R(I=>I.transitionEase),tt());Y({defsSelection:P,seriesLabels:a,axisSize:d,transitionDuration:k,transitionEase:M}).pipe(L(v),G(async I=>I)).subscribe(I=>{const E=[{id:x,width:I.axisSize.width,height:I.axisSize.height}].concat(I.seriesLabels.map(O=>({id:`orbcharts__clipPath_${O}`,width:I.axisSize.width,height:I.axisSize.height})));AI({defsSelection:I.defsSelection,clipPathData:E,transitionDuration:I.transitionDuration,transitionEase:I.transitionEase})});const T=n.pipe(R(I=>{const N=new Map;return I.flat().forEach(E=>N.set(E.id,E)),N})),S=a$({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:g,layout$:y}),D=f.pipe(L(v),R(I=>I.highlightTarget),tt()),F=a.pipe(L(v),R(I=>I.map((N,E)=>Pe(t,`lineargradient-${N}`)))),z=Y({graphicGSelection:C,defsSelection:P,visibleComputedLayoutData:o,linearGradientIds:F,areaPath:$,params:u}).pipe(L(v),G(async I=>I),R(I=>{let N=[];return I.graphicGSelection.each((E,O,j)=>{const it=_I(I.visibleComputedLayoutData[O]??[]);N[O]=wI({selection:V(j[O]),pathClassName:_,areaPath:I.areaPath,segmentData:it,linearGradientIds:I.linearGradientIds,params:I.params}),TI({defsSelection:I.defsSelection,computedData:I.visibleComputedLayoutData,linearGradientIds:I.linearGradientIds,params:I.params})}),N}));return Y({pathSelectionArr:z,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:D,gridGroupPositionFn:S}).pipe(L(v),G(async I=>I)).subscribe(I=>{I.pathSelectionArr.forEach(N=>{N.on("mouseover",(E,O)=>{const j=O[0]?O[0].seriesLabel:"",{groupIndex:it,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:I.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:I.computedData})}).on("mousemove",(E,O)=>{const j=O[0]?O[0].seriesLabel:"",{groupIndex:it,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:I.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:I.computedData})}).on("mouseout",(E,O)=>{const j=O[0]?O[0].seriesLabel:"",{groupIndex:it,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:I.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:I.computedData})}).on("click",(E,O)=>{const j=O[0]?O[0].seriesLabel:"",{groupIndex:it,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:I.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:I.computedData})})})}),f.pipe(L(v),Rr(I=>I.highlightTarget==="series"),G(I=>Y({graphicGSelection:C,gridHighlight:m,DataMap:T,fullChartParams:f}).pipe(L(v),G(async N=>N)))).subscribe(I=>{const N=I.gridHighlight[0]?I.gridHighlight[0].seriesLabel:null;SI({selection:I.graphicGSelection,seriesLabel:N,fullChartParams:I.fullChartParams})}),()=>{v.next(void 0)}},p$="LineAreas",PI=se({name:p$,defaultParams:td,layerIndex:c$,validator:(t,{validateColumns:e})=>e(t,{lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=h$(p$,{selection:t,computedData$:n.computedData$,visibleComputedData$:n.visibleComputedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,allContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),d$=.3;function g$({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function DI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Wh().domain(e).range([-i/2+r,i/2-r])}function CI(t,e){return t<=1?0:e/(t-1)*d$}function MI(t,e){return t<=1?e:e*(1-d$)}function LI({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:l,transformedBarRadius:u,delayGroup:c,transitionItem:f,isSeriesSeprate:h}){const p=l/2;return t.each((m,g,y)=>{V(y[g]).selectAll(`rect.${e}`).data(n[g]??[],b=>b.id).join(b=>b.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>1),b=>b,b=>b.remove()).attr("transform",(b,v)=>`translate(${(b?b.axisX:0)-p}, 0)`).attr("fill",b=>b.color).attr("y",b=>b.axisY<r[g]?b.axisY:r[g]).attr("x",b=>h?0:o(b.seriesLabel)).attr("width",l).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(f).ease(ca(s.transitionEase)).delay((b,v)=>b.groupIndex*c).attr("height",b=>Math.abs(b.axisYFromZero)||1)}),t.selectAll(`rect.${e}`)}function kI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function RI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const _p=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,isSeriesSeprate$:y,event$:b})=>{const v=new J,x=Pe(t,"clipPath-box"),_=Z(t,"rect"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:f,gridGraphicTransform$:h}),B=o.pipe(L(v),R(N=>N.map(E=>E[0]?E[0].axisY-E[0].axisYFromZero:0)),tt()),$=Y({computedData:n,visibleComputedData:i,params:u,gridAxesSize:d,isSeriesSeprate:y}).pipe(L(v),G(async N=>N),R(N=>N.params.barWidth?N.params.barWidth:N.isSeriesSeprate?g$({axisWidth:N.gridAxesSize.width,groupAmount:N.computedData[0]?N.computedData[0].length:0,barAmountOfGroup:1,barPadding:N.params.barPadding,barGroupPadding:N.params.barGroupPadding}):g$({axisWidth:N.gridAxesSize.width,groupAmount:N.computedData[0]?N.computedData[0].length:0,barAmountOfGroup:N.visibleComputedData.length,barPadding:N.params.barPadding,barGroupPadding:N.params.barGroupPadding})),tt()),k=Y({computedData:n,barWidth:$,params:u,gridGraphicReverseScale:p}).pipe(L(v),G(async N=>N),R(N=>{const E=N.barWidth/2,O=N.params.barRadius===!0?E:N.params.barRadius===!1?0:typeof N.params.barRadius=="number"?N.params.barRadius:0;return N.computedData.map((j,it)=>{const W=N.gridGraphicReverseScale[it]??N.gridGraphicReverseScale[0];let Q=O*W[0],X=O*W[1];if(Q>E){const K=E/Q;Q=Q*K,X=X*K}return[Q,X]})})),M=i.pipe(L(v),R(N=>{const E=new Set;return N.forEach(O=>{O.forEach(j=>{E.add(j.groupLabel)})}),Array.from(E)})),T=Y({seriesLabels:a,barWidth:$,params:u}).pipe(L(v),G(async N=>N),R(N=>DI(N.barWidth,N.seriesLabels,N.params))),S=c.pipe(L(v),R(N=>N.transitionDuration),tt()),D=new dt(N=>{Y({groupLabels:M,transitionDuration:S}).pipe(G(async E=>E)).subscribe(E=>{const O=CI(E.groupLabels.length,E.transitionDuration);N.next(O)})}).pipe(L(v),tt()),F=new dt(N=>{Y({groupLabels:M,transitionDuration:S}).pipe(G(async E=>E)).subscribe(E=>{const O=MI(E.groupLabels.length,E.transitionDuration);N.next(O)})}).pipe(L(v),tt());Y({defsSelection:P,gridAxesSize:d}).pipe(L(v),G(async N=>N)).subscribe(N=>{const E=[{id:x,width:N.gridAxesSize.width,height:N.gridAxesSize.height}];kI({defsSelection:N.defsSelection,clipPathData:E})});const z=c.pipe(L(v),R(N=>N.highlightTarget),tt()),I=Y({graphicGSelection:C,visibleComputedLayoutData:o,zeroYArr:B,groupLabels:M,barScale:T,params:u,chartParams:c,highlightTarget:z,barWidth:$,transformedBarRadius:k,delayGroup:D,transitionItem:F,isSeriesSeprate:y}).pipe(L(v),G(async N=>N),R(N=>LI({graphicGSelection:N.graphicGSelection,rectClassName:_,visibleComputedLayoutData:N.visibleComputedLayoutData,zeroYArr:N.zeroYArr,groupLabels:N.groupLabels,barScale:N.barScale,params:N.params,chartParams:N.chartParams,barWidth:N.barWidth,transformedBarRadius:N.transformedBarRadius,delayGroup:N.delayGroup,transitionItem:N.transitionItem,isSeriesSeprate:N.isSeriesSeprate})));return Y({barSelection:I,computedData:n,highlightTarget:z,SeriesDataMap:s,GroupDataMap:l}).pipe(L(v),G(async N=>N)).subscribe(N=>{N.barSelection.on("mouseover",(E,O)=>{E.stopPropagation(),b.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:N.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:E,data:N.computedData})}).on("mousemove",(E,O)=>{E.stopPropagation(),b.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:N.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:E,data:N.computedData})}).on("mouseout",(E,O)=>{E.stopPropagation(),b.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:N.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:E,data:N.computedData})}).on("click",(E,O)=>{E.stopPropagation(),b.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:N.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:E,data:N.computedData})})}),Y({barSelection:I,highlight:m.pipe(R(N=>N.map(E=>E.id))),fullChartParams:c}).pipe(L(v),G(async N=>N)).subscribe(N=>{RI({selection:N.barSelection,ids:N.highlight,fullChartParams:N.fullChartParams})}),()=>{v.next(void 0)}},m$="Bars",EI=se({name:m$,defaultParams:ga,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=_p(m$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),y$="BarsPN",II=se({name:y$,defaultParams:ga,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=_p(y$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:_a(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),b$=.3;function BI({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=(e>1?t/(e-1):t)-n;return i>1?i:1}function NI(t,e){return t<=1?0:e/(t-1)*b$}function FI(t,e){return t<=1?e:e*(1-b$)}function zI({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:l,delayGroup:u,transitionItem:c,isSeriesSeprate:f}){const h=s/2;return t.each((d,m,g)=>{V(g[m]).selectAll(`rect.${e}`).data(n[m]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",b=>1),y=>y,y=>y.remove()).attr("transform",(y,b)=>`translate(${(y?y.axisX:0)-h}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",l[m][0]??1).attr("ry",l[m][1]??1).transition().duration(c).ease(ca(a.transitionEase)).delay((y,b)=>y.groupIndex*u).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight)||1)}),t.selectAll(`rect.${e}`)}function OI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function GI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const x$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:m,gridHighlight$:g,gridContainerPosition$:y,isSeriesSeprate$:b,event$:v})=>{const x=new J,_=Pe(t,"clipPath-box"),A=Z(t,"rect"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:e,pluginName:t,clipPathID:_,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:h,gridGraphicTransform$:p}),$=o.pipe(L(x),R(W=>W[0]&&W[0][0]?W[0][0].axisY-W[0][0].axisYFromZero:0),tt()),k=Y({computedData:n,params:u,axisSize:m,isSeriesSeprate:b}).pipe(L(x),G(async W=>W),R(W=>W.params.barWidth?W.params.barWidth:BI({axisWidth:W.axisSize.width,groupAmount:W.computedData[0]?W.computedData[0].length:0,barGroupPadding:W.params.barGroupPadding})),tt()),M=Y({computedData:n,barWidth:k,params:u,gridGraphicReverseScale:d}).pipe(L(x),G(async W=>W),R(W=>{const Q=W.barWidth/2,X=W.params.barRadius===!0?Q:W.params.barRadius===!1?0:typeof W.params.barRadius=="number"?W.params.barRadius:0;return W.computedData.map((K,q)=>{const nt=W.gridGraphicReverseScale[q]??W.gridGraphicReverseScale[0],st=X*nt[0],U=X*nt[1];return[st,U]})})),T=i.pipe(L(x),R(W=>{const Q=new Set;return W.forEach(X=>{X.forEach(K=>{Q.add(K.groupLabel)})}),Array.from(Q)}),pt(1)),S=f.pipe(L(x),R(W=>W.transitionDuration),tt()),D=new dt(W=>{Y({groupLabels:T,transitionDuration:S}).pipe(G(async Q=>Q)).subscribe(Q=>{const X=NI(Q.groupLabels.length,Q.transitionDuration);W.next(X)})}).pipe(L(x),tt()),F=new dt(W=>{Y({groupLabels:T,transitionDuration:S}).pipe(G(async Q=>Q)).subscribe(Q=>{const X=FI(Q.groupLabels.length,Q.transitionDuration);W.next(X)})}).pipe(L(x),tt()),z=Y({computedData:n,dataFormatter:c}).pipe(L(x),G(async W=>W),R(W=>{const Q=W.computedData[0]?W.computedData[0].length-1:0,X=W.dataFormatter.groupAxis.scaleDomain[0],K=W.dataFormatter.groupAxis.scaleDomain[1]==="max"?Q:W.dataFormatter.groupAxis.scaleDomain[1];return[X,K]})),I=Y({visibleComputedLayoutData:o,groupScaleDomain:z}).pipe(L(x),G(async W=>W),R(W=>{const Q=W.groupScaleDomain[0],X=W.groupScaleDomain[1],q=W.visibleComputedLayoutData.map(mt=>mt.filter((ft,Et)=>ft.groupIndex>=Q&&ft.groupIndex<=X)).flat();if(q.length<=1)return 1;const nt=q.reduce((mt,ft)=>ft.value>mt.value?ft:mt,q[0]),st=nt.groupIndex,U=q.filter(mt=>mt.groupIndex===st).reduce((mt,ft)=>mt+ft.value,0);return nt.value/U})),N=Y({computedLayoutData:r,yRatio:I,zeroY:$}).pipe(L(x),R(W=>{let Q=W.computedLayoutData[0]?W.computedLayoutData[0].map(()=>W.zeroY):[];return W.computedLayoutData.map((X,K)=>X.map((q,nt)=>{const st=Q[nt];let U=0;return q.visible&&(U=q.axisYFromZero*W.yRatio,Q[nt]=Q[nt]+U),{...q,_barStartY:st,_barHeight:U}}))})),E=Y({computedLayoutData:r,zeroY:$}).pipe(L(x),R(W=>W.computedLayoutData.map((Q,X)=>Q.map((K,q)=>({...K,_barStartY:W.zeroY,_barHeight:K.axisYFromZero}))))),O=b.pipe(G(W=>Wi(()=>W,E,N)));Y({defsSelection:C,gridAxesSize:m}).pipe(L(x),G(async W=>W)).subscribe(W=>{const Q=[{id:_,width:W.gridAxesSize.width,height:W.gridAxesSize.height}];OI({defsSelection:W.defsSelection,clipPathData:Q})});const j=f.pipe(L(x),R(W=>W.highlightTarget),tt()),it=Y({graphicGSelection:B,graphicData:O,zeroY:$,groupLabels:T,params:u,chartParams:f,highlightTarget:j,barWidth:k,transformedBarRadius:M,delayGroup:D,transitionItem:F,isSeriesSeprate:b}).pipe(L(x),G(async W=>W),R(W=>zI({graphicGSelection:W.graphicGSelection,rectClassName:A,barData:W.graphicData,zeroY:W.zeroY,groupLabels:W.groupLabels,params:W.params,chartParams:W.chartParams,barWidth:W.barWidth,transformedBarRadius:W.transformedBarRadius,delayGroup:W.delayGroup,transitionItem:W.transitionItem,isSeriesSeprate:W.isSeriesSeprate})));return Y({barSelection:it,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:l}).subscribe(W=>{W.barSelection.on("mouseover",(Q,X)=>{Q.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:W.highlightTarget,datum:X,gridIndex:X.gridIndex,series:W.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:W.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:W.computedData})}).on("mousemove",(Q,X)=>{Q.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:W.highlightTarget,datum:X,gridIndex:X.gridIndex,series:W.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:W.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:W.computedData})}).on("mouseout",(Q,X)=>{Q.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:W.highlightTarget,datum:X,gridIndex:X.gridIndex,series:W.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:W.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:W.computedData})}).on("click",(Q,X)=>{Q.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:W.highlightTarget,datum:X,gridIndex:X.gridIndex,series:W.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:W.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:W.computedData})})}),Y({barSelection:it,highlight:g.pipe(R(W=>W.map(Q=>Q.id))),fullChartParams:f}).pipe(L(x),G(async W=>W)).subscribe(W=>{GI({selection:W.barSelection,ids:W.highlight,fullChartParams:W.fullChartParams})}),()=>{x.next(void 0)}},v$="StackedBar",YI=se({name:v$,defaultParams:nd,layerIndex:5,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=x$(v$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),$$=.3;function _$({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function WI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Wh().domain(e).range([-i/2+r,i/2-r])}function XI(t,e){return t<=1?0:e/(t-1)*$$}function VI(t,e){return t<=1?e:e*(1-$$)}function UI({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:l,chartParams:u,barWidth:c,delayGroup:f,transitionItem:h,isSeriesSeprate:p}){const d=c/2;return t.each((g,y,b)=>{V(b[y]).selectAll(`g.${e}`).data(r[y]??[]).join(x=>{const _=x.append("g").classed(e,!0).attr("cursor","pointer");return _.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",A=>{const w=-d,P=o[y],C=o[y];return`M${w},${P} L${w+c/2},${C} ${w+c},${P}`}),_},x=>x,x=>x.remove()).attr("transform",x=>`translate(${p?0:s(x.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",x=>Math.abs(x.axisYFromZero)||1).attr("y",x=>x.axisY<o[y]?x.axisY:o[y]).attr("x",x=>p?0:s(x.seriesLabel)).style("fill",x=>`url(#${i[x.seriesIndex]})`).attr("stroke",x=>x.color).attr("transform",x=>`translate(${x?x.axisX:0}, 0)`).transition().duration(h).ease(ca(u.transitionEase)).delay((x,_)=>x.groupIndex*f).attr("d",x=>{const _=-d,A=o[y],w=x.axisY;return`M${_},${A} L${_+c/2},${w} ${_+c},${A}`})}),t.selectAll(`path.${n}`)}function HI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
50
50
  <stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
51
51
  <stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
52
- `})}function qE({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{q(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function ZE({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?q(a[o]).style("opacity",1):q(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const Zv=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:l,fullParams$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:b,event$:y})=>{const _=new et,x=Mn(t,"clipPath-box"),w=ot(t,"pathG"),$=ot(t,"path"),{seriesSelection$:R,axesSelection$:A,defsSelection$:D,graphicGSelection$:I}=dr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p});p.pipe(N(_),B(C=>-C.translate[1]/C.scale[1]));const v=o.pipe(B(C=>C.map(F=>F[0]?F[0].axisY-F[0].axisYFromZero:0)),tt()),L=U({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:b}).pipe(N(_),W(async C=>C),B(C=>C.params.barWidth?C.params.barWidth:C.isSeriesSeprate?qv({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:1,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}):qv({axisWidth:C.gridAxesSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barAmountOfGroup:C.visibleComputedData.length,barPadding:C.params.barPadding,barGroupPadding:C.params.barGroupPadding}))),T=i.pipe(N(_),B(C=>{const F=new Set;return C.forEach(H=>{H.forEach(J=>{F.add(J.groupLabel)})}),Array.from(F)})),S=new gt(C=>{U({seriesLabels:s,barWidth:L,params:c}).pipe(N(_),W(async F=>F)).subscribe(F=>{const H=WE(F.barWidth,F.seriesLabels,F.params);C.next(H)})}),M=f.pipe(N(_),B(C=>C.transitionDuration),tt()),P=new gt(C=>{U({groupLabels:T,transitionDuration:M}).pipe(W(async F=>F)).subscribe(F=>{const H=HE(F.groupLabels.length,F.transitionDuration);C.next(H)})}).pipe(N(_),tt()),G=new gt(C=>{U({groupLabels:T,transitionDuration:M}).pipe(W(async F=>F)).subscribe(F=>{const H=XE(F.groupLabels.length,F.transitionDuration);C.next(H)})}).pipe(N(_),tt());U({defsSelection:D,gridAxesSize:d}).pipe(N(_),W(async C=>C)).subscribe(C=>{const F=[{id:x,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];qE({defsSelection:C.defsSelection,clipPathData:F})});const O=f.pipe(N(_),B(C=>C.highlightTarget),tt()),k=s.pipe(N(_),B(C=>C.map((F,H)=>Mn(t,`lineargradient-${F}`)))),E=U({graphicGSelection:I,defsSelection:D,computedData:n,visibleComputedLayoutData:o,linearGradientIds:k,zeroYArr:v,groupLabels:T,barScale:S,params:c,chartParams:f,barWidth:L,delayGroup:P,transitionItem:G,isSeriesSeprate:b}).pipe(N(_),W(async C=>C),B(C=>(VE({defsSelection:C.defsSelection,computedData:C.computedData,linearGradientIds:C.linearGradientIds,params:C.params}),jE({graphicGSelection:C.graphicGSelection,pathGClassName:w,pathClassName:$,visibleComputedLayoutData:C.visibleComputedLayoutData,linearGradientIds:C.linearGradientIds,zeroYArr:C.zeroYArr,groupLabels:C.groupLabels,barScale:C.barScale,params:C.params,chartParams:C.chartParams,barWidth:C.barWidth,delayGroup:C.delayGroup,transitionItem:C.transitionItem,isSeriesSeprate:C.isSeriesSeprate}))));return U({barSelection:E,computedData:n,highlightTarget:O,SeriesDataMap:u,GroupDataMap:l}).subscribe(C=>{C.barSelection.on("mouseover",(F,H)=>{F.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:H,gridIndex:H.gridIndex,series:C.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:C.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:F,data:C.computedData})}).on("mousemove",(F,H)=>{F.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:H,gridIndex:H.gridIndex,series:C.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:C.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:F,data:C.computedData})}).on("mouseout",(F,H)=>{F.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:H,gridIndex:H.gridIndex,series:C.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:C.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:F,data:C.computedData})}).on("click",(F,H)=>{F.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:H,gridIndex:H.gridIndex,series:C.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:C.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:F,data:C.computedData})})}),U({barSelection:E,highlight:g.pipe(B(C=>C.map(F=>F.id))),fullChartParams:f}).pipe(N(_),W(async C=>C)).subscribe(C=>{ZE({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{_.next(void 0)}},Kv="BarsTriangle",KE=re({name:Kv,defaultParams:_p,layerIndex:5,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Zv(Kv,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function QE({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let u=0;return t.each((c,f,h)=>{q(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(u=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{q(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((b,y)=>d*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,b)=>Pn({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,b)=>Pn({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function JE({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?q(a[o]).style("opacity",1).transition("highlight").duration(200):q(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function tI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{q(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const Qv=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:b})=>{const y=new et,_=Mn(t,"clipPath-box"),x=ot(t,"circleG"),w=ot(t,"circle"),{seriesSelection$:$,axesSelection$:R,defsSelection$:A,graphicGSelection$:D}=dr({selection:e,pluginName:t,clipPathID:_,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),I=U({computedData:n,gridGraphicReverseScale:p}).pipe(N(y),W(async S=>S),B(S=>S.computedData.map((M,P)=>S.gridGraphicReverseScale[P])));U({defsSelection:A,gridAxesSize:d}).pipe(N(y),W(async S=>S)).subscribe(S=>{const M=[{id:_,width:S.gridAxesSize.width,height:S.gridAxesSize.height}];tI({defsSelection:S.defsSelection,clipPathData:M})});const v=c.pipe(N(y),B(S=>S.highlightTarget),tt()),L=U({graphicGSelection:D,visibleComputedLayoutData:o,graphicReverseScale:I,fullChartParams:c,fullParams:l}).pipe(N(y),W(async S=>S),B(S=>QE({graphicGSelection:S.graphicGSelection,circleGClassName:x,circleClassName:w,visibleComputedLayoutData:S.visibleComputedLayoutData,fullParams:S.fullParams,fullChartParams:S.fullChartParams,graphicReverseScale:S.graphicReverseScale})));U({graphicSelection:L,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:v}).pipe(N(y),W(async S=>S)).subscribe(S=>{S.graphicSelection.on("mouseover",(M,P)=>{b.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:S.highlightTarget,datum:P,gridIndex:P.gridIndex,series:S.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:S.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:M,data:S.computedData})}).on("mousemove",(M,P)=>{b.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:S.highlightTarget,data:S.computedData,datum:P,gridIndex:P.gridIndex,series:S.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:S.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:M})}).on("mouseout",(M,P)=>{b.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:S.highlightTarget,datum:P,gridIndex:P.gridIndex,series:S.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:S.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:M,data:S.computedData})}).on("click",(M,P)=>{b.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:S.highlightTarget,datum:P,gridIndex:P.gridIndex,series:S.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:S.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:M,data:S.computedData})})});const T=l.pipe(N(y),B(S=>S.onlyShowHighlighted),tt());return U({graphicSelection:L,highlight:g.pipe(B(S=>S.map(M=>M.id))),onlyShowHighlighted:T,fullChartParams:c}).pipe(N(y),W(async S=>S)).subscribe(S=>{JE({selection:S.graphicSelection,ids:S.highlight,onlyShowHighlighted:S.onlyShowHighlighted,fullChartParams:S.fullChartParams})}),()=>{y.next(void 0)}},Jv="Dots",eI=re({name:Jv,defaultParams:xp,layerIndex:Bv,validator:(t,{validateColumns:e})=>e(t,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Qv(Jv,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),nI={listRectWidth:14,listRectHeight:14,listRectRadius:0};function t2(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}const Ou=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=ot(t,"root-position"),u=ot(t,"legend-card"),l=ot(t,"legend-list"),c=ot(t,"legend-item"),f=new et,h=U({seriesLabels:n,fullChartParams:o}).pipe(N(f),W(async v=>v),B(v=>{const L=new Map;let T=0;return v.seriesLabels.forEach((S,M)=>{if(!L.has(S)){const P=t2(T,v.fullChartParams);L.set(S,P),T++}}),L})),p=n.pipe(N(f),B(v=>{const L=new Set;let T=[];return v.forEach(S=>{L.has(S)?T.push(!1):T.push(!0),L.add(S)}),T})),d=r.pipe(N(f),B(v=>v.placement==="top"||v.placement==="top-start"||v.placement==="top-end"?"top":v.placement==="bottom"||v.placement==="bottom-start"||v.placement==="bottom-end"?"bottom":v.placement==="left"||v.placement==="left-start"||v.placement==="left-end"?"left":"right"),tt((v,L)=>v===L),vt(1)),g=r.pipe(N(f),B(v=>v.placement==="top-start"||v.placement==="bottom-start"||v.placement==="left-start"||v.placement==="right-start"?"start":v.placement==="top-end"||v.placement==="bottom-end"||v.placement==="left-end"||v.placement==="right-end"?"end":(v.placement==="top"||v.placement==="bottom"||v.placement==="left"||v.placement==="right","center")),tt((v,L)=>v===L),vt(1)),m=d.pipe(N(f),B(v=>v==="bottom"||v==="top"?"row":"column"),tt((v,L)=>v===L),vt(1)),b=U({fullParams:r,position:d,layout:i}).pipe(N(f),W(async v=>v),B(v=>{const L=v.fullParams.padding*2+v.fullParams.gap*2;return v.position==="bottom"||v.position==="top"?v.layout.rootWidth-L:v.layout.rootHeight-L})),_=U({layout:i,position:d,justify:g}).pipe(N(f),W(async v=>v),B(v=>{let L=0,T=0;return v.position==="bottom"?(T=v.layout.rootHeight,v.justify==="start"?L=0:v.justify==="center"?L=v.layout.rootWidth/2:v.justify==="end"&&(L=v.layout.rootWidth)):v.position==="right"?(L=v.layout.rootWidth,v.justify==="start"?T=0:v.justify==="center"?T=v.layout.rootHeight/2:v.justify==="end"&&(T=v.layout.rootHeight)):v.position==="top"?(T=0,v.justify==="start"?L=0:v.justify==="center"?L=v.layout.rootWidth/2:v.justify==="end"&&(L=v.layout.rootWidth)):v.position==="left"&&(L=0,v.justify==="start"?T=0:v.justify==="center"?T=v.layout.rootHeight/2:v.justify==="end"&&(T=v.layout.rootHeight)),{x:L,y:T}})).pipe(N(f),B(v=>e.selectAll(`g.${s}`).data([v]).join(L=>L.append("g").classed(s,!0).attr("transform",T=>`translate(${T.x}, ${T.y})`),L=>L.transition().attr("transform",T=>`translate(${T.x}, ${T.y})`),L=>L.remove()))),x=r.pipe(N(f),B(v=>v.seriesList[0]?v.seriesList[0]:nI)),w=U({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:m,lineMaxSize:b,defaultListStyle:x,SeriesLabelColorMap:h,textSizePx:a}).pipe(N(f),W(async v=>v),B(v=>v.seriesLabels.reduce((L,T,S)=>{if(!v.visibleList[S])return L;const M=fn(T,v.textSizePx),P=v.textSizePx*1.5+M,G=v.SeriesLabelColorMap.get(T),O=L[0]&&L[0][0]?L[L.length-1][L[L.length-1].length-1]:null,{translateX:k,translateY:E,lineIndex:C,itemIndex:F}=((J,z,V)=>{let Y=0,K=0,j=0,nt=0;if(J.lineDirection==="column"){let st=V?V.translateY+J.textSizePx+J.fullParams.gap:0;if(st+J.textSizePx>J.lineMaxSize){j=V.lineIndex+1,nt=0,K=0;const X=z[z.length-1].reduce((dt,ft)=>ft.itemWidth>dt?ft.itemWidth:dt,0);Y=V.translateX+X+J.fullParams.gap}else j=V?V.lineIndex:0,nt=V?V.itemIndex+1:0,K=st,Y=V?V.translateX:0}else{let st=V?V.translateX+V.itemWidth+J.fullParams.gap:0;st+P>J.lineMaxSize?(j=V.lineIndex+1,nt=0,Y=0):(j=V?V.lineIndex:0,nt=V?V.itemIndex+1:0,Y=st),K=(J.textSizePx+J.fullParams.gap)*j}return{translateX:Y,translateY:K,lineIndex:j,itemIndex:nt}})(v,L,O);L[C]||(L[C]=[]);const H=v.fullParams.seriesList[F]?v.fullParams.seriesList[F]:v.defaultListStyle;return L[C].push({id:T,seriesLabel:T,seriesIndex:S,lineIndex:C,itemIndex:F,text:T,itemWidth:P,translateX:k,translateY:E,color:G,listRectWidth:H.listRectWidth,listRectHeight:H.listRectHeight,listRectRadius:H.listRectRadius}),L},[])),vt(1)),$=U({fullParams:r,fullChartParams:o,lineDirection:m,lengendItems:w,textSizePx:a}).pipe(N(f),W(async v=>v),B(v=>{const{width:L,height:T}=((S,M)=>{let P=0,G=0;if(!M.length||!M[0].length)return{width:P,height:G};const O=M[0][M[0].length-1];return S.lineDirection==="column"?(P=M.reduce((k,E)=>{const C=E.reduce((F,H)=>H.itemWidth>F?H.itemWidth:F,0);return k+C},0),P+=S.fullParams.gap*(M.length-1),G=O.translateY+S.textSizePx):(P=O.translateX+O.itemWidth,G=S.textSizePx*M.length+S.fullParams.gap*(M.length-1)),{width:P,height:G}})(v,v.lengendItems);return{direction:v.lineDirection,width:L,height:T,translateX:v.fullParams.gap,translateY:v.fullParams.gap}}),vt(1)),R=U({fullParams:r,position:d,justify:g,lengendList:$}).pipe(N(f),W(async v=>v),B(v=>{const L=v.lengendList.width+v.fullParams.gap*2,T=v.lengendList.height+v.fullParams.gap*2;let S=0,M=0;return v.position==="left"?v.justify==="start"?(S=v.fullParams.padding,M=v.fullParams.padding):v.justify==="center"?(S=v.fullParams.padding,M=-T/2):v.justify==="end"&&(S=v.fullParams.padding,M=-T-v.fullParams.padding):v.position==="right"?v.justify==="start"?(S=-L-v.fullParams.padding,M=v.fullParams.padding):v.justify==="center"?(S=-L-v.fullParams.padding,M=-T/2):v.justify==="end"&&(S=-L-v.fullParams.padding,M=-T-v.fullParams.padding):v.position==="top"?v.justify==="start"?(S=v.fullParams.padding,M=v.fullParams.padding):v.justify==="center"?(S=-L/2,M=v.fullParams.padding):v.justify==="end"&&(S=-L-v.fullParams.padding,M=v.fullParams.padding):v.justify==="start"?(S=v.fullParams.padding,M=-T-v.fullParams.padding):v.justify==="center"?(S=-L/2,M=-T-v.fullParams.padding):v.justify==="end"&&(S=-L-v.fullParams.padding,M=-T-v.fullParams.padding),{width:L,height:T,translateX:S,translateY:M}})),A=U({rootPositionSelection:_,fullParams:r,fullChartParams:o,legendCard:R}).pipe(N(f),W(async v=>v),B(v=>v.rootPositionSelection.selectAll("g").data([v.legendCard]).join(L=>L.append("g").classed(u,!0).attr("transform",T=>`translate(${T.translateX}, ${T.translateY})`),L=>L.transition().attr("transform",T=>`translate(${T.translateX}, ${T.translateY})`),L=>L.remove()).each((L,T,S)=>{q(S[T]).selectAll("rect").data([L]).join("rect").attr("width",M=>M.width).attr("height",M=>M.height).attr("fill",kt(v.fullParams.backgroundFill,v.fullChartParams)).attr("stroke",kt(v.fullParams.backgroundStroke,v.fullChartParams))}))),D=U({lengendCardSelection:A,fullParams:r,lengendList:$}).pipe(N(f),W(async v=>v),B(v=>v.lengendCardSelection.selectAll("g").data([v.lengendList]).join(L=>L.append("g").classed(l,!0).attr("transform",T=>`translate(${T.translateX}, ${T.translateY})`),L=>L.transition().attr("transform",T=>`translate(${T.translateX}, ${T.translateY})`),L=>L.remove())));return U({lengendListSelection:D,fullParams:r,fullChartParams:o,lengendItems:w,textSizePx:a}).pipe(N(f),W(async v=>v),B(v=>{const L=v.lengendItems[0]?v.lengendItems.flat():[];return v.lengendListSelection.selectAll(`g.${c}`).data(L).join(T=>T.append("g").classed(c,!0).attr("cursor","default"),T=>T,T=>T.remove()).attr("transform",(T,S)=>`translate(${T.translateX}, ${T.translateY})`).each((T,S,M)=>{const P=v.textSizePx/2,G=-T.listRectWidth/2,O=-T.listRectHeight/2;q(M[S]).selectAll("rect").data([T]).join("rect").attr("x",P).attr("y",P).attr("width",k=>k.listRectWidth).attr("height",k=>k.listRectHeight).attr("transform",k=>`translate(${G}, ${O})`).attr("fill",k=>k.color).attr("rx",k=>k.listRectRadius),q(M[S]).selectAll("text").data([T]).join(k=>k.append("text").attr("dominant-baseline","hanging"),k=>k,k=>k.remove()).attr("x",v.textSizePx*1.5).attr("font-size",v.fullChartParams.styles.textSize).attr("fill",k=>v.fullParams.textColorType==="series"?t2(k.seriesIndex,v.fullChartParams):kt(v.fullParams.textColorType,v.fullChartParams)).text(k=>k.text)})})).subscribe(),()=>{e.select(`g.${s}`).remove(),f.next(void 0)}},e2="GridLegend",rI=re({name:e2,defaultParams:Sp,layerIndex:Bu,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.SeriesDataMap$.pipe(N(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(N(i),B(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Ou(e2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}});function iI(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function s(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function u(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function l(p){const d=u(p.trim());return Math.sqrt(d*r)}function c(p,d){let g={width:0,text:""},m=1/0;const b=[];let y=" ";i&&(y="");for(let _=0,x=p.length;_<x;++_){const w=(g.text?g.text+y:"")+p[_],$=u(w);(m+$)/2<d?(g.width=m=$,g.text=w):(m=u(p[_]),g={width:m,text:p[_]},b.push(g))}return b}function f(p){let d=0;for(let g=0,m=p.length;g<m;++g){const b=(Math.abs(g-m/2+.5)+.5)*r,y=p[g].width/2;d=Math.max(d,Math.sqrt(y**2+b**2))}return d}function h(p,d){o>0&&(d=s(d,o));const g=a(d),m=l(d),b=c(g,m),y=f(b);let _=p.select("text");_.size()||(_=p.append("text")),_.attr("transform",`translate(0,0) scale(${n/y})`);const x=_.selectAll("tspan").data(b),w=x.enter().append("tspan").attr("x",0).merge(x).attr("y",($,R)=>(R-b.length/2+.8)*r).text($=>$.text);return x.exit().remove(),x.merge(w)}return h(t,e)}function n2(t,{textArr:e,textSizePx:n,groupAxisPosition:r}){t.text(null);const i=Number(t.attr("x"));let o=Number(t.attr("y"));r==="top"&&(o-=(e.length-1)*n),t.selectAll("tspan").data(e).join("tspan").attr("x",i).attr("y",(a,s)=>o+s*n).text(a=>a)}function r2(t,{textArr:e,textSizePx:n,quadrant:r}){t.selectAll("tspan").data(e).join("tspan").attr("x",0).attr("y",(i,o)=>r==1||r==2?-(e.length-1-o)*n:o*n).text(i=>i)}const oI=6;function aI(t,e){return t.map((n,r)=>{const i=Gh(n,e),o=typeof i=="string"?i.split(`
53
- `):[i];return{text:i,textArr:o}})}function sI({selection:t,groupingLabelClassName:e,fullParams:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,textReverseTransform:s}){const u=n.tickPadding+n.labelOffset[0],l=n.tickPadding+n.labelOffset[1];let c=0,f=0;o.grid.groupAxis.position==="bottom"?(f=l,o.grid.valueAxis.position==="left"?c=u:o.grid.valueAxis.position==="right"&&(c=-u)):o.grid.groupAxis.position==="top"?(f=-l,o.grid.valueAxis.position==="left"?c=u:o.grid.valueAxis.position==="right"&&(c=-u)):o.grid.groupAxis.position==="left"?(c=-u,o.grid.valueAxis.position==="bottom"?f=-l:o.grid.valueAxis.position==="top"&&(f=l)):o.grid.groupAxis.position==="right"&&(c=u,o.grid.valueAxis.position==="bottom"?f=-l:o.grid.valueAxis.position==="top"&&(f=l)),t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((h,p,d)=>{q(d[p]).selectAll("text").data([h]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("font-size",a.styles.textSize).style("fill",kt(n.labelColorType,a)).style("transform",s).attr("x",c).attr("y",f).text(g=>o.grid.groupAxis.label)}).attr("transform",h=>`translate(${i.width}, 0)`)}function uI({selection:t,xAxisClassName:e,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:s,groupScaleDomain:u,groupLabelData:l,textReverseTransformWithRotate:c,textSizePx:f}){const h=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0),p=Math.floor(u[1])-Math.ceil(u[0])+1;let d=0,g=0;o.grid.groupAxis.position==="left"?(d=0,g=-n.tickPadding):o.grid.groupAxis.position==="right"?(d=0,g=n.tickPadding):o.grid.groupAxis.position==="bottom"?(d=n.tickPadding,g=0):o.grid.groupAxis.position==="top"&&(d=-n.tickPadding,g=-0);const m=c0(s).scale(s).ticks(n.ticks==="all"||n.ticks>p?p:n.ticks).tickSize(n.tickFullLine==!0?i.height:-oI).tickSizeOuter(0).tickFormat(_=>{var x;return((x=l[_])==null?void 0:x.text)??""}).tickPadding(d),b=h.transition().duration(100).call(m).on("end",(_,x)=>{h.selectAll(".tick text").each((w,$,R)=>{var D;const A=((D=l[w])==null?void 0:D.textArr)??[];n2(q(R[$]),{textArr:A,textSizePx:f,groupAxisPosition:o.grid.groupAxis.position})})});return b.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?kt(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),b.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?kt(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",a.styles.textSize).attr("fill",kt(n.tickTextColorType,a)).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("x",g).style("transform",c).attr("dy",0),h}const i2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c,textSizePx$:f})=>{const h=new et,p=ot(t,"container"),d=ot(t,"xAxisG"),g=ot(t,"xAxis"),m=ot(t,"groupingLabel"),b=U({computedData:n.pipe(tt((v,L)=>v.length===L.length)),isSeriesSeprate:c}).pipe(N(h),W(async v=>v),B(v=>v.isSeriesSeprate?v.computedData:[v.computedData[0]]),B((v,L)=>e.selectAll(`g.${p}`).data(v,T=>T[0]?T[0].seriesIndex:L).join("g").classed(p,!0))),y=b.pipe(N(h),B((v,L)=>v.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));U({containerSelection:b,gridContainerPosition:l}).pipe(N(h),W(async v=>v)).subscribe(v=>{v.containerSelection.attr("transform",(L,T)=>{const S=v.gridContainerPosition[T]??v.gridContainerPosition[0],M=S.translate,P=S.scale;return`translate(${M[0]}, ${M[1]}) scale(${P[0]}, ${P[1]})`})}),U({axisSelection:y,gridAxesTransform:a}).pipe(N(h),W(async v=>v)).subscribe(v=>{v.axisSelection.style("transform",v.gridAxesTransform.value)});const _=U({gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(N(h),W(async v=>v),B(v=>{const L=`rotateX(${v.gridAxesReverseTransform.rotateX}deg) rotateY(${v.gridAxesReverseTransform.rotateY}deg)`,T=`rotate(${v.gridAxesReverseTransform.rotate}deg)`,S=`scale(${1/v.gridContainerPosition[0].scale[0]}, ${1/v.gridContainerPosition[0].scale[1]})`;return`${L} ${T} ${S}`}),tt()),x=U({textReverseTransform:_,fullParams:r}).pipe(N(h),W(async v=>v),B(v=>`${v.textReverseTransform} rotate(${v.fullParams.tickTextRotate}deg)`)),w=U({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(N(h),W(async v=>v),B(v=>{const L=v.computedData[0]?v.computedData[0].length-1:0,T=v.fullDataFormatter.grid.groupAxis.scaleDomain[0]-v.fullDataFormatter.grid.groupAxis.scalePadding,S=v.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="max"?L+v.fullDataFormatter.grid.groupAxis.scalePadding:v.fullDataFormatter.grid.groupAxis.scaleDomain[1]+v.fullDataFormatter.grid.groupAxis.scalePadding;return[T,S]}),vt(1)),$=U({groupScaleDomain:w,gridAxesSize:u}).pipe(N(h),W(async v=>v),B(v=>ko().domain(v.groupScaleDomain).range([0,v.gridAxesSize.width]))),R=n.pipe(B(v=>(v[0]??[]).map(L=>L.groupLabel))),A=U({fullDataFormatter:i,fullParams:r}).pipe(N(h),W(async v=>v),B(v=>{let L="middle",T="hanging";return v.fullDataFormatter.grid.groupAxis.position==="bottom"?(L=v.fullParams.tickTextRotate?"end":"middle",T="hanging"):v.fullDataFormatter.grid.groupAxis.position==="top"?(L=v.fullParams.tickTextRotate?"start":"middle",T="auto"):v.fullDataFormatter.grid.groupAxis.position==="left"?(L="end",T="middle"):v.fullDataFormatter.grid.groupAxis.position==="right"&&(L="start",T="middle"),{textAnchor:L,dominantBaseline:T}})),D=i.pipe(N(h),B(v=>{let L="start",T="hanging";return v.grid.groupAxis.position==="bottom"?T="hanging":v.grid.groupAxis.position==="top"?T="auto":v.grid.groupAxis.position==="left"?L="end":v.grid.groupAxis.position==="right"&&(L="start"),v.grid.valueAxis.position==="left"?L="start":v.grid.valueAxis.position==="right"?L="end":v.grid.valueAxis.position==="bottom"?T="auto":v.grid.valueAxis.position==="top"&&(T="hanging"),{textAnchor:L,dominantBaseline:T}})),I=U({groupLabels:R,fullParams:r}).pipe(N(h),W(async v=>v),B(v=>aI(v.groupLabels,v.fullParams.tickFormat)));return U({axisSelection:y,fullParams:r,tickTextAlign:A,axisLabelAlign:D,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:$,groupScaleDomain:w,groupLabelData:I,textReverseTransform:_,textReverseTransformWithRotate:x,textSizePx:f}).pipe(N(h),W(async v=>v)).subscribe(v=>{uI({selection:v.axisSelection,xAxisClassName:g,fullParams:v.fullParams,tickTextAlign:v.tickTextAlign,gridAxesSize:v.gridAxesSize,fullDataFormatter:v.fullDataFormatter,chartParams:v.chartParams,groupScale:v.groupScale,groupScaleDomain:v.groupScaleDomain,groupLabelData:v.groupLabelData,textReverseTransformWithRotate:v.textReverseTransformWithRotate,textSizePx:v.textSizePx}),sI({selection:v.axisSelection,groupingLabelClassName:m,fullParams:v.fullParams,axisLabelAlign:v.axisLabelAlign,gridAxesSize:v.gridAxesSize,fullDataFormatter:v.fullDataFormatter,chartParams:v.chartParams,textReverseTransform:v.textReverseTransform})}),()=>{h.next(void 0)}},o2="GroupAxis",lI=re({name:o2,defaultParams:Hu,layerIndex:Dn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBe:'number | null | "all"',test:r=>r===null||r==="all"||typeof r=="number"},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=i2(o2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),o()}}),cI=6;function fI({selection:t,textClassName:e,fullParams:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,textReverseTransform:s}){const u=n.tickPadding-n.labelOffset[0],l=n.tickPadding+n.labelOffset[1];let c=0,f=0;o.grid.groupAxis.position==="bottom"?(f=-l,o.grid.valueAxis.position==="left"?c=-u:o.grid.valueAxis.position==="right"&&(c=u)):o.grid.groupAxis.position==="top"?(f=l,o.grid.valueAxis.position==="left"?c=-u:o.grid.valueAxis.position==="right"&&(c=u)):o.grid.groupAxis.position==="left"?(c=u,o.grid.valueAxis.position==="bottom"?f=l:o.grid.valueAxis.position==="top"&&(f=-l)):o.grid.groupAxis.position==="right"&&(c=-u,o.grid.valueAxis.position==="bottom"?f=l:o.grid.valueAxis.position==="top"&&(f=-l)),t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((h,p,d)=>{q(d[p]).selectAll("text").data([h]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("font-size",a.styles.textSize).style("fill",kt(n.labelColorType,a)).style("transform",s).attr("x",c).attr("y",f).text(g=>o.grid.valueAxis.label)}).attr("transform",h=>`translate(0, ${i.height})`)}function hI({selection:t,yAxisClassName:e,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,textReverseTransformWithRotate:u,minAndMax:l}){const c=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0),f=l[1]-l[0];let h=0,p=0;o.grid.valueAxis.position==="left"?(h=n.tickPadding,p=0):o.grid.valueAxis.position==="right"?(h=-n.tickPadding,p=0):o.grid.valueAxis.position==="bottom"?(h=0,p=n.tickPadding):o.grid.valueAxis.position==="top"&&(h=0,p=-n.tickPadding);const d=f0(s).scale(s).ticks(f>n.ticks?n.ticks:l[0]===0&&l[1]===0?1:Math.ceil(f)).tickFormat(b=>Gh(b,n.tickFormat)).tickSize(n.tickFullLine==!0?-i.width:cI).tickPadding(h),g=c.transition().duration(100).call(d);g.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?kt(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?kt(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges");const m=c.selectAll("text").attr("font-size",a.styles.textSize).style("color",kt(n.tickTextColorType,a)).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("y",p);return m.style("transform",u),(o.grid.valueAxis.position==="bottom"||o.grid.valueAxis.position==="top")&&m.attr("dy",0),c}const bi=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new et,h=ot(t,"container"),p=ot(t,"yAxisG"),d=ot(t,"yAxis"),g=ot(t,"text"),m=U({computedData:n.pipe(tt((A,D)=>A.length===D.length)),isSeriesSeprate:c}).pipe(N(f),W(async A=>A),B(A=>A.isSeriesSeprate?A.computedData:[A.computedData[0]]),B((A,D)=>e.selectAll(`g.${h}`).data(A,I=>I[0]?I[0].seriesIndex:D).join("g").classed(h,!0))),b=m.pipe(N(f),B((A,D)=>A.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));U({containerSelection:m,gridContainerPosition:l}).pipe(N(f),W(async A=>A)).subscribe(A=>{A.containerSelection.attr("transform",(D,I)=>{const v=A.gridContainerPosition[I]??A.gridContainerPosition[0],L=v.translate,T=v.scale;return`translate(${L[0]}, ${L[1]}) scale(${T[0]}, ${T[1]})`})}),U({axisSelection:b,gridAxesTransform:a}).pipe(N(f),W(async A=>A)).subscribe(A=>{A.axisSelection.style("transform",A.gridAxesTransform.value)});const y=U({gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(N(f),W(async A=>A),B(A=>{const D=`rotateX(${A.gridAxesReverseTransform.rotateX}deg) rotateY(${A.gridAxesReverseTransform.rotateY}deg)`,I=`rotate(${A.gridAxesReverseTransform.rotate}deg)`,v=`scale(${1/A.gridContainerPosition[0].scale[0]}, ${1/A.gridContainerPosition[0].scale[1]})`;return`${D} ${I} ${v}`}),tt()),_=U({textReverseTransform:y,fullParams:r}).pipe(N(f),W(async A=>A),B(A=>`${A.textReverseTransform} rotate(${A.fullParams.tickTextRotate}deg)`)),x=new gt(A=>{U({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(N(f),W(async D=>D)).subscribe(D=>{const I=D.computedData[0]?D.computedData[0].length-1:0,v=D.fullDataFormatter.grid.groupAxis.scaleDomain[0]-D.fullDataFormatter.grid.groupAxis.scalePadding,L=D.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="max"?I+D.fullDataFormatter.grid.groupAxis.scalePadding:D.fullDataFormatter.grid.groupAxis.scaleDomain[1]+D.fullDataFormatter.grid.groupAxis.scalePadding,T=D.computedData.map((M,P)=>M.filter((G,O)=>O>=v&&O<=L)),S=hE(T.flat());S[0]===S[1]&&(S[0]=S[1]-1),A.next(S)})}),w=new gt(A=>{U({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(N(f),W(async D=>D)).subscribe(D=>{const I=Lg({maxValue:D.minAndMax[1],minValue:D.minAndMax[0],axisWidth:D.gridAxesSize.height,scaleDomain:D.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:D.fullDataFormatter.grid.valueAxis.scaleRange});A.next(I)})}),$=U({fullDataFormatter:i,fullParams:r}).pipe(N(f),W(async A=>A),B(A=>{let D="start",I="hanging";return A.fullDataFormatter.grid.valueAxis.position==="left"?(D="end",I="middle"):A.fullDataFormatter.grid.valueAxis.position==="right"?(D="start",I="middle"):A.fullDataFormatter.grid.valueAxis.position==="bottom"?(D=A.fullParams.tickTextRotate?"end":"middle",I="hanging"):A.fullDataFormatter.grid.valueAxis.position==="top"&&(D=A.fullParams.tickTextRotate?"start":"middle",I="auto"),{textAnchor:D,dominantBaseline:I}})),R=i.pipe(N(f),B(A=>{let D="start",I="hanging";return A.grid.groupAxis.position==="bottom"?I="auto":A.grid.groupAxis.position==="top"?I="hanging":A.grid.groupAxis.position==="left"?D="start":A.grid.groupAxis.position==="right"&&(D="end"),A.grid.valueAxis.position==="left"?D="end":A.grid.valueAxis.position==="right"?D="start":A.grid.valueAxis.position==="bottom"?I="hanging":A.grid.valueAxis.position==="top"&&(I="auto"),{textAnchor:D,dominantBaseline:I}}));return U({axisSelection:b,fullParams:r,tickTextAlign:$,axisLabelAlign:R,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:w,textReverseTransform:y,textReverseTransformWithRotate:_,minAndMax:x}).pipe(N(f),W(async A=>A)).subscribe(A=>{hI({selection:A.axisSelection,yAxisClassName:d,fullParams:A.fullParams,tickTextAlign:A.tickTextAlign,gridAxesSize:A.gridAxesSize,fullDataFormatter:A.fullDataFormatter,fullChartParams:A.fullChartParams,valueScale:A.valueScale,textReverseTransformWithRotate:A.textReverseTransformWithRotate,minAndMax:A.minAndMax}),fI({selection:A.axisSelection,textClassName:g,fullParams:A.fullParams,axisLabelAlign:A.axisLabelAlign,gridAxesSize:A.gridAxesSize,fullDataFormatter:A.fullDataFormatter,fullChartParams:A.fullChartParams,textReverseTransform:A.textReverseTransform})}),()=>{f.next(void 0)}},a2="ValueAxis",pI=re({name:a2,defaultParams:Xu,layerIndex:Dn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=bi(a2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),s2="ValueStackAxis",dI=re({name:s2,defaultParams:$p,layerIndex:Dn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=bi(s2,{selection:t,computedData$:n.computedStackedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}});function u2(t,e){const n=e.textSizePx*1.5,i=(t==null?[]:Array.isArray(t)?t:typeof t=="string"?t.split(`
52
+ `})}function jI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function qI({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const w$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:l,GroupDataMap$:u,fullParams$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,isSeriesSeprate$:y,event$:b})=>{const v=new J,x=Pe(t,"clipPath-box"),_=Z(t,"pathG"),A=Z(t,"path"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:s,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p});p.pipe(L(v),R(E=>-E.translate[1]/E.scale[1]));const $=o.pipe(R(E=>E.map(O=>O[0]?O[0].axisY-O[0].axisYFromZero:0)),tt()),k=Y({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(L(v),G(async E=>E),R(E=>E.params.barWidth?E.params.barWidth:E.isSeriesSeprate?_$({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:1,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}):_$({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:E.visibleComputedData.length,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}))),M=i.pipe(L(v),R(E=>{const O=new Set;return E.forEach(j=>{j.forEach(it=>{O.add(it.groupLabel)})}),Array.from(O)})),T=new dt(E=>{Y({seriesLabels:s,barWidth:k,params:c}).pipe(L(v),G(async O=>O)).subscribe(O=>{const j=WI(O.barWidth,O.seriesLabels,O.params);E.next(j)})}),S=f.pipe(L(v),R(E=>E.transitionDuration),tt()),D=new dt(E=>{Y({groupLabels:M,transitionDuration:S}).pipe(G(async O=>O)).subscribe(O=>{const j=XI(O.groupLabels.length,O.transitionDuration);E.next(j)})}).pipe(L(v),tt()),F=new dt(E=>{Y({groupLabels:M,transitionDuration:S}).pipe(G(async O=>O)).subscribe(O=>{const j=VI(O.groupLabels.length,O.transitionDuration);E.next(j)})}).pipe(L(v),tt());Y({defsSelection:C,gridAxesSize:d}).pipe(L(v),G(async E=>E)).subscribe(E=>{const O=[{id:x,width:E.gridAxesSize.width,height:E.gridAxesSize.height}];jI({defsSelection:E.defsSelection,clipPathData:O})});const z=f.pipe(L(v),R(E=>E.highlightTarget),tt()),I=s.pipe(L(v),R(E=>E.map((O,j)=>Pe(t,`lineargradient-${O}`)))),N=Y({graphicGSelection:B,defsSelection:C,computedData:n,visibleComputedLayoutData:o,linearGradientIds:I,zeroYArr:$,groupLabels:M,barScale:T,params:c,chartParams:f,barWidth:k,delayGroup:D,transitionItem:F,isSeriesSeprate:y}).pipe(L(v),G(async E=>E),R(E=>(HI({defsSelection:E.defsSelection,computedData:E.computedData,linearGradientIds:E.linearGradientIds,params:E.params}),UI({graphicGSelection:E.graphicGSelection,pathGClassName:_,pathClassName:A,visibleComputedLayoutData:E.visibleComputedLayoutData,linearGradientIds:E.linearGradientIds,zeroYArr:E.zeroYArr,groupLabels:E.groupLabels,barScale:E.barScale,params:E.params,chartParams:E.chartParams,barWidth:E.barWidth,delayGroup:E.delayGroup,transitionItem:E.transitionItem,isSeriesSeprate:E.isSeriesSeprate}))));return Y({barSelection:N,computedData:n,highlightTarget:z,SeriesDataMap:l,GroupDataMap:u}).subscribe(E=>{E.barSelection.on("mouseover",(O,j)=>{O.stopPropagation(),b.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:O,data:E.computedData})}).on("mousemove",(O,j)=>{O.stopPropagation(),b.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:O,data:E.computedData})}).on("mouseout",(O,j)=>{O.stopPropagation(),b.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:O,data:E.computedData})}).on("click",(O,j)=>{O.stopPropagation(),b.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:O,data:E.computedData})})}),Y({barSelection:N,highlight:m.pipe(R(E=>E.map(O=>O.id))),fullChartParams:f}).pipe(L(v),G(async E=>E)).subscribe(E=>{qI({selection:E.barSelection,ids:E.highlight,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},S$="BarsTriangle",ZI=se({name:S$,defaultParams:rd,layerIndex:5,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=w$(S$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function KI({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let l=0;return t.each((c,f,h)=>{V(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(l=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,m)=>{V(m[d]).selectAll("circle").data([p]).join(g=>g.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,b)=>d*l).attr("opacity",1),g=>g.transition().duration(50).attr("opacity",1),g=>g.remove()).attr("r",i.radius).attr("fill",(g,y)=>Ct({datum:g,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(g,y)=>Ct({datum:g,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function QI({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1).transition("highlight").duration(200):V(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function JI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const T$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,event$:y})=>{const b=new J,v=Pe(t,"clipPath-box"),x=Z(t,"circleG"),_=Z(t,"circle"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:f,gridGraphicTransform$:h}),B=Y({computedData:n,gridGraphicReverseScale:p}).pipe(L(b),G(async T=>T),R(T=>T.computedData.map((S,D)=>T.gridGraphicReverseScale[D])));Y({defsSelection:P,gridAxesSize:d}).pipe(L(b),G(async T=>T)).subscribe(T=>{const S=[{id:v,width:T.gridAxesSize.width,height:T.gridAxesSize.height}];JI({defsSelection:T.defsSelection,clipPathData:S})});const $=c.pipe(L(b),R(T=>T.highlightTarget),tt()),k=Y({graphicGSelection:C,visibleComputedLayoutData:o,graphicReverseScale:B,fullChartParams:c,fullParams:u}).pipe(L(b),G(async T=>T),R(T=>KI({graphicGSelection:T.graphicGSelection,circleGClassName:x,circleClassName:_,visibleComputedLayoutData:T.visibleComputedLayoutData,fullParams:T.fullParams,fullChartParams:T.fullChartParams,graphicReverseScale:T.graphicReverseScale})));Y({graphicSelection:k,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:$}).pipe(L(b),G(async T=>T)).subscribe(T=>{T.graphicSelection.on("mouseover",(S,D)=>{y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,groups:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:S,data:T.computedData})}).on("mousemove",(S,D)=>{y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:T.highlightTarget,data:T.computedData,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,groups:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:S})}).on("mouseout",(S,D)=>{y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,groups:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:S,data:T.computedData})}).on("click",(S,D)=>{y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,groups:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:S,data:T.computedData})})});const M=u.pipe(L(b),R(T=>T.onlyShowHighlighted),tt());return Y({graphicSelection:k,highlight:m.pipe(R(T=>T.map(S=>S.id))),onlyShowHighlighted:M,fullChartParams:c}).pipe(L(b),G(async T=>T)).subscribe(T=>{QI({selection:T.graphicSelection,ids:T.highlight,onlyShowHighlighted:T.onlyShowHighlighted,fullChartParams:T.fullChartParams})}),()=>{b.next(void 0)}},A$="Dots",tB=se({name:A$,defaultParams:ed,layerIndex:fu,validator:(t,{validateColumns:e})=>e(t,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=T$(A$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),eB=" - ",nB={listRectWidth:14,listRectHeight:14,listRectRadius:0};function P$(t,e){const n=t<e.colors[e.colorScheme].label.length?t:t%e.colors[e.colorScheme].label.length;return e.colors[e.colorScheme].label[n]}const Ei=(t,{rootSelection:e,legendLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=Z(t,"root-position"),l=Z(t,"legend-card"),u=Z(t,"legend-list"),c=Z(t,"legend-item"),f=new J,h=Y({legendLabels:n,fullChartParams:o}).pipe(L(f),G(async $=>$),R($=>{const k=new Map;let M=0;return $.legendLabels.forEach((T,S)=>{if(!k.has(T)){const D=P$(M,$.fullChartParams);k.set(T,D),M++}}),k})),p=n.pipe(L(f),R($=>{const k=new Set;let M=[];return $.forEach(T=>{k.has(T)?M.push(!1):M.push(!0),k.add(T)}),M})),d=r.pipe(L(f),R($=>$.placement==="top"||$.placement==="top-start"||$.placement==="top-end"?"top":$.placement==="bottom"||$.placement==="bottom-start"||$.placement==="bottom-end"?"bottom":$.placement==="left"||$.placement==="left-start"||$.placement==="left-end"?"left":"right"),tt(($,k)=>$===k),pt(1)),m=r.pipe(L(f),R($=>$.placement==="top-start"||$.placement==="bottom-start"||$.placement==="left-start"||$.placement==="right-start"?"start":$.placement==="top-end"||$.placement==="bottom-end"||$.placement==="left-end"||$.placement==="right-end"?"end":($.placement==="top"||$.placement==="bottom"||$.placement==="left"||$.placement==="right","center")),tt(($,k)=>$===k),pt(1)),g=d.pipe(L(f),R($=>$==="bottom"||$==="top"?"row":"column"),tt(($,k)=>$===k),pt(1)),y=Y({fullParams:r,position:d,layout:i}).pipe(L(f),G(async $=>$),R($=>{const k=$.fullParams.padding*2+$.fullParams.gap*2;return $.position==="bottom"||$.position==="top"?$.layout.rootWidth-k:$.layout.rootHeight-k})),v=Y({layout:i,position:d,justify:m}).pipe(L(f),G(async $=>$),R($=>{let k=0,M=0;return $.position==="bottom"?(M=$.layout.rootHeight,$.justify==="start"?k=0:$.justify==="center"?k=$.layout.rootWidth/2:$.justify==="end"&&(k=$.layout.rootWidth)):$.position==="right"?(k=$.layout.rootWidth,$.justify==="start"?M=0:$.justify==="center"?M=$.layout.rootHeight/2:$.justify==="end"&&(M=$.layout.rootHeight)):$.position==="top"?(M=0,$.justify==="start"?k=0:$.justify==="center"?k=$.layout.rootWidth/2:$.justify==="end"&&(k=$.layout.rootWidth)):$.position==="left"&&(k=0,$.justify==="start"?M=0:$.justify==="center"?M=$.layout.rootHeight/2:$.justify==="end"&&(M=$.layout.rootHeight)),{x:k,y:M}})).pipe(L(f),R($=>e.selectAll(`g.${s}`).data([$]).join(k=>k.append("g").classed(s,!0).attr("transform",M=>`translate(${M.x}, ${M.y})`),k=>k.transition().attr("transform",M=>`translate(${M.x}, ${M.y})`),k=>k.remove()))),x=r.pipe(L(f),R($=>$.labelList[0]?$.labelList[0]:nB)),_=Y({visibleList:p,fullParams:r,fullChartParams:o,legendLabels:n,lineDirection:g,lineMaxSize:y,defaultListStyle:x,SeriesLabelColorMap:h,textSizePx:a}).pipe(L(f),G(async $=>$),R($=>$.legendLabels.reduce((k,M,T)=>{if(!$.visibleList[T])return k;const S=M!==""?M:eB,D=fa(S,$.textSizePx),F=$.textSizePx*1.5+D,z=$.SeriesLabelColorMap.get(M),I=k[0]&&k[0][0]?k[k.length-1][k[k.length-1].length-1]:null,{translateX:N,translateY:E,lineIndex:O,itemIndex:j}=((W,Q,X)=>{let K=0,q=0,nt=0,st=0;if(W.lineDirection==="column"){let U=X?X.translateY+W.textSizePx+W.fullParams.gap:0;if(U+W.textSizePx>W.lineMaxSize){nt=X.lineIndex+1,st=0,q=0;const mt=Q[Q.length-1].reduce((ft,Et)=>Et.itemWidth>ft?Et.itemWidth:ft,0);K=X.translateX+mt+W.fullParams.gap}else nt=X?X.lineIndex:0,st=X?X.itemIndex+1:0,q=U,K=X?X.translateX:0}else{let U=X?X.translateX+X.itemWidth+W.fullParams.gap:0;U+F>W.lineMaxSize?(nt=X.lineIndex+1,st=0,K=0):(nt=X?X.lineIndex:0,st=X?X.itemIndex+1:0,K=U),q=(W.textSizePx+W.fullParams.gap)*nt}return{translateX:K,translateY:q,lineIndex:nt,itemIndex:st}})($,k,I);k[O]||(k[O]=[]);const it=$.fullParams.labelList[j]?$.fullParams.labelList[j]:$.defaultListStyle;return k[O].push({id:S,seriesLabel:S,seriesIndex:T,lineIndex:O,itemIndex:j,text:S,itemWidth:F,translateX:N,translateY:E,color:z,listRectWidth:it.listRectWidth,listRectHeight:it.listRectHeight,listRectRadius:it.listRectRadius}),k},[])),pt(1)),A=Y({fullParams:r,fullChartParams:o,lineDirection:g,lengendItems:_,textSizePx:a}).pipe(L(f),G(async $=>$),R($=>{const{width:k,height:M}=((T,S)=>{let D=0,F=0;if(!S.length||!S[0].length)return{width:D,height:F};const z=S[0][S[0].length-1];return T.lineDirection==="column"?(D=S.reduce((I,N)=>{const E=N.reduce((O,j)=>j.itemWidth>O?j.itemWidth:O,0);return I+E},0),D+=T.fullParams.gap*(S.length-1),F=z.translateY+T.textSizePx):(D=z.translateX+z.itemWidth,F=T.textSizePx*S.length+T.fullParams.gap*(S.length-1)),{width:D,height:F}})($,$.lengendItems);return{direction:$.lineDirection,width:k,height:M,translateX:$.fullParams.gap,translateY:$.fullParams.gap}}),pt(1)),w=Y({fullParams:r,position:d,justify:m,lengendList:A}).pipe(L(f),G(async $=>$),R($=>{const k=$.lengendList.width+$.fullParams.gap*2,M=$.lengendList.height+$.fullParams.gap*2;let T=0,S=0;return $.position==="left"?$.justify==="start"?(T=$.fullParams.padding,S=$.fullParams.padding):$.justify==="center"?(T=$.fullParams.padding,S=-M/2):$.justify==="end"&&(T=$.fullParams.padding,S=-M-$.fullParams.padding):$.position==="right"?$.justify==="start"?(T=-k-$.fullParams.padding,S=$.fullParams.padding):$.justify==="center"?(T=-k-$.fullParams.padding,S=-M/2):$.justify==="end"&&(T=-k-$.fullParams.padding,S=-M-$.fullParams.padding):$.position==="top"?$.justify==="start"?(T=$.fullParams.padding,S=$.fullParams.padding):$.justify==="center"?(T=-k/2,S=$.fullParams.padding):$.justify==="end"&&(T=-k-$.fullParams.padding,S=$.fullParams.padding):$.justify==="start"?(T=$.fullParams.padding,S=-M-$.fullParams.padding):$.justify==="center"?(T=-k/2,S=-M-$.fullParams.padding):$.justify==="end"&&(T=-k-$.fullParams.padding,S=-M-$.fullParams.padding),{width:k,height:M,translateX:T,translateY:S}})),P=Y({rootPositionSelection:v,fullParams:r,fullChartParams:o,legendCard:w}).pipe(L(f),G(async $=>$),R($=>$.rootPositionSelection.selectAll("g").data([$.legendCard]).join(k=>k.append("g").classed(l,!0).attr("transform",M=>`translate(${M.translateX}, ${M.translateY})`),k=>k.transition().attr("transform",M=>`translate(${M.translateX}, ${M.translateY})`),k=>k.remove()).each((k,M,T)=>{V(T[M]).selectAll("rect").data([k]).join("rect").attr("width",S=>S.width).attr("height",S=>S.height).attr("fill",bt($.fullParams.backgroundFill,$.fullChartParams)).attr("stroke",bt($.fullParams.backgroundStroke,$.fullChartParams))}))),C=Y({lengendCardSelection:P,fullParams:r,lengendList:A}).pipe(L(f),G(async $=>$),R($=>$.lengendCardSelection.selectAll("g").data([$.lengendList]).join(k=>k.append("g").classed(u,!0).attr("transform",M=>`translate(${M.translateX}, ${M.translateY})`),k=>k.transition().attr("transform",M=>`translate(${M.translateX}, ${M.translateY})`),k=>k.remove())));return Y({lengendListSelection:C,fullParams:r,fullChartParams:o,lengendItems:_,textSizePx:a}).pipe(L(f),G(async $=>$),R($=>{const k=$.lengendItems[0]?$.lengendItems.flat():[];return $.lengendListSelection.selectAll(`g.${c}`).data(k).join(M=>M.append("g").classed(c,!0).attr("cursor","default"),M=>M,M=>M.remove()).attr("transform",(M,T)=>`translate(${M.translateX}, ${M.translateY})`).each((M,T,S)=>{const D=$.textSizePx/2,F=-M.listRectWidth/2,z=-M.listRectHeight/2;V(S[T]).selectAll("rect").data([M]).join("rect").attr("x",D).attr("y",D).attr("width",I=>I.listRectWidth).attr("height",I=>I.listRectHeight).attr("transform",I=>`translate(${F}, ${z})`).attr("fill",I=>I.color).attr("rx",I=>I.listRectRadius),V(S[T]).selectAll("text").data([M]).join(I=>I.append("text").attr("dominant-baseline","hanging"),I=>I,I=>I.remove()).attr("x",$.textSizePx*1.5).attr("font-size",$.fullChartParams.styles.textSize).attr("fill",I=>$.fullParams.textColorType==="label"?P$(I.seriesIndex,$.fullChartParams):bt($.fullParams.textColorType,$.fullChartParams)).text(I=>I.text)})})).subscribe(),()=>{e.select(`g.${s}`).remove(),f.next(void 0)}},D$="GridLegend",rB=se({name:D$,defaultParams:ad,layerIndex:ki,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.SeriesDataMap$.pipe(L(i),R(l=>Array.from(l.keys()))),a=n.fullParams$.pipe(L(i),R(l=>{const u=[{listRectWidth:l.listRectWidth,listRectHeight:l.listRectHeight,listRectRadius:l.listRectRadius}];return{...l,labelList:u}})),s=Ei(D$,{rootSelection:e,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}});function C$(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function s(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function l(p){var m;const d=document.createElement("canvas").getContext("2d");return((m=d==null?void 0:d.measureText(p))==null?void 0:m.width)??0}function u(p){const d=l(p.trim());return Math.sqrt(d*r)}function c(p,d){let m={width:0,text:""},g=1/0;const y=[];let b=" ";i&&(b="");for(let v=0,x=p.length;v<x;++v){const _=(m.text?m.text+b:"")+p[v],A=l(_);(g+A)/2<d?(m.width=g=A,m.text=_):(g=l(p[v]),m={width:g,text:p[v]},y.push(m))}return y}function f(p){let d=0;for(let m=0,g=p.length;m<g;++m){const y=(Math.abs(m-g/2+.5)+.5)*r,b=p[m].width/2;d=Math.max(d,Math.sqrt(b**2+y**2))}return d}function h(p,d){o>0&&(d=s(d,o));const m=a(d),g=u(d),y=c(m,g),b=f(y);let v=p.select("text");v.size()||(v=p.append("text")),v.attr("transform",`translate(0,0) scale(${n/b})`);const x=v.selectAll("tspan").data(y),_=x.enter().append("tspan").attr("x",0).merge(x).attr("y",(A,w)=>(w-y.length/2+.8)*r).text(A=>A.text);return x.exit().remove(),x.merge(_)}return h(t,e)}function wp(t,{textArr:e,textSizePx:n,groupAxisPosition:r}){t.text(null);const i=Number(t.attr("x"));let o=Number(t.attr("y"));r==="top"&&(o-=(e.length-1)*n),t.selectAll("tspan").data(e).join("tspan").attr("x",i).attr("y",(a,s)=>o+s*n).text(a=>a)}function M$(t,{textArr:e,textSizePx:n,quadrant:r}){t.selectAll("tspan").data(e).join("tspan").attr("x",0).attr("y",(i,o)=>r==1||r==2?-(e.length-1-o)*n:o*n).text(i=>i)}const iB=6;function oB(t,e){return t.map((n,r)=>{const i=Sr(n,e),o=typeof i=="string"?i.split(`
53
+ `):[i];return{text:i,textArr:o}})}function aB({selection:t,groupingLabelClassName:e,fullParams:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,textReverseTransform:s}){const l=n.tickPadding+n.labelOffset[0],u=n.tickPadding+n.labelOffset[1];let c=0,f=0;o.groupAxis.position==="bottom"?(f=u,o.valueAxis.position==="left"?c=l:o.valueAxis.position==="right"&&(c=-l)):o.groupAxis.position==="top"?(f=-u,o.valueAxis.position==="left"?c=l:o.valueAxis.position==="right"&&(c=-l)):o.groupAxis.position==="left"?(c=-l,o.valueAxis.position==="bottom"?f=-u:o.valueAxis.position==="top"&&(f=u)):o.groupAxis.position==="right"&&(c=l,o.valueAxis.position==="bottom"?f=-u:o.valueAxis.position==="top"&&(f=u)),t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((h,p,d)=>{V(d[p]).selectAll("text").data([h]).join(m=>m.append("text").style("font-weight","bold"),m=>m,m=>m.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("font-size",a.styles.textSize).style("fill",bt(n.labelColorType,a)).style("transform",s).attr("x",c).attr("y",f).text(m=>o.groupAxis.label)}).attr("transform",h=>`translate(${i.width}, 0)`)}function sB({selection:t,xAxisClassName:e,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:s,groupScaleDomain:l,groupLabelData:u,textReverseTransformWithRotate:c,textSizePx:f}){const h=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0),p=Math.floor(l[1])-Math.ceil(l[0])+1;let d=0,m=0;o.groupAxis.position==="left"?(d=0,m=-n.tickPadding):o.groupAxis.position==="right"?(d=0,m=n.tickPadding):o.groupAxis.position==="bottom"?(d=n.tickPadding,m=0):o.groupAxis.position==="top"&&(d=-n.tickPadding,m=-0);const g=Dc(s).scale(s).ticks(n.ticks==="all"||n.ticks>p?p:n.ticks).tickSize(n.tickFullLine==!0?i.height:-iB).tickSizeOuter(0).tickFormat(v=>{var x;return((x=u[v])==null?void 0:x.text)??""}).tickPadding(d),y=h.transition().duration(100).call(g).on("end",(v,x)=>{h.selectAll(".tick text").each((_,A,w)=>{var C;const P=((C=u[_])==null?void 0:C.textArr)??[];wp(V(w[A]),{textArr:P,textSizePx:f,groupAxisPosition:o.groupAxis.position})})});return y.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?bt(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),y.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?bt(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",a.styles.textSize).attr("fill",bt(n.tickTextColorType,a)).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("x",m).style("transform",c).attr("dy",0),h}const L$=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:l,gridContainerPosition$:u,isSeriesSeprate$:c,textSizePx$:f})=>{const h=new J,p=Z(t,"container"),d=Z(t,"xAxisG"),m=Z(t,"xAxis"),g=Z(t,"groupingLabel"),y=Y({computedData:n.pipe(tt(($,k)=>$.length===k.length)),isSeriesSeprate:c}).pipe(L(h),G(async $=>$),R($=>$.isSeriesSeprate?$.computedData:[$.computedData[0]]),R(($,k)=>e.selectAll(`g.${p}`).data($,M=>M[0]?M[0].seriesIndex:k).join("g").classed(p,!0))),b=y.pipe(L(h),R(($,k)=>$.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));Y({containerSelection:y,gridContainerPosition:u}).pipe(L(h),G(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(k,M)=>{const T=$.gridContainerPosition[M]??$.gridContainerPosition[0],S=T.translate,D=T.scale;return`translate(${S[0]}, ${S[1]}) scale(${D[0]}, ${D[1]})`})}),Y({axisSelection:b,gridAxesTransform:a}).pipe(L(h),G(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=Y({gridAxesReverseTransform:s,gridContainerPosition:u}).pipe(L(h),G(async $=>$),R($=>{const k=`rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,M=`rotate(${$.gridAxesReverseTransform.rotate}deg)`,T=`scale(${1/$.gridContainerPosition[0].scale[0]}, ${1/$.gridContainerPosition[0].scale[1]})`;return`${k} ${M} ${T}`}),tt()),x=Y({textReverseTransform:v,fullParams:r}).pipe(L(h),G(async $=>$),R($=>`${$.textReverseTransform} rotate(${$.fullParams.tickTextRotate}deg)`)),_=Y({fullDataFormatter:i,gridAxesSize:l,computedData:n}).pipe(L(h),G(async $=>$),R($=>{const k=$.computedData[0]?$.computedData[0].length-1:0,M=$.fullDataFormatter.groupAxis.scaleDomain[0]-$.fullDataFormatter.groupAxis.scalePadding,T=$.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?k+$.fullDataFormatter.groupAxis.scalePadding:$.fullDataFormatter.groupAxis.scaleDomain[1]+$.fullDataFormatter.groupAxis.scalePadding;return[M,T]}),pt(1)),A=Y({groupScaleDomain:_,gridAxesSize:l}).pipe(L(h),G(async $=>$),R($=>xr().domain($.groupScaleDomain).range([0,$.gridAxesSize.width]))),w=n.pipe(R($=>($[0]??[]).map(k=>k.groupLabel))),P=Y({fullDataFormatter:i,fullParams:r}).pipe(L(h),G(async $=>$),R($=>{let k="middle",M="hanging";return $.fullDataFormatter.groupAxis.position==="bottom"?(k=$.fullParams.tickTextRotate?"end":"middle",M="hanging"):$.fullDataFormatter.groupAxis.position==="top"?(k=$.fullParams.tickTextRotate?"start":"middle",M="auto"):$.fullDataFormatter.groupAxis.position==="left"?(k="end",M="middle"):$.fullDataFormatter.groupAxis.position==="right"&&(k="start",M="middle"),{textAnchor:k,dominantBaseline:M}})),C=i.pipe(L(h),R($=>{let k="start",M="hanging";return $.groupAxis.position==="bottom"?M="hanging":$.groupAxis.position==="top"?M="auto":$.groupAxis.position==="left"?k="end":$.groupAxis.position==="right"&&(k="start"),$.valueAxis.position==="left"?k="start":$.valueAxis.position==="right"?k="end":$.valueAxis.position==="bottom"?M="auto":$.valueAxis.position==="top"&&(M="hanging"),{textAnchor:k,dominantBaseline:M}})),B=Y({groupLabels:w,fullParams:r}).pipe(L(h),G(async $=>$),R($=>oB($.groupLabels,$.fullParams.tickFormat)));return Y({axisSelection:b,fullParams:r,tickTextAlign:P,axisLabelAlign:C,gridAxesSize:l,fullDataFormatter:i,chartParams:o,groupScale:A,groupScaleDomain:_,groupLabelData:B,textReverseTransform:v,textReverseTransformWithRotate:x,textSizePx:f}).pipe(L(h),G(async $=>$)).subscribe($=>{sB({selection:$.axisSelection,xAxisClassName:m,fullParams:$.fullParams,tickTextAlign:$.tickTextAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,groupScaleDomain:$.groupScaleDomain,groupLabelData:$.groupLabelData,textReverseTransformWithRotate:$.textReverseTransformWithRotate,textSizePx:$.textSizePx}),aB({selection:$.axisSelection,groupingLabelClassName:g,fullParams:$.fullParams,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,textReverseTransform:$.textReverseTransform})}),()=>{h.next(void 0)}},k$="GroupAxis",lB=se({name:k$,defaultParams:xu,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBe:'number | null | "all"',test:r=>r===null||r==="all"||typeof r=="number"},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=L$(k$,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),o()}}),uB=6;function cB({selection:t,textClassName:e,fullParams:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,textReverseTransform:s}){const l=n.tickPadding-n.labelOffset[0],u=n.tickPadding+n.labelOffset[1];let c=0,f=0;o.groupAxis.position==="bottom"?(f=-u,o.valueAxis.position==="left"?c=-l:o.valueAxis.position==="right"&&(c=l)):o.groupAxis.position==="top"?(f=u,o.valueAxis.position==="left"?c=-l:o.valueAxis.position==="right"&&(c=l)):o.groupAxis.position==="left"?(c=l,o.valueAxis.position==="bottom"?f=u:o.valueAxis.position==="top"&&(f=-u)):o.groupAxis.position==="right"&&(c=-l,o.valueAxis.position==="bottom"?f=u:o.valueAxis.position==="top"&&(f=-u)),t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((h,p,d)=>{V(d[p]).selectAll("text").data([h]).join(m=>m.append("text").style("font-weight","bold"),m=>m,m=>m.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("font-size",a.styles.textSize).style("fill",bt(n.labelColorType,a)).style("transform",s).attr("x",c).attr("y",f).text(m=>o.valueAxis.label)}).attr("transform",h=>`translate(0, ${i.height})`)}function fB({selection:t,yAxisClassName:e,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,textReverseTransformWithRotate:l,filteredMinMaxValue:u}){const c=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0);let f=0,h=0;o.valueAxis.position==="left"?(f=n.tickPadding,h=0):o.valueAxis.position==="right"?(f=-n.tickPadding,h=0):o.valueAxis.position==="bottom"?(f=0,h=n.tickPadding):o.valueAxis.position==="top"&&(f=0,h=-n.tickPadding);const p=Cc(s).scale(s).ticks(n.ticks).tickFormat(g=>Sr(g,n.tickFormat)).tickSize(n.tickFullLine==!0?-i.width:uB).tickPadding(f),d=c.transition().duration(100).call(p);d.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?bt(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?bt(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges");const m=c.selectAll("text").attr("font-size",a.styles.textSize).style("color",bt(n.tickTextColorType,a)).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("y",h).attr("dy",0);return m.style("transform",l),(o.valueAxis.position==="bottom"||o.valueAxis.position==="top")&&m.attr("dy",0),c}const Ii=(t,{selection:e,computedData$:n,filteredMinMaxValue$:r,fullParams$:i,fullDataFormatter$:o,fullChartParams$:a,gridAxesTransform$:s,gridAxesReverseTransform$:l,gridAxesSize$:u,gridContainerPosition$:c,isSeriesSeprate$:f})=>{const h=new J,p=Z(t,"container"),d=Z(t,"yAxisG"),m=Z(t,"yAxis"),g=Z(t,"text"),y=Y({computedData:n.pipe(tt((P,C)=>P.length===C.length)),isSeriesSeprate:f}).pipe(L(h),G(async P=>P),R(P=>P.isSeriesSeprate?P.computedData:[P.computedData[0]]),R((P,C)=>e.selectAll(`g.${p}`).data(P,B=>B[0]?B[0].seriesIndex:C).join("g").classed(p,!0))),b=y.pipe(L(h),R((P,C)=>P.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));Y({containerSelection:y,gridContainerPosition:c}).pipe(L(h),G(async P=>P)).subscribe(P=>{P.containerSelection.attr("transform",(C,B)=>{const $=P.gridContainerPosition[B]??P.gridContainerPosition[0],k=$.translate,M=$.scale;return`translate(${k[0]}, ${k[1]}) scale(${M[0]}, ${M[1]})`})}),Y({axisSelection:b,gridAxesTransform:s}).pipe(L(h),G(async P=>P)).subscribe(P=>{P.axisSelection.style("transform",P.gridAxesTransform.value)});const v=Y({gridAxesReverseTransform:l,gridContainerPosition:c}).pipe(L(h),G(async P=>P),R(P=>{const C=`rotateX(${P.gridAxesReverseTransform.rotateX}deg) rotateY(${P.gridAxesReverseTransform.rotateY}deg)`,B=`rotate(${P.gridAxesReverseTransform.rotate}deg)`,$=`scale(${1/P.gridContainerPosition[0].scale[0]}, ${1/P.gridContainerPosition[0].scale[1]})`;return`${C} ${B} ${$}`}),tt()),x=Y({textReverseTransform:v,fullParams:i}).pipe(L(h),G(async P=>P),R(P=>`${P.textReverseTransform} rotate(${P.fullParams.tickTextRotate}deg)`)),_=new dt(P=>{Y({fullDataFormatter:o,gridAxesSize:u,filteredMinMaxValue:r}).pipe(L(h),G(async C=>C)).subscribe(C=>{let B=C.filteredMinMaxValue[1],$=C.filteredMinMaxValue[0];B===$&&B===0&&(B=1);const k=ro({maxValue:B,minValue:$,axisWidth:C.gridAxesSize.height,scaleDomain:C.fullDataFormatter.valueAxis.scaleDomain,scaleRange:C.fullDataFormatter.valueAxis.scaleRange});P.next(k)})}),A=Y({fullDataFormatter:o,fullParams:i}).pipe(L(h),G(async P=>P),R(P=>{let C="start",B="hanging";return P.fullDataFormatter.valueAxis.position==="left"?(C="end",B="middle"):P.fullDataFormatter.valueAxis.position==="right"?(C="start",B="middle"):P.fullDataFormatter.valueAxis.position==="bottom"?(C=P.fullParams.tickTextRotate?"end":"middle",B="hanging"):P.fullDataFormatter.valueAxis.position==="top"&&(C=P.fullParams.tickTextRotate?"start":"middle",B="auto"),{textAnchor:C,dominantBaseline:B}})),w=o.pipe(L(h),R(P=>{let C="start",B="hanging";return P.groupAxis.position==="bottom"?B="auto":P.groupAxis.position==="top"?B="hanging":P.groupAxis.position==="left"?C="start":P.groupAxis.position==="right"&&(C="end"),P.valueAxis.position==="left"?C="end":P.valueAxis.position==="right"?C="start":P.valueAxis.position==="bottom"?B="hanging":P.valueAxis.position==="top"&&(B="auto"),{textAnchor:C,dominantBaseline:B}}));return Y({axisSelection:b,fullParams:i,tickTextAlign:A,axisLabelAlign:w,computedData:n,gridAxesSize:u,fullDataFormatter:o,fullChartParams:a,valueScale:_,textReverseTransform:v,textReverseTransformWithRotate:x,filteredMinMaxValue:r}).pipe(L(h),G(async P=>P)).subscribe(P=>{fB({selection:P.axisSelection,yAxisClassName:m,fullParams:P.fullParams,tickTextAlign:P.tickTextAlign,gridAxesSize:P.gridAxesSize,fullDataFormatter:P.fullDataFormatter,fullChartParams:P.fullChartParams,valueScale:P.valueScale,textReverseTransformWithRotate:P.textReverseTransformWithRotate,filteredMinMaxValue:P.filteredMinMaxValue}),cB({selection:P.axisSelection,textClassName:g,fullParams:P.fullParams,axisLabelAlign:P.axisLabelAlign,gridAxesSize:P.gridAxesSize,fullDataFormatter:P.fullDataFormatter,fullChartParams:P.fullChartParams,textReverseTransform:P.textReverseTransform})}),()=>{h.next(void 0)}},R$="ValueAxis",hB=se({name:R$,defaultParams:ma,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=Ii(R$,{selection:t,computedData$:n.computedData$,filteredMinMaxValue$:n.filteredMinMaxValue$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),E$="StackedValueAxis",pB=se({name:E$,defaultParams:id,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=Ii(E$,{selection:t,computedData$:n.computedStackedData$,filteredMinMaxValue$:n.filteredMinMaxValue$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}});function I$(t,e){const n=e.textSizePx*1.5,i=(t==null?[]:Array.isArray(t)?t:typeof t=="string"?t.split(`
54
54
  `):[t]).filter(o=>o!="").map((o,a)=>`<tspan x="0" y="${a*n}">${o}</tspan>`).join("");return i?`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="0" style="dominant-baseline:text-before-edge">
55
55
  ${i}
56
- </text>`:""}function gI({rootSelection:t,pluginName:e,gClassName:n,boxClassName:r,rootWidth:i,rootHeight:o,svgString:a,tooltipStyle:s,event:u}){t.interrupt("fadeout");const l=5,c=a?[a]:[],f=a?[s]:[],p=t.selectAll(`g.${n}`).data(c).join($=>$.append("g").classed(n,!0).attr("pointer-events","none"),$=>$,$=>$.style("opacity",0).remove()).attr("transform",()=>`translate(${u.offsetX}, ${u.offsetY})`).selectAll(`g.${r}`).data(f).join($=>$.append("g").classed(ot(e,"box"),!0)),d=p.selectAll("rect").data(f).join($=>$.append("rect").attr("rx",l).attr("ry",l)).attr("fill",$=>$.backgroundColor).attr("stroke",$=>$.strokeColor).attr("opacity",$=>$.backgroundOpacity),g=p.selectAll("g").data(c).join($=>$.append("g").classed(ot(e,"content"),!0).attr("transform",()=>`translate(${s.padding}, ${s.padding})`));c.length&&fE(g,c[0]);const m=g!=null&&g.node()?Rv(g):{width:0,height:0};d.attr("width",m.width+s.padding*2).attr("height",m.height+s.padding*2);const b=p!=null&&p.node()?Rv(p):{width:0,height:0},y=i-b.width,_=o-b.height,x=u.offsetX+s.offset[0]>y?y-u.offsetX:s.offset[0],w=u.offsetY+s.offset[1]>_?_-u.offsetY:s.offset[1];p.attr("transform",$=>`translate(${x}, ${w})`),p.attr("transform",$=>`translate(${x}, ${w})`)}const zu=(t,{rootSelection:e,fullParams$:n,fullChartParams$:r,layout$:i,event$:o})=>{const a=new et,s=ot(t,"g"),u=ot(t,"box"),l=o.pipe(N(a),wi(y=>y.eventName==="mouseover"||y.eventName==="mousemove")),c=o.pipe(N(a),wi(y=>y.eventName==="mouseout")),f=VT(r),h=U({fullChartParams:r,fullParams:n,textSizePx:f}).pipe(N(a),W(async y=>y),B(y=>({backgroundColor:kt(y.fullParams.backgroundColorType,y.fullChartParams),backgroundOpacity:y.fullParams.backgroundOpacity,strokeColor:kt(y.fullParams.strokeColorType,y.fullChartParams),offset:y.fullParams.offset,padding:y.fullParams.padding,textSize:y.fullChartParams.styles.textSize,textSizePx:y.textSizePx,textColor:kt(y.fullParams.textColorType,y.fullChartParams),seriesColors:y.fullChartParams.colors[y.fullChartParams.colorScheme].series}))),p=U({fullParams:n,tooltipStyle:h}).pipe(N(a),W(async y=>y),B(y=>_=>{const x=y.fullParams.renderFn(_,{styles:y.tooltipStyle});if(typeof x=="string"){const w=x.trim();if(w.slice(0,1)==="<"&&w.slice(w.length-1,w.length)===">")return x;{const R=x.split(`
57
- `);return u2(R,y.tooltipStyle)}}else if(Array.isArray(x))return u2(x,y.tooltipStyle);return""})),d=U({event:l,contentRenderFn:p}).pipe(N(a),W(async y=>y),B(y=>y.contentRenderFn(y.event))),g=c.pipe(N(a),B(y=>"")),m=sl(d,g).pipe(N(a),tt((y,_)=>y===_)),b=sl(l,c).pipe(N(a),B(y=>y.event));return U({svgString:m,eventTooltip:b,layout:i,tooltipStyle:h}).pipe(N(a),W(async y=>y)).subscribe(y=>{gI({rootSelection:e,pluginName:t,gClassName:s,boxClassName:u,rootWidth:y.layout.rootWidth,rootHeight:y.layout.rootHeight,svgString:y.svgString,tooltipStyle:y.tooltipStyle,event:y.eventTooltip})}),()=>{a.next(void 0)}},l2="GridTooltip",mI=re({name:l2,defaultParams:ju,layerIndex:Fu,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new et,a=zu(l2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),yI=re({name:"GridZoom",defaultParams:wp,layerIndex:xE,validator:(t,{validateColumns:e})=>({status:"success",columnName:"",expectToBe:""})})(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new et;let a={k:1,x:0,y:0};const s=r.computedData$.pipe(B(c=>c[0]?c[0].length-1:0),tt()),u=r.fullDataFormatter$.pipe(B(c=>c.grid.groupAxis),K_()),l=U({initGroupAxis:u,fullDataFormatter:r.fullDataFormatter$,groupMax:s,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(N(o),W(async c=>c),B(c=>{const f=c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,h=c.initGroupAxis.scaleDomain[1]==="max"?c.groupMax+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding;return Lg({maxValue:c.groupMax,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,h],scaleRange:[0,1]})}));return U({groupScale:l,fullDataFormatter:r.fullDataFormatter$,groupMax:s}).pipe(N(o),W(async c=>c)).subscribe(c=>{const h=c.groupScale.copy(),p=Oh().on("zoom",function(g){const m=g.transform,b=x=>{const w=Math.round(x);return Math.min(c.groupMax,Math.max(0,w))},y=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?m.rescaleX(h).domain().map(b):m.rescaleY(h).domain().map(b);y[0]<=0&&y[1]>=c.groupMax?m.k<a.k&&(m.k=a.k,m.x=a.x,m.y=a.y):y[1]-y[0]<=1&&m.k>a.k&&(m.k=a.k,m.x=a.x,m.y=a.y),a.k=m.k,a.x=m.x,a.y=m.y;const _={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:y}}};i.dataFormatter$.next(_)});e.call(p)}),()=>{o.next(void 0),e.call(Oh().on("zoom",null))}}),Gu="GroupAux",Hh=ot(Gu,"label-box"),bI={name:Gu,defaultParams:Wu,layerIndex:vE,validator:(t,{validateColumns:e})=>e(t,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]},labelRotate:{toBeTypes:["number"]}})};function xI({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function vI({groupLabel:t,axisX:e,fullParams:n,textSizePx:r}){const i=Gh(t,n.labelTextFormat),o=i.split(`
58
- `),a=o.reduce((l,c)=>c.length>l.length?c:l,""),s=fn(a,r),u=r*o.length;return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:i,textArr:o,textWidth:s,textHeight:u}]:[]}function _I({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ot(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",l=>kt(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),a.transition().duration(50).attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),u}function $I(t){t.selectAll("line").data([]).exit().remove()}function wI({selection:t,labelData:e,fullParams:n,fullDataFormatter:r,fullChartParams:i,textReverseTransformWithRotate:o,textSizePx:a}){const s=t.selectAll(`g.${Hh}`).data(e),u=s.enter().append("g").classed(Hh,!0).style("cursor","pointer"),l=u.merge(s);return u.attr("transform",(c,f)=>`translate(${c.x}, ${c.y})`),s.transition().duration(50).attr("transform",(c,f)=>`translate(${c.x}, ${c.y})`),s.exit().remove(),l.each((c,f,h)=>{const p=c.textWidth+12,d=c.textHeight+6;let g=-p/2,m=-2;r.grid.groupAxis.position==="bottom"?(g=n.labelRotate?-p+d:-p/2,m=2):r.grid.groupAxis.position==="left"?(g=-p+2,m=-d/2):r.grid.groupAxis.position==="right"?(g=-2,m=-d/2):r.grid.groupAxis.position==="top"&&(g=n.labelRotate?-p+d:-p/2,m=-d+2),q(h[f]).selectAll("rect").data([c]).join(b=>b.append("rect").style("cursor","pointer").attr("rx",5).attr("ry",5),b=>b,b=>b.remove()).attr("width",b=>`${p}px`).attr("height",`${d}px`).attr("fill",b=>kt(n.labelColorType,i)).attr("x",g).attr("y",m-3).style("transform",o),q(h[f]).selectAll("text").data([c]).join(b=>b.append("text").style("dominant-baseline","hanging").style("cursor","pointer"),b=>b,b=>b.remove()).style("transform",o).attr("fill",b=>kt(n.labelTextColorType,i)).attr("font-size",i.styles.textSize).attr("x",g+6).attr("y",m).each((b,y,_)=>{n2(q(_[y]),{textArr:c.textArr,textSizePx:a,groupAxisPosition:r.grid.groupAxis.position})})}),l}function SI(t){t.selectAll(`g.${Hh}`).data([]).exit().remove()}const AI=re(bI)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new et;let a=!1;const s=e.insert("rect","g").classed(ot(Gu,"rect"),!0).attr("opacity",0),{seriesSelection$:u,axesSelection$:l,defsSelection$:c,graphicGSelection$:f}=dr({selection:t,pluginName:Gu,clipPathID:"test",seriesLabels$:i.isSeriesSeprate$.pipe(W($=>Qp(()=>$,i.seriesLabels$,i.seriesLabels$.pipe(B(R=>[R[0]]))))),gridContainerPosition$:i.gridContainerPosition$,gridAxesTransform$:i.gridAxesTransform$,gridGraphicTransform$:i.gridGraphicTransform$});i.layout$.pipe(N(o)).subscribe($=>{s.attr("width",$.rootWidth).attr("height",$.rootHeight)});const h=U({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(N(o),W(async $=>$),B($=>{const R=$.computedData[0]?$.computedData[0].length-1:0,A=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,D=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="max"?R+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding;return[A,D]}),vt(1)),p=U({groupScaleDomain:h,gridAxesSize:i.gridAxesSize$}).pipe(N(o),W(async $=>$),B($=>ko().domain($.groupScaleDomain).range([0,$.gridAxesSize.width]))),d=i.fullChartParams$.pipe(N(o),B($=>$.highlightTarget),tt()),g=Yh(e,"mousemove").pipe(N(o)),m=U({gridAxesReverseTransform:i.gridAxesReverseTransform$,gridContainerPosition:i.gridContainerPosition$}).pipe(N(o),W(async $=>$),B($=>{const R=`rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,A=`rotate(${$.gridAxesReverseTransform.rotate}deg)`,D=`scale(${1/$.gridContainerPosition[0].scale[0]}, ${1/$.gridContainerPosition[0].scale[1]})`;return`${R} ${A} ${D}`}),tt()),b=U({textReverseTransform:m,fullParams:i.fullParams$}).pipe(N(o),W(async $=>$),B($=>`${$.textReverseTransform} rotate(${$.fullParams.labelRotate}deg)`)),y=i.gridContainerPosition$.pipe(N(o),B($=>$.reduce((A,D)=>D.columnIndex>A?D.columnIndex:A,0)+1),tt()),_=i.gridContainerPosition$.pipe(N(o),B($=>$.reduce((A,D)=>D.rowIndex>A?D.rowIndex:A,0)+1),tt()),x=pE({rootSelection:e,fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$,gridContainerPosition$:i.gridContainerPosition$,layout$:i.layout$}).pipe(N(o));U({axesSelection:l,columnAmount:y,rowAmount:_,layout:i.layout$,rootMousemove:g,gridGroupPosition:x,computedData:i.computedData$,groupScale:p,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,highlightTarget:d,textReverseTransformWithRotate:b,GroupDataMap:i.GroupDataMap$,textSizePx:i.textSizePx$}).pipe(N(o),W(async $=>$)).subscribe($=>{const{groupIndex:R,groupLabel:A}=$.gridGroupPosition,D=$.groupScale(R)??0,I=xI({groupLabel:A,axisX:D,axisHeight:$.gridAxesSize.height,fullParams:$.fullParams});_I({selection:$.axesSelection,pluginName:n,lineData:I,fullParams:$.fullParams,fullChartParams:$.fullChartParams});const v=vI({groupLabel:A,axisX:D,fullParams:$.fullParams,textSizePx:$.textSizePx});wI({selection:$.axesSelection,labelData:v,fullParams:$.fullParams,fullDataFormatter:$.fullDataFormatter,fullChartParams:$.fullChartParams,textReverseTransformWithRotate:$.textReverseTransformWithRotate,textSizePx:$.textSizePx}).on("mouseover",(T,S)=>{T.stopPropagation(),a=!0,r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:$.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:$.GroupDataMap.get(A)??[],groupIndex:R,groupLabel:A,event:T,data:$.computedData})}).on("mousemove",(T,S)=>{T.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:$.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:$.GroupDataMap.get(A)??[],groupIndex:R,groupLabel:A,event:T,data:$.computedData})}).on("mouseout",(T,S)=>{T.stopPropagation(),a=!1,r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:$.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:$.GroupDataMap.get(A)??[],groupIndex:R,groupLabel:A,event:T,data:$.computedData})}).on("click",(T,S)=>{T.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:$.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:$.GroupDataMap.get(A)??[],groupIndex:R,groupLabel:A,event:T,data:$.computedData})})});const w=Yh(s,"mouseout").pipe(N(o));return U({rootRectMouseout:w,axesSelection:l}).pipe(N(o),W(async $=>$)).subscribe($=>{setTimeout(()=>{a!=!0&&($I($.axesSelection),SI($.axesSelection))})}),()=>{o.next(void 0),s.remove()}}),c2={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},Xh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]};Xh.tickFormat.toString=()=>"text => text";const Yu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},TI={...Yu},f2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},h2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},p2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},d2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},g2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},m2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},jh={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},y2={...jh},Vh={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e})=>{const n=e.textSizePx*.7,r=e.textSizePx/2-n/2,i=`<g><text dominant-baseline="hanging" font-size="${e.textSizePx}">${t.groupLabel}</text></g>`,o=t.groups.reduce((l,c)=>{const f=`${c.seriesLabel}${c.value}`;return f.length>l.length?f:l},""),s=fn(o,e.textSizePx)+e.textSizePx*2,u=t.groups.map((l,c)=>{const f=c*e.textSizePx*1.5,h=l.id===(t.datum&&t.datum.id);return`<g transform="translate(0, ${e.textSizePx*2})">
59
- <rect width="${n}" height="${n}" x="${r}" y="${f+r}" rx="${n/2}" fill="${l.color}"></rect>
60
- <text x="${e.textSizePx*1.5}" y="${f}" font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
61
- <tspan font-weight="${h?"bold":""}">${l.seriesLabel}</tspan>
62
- <tspan font-weight="bold" text-anchor="end" x="${s}">${l.value}</tspan>
56
+ </text>`:""}function dB({rootSelection:t,pluginName:e,gClassName:n,boxClassName:r,rootWidth:i,rootHeight:o,svgString:a,tooltipStyle:s,event:l}){t.interrupt("fadeout");const u=5,c=a?[a]:[],f=a?[s]:[],p=t.selectAll(`g.${n}`).data(c).join(A=>A.append("g").classed(n,!0).attr("pointer-events","none"),A=>A,A=>A.style("opacity",0).remove()).attr("transform",()=>`translate(${l.offsetX}, ${l.offsetY})`).selectAll(`g.${r}`).data(f).join(A=>A.append("g").classed(Z(e,"box"),!0)),d=p.selectAll("rect").data(f).join(A=>A.append("rect").attr("rx",u).attr("ry",u)).attr("fill",A=>A.backgroundColor).attr("stroke",A=>A.strokeColor).attr("opacity",A=>A.backgroundOpacity),m=p.selectAll("g").data(c).join(A=>A.append("g").classed(Z(e,"content"),!0).attr("transform",()=>`translate(${s.padding}, ${s.padding})`));c.length&&pI(m,c[0]);const g=m!=null&&m.node()?o$(m):{width:0,height:0};d.attr("width",g.width+s.padding*2).attr("height",g.height+s.padding*2);const y=p!=null&&p.node()?o$(p):{width:0,height:0},b=i-y.width,v=o-y.height,x=l.offsetX+s.offset[0]>b?b-l.offsetX:s.offset[0],_=l.offsetY+s.offset[1]>v?v-l.offsetY:s.offset[1];p.attr("transform",A=>`translate(${x}, ${_})`),p.attr("transform",A=>`translate(${x}, ${_})`)}const Bi=(t,{rootSelection:e,fullParams$:n,fullChartParams$:r,layout$:i,event$:o})=>{const a=new J,s=Z(t,"g"),l=Z(t,"box"),u=o.pipe(L(a),Rr(b=>b.eventName==="mouseover"||b.eventName==="mousemove")),c=o.pipe(L(a),Rr(b=>b.eventName==="mouseout")),f=QP(r),h=Y({fullChartParams:r,fullParams:n,textSizePx:f}).pipe(L(a),G(async b=>b),R(b=>({backgroundColor:bt(b.fullParams.backgroundColorType,b.fullChartParams),backgroundOpacity:b.fullParams.backgroundOpacity,strokeColor:bt(b.fullParams.strokeColorType,b.fullChartParams),offset:b.fullParams.offset,padding:b.fullParams.padding,textSize:b.fullChartParams.styles.textSize,textSizePx:b.textSizePx,textColor:bt(b.fullParams.textColorType,b.fullChartParams),seriesColors:b.fullChartParams.colors[b.fullChartParams.colorScheme].label}))),p=Y({fullParams:n,tooltipStyle:h}).pipe(L(a),G(async b=>b),R(b=>v=>{const x=b.fullParams.renderFn(v,{utils:{measureTextWidth:fa},styles:b.tooltipStyle});if(typeof x=="string"){const _=x.trim();if(_.slice(0,1)==="<"&&_.slice(_.length-1,_.length)===">")return x;{const w=x.split(`
57
+ `);return I$(w,b.tooltipStyle)}}else if(Array.isArray(x))return I$(x,b.tooltipStyle);return""})),d=Y({event:u,contentRenderFn:p}).pipe(L(a),G(async b=>b),R(b=>b.contentRenderFn(b.event))),m=c.pipe(L(a),R(b=>"")),g=Bu(d,m).pipe(L(a),tt((b,v)=>b===v)),y=Bu(u,c).pipe(L(a),R(b=>b.event));return Y({svgString:g,eventTooltip:y,layout:i,tooltipStyle:h}).pipe(L(a),G(async b=>b)).subscribe(b=>{dB({rootSelection:e,pluginName:t,gClassName:s,boxClassName:l,rootWidth:b.layout.rootWidth,rootHeight:b.layout.rootHeight,svgString:b.svgString,tooltipStyle:b.tooltipStyle,event:b.eventTooltip})}),()=>{a.next(void 0)}},B$="GridTooltip",gB=se({name:B$,defaultParams:vu,layerIndex:Ri,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(B$,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),mB=se({name:"GridZoom",defaultParams:od,layerIndex:l$,validator:(t,{validateColumns:e})=>({status:"success",columnName:"",expectToBe:""})})(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new J;let a={k:1,x:0,y:0};const s=r.computedData$.pipe(R(c=>c[0]?c[0].length-1:0),tt()),l=r.fullDataFormatter$.pipe(R(c=>c.groupAxis),Xi()),u=Y({initGroupAxis:l,groupMaxIndex:s,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(L(o),G(async c=>c),R(c=>{const f=c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,h=c.initGroupAxis.scaleDomain[1]==="max"?c.groupMaxIndex+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding;return ro({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,h],scaleRange:[0,1]})}));return Y({initGroupScale:u,fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:s}).pipe(L(o),G(async c=>c)).subscribe(c=>{const h=c.initGroupScale.copy(),p=yn().on("zoom",function(m){const g=m.transform,y=x=>{const _=Math.round(x);return Math.min(c.groupMaxIndex,Math.max(0,_))},b=c.fullDataFormatter.groupAxis.position==="bottom"||c.fullDataFormatter.groupAxis.position==="top"?g.rescaleX(h).domain().map(y):g.rescaleY(h).domain().map(y);b[0]<=0&&b[1]>=c.groupMaxIndex?g.k<a.k&&(g.k=a.k,g.x=a.x,g.y=a.y):b[1]-b[0]<=1&&g.k>a.k&&(g.k=a.k,g.x=a.x,g.y=a.y),a.k=g.k,a.x=g.x,a.y=g.y;const v={...c.fullDataFormatter,groupAxis:{...c.fullDataFormatter.groupAxis,scaleDomain:b}};i.dataFormatter$.next(v)});e.call(p)}),()=>{o.next(void 0),e.call(yn().on("zoom",null))}}),hu="GroupAux",Sp=Z(hu,"label-box"),yB={name:hu,defaultParams:bu,layerIndex:u$,validator:(t,{validateColumns:e})=>e(t,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]},labelRotate:{toBeTypes:["number"]}})};function bB({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function xB({groupLabel:t,axisX:e,fullParams:n,textSizePx:r,rowAmount:i}){const o=Sr(t,n.labelTextFormat),a=o.split(`
58
+ `),s=a.reduce((c,f)=>f.length>c.length?f:c,""),l=fa(s,r),u=r*a.length;return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding*i,text:o,textArr:a,textWidth:l,textHeight:u}]:[]}function vB({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=Z(e,"auxline");return t.selectAll(`line.${o}`).data(n).join(s=>s.append("line").classed(o,!0).style("stroke-width",1).style("pointer-events","none").style("vector-effect","non-scaling-stroke").attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),s=>s.transition().duration(50).attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),s=>s.remove()).style("stroke",s=>bt(r.lineColorType,i)).style("stroke-dasharray",r.lineDashArray??"none")}function $B(t){t.selectAll("line").data([]).exit().remove()}function _B({selection:t,labelData:e,fullParams:n,fullDataFormatter:r,fullChartParams:i,textReverseTransformWithRotate:o,textSizePx:a}){return t.selectAll(`g.${Sp}`).data(e).join(l=>l.append("g").classed(Sp,!0).style("cursor","pointer").attr("transform",(u,c)=>`translate(${u.x}, ${u.y})`),l=>l.transition().duration(50).attr("transform",(c,f)=>`translate(${c.x}, ${c.y})`),l=>l.remove()).each((l,u,c)=>{const f=l.textWidth+12,h=l.textHeight+6;let p=-f/2,d=-2;r.groupAxis.position==="bottom"?(p=n.labelRotate?-f+h:-f/2,d=2):r.groupAxis.position==="left"?(p=-f+2,d=-h/2):r.groupAxis.position==="right"?(p=-2,d=-h/2):r.groupAxis.position==="top"&&(p=n.labelRotate?-f+h:-f/2,d=-h+2),V(c[u]).selectAll("rect").data([l]).join(m=>m.append("rect").style("cursor","pointer").attr("rx",5).attr("ry",5),m=>m,m=>m.remove()).attr("width",m=>`${f}px`).attr("height",`${h}px`).attr("fill",m=>bt(n.labelColorType,i)).attr("x",p).attr("y",d-3).style("transform",o),V(c[u]).selectAll("text").data([l]).join(m=>m.append("text").style("dominant-baseline","hanging").style("cursor","pointer"),m=>m,m=>m.remove()).style("transform",o).attr("fill",m=>bt(n.labelTextColorType,i)).attr("font-size",i.styles.textSize).attr("x",p+6).attr("y",d).each((m,g,y)=>{wp(V(y[g]),{textArr:l.textArr,textSizePx:a,groupAxisPosition:r.groupAxis.position})})})}function wB(t){t.selectAll(`g.${Sp}`).data([]).exit().remove()}const SB=se(yB)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J;let a=!1;const s=e.insert("rect","g").classed(Z(hu,"rect"),!0).attr("opacity",0),{seriesSelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:f}=Tr({selection:t,pluginName:hu,clipPathID:"test",seriesLabels$:i.isSeriesSeprate$.pipe(G(_=>Wi(()=>_,i.seriesLabels$,i.seriesLabels$.pipe(R(A=>[A[0]]))))),gridContainerPosition$:i.gridContainerPosition$,gridAxesTransform$:i.gridAxesTransform$,gridGraphicTransform$:i.gridGraphicTransform$});i.layout$.pipe(L(o)).subscribe(_=>{s.attr("width",_.rootWidth).attr("height",_.rootHeight)});const h=Y({groupScaleDomainValue:i.groupScaleDomainValue$,gridAxesSize:i.gridAxesSize$}).pipe(L(o),G(async _=>_),R(_=>xr().domain(_.groupScaleDomainValue).range([0,_.gridAxesSize.width]))),p=i.fullChartParams$.pipe(L(o),R(_=>_.highlightTarget),tt()),d=ha(e,"mousemove").pipe(L(o)),m=Y({gridAxesReverseTransform:i.gridAxesReverseTransform$,gridContainerPosition:i.gridContainerPosition$}).pipe(L(o),G(async _=>_),R(_=>{const A=`rotateX(${_.gridAxesReverseTransform.rotateX}deg) rotateY(${_.gridAxesReverseTransform.rotateY}deg)`,w=`rotate(${_.gridAxesReverseTransform.rotate}deg)`,P=`scale(${1/_.gridContainerPosition[0].scale[0]}, ${1/_.gridContainerPosition[0].scale[1]})`;return`${A} ${w} ${P}`}),tt()),g=Y({textReverseTransform:m,fullParams:i.fullParams$}).pipe(L(o),G(async _=>_),R(_=>`${_.textReverseTransform} rotate(${_.fullParams.labelRotate}deg)`)),y=i.gridContainerPosition$.pipe(L(o),R(_=>_.reduce((w,P)=>P.columnIndex>w?P.columnIndex:w,0)+1),tt()),b=i.gridContainerPosition$.pipe(L(o),R(_=>_.reduce((w,P)=>P.rowIndex>w?P.rowIndex:w,0)+1),tt()),v=dI({rootSelection:e,fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$,gridContainerPosition$:i.gridContainerPosition$,layout$:i.layout$}).pipe(L(o));Y({axesSelection:u,columnAmount:y,rowAmount:b,layout:i.layout$,rootMousemove:d,gridGroupPosition:v,computedData:i.computedData$,groupScale:h,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,highlightTarget:p,textReverseTransformWithRotate:g,GroupDataMap:i.GroupDataMap$,textSizePx:i.textSizePx$}).pipe(L(o),G(async _=>_)).subscribe(_=>{const{groupIndex:A,groupLabel:w}=_.gridGroupPosition,P=_.groupScale(A)??0,C=bB({groupLabel:w,axisX:P,axisHeight:_.gridAxesSize.height,fullParams:_.fullParams});vB({selection:_.axesSelection,pluginName:n,lineData:C,fullParams:_.fullParams,fullChartParams:_.fullChartParams});const B=xB({groupLabel:w,axisX:P,fullParams:_.fullParams,textSizePx:_.textSizePx,rowAmount:_.rowAmount});_B({selection:_.axesSelection,labelData:B,fullParams:_.fullParams,fullDataFormatter:_.fullDataFormatter,fullChartParams:_.fullChartParams,textReverseTransformWithRotate:_.textReverseTransformWithRotate,textSizePx:_.textSizePx}).on("mouseover",(k,M)=>{k.stopPropagation(),a=!0,r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(w)??[],groupIndex:A,groupLabel:w,event:k,data:_.computedData})}).on("mousemove",(k,M)=>{k.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(w)??[],groupIndex:A,groupLabel:w,event:k,data:_.computedData})}).on("mouseout",(k,M)=>{k.stopPropagation(),a=!1,r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(w)??[],groupIndex:A,groupLabel:w,event:k,data:_.computedData})}).on("click",(k,M)=>{k.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(w)??[],groupIndex:A,groupLabel:w,event:k,data:_.computedData})})});const x=ha(s,"mouseout").pipe(L(o));return Y({rootRectMouseout:x,axesSelection:u}).pipe(L(o),G(async _=>_)).subscribe(_=>{setTimeout(()=>{a!=!0&&($B(_.axesSelection),wB(_.axesSelection))})}),()=>{o.next(void 0),s.remove()}}),N$={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},Tp={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]};Tp.tickFormat.toString=()=>"text => text";const pu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},TB={...pu},F$={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},z$={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},O$={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},G$={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},Y$={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},W$={radius:4,fillColorType:"white",strokeColorType:"label",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},Ap={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},X$={...Ap},Pp={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e,utils:n})=>{const r=e.textSizePx*.7,i=e.textSizePx/2-r/2,o=`<g><text dominant-baseline="hanging" font-size="${e.textSizePx}">${t.groupLabel}</text></g>`,a=t.groups.reduce((c,f)=>{const h=`${f.seriesLabel}${f.value}`;return h.length>c.length?h:c},""),l=n.measureTextWidth(a,e.textSizePx)+e.textSizePx*2,u=t.groups.map((c,f)=>{const h=f*e.textSizePx*1.5,p=c.id===(t.datum&&t.datum.id);return`<g transform="translate(0, ${e.textSizePx*2})">
59
+ <rect width="${r}" height="${r}" x="${i}" y="${h+i}" rx="${r/2}" fill="${c.color}"></rect>
60
+ <text x="${e.textSizePx*1.5}" y="${h}" font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
61
+ <tspan font-weight="${p?"bold":""}">${c.seriesLabel}</tspan>
62
+ <tspan font-weight="bold" text-anchor="end" x="${l}">${c.value}</tspan>
63
63
  </text>
64
- </g>`}).join("");return`${i}
65
- ${u}`}};Vh.renderFn.toString=()=>`(eventData, { styles }) => {
64
+ </g>`}).join("");return`${o}
65
+ ${u}`}};Pp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
66
66
  const bulletWidth = styles.textSizePx * 0.7
67
67
  const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
68
68
 
@@ -71,7 +71,7 @@ ${u}`}};Vh.renderFn.toString=()=>`(eventData, { styles }) => {
71
71
  const text = \`\${group.seriesLabel}\${group.value}\`
72
72
  return text.length > acc.length ? text : acc
73
73
  }, '')
74
- const maxTextWidth = measureTextWidth(maxLengthText, styles.textSizePx)
74
+ const maxTextWidth = utils.measureTextWidth(maxLengthText, styles.textSizePx)
75
75
  const lineEndX = maxTextWidth + styles.textSizePx * 2
76
76
  const contentSvg = eventData.groups
77
77
  .map((group, i) => {
@@ -88,7 +88,39 @@ ${u}`}};Vh.renderFn.toString=()=>`(eventData, { styles }) => {
88
88
  .join('')
89
89
  return \`\${titleSvg}
90
90
  \${contentSvg}\`
91
- }`;const b2="MultiGridLegend",PI=le({name:b2,defaultParams:c2,layerIndex:Bu,validator:(t,{validateColumns:e})=>{const n=e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},gridList:{toBeTypes:["object[]"]},textColorType:{toBeOption:"ColorType"}});if(t.gridList){const i=t.gridList.map((o,a)=>e(o,{listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]}})).find(o=>o.status==="error");if(i)return i}return n}})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.multiGridEachDetail$.pipe(N(i),B(l=>l.map((f,h)=>f.SeriesDataMap$.pipe(B(p=>Array.from(p.keys()))))),W(l=>U(l)),B(l=>l.flat())),a=U({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(N(i),W(async l=>l),B(l=>l.computedData.map((c,f)=>{const h=ll(l.fullParams.gridList[f]??{},{listRectWidth:l.fullParams.listRectWidth,listRectHeight:l.fullParams.listRectHeight,listRectRadius:l.fullParams.listRectRadius});return c.map(p=>h)}).flat())),s=U({fullParams:n.fullParams$,seriesList:a}).pipe(N(i),W(async l=>l),B(l=>({...l.fullParams,seriesList:l.seriesList}))),u=Ou(b2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),Re=t=>{const e=t.fullParams$.pipe(B(n=>n.gridIndexes),tt(),vt(1));return U({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(B(n=>n.gridIndexes==="all"?n.multiGridEachDetail:n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},qh="MultiBars",x2=ot(qh,"grid"),MI=le({name:qh,defaultParams:f2,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Re(r).pipe(N(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${x2}`).data(s).join("g").attr("class",x2).each((u,l,c)=>{const f=q(c[l]),h=u.dataFormatter$.pipe(N(i),B(p=>p.grid.separateSeries),tt(),vt(1));o[l]=Wh(qh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Zh="MultiBarStack",v2=ot(Zh,"grid"),DI=le({name:Zh,defaultParams:h2,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Re(r).pipe(N(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${v2}`).data(s).join("g").attr("class",v2).each((u,l,c)=>{const f=q(c[l]),h=u.dataFormatter$.pipe(N(i),B(p=>p.grid.separateSeries),tt(),vt(1));o[l]=Xv(Zh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Kh="MultiBarsTriangle",_2=ot(Kh,"grid"),CI=le({name:Kh,defaultParams:p2,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Re(r).pipe(N(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${_2}`).data(s).join("g").attr("class",_2).each((u,l,c)=>{const f=q(c[l]),h=u.dataFormatter$.pipe(N(i),B(p=>p.grid.separateSeries),tt(),vt(1));o[l]=Zv(Kh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:u.dataFormatter$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Qh="MultiLines",$2=ot(Qh,"grid"),LI=le({name:Qh,defaultParams:d2,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new et,a=[],s=i.multiGridContainerPosition$.pipe(N(o),B(l=>l.flat()));return Re(i).pipe(N(o)).subscribe(l=>{a.forEach(c=>c()),t.selectAll(`g.${$2}`).data(l).join("g").attr("class",$2).each((c,f,h)=>{const p=q(h[f]);a[f]=Iv(Qh,{selection:p,computedData$:c.computedData$,computedLayoutData$:c.computedLayoutData$,visibleComputedData$:c.visibleComputedData$,visibleComputedLayoutData$:c.visibleComputedLayoutData$,seriesLabels$:c.seriesLabels$,SeriesDataMap$:c.SeriesDataMap$,GroupDataMap$:c.GroupDataMap$,fullDataFormatter$:c.dataFormatter$,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,gridAxesTransform$:c.gridAxesTransform$,gridGraphicTransform$:c.gridGraphicTransform$,gridAxesSize$:c.gridAxesSize$,gridHighlight$:c.gridHighlight$,gridContainerPosition$:c.gridContainerPosition$,allContainerPosition$:s,layout$:i.layout$,event$:r.event$})})}),()=>{o.next(void 0),a.forEach(l=>l())}}),Jh="MultiLineAreas",w2=ot(Jh,"grid"),kI=le({name:Jh,defaultParams:g2,layerIndex:Nv,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[],a=r.multiGridContainerPosition$.pipe(N(i),B(u=>u.flat()));return Re(r).pipe(N(i)).subscribe(u=>{o.forEach(l=>l()),t.selectAll(`g.${w2}`).data(u).join("g").attr("class",w2).each((l,c,f)=>{const h=q(f[c]);o[c]=Ov(Jh,{selection:h,computedData$:l.computedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedData$:l.visibleComputedData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullDataFormatter$:l.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,allContainerPosition$:a,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(u=>u())}}),tp="MultiDots",S2=ot(tp,"grid"),RI=le({name:tp,defaultParams:m2,layerIndex:Bv,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Re(r).pipe(N(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${S2}`).data(s).join("g").attr("class",S2).each((u,l,c)=>{const f=q(c[l]);o[l]=Qv(tp,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),ep="MultiGroupAxis",A2=ot(ep,"grid"),EI=le({name:ep,defaultParams:Xh,layerIndex:Dn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBe:'number | null | "all"',test:r=>r===null||r==="all"||typeof r=="number"},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Re(r).pipe(N(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${A2}`).data(s).join("g").attr("class",A2).each((u,l,c)=>{const f=q(c[l]),h=u.dataFormatter$.pipe(N(i),B(p=>p.grid.separateSeries),tt(),vt(1));o[l]=i2(ep,{selection:f,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,textSizePx$:r.textSizePx$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),np="MultiValueAxis",T2=ot(np,"grid"),II=le({name:np,defaultParams:Yu,layerIndex:Dn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Re(r).pipe(N(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${T2}`).data(s).join("g").attr("class",T2).each((u,l,c)=>{const f=q(c[l]),h=u.dataFormatter$.pipe(N(i),B(p=>p.grid.separateSeries),tt(),vt(1));o[l]=bi(np,{selection:f,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),P2="MultiGridTooltip",NI=le({name:P2,defaultParams:Vh,layerIndex:Fu,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new et,a=zu(P2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),rp="MultiValueStackAxis",M2=ot(rp,"grid"),BI=le({name:rp,defaultParams:Yu,layerIndex:Dn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Re(r).pipe(N(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${M2}`).data(s).join("g").attr("class",M2).each((u,l,c)=>{const f=q(c[l]),h=u.dataFormatter$.pipe(N(i),B(p=>p.grid.separateSeries),tt(),vt(1));o[l]=bi(rp,{selection:f,computedData$:u.computedStackedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),ip="OverlappingValueAxes",D2=ot(ip,"grid"),FI=le({name:ip,defaultParams:jh,layerIndex:Dn,validator:(t,{validateColumns:e})=>{const n=e(t,{firstAxis:{toBeTypes:["object"]},secondAxis:{toBeTypes:["object"]},gridIndexes:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2}});if(t.firstAxis){const r=e(t.firstAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(t.secondAxis){const r=e(t.secondAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[],a=r.fullParams$.pipe(N(i),B(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(N(i),B(c=>c.gridIndexes[1])),u=U({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(N(i),W(async c=>c),B(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Ko(r).pipe(N(i),B(c=>({...c,fullParams$:c.fullParams$.pipe(B(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),W(c=>Re(c)),B(c=>c.map((f,h)=>{if(h===0)return f;const p=Rg({fullDataFormatter$:u,layout$:r.layout$}),d=Eg({gridAxesTransform$:p}),g=Ig({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,dataFormatter$:u,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(N(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${D2}`).data(c).join("g").attr("class",D2).each((f,h,p)=>{if(h>1)return;const d=q(p[h]);o[h]=bi(ip,{selection:d,computedData$:f.computedData$,fullParams$:r.fullParams$.pipe(B(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),op="OverlappingValueStackAxes",C2=ot(op,"grid"),OI=le({name:op,defaultParams:y2,layerIndex:Dn,validator:(t,{validateColumns:e})=>{const n=e(t,{firstAxis:{toBeTypes:["object"]},secondAxis:{toBeTypes:["object"]},gridIndexes:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2}});if(t.firstAxis){const r=e(t.firstAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(t.secondAxis){const r=e(t.secondAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[],a=r.fullParams$.pipe(N(i),B(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(N(i),B(c=>c.gridIndexes[1])),u=U({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(N(i),W(async c=>c),B(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Ko(r).pipe(N(i),B(c=>({...c,fullParams$:c.fullParams$.pipe(B(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),W(c=>Re(c)),B(c=>c.map((f,h)=>{if(h===0)return f;const p=Rg({fullDataFormatter$:u,layout$:r.layout$}),d=Eg({gridAxesTransform$:p}),g=Ig({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,dataFormatter$:u,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(N(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${C2}`).data(c).join("g").attr("class",C2).each((f,h,p)=>{if(h>1)return;const d=q(p[h]);o[h]=bi(op,{selection:d,computedData$:h===0?f.computedStackedData$:f.computedData$,fullParams$:r.fullParams$.pipe(B(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),zI={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},L2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null};L2.textRenderFn.toString=()=>`(eventData) => {
91
+ }`;const V$="MultiGridLegend",AB=de({name:V$,defaultParams:N$,layerIndex:ki,validator:(t,{validateColumns:e})=>{const n=e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},gridList:{toBeTypes:["object[]"]},textColorType:{toBeOption:"ColorType"}});if(t.gridList){const i=t.gridList.map((o,a)=>e(o,{listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]}})).find(o=>o.status==="error");if(i)return i}return n}})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.multiGridEachDetail$.pipe(L(i),R(u=>u.map((f,h)=>f.SeriesDataMap$.pipe(R(p=>Array.from(p.keys()))))),G(u=>Y(u)),R(u=>u.flat())),a=Y({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(L(i),G(async u=>u),R(u=>u.computedData.map((c,f)=>{const h=Fu(u.fullParams.gridList[f]??{},{listRectWidth:u.fullParams.listRectWidth,listRectHeight:u.fullParams.listRectHeight,listRectRadius:u.fullParams.listRectRadius});return c.map(p=>h)}).flat())),s=Y({fullParams:n.fullParams$,seriesList:a}).pipe(L(i),G(async u=>u),R(u=>({...u.fullParams,labelList:u.seriesList}))),l=Ei(V$,{rootSelection:e,legendLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),l()}}),Fe=t=>{const e=t.fullParams$.pipe(R(n=>n.gridIndexes),tt(),pt(1));return Y({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(R(n=>n.gridIndexes==="all"?n.multiGridEachDetail:n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Dp="MultiBars",U$=Z(Dp,"grid"),PB=de({name:Dp,defaultParams:F$,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${U$}`).data(s).join("g").attr("class",U$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=_p(Dp,{selection:f,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Cp="MultiStackedBar",H$=Z(Cp,"grid"),DB=de({name:Cp,defaultParams:z$,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${H$}`).data(s).join("g").attr("class",H$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=x$(Cp,{selection:f,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Mp="MultiBarsTriangle",j$=Z(Mp,"grid"),CB=de({name:Mp,defaultParams:O$,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${j$}`).data(s).join("g").attr("class",j$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=w$(Mp,{selection:f,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:l.dataFormatter$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Lp="MultiLines",q$=Z(Lp,"grid"),MB=de({name:Lp,defaultParams:G$,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=[],s=i.multiGridContainerPosition$.pipe(L(o),R(u=>u.flat()));return Fe(i).pipe(L(o)).subscribe(u=>{a.forEach(c=>c()),t.selectAll(`g.${q$}`).data(u).join("g").attr("class",q$).each((c,f,h)=>{const p=V(h[f]);a[f]=s$(Lp,{selection:p,computedData$:c.computedData$,computedLayoutData$:c.computedLayoutData$,visibleComputedData$:c.visibleComputedData$,visibleComputedLayoutData$:c.visibleComputedLayoutData$,seriesLabels$:c.seriesLabels$,SeriesDataMap$:c.SeriesDataMap$,GroupDataMap$:c.GroupDataMap$,fullDataFormatter$:c.dataFormatter$,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,gridAxesTransform$:c.gridAxesTransform$,gridGraphicTransform$:c.gridGraphicTransform$,gridAxesSize$:c.gridAxesSize$,gridHighlight$:c.gridHighlight$,gridContainerPosition$:c.gridContainerPosition$,allContainerPosition$:s,layout$:i.layout$,event$:r.event$})})}),()=>{o.next(void 0),a.forEach(u=>u())}}),kp="MultiLineAreas",Z$=Z(kp,"grid"),LB=de({name:kp,defaultParams:Y$,layerIndex:c$,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[],a=r.multiGridContainerPosition$.pipe(L(i),R(l=>l.flat()));return Fe(r).pipe(L(i)).subscribe(l=>{o.forEach(u=>u()),t.selectAll(`g.${Z$}`).data(l).join("g").attr("class",Z$).each((u,c,f)=>{const h=V(f[c]);o[c]=h$(kp,{selection:h,computedData$:u.computedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedData$:u.visibleComputedData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,allContainerPosition$:a,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),Rp="MultiDots",K$=Z(Rp,"grid"),kB=de({name:Rp,defaultParams:W$,layerIndex:fu,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${K$}`).data(s).join("g").attr("class",K$).each((l,u,c)=>{const f=V(c[u]);o[u]=T$(Rp,{selection:f,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ep="MultiGroupAxis",Q$=Z(Ep,"grid"),RB=de({name:Ep,defaultParams:Tp,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBe:'number | null | "all"',test:r=>r===null||r==="all"||typeof r=="number"},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${Q$}`).data(s).join("g").attr("class",Q$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=L$(Ep,{selection:f,computedData$:l.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h,textSizePx$:r.textSizePx$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ip="MultiValueAxis",J$=Z(Ip,"grid"),EB=de({name:Ip,defaultParams:pu,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${J$}`).data(s).join("g").attr("class",J$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=Ii(Ip,{selection:f,computedData$:l.computedData$,filteredMinMaxValue$:l.filteredMinMaxValue$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),t2="MultiGridTooltip",IB=de({name:t2,defaultParams:Pp,layerIndex:Ri,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(t2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),Bp="MultiStackedValueAxis",e2=Z(Bp,"grid"),BB=de({name:Bp,defaultParams:pu,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${e2}`).data(s).join("g").attr("class",e2).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=Ii(Bp,{selection:f,computedData$:l.computedStackedData$,filteredMinMaxValue$:l.filteredMinMaxValue$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Np="OverlappingValueAxes",n2=Z(Np,"grid"),NB=de({name:Np,defaultParams:Ap,layerIndex:bn,validator:(t,{validateColumns:e})=>{const n=e(t,{firstAxis:{toBeTypes:["object"]},secondAxis:{toBeTypes:["object"]},gridIndexes:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2}});if(t.firstAxis){const r=e(t.firstAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(t.secondAxis){const r=e(t.secondAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[],a=r.fullParams$.pipe(L(i),R(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(L(i),R(c=>c.gridIndexes[1])),l=Y({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(L(i),G(async c=>c),R(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h},container:{...c.fullDataFormatter.container}}}));return _a(r).pipe(L(i),R(c=>({...c,fullParams$:c.fullParams$.pipe(R(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),G(c=>Fe(c)),R(c=>c.map((f,h)=>{if(h===0)return f;const p=p0({fullDataFormatter$:l,layout$:r.layout$}),d=d0({gridAxesTransform$:p}),m=h0({computedData$:f.computedData$,fullDataFormatter$:l,layout$:r.layout$});return{...f,dataFormatter$:l,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:m}}))).pipe(L(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${n2}`).data(c).join("g").attr("class",n2).each((f,h,p)=>{if(h>1)return;const d=V(p[h]);o[h]=Ii(Np,{selection:d,computedData$:f.computedData$,filteredMinMaxValue$:f.filteredMinMaxValue$,fullParams$:r.fullParams$.pipe(R(m=>h===0?m.firstAxis:m.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),Fp="OverlappingStackedValueAxes",r2=Z(Fp,"grid"),FB=de({name:Fp,defaultParams:X$,layerIndex:bn,validator:(t,{validateColumns:e})=>{const n=e(t,{firstAxis:{toBeTypes:["object"]},secondAxis:{toBeTypes:["object"]},gridIndexes:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2}});if(t.firstAxis){const r=e(t.firstAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(t.secondAxis){const r=e(t.secondAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[],a=r.fullParams$.pipe(L(i),R(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(L(i),R(c=>c.gridIndexes[1])),l=Y({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(L(i),G(async c=>c),R(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h},container:{...c.fullDataFormatter.container}}}));return _a(r).pipe(L(i),R(c=>({...c,fullParams$:c.fullParams$.pipe(R(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),G(c=>Fe(c)),R(c=>c.map((f,h)=>{if(h===0)return f;const p=p0({fullDataFormatter$:l,layout$:r.layout$}),d=d0({gridAxesTransform$:p}),m=h0({computedData$:f.computedData$,fullDataFormatter$:l,layout$:r.layout$});return{...f,dataFormatter$:l,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:m}}))).pipe(L(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${r2}`).data(c).join("g").attr("class",r2).each((f,h,p)=>{if(h>1)return;const d=V(p[h]);o[h]=Ii(Fp,{selection:d,computedData$:h===0?f.computedStackedData$:f.computedData$,filteredMinMaxValue$:f.filteredMinMaxValue$,fullParams$:r.fullParams$.pipe(R(m=>h===0?m.firstAxis:m.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),i2={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},zp={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e,utils:n})=>{const r=t.categoryLabel!=="",i=t.datum.label.slice(0,11)!=="multiValue_",o=e.textSizePx*.7,a=e.textSizePx/2-o/2,s=r?`<rect width="${o}" height="${o}" x="${a}" y="${a-1}" rx="${o/2}" fill="${t.datum.color}"></rect>
92
+ <text x="${e.textSizePx*1.5}" font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
93
+ <tspan>${t.categoryLabel}</tspan>
94
+ </text>`:"",l=i?`<tspan>${t.datum.label}</tspan> `:"",u=`<text font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
95
+ ${l}<tspan font-weight="bold">${t.datum.value}</tspan>
96
+ </text>`;return`${s}
97
+ <g ${r?`transform="translate(0, ${e.textSizePx*2})"`:""}>
98
+ ${u}
99
+ </g>`}};zp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
100
+ const hasCategoryLabel = eventData.categoryLabel === '' ? false : true
101
+ const hasDatumLabel = eventData.datum.label.slice(0, 11) === 'multiValue_' ? false : true
102
+ const bulletWidth = styles.textSizePx * 0.7
103
+ const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
104
+ const categorySvg = hasCategoryLabel
105
+ ? \`<rect width="\${bulletWidth}" height="\${bulletWidth}" x="\${offset}" y="\${offset - 1}" rx="\${bulletWidth / 2}" fill="\${eventData.datum.color}"></rect>
106
+ <text x="\${styles.textSizePx * 1.5}" font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
107
+ <tspan>\${eventData.categoryLabel}</tspan>
108
+ </text>\`
109
+ : ''
110
+ const datumLabelSvg = hasDatumLabel
111
+ ? \`<tspan>\${eventData.datum.label}</tspan> \`
112
+ : ''
113
+ const datumSvg = \`<text font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
114
+ \${datumLabelSvg}<tspan font-weight="bold">\${eventData.datum.value}</tspan>
115
+ </text>\`
116
+
117
+ return \`\${categorySvg}
118
+ <g \${hasCategoryLabel ? \`transform="translate(0, \${styles.textSizePx * 2})"\` : ''}>
119
+ \${datumSvg}
120
+ </g>\`
121
+ }`;const o2={radius:5,fillColorType:"label",strokeColorType:"label",strokeWidth:0},a2={fillColorType:"label",strokeColorType:"label",strokeWidth:0,valueLinearOpacity:[.8,.8],arcScaleType:"area",sizeAdjust:.5},du={xAxis:{showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>String(Math.round(t)),labelPadding:20},yAxis:{showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>String(Math.round(t)),labelPadding:20}};du.xAxis.labelTextFormat.toString=()=>"(value: number) => String(Math.round(value))",du.yAxis.labelTextFormat.toString=()=>"(value: number) => String(Math.round(value))";const gu={xAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextColorType:"primary"},yAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextColorType:"primary"}};gu.xAxis.tickFormat.toString=()=>"v => v",gu.yAxis.tickFormat.toString=()=>"v => v";const s2={},l2="MultiValueLegend",zB=Hn({name:l2,defaultParams:i2,layerIndex:ki,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.CategoryDataMap$.pipe(L(i),R(l=>Array.from(l.keys()))),a=n.fullParams$.pipe(L(i),R(l=>{const u=[{listRectWidth:l.listRectWidth,listRectHeight:l.listRectHeight,listRectRadius:l.listRectRadius}];return{...l,labelList:u}})),s=Ei(l2,{rootSelection:e,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),u2="MultiValueTooltip",OB=Hn({name:u2,defaultParams:zp,layerIndex:Ri,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(u2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),Op=({selection:t,pluginName:e,clipPathID:n,categoryLabels$:r,multiValueContainerPosition$:i,multiValueGraphicTransform$:o})=>{const a=Z(e,"category"),s=Z(e,"axes"),l=Z(e,"graphic"),u=r.pipe(R((p,d)=>t.selectAll(`g.${a}`).data(p,m=>m).join(m=>m.append("g").classed(a,!0).each((g,y,b)=>{V(b[y]).selectAll(`g.${s}`).data([y]).join(v=>v.append("g").classed(s,!0).attr("clip-path",`url(#${n})`).each((x,_,A)=>{V(A[_]).selectAll("defs").data([_]).join("defs"),V(A[_]).selectAll("g").data([_]).join("g").classed(l,!0)}),v=>v,v=>v.remove())}),m=>m,m=>m.remove())),pt(1));Y({categorySelection:u,multiValueContainerPosition:i}).pipe(G(async p=>p)).subscribe(p=>{p.categorySelection.transition().attr("transform",(d,m)=>{const g=p.multiValueContainerPosition[m]??p.multiValueContainerPosition[0],y=g.translate,b=g.scale;return`translate(${y[0]}, ${y[1]}) scale(${b[0]}, ${b[1]})`})});const c=u.pipe(R(p=>p.select(`g.${s}`)),pt(1)),f=c.pipe(R(p=>p.select("defs")),pt(1)),h=Y({axesSelection:c,multiValueGraphicTransform:o}).pipe(G(async p=>p),R(p=>{const d=p.axesSelection.select(`g.${l}`);return d.transition().duration(50).style("transform",p.multiValueGraphicTransform.value),d}),pt(1));return{categorySelection$:u,axesSelection$:c,defsSelection$:f,graphicGSelection$:h}},GB=({rootSelection:t,fullDataFormatter$:e,filteredMinMaxXYData$:n,multiValueContainerPosition$:r,layout$:i})=>{const o=ha(t,"mousemove").pipe(U_(2)),a=r.pipe(R(c=>c.reduce((h,p)=>p.columnIndex>h?p.columnIndex:h,0)+1),tt(),pt(1)),s=r.pipe(R(c=>c.reduce((h,p)=>p.rowIndex>h?p.rowIndex:h,0)+1),tt(),pt(1)),l=new dt(c=>{Y({layout:i,filteredMinMaxXYData:n,fullDataFormatter:e,columnAmount:a,rowAmount:s}).pipe(G(async f=>f)).subscribe(f=>{if(!f.filteredMinMaxXYData.minXDatum||!f.filteredMinMaxXYData.maxXDatum||f.filteredMinMaxXYData.minXDatum.value[0]==null||f.filteredMinMaxXYData.maxXDatum.value[0]==null||!f.filteredMinMaxXYData.minYDatum||!f.filteredMinMaxXYData.maxYDatum||f.filteredMinMaxXYData.minYDatum.value[1]==null||f.filteredMinMaxXYData.maxYDatum.value[1]==null)return;const h=c0({maxValue:f.filteredMinMaxXYData.maxXDatum.value[0],minValue:f.filteredMinMaxXYData.minXDatum.value[0],axisWidth:f.layout.width,scaleDomain:f.fullDataFormatter.xAxis.scaleDomain,scaleRange:f.fullDataFormatter.xAxis.scaleRange}),p=c0({maxValue:f.filteredMinMaxXYData.maxYDatum.value[1],minValue:f.filteredMinMaxXYData.minYDatum.value[1],axisWidth:f.layout.height,scaleDomain:f.fullDataFormatter.yAxis.scaleDomain,scaleRange:f.fullDataFormatter.yAxis.scaleRange,reverse:!0});c.next({xScale:h,yScale:p})})}),u=Y({fullDataFormatter:e,rootMousemove:o,columnAmount:a,rowAmount:s,layout:i,multiValueContainerPosition:r}).pipe(G(async c=>c),R(c=>({x:(c.rootMousemove.offsetX-c.layout.left)/c.multiValueContainerPosition[0].scale[0]%(c.layout.rootWidth/c.columnAmount/c.multiValueContainerPosition[0].scale[0]),y:(c.rootMousemove.offsetY-c.layout.top)/c.multiValueContainerPosition[0].scale[1]%(c.layout.rootHeight/c.rowAmount/c.multiValueContainerPosition[0].scale[1])})));return Y({xyScale:l,axisValue:u}).pipe(G(async c=>c),R(c=>({x:c.axisValue.x,y:c.axisValue.y,xValue:c.xyScale.xScale(c.axisValue.x),yValue:c.xyScale.yScale(c.axisValue.y)})))},xn="Scatter",YB={name:xn,defaultParams:o2,layerIndex:fu,validator:(t,{validateColumns:e})=>e(t,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]}})};function WB({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let l=0;return t.each((c,f,h)=>{V(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(l=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,m)=>{V(m[d]).selectAll("circle").data([p]).join(g=>g.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,b)=>d*l).attr("opacity",1),g=>g.transition().duration(50).attr("opacity",1),g=>g.remove()).attr("r",i.radius).attr("fill",(g,y)=>Ct({datum:g,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(g,y)=>Ct({datum:g,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function XB({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1).transition("highlight").duration(200):V(o[i]).style("opacity",n.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function VB({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const UB=Hn(YB)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=Pe(xn,"clipPath-box"),a=Z(xn,"circleG"),s=Z(xn,"circle"),{categorySelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:f}=Op({selection:t,pluginName:xn,clipPathID:o,categoryLabels$:r.categoryLabels$,multiValueContainerPosition$:r.multiValueContainerPosition$,multiValueGraphicTransform$:r.multiValueGraphicTransform$}),h=Y({computedData:r.computedData$,multiValueGraphicReverseScale:r.multiValueGraphicReverseScale$}).pipe(L(i),G(async m=>m),R(m=>m.computedData.map((g,y)=>m.multiValueGraphicReverseScale[y])));Y({defsSelection:c,layout:r.layout$}).pipe(L(i),G(async m=>m)).subscribe(m=>{const g=[{id:o,width:m.layout.width,height:m.layout.height}];VB({defsSelection:m.defsSelection,clipPathData:g})});const p=Y({graphicGSelection:f,visibleComputedLayoutData:r.visibleComputedLayoutData$,graphicReverseScale:h,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(L(i),G(async m=>m),R(m=>WB({graphicGSelection:m.graphicGSelection,circleGClassName:a,circleClassName:s,visibleComputedLayoutData:m.visibleComputedLayoutData,fullParams:m.fullParams,fullChartParams:m.fullChartParams,graphicReverseScale:m.graphicReverseScale}))),d=r.fullChartParams$.pipe(L(i),R(m=>m.highlightTarget),tt());return Y({graphicSelection:p,computedData:r.computedData$,CategoryDataMap:r.CategoryDataMap$,highlightTarget:d}).pipe(L(i),G(async m=>m)).subscribe(m=>{m.graphicSelection.on("mouseover",(g,y)=>{n.event$.next({type:"multiValue",eventName:"mouseover",pluginName:xn,highlightTarget:m.highlightTarget,datum:y,category:m.CategoryDataMap.get(y.categoryLabel),categoryIndex:y.categoryIndex,categoryLabel:y.categoryLabel,data:m.computedData,event:g})}).on("mousemove",(g,y)=>{n.event$.next({type:"multiValue",eventName:"mousemove",pluginName:xn,highlightTarget:m.highlightTarget,datum:y,category:m.CategoryDataMap.get(y.categoryLabel),categoryIndex:y.categoryIndex,categoryLabel:y.categoryLabel,data:m.computedData,event:g})}).on("mouseout",(g,y)=>{n.event$.next({type:"multiValue",eventName:"mouseout",pluginName:xn,highlightTarget:m.highlightTarget,datum:y,category:m.CategoryDataMap.get(y.categoryLabel),categoryIndex:y.categoryIndex,categoryLabel:y.categoryLabel,data:m.computedData,event:g})}).on("click",(g,y)=>{n.event$.next({type:"multiValue",eventName:"click",pluginName:xn,highlightTarget:m.highlightTarget,datum:y,category:m.CategoryDataMap.get(y.categoryLabel),categoryIndex:y.categoryIndex,categoryLabel:y.categoryLabel,data:m.computedData,event:g})})}),Y({graphicSelection:p,highlight:r.multiValueHighlight$.pipe(R(m=>m.map(g=>g.id))),fullChartParams:r.fullChartParams$}).pipe(L(i),G(async m=>m)).subscribe(m=>{XB({selection:m.graphicSelection,ids:m.highlight,fullChartParams:m.fullChartParams})}),()=>{i.next(void 0)}}),vn="ScatterBubbles",HB=.9,jB={name:vn,defaultParams:a2,layerIndex:fu,validator:(t,{validateColumns:e})=>e(t,{fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},valueLinearOpacity:{toBeTypes:["number[]"]},arcScaleType:{toBe:"ArcScaleType",test:r=>r==="area"||r==="radius"},sizeAdjust:{toBeTypes:["number"]}})};function qB({graphicGSelection:t,circleGClassName:e,circleClassName:n,bubbleData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let l=0;return t.each((c,f,h)=>{V(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(l=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,m)=>{V(m[d]).selectAll("circle").data([p]).join(g=>g.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,b)=>d*l).attr("opacity",.8),g=>g.transition().duration(50).attr("opacity",.8),g=>g.remove()).attr("r",g=>g.r).attr("fill",(g,y)=>Ct({datum:g,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(g,y)=>Ct({datum:g,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function ZB({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",r=>r.opacity);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",s=>s.opacity).transition("highlight").duration(200):V(o[i]).style("opacity",n.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function KB({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const QB=Hn(jB)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=Pe(vn,"clipPath-box"),a=Z(vn,"circleG"),s=Z(vn,"circle"),{categorySelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:f}=Op({selection:t,pluginName:vn,clipPathID:o,categoryLabels$:r.categoryLabels$,multiValueContainerPosition$:r.multiValueContainerPosition$,multiValueGraphicTransform$:r.multiValueGraphicTransform$}),h=Y({computedData:r.computedData$,multiValueGraphicReverseScale:r.multiValueGraphicReverseScale$}).pipe(L(i),G(async w=>w),R(w=>w.computedData.map((P,C)=>w.multiValueGraphicReverseScale[C])));Y({defsSelection:c,layout:r.layout$}).pipe(L(i),G(async w=>w)).subscribe(w=>{const P=[{id:o,width:w.layout.width,height:w.layout.height}];KB({defsSelection:w.defsSelection,clipPathData:P})});const p=r.filteredMinMaxXYData$.pipe(L(i),R(w=>w.datumList.flat().map(P=>P.value[2]??0)),pt(1)),d=r.filteredMinMaxXYData$.pipe(L(i),R(w=>ic(w.datumList.flat().map(P=>P.value[2]??0)))),m=Y({filteredMinMaxValue:d,fullParams:r.fullParams$}).pipe(L(i),G(async w=>w),R(w=>xr().domain(w.filteredMinMaxValue).range(w.fullParams.valueLinearOpacity))),g=Y({layout:r.layout$,fullParams:r.fullParams$}).pipe(L(i),R(w=>Math.min(w.layout.width,w.layout.height)/2*w.fullParams.sizeAdjust)),y=p.pipe(L(i),R(w=>w.reduce((P,C)=>P+C,0)),Rr(w=>w>0)),b=Y({totalR:g,totalValue:y,fullParams:r.fullParams$}).pipe(L(i),G(async w=>w),R(w=>kn().domain([0,w.totalValue]).range([0,w.totalR]).exponent(w.fullParams.arcScaleType==="area"?.5:1))),v=Y({radiusScale:b,fullParams:r.fullParams$,totalR:g,filteredValueList:p}).pipe(L(i),G(async w=>w),R(w=>w.fullParams.arcScaleType==="area"?1:(()=>{const P=w.totalR*w.totalR*Math.PI;return Math.sqrt(P/Ac(w.filteredValueList,C=>Math.PI*Math.pow(w.radiusScale(C),2)))})())),x=Y({computedLayoutData:r.computedLayoutData$,opacityScale:m,radiusScale:b,scaleFactor:v,fullParams:r.fullParams$}).pipe(L(i),G(async w=>w),R(w=>w.computedLayoutData.map(P=>P.map(C=>{const B=C;return B.r=w.radiusScale(B.value[2])*w.scaleFactor*HB,B.opacity=w.opacityScale(B.value[2]),B})))),_=Y({graphicGSelection:f,bubbleData:x,graphicReverseScale:h,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(L(i),G(async w=>w),R(w=>qB({graphicGSelection:w.graphicGSelection,circleGClassName:a,circleClassName:s,bubbleData:w.bubbleData,fullParams:w.fullParams,fullChartParams:w.fullChartParams,graphicReverseScale:w.graphicReverseScale}))),A=r.fullChartParams$.pipe(L(i),R(w=>w.highlightTarget),tt());return Y({graphicSelection:_,computedData:r.computedData$,CategoryDataMap:r.CategoryDataMap$,highlightTarget:A}).pipe(L(i),G(async w=>w)).subscribe(w=>{w.graphicSelection.on("mouseover",(P,C)=>{n.event$.next({type:"multiValue",eventName:"mouseover",pluginName:vn,highlightTarget:w.highlightTarget,datum:C,category:w.CategoryDataMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,data:w.computedData,event:P})}).on("mousemove",(P,C)=>{n.event$.next({type:"multiValue",eventName:"mousemove",pluginName:vn,highlightTarget:w.highlightTarget,datum:C,category:w.CategoryDataMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,data:w.computedData,event:P})}).on("mouseout",(P,C)=>{n.event$.next({type:"multiValue",eventName:"mouseout",pluginName:vn,highlightTarget:w.highlightTarget,datum:C,category:w.CategoryDataMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,data:w.computedData,event:P})}).on("click",(P,C)=>{n.event$.next({type:"multiValue",eventName:"click",pluginName:vn,highlightTarget:w.highlightTarget,datum:C,category:w.CategoryDataMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,data:w.computedData,event:P})})}),Y({graphicSelection:_,highlight:r.multiValueHighlight$.pipe(R(w=>w.map(P=>P.id))),fullChartParams:r.fullChartParams$}).pipe(L(i),G(async w=>w)).subscribe(w=>{ZB({selection:w.graphicSelection,ids:w.highlight,fullChartParams:w.fullChartParams})}),()=>{i.next(void 0)}}),mu="XYAux",Gp=Z(mu,"label-box"),JB={name:mu,defaultParams:du,layerIndex:u$,validator:(t,{validateColumns:e})=>{const n=e(t,{xAxis:{toBeTypes:["object"]},yAxis:{toBeTypes:["object"]}});if(t.xAxis){const r=e(t.xAxis,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.yAxis){const r=e(t.yAxis,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};function tN({axisX:t,axisY:e,layout:n,fullParams:r}){return t>=0&&t<=n.width&&e>=0&&e<=n.height?[{id:"line-x",x1:t,x2:t,y1:0,y2:n.height,dashArray:r.xAxis.lineDashArray??"none",colorType:r.xAxis.lineColorType},{id:"line-0",x1:0,x2:n.width,y1:e,y2:e,dashArray:r.yAxis.lineDashArray??"none",colorType:r.yAxis.lineColorType}]:[]}function eN({axisX:t,axisY:e,xValue:n,yValue:r,fullParams:i,textSizePx:o,layout:a,columnAmount:s,rowAmount:l}){if(!(t>=0&&t<=a.width&&e>=0&&e<=a.height))return[];const u=6,c=3,f=t,h=a.height+i.xAxis.labelPadding*l,p=Sr(n,i.xAxis.labelTextFormat),d=p.split(`
122
+ `),m=d.reduce((E,O)=>O.length>E.length?O:E,""),g=fa(m,o),y=o*d.length,b=g+u*2,v=y+c*2,x=-b/2,_=-c,A=x+u,w=_+c,P=-(i.yAxis.labelPadding*s),C=e,B=Sr(r,i.yAxis.labelTextFormat),$=B.split(`
123
+ `),k=$.reduce((E,O)=>O.length>E.length?O:E,""),M=fa(k,o),T=o*$.length,S=M+u*2,D=T+c*2,F=-M-u,z=-c-T/2,I=F+u,N=z+c;return[{id:"label-x",x:f,y:h,text:p,textArr:d,textWidth:g,textHeight:y,colorType:i.xAxis.labelColorType,textColorType:i.xAxis.labelTextColorType,rectWidth:b,rectHeight:v,rectX:x,rectY:_,textX:A,textY:w},{id:"label-y",x:P,y:C,text:B,textArr:$,textWidth:M,textHeight:T,colorType:i.yAxis.labelColorType,textColorType:i.xAxis.labelTextColorType,rectWidth:S,rectHeight:D,rectX:F,rectY:z,textX:I,textY:N}]}function nN({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=Z(e,"auxline");return t.selectAll(`line.${o}`).data(n).join(s=>s.append("line").classed(o,!0).style("stroke-width",1).style("pointer-events","none").style("vector-effect","non-scaling-stroke").attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),s=>s.transition().duration(50).attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),s=>s.remove()).style("stroke",s=>bt(s.colorType,i)).style("stroke-dasharray",s=>s.dashArray)}function rN(t){t.selectAll("line").data([]).exit().remove()}function iN({selection:t,labelData:e,fullParams:n,fullDataFormatter:r,fullChartParams:i,textReverseTransform:o,textSizePx:a}){return t.selectAll(`g.${Gp}`).data(e).join(l=>l.append("g").classed(Gp,!0).style("cursor","pointer").attr("transform",(u,c)=>`translate(${u.x}, ${u.y})`),l=>l.transition().duration(50).attr("transform",(c,f)=>`translate(${c.x}, ${c.y})`),l=>l.remove()).each((l,u,c)=>{V(c[u]).selectAll("rect").data([l]).join(f=>f.append("rect").style("cursor","pointer").attr("rx",5).attr("ry",5),f=>f,f=>f.remove()).attr("width",f=>`${f.rectWidth}px`).attr("height",f=>`${f.rectHeight}px`).attr("fill",f=>bt(f.colorType,i)).attr("x",f=>f.rectX).attr("y",f=>f.rectY).style("transform",o),V(c[u]).selectAll("text").data([l]).join(f=>f.append("text").style("dominant-baseline","hanging").style("cursor","pointer").style("pointer-events","none"),f=>f,f=>f.remove()).style("transform",o).attr("fill",f=>bt(f.textColorType,i)).attr("font-size",i.styles.textSize).attr("x",f=>f.textX).attr("y",f=>f.textY).each((f,h,p)=>{wp(V(p[h]),{textArr:l.textArr,textSizePx:a,groupAxisPosition:h===0?"bottom":"left"})})})}function oN(t){t.selectAll(`g.${Gp}`).data([]).exit().remove()}const aN=Hn(JB)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=e.insert("rect","g").classed(Z(mu,"rect"),!0).attr("opacity",0),{categorySelection$:s,axesSelection$:l,defsSelection$:u,graphicGSelection$:c}=Op({selection:t,pluginName:mu,clipPathID:"test",categoryLabels$:i.isCategorySeprate$.pipe(G(g=>Wi(()=>g,i.categoryLabels$,i.categoryLabels$.pipe(R(y=>[y[0]]))))),multiValueContainerPosition$:i.multiValueContainerPosition$,multiValueGraphicTransform$:i.multiValueGraphicTransform$});i.layout$.pipe(L(o)).subscribe(g=>{a.attr("width",g.rootWidth).attr("height",g.rootHeight)});const f=i.multiValueContainerPosition$.pipe(R(g=>g.reduce((b,v)=>v.columnIndex>b?v.columnIndex:b,0)+1),tt()),h=i.multiValueContainerPosition$.pipe(R(g=>g.reduce((b,v)=>v.rowIndex>b?v.rowIndex:b,0)+1),tt()),p=i.multiValueContainerPosition$.pipe(L(o),G(async g=>g),R(g=>`${`scale(${1/g[0].scale[0]}, ${1/g[0].scale[1]})`}`),tt()),d=GB({rootSelection:e,fullDataFormatter$:i.fullDataFormatter$,filteredMinMaxXYData$:i.filteredMinMaxXYData$,multiValueContainerPosition$:i.multiValueContainerPosition$,layout$:i.layout$}).pipe(L(o));Y({axesSelection:l,layout:i.layout$,xyPosition:d,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,textReverseTransform:p,textSizePx:i.textSizePx$,columnAmount:f,rowAmount:h}).pipe(L(o),G(async g=>g)).subscribe(g=>{const{x:y,y:b,xValue:v,yValue:x}=g.xyPosition,_=tN({axisX:y,axisY:b,layout:g.layout,fullParams:g.fullParams});nN({selection:g.axesSelection,pluginName:n,lineData:_,fullParams:g.fullParams,fullChartParams:g.fullChartParams});const A=eN({axisX:y,axisY:b,xValue:v,yValue:x,fullParams:g.fullParams,textSizePx:g.textSizePx,layout:g.layout,columnAmount:g.columnAmount,rowAmount:g.rowAmount});iN({selection:g.axesSelection,labelData:A,fullParams:g.fullParams,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,textReverseTransform:g.textReverseTransform,textSizePx:g.textSizePx})});const m=ha(a,"mouseout").pipe(L(o));return Y({rootRectMouseout:m,axesSelection:l}).pipe(L(o),G(async g=>g)).subscribe(g=>{setTimeout(()=>{rN(g.axesSelection),oN(g.axesSelection)})}),()=>{o.next(void 0),a.remove()}}),Ar="XYAxes",c2=6,sN="middle",lN="hanging",uN="start",cN="hanging",fN="end",hN="middle",pN="end",dN="auto",gN={name:Ar,defaultParams:gu,layerIndex:bn,validator:(t,{validateColumns:e})=>{const n=e(t,{xAxis:{toBeTypes:["object"]},yAxis:{toBeTypes:["object"]}});if(t.xAxis){const r=e(t.xAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(t.yAxis){const r=e(t.yAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}};function mN({selection:t,xLabelClassName:e,fullParams:n,layout:r,fullDataFormatter:i,fullChartParams:o,textReverseTransform:a}){const s=n.xAxis.tickPadding+n.xAxis.labelOffset[0],l=n.xAxis.tickPadding+n.xAxis.labelOffset[1];let u=s,c=l;t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((f,h,p)=>{V(p[h]).selectAll("text").data([f]).join(d=>d.append("text").style("font-weight","bold"),d=>d,d=>d.remove()).attr("text-anchor",uN).attr("dominant-baseline",cN).attr("font-size",o.styles.textSize).style("fill",bt(n.xAxis.labelColorType,o)).style("transform",a).attr("x",u).attr("y",c).text(d=>i.xAxis.label)}).attr("transform",f=>`translate(${r.width}, ${r.height})`)}function yN({selection:t,yLabelClassName:e,fullParams:n,layout:r,fullDataFormatter:i,fullChartParams:o,textReverseTransform:a}){const s=n.yAxis.tickPadding-n.yAxis.labelOffset[0],l=n.yAxis.tickPadding+n.yAxis.labelOffset[1];let u=-s,c=-l;t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((f,h,p)=>{V(p[h]).selectAll("text").data([f]).join(d=>d.append("text").style("font-weight","bold"),d=>d,d=>d.remove()).attr("text-anchor",pN).attr("dominant-baseline",dN).attr("font-size",o.styles.textSize).style("fill",bt(n.yAxis.labelColorType,o)).style("transform",a).attr("x",u).attr("y",c).text(d=>i.yAxis.label)})}function bN({selection:t,xAxisClassName:e,fullParams:n,layout:r,fullDataFormatter:i,fullChartParams:o,xScale:a,textReverseTransform:s,minMaxXY:l}){const u=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).attr("transform",`translate(0, ${r.height})`);let c=n.xAxis.tickPadding;const f=Dc(a).scale(a).ticks(n.xAxis.ticks).tickFormat(d=>Sr(d,n.xAxis.tickFormat)).tickSize(n.xAxis.tickFullLine==!0?-r.height:c2).tickSizeOuter(-r.height).tickPadding(c),h=u.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",n.xAxis.tickLineVisible==!0?bt(n.xAxis.tickColorType,o):"none").style("stroke-dasharray",n.xAxis.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",n.xAxis.axisLineVisible==!0?bt(n.xAxis.axisLineColorType,o):"none").style("shape-rendering","crispEdges"),u.selectAll("text").attr("font-size",o.styles.textSize).style("color",bt(n.xAxis.tickTextColorType,o)).attr("text-anchor",sN).attr("dominant-baseline",lN).attr("dy",0).attr("y",c).style("transform",s),u}function xN({selection:t,yAxisClassName:e,fullParams:n,layout:r,fullDataFormatter:i,fullChartParams:o,yScale:a,textReverseTransform:s,minMaxXY:l}){const u=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0);let c=n.yAxis.tickPadding;const f=Cc(a).scale(a).ticks(n.xAxis.ticks).tickFormat(d=>Sr(d,n.yAxis.tickFormat)).tickSize(n.yAxis.tickFullLine==!0?-r.width:c2).tickPadding(c),h=u.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",n.yAxis.tickLineVisible==!0?bt(n.yAxis.tickColorType,o):"none").style("stroke-dasharray",n.yAxis.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",n.yAxis.axisLineVisible==!0?bt(n.yAxis.axisLineColorType,o):"none").style("shape-rendering","crispEdges"),u.selectAll("text").attr("font-size",o.styles.textSize).style("color",bt(n.yAxis.tickTextColorType,o)).attr("text-anchor",fN).attr("dominant-baseline",hN).attr("x",-c).attr("dy",0).style("transform",s),u}const vN=Hn(gN)(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=Z(Ar,"container"),a=Z(Ar,"xAxis"),s=Z(Ar,"yAxisG"),l=Z(Ar,"yAxis"),u=Z(Ar,"xLabel"),c=Z(Ar,"yLabel"),f=Y({computedData:n.computedData$.pipe(tt((g,y)=>g.length===y.length)),isCategorySeprate:n.isCategorySeprate$}).pipe(L(i),G(async g=>g),R(g=>g.isCategorySeprate?g.computedData:[g.computedData[0]]),R((g,y)=>t.selectAll(`g.${o}`).data(g,b=>b[0]?b[0].categoryIndex:y).join("g").classed(o,!0))),h=f.pipe(L(i),R((g,y)=>g.selectAll(`g.${s}`).data([s]).join("g").classed(s,!0)));Y({containerSelection:f,gridContainerPosition:n.multiValueContainerPosition$}).pipe(L(i),G(async g=>g)).subscribe(g=>{g.containerSelection.attr("transform",(y,b)=>{const v=g.gridContainerPosition[b]??g.gridContainerPosition[0],x=v.translate,_=v.scale;return`translate(${x[0]}, ${x[1]}) scale(${_[0]}, ${_[1]})`})});const p=n.multiValueContainerPosition$.pipe(L(i),G(async g=>g),R(g=>`${`scale(${1/g[0].scale[0]}, ${1/g[0].scale[1]})`}`),tt()),d=new dt(g=>{Y({fullDataFormatter:n.fullDataFormatter$,layout:n.layout$,filteredMinMaxXYData:n.filteredMinMaxXYData$}).pipe(L(i),G(async y=>y)).subscribe(y=>{if(!y.filteredMinMaxXYData.minXDatum||!y.filteredMinMaxXYData.maxXDatum||y.filteredMinMaxXYData.minXDatum.value[0]==null||y.filteredMinMaxXYData.maxXDatum.value[0]==null)return;let b=y.filteredMinMaxXYData.maxXDatum.value[0],v=y.filteredMinMaxXYData.minXDatum.value[0];b===v&&b===0&&(b=1);const x=ro({maxValue:b,minValue:v,axisWidth:y.layout.width,scaleDomain:y.fullDataFormatter.xAxis.scaleDomain,scaleRange:y.fullDataFormatter.xAxis.scaleRange});g.next(x)})}),m=new dt(g=>{Y({fullDataFormatter:n.fullDataFormatter$,layout:n.layout$,filteredMinMaxXYData:n.filteredMinMaxXYData$}).pipe(L(i),G(async y=>y)).subscribe(y=>{if(!y.filteredMinMaxXYData.minYDatum||!y.filteredMinMaxXYData.maxYDatum||y.filteredMinMaxXYData.minYDatum.value[1]==null||y.filteredMinMaxXYData.maxYDatum.value[1]==null)return;let b=y.filteredMinMaxXYData.maxYDatum.value[1],v=y.filteredMinMaxXYData.minYDatum.value[1];b===v&&b===0&&(b=1);const x=ro({maxValue:b,minValue:v,axisWidth:y.layout.height,scaleDomain:y.fullDataFormatter.yAxis.scaleDomain,scaleRange:y.fullDataFormatter.yAxis.scaleRange,reverse:!0});g.next(x)})});return Y({axisSelection:h,fullParams:n.fullParams$,computedData:n.computedData$,layout:n.layout$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,xScale:d,yScale:m,textReverseTransform:p,minMaxXY:n.minMaxXY$}).pipe(L(i),G(async g=>g)).subscribe(g=>{bN({selection:g.axisSelection,xAxisClassName:a,fullParams:g.fullParams,layout:g.layout,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,xScale:g.xScale,textReverseTransform:g.textReverseTransform,minMaxXY:g.minMaxXY}),xN({selection:g.axisSelection,yAxisClassName:l,fullParams:g.fullParams,layout:g.layout,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,yScale:g.yScale,textReverseTransform:g.textReverseTransform,minMaxXY:g.minMaxXY}),mN({selection:g.axisSelection,xLabelClassName:u,fullParams:g.fullParams,layout:g.layout,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,textReverseTransform:g.textReverseTransform}),yN({selection:g.axisSelection,yLabelClassName:c,fullParams:g.fullParams,layout:g.layout,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,textReverseTransform:g.textReverseTransform})}),()=>{i.next(void 0)}}),$N=Hn({name:"XYZoom",defaultParams:s2,layerIndex:l$,validator:(t,{validateColumns:e})=>({status:"success",columnName:"",expectToBe:""})})(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new J;let a={k:1,x:0,y:0};const s=r.fullDataFormatter$.pipe(R(f=>f.xAxis),Xi()),l=r.fullDataFormatter$.pipe(R(f=>f.yAxis),Xi()),u=new dt(f=>{Y({initXAxis:s,layout:r.layout$,minMaxXY:r.minMaxXY$}).pipe(L(o),G(async h=>h)).subscribe(h=>{const p=ro({maxValue:h.minMaxXY.maxX,minValue:h.minMaxXY.minX,axisWidth:h.layout.width,scaleDomain:h.initXAxis.scaleDomain,scaleRange:h.initXAxis.scaleRange});f.next(p)})}),c=Y({initXAxis:s,initYAxis:l,minMaxXY:r.minMaxXY$}).pipe(L(o),G(async f=>f),R(f=>{let h=f.minMaxXY.minX,p=f.minMaxXY.maxX,d=f.minMaxXY.minY,m=f.minMaxXY.maxY;return f.initXAxis.scaleDomain[0]==="auto"&&h>0&&(h=0),f.initXAxis.scaleDomain[1]==="auto"&&p<0&&(p=0),f.initYAxis.scaleDomain[0]==="auto"&&d>0&&(d=0),f.initYAxis.scaleDomain[1]==="auto"&&m<0&&(m=0),{minX:h,maxX:p,minY:d,maxY:m}}));return Y({initXScale:u,fullDataFormatter:r.fullDataFormatter$,minMaxScaleDomain:c}).pipe(L(o),G(async f=>f)).subscribe(f=>{const h=f.initXScale.copy(),p=yn().on("zoom",function(m){const g=m.transform,y=x=>{const _=Math.round(x);return Math.min(f.minMaxScaleDomain.maxX,Math.max(f.minMaxScaleDomain.minX,_))},b=g.rescaleX(h).domain().map(y);b[0]<=f.minMaxScaleDomain.minX&&b[1]>=f.minMaxScaleDomain.maxX?g.k<a.k&&(g.k=a.k,g.x=a.x,g.y=a.y):b[1]-b[0]<=1&&g.k>a.k&&(g.k=a.k,g.x=a.x,g.y=a.y),a.k=g.k,a.x=g.x,a.y=g.y;const v={...f.fullDataFormatter,xAxis:{...f.fullDataFormatter.xAxis,scaleDomain:b}};i.dataFormatter$.next(v)});e.call(p)}),()=>{o.next(void 0),e.call(yn().on("zoom",null))}}),_N={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},f2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null};f2.textRenderFn.toString=()=>`(eventData) => {
92
124
  if (eventData.highlightTarget === 'datum' && eventData.datum) {
93
125
  return [\`\${eventData.datum.label}: \${eventData.datum.value}\`]
94
126
  } else if (eventData.highlightTarget === 'series') {
@@ -126,9 +158,27 @@ ${u}`}};Vh.renderFn.toString=()=>`(eventData, { styles }) => {
126
158
  return [label, value]
127
159
  }
128
160
  return []
129
- }`;const k2={force:{strength:.08,velocityDecay:.3,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},arcScaleType:"area"},R2={outerRadius:.85,innerRadius:0,outerRadiusWhileHighlight:.9,startAngle:0,endAngle:Math.PI*2,padAngle:0,strokeColorType:"background",strokeWidth:1,cornerRadius:0},ap={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+i.reduce((o,a)=>o+(a.value??0),0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]};ap.eventFn.toString=()=>`(eventData: EventSeries, eventName: EventName, t: number) => {
130
- if (eventName === 'mouseover' || eventName === 'mousemove') {
131
- return [String(eventData.datum!.value)]
161
+ }`;const Ni={dot:{radius:10,fillColorType:"label",strokeColorType:"label",strokeWidth:1,styleFn:t=>""},dotLabel:{colorType:"primary",sizeFixed:!1,styleFn:t=>"text-shadow:0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff"},arrow:{colorType:"primary",strokeWidth:1.5,pointerWidth:5,pointerHeight:5,styleFn:t=>""},arrowLabel:{colorType:"primary",sizeFixed:!1,styleFn:t=>""},force:{nodeStrength:-500,linkDistance:100,velocityDecay:.1,alphaDecay:.05},zoomable:!0,transform:{x:0,y:0,k:1},scaleExtent:{min:0,max:1/0}};Ni.dot.styleFn.toString=()=>"(node) => ''",Ni.dotLabel.styleFn.toString=()=>"(node) => 'text-shadow:0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff'",Ni.arrow.styleFn.toString=()=>"(node) => ''",Ni.arrowLabel.styleFn.toString=()=>"(node) => ''";const Fi={bubble:{radiusMin:15,radiusMax:45,arcScaleType:"area",fillColorType:"label",strokeColorType:"label",strokeWidth:1,styleFn:t=>""},bubbleLabel:{fillRate:.9,lineHeight:1,maxLineLength:6,wordBreakAll:!0,colorType:"primary",styleFn:t=>""},arrow:{colorType:"primary",strokeWidthMin:1.5,strokeWidthMax:4.5,pointerWidth:5,pointerHeight:5,styleFn:t=>""},arrowLabel:{colorType:"primary",sizeFixed:!1,styleFn:t=>""},force:{nodeStrength:-500,linkDistance:130,velocityDecay:.1,alphaDecay:.05},zoomable:!0,transform:{x:0,y:0,k:1},scaleExtent:{min:0,max:1/0}};Fi.bubble.styleFn.toString=()=>"(node) => ''",Fi.bubbleLabel.styleFn.toString=()=>"(node) => ''",Fi.arrow.styleFn.toString=()=>"(node) => ''",Fi.arrowLabel.styleFn.toString=()=>"(node) => ''";const h2={placement:"right-end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},Yp={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e,utils:n})=>{const r=!!t.categoryLabel,i=!!t.datum.label,o=e.textSizePx*.7,a=e.textSizePx/2-o/2,s=r?`<rect width="${o}" height="${o}" x="${a}" y="${a-1}" rx="${o/2}" fill="${t.datum.color}"></rect>
162
+ <text x="${e.textSizePx*1.5}" font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
163
+ <tspan>${t.categoryLabel}</tspan>
164
+ </text>`:"",l=i?`<tspan>${t.datum.label}</tspan> `:"",u=`<text font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
165
+ ${l}<tspan font-weight="bold">${t.datum.value}</tspan>
166
+ </text>`;return`${s}
167
+ <g ${r?`transform="translate(0, ${e.textSizePx*2})"`:""}>
168
+ ${u}
169
+ </g>`}};Yp.renderFn.toString=()=>'(eventData, { styles, utils }) => {\n const hasCategoryLabel = eventData.categoryLabel ? true : false\n const hasDatumLabel = eventData.datum.label ? true : false\n const bulletWidth = styles.textSizePx * 0.7\n const offset = (styles.textSizePx / 2) - (bulletWidth / 2)\n const categorySvg = hasCategoryLabel\n ? `<rect width="${bulletWidth}" height="${bulletWidth}" x="${offset}" y="${offset - 1}" rx="${bulletWidth / 2}" fill="${eventData.datum.color}"></rect>\n<text x="${styles.textSizePx * 1.5}" font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">\n <tspan>${eventData.categoryLabel}</tspan>\n</text>`\n : \'\'\n const datumLabelSvg = hasDatumLabel\n ? `<tspan>${eventData.datum.label}</tspan> `\n : \'\'\n const datumSvg = `<text font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">\n ${datumLabelSvg}<tspan font-weight="bold">${eventData.datum.value}</tspan>\n</text>`\n\n return `${categorySvg}\n<g ${hasCategoryLabel ? `transform="translate(0, ${styles.textSizePx * 2})"` : \'\'}>\n ${datumSvg}\n</g>`\n}';const zt="ForceDirected",wN=Z(zt,"zoom-area"),p2=Pe(zt,"arrow"),d2=Z(zt,"arrow-marker"),SN=Z(zt,"edge-list-g"),TN=Z(zt,"edge-g"),g2=Z(zt,"edge-arrow-path"),m2=Z(zt,"edge-label-g"),y2=Z(zt,"edge-label"),AN=Z(zt,"node-list-g"),PN=Z(zt,"node-g"),b2=Z(zt,"node-circle"),x2=Z(zt,"node-label-g"),v2=Z(zt,"node-label"),DN={name:zt,defaultParams:Ni,layerIndex:be,validator:(t,{validateColumns:e})=>{const n=e(t,{dot:{toBeTypes:["object"]},dotLabel:{toBeTypes:["object"]},arrow:{toBeTypes:["object"]},arrowLabel:{toBeTypes:["object"]},force:{toBeTypes:["object"]},zoomable:{toBeTypes:["boolean"]},transform:{toBeTypes:["object"]},scaleExtent:{toBeTypes:["object"]}});if(t.dot){const r=e(t.dot,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(t.dotLabel){const r=e(t.dotLabel,{colorType:{toBeOption:"ColorType"},sizeFixed:{toBeTypes:["boolean"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(t.arrow){const r=e(t.arrow,{colorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},pointerWidth:{toBeTypes:["number"]},pointerHeight:{toBeTypes:["number"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(t.arrowLabel){const r=e(t.arrowLabel,{colorType:{toBeOption:"ColorType"},sizeFixed:{toBeTypes:["boolean"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(t.force){const r=e(t.force,{nodeStrength:{toBeTypes:["number"]},linkDistance:{toBeTypes:["number"]},velocityDecay:{toBeTypes:["number"]},alphaDecay:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.transform){const r=e(t.transform,{x:{toBeTypes:["number"]},y:{toBeTypes:["number"]},k:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.scaleExtent){const r=e(t.scaleExtent,{min:{toBeTypes:["number"]},max:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};function CN(t,e){return Xs().velocityDecay(e.force.velocityDecay).alphaDecay(e.force.alphaDecay).force("link",Bf().id(n=>n.id).strength(1).distance(n=>e.force.linkDistance)).force("charge",Vs().strength(e.force.nodeStrength)).force("collision",Ws(e.dot.radius).strength(1)).force("center",Ef(t.width/2,t.height/2))}function MN(t){return"translate("+t.x+","+t.y+")"}function LN(t){const e=t.source.x+(t.target.x-t.source.x)/2,n=t.source.y+(t.target.y-t.source.y)/2;return"translate("+e+","+n+")"}function kN(t){return"M"+t.source.x+","+t.source.y+" L"+t.target.x+","+t.target.y}function RN(t,e){return t.selectAll(`marker.${d2}`).data([e]).join(n=>{const r=n.append("marker").classed(d2,!0).attr("id",p2).attr("viewBox",i=>`-${i.arrow.pointerWidth} -${i.arrow.pointerHeight/2} ${i.arrow.pointerWidth} ${i.arrow.pointerHeight}`).attr("orient","auto");return r.append("path").attr("d",i=>`M${-i.arrow.pointerWidth},${-i.arrow.pointerHeight/2}L0,0L${-i.arrow.pointerWidth},${i.arrow.pointerHeight/2}`),r},n=>n,n=>n.remove()).attr("markerWidth",n=>n.arrow.pointerWidth).attr("markerHeight",n=>n.arrow.pointerHeight).attr("refX",n=>(n.dot.radius+e.dot.strokeWidth/2)/n.arrow.strokeWidth-1).attr("refY",0)}function EN(t,e){function n(o,a){o.active||t.alphaTarget(.3).restart(),o.subject.fx=o.x,o.subject.fy=o.y,e.next("start")}function r(o,a){o.subject.fx=o.x,o.subject.fy=o.y,e.next("drag")}function i(o,a){o.active||t.alphaTarget(0),o.subject.fx=null,o.subject.fy=null,e.next("end")}return hs().on("start",n).on("drag",r).on("end",i)}function IN({nodeListGSelection:t,nodes:e}){return t.selectAll("g").data(e,n=>n.id).join(n=>n.append("g").classed(PN,!0),n=>n,n=>n.remove())}function BN({nodeGSelection:t,fullParams:e,fullChartParams:n}){return t.each((r,i,o)=>{V(o[i]).selectAll("circle").data([r]).join(s=>s.append("circle").classed(b2,!0).attr("cursor","pointer"),s=>s,s=>s.remove()).attr("r",e.dot.radius).attr("fill",s=>Ct({datum:s,colorType:e.dot.fillColorType,fullChartParams:n})).attr("stroke",s=>Ct({datum:s,colorType:e.dot.strokeColorType,fullChartParams:n})).attr("stroke-width",e.dot.strokeWidth).attr("style",s=>e.dot.styleFn(s))}),t.select(`circle.${b2}`)}function NN({nodeGSelection:t,fullParams:e}){return t.each((n,r,i)=>{V(i[r]).selectAll("g").data([n]).join(a=>a.append("g").classed(x2,!0),a=>a,a=>a.remove()).attr("transform",`translate(0, ${-e.dot.radius-10})`)}),t.select(`g.${x2}`)}function FN({nodeLabelGSelection:t,fullParams:e,fullChartParams:n}){return t.each((r,i,o)=>{V(o[i]).selectAll("text").data([r],s=>s.id).join(s=>s.append("text").classed(v2,!0).attr("text-anchor","middle").attr("pointer-events","none"),s=>s,s=>s.remove()).text(s=>s.label).attr("fill",s=>Ct({datum:s,colorType:e.dotLabel.colorType,fullChartParams:n})).attr("font-size",n.styles.textSize).attr("style",s=>e.dotLabel.styleFn(s))}),t.select(`text.${v2}`)}function zN({edgeListGSelection:t,edges:e}){return t.selectAll("g").data(e,n=>n.id).join(n=>n.append("g").classed(TN,!0),n=>n,n=>n.remove())}function ON({edgeGSelection:t,fullParams:e,fullChartParams:n}){return t.each((r,i,o)=>{V(o[i]).selectAll("path").data([r]).join(s=>s.append("path").classed(g2,!0).attr("marker-end",`url(#${p2})`),s=>s,s=>s.remove()).attr("stroke",s=>Ct({datum:s.data,colorType:e.arrow.colorType,fullChartParams:n})).attr("stroke-width",e.arrow.strokeWidth).attr("style",s=>e.arrow.styleFn(s))}),t.select(`path.${g2}`)}function GN({edgeGSelection:t}){return t.each((e,n,r)=>{V(r[n]).selectAll("g").data([e]).join(o=>o.append("g").classed(m2,!0),o=>o,o=>o.remove())}),t.select(`g.${m2}`)}function YN({edgeLabelGSelection:t,fullParams:e,fullChartParams:n}){return t.each((r,i,o)=>{V(o[i]).selectAll("text").data([r],s=>s.id).join(s=>s.append("text").classed(y2,!0).attr("text-anchor","middle").attr("pointer-events","none"),s=>s,s=>s.remove()).text(s=>s.label).attr("fill",s=>Ct({datum:s,colorType:e.arrowLabel.colorType,fullChartParams:n})).attr("font-size",n.styles.textSize).attr("style",s=>e.arrowLabel.styleFn(s))}),t.select(`text.${y2}`)}function WN({nodeGSelection:t,edgeGSelection:e,highlightIds:n,fullChartParams:r}){if(t.interrupt("highlight"),e.interrupt("highlight"),!n.length){t.transition("highlight").style("opacity",1),e.transition("highlight").style("opacity",1);return}e.style("opacity",r.styles.unhighlightedOpacity),t.each((i,o,a)=>{const s=V(a[o]);n.includes(i.id)?s.style("opacity",1).transition("highlight").ease(sr).duration(500):s.style("opacity",r.styles.unhighlightedOpacity)})}const XN=ja(DN)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new J,a=t.append("g").classed(wN,!0),s=a.append("defs"),l=a.append("g").classed(SN,!0),u=a.append("g").classed(AN,!0);let c,f,h,p,d,m,g,y;const b=new Du("end"),v=new J;r.fullParams$.pipe(L(o),R(w=>RN(s,w))).subscribe();const x=r.fullParams$.pipe(L(o),R(w=>{let P=w.zoomable?yn().on("zoom",C=>{a.attr("transform",`translate(
170
+ ${C.transform.x},
171
+ ${C.transform.y}
172
+ ) scale(
173
+ ${C.transform.k}
174
+ )`),w.dotLabel.sizeFixed&&p&&p.attr("transform",`scale(${1/C.transform.k})`),w.arrowLabel.sizeFixed&&y&&y.attr("transform",`scale(${1/C.transform.k})`)}):yn().on("zoom",null);return w.scaleExtent&&P.scaleExtent([w.scaleExtent.min,w.scaleExtent.max]),e.call(P),P}));Y({d3Zoom:x,transform:r.fullParams$.pipe(L(o),R(w=>w.transform))}).pipe(L(o),G(async w=>w)).subscribe(w=>{t.call(w.d3Zoom.transform,Li.translate(w.transform.x,w.transform.y).scale(w.transform.k))});const _=Y({layout:r.layout$.pipe(Xi()),fullParams:r.fullParams$}).pipe(L(o),G(async w=>w),R(w=>CN(w.layout,w.fullParams)),pt(1)),A=r.visibleComputedData$.pipe(L(o),R(w=>({nodes:w.nodes,edges:w.edges.map(P=>{let C=P;return C.source=P.startNode,C.target=P.endNode,C})})),pt(1));return Y({renderData:A,computedData:r.computedData$,CategoryNodeMap:r.CategoryNodeMap$,simulation:_,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(L(o),G(async w=>w)).subscribe(w=>{c=IN({nodeListGSelection:u,nodes:w.renderData.nodes}),f=BN({nodeGSelection:c,fullParams:w.fullParams,fullChartParams:w.fullChartParams}),c.call(EN(w.simulation,b)),h=NN({nodeGSelection:c,fullParams:w.fullParams}),p=FN({nodeLabelGSelection:h,fullParams:w.fullParams,fullChartParams:w.fullChartParams}),d=zN({edgeListGSelection:l,edges:w.renderData.edges}),m=ON({edgeGSelection:d,fullParams:w.fullParams,fullChartParams:w.fullChartParams}),g=GN({edgeGSelection:d}),y=YN({edgeLabelGSelection:g,fullParams:w.fullParams,fullChartParams:w.fullChartParams}),w.simulation.nodes(w.renderData.nodes).on("tick",()=>{m.attr("d",kN),c.attr("transform",MN),g.attr("transform",P=>LN(P))}),w.simulation.force("link").links(w.renderData.edges),w.simulation.alpha(.3).restart(),f.on("mouseover",(P,C)=>{P.stopPropagation(),v.next({type:"relationship",eventName:"mouseover",pluginName:zt,highlightTarget:w.fullChartParams.highlightTarget,datum:C,category:w.CategoryNodeMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,event:P,data:w.computedData})}).on("mousemove",(P,C)=>{P.stopPropagation(),v.next({type:"relationship",eventName:"mousemove",pluginName:zt,highlightTarget:w.fullChartParams.highlightTarget,datum:C,category:w.CategoryNodeMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,event:P,data:w.computedData})}).on("mouseout",(P,C)=>{P.stopPropagation(),v.next({type:"relationship",eventName:"mouseout",pluginName:zt,highlightTarget:w.fullChartParams.highlightTarget,datum:C,category:w.CategoryNodeMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,event:P,data:w.computedData})}).on("click",(P,C)=>{P.stopPropagation(),v.next({type:"relationship",eventName:"click",pluginName:zt,highlightTarget:w.fullChartParams.highlightTarget,datum:C,category:w.CategoryNodeMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,event:P,data:w.computedData})})}),b.pipe(tt((w,P)=>w===P),G(w=>Wi(()=>w==="end",v,va))).subscribe(w=>{i.event$.next(w)}),Y({renderData:A,highlightNodes:r.relationshipHighlightNodes$.pipe(R(w=>w.map(P=>P.id))),highlightEdges:r.relationshipHighlightEdges$.pipe(R(w=>w.map(P=>P.id))),fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(L(o),G(async w=>w)).subscribe(w=>{!c||!d||WN({nodeGSelection:c,edgeGSelection:d,highlightIds:w.highlightNodes,fullChartParams:w.fullChartParams})}),()=>{o.next(void 0)}}),Ut="ForceDirectedBubbles",$2=12,VN=Z(Ut,"zoom-area"),UN=Pe(Ut,"arrow"),_2=Z(Ut,"arrow-marker"),HN=Z(Ut,"edge-list-g"),jN=Z(Ut,"edge-g"),w2=Z(Ut,"edge-arrow-path"),S2=Z(Ut,"edge-label-g"),T2=Z(Ut,"edge-label"),qN=Z(Ut,"node-list-g"),ZN=Z(Ut,"node-g"),A2=Z(Ut,"node-circle"),KN={name:Ut,defaultParams:Fi,layerIndex:be,validator:(t,{validateColumns:e})=>{const n=e(t,{bubble:{toBeTypes:["object"]},bubbleLabel:{toBeTypes:["object"]},arrow:{toBeTypes:["object"]},arrowLabel:{toBeTypes:["object"]},force:{toBeTypes:["object"]},zoomable:{toBeTypes:["boolean"]},transform:{toBeTypes:["object"]},scaleExtent:{toBeTypes:["object"]}});if(t.bubble){const r=e(t.bubble,{radiusMin:{toBeTypes:["number"]},radiusMax:{toBeTypes:["number"]},arcScaleType:{toBe:'"area" | "radius"',test:i=>i==="area"||i==="radius"},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(t.bubbleLabel){const r=e(t.bubbleLabel,{fillRate:{toBeTypes:["number"]},lineHeight:{toBeTypes:["number"]},maxLineLength:{toBeTypes:["number"]},colorType:{toBeOption:"ColorType"},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(t.arrow){const r=e(t.arrow,{colorType:{toBeOption:"ColorType"},strokeWidthMin:{toBeTypes:["number"]},strokeWidthMax:{toBeTypes:["number"]},pointerWidth:{toBeTypes:["number"]},pointerHeight:{toBeTypes:["number"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(t.arrowLabel){const r=e(t.arrowLabel,{colorType:{toBeOption:"ColorType"},sizeFixed:{toBeTypes:["boolean"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(t.force){const r=e(t.force,{nodeStrength:{toBeTypes:["number"]},linkDistance:{toBeTypes:["number"]},velocityDecay:{toBeTypes:["number"]},alphaDecay:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.transform){const r=e(t.transform,{x:{toBeTypes:["number"]},y:{toBeTypes:["number"]},k:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.scaleExtent){const r=e(t.scaleExtent,{min:{toBeTypes:["number"]},max:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};function QN(t,e){return Xs().velocityDecay(e.force.velocityDecay).alphaDecay(e.force.alphaDecay).force("link",Bf().id(n=>n.id).strength(1).distance(n=>e.force.linkDistance)).force("charge",Vs().strength(e.force.nodeStrength)).force("collision",Ws(e.bubble.radiusMax).strength(1)).force("center",Ef(t.width/2,t.height/2))}function JN(t){return"translate("+t.x+","+t.y+")"}function tF(t){const e=t.source.x+(t.target.x-t.source.x)/2,n=t.source.y+(t.target.y-t.source.y)/2;return"translate("+e+","+n+")"}function eF(t){return"M"+t.source.x+","+t.source.y+" L"+t.target.x+","+t.target.y}function nF({defsSelection:t,markerParams:e,markerData:n}){return t.selectAll(`marker.${_2}`).data(n).join(r=>{const i=r.append("marker").classed(_2,!0).attr("viewBox",e.viewBox).attr("orient","auto");return i.append("path").attr("d",e.d),i},r=>r,r=>r.remove()).attr("id",r=>r.id).attr("markerWidth",e.pointerWidth).attr("markerHeight",e.pointerHeight).attr("refX",r=>r.refX).attr("refY",0)}function rF(t,e){function n(o,a){o.active||t.alphaTarget(.3).restart(),o.subject.fx=o.subject.x,o.subject.fy=o.subject.y,e.next("start")}function r(o,a){o.subject.fx=o.x,o.subject.fy=o.y,e.next("drag")}function i(o,a){o.active||t.alphaTarget(0),o.subject.fx=null,o.subject.fy=null,e.next("end")}return hs().on("start",n).on("drag",r).on("end",i)}function iF({nodeListGSelection:t,nodes:e}){return t.selectAll("g").data(e,n=>n.id).join(n=>n.append("g").classed(ZN,!0),n=>n,n=>n.remove())}function oF({nodeGSelection:t,fullParams:e,fullChartParams:n}){return t.each((r,i,o)=>{V(o[i]).selectAll("circle").data([r]).join(s=>s.append("circle").classed(A2,!0).attr("cursor","pointer"),s=>s,s=>s.remove()).attr("r",s=>s.r).attr("fill",s=>Ct({datum:s,colorType:e.bubble.fillColorType,fullChartParams:n})).attr("stroke",s=>Ct({datum:s,colorType:e.bubble.strokeColorType,fullChartParams:n})).attr("stroke-width",e.bubble.strokeWidth).attr("style",s=>e.bubble.styleFn(s))}).attr("text-anchor","middle").attr("font-size",$2).each((r,i,o)=>{V(o[i]).call(C$,{text:r.label,radius:r.r*e.bubbleLabel.fillRate,lineHeight:$2*e.bubbleLabel.lineHeight,isBreakAll:e.bubbleLabel.wordBreakAll})}),t.select("text").attr("pointer-events","none").attr("style",r=>e.bubbleLabel.styleFn(r)),t.select(`circle.${A2}`)}function aF({edgeListGSelection:t,edges:e}){return t.selectAll("g").data(e,n=>n.id).join(n=>n.append("g").classed(jN,!0),n=>n,n=>n.remove())}function sF({edgeGSelection:t,fullParams:e,fullChartParams:n}){return t.each((r,i,o)=>{V(o[i]).selectAll("path").data([r]).join(s=>s.append("path").classed(w2,!0),s=>s,s=>s.remove()).attr("marker-end",s=>`url(#${s.markerId})`).attr("stroke",s=>Ct({datum:s.data,colorType:e.arrow.colorType,fullChartParams:n})).attr("stroke-width",s=>s.strokeWidth).attr("style",s=>e.arrow.styleFn(s))}),t.select(`path.${w2}`)}function lF({edgeGSelection:t}){return t.each((e,n,r)=>{V(r[n]).selectAll("g").data([e]).join(o=>o.append("g").classed(S2,!0),o=>o,o=>o.remove())}),t.select(`g.${S2}`)}function uF({edgeLabelGSelection:t,fullParams:e,fullChartParams:n}){return t.each((r,i,o)=>{V(o[i]).selectAll("text").data([r],s=>s.id).join(s=>s.append("text").classed(T2,!0).attr("text-anchor","middle").attr("pointer-events","none"),s=>s,s=>s.remove()).text(s=>s.label).attr("fill",s=>Ct({datum:s,colorType:e.arrowLabel.colorType,fullChartParams:n})).attr("font-size",n.styles.textSize).attr("style",s=>e.arrowLabel.styleFn(s))}),t.select(`text.${T2}`)}function cF({nodeGSelection:t,edgeGSelection:e,highlightIds:n,fullChartParams:r}){if(t.interrupt("highlight"),e.interrupt("highlight"),!n.length){t.transition("highlight").style("opacity",1),e.transition("highlight").style("opacity",1);return}e.style("opacity",r.styles.unhighlightedOpacity),t.each((i,o,a)=>{const s=V(a[o]);n.includes(i.id)?s.style("opacity",1).transition("highlight").ease(sr).duration(500):s.style("opacity",r.styles.unhighlightedOpacity)})}const fF=ja(KN)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new J,a=t.append("g").classed(VN,!0),s=a.append("defs"),l=a.append("g").classed(HN,!0),u=a.append("g").classed(qN,!0);let c,f,h,p,d,m;const g=new Du("end"),y=new J,b=r.fullParams$.pipe(L(o),R(S=>{let D=S.zoomable?yn().on("zoom",F=>{a.attr("transform",`translate(
175
+ ${F.transform.x},
176
+ ${F.transform.y}
177
+ ) scale(
178
+ ${F.transform.k}
179
+ )`),S.arrowLabel.sizeFixed&&m&&m.attr("transform",`scale(${1/F.transform.k})`)}):yn().on("zoom",null);return S.scaleExtent&&D.scaleExtent([S.scaleExtent.min,S.scaleExtent.max]),e.call(D),D}));Y({d3Zoom:b,transform:r.fullParams$.pipe(L(o),R(S=>S.transform))}).pipe(L(o),G(async S=>S)).subscribe(S=>{t.call(S.d3Zoom.transform,Li.translate(S.transform.x,S.transform.y).scale(S.transform.k))});const v=Y({layout:r.layout$.pipe(Xi()),fullParams:r.fullParams$}).pipe(L(o),G(async S=>S),R(S=>QN(S.layout,S.fullParams)),pt(1)),x=r.computedData$.pipe(L(o),R(S=>{const D=S.nodes.filter(z=>z.value!=null);if(!D.length)return[0,2];const F=ic(S.nodes.map(z=>z.value));return D.length==1||F[0]===F[1]?[F[0]-1,F[1]+1]:F}),pt(1)),_=r.computedData$.pipe(L(o),R(S=>{const D=S.edges.filter(z=>z.value!=null);if(!D.length)return[0,2];const F=ic(S.edges.map(z=>z.value));return D.length==1||F[0]===F[1]?[F[0]-1,F[1]+1]:F}),pt(1)),A=x.pipe(L(o),R(S=>(S[1]-S[0])/2)),w=_.pipe(L(o),R(S=>(S[1]-S[0])/2)),P=Y({nodeMinMaxValue:x,fullParams:r.fullParams$}).pipe(L(o),G(async S=>S),R(S=>kn().domain(S.nodeMinMaxValue).range([S.fullParams.bubble.radiusMin,S.fullParams.bubble.radiusMax]).exponent(S.fullParams.bubble.arcScaleType==="area"?.5:1))),C=Y({edgeMinMaxValue:_,fullParams:r.fullParams$}).pipe(L(o),G(async S=>S),R(S=>xr().domain(S.edgeMinMaxValue).range([S.fullParams.arrow.strokeWidthMin,S.fullParams.arrow.strokeWidthMax]))),B=Y({computedData:r.computedData$,radiusScale:P,defaultNodeValue:A}).pipe(L(o),G(async S=>S),R(S=>new Map(S.computedData.nodes.map(D=>{let F=D;return F.r=S.radiusScale(F.value??S.defaultNodeValue),[F.id,F]})))),$=Y({computedData:r.computedData$,strokeWidthScale:C,defaultEdgeValue:w}).pipe(L(o),G(async S=>S),R(S=>new Map(S.computedData.edges.map(D=>{let F=D;return F.source=D.startNode,F.target=D.endNode,F.strokeWidth=S.strokeWidthScale(F.value??S.defaultEdgeValue),F.markerId=`${UN}__${F.id}`,[F.id,F]})))),k=Y({visibleComputedData:r.visibleComputedData$,RenderNodeMap:B,RenderEdgeMap:$}).pipe(L(o),G(async S=>S),R(S=>({nodes:S.visibleComputedData.nodes.map(D=>S.RenderNodeMap.get(D.id)),edges:S.visibleComputedData.edges.map(D=>S.RenderEdgeMap.get(D.id))})),pt(1)),M=r.fullParams$.pipe(L(o),R(S=>({viewBox:`-${S.arrow.pointerWidth} -${S.arrow.pointerHeight/2} ${S.arrow.pointerWidth} ${S.arrow.pointerHeight}`,d:`M${-S.arrow.pointerWidth},${-S.arrow.pointerHeight/2}L0,0L${-S.arrow.pointerWidth},${S.arrow.pointerHeight/2}`,pointerWidth:S.arrow.pointerWidth,pointerHeight:S.arrow.pointerHeight}))),T=Y({computedData:r.computedData$,fullParams:r.fullParams$,RenderNodeMap:B,RenderEdgeMap:$}).pipe(L(o),G(async S=>S),R(S=>S.computedData.edges.map(D=>{const F=S.RenderEdgeMap.get(D.id),z=S.RenderNodeMap.get(D.endNode.id);return{id:F.markerId,edgeId:D.id,strokeWidth:F.strokeWidth,refX:(z.r+S.fullParams.bubble.strokeWidth/2)/F.strokeWidth-1}})));return Y({defsSelection:s,markerParams:M,markerData:T}).pipe(L(o),R(S=>nF({defsSelection:s,markerParams:S.markerParams,markerData:S.markerData}))).subscribe(),Y({renderData:k,computedData:r.computedData$,CategoryNodeMap:r.CategoryNodeMap$,simulation:v,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(L(o),G(async S=>S)).subscribe(S=>{c=iF({nodeListGSelection:u,nodes:S.renderData.nodes}),f=oF({nodeGSelection:c,fullParams:S.fullParams,fullChartParams:S.fullChartParams}),c.call(rF(S.simulation,g)),h=aF({edgeListGSelection:l,edges:S.renderData.edges}),p=sF({edgeGSelection:h,fullParams:S.fullParams,fullChartParams:S.fullChartParams}),d=lF({edgeGSelection:h}),m=uF({edgeLabelGSelection:d,fullParams:S.fullParams,fullChartParams:S.fullChartParams}),S.simulation.nodes(S.renderData.nodes).on("tick",()=>{p.attr("d",eF),c.attr("transform",JN),d.attr("transform",D=>tF(D))}),S.simulation.force("link").links(S.renderData.edges),S.simulation.alpha(.3).restart(),f.on("mouseover",(D,F)=>{D.stopPropagation(),y.next({type:"relationship",eventName:"mouseover",pluginName:Ut,highlightTarget:S.fullChartParams.highlightTarget,datum:F,category:S.CategoryNodeMap.get(F.categoryLabel),categoryIndex:F.categoryIndex,categoryLabel:F.categoryLabel,event:D,data:S.computedData})}).on("mousemove",(D,F)=>{D.stopPropagation(),y.next({type:"relationship",eventName:"mousemove",pluginName:Ut,highlightTarget:S.fullChartParams.highlightTarget,datum:F,category:S.CategoryNodeMap.get(F.categoryLabel),categoryIndex:F.categoryIndex,categoryLabel:F.categoryLabel,event:D,data:S.computedData})}).on("mouseout",(D,F)=>{D.stopPropagation(),y.next({type:"relationship",eventName:"mouseout",pluginName:Ut,highlightTarget:S.fullChartParams.highlightTarget,datum:F,category:S.CategoryNodeMap.get(F.categoryLabel),categoryIndex:F.categoryIndex,categoryLabel:F.categoryLabel,event:D,data:S.computedData})}).on("click",(D,F)=>{D.stopPropagation(),y.next({type:"relationship",eventName:"click",pluginName:Ut,highlightTarget:S.fullChartParams.highlightTarget,datum:F,category:S.CategoryNodeMap.get(F.categoryLabel),categoryIndex:F.categoryIndex,categoryLabel:F.categoryLabel,event:D,data:S.computedData})})}),g.pipe(tt((S,D)=>S===D),G(S=>Wi(()=>S==="end",y,va))).subscribe(S=>{i.event$.next(S)}),Y({renderData:k,highlightNodes:r.relationshipHighlightNodes$.pipe(R(S=>S.map(D=>D.id))),highlightEdges:r.relationshipHighlightEdges$.pipe(R(S=>S.map(D=>D.id))),fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(L(o),G(async S=>S)).subscribe(S=>{!c||!h||cF({nodeGSelection:c,edgeGSelection:h,highlightIds:S.highlightNodes,fullChartParams:S.fullChartParams})}),()=>{o.next(void 0)}}),P2="RelationshipLegend",hF=ja({name:P2,defaultParams:h2,layerIndex:ki,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.fullParams$.pipe(L(i),R(s=>{const l=[{listRectWidth:s.listRectWidth,listRectHeight:s.listRectHeight,listRectRadius:s.listRectRadius}];return{...s,labelList:l}})),a=Ei(P2,{rootSelection:e,legendLabels$:n.categoryLabels$,fullParams$:o,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),a()}}),D2="RelationshipTooltip",pF=ja({name:D2,defaultParams:Yp,layerIndex:Ri,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(D2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),C2={force:{strength:.08,velocityDecay:.3,collisionSpacing:2},bubbleLabel:{fillRate:.6,lineHeight:1,maxLineLength:6,wordBreakAll:!0},arcScaleType:"area"},M2={outerRadius:.85,innerRadius:0,outerRadiusWhileHighlight:.9,startAngle:0,endAngle:Math.PI*2,padAngle:0,strokeColorType:"background",strokeWidth:1,cornerRadius:0},Wp={renderFn:t=>t.eventName==="mouseover"||t.eventName==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((e,n)=>e+n.reduce((r,i)=>r+(i.value??0),0),0)*(t.tween??1)))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]};Wp.renderFn.toString=()=>`(eventData) => {
180
+ if (eventData.eventName === 'mouseover' || eventData.eventName === 'mousemove') {
181
+ return [String(eventData.datum.value)]
132
182
  }
133
183
  return [
134
184
  String(
@@ -137,19 +187,19 @@ ${u}`}};Vh.renderFn.toString=()=>`(eventData, { styles }) => {
137
187
  return acc + seriesData.reduce((_acc, data) => {
138
188
  return _acc + (data.value ?? 0)
139
189
  }, 0)
140
- }, 0) * t
190
+ }, 0) * (eventData.tween ?? 1)
141
191
  )
142
192
  )
143
193
  ]
144
- }`;const sp={outerRadius:.85,outerRadiusWhileHighlight:.9,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.1,labelColorType:"primary",labelFn:t=>String(t.label)};sp.labelFn.toString=()=>"d => String(d.label)";const E2={outerRadius:.85,padAngle:0,strokeColorType:"background",strokeWidth:0,cornerRadius:0,arcScaleType:"area",angleIncreaseWhileHighlight:.05},up={outerRadius:.85,labelCentroid:2.1,labelFn:t=>String(t.label),labelColorType:"primary",arcScaleType:"area"};up.labelFn.toString=()=>"d => String(d.label)";const I2={placement:"right-end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},lp={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e})=>{const n=t.seriesLabel.slice(0,7)!=="series_",r=t.datum.label.slice(0,7)!=="series_",i=e.textSizePx*.7,o=e.textSizePx/2-i/2,a=n?`<rect width="${i}" height="${i}" x="${o}" y="${o-1}" rx="${i/2}" fill="${t.datum.color}"></rect>
194
+ }`;const Xp={outerRadius:.85,outerRadiusWhileHighlight:.9,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.1,labelColorType:"primary",labelFn:t=>String(t.label)};Xp.labelFn.toString=()=>"d => String(d.label)";const L2={outerRadius:.85,padAngle:0,strokeColorType:"background",strokeWidth:0,cornerRadius:0,arcScaleType:"area",angleIncreaseWhileHighlight:.05},Vp={outerRadius:.85,labelCentroid:2.1,labelFn:t=>String(t.label),labelColorType:"primary",arcScaleType:"area"};Vp.labelFn.toString=()=>"d => String(d.label)";const k2={placement:"right-end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},Up={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e,utils:n})=>{const r=t.seriesLabel.slice(0,7)!=="series_",i=t.datum.label.slice(0,7)!=="series_",o=e.textSizePx*.7,a=e.textSizePx/2-o/2,s=r?`<rect width="${o}" height="${o}" x="${a}" y="${a-1}" rx="${o/2}" fill="${t.datum.color}"></rect>
145
195
  <text x="${e.textSizePx*1.5}" font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
146
196
  <tspan>${t.seriesLabel}</tspan>
147
- </text>`:"",s=r?`<tspan>${t.datum.label}</tspan> `:"",u=`<text font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
148
- ${s}<tspan font-weight="bold">${t.datum.value}</tspan>
149
- </text>`;return`${a}
150
- <g ${n?`transform="translate(0, ${e.textSizePx*2})"`:""}>
197
+ </text>`:"",l=i?`<tspan>${t.datum.label}</tspan> `:"",u=`<text font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
198
+ ${l}<tspan font-weight="bold">${t.datum.value}</tspan>
199
+ </text>`;return`${s}
200
+ <g ${r?`transform="translate(0, ${e.textSizePx*2})"`:""}>
151
201
  ${u}
152
- </g>`}};lp.renderFn.toString=()=>`(eventData, { styles }) => {
202
+ </g>`}};Up.renderFn.toString=()=>`(eventData, { styles, utils }) => {
153
203
  const hasSeriesLabel = eventData.seriesLabel.slice(0, 7) === 'series_' ? false : true
154
204
  const hasDatumLabel = eventData.datum.label.slice(0, 7) === 'series_' ? false : true
155
205
  const bulletWidth = styles.textSizePx * 0.7
@@ -171,14 +221,14 @@ ${u}`}};Vh.renderFn.toString=()=>`(eventData, { styles }) => {
171
221
  <g \${hasSeriesLabel ? \`transform="translate(0, \${styles.textSizePx * 2})"\` : ''}>
172
222
  \${datumSvg}
173
223
  </g>\`
174
- }`;const GI={name:"Bubbles",defaultParams:k2,layerIndex:ke,validator:(t,{validateColumns:e})=>{const n=e(t,{force:{toBeTypes:["object"]},bubbleText:{toBeTypes:["object"]},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"}});if(t.force){const r=e(t.force,{velocityDecay:{toBeTypes:["number"]},collisionSpacing:{toBeTypes:["number"]},strength:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.bubbleText){const r=e(t.bubbleText,{fillRate:{toBeTypes:["number"]},lineHeight:{toBeTypes:["number"]},lineLengthMin:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};let Cn;function YI(t,e){return l1().velocityDecay(e.force.velocityDecay).force("collision",a1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",c1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function UI({visibleComputedLayoutData:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat(),u=s.reduce((h,p)=>h+p.value,0),l=li().domain([0,u]).range([0,a]).exponent(o==="area"?.5:1),c=o==="area"?1:(()=>{const h=a*a*Math.PI;return Math.sqrt(h/o0(s,p=>Math.PI*Math.pow(l(p.value),2)))})(),f=.9;return s.map(h=>{const p=h,d=e.get(p.id);if(d)p.x=d.x,p.y=d.y;else{const m=i.get(p.seriesLabel);p.x=Math.random()*m.width,p.y=Math.random()*m.height}const g=l(p.value??0)*c*f;return p.r=g,p._originR=g,p})}function WI({selection:t,bubblesData:e,fullParams:n,sumSeries:r}){const i=t.selectAll("g").data(e,a=>a.id).join(a=>{const s=a.append("g").attr("cursor","pointer").attr("font-size",12).style("fill","#ffffff").attr("text-anchor","middle");return s.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",u=>u.color),s.append("text").style("opacity",.8).attr("pointer-events","none"),s},a=>a,a=>a.remove()).attr("transform",a=>`translate(${a.x},${a.y})`),o=r?"seriesLabel":"label";return i.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),i.each((a,s,u)=>{const l=q(u[s]);let c=!0;a[o].length<=n.bubbleText.lineLengthMin&&(c=!1),l.call(iI,{text:a[o],radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:c})}),i}function HI(){return w0().on("start",(t,e)=>{t.active||Cn.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||Cn.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function XI({fullParams:t,SeriesContainerPositionMap:e}){Cn.force("x",f1().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",h1().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),Cn.alpha(1).restart()}function jI({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=q(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(eo).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const VI=dn(GI)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et;let o=new Map;const a=n.fullDataFormatter$.pipe(B(f=>f.sumSeries),tt()),s=n.fullParams$.pipe(N(i),B(f=>f.arcScaleType),tt()),u=U({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:s}).pipe(N(i),W(async f=>f),B(f=>UI({visibleComputedLayoutData:f.visibleComputedLayoutData,LastBubbleDataMap:o,graphicWidth:f.layout.width,graphicHeight:f.layout.height,SeriesContainerPositionMap:f.SeriesContainerPositionMap,scaleType:f.scaleType})),vt(1));u.subscribe(f=>{o=new Map(f.map(h=>[h.id,h]))});const l=n.fullChartParams$.pipe(N(i),B(f=>f.highlightTarget),tt()),c=U({bubblesData:u,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:a}).pipe(N(i),W(async f=>f),B(f=>{Cn&&Cn.stop();const h=WI({selection:t,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries});return Cn=YI(h,f.fullParams),Cn.nodes(f.bubblesData),XI({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),h}));return U({bubblesSelection:c,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,highlightTarget:l}).pipe(N(i),W(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(h,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mousemove",(h,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mouseout",(h,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("click",(h,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).call(HI())}),U({bubblesSelection:c,bubblesData:u,highlight:n.seriesHighlight$.pipe(B(f=>f.map(h=>h.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:a,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(N(i),W(async f=>f)).subscribe(f=>{jI({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams})}),()=>{i.next(void 0)}});function N2({data:t,startAngle:e,endAngle:n}){return Xx().startAngle(e).endAngle(n).value(o=>o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function qI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=ot(e,"series");return U({seriesLabels:r,separateSeries:n}).pipe(W(async o=>o),B((o,a)=>{const s=o.separateSeries?o.seriesLabels:[o.seriesLabels.join("")];return t.selectAll(`g.${i}`).data(s,u=>u).join(u=>u.append("g").classed(i,!0),u=>u,u=>u.remove())}),vt(1))}const Wo=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=qI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return U({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(W(async a=>a),tt((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),U({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(W(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),{seriesCenterSelection$:o}},cp="Pie",ZI={name:cp,defaultParams:R2,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},innerRadius:{toBeTypes:["number"]},outerRadiusWhileHighlight:{toBeTypes:["number"]},startAngle:{toBeTypes:["number"]},endAngle:{toBeTypes:["number"]},padAngle:{toBeTypes:["number"]},strokeColorType:{toBeTypes:["string"]},strokeWidth:{toBeTypes:["number"]},cornerRadius:{toBeTypes:["number"]}})};function KI({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const l=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+l.startAngle*(1-o),endAngle:s.endAngle*o+l.endAngle*(1-o),value:s.value*o+l.value*(1-o)}});return fp(a,i.startAngle,i.endAngle,1)}:o=>fp(n,i.startAngle,i.endAngle,o)}function fp(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function B2({selection:t,data:e,arc:n,pathClassName:r,fullParams:i,fullChartParams:o}){return t.selectAll("path").data(e,s=>s.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(s,u)=>s.data.color).attr("stroke",(s,u)=>Pn({datum:s.data,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("d",(s,u)=>n(s))}function QI({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcHighlight:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=q(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(eo).duration(500).attr("d",l=>i(l)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>r(l))})}function JI(t,e){const n=new et,r=ot(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(N(n),B(h=>h.width<h.height?h.width:h.height),tt()),s=new gt(h=>{U({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(N(n),W(async p=>p)).subscribe(p=>{const d=N2({data:p.containerVisibleComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});h.next(d)})}),u=new gt(h=>{U({shorterSideWith:a,fullParams:e.fullParams$}).pipe(N(n),W(async p=>p)).subscribe(p=>{const d=Nu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),l=new gt(h=>{U({shorterSideWith:a,fullParams:e.fullParams$}).pipe(N(n),W(async p=>p)).subscribe(p=>{const d=Nu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadiusWhileHighlight,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),c=e.fullChartParams$.pipe(N(n),B(h=>h.highlightTarget),tt()),f=new gt(h=>{U({pieData:s,arc:u,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:c}).pipe(N(n),W(async p=>p)).subscribe(p=>{e.containerSelection.interrupt("graphicMove");const d=e.containerSelection.selectAll("path").data(p.pieData,y=>y.id),g=d.enter(),m=d.exit(),b=KI({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(y,_)=>x=>{o=b(x),B2({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r,fullParams:p.fullParams,fullChartParams:p.fullChartParams})}).on("end",(y,_)=>{o=fp(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const x=B2({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r,fullParams:p.fullParams,fullChartParams:p.fullChartParams});h.next(x),i=Object.assign([],p.pieData),e.event$.next({type:"series",pluginName:t,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})})})}).pipe(vt(1));return U({pathSelection:f,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:c}).pipe(N(n),W(async h=>h)).subscribe(h=>{h.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})})}),U({pathSelection:f,highlight:e.seriesHighlight$.pipe(B(h=>h.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:u,arcHighlight:l}).pipe(N(n),W(async h=>h)).subscribe(h=>{QI({pathSelection:h.pathSelection,ids:h.highlight,fullChartParams:h.fullChartParams,arc:h.arc,arcHighlight:h.arcHighlight})}),()=>{n.next(void 0)}}const tN=dn(ZI)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,{seriesCenterSelection$:o}=Wo({selection:t,pluginName:cp,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(N(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=q(c[l]),h=r.visibleComputedLayoutData$.pipe(N(i),B(d=>d[l]??d[0])),p=r.seriesContainerPosition$.pipe(N(i),B(d=>d[l]??d[0]));a[l]=JI(cp,{containerSelection:f,computedData$:r.computedData$,containerVisibleComputedLayoutData$:h,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Uu="PieEventTexts",F2=ot(Uu,"text"),eN={name:Uu,defaultParams:ap,layerIndex:Uh,validator:(t,{validateColumns:e})=>e(t,{eventFn:{toBeTypes:["Function"]},textAttrs:{toBeTypes:["object[]"]},textStyles:{toBeTypes:["object[]"]}})};function hp(t,e){const n=t.selectAll(`text.${F2}`).data(e),r=n.enter().append("text").classed(F2,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=q(s[a]).text(o.text);Object.keys(o.attr).forEach(l=>{u.attr(l,o.attr[l])}),Object.keys(o.style).forEach(l=>{u.style(l,o.style[l])})}),n.exit().remove(),i}function pp({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}function nN(t,e){const n=new et;let r;const i=e.fullChartParams$.pipe(N(n),B(o=>o.highlightTarget),tt());return U({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(N(n),W(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>u=>{const l=pp({eventData:{type:"series",pluginName:t,eventName:"transitionMove",event:a,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:u,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});hp(e.containerSelection,l)}).on("end",(a,s)=>{const u=pp({eventData:{type:"series",pluginName:t,eventName:"transitionEnd",event:a,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});hp(e.containerSelection,u),r&&r.unsubscribe(),r=e.event$.subscribe(l=>{const c=pp({eventData:l,eventName:l.eventName,t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});hp(e.containerSelection,c)})})}),()=>{n.next(void 0)}}const rN=dn(eN)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,{seriesCenterSelection$:o}=Wo({selection:t,pluginName:Uu,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(N(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=q(c[l]),h=n.computedLayoutData$.pipe(N(i),B(d=>d[l]??d[0])),p=n.seriesContainerPosition$.pipe(N(i),B(d=>d[l]??d[0]));a[l]=nN(Uu,{containerSelection:f,computedData$:n.computedData$,containerComputedLayoutData$:h,SeriesDataMap$:n.SeriesDataMap$,fullParams$:n.fullParams$,fullChartParams$:n.fullChartParams$,seriesHighlight$:n.seriesHighlight$,seriesContainerPosition$:p,event$:r.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),xi="PieLabels",iN=ot(xi,"label-g"),oN=ot(xi,"line-g"),aN=ot(xi,"text"),O2=2,sN={name:xi,defaultParams:sp,layerIndex:Uh,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},outerRadiusWhileHighlight:{toBeTypes:["number"]},startAngle:{toBeTypes:["number"]},endAngle:{toBeTypes:["number"]},labelCentroid:{toBeTypes:["number"]},labelFn:{toBeTypes:["Function"]},labelColorType:{toBeOption:"ColorType"}})};function uN({pieData:t,arc:e,arcMouseover:n,labelCentroid:r,lineStartCentroid:i,fullParams:o}){return t.map((a,s)=>{const[u,l]=e.centroid(a),[c,f]=n.centroid(a),h=o.labelFn(a.data);return{pieDatum:a,arcIndex:s,arcLabels:h.split(`
175
- `),lineStartX:u*i,lineStartY:l*i,lineStartMouseoverX:c*i,lineStartMouseoverY:f*i,x:u*r,y:l*r,mouseoverX:c*r,mouseoverY:f*r,textWidth:0,collisionShiftX:0,collisionShiftY:0,quadrant:u>=0&&l<=0?1:u<0&&l<=0?2:u<0&&l>0?3:4}}).filter(a=>a.pieDatum.data.visible)}function lN({labelGSelection:t,data:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=t.selectAll("text").data(e,a=>a.pieDatum.id).join("text").classed(aN,!0).attr("font-weight","bold").attr("text-anchor",a=>a.quadrant==1||a.quadrant==4?"start":"end").style("dominant-baseline",a=>a.quadrant==1||a.quadrant==2?"auto":"hanging").style("cursor",a=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").attr("font-size",r.styles.textSize).attr("x",0).attr("y",0).attr("fill",(a,s)=>Pn({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).each((a,s,u)=>{r2(q(u[s]),{textArr:a.arcLabels,textSizePx:i,quadrant:a.quadrant})});return o.transition().attr("transform",a=>"translate("+a.x+","+a.y+")"),o}function cN(t,e,n){const r=t.nodes(),i=n,o=r.map((a,s)=>{const u=a.getBBox(),l=[e[s].x,e[s].y];return{node:a,x:l[0],y:l[1],width:u.width,height:u.height}});for(let a=0;a<o.length;a++){const s=o[a];for(let u=a+1;u<o.length;u++){const l=o[u];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=l.x+e[u].collisionShiftX,p=l.y+e[u].collisionShiftY;if(!(c+s.width/2<h-l.width/2||c-s.width/2>h+l.width/2||f+s.height/2<p-l.height/2||f-s.height/2>p+l.height/2)){if(e[u].quadrant==2){const d=p>f?-i*2:-i;e[u].collisionShiftY+=d}else if(e[u].quadrant==4){const d=p>f?i:i*2;e[u].collisionShiftY+=d}}}}for(let a=o.length-1;a>=0;a--){const s=o[a];for(let u=a-1;u>=0;u--){const l=o[u];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=l.x+e[u].collisionShiftX,p=l.y+e[u].collisionShiftY;if(!(c+s.width/2<h-l.width/2||c-s.width/2>h+l.width/2||f+s.height/2<p-l.height/2||f-s.height/2>p+l.height/2)){if(e[u].quadrant==1){const d=p>f?-i*2:-i;e[u].collisionShiftY+=d}else if(e[u].quadrant==3){const d=p>f?i:i*2;e[u].collisionShiftY+=d}}}}t.data(e).transition().attr("transform",a=>`translate(${a.x+a.collisionShiftX},${a.y+a.collisionShiftY})`)}function fN({lineGSelection:t,data:e,fullParams:n,fullChartParams:r}){const i=e.filter(a=>a.collisionShiftX||a.collisionShiftY),o=t.selectAll("polyline").data(i,a=>a.pieDatum.id).join("polyline").attr("stroke",a=>Pn({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).attr("stroke-width",1).attr("fill","none").attr("points",a=>[[a.lineStartX,a.lineStartY],[a.lineStartX,a.lineStartY]]);return o.transition().attr("points",a=>{let s=a.x+a.collisionShiftX,u=a.y+a.collisionShiftY;return[[s,u],[a.lineStartX,a.lineStartY]]}),o}function hN({textSelection:t,lineSelection:e,ids:n,fullChartParams:r}){if(t.interrupt("highlight"),e.interrupt("highlight"),!n.length){t.transition("highlight").duration(200).attr("transform",i=>`translate(${i.x+i.collisionShiftX},${i.y+i.collisionShiftY})`).style("opacity",1),e.transition("highlight").duration(200).style("opacity",1);return}t.each((i,o,a)=>{const s=q(a[o]);n.includes(i.pieDatum.id)?s.style("opacity",1).transition("highlight").duration(200).attr("transform",u=>u.collisionShiftX||u.collisionShiftY?`translate(${u.x+u.collisionShiftX},${u.y+u.collisionShiftY})`:`translate(${u.mouseoverX+u.collisionShiftX},${u.mouseoverY+u.collisionShiftY})`):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200).attr("transform",u=>`translate(${u.x+u.collisionShiftX},${u.y+u.collisionShiftY})`)}),e.each((i,o,a)=>{const s=q(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function pN(t,e){const n=new et;e.containerSelection.selectAll("g").remove();const r=e.containerSelection.append("g");r.classed(oN,!0);const i=e.containerSelection.append("g");i.classed(iN,!0);const o=new et,a=new et;let s=[];const u=e.seriesContainerPosition$.pipe(N(n),B(c=>c.width<c.height?c.width:c.height),tt()),l=e.fullParams$.pipe(N(n),B(c=>c.labelCentroid>=O2?O2:c.labelCentroid));return U({shorterSideWith:u,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,textSizePx:e.textSizePx$,lineStartCentroid:l}).pipe(N(n),W(async c=>c)).subscribe(c=>{const f=Nu({axisWidth:c.shorterSideWith,innerRadius:0,outerRadius:c.fullParams.outerRadius,padAngle:0,cornerRadius:0}),h=Nu({axisWidth:c.shorterSideWith,innerRadius:0,outerRadius:c.fullParams.outerRadiusWhileHighlight,padAngle:0,cornerRadius:0}),p=N2({data:c.containerVisibleComputedLayoutData,startAngle:c.fullParams.startAngle,endAngle:c.fullParams.endAngle});s=uN({pieData:p,arc:f,arcMouseover:h,labelCentroid:c.fullParams.labelCentroid,lineStartCentroid:c.lineStartCentroid,fullParams:c.fullParams}),r.selectAll("polyline").remove();const d=lN({labelGSelection:i,data:s,fullParams:c.fullParams,fullChartParams:c.fullChartParams,textSizePx:c.textSizePx});setTimeout(()=>{cN(d,s,c.textSizePx);const g=fN({lineGSelection:r,data:s,fullParams:c.fullParams,fullChartParams:c.fullChartParams});a.next(g)},1e3),o.next(d)}),U({textSelection:o,lineSelection:a,highlight:e.seriesHighlight$.pipe(B(c=>c.map(f=>f.id))),fullChartParams:e.fullChartParams$}).pipe(N(n),W(async c=>c)).subscribe(c=>{hN({textSelection:c.textSelection,lineSelection:c.lineSelection,ids:c.highlight,fullChartParams:c.fullChartParams})}),()=>{n.next(void 0)}}const dN=dn(sN)(({selection:t,observer:e,subject:n})=>{const r=new et,{seriesCenterSelection$:i}=Wo({selection:t,pluginName:xi,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(N(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=q(l[u]),f=e.visibleComputedLayoutData$.pipe(N(r),B(p=>p[u]??p[0])),h=e.seriesContainerPosition$.pipe(N(r),B(p=>p[u]??p[0]));o[u]=pN(xi,{containerSelection:c,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,textSizePx$:e.textSizePx$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),dp="Rose",gN=Math.PI*2,mN={name:dp,defaultParams:E2,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},padAngle:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},cornerRadius:{toBeTypes:["number"]},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"},angleIncreaseWhileHighlight:{toBeTypes:["number"]}})};function yN({cornerRadius:t,outerRadius:e,axisWidth:n,maxValue:r,arcScaleType:i,fullParams:o}){const a=n/2*e,s=i==="area"?.5:1,u=li().domain([0,r]).range([0,a]).exponent(s);return l=>{const c=u(l.prevValue),f=u(l.value),h=Ze(c,f);return p=>{const d=h(p);return wu().innerRadius(0).outerRadius(d).padAngle(o.padAngle).padRadius(d).cornerRadius(t)(l)}}}function bN({pathSelection:t,ids:e,fullParams:n,fullChartParams:r,tweenArc:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>i(o)(1));return}t.each((o,a,s)=>{const u=q(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(eo).duration(500).attr("d",l=>i({...l,startAngle:l.startAngle-n.angleIncreaseWhileHighlight,endAngle:l.endAngle+n.angleIncreaseWhileHighlight})(1)):u.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>i(l)(1))})}function xN(t,e){const n=new et,r=ot(t,"path");let i=[];const o=e.seriesContainerPosition$.pipe(N(n),B(p=>p.width<p.height?p.width:p.height),tt()),a=U({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(N(n),W(async p=>p),B(p=>{const d=gN/p.containerVisibleComputedLayoutData.length;return p.containerVisibleComputedLayoutData.map((g,m)=>({id:g.id,data:g,index:m,value:g.value,startAngle:d*m,endAngle:d*(m+1),padAngle:p.fullParams.padAngle,prevValue:i[m]&&i[m].id===g.id?i[m].value:0}))})),s=e.fullChartParams$.pipe(N(n),B(p=>p.highlightTarget),tt()),u=e.visibleComputedLayoutData$.pipe(B(p=>Math.max(...p.flat().map(d=>d.value))),tt()),l=U({fullParams:e.fullParams$,axisWidth:o,maxValue:u}).pipe(N(n),W(async p=>p),B(p=>yN({cornerRadius:p.fullParams.cornerRadius,outerRadius:p.fullParams.outerRadius,axisWidth:p.axisWidth,maxValue:p.maxValue,arcScaleType:p.fullParams.arcScaleType,fullParams:p.fullParams}))),c=e.fullChartParams$.pipe(N(n),B(p=>p.transitionDuration),tt()),f=new l_(!1),h=new gt(p=>{U({pieData:a,tweenArc:l,transitionDuration:c,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(N(n),W(async d=>d)).subscribe(d=>{const g=d.pieData.map((b,y)=>(b.prevValue=i[y]&&i[y].id===b.id?i[y].value:0,b));f.next(!0);const m=e.containerSelection.selectAll("path").data(g,b=>b.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(b,y)=>b.data.color).attr("stroke",(b,y)=>Pn({datum:b.data,colorType:d.fullParams.strokeColorType,fullChartParams:d.fullChartParams})).attr("stroke-width",d.fullParams.strokeWidth);m.interrupt("graphicMove"),m.transition("graphicMove").duration(d.transitionDuration).attrTween("d",d.tweenArc).on("end",()=>{p.next(m),f.next(!1)}),i=Object.assign([],g)})}).pipe(vt(1));return U({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:s}).pipe(N(n),W(async p=>p)).subscribe(p=>{p.pathSelection.on("mouseover",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mousemove",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mouseout",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("click",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})})}),U({pathSelection:h,highlight:e.seriesHighlight$.pipe(B(p=>p.map(d=>d.id))),fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,tweenArc:l,isTransitionMoving:f}).pipe(N(n),W(async p=>p),wi(p=>!p.isTransitionMoving)).subscribe(p=>{bN({pathSelection:p.pathSelection,ids:p.highlight,fullParams:p.fullParams,fullChartParams:p.fullChartParams,tweenArc:p.tweenArc})}),()=>{n.next(void 0)}}const vN=dn(mN)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,{seriesCenterSelection$:o}=Wo({selection:t,pluginName:dp,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(N(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=q(c[l]),h=r.visibleComputedLayoutData$.pipe(N(i),B(d=>JSON.parse(JSON.stringify(d[l]??d[0])))),p=r.seriesContainerPosition$.pipe(N(i),B(d=>JSON.parse(JSON.stringify(d[l]??d[0]))));a[l]=xN(dp,{containerSelection:f,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:h,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),vi="RoseLabels",_N=ot(vi,"label-g"),$N=ot(vi,"line-g"),wN=ot(vi,"text"),z2=2,SN={name:vi,defaultParams:up,layerIndex:Uh,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},labelCentroid:{toBeTypes:["number"]},labelFn:{toBeTypes:["Function"]},labelColorType:{toBeOption:"ColorType"},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"}})};function AN({pieData:t,labelCentroid:e,arcScaleType:n,maxValue:r,axisWidth:i,outerRadius:o,lineStartCentroid:a,fullParams:s}){const u=i/2*o,l=n==="area"?.5:1,c=li().domain([0,r]).range([0,u]).exponent(l);return t.map((f,h)=>{const p=c(f.value),d=wu().innerRadius(0).outerRadius(p).padAngle(0).padRadius(p).cornerRadius(0),[g,m]=d.centroid(f),[b,y]=[g,m],_=s.labelFn(f.data);return{pieDatum:f,arcIndex:h,arcLabels:_.split(`
176
- `),lineStartX:g*a,lineStartY:m*a,lineStartMouseoverX:b*a,lineStartMouseoverY:y*a,x:g*e,y:m*e,mouseoverX:b*e,mouseoverY:y*e,textWidth:0,collisionShiftX:0,collisionShiftY:0,quadrant:g>=0&&m<=0?1:g<0&&m<=0?2:g<0&&m>0?3:4}}).filter(f=>f.pieDatum.data.visible)}function TN({labelGSelection:t,data:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=t.selectAll("text").data(e,a=>a.pieDatum.id).join("text").classed(wN,!0).attr("font-weight","bold").attr("text-anchor",a=>a.quadrant==1||a.quadrant==4?"start":"end").style("dominant-baseline",a=>a.quadrant==1||a.quadrant==2?"auto":"hanging").style("cursor",a=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").attr("font-size",r.styles.textSize).attr("fill",(a,s)=>Pn({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).each((a,s,u)=>{r2(q(u[s]),{textArr:a.arcLabels,textSizePx:i,quadrant:a.quadrant})});return o.transition().attr("transform",a=>"translate("+a.x+","+a.y+")"),o}function PN(t,e,n){const r=t.nodes(),i=n,o=r.map((a,s)=>{const u=a.getBBox(),l=[e[s].x,e[s].y];return{node:a,x:l[0],y:l[1],width:u.width,height:u.height}});for(let a=0;a<o.length;a++){const s=o[a];for(let u=a+1;u<o.length;u++){const l=o[u];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=l.x+e[u].collisionShiftX,p=l.y+e[u].collisionShiftY;if(!(c+s.width/2<h-l.width/2||c-s.width/2>h+l.width/2||f+s.height/2<p-l.height/2||f-s.height/2>p+l.height/2)){if(e[u].quadrant==2){const d=p>f?-i*2:-i;e[u].collisionShiftY+=d}else if(e[u].quadrant==4){const d=p>f?i:i*2;e[u].collisionShiftY+=d}}}}for(let a=o.length-1;a>=0;a--){const s=o[a];for(let u=a-1;u>=0;u--){const l=o[u];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=l.x+e[u].collisionShiftX,p=l.y+e[u].collisionShiftY;if(!(c+s.width/2<h-l.width/2||c-s.width/2>h+l.width/2||f+s.height/2<p-l.height/2||f-s.height/2>p+l.height/2)){if(e[u].quadrant==1){const d=p>f?-i*2:-i;e[u].collisionShiftY+=d}else if(e[u].quadrant==3){const d=p>f?i:i*2;e[u].collisionShiftY+=d}}}}t.data(e).transition().attr("transform",a=>`translate(${a.x+a.collisionShiftX},${a.y+a.collisionShiftY})`)}function MN({lineGSelection:t,data:e,fullParams:n,fullChartParams:r}){const i=e.filter(a=>a.collisionShiftX||a.collisionShiftY),o=t.selectAll("polyline").data(i,a=>a.pieDatum.id).join("polyline").attr("stroke",a=>Pn({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).attr("stroke-width",1).attr("fill","none").attr("points",a=>[[a.lineStartX,a.lineStartY],[a.lineStartX,a.lineStartY]]);return o.transition().attr("points",a=>{let s=a.x+a.collisionShiftX,u=a.y+a.collisionShiftY;return[[s,u],[a.lineStartX,a.lineStartY]]}),o}function DN({textSelection:t,lineSelection:e,ids:n,fullChartParams:r}){if(t.interrupt("highlight"),e.interrupt("highlight"),!n.length){t.transition("highlight").duration(200).attr("transform",i=>`translate(${i.x+i.collisionShiftX},${i.y+i.collisionShiftY})`).style("opacity",1),e.transition("highlight").duration(200).style("opacity",1);return}t.each((i,o,a)=>{const s=q(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200).attr("transform",u=>`translate(${u.mouseoverX+u.collisionShiftX},${u.mouseoverY+u.collisionShiftY})`):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200).attr("transform",u=>`translate(${u.x+u.collisionShiftX},${u.y+u.collisionShiftY})`)}),e.each((i,o,a)=>{const s=q(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function CN(t,e){const n=new et;e.containerSelection.selectAll("g").remove();const r=e.containerSelection.append("g");r.classed($N,!0);const i=e.containerSelection.append("g");i.classed(_N,!0);const o=new et,a=new et;let s=[];const u=e.seriesContainerPosition$.pipe(N(n),B(f=>f.width<f.height?f.width:f.height),tt()),l=e.visibleComputedLayoutData$.pipe(B(f=>Math.max(...f.flat().map(h=>h.value))),tt()),c=e.fullParams$.pipe(N(n),B(f=>f.labelCentroid>=z2?z2:f.labelCentroid));return U({shorterSideWith:u,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,maxValue:l,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,textSizePx:e.textSizePx$,lineStartCentroid:c}).pipe(N(n),W(async f=>f)).subscribe(f=>{const h=Math.PI*2/f.containerVisibleComputedLayoutData.length,p=f.containerVisibleComputedLayoutData.map((g,m)=>({id:g.id,data:g,index:m,value:g.value,startAngle:h*m,endAngle:h*(m+1),padAngle:0}));s=AN({pieData:p,labelCentroid:f.fullParams.labelCentroid,arcScaleType:f.fullParams.arcScaleType,maxValue:f.maxValue,axisWidth:f.shorterSideWith,outerRadius:f.fullParams.outerRadius,lineStartCentroid:f.lineStartCentroid,fullParams:f.fullParams}),r.selectAll("polyline").remove();const d=TN({labelGSelection:i,data:s,fullParams:f.fullParams,fullChartParams:f.fullChartParams,textSizePx:f.textSizePx});setTimeout(()=>{PN(d,s,f.textSizePx);const g=MN({lineGSelection:r,data:s,fullParams:f.fullParams,fullChartParams:f.fullChartParams});a.next(g)},1e3),o.next(d)}),U({textSelection:o,lineSelection:a,highlight:e.seriesHighlight$.pipe(B(f=>f.map(h=>h.id))),fullChartParams:e.fullChartParams$}).pipe(N(n),W(async f=>f)).subscribe(f=>{DN({textSelection:f.textSelection,lineSelection:f.lineSelection,ids:f.highlight,fullChartParams:f.fullChartParams})}),()=>{n.next(void 0)}}const LN=dn(SN)(({selection:t,observer:e,subject:n})=>{const r=new et,{seriesCenterSelection$:i}=Wo({selection:t,pluginName:vi,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(N(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=q(l[u]),f=e.visibleComputedLayoutData$.pipe(N(r),B(p=>JSON.parse(JSON.stringify(p[u]??p[0])))),h=e.seriesContainerPosition$.pipe(N(r),B(p=>JSON.parse(JSON.stringify(p[u]??p[0]))));o[u]=CN(vi,{containerSelection:c,visibleComputedLayoutData$:e.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,textSizePx$:e.textSizePx$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),G2="SeriesLegend",kN=dn({name:G2,defaultParams:I2,layerIndex:Bu,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.SeriesDataMap$.pipe(N(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(N(i),B(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Ou(G2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Y2="SeriesTooltip",RN=dn({name:Y2,defaultParams:lp,layerIndex:Fu,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new et,a=zu(Y2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),gp={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value};gp.sort.toString=()=>"(a, b) => b.value - a.value";const U2={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},mp={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e})=>{const n=!!t.categoryLabel,r=!!t.datum.label,i=e.textSizePx*.7,o=e.textSizePx/2-i/2,a=n?`<rect width="${i}" height="${i}" x="${o}" y="${o-1}" rx="${i/2}" fill="${t.datum.color}"></rect>
224
+ }`;const dF="Bubbles",R2=12,gF={name:dF,defaultParams:C2,layerIndex:be,validator:(t,{validateColumns:e})=>{const n=e(t,{force:{toBeTypes:["object"]},bubbleLabel:{toBeTypes:["object"]},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"}});if(t.force){const r=e(t.force,{velocityDecay:{toBeTypes:["number"]},collisionSpacing:{toBeTypes:["number"]},strength:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.bubbleLabel){const r=e(t.bubbleLabel,{fillRate:{toBeTypes:["number"]},lineHeight:{toBeTypes:["number"]},maxLineLength:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};let Nn;function mF(t,e){return Xs().velocityDecay(e.force.velocityDecay).force("collision",Ws().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Vs().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function yF({visibleComputedLayoutData:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat(),l=s.reduce((h,p)=>h+p.value,0),u=kn().domain([0,l]).range([0,a]).exponent(o==="area"?.5:1),c=o==="area"?1:(()=>{const h=a*a*Math.PI;return Math.sqrt(h/Ac(s,p=>Math.PI*Math.pow(u(p.value),2)))})(),f=.9;return s.map(h=>{const p=h,d=e.get(p.id);if(d)p.x=d.x,p.y=d.y;else{const g=i.get(p.seriesLabel);p.x=Math.random()*g.width,p.y=Math.random()*g.height}const m=u(p.value??0)*c*f;return p.r=m,p._originR=m,p})}function bF({selection:t,bubblesData:e,fullParams:n,sumSeries:r}){const i=t.selectAll("g").data(e,a=>a.id).join(a=>{const s=a.append("g").attr("cursor","pointer").attr("font-size",R2).style("fill","#ffffff").attr("text-anchor","middle");return s.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",l=>l.color),s.append("text").style("opacity",.8).attr("pointer-events","none"),s},a=>a,a=>a.remove()).attr("transform",a=>`translate(${a.x},${a.y})`),o=r?"seriesLabel":"label";return i.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),i.each((a,s,l)=>{V(l[s]).call(C$,{text:a[o],radius:a.r*n.bubbleLabel.fillRate,lineHeight:R2*n.bubbleLabel.lineHeight,isBreakAll:n.bubbleLabel.wordBreakAll})}),i}function xF(){return hs().on("start",(t,e)=>{t.active||Nn.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||Nn.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function vF({fullParams:t,SeriesContainerPositionMap:e}){Nn.force("x",Ny().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",Fy().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),Nn.alpha(1).restart()}function $F({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=V(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(sr).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const _F=wn(gF)(({selection:t,name:e,observer:n,subject:r})=>{const i=new J;let o=new Map;const a=n.fullDataFormatter$.pipe(R(f=>f.sumSeries),tt()),s=n.fullParams$.pipe(L(i),R(f=>f.arcScaleType),tt()),l=Y({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:s}).pipe(L(i),G(async f=>f),R(f=>yF({visibleComputedLayoutData:f.visibleComputedLayoutData,LastBubbleDataMap:o,graphicWidth:f.layout.width,graphicHeight:f.layout.height,SeriesContainerPositionMap:f.SeriesContainerPositionMap,scaleType:f.scaleType})),pt(1));l.subscribe(f=>{o=new Map(f.map(h=>[h.id,h]))});const u=n.fullChartParams$.pipe(L(i),R(f=>f.highlightTarget),tt()),c=Y({bubblesData:l,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:a}).pipe(L(i),G(async f=>f),R(f=>{Nn&&Nn.stop();const h=bF({selection:t,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries});return Nn=mF(h,f.fullParams),Nn.nodes(f.bubblesData),vF({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),h}));return Y({bubblesSelection:c,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,highlightTarget:u}).pipe(L(i),G(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(h,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mousemove",(h,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mouseout",(h,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("click",(h,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).call(xF())}),Y({bubblesSelection:c,bubblesData:l,highlight:n.seriesHighlight$.pipe(R(f=>f.map(h=>h.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:a,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(L(i),G(async f=>f)).subscribe(f=>{$F({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams})}),()=>{i.next(void 0)}});function E2({data:t,startAngle:e,endAngle:n}){return bv().startAngle(e).endAngle(n).value(o=>o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function wF({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=Z(e,"series");return Y({seriesLabels:r,separateSeries:n}).pipe(G(async o=>o),R((o,a)=>{const s=o.separateSeries?o.seriesLabels:[o.seriesLabels.join("")];return t.selectAll(`g.${i}`).data(s,l=>l).join(l=>l.append("g").classed(i,!0),l=>l,l=>l.remove())}),pt(1))}const pa=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=wF({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return Y({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(G(async a=>a),tt((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,l)=>{const u=a.seriesContainerPosition[l]??a.seriesContainerPosition[0];return`translate(${u.centerX}, ${u.centerY})`})}),Y({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(G(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,l)=>{const u=a.seriesContainerPosition[l]??a.seriesContainerPosition[0];return`translate(${u.centerX}, ${u.centerY})`})}),{seriesCenterSelection$:o}},Hp="Pie",SF={name:Hp,defaultParams:M2,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},innerRadius:{toBeTypes:["number"]},outerRadiusWhileHighlight:{toBeTypes:["number"]},startAngle:{toBeTypes:["number"]},endAngle:{toBeTypes:["number"]},padAngle:{toBeTypes:["number"]},strokeColorType:{toBeTypes:["string"]},strokeWidth:{toBeTypes:["number"]},cornerRadius:{toBeTypes:["number"]}})};function TF({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,l)=>{const u=r[l]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+u.startAngle*(1-o),endAngle:s.endAngle*o+u.endAngle*(1-o),value:s.value*o+u.value*(1-o)}});return jp(a,i.startAngle,i.endAngle,1)}:o=>jp(n,i.startAngle,i.endAngle,o)}function jp(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function I2({selection:t,data:e,arc:n,pathClassName:r,fullParams:i,fullChartParams:o}){return t.selectAll("path").data(e,s=>s.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(s,l)=>s.data.color).attr("stroke",(s,l)=>Ct({datum:s.data,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("d",(s,l)=>n(s))}function AF({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcHighlight:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const l=V(s[a]);e.includes(o.data.id)?l.style("opacity",1).transition("highlight").ease(sr).duration(500).attr("d",u=>i(u)):l.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>r(u))})}function PF(t,e){const n=new J,r=Z(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(L(n),R(h=>h.width<h.height?h.width:h.height),tt()),s=new dt(h=>{Y({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(L(n),G(async p=>p)).subscribe(p=>{const d=E2({data:p.containerVisibleComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});h.next(d)})}),l=new dt(h=>{Y({shorterSideWith:a,fullParams:e.fullParams$}).pipe(L(n),G(async p=>p)).subscribe(p=>{const d=cu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),u=new dt(h=>{Y({shorterSideWith:a,fullParams:e.fullParams$}).pipe(L(n),G(async p=>p)).subscribe(p=>{const d=cu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadiusWhileHighlight,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),c=e.fullChartParams$.pipe(L(n),R(h=>h.highlightTarget),tt()),f=new dt(h=>{Y({pieData:s,arc:l,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:c}).pipe(L(n),G(async p=>p)).subscribe(p=>{e.containerSelection.interrupt("graphicMove");const d=e.containerSelection.selectAll("path").data(p.pieData,b=>b.id),m=d.enter(),g=d.exit(),y=TF({enter:m,exit:g,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(b,v)=>x=>{o=y(x),I2({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r,fullParams:p.fullParams,fullChartParams:p.fullChartParams})}).on("end",(b,v)=>{o=jp(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const x=I2({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r,fullParams:p.fullParams,fullChartParams:p.fullChartParams});h.next(x),i=Object.assign([],p.pieData),e.event$.next({type:"series",pluginName:t,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})})})}).pipe(pt(1));return Y({pathSelection:f,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:c}).pipe(L(n),G(async h=>h)).subscribe(h=>{h.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})})}),Y({pathSelection:f,highlight:e.seriesHighlight$.pipe(R(h=>h.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:l,arcHighlight:u}).pipe(L(n),G(async h=>h)).subscribe(h=>{AF({pathSelection:h.pathSelection,ids:h.highlight,fullChartParams:h.fullChartParams,arc:h.arc,arcHighlight:h.arcHighlight})}),()=>{n.next(void 0)}}const DF=wn(SF)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,{seriesCenterSelection$:o}=pa({selection:t,pluginName:Hp,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(L(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const f=V(c[u]),h=r.visibleComputedLayoutData$.pipe(L(i),R(d=>d[u]??d[0])),p=r.seriesContainerPosition$.pipe(L(i),R(d=>d[u]??d[0]));a[u]=PF(Hp,{containerSelection:f,computedData$:r.computedData$,containerVisibleComputedLayoutData$:h,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),yu="PieEventTexts",B2=Z(yu,"text"),CF={name:yu,defaultParams:Wp,layerIndex:$p,validator:(t,{validateColumns:e})=>e(t,{renderFn:{toBeTypes:["Function"]},textAttrs:{toBeTypes:["object[]"]},textStyles:{toBeTypes:["object[]"]}})};function qp(t,e){const n=t.selectAll(`text.${B2}`).data(e),r=n.enter().append("text").classed(B2,!0),i=n.merge(r);return i.each((o,a,s)=>{const l=V(s[a]).text(o.text);Object.keys(o.attr).forEach(u=>{l.attr(u,o.attr[u])}),Object.keys(o.style).forEach(u=>{l.style(u,o.style[u])})}),n.exit().remove(),i}function Zp({eventData:t,renderFn:e,textAttrs:n,textStyles:r}){const i=e(t);return(Array.isArray(i)?i:[i]).map((a,s)=>({text:a,attr:n[s],style:r[s]}))}function MF(t,e){const n=new J;let r;const i=e.fullChartParams$.pipe(L(n),R(o=>o.highlightTarget),tt());return Y({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(L(n),G(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>l=>{const u=Zp({eventData:{type:"series",pluginName:t,eventName:"transitionMove",event:a,tween:l,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qp(e.containerSelection,u)}).on("end",(a,s)=>{const l=Zp({eventData:{type:"series",pluginName:t,eventName:"transitionEnd",event:a,tween:1,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qp(e.containerSelection,l),r&&r.unsubscribe(),r=e.event$.subscribe(u=>{const c=Zp({eventData:u,renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});qp(e.containerSelection,c)})})}),()=>{n.next(void 0)}}const LF=wn(CF)(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,{seriesCenterSelection$:o}=pa({selection:t,pluginName:yu,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(L(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const f=V(c[u]),h=n.computedLayoutData$.pipe(L(i),R(d=>d[u]??d[0])),p=n.seriesContainerPosition$.pipe(L(i),R(d=>d[u]??d[0]));a[u]=MF(yu,{containerSelection:f,computedData$:n.computedData$,containerComputedLayoutData$:h,SeriesDataMap$:n.SeriesDataMap$,fullParams$:n.fullParams$,fullChartParams$:n.fullChartParams$,seriesHighlight$:n.seriesHighlight$,seriesContainerPosition$:p,event$:r.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),zi="PieLabels",kF=Z(zi,"label-g"),RF=Z(zi,"line-g"),EF=Z(zi,"text"),N2=2,IF={name:zi,defaultParams:Xp,layerIndex:$p,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},outerRadiusWhileHighlight:{toBeTypes:["number"]},startAngle:{toBeTypes:["number"]},endAngle:{toBeTypes:["number"]},labelCentroid:{toBeTypes:["number"]},labelFn:{toBeTypes:["Function"]},labelColorType:{toBeOption:"ColorType"}})};function BF({pieData:t,arc:e,arcMouseover:n,labelCentroid:r,lineStartCentroid:i,fullParams:o}){return t.map((a,s)=>{const[l,u]=e.centroid(a),[c,f]=n.centroid(a),h=o.labelFn(a.data);return{pieDatum:a,arcIndex:s,arcLabels:h.split(`
225
+ `),lineStartX:l*i,lineStartY:u*i,lineStartMouseoverX:c*i,lineStartMouseoverY:f*i,x:l*r,y:u*r,mouseoverX:c*r,mouseoverY:f*r,textWidth:0,collisionShiftX:0,collisionShiftY:0,quadrant:l>=0&&u<=0?1:l<0&&u<=0?2:l<0&&u>0?3:4}}).filter(a=>a.pieDatum.data.visible)}function NF({labelGSelection:t,data:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=t.selectAll("text").data(e,a=>a.pieDatum.id).join("text").classed(EF,!0).attr("font-weight","bold").attr("text-anchor",a=>a.quadrant==1||a.quadrant==4?"start":"end").style("dominant-baseline",a=>a.quadrant==1||a.quadrant==2?"auto":"hanging").style("cursor",a=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").attr("font-size",r.styles.textSize).attr("x",0).attr("y",0).attr("fill",(a,s)=>Ct({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).each((a,s,l)=>{M$(V(l[s]),{textArr:a.arcLabels,textSizePx:i,quadrant:a.quadrant})});return o.transition().attr("transform",a=>"translate("+a.x+","+a.y+")"),o}function FF(t,e,n){const r=t.nodes(),i=n,o=r.map((a,s)=>{const l=a.getBBox(),u=[e[s].x,e[s].y];return{node:a,x:u[0],y:u[1],width:l.width,height:l.height}});for(let a=0;a<o.length;a++){const s=o[a];for(let l=a+1;l<o.length;l++){const u=o[l];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=u.x+e[l].collisionShiftX,p=u.y+e[l].collisionShiftY;if(!(c+s.width/2<h-u.width/2||c-s.width/2>h+u.width/2||f+s.height/2<p-u.height/2||f-s.height/2>p+u.height/2)){if(e[l].quadrant==2){const d=p>f?-i*2:-i;e[l].collisionShiftY+=d}else if(e[l].quadrant==4){const d=p>f?i:i*2;e[l].collisionShiftY+=d}}}}for(let a=o.length-1;a>=0;a--){const s=o[a];for(let l=a-1;l>=0;l--){const u=o[l];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=u.x+e[l].collisionShiftX,p=u.y+e[l].collisionShiftY;if(!(c+s.width/2<h-u.width/2||c-s.width/2>h+u.width/2||f+s.height/2<p-u.height/2||f-s.height/2>p+u.height/2)){if(e[l].quadrant==1){const d=p>f?-i*2:-i;e[l].collisionShiftY+=d}else if(e[l].quadrant==3){const d=p>f?i:i*2;e[l].collisionShiftY+=d}}}}t.data(e).transition().attr("transform",a=>`translate(${a.x+a.collisionShiftX},${a.y+a.collisionShiftY})`)}function zF({lineGSelection:t,data:e,fullParams:n,fullChartParams:r}){const i=e.filter(a=>a.collisionShiftX||a.collisionShiftY),o=t.selectAll("polyline").data(i,a=>a.pieDatum.id).join("polyline").attr("stroke",a=>Ct({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).attr("stroke-width",1).attr("fill","none").attr("points",a=>[[a.lineStartX,a.lineStartY],[a.lineStartX,a.lineStartY]]);return o.transition().attr("points",a=>{let s=a.x+a.collisionShiftX,l=a.y+a.collisionShiftY;return[[s,l],[a.lineStartX,a.lineStartY]]}),o}function OF({textSelection:t,lineSelection:e,ids:n,fullChartParams:r}){if(t.interrupt("highlight"),e.interrupt("highlight"),!n.length){t.transition("highlight").duration(200).attr("transform",i=>`translate(${i.x+i.collisionShiftX},${i.y+i.collisionShiftY})`).style("opacity",1),e.transition("highlight").duration(200).style("opacity",1);return}t.each((i,o,a)=>{const s=V(a[o]);n.includes(i.pieDatum.id)?s.style("opacity",1).transition("highlight").duration(200).attr("transform",l=>l.collisionShiftX||l.collisionShiftY?`translate(${l.x+l.collisionShiftX},${l.y+l.collisionShiftY})`:`translate(${l.mouseoverX+l.collisionShiftX},${l.mouseoverY+l.collisionShiftY})`):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200).attr("transform",l=>`translate(${l.x+l.collisionShiftX},${l.y+l.collisionShiftY})`)}),e.each((i,o,a)=>{const s=V(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function GF(t,e){const n=new J;e.containerSelection.selectAll("g").remove();const r=e.containerSelection.append("g");r.classed(RF,!0);const i=e.containerSelection.append("g");i.classed(kF,!0);const o=new J,a=new J;let s=[];const l=e.seriesContainerPosition$.pipe(L(n),R(c=>c.width<c.height?c.width:c.height),tt()),u=e.fullParams$.pipe(L(n),R(c=>c.labelCentroid>=N2?N2:c.labelCentroid));return Y({shorterSideWith:l,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,textSizePx:e.textSizePx$,lineStartCentroid:u}).pipe(L(n),G(async c=>c)).subscribe(c=>{const f=cu({axisWidth:c.shorterSideWith,innerRadius:0,outerRadius:c.fullParams.outerRadius,padAngle:0,cornerRadius:0}),h=cu({axisWidth:c.shorterSideWith,innerRadius:0,outerRadius:c.fullParams.outerRadiusWhileHighlight,padAngle:0,cornerRadius:0}),p=E2({data:c.containerVisibleComputedLayoutData,startAngle:c.fullParams.startAngle,endAngle:c.fullParams.endAngle});s=BF({pieData:p,arc:f,arcMouseover:h,labelCentroid:c.fullParams.labelCentroid,lineStartCentroid:c.lineStartCentroid,fullParams:c.fullParams}),r.selectAll("polyline").remove();const d=NF({labelGSelection:i,data:s,fullParams:c.fullParams,fullChartParams:c.fullChartParams,textSizePx:c.textSizePx});setTimeout(()=>{FF(d,s,c.textSizePx);const m=zF({lineGSelection:r,data:s,fullParams:c.fullParams,fullChartParams:c.fullChartParams});a.next(m)},1e3),o.next(d)}),Y({textSelection:o,lineSelection:a,highlight:e.seriesHighlight$.pipe(R(c=>c.map(f=>f.id))),fullChartParams:e.fullChartParams$}).pipe(L(n),G(async c=>c)).subscribe(c=>{OF({textSelection:c.textSelection,lineSelection:c.lineSelection,ids:c.highlight,fullChartParams:c.fullChartParams})}),()=>{n.next(void 0)}}const YF=wn(IF)(({selection:t,observer:e,subject:n})=>{const r=new J,{seriesCenterSelection$:i}=pa({selection:t,pluginName:zi,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(L(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,l,u)=>{const c=V(u[l]),f=e.visibleComputedLayoutData$.pipe(L(r),R(p=>p[l]??p[0])),h=e.seriesContainerPosition$.pipe(L(r),R(p=>p[l]??p[0]));o[l]=GF(zi,{containerSelection:c,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,textSizePx$:e.textSizePx$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),Kp="Rose",WF=Math.PI*2,XF={name:Kp,defaultParams:L2,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},padAngle:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},cornerRadius:{toBeTypes:["number"]},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"},angleIncreaseWhileHighlight:{toBeTypes:["number"]}})};function VF({cornerRadius:t,outerRadius:e,axisWidth:n,maxValue:r,arcScaleType:i,fullParams:o}){const a=n/2*e,s=i==="area"?.5:1,l=kn().domain([0,r]).range([0,a]).exponent(s);return u=>{const c=l(u.prevValue),f=l(u.value),h=nn(c,f);return p=>{const d=h(p);return Ql().innerRadius(0).outerRadius(d).padAngle(o.padAngle).padRadius(d).cornerRadius(t)(u)}}}function UF({pathSelection:t,ids:e,fullParams:n,fullChartParams:r,tweenArc:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>i(o)(1));return}t.each((o,a,s)=>{const l=V(s[a]);e.includes(o.data.id)?l.style("opacity",1).transition("highlight").ease(sr).duration(500).attr("d",u=>i({...u,startAngle:u.startAngle-n.angleIncreaseWhileHighlight,endAngle:u.endAngle+n.angleIncreaseWhileHighlight})(1)):l.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>i(u)(1))})}function HF(t,e){const n=new J,r=Z(t,"path");let i=[];const o=e.seriesContainerPosition$.pipe(L(n),R(p=>p.width<p.height?p.width:p.height),tt()),a=Y({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(L(n),G(async p=>p),R(p=>{const d=WF/p.containerVisibleComputedLayoutData.length;return p.containerVisibleComputedLayoutData.map((m,g)=>({id:m.id,data:m,index:g,value:m.value,startAngle:d*g,endAngle:d*(g+1),padAngle:p.fullParams.padAngle,prevValue:i[g]&&i[g].id===m.id?i[g].value:0}))})),s=e.fullChartParams$.pipe(L(n),R(p=>p.highlightTarget),tt()),l=e.visibleComputedLayoutData$.pipe(R(p=>Math.max(...p.flat().map(d=>d.value))),tt()),u=Y({fullParams:e.fullParams$,axisWidth:o,maxValue:l}).pipe(L(n),G(async p=>p),R(p=>VF({cornerRadius:p.fullParams.cornerRadius,outerRadius:p.fullParams.outerRadius,axisWidth:p.axisWidth,maxValue:p.maxValue,arcScaleType:p.fullParams.arcScaleType,fullParams:p.fullParams}))),c=e.fullChartParams$.pipe(L(n),R(p=>p.transitionDuration),tt()),f=new Du(!1),h=new dt(p=>{Y({pieData:a,tweenArc:u,transitionDuration:c,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(L(n),G(async d=>d)).subscribe(d=>{const m=d.pieData.map((y,b)=>(y.prevValue=i[b]&&i[b].id===y.id?i[b].value:0,y));f.next(!0);const g=e.containerSelection.selectAll("path").data(m,y=>y.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(y,b)=>y.data.color).attr("stroke",(y,b)=>Ct({datum:y.data,colorType:d.fullParams.strokeColorType,fullChartParams:d.fullChartParams})).attr("stroke-width",d.fullParams.strokeWidth);g.interrupt("graphicMove"),g.transition("graphicMove").duration(d.transitionDuration).attrTween("d",d.tweenArc).on("end",()=>{p.next(g),f.next(!1)}),i=Object.assign([],m)})}).pipe(pt(1));return Y({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:s}).pipe(L(n),G(async p=>p)).subscribe(p=>{p.pathSelection.on("mouseover",(d,m)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:p.highlightTarget,datum:m.data,series:p.SeriesDataMap.get(m.data.seriesLabel),seriesIndex:m.data.seriesIndex,seriesLabel:m.data.seriesLabel,event:d,data:p.computedData})}).on("mousemove",(d,m)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:p.highlightTarget,datum:m.data,series:p.SeriesDataMap.get(m.data.seriesLabel),seriesIndex:m.data.seriesIndex,seriesLabel:m.data.seriesLabel,event:d,data:p.computedData})}).on("mouseout",(d,m)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:p.highlightTarget,datum:m.data,series:p.SeriesDataMap.get(m.data.seriesLabel),seriesIndex:m.data.seriesIndex,seriesLabel:m.data.seriesLabel,event:d,data:p.computedData})}).on("click",(d,m)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:p.highlightTarget,datum:m.data,series:p.SeriesDataMap.get(m.data.seriesLabel),seriesIndex:m.data.seriesIndex,seriesLabel:m.data.seriesLabel,event:d,data:p.computedData})})}),Y({pathSelection:h,highlight:e.seriesHighlight$.pipe(R(p=>p.map(d=>d.id))),fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,tweenArc:u,isTransitionMoving:f}).pipe(L(n),G(async p=>p),Rr(p=>!p.isTransitionMoving)).subscribe(p=>{UF({pathSelection:p.pathSelection,ids:p.highlight,fullParams:p.fullParams,fullChartParams:p.fullChartParams,tweenArc:p.tweenArc})}),()=>{n.next(void 0)}}const jF=wn(XF)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,{seriesCenterSelection$:o}=pa({selection:t,pluginName:Kp,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(L(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const f=V(c[u]),h=r.visibleComputedLayoutData$.pipe(L(i),R(d=>JSON.parse(JSON.stringify(d[u]??d[0])))),p=r.seriesContainerPosition$.pipe(L(i),R(d=>JSON.parse(JSON.stringify(d[u]??d[0]))));a[u]=HF(Kp,{containerSelection:f,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:h,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Oi="RoseLabels",qF=Z(Oi,"label-g"),ZF=Z(Oi,"line-g"),KF=Z(Oi,"text"),F2=2,QF={name:Oi,defaultParams:Vp,layerIndex:$p,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},labelCentroid:{toBeTypes:["number"]},labelFn:{toBeTypes:["Function"]},labelColorType:{toBeOption:"ColorType"},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"}})};function JF({pieData:t,labelCentroid:e,arcScaleType:n,maxValue:r,axisWidth:i,outerRadius:o,lineStartCentroid:a,fullParams:s}){const l=i/2*o,u=n==="area"?.5:1,c=kn().domain([0,r]).range([0,l]).exponent(u);return t.map((f,h)=>{const p=c(f.value),d=Ql().innerRadius(0).outerRadius(p).padAngle(0).padRadius(p).cornerRadius(0),[m,g]=d.centroid(f),[y,b]=[m,g],v=s.labelFn(f.data);return{pieDatum:f,arcIndex:h,arcLabels:v.split(`
226
+ `),lineStartX:m*a,lineStartY:g*a,lineStartMouseoverX:y*a,lineStartMouseoverY:b*a,x:m*e,y:g*e,mouseoverX:y*e,mouseoverY:b*e,textWidth:0,collisionShiftX:0,collisionShiftY:0,quadrant:m>=0&&g<=0?1:m<0&&g<=0?2:m<0&&g>0?3:4}}).filter(f=>f.pieDatum.data.visible)}function tz({labelGSelection:t,data:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=t.selectAll("text").data(e,a=>a.pieDatum.id).join("text").classed(KF,!0).attr("font-weight","bold").attr("text-anchor",a=>a.quadrant==1||a.quadrant==4?"start":"end").style("dominant-baseline",a=>a.quadrant==1||a.quadrant==2?"auto":"hanging").style("cursor",a=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").attr("font-size",r.styles.textSize).attr("fill",(a,s)=>Ct({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).each((a,s,l)=>{M$(V(l[s]),{textArr:a.arcLabels,textSizePx:i,quadrant:a.quadrant})});return o.transition().attr("transform",a=>"translate("+a.x+","+a.y+")"),o}function ez(t,e,n){const r=t.nodes(),i=n,o=r.map((a,s)=>{const l=a.getBBox(),u=[e[s].x,e[s].y];return{node:a,x:u[0],y:u[1],width:l.width,height:l.height}});for(let a=0;a<o.length;a++){const s=o[a];for(let l=a+1;l<o.length;l++){const u=o[l];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=u.x+e[l].collisionShiftX,p=u.y+e[l].collisionShiftY;if(!(c+s.width/2<h-u.width/2||c-s.width/2>h+u.width/2||f+s.height/2<p-u.height/2||f-s.height/2>p+u.height/2)){if(e[l].quadrant==2){const d=p>f?-i*2:-i;e[l].collisionShiftY+=d}else if(e[l].quadrant==4){const d=p>f?i:i*2;e[l].collisionShiftY+=d}}}}for(let a=o.length-1;a>=0;a--){const s=o[a];for(let l=a-1;l>=0;l--){const u=o[l];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=u.x+e[l].collisionShiftX,p=u.y+e[l].collisionShiftY;if(!(c+s.width/2<h-u.width/2||c-s.width/2>h+u.width/2||f+s.height/2<p-u.height/2||f-s.height/2>p+u.height/2)){if(e[l].quadrant==1){const d=p>f?-i*2:-i;e[l].collisionShiftY+=d}else if(e[l].quadrant==3){const d=p>f?i:i*2;e[l].collisionShiftY+=d}}}}t.data(e).transition().attr("transform",a=>`translate(${a.x+a.collisionShiftX},${a.y+a.collisionShiftY})`)}function nz({lineGSelection:t,data:e,fullParams:n,fullChartParams:r}){const i=e.filter(a=>a.collisionShiftX||a.collisionShiftY),o=t.selectAll("polyline").data(i,a=>a.pieDatum.id).join("polyline").attr("stroke",a=>Ct({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).attr("stroke-width",1).attr("fill","none").attr("points",a=>[[a.lineStartX,a.lineStartY],[a.lineStartX,a.lineStartY]]);return o.transition().attr("points",a=>{let s=a.x+a.collisionShiftX,l=a.y+a.collisionShiftY;return[[s,l],[a.lineStartX,a.lineStartY]]}),o}function rz({textSelection:t,lineSelection:e,ids:n,fullChartParams:r}){if(t.interrupt("highlight"),e.interrupt("highlight"),!n.length){t.transition("highlight").duration(200).attr("transform",i=>`translate(${i.x+i.collisionShiftX},${i.y+i.collisionShiftY})`).style("opacity",1),e.transition("highlight").duration(200).style("opacity",1);return}t.each((i,o,a)=>{const s=V(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200).attr("transform",l=>`translate(${l.mouseoverX+l.collisionShiftX},${l.mouseoverY+l.collisionShiftY})`):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200).attr("transform",l=>`translate(${l.x+l.collisionShiftX},${l.y+l.collisionShiftY})`)}),e.each((i,o,a)=>{const s=V(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function iz(t,e){const n=new J;e.containerSelection.selectAll("g").remove();const r=e.containerSelection.append("g");r.classed(ZF,!0);const i=e.containerSelection.append("g");i.classed(qF,!0);const o=new J,a=new J;let s=[];const l=e.seriesContainerPosition$.pipe(L(n),R(f=>f.width<f.height?f.width:f.height),tt()),u=e.visibleComputedLayoutData$.pipe(R(f=>Math.max(...f.flat().map(h=>h.value))),tt()),c=e.fullParams$.pipe(L(n),R(f=>f.labelCentroid>=F2?F2:f.labelCentroid));return Y({shorterSideWith:l,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,maxValue:u,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,textSizePx:e.textSizePx$,lineStartCentroid:c}).pipe(L(n),G(async f=>f)).subscribe(f=>{const h=Math.PI*2/f.containerVisibleComputedLayoutData.length,p=f.containerVisibleComputedLayoutData.map((m,g)=>({id:m.id,data:m,index:g,value:m.value,startAngle:h*g,endAngle:h*(g+1),padAngle:0}));s=JF({pieData:p,labelCentroid:f.fullParams.labelCentroid,arcScaleType:f.fullParams.arcScaleType,maxValue:f.maxValue,axisWidth:f.shorterSideWith,outerRadius:f.fullParams.outerRadius,lineStartCentroid:f.lineStartCentroid,fullParams:f.fullParams}),r.selectAll("polyline").remove();const d=tz({labelGSelection:i,data:s,fullParams:f.fullParams,fullChartParams:f.fullChartParams,textSizePx:f.textSizePx});setTimeout(()=>{ez(d,s,f.textSizePx);const m=nz({lineGSelection:r,data:s,fullParams:f.fullParams,fullChartParams:f.fullChartParams});a.next(m)},1e3),o.next(d)}),Y({textSelection:o,lineSelection:a,highlight:e.seriesHighlight$.pipe(R(f=>f.map(h=>h.id))),fullChartParams:e.fullChartParams$}).pipe(L(n),G(async f=>f)).subscribe(f=>{rz({textSelection:f.textSelection,lineSelection:f.lineSelection,ids:f.highlight,fullChartParams:f.fullChartParams})}),()=>{n.next(void 0)}}const oz=wn(QF)(({selection:t,observer:e,subject:n})=>{const r=new J,{seriesCenterSelection$:i}=pa({selection:t,pluginName:Oi,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(L(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,l,u)=>{const c=V(u[l]),f=e.visibleComputedLayoutData$.pipe(L(r),R(p=>JSON.parse(JSON.stringify(p[l]??p[0])))),h=e.seriesContainerPosition$.pipe(L(r),R(p=>JSON.parse(JSON.stringify(p[l]??p[0]))));o[l]=iz(Oi,{containerSelection:c,visibleComputedLayoutData$:e.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,textSizePx$:e.textSizePx$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),z2="SeriesLegend",az=wn({name:z2,defaultParams:k2,layerIndex:ki,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.SeriesDataMap$.pipe(L(i),R(l=>Array.from(l.keys()))),a=n.fullParams$.pipe(L(i),R(l=>{const u=[{listRectWidth:l.listRectWidth,listRectHeight:l.listRectHeight,listRectRadius:l.listRectRadius}];return{...l,labelList:u}})),s=Ei(z2,{rootSelection:e,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),O2="SeriesTooltip",sz=wn({name:O2,defaultParams:Up,layerIndex:Ri,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(O2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),Qp={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value};Qp.sort.toString=()=>"(a, b) => b.value - a.value";const G2={placement:"right-end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},Jp={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e,utils:n})=>{const r=!!t.categoryLabel,i=!!t.datum.label,o=e.textSizePx*.7,a=e.textSizePx/2-o/2,s=r?`<rect width="${o}" height="${o}" x="${a}" y="${a-1}" rx="${o/2}" fill="${t.datum.color}"></rect>
177
227
  <text x="${e.textSizePx*1.5}" font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
178
228
  <tspan>${t.categoryLabel}</tspan>
179
- </text>`:"",s=r?`<tspan>${t.datum.label}</tspan> `:"",u=`<text font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
180
- ${s}<tspan font-weight="bold">${t.datum.value}</tspan>
181
- </text>`;return`${a}
182
- <g ${n?`transform="translate(0, ${e.textSizePx*2})"`:""}>
229
+ </text>`:"",l=i?`<tspan>${t.datum.label}</tspan> `:"",u=`<text font-size="${e.textSizePx}" dominant-baseline="hanging" fill="${e.textColor}">
230
+ ${l}<tspan font-weight="bold">${t.datum.value}</tspan>
231
+ </text>`;return`${s}
232
+ <g ${r?`transform="translate(0, ${e.textSizePx*2})"`:""}>
183
233
  ${u}
184
- </g>`}};mp.renderFn.toString=()=>'(eventData, { styles }) => {\n const hasCategoryLabel = eventData.categoryLabel ? true : false\n const hasDatumLabel = eventData.datum.label ? true : false\n const bulletWidth = styles.textSizePx * 0.7\n const offset = (styles.textSizePx / 2) - (bulletWidth / 2)\n const categorySvg = hasCategoryLabel\n ? `<rect width="${bulletWidth}" height="${bulletWidth}" x="${offset}" y="${offset - 1}" rx="${bulletWidth / 2}" fill="${eventData.datum.color}"></rect>\n <text x="${styles.textSizePx * 1.5}" font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">\n <tspan>${eventData.categoryLabel}</tspan>\n </text>`\n : \'\'\n const datumLabelSvg = hasDatumLabel\n ? `<tspan>${eventData.datum.label}</tspan> `\n : \'\'\n const datumSvg = `<text font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">\n ${datumLabelSvg}<tspan font-weight="bold">${eventData.datum.value}</tspan>\n </text>`\n\n return `${categorySvg}\n <g ${hasCategoryLabel ? `transform="translate(0, ${styles.textSizePx * 2})"` : \'\'}>\n ${datumSvg}\n </g>`\n}';const W2="TreeLegend",EN=Ol({name:W2,defaultParams:U2,layerIndex:Bu,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.CategoryDataMap$.pipe(N(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(N(i),B(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Ou(W2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),gr="TreeMap",H2=ot(gr,"tree"),X2=ot(gr,"tile"),IN={name:gr,defaultParams:gp,layerIndex:ke,validator:(t,{validateColumns:e})=>e(t,{paddingInner:{toBeTypes:["number"]},paddingOuter:{toBeTypes:["number"]},labelColorType:{toBeOption:"ColorType"},squarifyRatio:{toBeTypes:["number"]},sort:{toBeTypes:["Function"]}})};function NN({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${H2}`).data(e,u=>u.data.id).join("g").attr("class",H2);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,l,c)=>{const f=q(c[l]);f.selectAll(`rect.${X2}`).data([u],h=>h.data.id).join("rect").attr("id",h=>h.data.id).attr("class",X2).attr("cursor","pointer").attr("width",h=>h.x1-h.x0).attr("height",h=>h.y1-h.y0).attr("fill",h=>h.data.color).attr("data-name",h=>h.data.label).attr("data-category",h=>h.data.categoryLabel).attr("data-value",h=>h.data.value),f.selectAll("g").data([u]).join("g").each((h,p,d)=>{q(d[p]).selectAll("text").data([h]).join("text").text(m=>m.data.label).attr("dominant-baseline","hanging").attr("x",o).attr("y",o).attr("font-size",r.styles.textSize).each(function(m){const b=q(this),y=m.data.label.split(/\s+/).reverse();let _,x=[];const w=b.attr("x");let $=b.attr("y"),R=0,A=b.text(null).append("tspan").attr("cursor","pointer").attr("fill",kt(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",w).attr("y",$);for(;_=y.pop();)x.push(_),A.text(x.join(" ")),A.node().getComputedTextLength()>m.x1-m.x0-o&&(x.pop(),A.text(x.join(" ")),x=[_],R+=a,A=b.append("tspan").attr("cursor","pointer").attr("fill",kt(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",w).attr("y",$).attr("dy",R+"px").text(_))})})}),s}function BN({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.data.id)?q(o[i]).style("opacity",1):q(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const FN=Ol(IN)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=U({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(N(i),W(async u=>u),B(u=>{const l=nb().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(nh.ratio(u.fullParams.squarifyRatio)),c=eu(u.visibleComputedData).sum(h=>h.value).sort(u.fullParams.sort);return l(c),c.leaves()})),a=U({selection:Ko(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(N(i),W(async u=>u),B(u=>NN({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(N(i),B(u=>u.highlightTarget),tt());return U({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(N(i),W(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:gr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mousemove",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:gr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mouseout",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:gr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("click",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:gr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})})}),U({cellSelection:a,highlight:r.treeHighlight$.pipe(B(u=>u.map(l=>l.id))),fullChartParams:r.fullChartParams$}).pipe(N(i),W(async u=>u)).subscribe(u=>{BN({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}}),j2="TreeTooltip",ON=Ol({name:j2,defaultParams:mp,layerIndex:Fu,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new et,a=zu(j2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}});Z.BarStack=UE,Z.Bars=IE,Z.BarsPN=NE,Z.BarsTriangle=KE,Z.Bubbles=VI,Z.CONTAINER_PLUGIN_PARAMS=zI,Z.DEFAULT_BARS_DIVERGING_PARAMS=q2,Z.DEFAULT_BARS_PARAMS=Xo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=_p,Z.DEFAULT_BAR_STACK_PARAMS=vp,Z.DEFAULT_BUBBLES_PARAMS=k2,Z.DEFAULT_DOTS_PARAMS=xp,Z.DEFAULT_GRID_LEGEND_PARAMS=Sp,Z.DEFAULT_GRID_TOOLTIP_PARAMS=ju,Z.DEFAULT_GRID_ZOOM_PARAMS=wp,Z.DEFAULT_GROUP_AREA_PARAMS=Wu,Z.DEFAULT_GROUP_AXIS_PARAMS=Hu,Z.DEFAULT_LINES_PARAMS=yp,Z.DEFAULT_LINE_AREAS_PARAMS=bp,Z.DEFAULT_MULTI_BARS_PARAMS=f2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=p2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=h2,Z.DEFAULT_MULTI_DOTS_PARAMS=m2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=c2,Z.DEFAULT_MULTI_GRID_TOOLTIP_PARAMS=Vh,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=Xh,Z.DEFAULT_MULTI_LINES_PARAMS=d2,Z.DEFAULT_MULTI_LINE_AREAS_PARAMS=g2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=Yu,Z.DEFAULT_MULTI_VALUE_STACK_AXIS_PARAMS=TI,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=jh,Z.DEFAULT_OVERLAPPING_VALUE_STACK_AXES_PARAMS=y2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=ap,Z.DEFAULT_PIE_LABELS_PARAMS=sp,Z.DEFAULT_PIE_PARAMS=R2,Z.DEFAULT_ROSE_LABELS_PARAMS=up,Z.DEFAULT_ROSE_PARAMS=E2,Z.DEFAULT_SERIES_LEGEND_PARAMS=I2,Z.DEFAULT_SERIES_TOOLTIP_PARAMS=lp,Z.DEFAULT_TREE_LEGEND_PARAMS=U2,Z.DEFAULT_TREE_MAP_PARAMS=gp,Z.DEFAULT_TREE_TOOLTIP_PARAMS=mp,Z.DEFAULT_VALUE_AXIS_PARAMS=Xu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=$p,Z.Dots=eI,Z.GridLegend=rI,Z.GridTooltip=mI,Z.GridZoom=yI,Z.GroupAux=AI,Z.GroupAxis=lI,Z.LineAreas=ME,Z.Lines=_E,Z.MultiBarStack=DI,Z.MultiBars=MI,Z.MultiBarsTriangle=CI,Z.MultiDots=RI,Z.MultiGridLegend=PI,Z.MultiGridTooltip=NI,Z.MultiGroupAxis=EI,Z.MultiLineAreas=kI,Z.MultiLines=LI,Z.MultiValueAxis=II,Z.MultiValueStackAxis=BI,Z.OverlappingValueAxes=FI,Z.OverlappingValueStackAxes=OI,Z.Pie=tN,Z.PieEventTexts=rN,Z.PieLabels=dN,Z.Rose=vN,Z.RoseLabels=LN,Z.SeriesLegend=kN,Z.SeriesTooltip=RN,Z.TOOLTIP_PARAMS=L2,Z.TreeLegend=EN,Z.TreeMap=FN,Z.TreeTooltip=ON,Z.ValueAxis=pI,Z.ValueStackAxis=dI,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
234
+ </g>`}};Jp.renderFn.toString=()=>'(eventData, { styles, utils }) => {\n const hasCategoryLabel = eventData.categoryLabel ? true : false\n const hasDatumLabel = eventData.datum.label ? true : false\n const bulletWidth = styles.textSizePx * 0.7\n const offset = (styles.textSizePx / 2) - (bulletWidth / 2)\n const categorySvg = hasCategoryLabel\n ? `<rect width="${bulletWidth}" height="${bulletWidth}" x="${offset}" y="${offset - 1}" rx="${bulletWidth / 2}" fill="${eventData.datum.color}"></rect>\n <text x="${styles.textSizePx * 1.5}" font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">\n <tspan>${eventData.categoryLabel}</tspan>\n </text>`\n : \'\'\n const datumLabelSvg = hasDatumLabel\n ? `<tspan>${eventData.datum.label}</tspan> `\n : \'\'\n const datumSvg = `<text font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">\n ${datumLabelSvg}<tspan font-weight="bold">${eventData.datum.value}</tspan>\n </text>`\n\n return `${categorySvg}\n <g ${hasCategoryLabel ? `transform="translate(0, ${styles.textSizePx * 2})"` : \'\'}>\n ${datumSvg}\n </g>`\n}';const Y2="TreeLegend",lz=gc({name:Y2,defaultParams:G2,layerIndex:ki,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.fullParams$.pipe(L(i),R(s=>{const l=[{listRectWidth:s.listRectWidth,listRectHeight:s.listRectHeight,listRectRadius:s.listRectRadius}];return{...s,labelList:l}})),a=Ei(Y2,{rootSelection:e,legendLabels$:n.categoryLabels$,fullParams$:o,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),a()}}),Pr="TreeMap",W2=Z(Pr,"tree"),X2=Z(Pr,"tile"),uz={name:Pr,defaultParams:Qp,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{paddingInner:{toBeTypes:["number"]},paddingOuter:{toBeTypes:["number"]},labelColorType:{toBeOption:"ColorType"},squarifyRatio:{toBeTypes:["number"]},sort:{toBeTypes:["Function"]}})};function cz({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${W2}`).data(e,l=>l.data.id).join("g").attr("class",W2);return s.attr("transform",l=>!l.x0||!l.y0?null:`translate(${l.x0},${l.y0})`).each((l,u,c)=>{const f=V(c[u]);f.selectAll(`rect.${X2}`).data([l],h=>h.data.id).join("rect").attr("id",h=>h.data.id).attr("class",X2).attr("cursor","pointer").attr("width",h=>h.x1-h.x0).attr("height",h=>h.y1-h.y0).attr("fill",h=>h.data.color).attr("data-name",h=>h.data.label).attr("data-category",h=>h.data.categoryLabel).attr("data-value",h=>h.data.value),f.selectAll("g").data([l]).join("g").each((h,p,d)=>{V(d[p]).selectAll("text").data([h]).join("text").text(g=>g.data.label).attr("dominant-baseline","hanging").attr("x",o).attr("y",o).attr("font-size",r.styles.textSize).each(function(g){const y=V(this),b=g.data.label.split(/\s+/).reverse();let v,x=[];const _=y.attr("x");let A=y.attr("y"),w=0,P=y.text(null).append("tspan").attr("cursor","pointer").attr("fill",bt(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",_).attr("y",A);for(;v=b.pop();)x.push(v),P.text(x.join(" ")),P.node().getComputedTextLength()>g.x1-g.x0-o&&(x.pop(),P.text(x.join(" ")),x=[v],w+=a,P=y.append("tspan").attr("cursor","pointer").attr("fill",bt(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",_).attr("y",A).attr("dy",w+"px").text(v))})})}),s}function fz({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.data.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const hz=gc(uz)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=Y({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(L(i),G(async l=>l),R(l=>{const u=Db().size([l.layout.width,l.layout.height]).paddingInner(l.fullParams.paddingInner).paddingOuter(l.fullParams.paddingOuter).round(!0).tile(Nh.ratio(l.fullParams.squarifyRatio)),c=Ml(l.visibleComputedData).sum(h=>h.value).sort(l.fullParams.sort);return u(c),c.leaves()})),a=Y({selection:_a(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(L(i),G(async l=>l),R(l=>cz({selection:t,treeData:l.treeData,fullParams:l.fullParams,fullChartParams:l.fullChartParams,textSizePx:l.textSizePx}))),s=r.fullChartParams$.pipe(L(i),R(l=>l.highlightTarget),tt());return Y({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(L(i),G(async l=>l)).subscribe(l=>{l.cellSelection.on("mouseover",(u,c)=>{u.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:Pr,highlightTarget:l.highlightTarget,datum:c.data,category:l.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:u,data:l.computedData})}).on("mousemove",(u,c)=>{u.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:Pr,highlightTarget:l.highlightTarget,datum:c.data,category:l.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:u,data:l.computedData})}).on("mouseout",(u,c)=>{u.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:Pr,highlightTarget:l.highlightTarget,datum:c.data,category:l.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:u,data:l.computedData})}).on("click",(u,c)=>{u.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:Pr,highlightTarget:l.highlightTarget,datum:c.data,category:l.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:u,data:l.computedData})})}),Y({cellSelection:a,highlight:r.treeHighlight$.pipe(R(l=>l.map(u=>u.id))),fullChartParams:r.fullChartParams$}).pipe(L(i),G(async l=>l)).subscribe(l=>{fz({selection:l.cellSelection,ids:l.highlight,fullChartParams:l.fullChartParams})}),()=>{i.next(void 0)}}),V2="TreeTooltip",pz=gc({name:V2,defaultParams:Jp,layerIndex:Ri,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(V2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}});H.Bars=EI,H.BarsPN=II,H.BarsTriangle=ZI,H.Bubbles=_F,H.CONTAINER_PLUGIN_PARAMS=_N,H.DEFAULT_BARS_DIVERGING_PARAMS=U2,H.DEFAULT_BARS_PARAMS=ga,H.DEFAULT_BARS_TRIANGLE_PARAMS=rd,H.DEFAULT_BUBBLES_PARAMS=C2,H.DEFAULT_DOTS_PARAMS=ed,H.DEFAULT_FORCE_DIRECTED_BUBBLES_PARAMS=Fi,H.DEFAULT_FORCE_DIRECTED_PARAMS=Ni,H.DEFAULT_GRID_LEGEND_PARAMS=ad,H.DEFAULT_GRID_TOOLTIP_PARAMS=vu,H.DEFAULT_GRID_ZOOM_PARAMS=od,H.DEFAULT_GROUP_AUX_PARAMS=bu,H.DEFAULT_GROUP_AXIS_PARAMS=xu,H.DEFAULT_LINES_PARAMS=Dr,H.DEFAULT_LINE_AREAS_PARAMS=td,H.DEFAULT_MULTI_BARS_PARAMS=F$,H.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=O$,H.DEFAULT_MULTI_DOTS_PARAMS=W$,H.DEFAULT_MULTI_GRID_LEGEND_PARAMS=N$,H.DEFAULT_MULTI_GRID_TOOLTIP_PARAMS=Pp,H.DEFAULT_MULTI_GROUP_AXIS_PARAMS=Tp,H.DEFAULT_MULTI_LINES_PARAMS=G$,H.DEFAULT_MULTI_LINE_AREAS_PARAMS=Y$,H.DEFAULT_MULTI_STACKED_BAR_PARAMS=z$,H.DEFAULT_MULTI_STACKED_VALUE_AXIS_PARAMS=TB,H.DEFAULT_MULTI_VALUE_AXIS_PARAMS=pu,H.DEFAULT_MULTI_VALUE_LEGEND_PARAMS=i2,H.DEFAULT_MULTI_VALUE_TOOLTIP_PARAMS=zp,H.DEFAULT_OVERLAPPING_STACKED_VALUE_AXES_PARAMS=X$,H.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=Ap,H.DEFAULT_PIE_EVENT_TEXTS_PARAMS=Wp,H.DEFAULT_PIE_LABELS_PARAMS=Xp,H.DEFAULT_PIE_PARAMS=M2,H.DEFAULT_RELATIONSHIP_LEGEND_PARAMS=h2,H.DEFAULT_RELATIONSHIP_TOOLTIP_PARAMS=Yp,H.DEFAULT_ROSE_LABELS_PARAMS=Vp,H.DEFAULT_ROSE_PARAMS=L2,H.DEFAULT_SCATTER_BUBBLES_PARAMS=a2,H.DEFAULT_SCATTER_PARAMS=o2,H.DEFAULT_SERIES_LEGEND_PARAMS=k2,H.DEFAULT_SERIES_TOOLTIP_PARAMS=Up,H.DEFAULT_STACKED_BAR_PARAMS=nd,H.DEFAULT_STACKED_VALUE_AXIS_PARAMS=id,H.DEFAULT_TREE_LEGEND_PARAMS=G2,H.DEFAULT_TREE_MAP_PARAMS=Qp,H.DEFAULT_TREE_TOOLTIP_PARAMS=Jp,H.DEFAULT_VALUE_AXIS_PARAMS=ma,H.DEFAULT_X_Y_AUX_PARAMS=du,H.DEFAULT_X_Y_AXES_PARAMS=gu,H.DEFAULT_X_Y_ZOOM_PARAMS=s2,H.Dots=tB,H.ForceDirected=XN,H.ForceDirectedBubbles=fF,H.GridLegend=rB,H.GridTooltip=gB,H.GridZoom=mB,H.GroupAux=SB,H.GroupAxis=lB,H.LineAreas=PI,H.Lines=vI,H.MultiBars=PB,H.MultiBarsTriangle=CB,H.MultiDots=kB,H.MultiGridLegend=AB,H.MultiGridTooltip=IB,H.MultiGroupAxis=RB,H.MultiLineAreas=LB,H.MultiLines=MB,H.MultiStackedBar=DB,H.MultiStackedValueAxis=BB,H.MultiValueAxis=EB,H.MultiValueLegend=zB,H.MultiValueTooltip=OB,H.OverlappingStackedValueAxes=FB,H.OverlappingValueAxes=NB,H.Pie=DF,H.PieEventTexts=LF,H.PieLabels=YF,H.RelationshipLegend=hF,H.RelationshipTooltip=pF,H.Rose=jF,H.RoseLabels=oz,H.Scatter=UB,H.ScatterBubbles=QB,H.SeriesLegend=az,H.SeriesTooltip=sz,H.StackedBar=YI,H.StackedValueAxis=pB,H.TOOLTIP_PARAMS=f2,H.TreeLegend=lz,H.TreeMap=hz,H.TreeTooltip=pz,H.ValueAxis=hB,H.XYAux=aN,H.XYAxes=vN,H.XYZoom=$N,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});