@orbcharts/plugins-basic 3.0.0-beta.12 → 3.0.0-beta.13

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 (99) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-plugins-basic.es.js +38 -38
  3. package/dist/orbcharts-plugins-basic.umd.js +9 -9
  4. package/lib/core-types.ts +7 -7
  5. package/lib/core.ts +6 -6
  6. package/lib/plugins-basic-types.ts +6 -6
  7. package/package.json +44 -44
  8. package/src/base/BaseBars.ts +765 -765
  9. package/src/base/BaseBarsTriangle.ts +676 -676
  10. package/src/base/BaseDots.ts +464 -464
  11. package/src/base/BaseGroupAxis.ts +679 -679
  12. package/src/base/BaseLegend.ts +684 -684
  13. package/src/base/BaseLineAreas.ts +629 -629
  14. package/src/base/BaseLines.ts +706 -706
  15. package/src/base/BaseStackedBar.ts +782 -782
  16. package/src/base/BaseTooltip.ts +385 -385
  17. package/src/base/BaseValueAxis.ts +583 -583
  18. package/src/base/types.ts +2 -2
  19. package/src/const.ts +30 -30
  20. package/src/grid/defaults.ts +246 -246
  21. package/src/grid/gridObservables.ts +554 -554
  22. package/src/grid/index.ts +16 -16
  23. package/src/grid/plugins/Bars.ts +69 -69
  24. package/src/grid/plugins/BarsPN.ts +66 -66
  25. package/src/grid/plugins/BarsTriangle.ts +73 -73
  26. package/src/grid/plugins/Dots.ts +68 -68
  27. package/src/grid/plugins/GridLegend.ts +107 -107
  28. package/src/grid/plugins/GridTooltip.ts +66 -66
  29. package/src/grid/plugins/GridZoom.ts +218 -218
  30. package/src/grid/plugins/GroupAux.ts +1103 -1103
  31. package/src/grid/plugins/GroupAxis.ts +97 -97
  32. package/src/grid/plugins/LineAreas.ts +65 -65
  33. package/src/grid/plugins/Lines.ts +59 -59
  34. package/src/grid/plugins/StackedBar.ts +64 -64
  35. package/src/grid/plugins/StackedValueAxis.ts +96 -96
  36. package/src/grid/plugins/ValueAxis.ts +94 -94
  37. package/src/index.ts +6 -6
  38. package/src/multiGrid/defaults.ts +224 -224
  39. package/src/multiGrid/index.ts +14 -14
  40. package/src/multiGrid/multiGridObservables.ts +49 -49
  41. package/src/multiGrid/plugins/MultiBars.ts +108 -108
  42. package/src/multiGrid/plugins/MultiBarsTriangle.ts +114 -114
  43. package/src/multiGrid/plugins/MultiDots.ts +102 -102
  44. package/src/multiGrid/plugins/MultiGridLegend.ts +159 -159
  45. package/src/multiGrid/plugins/MultiGridTooltip.ts +66 -66
  46. package/src/multiGrid/plugins/MultiGroupAxis.ts +137 -137
  47. package/src/multiGrid/plugins/MultiLineAreas.ts +107 -107
  48. package/src/multiGrid/plugins/MultiLines.ts +101 -101
  49. package/src/multiGrid/plugins/MultiStackedBar.ts +106 -106
  50. package/src/multiGrid/plugins/MultiStackedValueAxis.ts +134 -134
  51. package/src/multiGrid/plugins/MultiValueAxis.ts +134 -134
  52. package/src/multiGrid/plugins/OverlappingStackedValueAxes.ts +299 -299
  53. package/src/multiGrid/plugins/OverlappingValueAxes.ts +300 -300
  54. package/src/multiValue/defaults.ts +166 -166
  55. package/src/multiValue/index.ts +8 -8
  56. package/src/multiValue/multiValueObservables.ts +297 -297
  57. package/src/multiValue/plugins/MultiValueLegend.ts +107 -107
  58. package/src/multiValue/plugins/MultiValueTooltip.ts +66 -66
  59. package/src/multiValue/plugins/Scatter.ts +426 -426
  60. package/src/multiValue/plugins/ScatterBubbles.ts +554 -554
  61. package/src/multiValue/plugins/XYAux.ts +681 -681
  62. package/src/multiValue/plugins/XYAxes.ts +684 -684
  63. package/src/multiValue/plugins/XYZoom.ts +299 -299
  64. package/src/noneData/defaults.ts +102 -102
  65. package/src/noneData/index.ts +3 -3
  66. package/src/noneData/plugins/Container.ts +27 -27
  67. package/src/noneData/plugins/Tooltip.ts +373 -373
  68. package/src/relationship/defaults.ts +196 -196
  69. package/src/relationship/index.ts +5 -5
  70. package/src/relationship/plugins/ForceDirected.ts +1168 -1168
  71. package/src/relationship/plugins/ForceDirectedBubbles.ts +1395 -1395
  72. package/src/relationship/plugins/RelationshipLegend.ts +100 -100
  73. package/src/relationship/plugins/RelationshipTooltip.ts +66 -66
  74. package/src/relationship/relationshipObservables.ts +49 -49
  75. package/src/series/defaults.ts +207 -207
  76. package/src/series/index.ts +9 -9
  77. package/src/series/plugins/Bubbles.ts +606 -606
  78. package/src/series/plugins/Pie.ts +623 -623
  79. package/src/series/plugins/PieEventTexts.ts +284 -284
  80. package/src/series/plugins/PieLabels.ts +640 -640
  81. package/src/series/plugins/Rose.ts +516 -516
  82. package/src/series/plugins/RoseLabels.ts +600 -600
  83. package/src/series/plugins/SeriesLegend.ts +107 -107
  84. package/src/series/plugins/SeriesTooltip.ts +66 -66
  85. package/src/series/seriesObservables.ts +145 -145
  86. package/src/series/seriesUtils.ts +51 -51
  87. package/src/tree/defaults.ts +78 -78
  88. package/src/tree/index.ts +4 -4
  89. package/src/tree/plugins/TreeLegend.ts +100 -100
  90. package/src/tree/plugins/TreeMap.ts +333 -333
  91. package/src/tree/plugins/TreeTooltip.ts +66 -66
  92. package/src/utils/commonUtils.ts +21 -21
  93. package/src/utils/d3Graphics.ts +174 -174
  94. package/src/utils/d3Utils.ts +74 -74
  95. package/src/utils/observables.ts +14 -14
  96. package/src/utils/orbchartsUtils.ts +115 -115
  97. package/tsconfig.base.json +13 -13
  98. package/tsconfig.json +2 -2
  99. package/vite.config.js +22 -22
@@ -1,4 +1,4 @@
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},ed={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},td={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:e=>e,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:e=>e,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:e=>e,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:(e,{styles:t,utils:n})=>{const r=t.textSizePx*.7,i=t.textSizePx/2-r/2,o=`<g><text dominant-baseline="hanging" font-size="${t.textSizePx}">${e.groupLabel}</text></g>`,a=e.groups.reduce((c,f)=>{const h=`${f.seriesLabel}${f.value}`;return h.length>c.length?h:c},""),l=n.measureTextWidth(a,t.textSizePx)+t.textSizePx*2,u=e.groups.map((c,f)=>{const h=f*t.textSizePx*1.5,p=c.id===(e.datum&&e.datum.id);return`<g transform="translate(0, ${t.textSizePx*2})">
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},ed={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},td={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:e=>e,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:e=>e,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:e=>e,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:(e,{styles:t,utils:n})=>{const r=t.textSizePx*.7,i=t.textSizePx/2-r/2,o=`<g><text dominant-baseline="hanging" font-size="${t.textSizePx}">${e.groupLabel}</text></g>`,a=e.group.reduce((c,f)=>{const h=`${f.seriesLabel}${f.value}`;return h.length>c.length?h:c},""),l=n.measureTextWidth(a,t.textSizePx)+t.textSizePx*2,u=e.group.map((c,f)=>{const h=f*t.textSizePx*1.5,p=c.id===(e.datum&&e.datum.id);return`<g transform="translate(0, ${t.textSizePx*2})">
2
2
  <rect width="${r}" height="${r}" x="${i}" y="${h+i}" rx="${r/2}" fill="${c.color}"></rect>
3
3
  <text x="${t.textSizePx*1.5}" y="${h}" font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
4
4
  <tspan font-weight="${p?"bold":""}">${c.seriesLabel}</tspan>
@@ -10,13 +10,13 @@ ${u}`}};vu.renderFn.toString=()=>`(eventData, { styles, utils }) => {
10
10
  const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
11
11
 
12
12
  const titleSvg = \`<g><text dominant-baseline="hanging" font-size="\${styles.textSizePx}">\${eventData.groupLabel}</text></g>\`
13
- const maxLengthText = eventData.groups.reduce((acc, group) => {
13
+ const maxLengthText = eventData.group.reduce((acc, group) => {
14
14
  const text = \`\${group.seriesLabel}\${group.value}\`
15
15
  return text.length > acc.length ? text : acc
16
16
  }, '')
17
17
  const maxTextWidth = utils.measureTextWidth(maxLengthText, styles.textSizePx)
18
18
  const lineEndX = maxTextWidth + styles.textSizePx * 2
19
- const contentSvg = eventData.groups
19
+ const contentSvg = eventData.group
20
20
  .map((group, i) => {
21
21
  const y = i * styles.textSizePx * 1.5
22
22
  const isHighlight = group.id === (eventData.datum && eventData.datum.id)
@@ -43,19 +43,19 @@ ${u}`}};vu.renderFn.toString=()=>`(eventData, { styles, utils }) => {
43
43
  \r]`),n=e.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(e)})}function a(f,h){return h==null&&(h=Cy(f)),[h.map(c).join(e)].concat(o(f,h)).join(`
44
44
  `)}function s(f,h){return h==null&&(h=Cy(f)),o(f,h).join(`
45
45
  `)}function l(f){return f.map(u).join(`
46
- `)}function u(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?C6(f):t.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(e){for(var t in e){var n=e[t].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;e[t]=n}return e}const W6=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function X6(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function V6(e,t){return fetch(e,t).then(X6)}function U6(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function H6(e,t){return fetch(e,t).then(U6)}function j6(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Gs(e,t){return fetch(e,t).then(j6)}function ky(e){return function(t,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Gs(t,n).then(function(i){return e(i,r)})}}function q6(e,t,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Os(e);return Gs(t,n).then(function(o){return i.parse(o,r)})}var Z6=ky(My),K6=ky(Ly);function Q6(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function J6(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function e8(e,t){return fetch(e,t).then(J6)}function Rf(e){return(t,n)=>Gs(t,n).then(r=>new DOMParser().parseFromString(r,e))}const t8=Rf("application/xml");var n8=Rf("text/html"),r8=Rf("image/svg+xml");function Ef(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=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-e)*r,u=(u/a-t)*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?(e=+o,i):e},i.y=function(o){return arguments.length?(t=+o,i):t},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function i8(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return Ry(this.cover(t,n),t,n,e)}function Ry(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._y0,u=e._x1,c=e._y1,f,h,p,d,m,g,y,b;if(!o)return e._root=a,e;for(;o.length;)if((m=t>=(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,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&n===d)return a.next=o,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(m=t>=(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,e}function o8(e){var t,n,r=e.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,t=e[n]))||isNaN(o=+this._y.call(null,t))||(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],e[n]);return this}function a8(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n||1,s=this._root,l,u;n>e||e>=i||r>t||t>=o;)switch(u=(t<r)<<1|e<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 e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function l8(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function u8(e,t,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 qe(p,i,o,c,f)),n==null?n=1/0:(i=e-n,o=t-n,c=e+n,f=t+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 qe(p[3],g,y,l,u),new qe(p[2],a,y,g,u),new qe(p[1],g,s,l,y),new qe(p[0],a,s,g,y)),(m=(t>=y)<<1|e>=g)&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-m],h[h.length-1-m]=d)}else{var b=e-+this._x.call(null,p.data),v=t-+this._y.call(null,p.data),x=b*b+v*v;if(x<n){var _=Math.sqrt(n=x);i=e-_,o=t-_,c=e+_,f=t+_,r=p.data}}return r}function c8(e){if(isNaN(c=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,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,t=n,!(n=n[g=m<<1|d]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,y=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[g]=o:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function f8(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function h8(){return this._root}function p8(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function d8(e){var t=[],n,r=this._root,i,o,a,s,l;for(r&&t.push(new qe(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(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])&&t.push(new qe(i,u,c,s,l)),(i=r[2])&&t.push(new qe(i,o,c,u,l)),(i=r[1])&&t.push(new qe(i,u,a,s,c)),(i=r[0])&&t.push(new qe(i,o,a,u,c))}return this}function g8(e){var t=[],n=[],r;for(this._root&&t.push(new qe(this._root,this._x0,this._y0,this._x1,this._y1));r=t.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])&&t.push(new qe(o,a,s,c,f)),(o=i[1])&&t.push(new qe(o,c,s,l,f)),(o=i[2])&&t.push(new qe(o,a,f,c,u)),(o=i[3])&&t.push(new qe(o,c,f,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function m8(e){return e[0]}function y8(e){return arguments.length?(this._x=e,this):this._x}function b8(e){return e[1]}function x8(e){return arguments.length?(this._y=e,this):this._y}function Ys(e,t,n){var r=new If(t??m8,n??b8,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function If(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Ey(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Ze=Ys.prototype=If.prototype;Ze.copy=function(){var e=new If(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Ey(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=Ey(r));return e},Ze.add=i8,Ze.addAll=o8,Ze.cover=a8,Ze.data=s8,Ze.extent=l8,Ze.find=u8,Ze.remove=c8,Ze.removeAll=f8,Ze.root=h8,Ze.size=p8,Ze.visit=d8,Ze.visitAfter=g8,Ze.x=y8,Ze.y=x8;function Re(e){return function(){return e}}function Cn(e){return(e()-.5)*1e-6}function v8(e){return e.x+e.vx}function $8(e){return e.y+e.vy}function Ws(e){var t,n,r,i=1,o=1;typeof e!="function"&&(e=Re(e==null?1:+e));function a(){for(var u,c=t.length,f,h,p,d,m,g,y=0;y<o;++y)for(f=Ys(t,v8,$8).visitAfter(s),u=0;u<c;++u)h=t[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(t){var u,c=t.length,f;for(n=new Array(c),u=0;u<c;++u)f=t[u],n[f.index]=+e(f,u,t)}}return a.initialize=function(u,c){t=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?(e=typeof u=="function"?u:Re(+u),l(),a):e},a}function _8(e){return e.index}function Iy(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Bf(e){var t=_8,n=f,r,i=Re(30),o,a,s,l,u,c=1;e==null&&(e=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function h(g){for(var y=0,b=e.length;y<c;++y)for(var v=0,x,_,A,w,P,C,B;v<b;++v)x=e[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=e.length,v=new Map(a.map((_,A)=>[t(_,A,a),_])),x;for(g=0,s=new Array(y);g<b;++g)x=e[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=e[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=e.length;g<y;++g)r[g]=+n(e[g],g,e)}function m(){if(a)for(var g=0,y=e.length;g<y;++g)o[g]=+i(e[g],g,e)}return h.initialize=function(g,y){a=g,u=y,p()},h.links=function(g){return arguments.length?(e=g,p(),h):e},h.id=function(g){return arguments.length?(t=g,h):t},h.iterations=function(g){return arguments.length?(c=+g,h):c},h.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Re(+g),d(),h):n},h.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Re(+g),m(),h):i},h}const w8=1664525,S8=1013904223,By=4294967296;function T8(){let e=1;return()=>(e=(w8*e+S8)%By)/By}function A8(e){return e.x}function P8(e){return e.y}var D8=10,C8=Math.PI*(3-Math.sqrt(5));function Xs(e){var t,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();e==null&&(e=[]);function f(){h(),u.call("tick",t),n<r&&(l.stop(),u.call("end",t))}function h(m){var g,y=e.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=e[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 t}function p(){for(var m=0,g=e.length,y;m<g;++m){if(y=e[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(e,c),m}return p(),t={tick:h,restart:function(){return l.restart(f),t},stop:function(){return l.stop(),t},nodes:function(m){return arguments.length?(e=m,p(),s.forEach(d),t):e},alpha:function(m){return arguments.length?(n=+m,t):n},alphaMin:function(m){return arguments.length?(r=+m,t):r},alphaDecay:function(m){return arguments.length?(i=+m,t):+i},alphaTarget:function(m){return arguments.length?(o=+m,t):o},velocityDecay:function(m){return arguments.length?(a=1-m,t):1-a},randomSource:function(m){return arguments.length?(c=m,s.forEach(d),t):c},force:function(m,g){return arguments.length>1?(g==null?s.delete(m):s.set(m,d(g)),t):s.get(m)},find:function(m,g,y){var b=0,v=e.length,x,_,A,w,P;for(y==null?y=1/0:y*=y,b=0;b<v;++b)w=e[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),t):u.on(m)}}}function Vs(){var e,t,n,r,i=Re(-30),o,a=1,s=1/0,l=.81;function u(p){var d,m=e.length,g=Ys(e,A8,P8).visitAfter(f);for(r=p,d=0;d<m;++d)t=e[d],g.visit(h)}function c(){if(e){var p,d=e.length,m;for(o=new Array(d),p=0;p<d;++p)m=e[p],o[m.index]=+i(m,p,e)}}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-t.x,b=p.y-t.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)),t.vx+=y*p.value*r/x,t.vy+=b*p.value*r/x),!0;if(p.length||x>=s)return;(p.data!==t||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!==t&&(v=o[p.data.index]*r/x,t.vx+=y*v,t.vy+=b*v);while(p=p.next)}return u.initialize=function(p,d){e=p,n=d,c()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Re(+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(e,t,n){var r,i=Re(.1),o,a;typeof e!="function"&&(e=Re(+e)),t==null&&(t=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-t||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]=+e(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:Re(+u),l(),s):i},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Re(+u),l(),s):e},s.x=function(u){return arguments.length?(t=+u,s):t},s.y=function(u){return arguments.length?(n=+u,s):n},s}function Ny(e){var t=Re(.1),n,r,i;typeof e!="function"&&(e=Re(e==null?0:+e));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]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Re(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Re(+s),a(),o):e},o}function Fy(e){var t=Re(.1),n,r,i;typeof e!="function"&&(e=Re(e==null?0:+e));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]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Re(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Re(+s),a(),o):e},o}function L8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Us(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function pi(e){return e=Us(Math.abs(e)),e?e[1]:NaN}function k8(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[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=e[a=(a+1)%e.length];return o.reverse().join(t)}}function R8(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var E8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function di(e){if(!(t=E8.exec(e)))throw new Error("invalid format: "+e);var t;return new Hs({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}di.prototype=Hs.prototype;function Hs(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.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(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var zy;function B8(e,t){var n=Us(e,t);if(!n)return e+"";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(e,Math.max(0,t+o-1))[0]}function Oy(e,t){var n=Us(e,t);if(!n)return e+"";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={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:L8,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Oy(e*100,t),r:Oy,s:B8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Yy(e){return e}var Wy=Array.prototype.map,Xy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vy(e){var t=e.grouping===void 0||e.thousands===void 0?Yy:k8(Wy.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Yy:R8(Wy.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.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&&($=t($,1/0));var z=k.length+$.length+M.length,I=z<y?new Array(y-z+1).join(h):"";switch(b&&g&&($=t(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(e){return js=Vy(e),Mo=js.format,Nf=js.formatPrefix,js}function Hy(e){return Math.max(0,-pi(Math.abs(e)))}function jy(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pi(t)/3)))*3-pi(Math.abs(e)))}function qy(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pi(t)-pi(e))+1}var oe=1e-6,Lo=1e-12,he=Math.PI,Ae=he/2,qs=he/4,Ke=he*2,ve=180/he,ae=he/180,ge=Math.abs,gi=Math.atan,Qe=Math.atan2,re=Math.cos,Zs=Math.ceil,Zy=Math.exp,Ff=Math.hypot,Ks=Math.log,zf=Math.pow,te=Math.sin,$t=Math.sign||function(e){return e>0?1:e<0?-1:0},Ne=Math.sqrt,Of=Math.tan;function Ky(e){return e>1?0:e<-1?he:Math.acos(e)}function Je(e){return e>1?Ae:e<-1?-Ae:Math.asin(e)}function Qy(e){return(e=te(e/2))*e}function Se(){}function Qs(e,t){e&&e1.hasOwnProperty(e.type)&&e1[e.type](e,t)}var Jy={Feature:function(e,t){Qs(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Qs(n[r].geometry,t)}},e1={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Gf(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Gf(n[r],t,0)},Polygon:function(e,t){t1(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)t1(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Qs(n[r],t)}};function Gf(e,t,n){var r=-1,i=e.length-n,o;for(t.lineStart();++r<i;)o=e[r],t.point(o[0],o[1],o[2]);t.lineEnd()}function t1(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Gf(e[n],t,1);t.polygonEnd()}function Bt(e,t){e&&Jy.hasOwnProperty(e.type)?Jy[e.type](e,t):Qs(e,t)}var Js=new ke,el=new ke,n1,r1,Yf,Wf,Xf,Ht={point:Se,lineStart:Se,lineEnd:Se,polygonStart:function(){Js=new ke,Ht.lineStart=N8,Ht.lineEnd=F8},polygonEnd:function(){var e=+Js;el.add(e<0?Ke+e:e),this.lineStart=this.lineEnd=this.point=Se},sphere:function(){el.add(Ke)}};function N8(){Ht.point=z8}function F8(){i1(n1,r1)}function z8(e,t){Ht.point=i1,n1=e,r1=t,e*=ae,t*=ae,Yf=e,Wf=re(t=t/2+qs),Xf=te(t)}function i1(e,t){e*=ae,t*=ae,t=t/2+qs;var n=e-Yf,r=n>=0?1:-1,i=r*n,o=re(t),a=te(t),s=Xf*a,l=Wf*o+s*re(i),u=s*r*te(i);Js.add(Qe(u,l)),Yf=e,Wf=o,Xf=a}function O8(e){return el=new ke,Bt(e,Ht),el*2}function tl(e){return[Qe(e[1],e[0]),Je(e[2])]}function dr(e){var t=e[0],n=e[1],r=re(n);return[r*re(t),r*te(t),te(n)]}function nl(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function mi(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Vf(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function rl(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function il(e){var t=Ne(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Te,ut,Pe,mt,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 ke,Ht.polygonStart()},polygonEnd:function(){Ht.polygonEnd(),un.point=Uf,un.lineStart=l1,un.lineEnd=u1,Js<0?(Te=-(Pe=180),ut=-(mt=90)):ko>oe?mt=90:ko<-oe&&(ut=-90),ln[0]=Te,ln[1]=Pe},sphere:function(){Te=-(Pe=180),ut=-(mt=90)}};function Uf(e,t){Mn.push(ln=[Te=e,Pe=e]),t<ut&&(ut=t),t>mt&&(mt=t)}function s1(e,t){var n=dr([e*ae,t*ae]);if(yi){var r=mi(yi,n),i=[r[1],-r[0],0],o=mi(i,r);il(o),o=tl(o);var a=e-gr,s=a>0?1:-1,l=o[0]*ve*s,u,c=ge(a)>180;c^(s*gr<l&&l<s*e)?(u=o[1]*ve,u>mt&&(mt=u)):(l=(l+360)%360-180,c^(s*gr<l&&l<s*e)?(u=-o[1]*ve,u<ut&&(ut=u)):(t<ut&&(ut=t),t>mt&&(mt=t))),c?e<gr?yt(Te,e)>yt(Te,Pe)&&(Pe=e):yt(e,Pe)>yt(Te,Pe)&&(Te=e):Pe>=Te?(e<Te&&(Te=e),e>Pe&&(Pe=e)):e>gr?yt(Te,e)>yt(Te,Pe)&&(Pe=e):yt(e,Pe)>yt(Te,Pe)&&(Te=e)}else Mn.push(ln=[Te=e,Pe=e]);t<ut&&(ut=t),t>mt&&(mt=t),yi=n,gr=e}function l1(){un.point=s1}function u1(){ln[0]=Te,ln[1]=Pe,un.point=Uf,yi=null}function c1(e,t){if(yi){var n=e-gr;ko.add(ge(n)>180?n+(n>0?360:-360):n)}else o1=e,a1=t;Ht.point(e,t),s1(e,t)}function G8(){Ht.lineStart()}function Y8(){c1(o1,a1),Ht.lineEnd(),ge(ko)>oe&&(Te=-(Pe=180)),ln[0]=Te,ln[1]=Pe,yi=null}function yt(e,t){return(t-=e)<0?t+360:t}function W8(e,t){return e[0]-t[0]}function f1(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function X8(e){var t,n,r,i,o,a,s;if(mt=Pe=-(Te=ut=1/0),Mn=[],Bt(e,un),n=Mn.length){for(Mn.sort(W8),t=1,r=Mn[0],o=[r];t<n;++t)i=Mn[t],f1(r,i[0])||f1(r,i[1])?(yt(r[0],i[1])>yt(r[0],r[1])&&(r[1]=i[1]),yt(i[0],r[1])>yt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,t=0,r=o[n];t<=n;r=i,++t)i=o[t],(s=yt(r[1],i[0]))>a&&(a=s,Te=i[0],Pe=r[1])}return Mn=ln=null,Te===1/0||ut===1/0?[[NaN,NaN],[NaN,NaN]]:[[Te,ut],[Pe,mt]]}var Ro,ol,al,sl,ll,ul,cl,fl,Hf,jf,qf,h1,p1,et,tt,nt,Nt={sphere:Se,point:Zf,lineStart:d1,lineEnd:g1,polygonStart:function(){Nt.lineStart=H8,Nt.lineEnd=j8},polygonEnd:function(){Nt.lineStart=d1,Nt.lineEnd=g1}};function Zf(e,t){e*=ae,t*=ae;var n=re(t);Eo(n*re(e),n*te(e),te(t))}function Eo(e,t,n){++Ro,al+=(e-al)/Ro,sl+=(t-sl)/Ro,ll+=(n-ll)/Ro}function d1(){Nt.point=V8}function V8(e,t){e*=ae,t*=ae;var n=re(t);et=n*re(e),tt=n*te(e),nt=te(t),Nt.point=U8,Eo(et,tt,nt)}function U8(e,t){e*=ae,t*=ae;var n=re(t),r=n*re(e),i=n*te(e),o=te(t),a=Qe(Ne((a=tt*o-nt*i)*a+(a=nt*r-et*o)*a+(a=et*i-tt*r)*a),et*r+tt*i+nt*o);ol+=a,ul+=a*(et+(et=r)),cl+=a*(tt+(tt=i)),fl+=a*(nt+(nt=o)),Eo(et,tt,nt)}function g1(){Nt.point=Zf}function H8(){Nt.point=q8}function j8(){m1(h1,p1),Nt.point=Zf}function q8(e,t){h1=e,p1=t,e*=ae,t*=ae,Nt.point=m1;var n=re(t);et=n*re(e),tt=n*te(e),nt=te(t),Eo(et,tt,nt)}function m1(e,t){e*=ae,t*=ae;var n=re(t),r=n*re(e),i=n*te(e),o=te(t),a=tt*o-nt*i,s=nt*r-et*o,l=et*i-tt*r,u=Ff(a,s,l),c=Je(u),f=u&&-c/u;Hf.add(f*a),jf.add(f*s),qf.add(f*l),ol+=c,ul+=c*(et+(et=r)),cl+=c*(tt+(tt=i)),fl+=c*(nt+(nt=o)),Eo(et,tt,nt)}function Z8(e){Ro=ol=al=sl=ll=ul=cl=fl=0,Hf=new ke,jf=new ke,qf=new ke,Bt(e,Nt);var t=+Hf,n=+jf,r=+qf,i=Ff(t,n,r);return i<Lo&&(t=ul,n=cl,r=fl,ol<oe&&(t=al,n=sl,r=ll),i=Ff(t,n,r),i<Lo)?[NaN,NaN]:[Qe(n,t)*ve,Je(r/i)*ve]}function bi(e){return function(){return e}}function Kf(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function Qf(e,t){return ge(e)>he&&(e-=Math.round(e/Ke)*Ke),[e,t]}Qf.invert=Qf;function Jf(e,t,n){return(e%=Ke)?t||n?Kf(b1(e),x1(t,n)):b1(e):t||n?x1(t,n):Qf}function y1(e){return function(t,n){return t+=e,ge(t)>he&&(t-=Math.round(t/Ke)*Ke),[t,n]}}function b1(e){var t=y1(e);return t.invert=y1(-e),t}function x1(e,t){var n=re(e),r=te(e),i=re(t),o=te(t);function a(s,l){var u=re(l),c=re(s)*u,f=te(s)*u,h=te(l),p=h*n+c*r;return[Qe(f*i-p*o,c*n-h*r),Je(p*i+f*o)]}return a.invert=function(s,l){var u=re(l),c=re(s)*u,f=te(s)*u,h=te(l),p=h*i-f*o;return[Qe(f*i+h*o,c*n+p*r),Je(p*n-c*r)]},a}function v1(e){e=Jf(e[0]*ae,e[1]*ae,e.length>2?e[2]*ae:0);function t(n){return n=e(n[0]*ae,n[1]*ae),n[0]*=ve,n[1]*=ve,n}return t.invert=function(n){return n=e.invert(n[0]*ae,n[1]*ae),n[0]*=ve,n[1]*=ve,n},t}function $1(e,t,n,r,i,o){if(n){var a=re(t),s=te(t),l=r*n;i==null?(i=t+r*Ke,o=t-l/2):(i=_1(a,i),o=_1(a,o),(r>0?i<o:i>o)&&(i+=r*Ke));for(var u,c=i;r>0?c>o:c<o;c-=l)u=tl([a,-s*re(c),-s*te(c)]),e.point(u[0],u[1])}}function _1(e,t){t=dr(t),t[0]-=e,il(t);var n=Ky(-t[1]);return((-t[2]<0?-n:n)+Ke-oe)%Ke}function K8(){var e=bi([0,0]),t=bi(90),n=bi(2),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=ve,l[1]*=ve}function s(){var l=e.apply(this,arguments),u=t.apply(this,arguments)*ae,c=n.apply(this,arguments)*ae;return r=[],i=Jf(-l[0]*ae,-l[1]*ae,0).invert,$1(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:bi([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:bi(+l),s):t},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:bi(+l),s):n},s}function w1(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Se,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function hl(e,t){return ge(e[0]-t[0])<oe&&ge(e[1]-t[1])<oe}function pl(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function S1(e,t,n,r,i){var o=[],a=[],s,l;if(e.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*oe}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(t),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(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function eh(e){return ge(e[0])<=he?e[0]:$t(e[0])*((ge(e[0])+he)%Ke-he)}function A1(e,t){var n=eh(t),r=t[1],i=te(r),o=[te(n),-re(n),0],a=0,s=0,l=new ke;i===1?r=Ae+oe:i===-1&&(r=-Ae-oe);for(var u=0,c=e.length;u<c;++u)if(h=(f=e[u]).length)for(var f,h,p=f[h-1],d=eh(p),m=p[1]/2+qs,g=te(m),y=re(m),b=0;b<h;++b,d=x,g=A,y=w,p=v){var v=f[b],x=eh(v),_=v[1]/2+qs,A=te(_),w=re(_),P=x-d,C=P>=0?1:-1,B=C*P,$=B>he,k=g*A;if(l.add(Qe(k*C*te(B),y*w+k*re(B))),a+=$?P+C*Ke: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)*Je(T[2]);(r>S||r===S&&(M[0]||M[1]))&&(s+=$^P>=0?1:-1)}}return(a<-oe||a<oe&&l<-Lo)^s&1}function P1(e,t,n,r){return function(i){var o=t(i),a=w1(),s=t(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,_){e(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(e){return e.length>1}function J8(e,t){return((e=e.x)[0]<0?e[1]-Ae-oe:Ae-e[1])-((t=t.x)[0]<0?t[1]-Ae-oe:Ae-t[1])}const th=P1(function(){return!0},e4,n4,[-he,-Ae]);function e4(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?he:-he,l=ge(o-t);ge(l-he)<oe?(e.point(t,n=(n+a)/2>0?Ae:-Ae),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(o,n),i=0):r!==s&&l>=he&&(ge(t-r)<oe&&(t-=r*oe),ge(o-s)<oe&&(o-=s*oe),n=t4(t,n,o,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=o,n=a),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function t4(e,t,n,r){var i,o,a=te(e-n);return ge(a)>oe?gi((te(t)*(o=re(r))*te(n)-te(r)*(i=re(t))*te(e))/(i*o*a)):(t+r)/2}function n4(e,t,n,r){var i;if(e==null)i=n*Ae,r.point(-he,i),r.point(0,i),r.point(he,i),r.point(he,0),r.point(he,-i),r.point(0,-i),r.point(-he,-i),r.point(-he,0),r.point(-he,i);else if(ge(e[0]-t[0])>oe){var o=e[0]<t[0]?he:-he;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function D1(e){var t=re(e),n=2*ae,r=t>0,i=ge(t)>oe;function o(c,f,h,p){$1(p,e,n,h,c,f)}function a(c,f){return re(c)*re(f)>t}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?he:-he),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=t*y/v,_=-t*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=Ne(k),T=rl(C,(-B-M)/$);if(Vf(T,w),T=tl(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=ge(N-he)<oe,O=E||N<oe;if(!E&&z<F&&(I=F,F=z,z=I),O?E?F+z>0^T[1]<(ge(T[0]-S)<oe?F:z):F<=T[1]&&T[1]<=z:N>he^(S<=T[0]&&T[0]<=D)){var j=rl(C,(-B+M)/$);return Vf(j,w),[T,tl(j)]}}}function u(c,f){var h=r?e:he-e,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,-e]:[-he,e-he])}function r4(e,t,n,r,i,o){var a=e[0],s=e[1],l=t[0],u=t[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&&(e[0]=a+c*h,e[1]=s+c*p),f<1&&(t[0]=a+f*h,t[1]=s+f*p),!0}}}}}var Io=1e9,dl=-Io;function gl(e,t,n,r){function i(u,c){return e<=u&&u<=n&&t<=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?e:n,p>1?r:t);while((p=(p+f+4)%4)!==d);else h.point(c[0],c[1])}function a(u,c){return ge(u[0]-e)<oe?c>0?0:3:ge(u[0]-n)<oe?c>0?2:1:ge(u[1]-t)<oe?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,ie=E[0],W=E[1];I<N;++I)O=ie,j=W,E=z[I],ie=E[0],W=E[1],j<=r?W>r&&(ie-O)*(r-j)>(W-j)*(e-O)&&++S:W<=r&&(ie-O)*(r-j)<(W-j)*(e-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,e,t,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 e=0,t=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=gl(e,t,n,r)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[e,t],[n,r]]}}}var nh,rh,ml,yl,xi={sphere:Se,point:Se,lineStart:o4,lineEnd:Se,polygonStart:Se,polygonEnd:Se};function o4(){xi.point=s4,xi.lineEnd=a4}function a4(){xi.point=xi.lineEnd=Se}function s4(e,t){e*=ae,t*=ae,rh=e,ml=te(t),yl=re(t),xi.point=l4}function l4(e,t){e*=ae,t*=ae;var n=te(t),r=re(t),i=ge(e-rh),o=re(i),a=te(i),s=r*a,l=yl*n-ml*r*o,u=ml*n+yl*r*o;nh.add(Qe(Ne(s*s+l*l),u)),rh=e,ml=n,yl=r}function C1(e){return nh=new ke,Bt(e,xi),+nh}var ih=[null,null],u4={type:"LineString",coordinates:ih};function bl(e,t){return ih[0]=e,ih[1]=t,C1(u4)}var M1={Feature:function(e,t){return xl(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(xl(n[r].geometry,t))return!0;return!1}},L1={Sphere:function(){return!0},Point:function(e,t){return k1(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(k1(n[r],t))return!0;return!1},LineString:function(e,t){return R1(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(R1(n[r],t))return!0;return!1},Polygon:function(e,t){return E1(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(E1(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(xl(n[r],t))return!0;return!1}};function xl(e,t){return e&&L1.hasOwnProperty(e.type)?L1[e.type](e,t):!1}function k1(e,t){return bl(e,t)===0}function R1(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(r=bl(e[o],t),r===0||o>0&&(i=bl(e[o],e[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(e,t){return!!A1(e.map(c4),I1(t))}function c4(e){return e=e.map(I1),e.pop(),e}function I1(e){return[e[0]*ae,e[1]*ae]}function f4(e,t){return(e&&M1.hasOwnProperty(e.type)?M1[e.type]:xl)(e,t)}function B1(e,t,n){var r=Sn(e,t-oe,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function N1(e,t,n){var r=Sn(e,t-oe,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function F1(){var e,t,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(t/l)*l,e,l).filter(function(v){return ge(v%c)>oe}).map(h)).concat(Sn(Zs(o/u)*u,i,u).filter(function(v){return ge(v%f)>oe}).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?(t=+v[0][0],e=+v[1][0],o=+v[0][1],i=+v[1][1],t>e&&(v=t,t=e,e=v),o>i&&(v=o,o=i,i=v),y.precision(g)):[[t,o],[e,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(t,e,g),d=B1(s,a,90),m=N1(r,n,g),y):g},y.extentMajor([[-180,-90+oe],[180,90-oe]]).extentMinor([[-180,-80-oe],[180,80+oe]])}function h4(){return F1()()}function p4(e,t){var n=e[0]*ae,r=e[1]*ae,i=t[0]*ae,o=t[1]*ae,a=re(r),s=te(r),l=re(o),u=te(o),c=a*re(n),f=a*te(n),h=l*re(i),p=l*te(i),d=2*Je(Ne(Qy(o-r)+a*l*Qy(i-n))),m=te(d),g=d?function(y){var b=te(y*=d)/m,v=te(d-y)/m,x=v*c+b*h,_=v*f+b*p,A=v*s+b*u;return[Qe(_,x)*ve,Qe(A,Ne(x*x+_*_))*ve]}:function(){return[n*ve,r*ve]};return g.distance=d,g}const Bo=e=>e;var oh=new ke,ah=new ke,z1,O1,sh,lh,cn={point:Se,lineStart:Se,lineEnd:Se,polygonStart:function(){cn.lineStart=d4,cn.lineEnd=m4},polygonEnd:function(){cn.lineStart=cn.lineEnd=cn.point=Se,oh.add(ge(ah)),ah=new ke},result:function(){var e=oh/2;return oh=new ke,e}};function d4(){cn.point=g4}function g4(e,t){cn.point=G1,z1=sh=e,O1=lh=t}function G1(e,t){ah.add(lh*e-sh*t),sh=e,lh=t}function m4(){G1(z1,O1)}var vi=1/0,vl=vi,No=-vi,$l=No,_l={point:y4,lineStart:Se,lineEnd:Se,polygonStart:Se,polygonEnd:Se,result:function(){var e=[[vi,vl],[No,$l]];return No=$l=-(vl=vi=1/0),e}};function y4(e,t){e<vi&&(vi=e),e>No&&(No=e),t<vl&&(vl=t),t>$l&&($l=t)}var uh=0,ch=0,Fo=0,wl=0,Sl=0,$i=0,fh=0,hh=0,zo=0,Y1,W1,jt,qt,_t={point:mr,lineStart:X1,lineEnd:V1,polygonStart:function(){_t.lineStart=v4,_t.lineEnd=$4},polygonEnd:function(){_t.point=mr,_t.lineStart=X1,_t.lineEnd=V1},result:function(){var e=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,e}};function mr(e,t){uh+=e,ch+=t,++Fo}function X1(){_t.point=b4}function b4(e,t){_t.point=x4,mr(jt=e,qt=t)}function x4(e,t){var n=e-jt,r=t-qt,i=Ne(n*n+r*r);wl+=i*(jt+e)/2,Sl+=i*(qt+t)/2,$i+=i,mr(jt=e,qt=t)}function V1(){_t.point=mr}function v4(){_t.point=_4}function $4(){U1(Y1,W1)}function _4(e,t){_t.point=U1,mr(Y1=jt=e,W1=qt=t)}function U1(e,t){var n=e-jt,r=t-qt,i=Ne(n*n+r*r);wl+=i*(jt+e)/2,Sl+=i*(qt+t)/2,$i+=i,i=qt*e-jt*t,fh+=i*(jt+e),hh+=i*(qt+t),zo+=i*3,mr(jt=e,qt=t)}function H1(e){this._context=e}H1.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ke);break}}},result:Se};var ph=new ke,dh,j1,q1,Oo,Go,Yo={point:Se,lineStart:function(){Yo.point=w4},lineEnd:function(){dh&&Z1(j1,q1),Yo.point=Se},polygonStart:function(){dh=!0},polygonEnd:function(){dh=null},result:function(){var e=+ph;return ph=new ke,e}};function w4(e,t){Yo.point=Z1,j1=Oo=e,q1=Go=t}function Z1(e,t){Oo-=e,Go-=t,ph.add(Ne(Oo*Oo+Go*Go)),Oo=e,Go=t}let K1,Tl,Q1,J1;class eb{constructor(t){this._append=t==null?tb:S4(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${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 t=this._;return this._="",t.length?t:null}}function tb(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function S4(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return tb;if(t!==K1){const n=10**t;K1=t,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(e,t){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Bt(s,i(o))),o.result()}return a.area=function(s){return Bt(s,i(cn)),cn.result()},a.measure=function(s){return Bt(s,i(Yo)),Yo.result()},a.bounds=function(s){return Bt(s,i(_l)),_l.result()},a.centroid=function(s){return Bt(s,i(_t)),_t.result()},a.projection=function(s){return arguments.length?(i=s==null?(e=null,Bo):(e=s).stream,a):e},a.context=function(s){return arguments.length?(o=s==null?(t=null,new eb(n)):new H1(t=s),typeof r!="function"&&o.pointRadius(r),a):t},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 t===null&&(o=new eb(n)),a},a.projection(e).digits(n).context(t)}function A4(e){return{stream:Wo(e)}}function Wo(e){return function(t){var n=new gh;for(var r in e)n[r]=e[r];return n.stream=t,n}}function gh(){}gh.prototype={constructor:gh,point:function(e,t){this.stream.point(e,t)},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(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Bt(n,e.stream(_l)),t(_l.result()),r!=null&&e.clipExtent(r),e}function Al(e,t,n){return mh(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,l])},n)}function yh(e,t,n){return Al(e,[[0,0],t],n)}function bh(e,t,n){return mh(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];e.scale(150*o).translate([a,s])},n)}function xh(e,t,n){return mh(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])},n)}var nb=16,P4=re(30*ae);function rb(e,t){return+t?C4(e,t):D4(e)}function D4(e){return Wo({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function C4(e,t){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*t&&m--){var x=a+h,_=s+p,A=l+d,w=Ne(x*x+_*_+A*A),P=Je(A/=w),C=ge(ge(A)-1)<oe||ge(o-f)<oe?(o+f)/2:Qe(_,x),B=e(C,P),$=B[0],k=B[1],M=$-r,T=k-i,S=b*M-y*T;(S*S/v>t||ge((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=e(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]),$=e(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(e,t){this.stream.point(e*ae,t*ae)}});function L4(e){return Wo({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function k4(e,t,n,r,i){function o(a,s){return a*=r,s*=i,[t+e*a,n-e*s]}return o.invert=function(a,s){return[(a-t)/e*r,(n-s)/e*i]},o}function ib(e,t,n,r,i,o){if(!o)return k4(e,t,n,r,i);var a=re(o),s=te(o),l=a*e,u=s*e,c=a/e,f=s/e,h=(s*n-a*t)/e,p=(s*t+a*n)/e;function d(m,g){return m*=r,g*=i,[l*m-u*g+t,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 Zt(e){return vh(function(){return e})()}function vh(e){var t,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=th,g=null,y,b,v,x=Bo,_=.5,A,w,P,C,B;function $(S){return P(S[0]*ae,S[1]*ae)}function k(S){return S=P.invert(S[0],S[1]),S&&[S[0]*ve,S[1]*ve]}$.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*ae):(d=null,th),T()):d*ve},$.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*ae,a=S[1]%360*ae,M()):[o*ve,a*ve]},$.rotate=function(S){return arguments.length?(s=S[0]%360*ae,l=S[1]%360*ae,u=S.length>2?S[2]%360*ae:0,M()):[s*ve,l*ve,u*ve]},$.angle=function(S){return arguments.length?(f=S%360*ae,M()):f*ve},$.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()):Ne(_)},$.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,t(o,a)),D=ib(n,r-S[0],i-S[1],h,p,f);return c=Jf(s,l,u),w=Kf(t,D),P=Kf(c,w),A=rb(w,_),T()}function T(){return C=B=null,$}return function(){return t=e.apply(this,arguments),$.invert=t.invert&&k,M()}}function $h(e){var t=0,n=he/3,r=vh(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*ae,n=o[1]*ae):[t*ve,n*ve]},i}function R4(e){var t=re(e);function n(r,i){return[r*t,te(i)/t]}return n.invert=function(r,i){return[r/t,Je(i*t)]},n}function ob(e,t){var n=te(e),r=(n+te(t))/2;if(ge(r)<oe)return R4(e);var i=1+n*(2*r-n),o=Ne(i)/r;function a(s,l){var u=Ne(i-2*r*te(l))/r;return[u*te(s*=r),o-u*re(s)]}return a.invert=function(s,l){var u=o-l,c=Qe(s,ge(u))*$t(u);return u*r<0&&(c-=he*$t(s)*$t(u)),[c/r,Je((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(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function I4(){var e,t,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 e&&t===h?e:e=E4([n.stream(t=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+oe,m+.12*p+oe],[d-.214*p-oe,m+.234*p-oe]]).stream(u),s=a.translate([d-.205*p,m+.212*p]).clipExtent([[d-.214*p+oe,m+.166*p+oe],[d-.115*p-oe,m+.234*p-oe]]).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 e=t=null,c}return c.scale(1070)}function sb(e){return function(t,n){var r=re(t),i=re(n),o=e(r*i);return o===1/0?[2,0]:[o*i*te(t),o*te(n)]}}function Xo(e){return function(t,n){var r=Ne(t*t+n*n),i=e(r),o=te(i),a=re(i);return[Qe(t*o,r*a),Je(r&&n*o/r)]}}var _h=sb(function(e){return Ne(2/(1+e))});_h.invert=Xo(function(e){return 2*Je(e/2)});function B4(){return Zt(_h).scale(124.75).clipAngle(180-.001)}var wh=sb(function(e){return(e=Ky(e))&&e/te(e)});wh.invert=Xo(function(e){return e});function N4(){return Zt(wh).scale(79.4188).clipAngle(180-.001)}function Vo(e,t){return[e,Ks(Of((Ae+t)/2))]}Vo.invert=function(e,t){return[e,2*gi(Zy(t))-Ae]};function F4(){return lb(Vo).scale(961/Ke)}function lb(e){var t=Zt(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,u;t.scale=function(f){return arguments.length?(r(f),c()):r()},t.translate=function(f){return arguments.length?(i(f),c()):i()},t.center=function(f){return arguments.length?(n(f),c()):n()},t.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=he*r(),h=t(v1(t.rotate()).invert([0,0]));return o(a==null?[[h[0]-f,h[1]-f],[h[0]+f,h[1]+f]]:e===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(e){return Of((Ae+e)/2)}function ub(e,t){var n=re(e),r=e===t?te(e):Ks(n/re(t))/Ks(Dl(t)/Dl(e)),i=n*zf(Dl(e),r)/r;if(!r)return Vo;function o(a,s){i>0?s<-Ae+oe&&(s=-Ae+oe):s>Ae-oe&&(s=Ae-oe);var l=i/zf(Dl(s),r);return[l*te(r*a),i-l*re(r*a)]}return o.invert=function(a,s){var l=i-s,u=$t(r)*Ne(a*a+l*l),c=Qe(a,ge(l))*$t(l);return l*r<0&&(c-=he*$t(a)*$t(l)),[c/r,2*gi(zf(i/u,1/r))-Ae]},o}function z4(){return $h(ub).scale(109.5).parallels([30,30])}function Uo(e,t){return[e,t]}Uo.invert=Uo;function O4(){return Zt(Uo).scale(152.63)}function cb(e,t){var n=re(e),r=e===t?te(e):(n-re(t))/(t-e),i=n/r+e;if(ge(r)<oe)return Uo;function o(a,s){var l=i-s,u=r*a;return[l*te(u),i-l*re(u)]}return o.invert=function(a,s){var l=i-s,u=Qe(a,ge(l))*$t(l);return l*r<0&&(u-=he*$t(a)*$t(l)),[u/r,i-$t(r)*Ne(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=Ne(3)/2,Y4=12;function Sh(e,t){var n=Je(Cl*te(t)),r=n*n,i=r*r*r;return[e*re(n)/(Cl*(Ho+3*jo*r+i*(7*qo+9*Zo*r))),n*(Ho+jo*r+i*(qo+Zo*r))]}Sh.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,o=0,a,s,l;o<Y4&&(s=n*(Ho+jo*r+i*(qo+Zo*r))-t,l=Ho+3*jo*r+i*(7*qo+9*Zo*r),n-=a=s/l,r=n*n,i=r*r*r,!(ge(a)<Lo));++o);return[Cl*e*(Ho+3*jo*r+i*(7*qo+9*Zo*r))/re(n),Je(te(n)/Cl)]};function W4(){return Zt(Sh).scale(177.158)}function Th(e,t){var n=re(t),r=re(e)*n;return[n*te(e)/r,te(t)/r]}Th.invert=Xo(gi);function X4(){return Zt(Th).scale(144.049).clipAngle(60)}function V4(){var e=1,t=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=e*r,p=e*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[_+t,A+n]}return v.invert=function(x){var _=x[0]-t,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?(e=+x,b()):e},v.translate=function(x){return arguments.length?(t=+x[0],n=+x[1],b()):[t,n]},v.angle=function(x){return arguments.length?(o=x%360*ae,s=te(o),a=re(o),b()):o*ve},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(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Ah.invert=function(e,t){var n=t,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ge(i)>oe&&--r>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function U4(){return Zt(Ah).scale(175.295)}function Ph(e,t){return[re(t)*te(e),te(t)]}Ph.invert=Xo(Je);function H4(){return Zt(Ph).scale(249.5).clipAngle(90+oe)}function Dh(e,t){var n=re(t),r=1+re(e)*n;return[n*te(e)/r,te(t)/r]}Dh.invert=Xo(function(e){return 2*gi(e)});function j4(){return Zt(Dh).scale(250).clipAngle(142)}function Ch(e,t){return[Ks(Of((Ae+t)/2)),-e]}Ch.invert=function(e,t){return[-t,2*gi(Zy(e))-Ae]};function q4(){var e=lb(Ch),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.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(e,t){return e.parent===t.parent?1:2}function K4(e){return e.reduce(Q4,0)/e.length}function Q4(e,t){return e+t.x}function J4(e){return 1+e.reduce(e7,0)}function e7(e,t){return Math.max(e,t.y)}function t7(e){for(var t;t=e.children;)e=t[0];return e}function n7(e){for(var t;t=e.children;)e=t[t.length-1];return e}function r7(){var e=Z4,t=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+=e(h,a):0,h.y=0,a=h)});var l=t7(o),u=n7(o),c=l.x-e(l,u)/2,f=u.x+e(u,l)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*t,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-c)/(f-c)*t,h.y=(1-(o.y?h.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function i7(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function o7(){return this.eachAfter(i7)}function a7(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function s7(e,t){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function l7(e,t){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();)e.call(t,n,++l,this);return this}function u7(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function c7(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function f7(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function h7(e){for(var t=this,n=p7(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function p7(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function d7(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function g7(){return Array.from(this)}function m7(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function y7(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*b7(){var e=this,t,n=[e],r,i,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Ml(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=$7)):t===void 0&&(t=v7);for(var n=new yr(e),r,i=[n],o,a,s,l;r=i.pop();)if((a=t(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(e){return e.children}function $7(e){return Array.isArray(e)?e[1]:null}function _7(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function fb(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function yr(e){this.data=e,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(e){return e==null?null:hb(e)}function hb(e){if(typeof e!="function")throw new Error;return e}function br(){return 0}function _i(e){return function(){return e}}const w7=1664525,S7=1013904223,pb=4294967296;function Mh(){let e=1;return()=>(e=(w7*e+S7)%pb)/pb}function T7(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function A7(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function P7(e){return db(e,Mh())}function db(e,t){for(var n=0,r=(e=A7(Array.from(e),t)).length,i=[],o,a;n<r;)o=e[n],a&&gb(a,o)?++n:(a=C7(i=D7(i,o)),n=0);return a}function D7(e,t){var n,r;if(Lh(t,e))return[t];for(n=0;n<e.length;++n)if(kl(t,e[n])&&Lh(Ko(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(kl(Ko(e[n],e[r]),t)&&kl(Ko(e[n],t),e[r])&&kl(Ko(e[r],t),e[n])&&Lh(mb(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function kl(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function gb(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Lh(e,t){for(var n=0;n<t.length;++n)if(!gb(e,t[n]))return!1;return!0}function C7(e){switch(e.length){case 1:return M7(e[0]);case 2:return Ko(e[0],e[1]);case 3:return mb(e[0],e[1],e[2])}}function M7(e){return{x:e.x,y:e.y,r:e.r}}function Ko(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.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(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.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(e,t,n){var r=e.x-t.x,i,o,a=e.y-t.y,s,l,u=r*r+a*a;u?(o=t.r+n.r,o*=o,l=e.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=e.x-i*r-s*a,n.y=e.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=t.x+i*r-s*a,n.y=t.y+i*a+s*r)):(n.x=t.x+n.r,n.y=t.y)}function bb(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function xb(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function Rl(e){this._=e,this.next=null,this.previous=null}function vb(e,t){if(!(o=(e=T7(e)).length))return 0;var n,r,i,o,a,s,l,u,c,f,h;if(n=e[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;yb(r,n,i=e[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;e:for(l=3;l<o;++l){yb(n._,r._,i=e[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 e}f+=u._.r,u=u.next}else{if(bb(c._,i._)){n=c,n.next=r,r.previous=n,--l;continue e}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,t),l=0;l<o;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function L7(e){return vb(e,Mh()),e}function k7(e){return Math.sqrt(e.value)}function R7(){var e=null,t=1,n=1,r=br;function i(o){const a=Mh();return o.x=t/2,o.y=n/2,e?o.eachBefore($b(e)).eachAfter(kh(r,.5,a)).eachBefore(_b(1)):o.eachBefore($b(k7)).eachAfter(kh(br,1,a)).eachAfter(kh(r,o.r/Math.min(t,n),a)).eachBefore(_b(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=Ll(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:_i(+o),i):r},i}function $b(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function kh(e,t,n){return function(r){if(i=r.children){var i,o,a=i.length,s=e(r)*t||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(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function wb(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Qo(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function E7(){var e=1,t=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=e,a.y1=t/s,a.eachBefore(o(t,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?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var I7={depth:-1},Sb={},Rh={};function B7(e){return e.id}function N7(e){return e.parentId}function F7(){var e=B7,t=N7,n;function r(i){var o=Array.from(i),a=e,s=t,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?(e=Ll(i),r):e},r.parentId=function(i){return arguments.length?(t=Ll(i),r):t},r.path=function(i){return arguments.length?(n=Ll(i),r):n},r}function z7(e){e=`${e}`;let t=e.length;return Eh(e,t-1)&&!Eh(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Tb(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Eh(e,t););return e.slice(0,t)}function Eh(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function O7(e,t){return e.parent===t.parent?1:2}function Ih(e){var t=e.children;return t?t[0]:e.t}function Bh(e){var t=e.children;return t?t[t.length-1]:e.t}function G7(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Y7(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function W7(e,t,n){return e.a.parent===t.parent?e.a:n}function El(e,t){this._=e,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=t}El.prototype=Object.create(yr.prototype);function X7(e){for(var t=new El(e,0),n,r=[t],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(t.parent=new El(null,0)).children=[t],t}function V7(){var e=O7,t=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:e(f,h)/2,m=d-f.x,g=t/(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+e(u._,h._),u.m=u.z-p):u.z=p}else h&&(u.z=h.z+e(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+e(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*=t,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(r=!1,t=+u[0],n=+u[1],i):r?null:[t,n]},i.nodeSize=function(u){return arguments.length?(r=!0,t=+u[0],n=+u[1],i):r?[t,n]:null},i}function Il(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var Ab=(1+Math.sqrt(5))/2;function Pb(e,t,n,r,i,o){for(var a=[],s=t.children,l,u,c=0,f=0,h=s.length,p,d,m=t.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*e),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 e(t){function n(r,i,o,a,s){Pb(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Ab);function Db(){var e=Nh,t=!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],t&&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),e(h,d,m,g,y))}return c.round=function(h){return arguments.length?(t=!!h,c):t},c.size=function(h){return arguments.length?(n=+h[0],r=+h[1],c):[n,r]},c.tile=function(h){return arguments.length?(e=hb(h),c):e},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(e,t,n,r,i){var o=e.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,e.value,t,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(e,t,n,r,i){(e.depth&1?Il:Qo)(e,t,n,r,i)}const j7=function e(t){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===t)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(t,r,i,o,a,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Ab);function q7(e){for(var t=-1,n=e.length,r,i=e[n-1],o=0;++t<n;)r=i,i=e[t],o+=r[1]*i[0]-r[0]*i[1];return o/2}function Z7(e){for(var t=-1,n=e.length,r=0,i=0,o,a=e[n-1],s,l=0;++t<n;)o=a,a=e[t],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(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function Q7(e,t){return e[0]-t[0]||e[1]-t[1]}function Cb(e){const t=e.length,n=[0,1];let r=2,i;for(i=2;i<t;++i){for(;r>1&&K7(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function J7(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(Q7),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=Cb(r),a=Cb(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(t=o.length-1;t>=0;--t)u.push(e[r[o[t]][2]]);for(t=+s;t<a.length-l;++t)u.push(e[r[a[t]][2]]);return u}function ek(e,t){for(var n=e.length,r=e[n-1],i=t[0],o=t[1],a=r[0],s=r[1],l,u,c=!1,f=0;f<n;++f)r=e[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 tk(e){for(var t=-1,n=e.length,r=e[n-1],i,o,a=r[0],s=r[1],l=0;++t<n;)i=a,o=s,r=e[t],a=r[0],s=r[1],i-=a,o-=s,l+=Math.hypot(i,o);return l}const Oe=Math.random,nk=function e(t){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 t()*i+r}}return n.source=e,n}(Oe),rk=function e(t){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(t()*i+r)}}return n.source=e,n}(Oe),Fh=function e(t){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=t()*2-1,s=t()*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=e,n}(Oe),ik=function e(t){var n=Fh.source(t);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=e,r}(Oe),Mb=function e(t){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=t();return i+o*t()}}return n.source=e,n}(Oe),ok=function e(t){var n=Mb.source(t);function r(i){if((i=+i)==0)return t;var o=n(i);return function(){return o()/i}}return r.source=e,r}(Oe),ak=function e(t){function n(r){return function(){return-Math.log1p(-t())/r}}return n.source=e,n}(Oe),sk=function e(t){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-t(),r)}}return n.source=e,n}(Oe),lk=function e(t){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+r)}}return n.source=e,n}(Oe),Lb=function e(t){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(-t())/r)})}return n.source=e,n}(Oe),zh=function e(t){var n=Fh.source(t)();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(-t())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),l=i<1?()=>Math.pow(t(),1/i):()=>1;return function(){do{do var u=n(),c=1+s*u;while(c<=0);c*=c*c;var f=1-t()}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=e,r}(Oe),kb=function e(t){var n=zh.source(t);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=e,r}(Oe),Rb=function e(t){var n=Lb.source(t),r=kb.source(t);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=e,i}(Oe),uk=function e(t){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(-t()))}}return n.source=e,n}(Oe),ck=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*t())}}return n.source=e,n}(Oe),fk=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=t();return r+i*Math.log(o/(1-o))}}return n.source=e,n}(Oe),hk=function e(t){var n=zh.source(t),r=Rb.source(t);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(-t()),f=0;c<=s;++f)c-=Math.log1p(-t());return a+f}}return i.source=e,i}(Oe),pk=1664525,dk=1013904223,Eb=1/4294967296;function gk(e=Math.random()){let t=(0<=e&&e<1?e/Eb:Math.abs(e))|0;return()=>(t=pk*t+dk|0,Eb*(t>>>0))}function wt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function fn(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Oh=Symbol("implicit");function Gh(){var e=new oo,t=[],n=[],r=Oh;function i(o){let a=e.get(o);if(a===void 0){if(r!==Oh)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new oo;for(const a of o)e.has(a)||e.set(a,t.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(t,n).unknown(r)},wt.apply(i,arguments),i}function Yh(){var e=Gh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var h=t().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 e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(h){return arguments.length?(s=!!h,f()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},e.copy=function(){return Yh(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},wt.apply(f(),arguments)}function Ib(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ib(t())},e}function Wh(){return Ib(Yh.apply(null,arguments).paddingInner(1))}function mk(e){return function(){return e}}function Bl(e){return+e}var Bb=[0,1];function rt(e){return e}function Xh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:mk(isNaN(t)?NaN:.5)}function yk(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function bk(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[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(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Xh(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=jn(e,s,1,r)-1;return o[l](i[l](s))}}function Jo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Nl(){var e=Bb,t=Bb,n=nn,r,i,o,a=rt,s,l,u;function c(){var h=Math.min(e.length,t.length);return a!==rt&&(a=yk(e[0],e[h-1])),s=h>2?xk:bk,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((u||(u=s(t,e.map(r),vt)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Bl),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=ws,c()},f.clamp=function(h){return arguments.length?(a=h?!0:rt,c()):a!==rt},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()(rt,rt)}function Nb(e,t,n,r){var i=Ja(e,t,n),o;switch(r=di(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));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(e),Math.abs(t))))&&(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(e){var t=e.domain;return e.ticks=function(n){var r=t();return Zn(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Nb(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),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,t(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 e},e}function xr(){var e=Vh();return e.copy=function(){return Jo(e,xr())},wt.apply(e,arguments),Ln(e)}function Fb(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Bl),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Fb(e).unknown(t)},e=arguments.length?Array.from(e,Bl):[0,1],Ln(n)}function zb(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Ob(e){return Math.log(e)}function Gb(e){return Math.exp(e)}function vk(e){return-Math.log(-e)}function $k(e){return-Math.exp(-e)}function _k(e){return isFinite(e)?+("1e"+e):e<0?0:e}function wk(e){return e===10?_k:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Sk(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Yb(e){return(t,n)=>-e(-t,n)}function Uh(e){const t=e(Ob,Gb),n=t.domain;let r=10,i,o;function a(){return i=Sk(r),o=wk(r),n()[0]<0?(i=Yb(i),o=Yb(o),e(vk,$k)):e(Ob,Gb),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.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},t.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/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},t.nice=()=>n(zb(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Wb(){const e=Uh(Nl()).domain([1,10]);return e.copy=()=>Jo(e,Wb()).base(e.base()),wt.apply(e,arguments),e}function Xb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Vb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Hh(e){var t=1,n=e(Xb(t),Vb(t));return n.constant=function(r){return arguments.length?e(Xb(t=+r),Vb(t)):t},Ln(n)}function Ub(){var e=Hh(Nl());return e.copy=function(){return Jo(e,Ub()).constant(e.constant())},wt.apply(e,arguments)}function Hb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Tk(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ak(e){return e<0?-e*e:e*e}function jh(e){var t=e(rt,rt),n=1;function r(){return n===1?e(rt,rt):n===.5?e(Tk,Ak):e(Hb(n),Hb(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ln(t)}function kn(){var e=jh(Nl());return e.copy=function(){return Jo(e,kn()).exponent(e.exponent())},wt.apply(e,arguments),e}function Pk(){return kn.apply(null,arguments).exponent(.5)}function jb(e){return Math.sign(e)*e*e}function Dk(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function qb(){var e=Vh(),t=[0,1],n=!1,r;function i(o){var a=Dk(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(jb(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Bl)).map(jb)),i):t.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?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return qb(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wt.apply(i,arguments),Ln(i)}function Zb(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=E0(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[jn(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(we),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Zb().domain(e).range(t).unknown(r)},wt.apply(o,arguments)}function Kb(){var e=0,t=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)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},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?[e,r[0]]:u>=n?[r[n-1],t]:[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([e,t]).range(i).unknown(o)},wt.apply(Ln(a),arguments)}function Qb(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[jn(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Qb().domain(e).range(t).unknown(n)},wt.apply(i,arguments)}const qh=new Date,Zh=new Date;function Me(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(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)),t(o,s),e(o);while(u<o&&o<a);return l},i.filter=o=>Me(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(qh.setTime(+o),Zh.setTime(+a),e(qh),e(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=Me(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wi.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Me(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):wi);const Jb=wi.range,hn=1e3,St=hn*60,pn=St*60,dn=pn*24,Kh=dn*7,ex=dn*30,Qh=dn*365,gn=Me(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*hn)},(e,t)=>(t-e)/hn,e=>e.getUTCSeconds()),tx=gn.range,Fl=Me(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hn)},(e,t)=>{e.setTime(+e+t*St)},(e,t)=>(t-e)/St,e=>e.getMinutes()),Ck=Fl.range,zl=Me(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*St)},(e,t)=>(t-e)/St,e=>e.getUTCMinutes()),Mk=zl.range,Ol=Me(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hn-e.getMinutes()*St)},(e,t)=>{e.setTime(+e+t*pn)},(e,t)=>(t-e)/pn,e=>e.getHours()),Lk=Ol.range,Gl=Me(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*pn)},(e,t)=>(t-e)/pn,e=>e.getUTCHours()),kk=Gl.range,Si=Me(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*St)/dn,e=>e.getDate()-1),Rk=Si.range,ea=Me(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/dn,e=>e.getUTCDate()-1),Ek=ea.range,Jh=Me(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/dn,e=>Math.floor(e/dn)),Ik=Jh.range;function vr(e){return Me(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*St)/Kh)}const Ti=vr(0),ta=vr(1),nx=vr(2),rx=vr(3),$r=vr(4),ix=vr(5),ox=vr(6),ax=Ti.range,Bk=ta.range,Nk=nx.range,Fk=rx.range,zk=$r.range,Ok=ix.range,Gk=ox.range;function _r(e){return Me(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/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=Me(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),jk=Yl.range,Wl=Me(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),qk=Wl.range,Kt=Me(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Kt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Me(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const Zk=Kt.range,Qt=Me(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Qt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Me(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const Kk=Qt.range;function hx(e,t,n,r,i,o){const a=[[gn,1,hn],[gn,5,5*hn],[gn,15,15*hn],[gn,30,30*hn],[o,1,St],[o,5,5*St],[o,15,15*St],[o,30,30*St],[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],[t,1,ex],[t,3,3*ex],[e,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 e.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(Qt,Wl,Ai,Jh,Gl,zl),[gx,mx]=hx(Kt,Yl,Ti,Si,Ol,Fl);function ep(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function tp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ra(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function yx(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.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:ie,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:t9,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(t,v),x.x=A(n,x),x.X=A(r,x),x.c=A(t,x);function A(q,ne){return function(se){var U=[],me=-1,fe=0,Ee=q.length,it,le,De;for(se instanceof Date||(se=new Date(+se));++me<Ee;)q.charCodeAt(me)===37&&(U.push(q.slice(fe,me)),(le=bx[it=q.charAt(++me)])!=null?it=q.charAt(++me):le=it==="e"?" ":"0",(De=ne[it])&&(it=De(se,le)),U.push(it),fe=me+1);return U.push(q.slice(fe,me)),U.join("")}}function w(q,ne){return function(se){var U=ra(1900,void 0,1),me=P(U,q,se+="",0),fe,Ee;if(me!=se.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(ne&&!("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?(fe=tp(ra(U.y,0,1)),Ee=fe.getUTCDay(),fe=Ee>4||Ee===0?na.ceil(fe):na(fe),fe=ea.offset(fe,(U.V-1)*7),U.y=fe.getUTCFullYear(),U.m=fe.getUTCMonth(),U.d=fe.getUTCDate()+(U.w+6)%7):(fe=ep(ra(U.y,0,1)),Ee=fe.getDay(),fe=Ee>4||Ee===0?ta.ceil(fe):ta(fe),fe=Si.offset(fe,(U.V-1)*7),U.y=fe.getFullYear(),U.m=fe.getMonth(),U.d=fe.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),Ee="Z"in U?tp(ra(U.y,0,1)).getUTCDay():ep(ra(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(Ee+5)%7:U.w+U.U*7-(Ee+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,tp(U)):ep(U)}}function P(q,ne,se,U){for(var me=0,fe=ne.length,Ee=se.length,it,le;me<fe;){if(U>=Ee)return-1;if(it=ne.charCodeAt(me++),it===37){if(it=ne.charAt(me++),le=_[it in bx?ne.charAt(me++):it],!le||(U=le(q,se,U))<0)return-1}else if(it!=se.charCodeAt(U++))return-1}return U}function C(q,ne,se){var U=u.exec(ne.slice(se));return U?(q.p=c.get(U[0].toLowerCase()),se+U[0].length):-1}function B(q,ne,se){var U=p.exec(ne.slice(se));return U?(q.w=d.get(U[0].toLowerCase()),se+U[0].length):-1}function $(q,ne,se){var U=f.exec(ne.slice(se));return U?(q.w=h.get(U[0].toLowerCase()),se+U[0].length):-1}function k(q,ne,se){var U=y.exec(ne.slice(se));return U?(q.m=b.get(U[0].toLowerCase()),se+U[0].length):-1}function M(q,ne,se){var U=m.exec(ne.slice(se));return U?(q.m=g.get(U[0].toLowerCase()),se+U[0].length):-1}function T(q,ne,se){return P(q,t,ne,se)}function S(q,ne,se){return P(q,n,ne,se)}function D(q,ne,se){return P(q,r,ne,se)}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 ie(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 ne=A(q+="",v);return ne.toString=function(){return q},ne},parse:function(q){var ne=w(q+="",!1);return ne.toString=function(){return q},ne},utcFormat:function(q){var ne=A(q+="",x);return ne.toString=function(){return q},ne},utcParse:function(q){var ne=w(q+="",!0);return ne.toString=function(){return q},ne}}}var bx={"-":"",_:" ",0:"0"},Fe=/^\s*\d+/,Qk=/^%/,Jk=/[\\^$*+?|[\]().{}]/g;function ye(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function e9(e){return e.replace(Jk,"\\$&")}function ia(e){return new RegExp("^(?:"+e.map(e9).join("|")+")","i")}function oa(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function t9(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function n9(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function r9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function i9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function o9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function xx(e,t,n){var r=Fe.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function vx(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function a9(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function s9(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function l9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $x(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function u9(e,t,n){var r=Fe.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function _x(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function c9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function f9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function h9(e,t,n){var r=Fe.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function p9(e,t,n){var r=Fe.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function d9(e,t,n){var r=Qk.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function g9(e,t,n){var r=Fe.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function m9(e,t,n){var r=Fe.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function wx(e,t){return ye(e.getDate(),t,2)}function y9(e,t){return ye(e.getHours(),t,2)}function b9(e,t){return ye(e.getHours()%12||12,t,2)}function x9(e,t){return ye(1+Si.count(Kt(e),e),t,3)}function Sx(e,t){return ye(e.getMilliseconds(),t,3)}function v9(e,t){return Sx(e,t)+"000"}function $9(e,t){return ye(e.getMonth()+1,t,2)}function _9(e,t){return ye(e.getMinutes(),t,2)}function w9(e,t){return ye(e.getSeconds(),t,2)}function S9(e){var t=e.getDay();return t===0?7:t}function T9(e,t){return ye(Ti.count(Kt(e)-1,e),t,2)}function Tx(e){var t=e.getDay();return t>=4||t===0?$r(e):$r.ceil(e)}function A9(e,t){return e=Tx(e),ye($r.count(Kt(e),e)+(Kt(e).getDay()===4),t,2)}function P9(e){return e.getDay()}function D9(e,t){return ye(ta.count(Kt(e)-1,e),t,2)}function C9(e,t){return ye(e.getFullYear()%100,t,2)}function M9(e,t){return e=Tx(e),ye(e.getFullYear()%100,t,2)}function L9(e,t){return ye(e.getFullYear()%1e4,t,4)}function k9(e,t){var n=e.getDay();return e=n>=4||n===0?$r(e):$r.ceil(e),ye(e.getFullYear()%1e4,t,4)}function R9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function Ax(e,t){return ye(e.getUTCDate(),t,2)}function E9(e,t){return ye(e.getUTCHours(),t,2)}function I9(e,t){return ye(e.getUTCHours()%12||12,t,2)}function B9(e,t){return ye(1+ea.count(Qt(e),e),t,3)}function Px(e,t){return ye(e.getUTCMilliseconds(),t,3)}function N9(e,t){return Px(e,t)+"000"}function F9(e,t){return ye(e.getUTCMonth()+1,t,2)}function z9(e,t){return ye(e.getUTCMinutes(),t,2)}function O9(e,t){return ye(e.getUTCSeconds(),t,2)}function G9(e){var t=e.getUTCDay();return t===0?7:t}function Y9(e,t){return ye(Ai.count(Qt(e)-1,e),t,2)}function Dx(e){var t=e.getUTCDay();return t>=4||t===0?wr(e):wr.ceil(e)}function W9(e,t){return e=Dx(e),ye(wr.count(Qt(e),e)+(Qt(e).getUTCDay()===4),t,2)}function X9(e){return e.getUTCDay()}function V9(e,t){return ye(na.count(Qt(e)-1,e),t,2)}function U9(e,t){return ye(e.getUTCFullYear()%100,t,2)}function H9(e,t){return e=Dx(e),ye(e.getUTCFullYear()%100,t,2)}function j9(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function q9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?wr(e):wr.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function Z9(){return"+0000"}function Cx(){return"%"}function Mx(e){return+e}function Lx(e){return Math.floor(+e/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(e){return Pi=yx(e),np=Pi.format,kx=Pi.parse,Xl=Pi.utcFormat,rp=Pi.utcParse,Pi}var Ex="%Y-%m-%dT%H:%M:%S.%LZ";function K9(e){return e.toISOString()}var Q9=Date.prototype.toISOString?K9:Xl(Ex);const J9=Q9;function eR(e){var t=new Date(e);return isNaN(t)?null:t}var tR=+new Date("2000-01-01T00:00:00.000Z")?eR:rp(Ex);const nR=tR;function rR(e){return new Date(e)}function iR(e){return e instanceof Date?+e:+new Date(+e)}function ip(e,t,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 e(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=t(w[0],w[w.length-1],A??10)),A?h(zb(w,A)):c},c.copy=function(){return Jo(c,ip(e,t,n,r,i,o,a,s,l,u))},c}function oR(){return wt.apply(ip(gx,mx,Kt,Yl,Ti,Si,Ol,Fl,gn,np).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function aR(){return wt.apply(ip(px,dx,Qt,Wl,Ai,ea,Gl,zl,gn,Xl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vl(){var e=0,t=1,n,r,i,o,a=rt,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?([e,t]=f,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),u):[e,t]},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(e),r=f(t),i=n===r?0:1/(r-n),u}}function Rn(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Ix(){var e=Ln(Vl()(rt));return e.copy=function(){return Rn(e,Ix())},fn.apply(e,arguments)}function Bx(){var e=Uh(Vl()).domain([1,10]);return e.copy=function(){return Rn(e,Bx()).base(e.base())},fn.apply(e,arguments)}function Nx(){var e=Hh(Vl());return e.copy=function(){return Rn(e,Nx()).constant(e.constant())},fn.apply(e,arguments)}function op(){var e=jh(Vl());return e.copy=function(){return Rn(e,op()).exponent(e.exponent())},fn.apply(e,arguments)}function sR(){return op.apply(null,arguments).exponent(.5)}function Fx(){var e=[],t=rt;function n(r){if(r!=null&&!isNaN(r=+r))return t((jn(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(we),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>lo(e,o/r))},n.copy=function(){return Fx(t).domain(e)},fn.apply(n,arguments)}function Ul(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,u=rt,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?([e,t,n]=m,i=c(e=+e),o=c(t=+t),a=c(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,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(e),o=m(t),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 e=Ln(Ul()(rt));return e.copy=function(){return Rn(e,zx())},fn.apply(e,arguments)}function Ox(){var e=Uh(Ul()).domain([.1,1,10]);return e.copy=function(){return Rn(e,Ox()).base(e.base())},fn.apply(e,arguments)}function Gx(){var e=Hh(Ul());return e.copy=function(){return Rn(e,Gx()).constant(e.constant())},fn.apply(e,arguments)}function ap(){var e=jh(Ul());return e.copy=function(){return Rn(e,ap()).exponent(e.exponent())},fn.apply(e,arguments)}function lR(){return ap.apply(null,arguments).exponent(.5)}function ce(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const uR=ce("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),cR=ce("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),fR=ce("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),hR=ce("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),pR=ce("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),dR=ce("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),gR=ce("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),mR=ce("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),yR=ce("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bR=ce("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),xR=ce("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$e=e=>Pm(e[e.length-1]);var Yx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ce);const vR=$e(Yx);var Wx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ce);const $R=$e(Wx);var Xx=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ce);const _R=$e(Xx);var Vx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ce);const wR=$e(Vx);var Ux=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ce);const SR=$e(Ux);var Hx=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ce);const TR=$e(Hx);var jx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ce);const AR=$e(jx);var qx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ce);const PR=$e(qx);var Zx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ce);const DR=$e(Zx);var Kx=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ce);const CR=$e(Kx);var Qx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ce);const MR=$e(Qx);var Jx=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ce);const LR=$e(Jx);var ev=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ce);const kR=$e(ev);var tv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ce);const RR=$e(tv);var nv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ce);const ER=$e(nv);var rv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ce);const IR=$e(rv);var iv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ce);const BR=$e(iv);var ov=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ce);const NR=$e(ov);var av=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ce);const FR=$e(av);var sv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ce);const zR=$e(sv);var lv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ce);const OR=$e(lv);var uv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ce);const GR=$e(uv);var cv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ce);const YR=$e(cv);var fv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ce);const WR=$e(fv);var hv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ce);const XR=$e(hv);var pv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ce);const VR=$e(pv);var dv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ce);const UR=$e(dv);function HR(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const jR=Ts(Et(300,.5,0),Et(-240,.5,1));var qR=Ts(Et(-100,.75,.35),Et(80,1.5,.8)),ZR=Ts(Et(260,.75,.35),Et(80,1.5,.8)),Hl=Et();function KR(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Hl.h=360*e-100,Hl.s=1.5-1.5*t,Hl.l=.8-.9*t,Hl+""}var jl=ni(),QR=Math.PI/3,JR=Math.PI*2/3;function eE(e){var t;return e=(.5-e)*Math.PI,jl.r=255*(t=Math.sin(e))*t,jl.g=255*(t=Math.sin(e+QR))*t,jl.b=255*(t=Math.sin(e+JR))*t,jl+""}function tE(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function ql(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const nE=ql(ce("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var rE=ql(ce("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),iE=ql(ce("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),oE=ql(ce("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ue(e){return function(){return e}}const gv=Math.abs,Xe=Math.atan2,mn=Math.cos,aE=Math.max,Di=Math.min,ct=Math.sin,_e=Math.sqrt,Ve=1e-12,En=Math.PI,Zl=En/2,In=2*En;function sE(e){return e>1?0:e<-1?En:Math.acos(e)}function mv(e){return e>=1?Zl:e<=-1?-Zl:Math.asin(e)}function aa(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Ao(t)}function lE(e){return e.innerRadius}function uE(e){return e.outerRadius}function cE(e){return e.startAngle}function fE(e){return e.endAngle}function hE(e){return e&&e.padAngle}function pE(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,f=s-o,h=f*l-c*u;if(!(h*h<Ve))return h=(c*(t-o)-f*(e-i))/h,[e+h*l,t+h*u]}function Kl(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/_e(s*s+l*l),c=u*l,f=-u*s,h=e+c,p=t+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)*_e(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 e=lE,t=uE,n=ue(0),r=null,i=cE,o=fE,a=hE,s=null,l=aa(u);function u(){var c,f,h=+e.apply(this,arguments),p=+t.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>Ve))s.moveTo(0,0);else if(g>In-Ve)s.moveTo(p*mn(d),p*ct(d)),s.arc(0,0,p,d,m,!y),h>Ve&&(s.moveTo(h*mn(m),h*ct(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>Ve&&(r?+r.apply(this,arguments):_e(h*h+p*p)),B=Di(gv(p-h)/2,+n.apply(this,arguments)),$=B,k=B,M,T;if(C>Ve){var S=mv(C/h*ct(P)),D=mv(C/p*ct(P));(A-=S*2)>Ve?(S*=y?1:-1,x+=S,_-=S):(A=0,x=_=(d+m)/2),(w-=D*2)>Ve?(D*=y?1:-1,b+=D,v-=D):(w=0,b=v=(d+m)/2)}var F=p*mn(b),z=p*ct(b),I=h*mn(_),N=h*ct(_);if(B>Ve){var E=p*mn(v),O=p*ct(v),j=h*mn(x),ie=h*ct(x),W;if(g<En)if(W=pE(F,z,j,ie,E,O,I,N)){var Q=F-W[0],X=z-W[1],K=E-W[0],q=O-W[1],ne=1/ct(sE((Q*K+X*q)/(_e(Q*Q+X*X)*_e(K*K+q*q)))/2),se=_e(W[0]*W[0]+W[1]*W[1]);$=Di(B,(h-se)/(ne-1)),k=Di(B,(p-se)/(ne+1))}else $=k=0}w>Ve?k>Ve?(M=Kl(j,ie,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,Xe(M.y01,M.x01),Xe(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,k,Xe(M.y01,M.x01),Xe(M.y11,M.x11),!y),s.arc(0,0,p,Xe(M.cy+M.y11,M.cx+M.x11),Xe(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,k,Xe(T.y11,T.x11),Xe(T.y01,T.x01),!y))):(s.moveTo(F,z),s.arc(0,0,p,b,v,!y)):s.moveTo(F,z),!(h>Ve)||!(A>Ve)?s.lineTo(I,N):$>Ve?(M=Kl(I,N,E,O,h,-$,y),T=Kl(F,z,j,ie,h,-$,y),s.lineTo(M.cx+M.x01,M.cy+M.y01),$<B?s.arc(M.cx,M.cy,$,Xe(M.y01,M.x01),Xe(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,$,Xe(M.y01,M.x01),Xe(M.y11,M.x11),!y),s.arc(0,0,h,Xe(M.cy+M.y11,M.cx+M.x11),Xe(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,$,Xe(T.y11,T.x11),Xe(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=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-En/2;return[mn(f)*c,ct(f)*c]},u.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:ue(+c),u):e},u.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ue(+c),u):t},u.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:ue(+c),u):n},u.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:ue(+c),u):r},u.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:ue(+c),u):i},u.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:ue(+c),u):o},u.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ue(+c),u):a},u.context=function(c){return arguments.length?(s=c??null,u):s},u}var dE=Array.prototype.slice;function Jl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function yv(e){this._context=e}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function eu(e){return new yv(e)}function sp(e){return e[0]}function lp(e){return e[1]}function tu(e,t){var n=ue(!0),r=null,i=eu,o=null,a=aa(s);e=typeof e=="function"?e:e===void 0?sp:ue(e),t=typeof t=="function"?t:t===void 0?lp:ue(t);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(+e(f,u,l),+t(f,u,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ue(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ue(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ue(!!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(e,t,n){var r=null,i=ue(!0),o=null,a=eu,s=null,l=aa(u);e=typeof e=="function"?e:e===void 0?sp:ue(+e),t=typeof t=="function"?t:ue(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?lp:ue(+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]=+e(g,h,f),x[h]=+t(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 tu().defined(i).curve(a).context(o)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:ue(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ue(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ue(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:ue(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ue(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ue(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ue(!!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(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function mE(e){return e}function bv(){var e=mE,t=gE,n=null,r=ue(0),i=ue(In),o=ue(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]=+e(s[l],l,s))>0&&(h+=x);for(t!=null?p.sort(function(_,A){return t(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?(e=typeof s=="function"?s:ue(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ue(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ue(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ue(+s),a):o},a}var xv=cp(eu);function vv(e){this._curve=e}vv.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function cp(e){function t(n){return new vv(e(n))}return t._curve=e,t}function sa(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(cp(n)):t()._curve},e}function $v(){return sa(tu().curve(xv))}function _v(){var e=up().curve(xv),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return sa(n())},delete e.lineX0,e.lineEndAngle=function(){return sa(r())},delete e.lineX1,e.lineInnerRadius=function(){return sa(i())},delete e.lineY0,e.lineOuterRadius=function(){return sa(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(cp(a)):t()._curve},e}function la(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}class wv{constructor(t,n){this._context=t,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(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}class yE{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,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(t,this._y0),a=la(t,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=t,this._y0=n}}function Sv(e){return new wv(e,!0)}function Tv(e){return new wv(e,!1)}function bE(e){return new yE(e)}function xE(e){return e.source}function vE(e){return e.target}function nu(e){let t=xE,n=vE,r=sp,i=lp,o=null,a=null,s=aa(l);function l(){let u;const c=dE.call(arguments),f=t.apply(this,c),h=n.apply(this,c);if(o==null&&(a=e(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?(t=u,l):t},l.target=function(u){return arguments.length?(n=u,l):n},l.x=function(u){return arguments.length?(r=typeof u=="function"?u:ue(+u),l):r},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:ue(+u),l):i},l.context=function(u){return arguments.length?(u==null?o=a=null:a=e(o=u),l):o},l}function $E(){return nu(Sv)}function _E(){return nu(Tv)}function wE(){const e=nu(bE);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const SE=_e(3),Av={draw(e,t){const n=_e(t+Di(t/28,.75))*.59436,r=n/2,i=r*SE;e.moveTo(0,n),e.lineTo(0,-n),e.moveTo(-i,-r),e.lineTo(i,r),e.moveTo(-i,r),e.lineTo(i,-r)}},ru={draw(e,t){const n=_e(t/En);e.moveTo(n,0),e.arc(0,0,n,0,In)}},Pv={draw(e,t){const n=_e(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Dv=_e(1/3),TE=Dv*2,Cv={draw(e,t){const n=_e(t/TE),r=n*Dv;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Mv={draw(e,t){const n=_e(t)*.62625;e.moveTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.lineTo(-n,0),e.closePath()}},Lv={draw(e,t){const n=_e(t-Di(t/7,2))*.87559;e.moveTo(-n,0),e.lineTo(n,0),e.moveTo(0,n),e.lineTo(0,-n)}},kv={draw(e,t){const n=_e(t),r=-n/2;e.rect(r,r,n,n)}},Rv={draw(e,t){const n=_e(t)*.4431;e.moveTo(n,n),e.lineTo(n,-n),e.lineTo(-n,-n),e.lineTo(-n,n),e.closePath()}},AE=.8908130915292852,Ev=ct(En/10)/ct(7*En/10),PE=ct(In/10)*Ev,DE=-mn(In/10)*Ev,Iv={draw(e,t){const n=_e(t*AE),r=PE*n,i=DE*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=In*o/5,s=mn(a),l=ct(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},fp=_e(3),Bv={draw(e,t){const n=-_e(t/(fp*3));e.moveTo(0,n*2),e.lineTo(-fp*n,-n),e.lineTo(fp*n,-n),e.closePath()}},CE=_e(3),Nv={draw(e,t){const n=_e(t)*.6824,r=n/2,i=n*CE/2;e.moveTo(0,-n),e.lineTo(i,r),e.lineTo(-i,r),e.closePath()}},Tt=-.5,At=_e(3)/2,hp=1/_e(12),ME=(hp/2+1)*3,Fv={draw(e,t){const n=_e(t/ME),r=n/2,i=n*hp,o=r,a=n*hp+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Tt*r-At*i,At*r+Tt*i),e.lineTo(Tt*o-At*a,At*o+Tt*a),e.lineTo(Tt*s-At*l,At*s+Tt*l),e.lineTo(Tt*r+At*i,Tt*i-At*r),e.lineTo(Tt*o+At*a,Tt*a-At*o),e.lineTo(Tt*s+At*l,Tt*l-At*s),e.closePath()}},pp={draw(e,t){const n=_e(t-Di(t/6,1.7))*.6189;e.moveTo(-n,-n),e.lineTo(n,n),e.moveTo(-n,n),e.lineTo(n,-n)}},zv=[ru,Pv,Cv,kv,Iv,Bv,Fv],LE=[ru,Lv,pp,Nv,Av,Rv,Mv];function kE(e,t){let n=null,r=aa(i);e=typeof e=="function"?e:ue(e||ru),t=typeof t=="function"?t:ue(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ue(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ue(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Bn(){}function iu(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ou(e){this._context=e}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function RE(e){return new ou(e)}function Ov(e){this._context=e}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:iu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function EE(e){return new Ov(e)}function Gv(e){this._context=e}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(e,t){switch(e=+e,t=+t,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+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:iu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IE(e){return new Gv(e)}function Yv(e,t){this._basis=new ou(e),this._beta=t}Yv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const BE=function e(t){function n(r){return t===1?new ou(r):new Yv(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function au(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function dp(e,t){this._context=e,this._k=(1-t)/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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:au(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const NE=function e(t){function n(r){return new dp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function gp(e,t){this._context=e,this._k=(1-t)/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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:au(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const FE=function e(t){function n(r){return new gp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function mp(e,t){this._context=e,this._k=(1-t)/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(e,t){switch(e=+e,t=+t,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,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zE=function e(t){function n(r){return new mp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function yp(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Ve){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Ve){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function Wv(e,t){this._context=e,this._alpha=t}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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:yp(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const OE=function e(t){function n(r){return t?new Wv(r,t):new dp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Xv(e,t){this._context=e,this._alpha=t}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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:yp(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const GE=function e(t){function n(r){return t?new Xv(r,t):new gp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Vv(e,t){this._context=e,this._alpha=t}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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const YE=function e(t){function n(r){return t?new Vv(r,t):new mp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Uv(e){this._context=e}Uv.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function WE(e){return new Uv(e)}function Hv(e){return e<0?-1:1}function jv(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._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(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function bp(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function su(e){this._context=e}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(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,bp(this,qv(this,n=jv(this,e,t)),n);break;default:bp(this,this._t0,n=jv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Zv(e){this._context=new Kv(e)}(Zv.prototype=Object.create(su.prototype)).point=function(e,t){su.prototype.point.call(this,t,e)};function Kv(e){this._context=e}Kv.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function XE(e){return new su(e)}function VE(e){return new Zv(e)}function Qv(e){this._context=e}Qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Jv(e),i=Jv(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Jv(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function UE(e){return new Qv(e)}function lu(e,t){this._context=e,this._t=t}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function HE(e){return new lu(e,.5)}function jE(e){return new lu(e,0)}function qE(e){return new lu(e,1)}function Ci(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Mi(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function ZE(e,t){return e[t]}function KE(e){const t=[];return t.key=e,t}function QE(){var e=ue([]),t=Mi,n=Ci,r=ZE;function i(o){var a=Array.from(e.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(t(a));s<l;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ue(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ue(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?Mi:typeof o=="function"?o:ue(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Ci,i):n},i}function JE(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}Ci(e,t)}}function eI(e,t){if((l=e.length)>0)for(var n,r=0,i,o,a,s,l,u=e[t[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=e[t[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 tI(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Ci(e,t)}}function nI(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[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=e[t[s]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<s;++d){var m=e[t[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(e,t)}}function e$(e){var t=e.map(rI);return Mi(e).sort(function(n,r){return t[n]-t[r]})}function rI(e){for(var t=-1,n=0,r=e.length,i,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function t$(e){var t=e.map(n$);return Mi(e).sort(function(n,r){return t[n]-t[r]})}function n$(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function iI(e){return t$(e).reverse()}function oI(e){var t=e.length,n,r,i=e.map(n$),o=e$(e),a=0,s=0,l=[],u=[];for(n=0;n<t;++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(e){return Mi(e).reverse()}const uu=e=>()=>e;function sI(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Jt(e,t,n){this.k=e,this.x=t,this.y=n}Jt.prototype={constructor:Jt,scale:function(e){return e===1?this:new Jt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Jt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Li=new Jt(1,0,0);r$.prototype=Jt.prototype;function r$(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Li;return e.__zoom}function xp(e){e.stopImmediatePropagation()}function ua(e){e.preventDefault(),e.stopImmediatePropagation()}function lI(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function uI(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function i$(){return this.__zoom||Li}function cI(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function fI(){return navigator.maxTouchPoints||"ontouchstart"in this}function hI(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.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 e=lI,t=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=t.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),t.apply(this,arguments),a)},null,F)},y.translateTo=function(T,S,D,F,z){y.transform(T,function(){var I=t.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 Jt(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 Jt(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=t.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]),ie=z.__zoom,W=typeof S=="function"?S.apply(z,I):S,Q=l(ie.invert(O).concat(j/ie.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 Jt(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=t.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(!e.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=gt(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||!e.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=gt(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(ie){if(ua(ie),!F.moved){var W=ie.clientX-N,Q=ie.clientY-E;F.moved=W*W+Q*Q>m}F.event(ie).zoom("mouse",n(v(F.that.__zoom,F.mouse[0]=gt(ie,D),F.mouse[1]),F.extent,a))}function j(ie){z.on("mousemove.zoom mouseup.zoom",null),cs(ie.view,F.moved),ua(ie),F.event(ie).end()}}function B(T,...S){if(e.apply(this,arguments)){var D=this.__zoom,F=gt(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),t.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(e.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=gt(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=gt(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],ie=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]-ie[0])*K+(K=Q[1]-ie[1])*K;N=b(N,Math.sqrt(X/K)),E=[(j[0]+W[0])/2,(j[1]+W[1])/2],O=[(ie[0]+Q[0])/2,(ie[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=gt(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?(e=typeof T=="function"?T:uu(!!T),y):e},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:uu(!!T),y):i},y.extent=function(T){return arguments.length?(t=typeof T=="function"?T:uu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):t},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:ke,Delaunay:Cf,FormatSpecifier:Hs,InternMap:oo,InternSet:qn,Node:yr,Path:Ao,Voronoi:Ay,ZoomTransform:Jt,active:b5,arc:Ql,area:up,areaRadial:_v,ascending:we,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:Et,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:eu,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:ey,easePolyIn:U3,easePolyInOut:ey,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:th,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:Zt,geoProjectionMutator:vh,geoRotation:v1,geoStereographic:j4,geoStereographicRaw:Dh,geoStream:Bt,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:vt,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:eE,interpolateSpectral:DR,interpolateString:Kc,interpolateTransformCss:Im,interpolateTransformSvg:Bm,interpolateTurbo:tE,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:e8,lab:bs,lch:hL,least:zD,leastIndex:B0,line:tu,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:es,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:gt,pointers:HM,polygonArea:q7,polygonCentroid:Z7,polygonContains:ek,polygonHull:J7,polygonLength:tk,precisionFixed:Hy,precisionPrefix:jy,precisionRound:qy,quadtree:Ys,quantile:lo,quantileIndex:I0,quantileSorted:E0,quantize:RL,quickselect:ts,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:ev,schemeOranges:dv,schemePRGn:Wx,schemePaired:pR,schemePastel1:dR,schemePastel2:gR,schemePiYG:Xx,schemePuBu:nv,schemePuBuGn:tv,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:er,selector:ss,selectorAll:kc,shuffle:YD,shuffler:N0,some:UD,sort:bc,stack:QE,stackOffsetDiverging:eI,stackOffsetExpand:JE,stackOffsetNone:Ci,stackOffsetSilhouette:tI,stackOffsetWiggle:nI,stackOrderAppearance:e$,stackOrderAscending:t$,stackOrderDescending:iI,stackOrderInsideOut:oI,stackOrderNone:Mi,stackOrderReverse:aI,stratify:F7,style:Jn,subset:tC,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:Me,timeMillisecond:wi,timeMilliseconds:Jb,timeMinute:Fl,timeMinutes:Ck,timeMonday:ta,timeMondays:Bk,timeMonth:Yl,timeMonths:jk,get timeParse(){return kx},timeSaturday:ox,timeSaturdays:Gk,timeSecond:gn,timeSeconds:tx,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:Kt,timeYears:Zk,timeout:ef,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:ea,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:tx,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:Qt,utcYears:Kk,variance:v0,window:Ec,xml:t8,zip:XD,zoom:yn,zoomIdentity:Li,zoomTransform:r$},Symbol.toStringTag,{value:"Module"}));function o$(e){try{return e.node().getBBox()}catch(t){throw new Error(t)}}function pI(e,t){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=e.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);e.node().appendChild(n(t))}function ca(e){return e.substring(0,4)!=="ease"?wo:vp[e]??wo}function cu({axisWidth:e,innerRadius:t,outerRadius:n,padAngle:r,cornerRadius:i}){const o=xr().domain([0,1]).range([0,e/2]),a=o(n);return Ql().innerRadius(o(t)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Sr=(e,t)=>{if(t instanceof Function){const n=t(e);return String(n??"")}return Mo(t)(e)};function fa(e,t=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(e))==null?void 0:i.width)??0)*t/10}function be(e,t){const n=t.colors[t.colorScheme];return e==="label"?n.label[0]:e=="none"?"none":n[e]!=null?n[e]:n.primary}function Ce({datum:e,colorType:t,fullChartParams:n}){return t==="label"?e.color?e.color:n.colors[n.colorScheme].label[0]:t=="none"?"none":n.colors[n.colorScheme][t]!=null?n.colors[n.colorScheme][t]:n.colors[n.colorScheme].primary}function Z(e,t,n){const r=n?`--${n}`:"";return`orbcharts-${e}__${t}${r}`}function Pt(e,t){const r=Math.random().toString(36).substr(2,5);return Z(e,t,r)}function ha(e,t){let n=new de(()=>{});return e.each(function(){const r=Iu(this,t);n=Bu(n,r)}),n}const Tr=({selection:e,pluginName:t,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=Z(t,"series"),l=Z(t,"axes"),u=Z(t,"graphic"),c=r.pipe(R((d,m)=>e.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())),pe(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)),pe(1)),h=f.pipe(R(d=>d.select("defs")),pe(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}),pe(1));return{seriesSelection$:c,axesSelection$:f,defsSelection$:h,graphicGSelection$:p}},a$=({fullDataFormatter$:e,gridAxesSize$:t,computedData$:n,fullChartParams$:r,gridContainerPosition$:i,layout$:o})=>{const a=new J,s=Y({fullDataFormatter:e,gridAxesSize:t,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]}),pe(1)),l=Y({fullDataFormatter:e,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),ee()),f=i.pipe(R(h=>h.reduce((d,m)=>m.rowIndex>d?m.rowIndex:d,0)+1),ee());return new de(h=>{Y({dataFormatter:e,axisSize:t,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:e,fullDataFormatter$:t,gridAxesSize$:n,computedData$:r,fullChartParams$:i,gridContainerPosition$:o,layout$:a})=>{const s=ha(e,"mousemove"),l=Y({fullDataFormatter:t,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,_]}),pe(1)),u=Y({fullDataFormatter:t,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=t.pipe(R(b=>b.valueAxis.position==="right"||b.valueAxis.position==="bottom")),h=Y({reverse:f,gridAxesSize:n,scaleRangeGroupLabels:c,fullDataFormatter:t}).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),ee()),d=o.pipe(R(b=>b.reduce((x,_)=>_.rowIndex>x?_.rowIndex:x,0)+1),ee()),m=Y({fullDataFormatter:t,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(e="curveLinear"){return tu().x(t=>t.axisX).y(t=>t.axisY).curve(vp[e])}function mI(e){let t=[[]],n=0;for(let r in e){if(e[r].visible==!1||e[r].value===void 0||e[r].value===null){t[n].length&&(n++,t[n]=[]);continue}t[n].push(e[r])}return t}function yI({selection:e,pathClassName:t,segmentData:n,linePath:r,params:i}){return e.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(t,!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:e,seriesLabel:t,fullChartParams:n}){if(e.interrupt("highlight"),!t){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{r===t?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function xI({defsSelection:e,clipPathData:t,transitionDuration:n,transitionEase:r}){e.selectAll("clipPath").data(t).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$=(e,{selection:t,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,_=Pt(e,"clipPath-box"),A=Z(e,"path"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:t,pluginName:e,clipPathID:_,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p}),$=new de(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),ee()),M=f.pipe(R(z=>z.transitionEase),ee());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),ee()),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:ie}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(ie).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mouseover",pluginName:e,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:ie}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(ie).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mousemove",pluginName:e,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:ie}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(ie).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mouseout",pluginName:e,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:ie}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(ie).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"click",pluginName:e,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,bt=5,fu=6,$p=7,ki=8,Ri=9,f$="Lines",vI=st({name:f$,defaultParams:Dr,layerIndex:bt,validator:(e,{validateColumns:t})=>t(e,{lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:e,rootSelection:t,name:n,observer:r,subject:i})=>{const o=new J,a=s$(f$,{selection:e,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(e="curveLinear",t){return up().x(n=>n.axisX).y0(n=>t).y1(n=>n.axisY).curve(vp[e])}function _I(e){let t=[[]],n=0;for(let r in e){if(e[r].visible==!1||e[r].value===void 0||e[r].value===null){t[n].length&&(n++,t[n]=[]);continue}t[n].push(e[r])}return t}function wI({selection:e,pathClassName:t,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return e.selectAll("path").data(n,(s,l)=>s.length?`${s[0].id}_${s[s.length-1].id}`:l).join(s=>s.append("path").classed(t,!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:e,seriesLabel:t,fullChartParams:n}){if(e.interrupt("highlight"),!t){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{r===t?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function TI({defsSelection:e,computedData:t,linearGradientIds:n,params:r}){e.selectAll("linearGradient").data(t??[]).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`
46
+ `)}function u(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?C6(f):t.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(e){for(var t in e){var n=e[t].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;e[t]=n}return e}const W6=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function X6(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function V6(e,t){return fetch(e,t).then(X6)}function U6(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function H6(e,t){return fetch(e,t).then(U6)}function j6(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Gs(e,t){return fetch(e,t).then(j6)}function ky(e){return function(t,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Gs(t,n).then(function(i){return e(i,r)})}}function q6(e,t,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Os(e);return Gs(t,n).then(function(o){return i.parse(o,r)})}var Z6=ky(My),K6=ky(Ly);function Q6(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function J6(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function e8(e,t){return fetch(e,t).then(J6)}function Rf(e){return(t,n)=>Gs(t,n).then(r=>new DOMParser().parseFromString(r,e))}const t8=Rf("application/xml");var n8=Rf("text/html"),r8=Rf("image/svg+xml");function Ef(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=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-e)*r,u=(u/a-t)*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?(e=+o,i):e},i.y=function(o){return arguments.length?(t=+o,i):t},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function i8(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return Ry(this.cover(t,n),t,n,e)}function Ry(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._y0,u=e._x1,c=e._y1,f,h,p,d,m,g,y,b;if(!o)return e._root=a,e;for(;o.length;)if((m=t>=(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,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&n===d)return a.next=o,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(m=t>=(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,e}function o8(e){var t,n,r=e.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,t=e[n]))||isNaN(o=+this._y.call(null,t))||(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],e[n]);return this}function a8(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n||1,s=this._root,l,u;n>e||e>=i||r>t||t>=o;)switch(u=(t<r)<<1|e<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 e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function l8(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function u8(e,t,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 qe(p,i,o,c,f)),n==null?n=1/0:(i=e-n,o=t-n,c=e+n,f=t+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 qe(p[3],g,y,l,u),new qe(p[2],a,y,g,u),new qe(p[1],g,s,l,y),new qe(p[0],a,s,g,y)),(m=(t>=y)<<1|e>=g)&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-m],h[h.length-1-m]=d)}else{var b=e-+this._x.call(null,p.data),v=t-+this._y.call(null,p.data),x=b*b+v*v;if(x<n){var _=Math.sqrt(n=x);i=e-_,o=t-_,c=e+_,f=t+_,r=p.data}}return r}function c8(e){if(isNaN(c=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,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,t=n,!(n=n[g=m<<1|d]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,y=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[g]=o:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function f8(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function h8(){return this._root}function p8(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function d8(e){var t=[],n,r=this._root,i,o,a,s,l;for(r&&t.push(new qe(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(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])&&t.push(new qe(i,u,c,s,l)),(i=r[2])&&t.push(new qe(i,o,c,u,l)),(i=r[1])&&t.push(new qe(i,u,a,s,c)),(i=r[0])&&t.push(new qe(i,o,a,u,c))}return this}function g8(e){var t=[],n=[],r;for(this._root&&t.push(new qe(this._root,this._x0,this._y0,this._x1,this._y1));r=t.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])&&t.push(new qe(o,a,s,c,f)),(o=i[1])&&t.push(new qe(o,c,s,l,f)),(o=i[2])&&t.push(new qe(o,a,f,c,u)),(o=i[3])&&t.push(new qe(o,c,f,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function m8(e){return e[0]}function y8(e){return arguments.length?(this._x=e,this):this._x}function b8(e){return e[1]}function x8(e){return arguments.length?(this._y=e,this):this._y}function Ys(e,t,n){var r=new If(t??m8,n??b8,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function If(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Ey(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Ze=Ys.prototype=If.prototype;Ze.copy=function(){var e=new If(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Ey(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=Ey(r));return e},Ze.add=i8,Ze.addAll=o8,Ze.cover=a8,Ze.data=s8,Ze.extent=l8,Ze.find=u8,Ze.remove=c8,Ze.removeAll=f8,Ze.root=h8,Ze.size=p8,Ze.visit=d8,Ze.visitAfter=g8,Ze.x=y8,Ze.y=x8;function Re(e){return function(){return e}}function Cn(e){return(e()-.5)*1e-6}function v8(e){return e.x+e.vx}function $8(e){return e.y+e.vy}function Ws(e){var t,n,r,i=1,o=1;typeof e!="function"&&(e=Re(e==null?1:+e));function a(){for(var u,c=t.length,f,h,p,d,m,g,y=0;y<o;++y)for(f=Ys(t,v8,$8).visitAfter(s),u=0;u<c;++u)h=t[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(t){var u,c=t.length,f;for(n=new Array(c),u=0;u<c;++u)f=t[u],n[f.index]=+e(f,u,t)}}return a.initialize=function(u,c){t=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?(e=typeof u=="function"?u:Re(+u),l(),a):e},a}function _8(e){return e.index}function Iy(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Bf(e){var t=_8,n=f,r,i=Re(30),o,a,s,l,u,c=1;e==null&&(e=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function h(g){for(var y=0,b=e.length;y<c;++y)for(var v=0,x,_,A,w,P,C,B;v<b;++v)x=e[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=e.length,v=new Map(a.map((_,A)=>[t(_,A,a),_])),x;for(g=0,s=new Array(y);g<b;++g)x=e[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=e[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=e.length;g<y;++g)r[g]=+n(e[g],g,e)}function m(){if(a)for(var g=0,y=e.length;g<y;++g)o[g]=+i(e[g],g,e)}return h.initialize=function(g,y){a=g,u=y,p()},h.links=function(g){return arguments.length?(e=g,p(),h):e},h.id=function(g){return arguments.length?(t=g,h):t},h.iterations=function(g){return arguments.length?(c=+g,h):c},h.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Re(+g),d(),h):n},h.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Re(+g),m(),h):i},h}const w8=1664525,S8=1013904223,By=4294967296;function T8(){let e=1;return()=>(e=(w8*e+S8)%By)/By}function A8(e){return e.x}function P8(e){return e.y}var D8=10,C8=Math.PI*(3-Math.sqrt(5));function Xs(e){var t,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();e==null&&(e=[]);function f(){h(),u.call("tick",t),n<r&&(l.stop(),u.call("end",t))}function h(m){var g,y=e.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=e[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 t}function p(){for(var m=0,g=e.length,y;m<g;++m){if(y=e[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(e,c),m}return p(),t={tick:h,restart:function(){return l.restart(f),t},stop:function(){return l.stop(),t},nodes:function(m){return arguments.length?(e=m,p(),s.forEach(d),t):e},alpha:function(m){return arguments.length?(n=+m,t):n},alphaMin:function(m){return arguments.length?(r=+m,t):r},alphaDecay:function(m){return arguments.length?(i=+m,t):+i},alphaTarget:function(m){return arguments.length?(o=+m,t):o},velocityDecay:function(m){return arguments.length?(a=1-m,t):1-a},randomSource:function(m){return arguments.length?(c=m,s.forEach(d),t):c},force:function(m,g){return arguments.length>1?(g==null?s.delete(m):s.set(m,d(g)),t):s.get(m)},find:function(m,g,y){var b=0,v=e.length,x,_,A,w,P;for(y==null?y=1/0:y*=y,b=0;b<v;++b)w=e[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),t):u.on(m)}}}function Vs(){var e,t,n,r,i=Re(-30),o,a=1,s=1/0,l=.81;function u(p){var d,m=e.length,g=Ys(e,A8,P8).visitAfter(f);for(r=p,d=0;d<m;++d)t=e[d],g.visit(h)}function c(){if(e){var p,d=e.length,m;for(o=new Array(d),p=0;p<d;++p)m=e[p],o[m.index]=+i(m,p,e)}}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-t.x,b=p.y-t.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)),t.vx+=y*p.value*r/x,t.vy+=b*p.value*r/x),!0;if(p.length||x>=s)return;(p.data!==t||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!==t&&(v=o[p.data.index]*r/x,t.vx+=y*v,t.vy+=b*v);while(p=p.next)}return u.initialize=function(p,d){e=p,n=d,c()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Re(+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(e,t,n){var r,i=Re(.1),o,a;typeof e!="function"&&(e=Re(+e)),t==null&&(t=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-t||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]=+e(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:Re(+u),l(),s):i},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Re(+u),l(),s):e},s.x=function(u){return arguments.length?(t=+u,s):t},s.y=function(u){return arguments.length?(n=+u,s):n},s}function Ny(e){var t=Re(.1),n,r,i;typeof e!="function"&&(e=Re(e==null?0:+e));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]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Re(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Re(+s),a(),o):e},o}function Fy(e){var t=Re(.1),n,r,i;typeof e!="function"&&(e=Re(e==null?0:+e));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]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Re(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Re(+s),a(),o):e},o}function L8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Us(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function pi(e){return e=Us(Math.abs(e)),e?e[1]:NaN}function k8(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[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=e[a=(a+1)%e.length];return o.reverse().join(t)}}function R8(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var E8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function di(e){if(!(t=E8.exec(e)))throw new Error("invalid format: "+e);var t;return new Hs({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}di.prototype=Hs.prototype;function Hs(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.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(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var zy;function B8(e,t){var n=Us(e,t);if(!n)return e+"";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(e,Math.max(0,t+o-1))[0]}function Oy(e,t){var n=Us(e,t);if(!n)return e+"";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={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:L8,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Oy(e*100,t),r:Oy,s:B8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Yy(e){return e}var Wy=Array.prototype.map,Xy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vy(e){var t=e.grouping===void 0||e.thousands===void 0?Yy:k8(Wy.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Yy:R8(Wy.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.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&&($=t($,1/0));var z=k.length+$.length+M.length,I=z<y?new Array(y-z+1).join(h):"";switch(b&&g&&($=t(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(e){return js=Vy(e),Mo=js.format,Nf=js.formatPrefix,js}function Hy(e){return Math.max(0,-pi(Math.abs(e)))}function jy(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pi(t)/3)))*3-pi(Math.abs(e)))}function qy(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pi(t)-pi(e))+1}var oe=1e-6,Lo=1e-12,he=Math.PI,Ae=he/2,qs=he/4,Ke=he*2,ve=180/he,ae=he/180,ge=Math.abs,gi=Math.atan,Qe=Math.atan2,re=Math.cos,Zs=Math.ceil,Zy=Math.exp,Ff=Math.hypot,Ks=Math.log,zf=Math.pow,te=Math.sin,$t=Math.sign||function(e){return e>0?1:e<0?-1:0},Ne=Math.sqrt,Of=Math.tan;function Ky(e){return e>1?0:e<-1?he:Math.acos(e)}function Je(e){return e>1?Ae:e<-1?-Ae:Math.asin(e)}function Qy(e){return(e=te(e/2))*e}function Se(){}function Qs(e,t){e&&e1.hasOwnProperty(e.type)&&e1[e.type](e,t)}var Jy={Feature:function(e,t){Qs(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Qs(n[r].geometry,t)}},e1={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Gf(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Gf(n[r],t,0)},Polygon:function(e,t){t1(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)t1(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Qs(n[r],t)}};function Gf(e,t,n){var r=-1,i=e.length-n,o;for(t.lineStart();++r<i;)o=e[r],t.point(o[0],o[1],o[2]);t.lineEnd()}function t1(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Gf(e[n],t,1);t.polygonEnd()}function Bt(e,t){e&&Jy.hasOwnProperty(e.type)?Jy[e.type](e,t):Qs(e,t)}var Js=new ke,el=new ke,n1,r1,Yf,Wf,Xf,Ht={point:Se,lineStart:Se,lineEnd:Se,polygonStart:function(){Js=new ke,Ht.lineStart=N8,Ht.lineEnd=F8},polygonEnd:function(){var e=+Js;el.add(e<0?Ke+e:e),this.lineStart=this.lineEnd=this.point=Se},sphere:function(){el.add(Ke)}};function N8(){Ht.point=z8}function F8(){i1(n1,r1)}function z8(e,t){Ht.point=i1,n1=e,r1=t,e*=ae,t*=ae,Yf=e,Wf=re(t=t/2+qs),Xf=te(t)}function i1(e,t){e*=ae,t*=ae,t=t/2+qs;var n=e-Yf,r=n>=0?1:-1,i=r*n,o=re(t),a=te(t),s=Xf*a,l=Wf*o+s*re(i),u=s*r*te(i);Js.add(Qe(u,l)),Yf=e,Wf=o,Xf=a}function O8(e){return el=new ke,Bt(e,Ht),el*2}function tl(e){return[Qe(e[1],e[0]),Je(e[2])]}function dr(e){var t=e[0],n=e[1],r=re(n);return[r*re(t),r*te(t),te(n)]}function nl(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function mi(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Vf(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function rl(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function il(e){var t=Ne(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Te,ut,Pe,mt,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 ke,Ht.polygonStart()},polygonEnd:function(){Ht.polygonEnd(),un.point=Uf,un.lineStart=l1,un.lineEnd=u1,Js<0?(Te=-(Pe=180),ut=-(mt=90)):ko>oe?mt=90:ko<-oe&&(ut=-90),ln[0]=Te,ln[1]=Pe},sphere:function(){Te=-(Pe=180),ut=-(mt=90)}};function Uf(e,t){Mn.push(ln=[Te=e,Pe=e]),t<ut&&(ut=t),t>mt&&(mt=t)}function s1(e,t){var n=dr([e*ae,t*ae]);if(yi){var r=mi(yi,n),i=[r[1],-r[0],0],o=mi(i,r);il(o),o=tl(o);var a=e-gr,s=a>0?1:-1,l=o[0]*ve*s,u,c=ge(a)>180;c^(s*gr<l&&l<s*e)?(u=o[1]*ve,u>mt&&(mt=u)):(l=(l+360)%360-180,c^(s*gr<l&&l<s*e)?(u=-o[1]*ve,u<ut&&(ut=u)):(t<ut&&(ut=t),t>mt&&(mt=t))),c?e<gr?yt(Te,e)>yt(Te,Pe)&&(Pe=e):yt(e,Pe)>yt(Te,Pe)&&(Te=e):Pe>=Te?(e<Te&&(Te=e),e>Pe&&(Pe=e)):e>gr?yt(Te,e)>yt(Te,Pe)&&(Pe=e):yt(e,Pe)>yt(Te,Pe)&&(Te=e)}else Mn.push(ln=[Te=e,Pe=e]);t<ut&&(ut=t),t>mt&&(mt=t),yi=n,gr=e}function l1(){un.point=s1}function u1(){ln[0]=Te,ln[1]=Pe,un.point=Uf,yi=null}function c1(e,t){if(yi){var n=e-gr;ko.add(ge(n)>180?n+(n>0?360:-360):n)}else o1=e,a1=t;Ht.point(e,t),s1(e,t)}function G8(){Ht.lineStart()}function Y8(){c1(o1,a1),Ht.lineEnd(),ge(ko)>oe&&(Te=-(Pe=180)),ln[0]=Te,ln[1]=Pe,yi=null}function yt(e,t){return(t-=e)<0?t+360:t}function W8(e,t){return e[0]-t[0]}function f1(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function X8(e){var t,n,r,i,o,a,s;if(mt=Pe=-(Te=ut=1/0),Mn=[],Bt(e,un),n=Mn.length){for(Mn.sort(W8),t=1,r=Mn[0],o=[r];t<n;++t)i=Mn[t],f1(r,i[0])||f1(r,i[1])?(yt(r[0],i[1])>yt(r[0],r[1])&&(r[1]=i[1]),yt(i[0],r[1])>yt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,t=0,r=o[n];t<=n;r=i,++t)i=o[t],(s=yt(r[1],i[0]))>a&&(a=s,Te=i[0],Pe=r[1])}return Mn=ln=null,Te===1/0||ut===1/0?[[NaN,NaN],[NaN,NaN]]:[[Te,ut],[Pe,mt]]}var Ro,ol,al,sl,ll,ul,cl,fl,Hf,jf,qf,h1,p1,et,tt,nt,Nt={sphere:Se,point:Zf,lineStart:d1,lineEnd:g1,polygonStart:function(){Nt.lineStart=H8,Nt.lineEnd=j8},polygonEnd:function(){Nt.lineStart=d1,Nt.lineEnd=g1}};function Zf(e,t){e*=ae,t*=ae;var n=re(t);Eo(n*re(e),n*te(e),te(t))}function Eo(e,t,n){++Ro,al+=(e-al)/Ro,sl+=(t-sl)/Ro,ll+=(n-ll)/Ro}function d1(){Nt.point=V8}function V8(e,t){e*=ae,t*=ae;var n=re(t);et=n*re(e),tt=n*te(e),nt=te(t),Nt.point=U8,Eo(et,tt,nt)}function U8(e,t){e*=ae,t*=ae;var n=re(t),r=n*re(e),i=n*te(e),o=te(t),a=Qe(Ne((a=tt*o-nt*i)*a+(a=nt*r-et*o)*a+(a=et*i-tt*r)*a),et*r+tt*i+nt*o);ol+=a,ul+=a*(et+(et=r)),cl+=a*(tt+(tt=i)),fl+=a*(nt+(nt=o)),Eo(et,tt,nt)}function g1(){Nt.point=Zf}function H8(){Nt.point=q8}function j8(){m1(h1,p1),Nt.point=Zf}function q8(e,t){h1=e,p1=t,e*=ae,t*=ae,Nt.point=m1;var n=re(t);et=n*re(e),tt=n*te(e),nt=te(t),Eo(et,tt,nt)}function m1(e,t){e*=ae,t*=ae;var n=re(t),r=n*re(e),i=n*te(e),o=te(t),a=tt*o-nt*i,s=nt*r-et*o,l=et*i-tt*r,u=Ff(a,s,l),c=Je(u),f=u&&-c/u;Hf.add(f*a),jf.add(f*s),qf.add(f*l),ol+=c,ul+=c*(et+(et=r)),cl+=c*(tt+(tt=i)),fl+=c*(nt+(nt=o)),Eo(et,tt,nt)}function Z8(e){Ro=ol=al=sl=ll=ul=cl=fl=0,Hf=new ke,jf=new ke,qf=new ke,Bt(e,Nt);var t=+Hf,n=+jf,r=+qf,i=Ff(t,n,r);return i<Lo&&(t=ul,n=cl,r=fl,ol<oe&&(t=al,n=sl,r=ll),i=Ff(t,n,r),i<Lo)?[NaN,NaN]:[Qe(n,t)*ve,Je(r/i)*ve]}function bi(e){return function(){return e}}function Kf(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function Qf(e,t){return ge(e)>he&&(e-=Math.round(e/Ke)*Ke),[e,t]}Qf.invert=Qf;function Jf(e,t,n){return(e%=Ke)?t||n?Kf(b1(e),x1(t,n)):b1(e):t||n?x1(t,n):Qf}function y1(e){return function(t,n){return t+=e,ge(t)>he&&(t-=Math.round(t/Ke)*Ke),[t,n]}}function b1(e){var t=y1(e);return t.invert=y1(-e),t}function x1(e,t){var n=re(e),r=te(e),i=re(t),o=te(t);function a(s,l){var u=re(l),c=re(s)*u,f=te(s)*u,h=te(l),p=h*n+c*r;return[Qe(f*i-p*o,c*n-h*r),Je(p*i+f*o)]}return a.invert=function(s,l){var u=re(l),c=re(s)*u,f=te(s)*u,h=te(l),p=h*i-f*o;return[Qe(f*i+h*o,c*n+p*r),Je(p*n-c*r)]},a}function v1(e){e=Jf(e[0]*ae,e[1]*ae,e.length>2?e[2]*ae:0);function t(n){return n=e(n[0]*ae,n[1]*ae),n[0]*=ve,n[1]*=ve,n}return t.invert=function(n){return n=e.invert(n[0]*ae,n[1]*ae),n[0]*=ve,n[1]*=ve,n},t}function $1(e,t,n,r,i,o){if(n){var a=re(t),s=te(t),l=r*n;i==null?(i=t+r*Ke,o=t-l/2):(i=_1(a,i),o=_1(a,o),(r>0?i<o:i>o)&&(i+=r*Ke));for(var u,c=i;r>0?c>o:c<o;c-=l)u=tl([a,-s*re(c),-s*te(c)]),e.point(u[0],u[1])}}function _1(e,t){t=dr(t),t[0]-=e,il(t);var n=Ky(-t[1]);return((-t[2]<0?-n:n)+Ke-oe)%Ke}function K8(){var e=bi([0,0]),t=bi(90),n=bi(2),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=ve,l[1]*=ve}function s(){var l=e.apply(this,arguments),u=t.apply(this,arguments)*ae,c=n.apply(this,arguments)*ae;return r=[],i=Jf(-l[0]*ae,-l[1]*ae,0).invert,$1(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:bi([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:bi(+l),s):t},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:bi(+l),s):n},s}function w1(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Se,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function hl(e,t){return ge(e[0]-t[0])<oe&&ge(e[1]-t[1])<oe}function pl(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function S1(e,t,n,r,i){var o=[],a=[],s,l;if(e.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*oe}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(t),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(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function eh(e){return ge(e[0])<=he?e[0]:$t(e[0])*((ge(e[0])+he)%Ke-he)}function A1(e,t){var n=eh(t),r=t[1],i=te(r),o=[te(n),-re(n),0],a=0,s=0,l=new ke;i===1?r=Ae+oe:i===-1&&(r=-Ae-oe);for(var u=0,c=e.length;u<c;++u)if(h=(f=e[u]).length)for(var f,h,p=f[h-1],d=eh(p),m=p[1]/2+qs,g=te(m),y=re(m),b=0;b<h;++b,d=x,g=A,y=w,p=v){var v=f[b],x=eh(v),_=v[1]/2+qs,A=te(_),w=re(_),P=x-d,C=P>=0?1:-1,B=C*P,$=B>he,k=g*A;if(l.add(Qe(k*C*te(B),y*w+k*re(B))),a+=$?P+C*Ke: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)*Je(T[2]);(r>S||r===S&&(M[0]||M[1]))&&(s+=$^P>=0?1:-1)}}return(a<-oe||a<oe&&l<-Lo)^s&1}function P1(e,t,n,r){return function(i){var o=t(i),a=w1(),s=t(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,_){e(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(e){return e.length>1}function J8(e,t){return((e=e.x)[0]<0?e[1]-Ae-oe:Ae-e[1])-((t=t.x)[0]<0?t[1]-Ae-oe:Ae-t[1])}const th=P1(function(){return!0},e4,n4,[-he,-Ae]);function e4(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?he:-he,l=ge(o-t);ge(l-he)<oe?(e.point(t,n=(n+a)/2>0?Ae:-Ae),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(o,n),i=0):r!==s&&l>=he&&(ge(t-r)<oe&&(t-=r*oe),ge(o-s)<oe&&(o-=s*oe),n=t4(t,n,o,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=o,n=a),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function t4(e,t,n,r){var i,o,a=te(e-n);return ge(a)>oe?gi((te(t)*(o=re(r))*te(n)-te(r)*(i=re(t))*te(e))/(i*o*a)):(t+r)/2}function n4(e,t,n,r){var i;if(e==null)i=n*Ae,r.point(-he,i),r.point(0,i),r.point(he,i),r.point(he,0),r.point(he,-i),r.point(0,-i),r.point(-he,-i),r.point(-he,0),r.point(-he,i);else if(ge(e[0]-t[0])>oe){var o=e[0]<t[0]?he:-he;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function D1(e){var t=re(e),n=2*ae,r=t>0,i=ge(t)>oe;function o(c,f,h,p){$1(p,e,n,h,c,f)}function a(c,f){return re(c)*re(f)>t}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?he:-he),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=t*y/v,_=-t*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=Ne(k),T=rl(C,(-B-M)/$);if(Vf(T,w),T=tl(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=ge(N-he)<oe,O=E||N<oe;if(!E&&z<F&&(I=F,F=z,z=I),O?E?F+z>0^T[1]<(ge(T[0]-S)<oe?F:z):F<=T[1]&&T[1]<=z:N>he^(S<=T[0]&&T[0]<=D)){var j=rl(C,(-B+M)/$);return Vf(j,w),[T,tl(j)]}}}function u(c,f){var h=r?e:he-e,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,-e]:[-he,e-he])}function r4(e,t,n,r,i,o){var a=e[0],s=e[1],l=t[0],u=t[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&&(e[0]=a+c*h,e[1]=s+c*p),f<1&&(t[0]=a+f*h,t[1]=s+f*p),!0}}}}}var Io=1e9,dl=-Io;function gl(e,t,n,r){function i(u,c){return e<=u&&u<=n&&t<=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?e:n,p>1?r:t);while((p=(p+f+4)%4)!==d);else h.point(c[0],c[1])}function a(u,c){return ge(u[0]-e)<oe?c>0?0:3:ge(u[0]-n)<oe?c>0?2:1:ge(u[1]-t)<oe?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,ie=E[0],W=E[1];I<N;++I)O=ie,j=W,E=z[I],ie=E[0],W=E[1],j<=r?W>r&&(ie-O)*(r-j)>(W-j)*(e-O)&&++S:W<=r&&(ie-O)*(r-j)<(W-j)*(e-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,e,t,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 e=0,t=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=gl(e,t,n,r)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[e,t],[n,r]]}}}var nh,rh,ml,yl,xi={sphere:Se,point:Se,lineStart:o4,lineEnd:Se,polygonStart:Se,polygonEnd:Se};function o4(){xi.point=s4,xi.lineEnd=a4}function a4(){xi.point=xi.lineEnd=Se}function s4(e,t){e*=ae,t*=ae,rh=e,ml=te(t),yl=re(t),xi.point=l4}function l4(e,t){e*=ae,t*=ae;var n=te(t),r=re(t),i=ge(e-rh),o=re(i),a=te(i),s=r*a,l=yl*n-ml*r*o,u=ml*n+yl*r*o;nh.add(Qe(Ne(s*s+l*l),u)),rh=e,ml=n,yl=r}function C1(e){return nh=new ke,Bt(e,xi),+nh}var ih=[null,null],u4={type:"LineString",coordinates:ih};function bl(e,t){return ih[0]=e,ih[1]=t,C1(u4)}var M1={Feature:function(e,t){return xl(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(xl(n[r].geometry,t))return!0;return!1}},L1={Sphere:function(){return!0},Point:function(e,t){return k1(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(k1(n[r],t))return!0;return!1},LineString:function(e,t){return R1(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(R1(n[r],t))return!0;return!1},Polygon:function(e,t){return E1(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(E1(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(xl(n[r],t))return!0;return!1}};function xl(e,t){return e&&L1.hasOwnProperty(e.type)?L1[e.type](e,t):!1}function k1(e,t){return bl(e,t)===0}function R1(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(r=bl(e[o],t),r===0||o>0&&(i=bl(e[o],e[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(e,t){return!!A1(e.map(c4),I1(t))}function c4(e){return e=e.map(I1),e.pop(),e}function I1(e){return[e[0]*ae,e[1]*ae]}function f4(e,t){return(e&&M1.hasOwnProperty(e.type)?M1[e.type]:xl)(e,t)}function B1(e,t,n){var r=Sn(e,t-oe,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function N1(e,t,n){var r=Sn(e,t-oe,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function F1(){var e,t,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(t/l)*l,e,l).filter(function(v){return ge(v%c)>oe}).map(h)).concat(Sn(Zs(o/u)*u,i,u).filter(function(v){return ge(v%f)>oe}).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?(t=+v[0][0],e=+v[1][0],o=+v[0][1],i=+v[1][1],t>e&&(v=t,t=e,e=v),o>i&&(v=o,o=i,i=v),y.precision(g)):[[t,o],[e,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(t,e,g),d=B1(s,a,90),m=N1(r,n,g),y):g},y.extentMajor([[-180,-90+oe],[180,90-oe]]).extentMinor([[-180,-80-oe],[180,80+oe]])}function h4(){return F1()()}function p4(e,t){var n=e[0]*ae,r=e[1]*ae,i=t[0]*ae,o=t[1]*ae,a=re(r),s=te(r),l=re(o),u=te(o),c=a*re(n),f=a*te(n),h=l*re(i),p=l*te(i),d=2*Je(Ne(Qy(o-r)+a*l*Qy(i-n))),m=te(d),g=d?function(y){var b=te(y*=d)/m,v=te(d-y)/m,x=v*c+b*h,_=v*f+b*p,A=v*s+b*u;return[Qe(_,x)*ve,Qe(A,Ne(x*x+_*_))*ve]}:function(){return[n*ve,r*ve]};return g.distance=d,g}const Bo=e=>e;var oh=new ke,ah=new ke,z1,O1,sh,lh,cn={point:Se,lineStart:Se,lineEnd:Se,polygonStart:function(){cn.lineStart=d4,cn.lineEnd=m4},polygonEnd:function(){cn.lineStart=cn.lineEnd=cn.point=Se,oh.add(ge(ah)),ah=new ke},result:function(){var e=oh/2;return oh=new ke,e}};function d4(){cn.point=g4}function g4(e,t){cn.point=G1,z1=sh=e,O1=lh=t}function G1(e,t){ah.add(lh*e-sh*t),sh=e,lh=t}function m4(){G1(z1,O1)}var vi=1/0,vl=vi,No=-vi,$l=No,_l={point:y4,lineStart:Se,lineEnd:Se,polygonStart:Se,polygonEnd:Se,result:function(){var e=[[vi,vl],[No,$l]];return No=$l=-(vl=vi=1/0),e}};function y4(e,t){e<vi&&(vi=e),e>No&&(No=e),t<vl&&(vl=t),t>$l&&($l=t)}var uh=0,ch=0,Fo=0,wl=0,Sl=0,$i=0,fh=0,hh=0,zo=0,Y1,W1,jt,qt,_t={point:mr,lineStart:X1,lineEnd:V1,polygonStart:function(){_t.lineStart=v4,_t.lineEnd=$4},polygonEnd:function(){_t.point=mr,_t.lineStart=X1,_t.lineEnd=V1},result:function(){var e=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,e}};function mr(e,t){uh+=e,ch+=t,++Fo}function X1(){_t.point=b4}function b4(e,t){_t.point=x4,mr(jt=e,qt=t)}function x4(e,t){var n=e-jt,r=t-qt,i=Ne(n*n+r*r);wl+=i*(jt+e)/2,Sl+=i*(qt+t)/2,$i+=i,mr(jt=e,qt=t)}function V1(){_t.point=mr}function v4(){_t.point=_4}function $4(){U1(Y1,W1)}function _4(e,t){_t.point=U1,mr(Y1=jt=e,W1=qt=t)}function U1(e,t){var n=e-jt,r=t-qt,i=Ne(n*n+r*r);wl+=i*(jt+e)/2,Sl+=i*(qt+t)/2,$i+=i,i=qt*e-jt*t,fh+=i*(jt+e),hh+=i*(qt+t),zo+=i*3,mr(jt=e,qt=t)}function H1(e){this._context=e}H1.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ke);break}}},result:Se};var ph=new ke,dh,j1,q1,Oo,Go,Yo={point:Se,lineStart:function(){Yo.point=w4},lineEnd:function(){dh&&Z1(j1,q1),Yo.point=Se},polygonStart:function(){dh=!0},polygonEnd:function(){dh=null},result:function(){var e=+ph;return ph=new ke,e}};function w4(e,t){Yo.point=Z1,j1=Oo=e,q1=Go=t}function Z1(e,t){Oo-=e,Go-=t,ph.add(Ne(Oo*Oo+Go*Go)),Oo=e,Go=t}let K1,Tl,Q1,J1;class eb{constructor(t){this._append=t==null?tb:S4(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${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 t=this._;return this._="",t.length?t:null}}function tb(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function S4(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return tb;if(t!==K1){const n=10**t;K1=t,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(e,t){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Bt(s,i(o))),o.result()}return a.area=function(s){return Bt(s,i(cn)),cn.result()},a.measure=function(s){return Bt(s,i(Yo)),Yo.result()},a.bounds=function(s){return Bt(s,i(_l)),_l.result()},a.centroid=function(s){return Bt(s,i(_t)),_t.result()},a.projection=function(s){return arguments.length?(i=s==null?(e=null,Bo):(e=s).stream,a):e},a.context=function(s){return arguments.length?(o=s==null?(t=null,new eb(n)):new H1(t=s),typeof r!="function"&&o.pointRadius(r),a):t},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 t===null&&(o=new eb(n)),a},a.projection(e).digits(n).context(t)}function A4(e){return{stream:Wo(e)}}function Wo(e){return function(t){var n=new gh;for(var r in e)n[r]=e[r];return n.stream=t,n}}function gh(){}gh.prototype={constructor:gh,point:function(e,t){this.stream.point(e,t)},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(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Bt(n,e.stream(_l)),t(_l.result()),r!=null&&e.clipExtent(r),e}function Al(e,t,n){return mh(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,l])},n)}function yh(e,t,n){return Al(e,[[0,0],t],n)}function bh(e,t,n){return mh(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];e.scale(150*o).translate([a,s])},n)}function xh(e,t,n){return mh(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])},n)}var nb=16,P4=re(30*ae);function rb(e,t){return+t?C4(e,t):D4(e)}function D4(e){return Wo({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function C4(e,t){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*t&&m--){var x=a+h,_=s+p,A=l+d,w=Ne(x*x+_*_+A*A),P=Je(A/=w),C=ge(ge(A)-1)<oe||ge(o-f)<oe?(o+f)/2:Qe(_,x),B=e(C,P),$=B[0],k=B[1],M=$-r,T=k-i,S=b*M-y*T;(S*S/v>t||ge((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=e(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]),$=e(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(e,t){this.stream.point(e*ae,t*ae)}});function L4(e){return Wo({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function k4(e,t,n,r,i){function o(a,s){return a*=r,s*=i,[t+e*a,n-e*s]}return o.invert=function(a,s){return[(a-t)/e*r,(n-s)/e*i]},o}function ib(e,t,n,r,i,o){if(!o)return k4(e,t,n,r,i);var a=re(o),s=te(o),l=a*e,u=s*e,c=a/e,f=s/e,h=(s*n-a*t)/e,p=(s*t+a*n)/e;function d(m,g){return m*=r,g*=i,[l*m-u*g+t,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 Zt(e){return vh(function(){return e})()}function vh(e){var t,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=th,g=null,y,b,v,x=Bo,_=.5,A,w,P,C,B;function $(S){return P(S[0]*ae,S[1]*ae)}function k(S){return S=P.invert(S[0],S[1]),S&&[S[0]*ve,S[1]*ve]}$.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*ae):(d=null,th),T()):d*ve},$.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*ae,a=S[1]%360*ae,M()):[o*ve,a*ve]},$.rotate=function(S){return arguments.length?(s=S[0]%360*ae,l=S[1]%360*ae,u=S.length>2?S[2]%360*ae:0,M()):[s*ve,l*ve,u*ve]},$.angle=function(S){return arguments.length?(f=S%360*ae,M()):f*ve},$.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()):Ne(_)},$.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,t(o,a)),D=ib(n,r-S[0],i-S[1],h,p,f);return c=Jf(s,l,u),w=Kf(t,D),P=Kf(c,w),A=rb(w,_),T()}function T(){return C=B=null,$}return function(){return t=e.apply(this,arguments),$.invert=t.invert&&k,M()}}function $h(e){var t=0,n=he/3,r=vh(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*ae,n=o[1]*ae):[t*ve,n*ve]},i}function R4(e){var t=re(e);function n(r,i){return[r*t,te(i)/t]}return n.invert=function(r,i){return[r/t,Je(i*t)]},n}function ob(e,t){var n=te(e),r=(n+te(t))/2;if(ge(r)<oe)return R4(e);var i=1+n*(2*r-n),o=Ne(i)/r;function a(s,l){var u=Ne(i-2*r*te(l))/r;return[u*te(s*=r),o-u*re(s)]}return a.invert=function(s,l){var u=o-l,c=Qe(s,ge(u))*$t(u);return u*r<0&&(c-=he*$t(s)*$t(u)),[c/r,Je((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(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function I4(){var e,t,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 e&&t===h?e:e=E4([n.stream(t=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+oe,m+.12*p+oe],[d-.214*p-oe,m+.234*p-oe]]).stream(u),s=a.translate([d-.205*p,m+.212*p]).clipExtent([[d-.214*p+oe,m+.166*p+oe],[d-.115*p-oe,m+.234*p-oe]]).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 e=t=null,c}return c.scale(1070)}function sb(e){return function(t,n){var r=re(t),i=re(n),o=e(r*i);return o===1/0?[2,0]:[o*i*te(t),o*te(n)]}}function Xo(e){return function(t,n){var r=Ne(t*t+n*n),i=e(r),o=te(i),a=re(i);return[Qe(t*o,r*a),Je(r&&n*o/r)]}}var _h=sb(function(e){return Ne(2/(1+e))});_h.invert=Xo(function(e){return 2*Je(e/2)});function B4(){return Zt(_h).scale(124.75).clipAngle(180-.001)}var wh=sb(function(e){return(e=Ky(e))&&e/te(e)});wh.invert=Xo(function(e){return e});function N4(){return Zt(wh).scale(79.4188).clipAngle(180-.001)}function Vo(e,t){return[e,Ks(Of((Ae+t)/2))]}Vo.invert=function(e,t){return[e,2*gi(Zy(t))-Ae]};function F4(){return lb(Vo).scale(961/Ke)}function lb(e){var t=Zt(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,u;t.scale=function(f){return arguments.length?(r(f),c()):r()},t.translate=function(f){return arguments.length?(i(f),c()):i()},t.center=function(f){return arguments.length?(n(f),c()):n()},t.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=he*r(),h=t(v1(t.rotate()).invert([0,0]));return o(a==null?[[h[0]-f,h[1]-f],[h[0]+f,h[1]+f]]:e===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(e){return Of((Ae+e)/2)}function ub(e,t){var n=re(e),r=e===t?te(e):Ks(n/re(t))/Ks(Dl(t)/Dl(e)),i=n*zf(Dl(e),r)/r;if(!r)return Vo;function o(a,s){i>0?s<-Ae+oe&&(s=-Ae+oe):s>Ae-oe&&(s=Ae-oe);var l=i/zf(Dl(s),r);return[l*te(r*a),i-l*re(r*a)]}return o.invert=function(a,s){var l=i-s,u=$t(r)*Ne(a*a+l*l),c=Qe(a,ge(l))*$t(l);return l*r<0&&(c-=he*$t(a)*$t(l)),[c/r,2*gi(zf(i/u,1/r))-Ae]},o}function z4(){return $h(ub).scale(109.5).parallels([30,30])}function Uo(e,t){return[e,t]}Uo.invert=Uo;function O4(){return Zt(Uo).scale(152.63)}function cb(e,t){var n=re(e),r=e===t?te(e):(n-re(t))/(t-e),i=n/r+e;if(ge(r)<oe)return Uo;function o(a,s){var l=i-s,u=r*a;return[l*te(u),i-l*re(u)]}return o.invert=function(a,s){var l=i-s,u=Qe(a,ge(l))*$t(l);return l*r<0&&(u-=he*$t(a)*$t(l)),[u/r,i-$t(r)*Ne(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=Ne(3)/2,Y4=12;function Sh(e,t){var n=Je(Cl*te(t)),r=n*n,i=r*r*r;return[e*re(n)/(Cl*(Ho+3*jo*r+i*(7*qo+9*Zo*r))),n*(Ho+jo*r+i*(qo+Zo*r))]}Sh.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,o=0,a,s,l;o<Y4&&(s=n*(Ho+jo*r+i*(qo+Zo*r))-t,l=Ho+3*jo*r+i*(7*qo+9*Zo*r),n-=a=s/l,r=n*n,i=r*r*r,!(ge(a)<Lo));++o);return[Cl*e*(Ho+3*jo*r+i*(7*qo+9*Zo*r))/re(n),Je(te(n)/Cl)]};function W4(){return Zt(Sh).scale(177.158)}function Th(e,t){var n=re(t),r=re(e)*n;return[n*te(e)/r,te(t)/r]}Th.invert=Xo(gi);function X4(){return Zt(Th).scale(144.049).clipAngle(60)}function V4(){var e=1,t=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=e*r,p=e*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[_+t,A+n]}return v.invert=function(x){var _=x[0]-t,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?(e=+x,b()):e},v.translate=function(x){return arguments.length?(t=+x[0],n=+x[1],b()):[t,n]},v.angle=function(x){return arguments.length?(o=x%360*ae,s=te(o),a=re(o),b()):o*ve},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(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Ah.invert=function(e,t){var n=t,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ge(i)>oe&&--r>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function U4(){return Zt(Ah).scale(175.295)}function Ph(e,t){return[re(t)*te(e),te(t)]}Ph.invert=Xo(Je);function H4(){return Zt(Ph).scale(249.5).clipAngle(90+oe)}function Dh(e,t){var n=re(t),r=1+re(e)*n;return[n*te(e)/r,te(t)/r]}Dh.invert=Xo(function(e){return 2*gi(e)});function j4(){return Zt(Dh).scale(250).clipAngle(142)}function Ch(e,t){return[Ks(Of((Ae+t)/2)),-e]}Ch.invert=function(e,t){return[-t,2*gi(Zy(e))-Ae]};function q4(){var e=lb(Ch),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.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(e,t){return e.parent===t.parent?1:2}function K4(e){return e.reduce(Q4,0)/e.length}function Q4(e,t){return e+t.x}function J4(e){return 1+e.reduce(e7,0)}function e7(e,t){return Math.max(e,t.y)}function t7(e){for(var t;t=e.children;)e=t[0];return e}function n7(e){for(var t;t=e.children;)e=t[t.length-1];return e}function r7(){var e=Z4,t=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+=e(h,a):0,h.y=0,a=h)});var l=t7(o),u=n7(o),c=l.x-e(l,u)/2,f=u.x+e(u,l)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*t,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-c)/(f-c)*t,h.y=(1-(o.y?h.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function i7(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function o7(){return this.eachAfter(i7)}function a7(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function s7(e,t){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function l7(e,t){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();)e.call(t,n,++l,this);return this}function u7(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function c7(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function f7(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function h7(e){for(var t=this,n=p7(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function p7(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function d7(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function g7(){return Array.from(this)}function m7(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function y7(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*b7(){var e=this,t,n=[e],r,i,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Ml(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=$7)):t===void 0&&(t=v7);for(var n=new yr(e),r,i=[n],o,a,s,l;r=i.pop();)if((a=t(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(e){return e.children}function $7(e){return Array.isArray(e)?e[1]:null}function _7(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function fb(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function yr(e){this.data=e,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(e){return e==null?null:hb(e)}function hb(e){if(typeof e!="function")throw new Error;return e}function br(){return 0}function _i(e){return function(){return e}}const w7=1664525,S7=1013904223,pb=4294967296;function Mh(){let e=1;return()=>(e=(w7*e+S7)%pb)/pb}function T7(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function A7(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function P7(e){return db(e,Mh())}function db(e,t){for(var n=0,r=(e=A7(Array.from(e),t)).length,i=[],o,a;n<r;)o=e[n],a&&gb(a,o)?++n:(a=C7(i=D7(i,o)),n=0);return a}function D7(e,t){var n,r;if(Lh(t,e))return[t];for(n=0;n<e.length;++n)if(kl(t,e[n])&&Lh(Ko(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(kl(Ko(e[n],e[r]),t)&&kl(Ko(e[n],t),e[r])&&kl(Ko(e[r],t),e[n])&&Lh(mb(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function kl(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function gb(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Lh(e,t){for(var n=0;n<t.length;++n)if(!gb(e,t[n]))return!1;return!0}function C7(e){switch(e.length){case 1:return M7(e[0]);case 2:return Ko(e[0],e[1]);case 3:return mb(e[0],e[1],e[2])}}function M7(e){return{x:e.x,y:e.y,r:e.r}}function Ko(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.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(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.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(e,t,n){var r=e.x-t.x,i,o,a=e.y-t.y,s,l,u=r*r+a*a;u?(o=t.r+n.r,o*=o,l=e.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=e.x-i*r-s*a,n.y=e.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=t.x+i*r-s*a,n.y=t.y+i*a+s*r)):(n.x=t.x+n.r,n.y=t.y)}function bb(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function xb(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function Rl(e){this._=e,this.next=null,this.previous=null}function vb(e,t){if(!(o=(e=T7(e)).length))return 0;var n,r,i,o,a,s,l,u,c,f,h;if(n=e[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;yb(r,n,i=e[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;e:for(l=3;l<o;++l){yb(n._,r._,i=e[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 e}f+=u._.r,u=u.next}else{if(bb(c._,i._)){n=c,n.next=r,r.previous=n,--l;continue e}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,t),l=0;l<o;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function L7(e){return vb(e,Mh()),e}function k7(e){return Math.sqrt(e.value)}function R7(){var e=null,t=1,n=1,r=br;function i(o){const a=Mh();return o.x=t/2,o.y=n/2,e?o.eachBefore($b(e)).eachAfter(kh(r,.5,a)).eachBefore(_b(1)):o.eachBefore($b(k7)).eachAfter(kh(br,1,a)).eachAfter(kh(r,o.r/Math.min(t,n),a)).eachBefore(_b(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=Ll(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:_i(+o),i):r},i}function $b(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function kh(e,t,n){return function(r){if(i=r.children){var i,o,a=i.length,s=e(r)*t||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(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function wb(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Qo(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function E7(){var e=1,t=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=e,a.y1=t/s,a.eachBefore(o(t,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?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var I7={depth:-1},Sb={},Rh={};function B7(e){return e.id}function N7(e){return e.parentId}function F7(){var e=B7,t=N7,n;function r(i){var o=Array.from(i),a=e,s=t,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?(e=Ll(i),r):e},r.parentId=function(i){return arguments.length?(t=Ll(i),r):t},r.path=function(i){return arguments.length?(n=Ll(i),r):n},r}function z7(e){e=`${e}`;let t=e.length;return Eh(e,t-1)&&!Eh(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Tb(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Eh(e,t););return e.slice(0,t)}function Eh(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function O7(e,t){return e.parent===t.parent?1:2}function Ih(e){var t=e.children;return t?t[0]:e.t}function Bh(e){var t=e.children;return t?t[t.length-1]:e.t}function G7(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Y7(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function W7(e,t,n){return e.a.parent===t.parent?e.a:n}function El(e,t){this._=e,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=t}El.prototype=Object.create(yr.prototype);function X7(e){for(var t=new El(e,0),n,r=[t],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(t.parent=new El(null,0)).children=[t],t}function V7(){var e=O7,t=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:e(f,h)/2,m=d-f.x,g=t/(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+e(u._,h._),u.m=u.z-p):u.z=p}else h&&(u.z=h.z+e(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+e(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*=t,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(r=!1,t=+u[0],n=+u[1],i):r?null:[t,n]},i.nodeSize=function(u){return arguments.length?(r=!0,t=+u[0],n=+u[1],i):r?[t,n]:null},i}function Il(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var Ab=(1+Math.sqrt(5))/2;function Pb(e,t,n,r,i,o){for(var a=[],s=t.children,l,u,c=0,f=0,h=s.length,p,d,m=t.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*e),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 e(t){function n(r,i,o,a,s){Pb(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Ab);function Db(){var e=Nh,t=!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],t&&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),e(h,d,m,g,y))}return c.round=function(h){return arguments.length?(t=!!h,c):t},c.size=function(h){return arguments.length?(n=+h[0],r=+h[1],c):[n,r]},c.tile=function(h){return arguments.length?(e=hb(h),c):e},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(e,t,n,r,i){var o=e.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,e.value,t,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(e,t,n,r,i){(e.depth&1?Il:Qo)(e,t,n,r,i)}const j7=function e(t){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===t)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(t,r,i,o,a,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Ab);function q7(e){for(var t=-1,n=e.length,r,i=e[n-1],o=0;++t<n;)r=i,i=e[t],o+=r[1]*i[0]-r[0]*i[1];return o/2}function Z7(e){for(var t=-1,n=e.length,r=0,i=0,o,a=e[n-1],s,l=0;++t<n;)o=a,a=e[t],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(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function Q7(e,t){return e[0]-t[0]||e[1]-t[1]}function Cb(e){const t=e.length,n=[0,1];let r=2,i;for(i=2;i<t;++i){for(;r>1&&K7(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function J7(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(Q7),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=Cb(r),a=Cb(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(t=o.length-1;t>=0;--t)u.push(e[r[o[t]][2]]);for(t=+s;t<a.length-l;++t)u.push(e[r[a[t]][2]]);return u}function ek(e,t){for(var n=e.length,r=e[n-1],i=t[0],o=t[1],a=r[0],s=r[1],l,u,c=!1,f=0;f<n;++f)r=e[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 tk(e){for(var t=-1,n=e.length,r=e[n-1],i,o,a=r[0],s=r[1],l=0;++t<n;)i=a,o=s,r=e[t],a=r[0],s=r[1],i-=a,o-=s,l+=Math.hypot(i,o);return l}const Oe=Math.random,nk=function e(t){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 t()*i+r}}return n.source=e,n}(Oe),rk=function e(t){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(t()*i+r)}}return n.source=e,n}(Oe),Fh=function e(t){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=t()*2-1,s=t()*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=e,n}(Oe),ik=function e(t){var n=Fh.source(t);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=e,r}(Oe),Mb=function e(t){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=t();return i+o*t()}}return n.source=e,n}(Oe),ok=function e(t){var n=Mb.source(t);function r(i){if((i=+i)==0)return t;var o=n(i);return function(){return o()/i}}return r.source=e,r}(Oe),ak=function e(t){function n(r){return function(){return-Math.log1p(-t())/r}}return n.source=e,n}(Oe),sk=function e(t){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-t(),r)}}return n.source=e,n}(Oe),lk=function e(t){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+r)}}return n.source=e,n}(Oe),Lb=function e(t){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(-t())/r)})}return n.source=e,n}(Oe),zh=function e(t){var n=Fh.source(t)();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(-t())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),l=i<1?()=>Math.pow(t(),1/i):()=>1;return function(){do{do var u=n(),c=1+s*u;while(c<=0);c*=c*c;var f=1-t()}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=e,r}(Oe),kb=function e(t){var n=zh.source(t);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=e,r}(Oe),Rb=function e(t){var n=Lb.source(t),r=kb.source(t);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=e,i}(Oe),uk=function e(t){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(-t()))}}return n.source=e,n}(Oe),ck=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*t())}}return n.source=e,n}(Oe),fk=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=t();return r+i*Math.log(o/(1-o))}}return n.source=e,n}(Oe),hk=function e(t){var n=zh.source(t),r=Rb.source(t);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(-t()),f=0;c<=s;++f)c-=Math.log1p(-t());return a+f}}return i.source=e,i}(Oe),pk=1664525,dk=1013904223,Eb=1/4294967296;function gk(e=Math.random()){let t=(0<=e&&e<1?e/Eb:Math.abs(e))|0;return()=>(t=pk*t+dk|0,Eb*(t>>>0))}function wt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function fn(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Oh=Symbol("implicit");function Gh(){var e=new oo,t=[],n=[],r=Oh;function i(o){let a=e.get(o);if(a===void 0){if(r!==Oh)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new oo;for(const a of o)e.has(a)||e.set(a,t.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(t,n).unknown(r)},wt.apply(i,arguments),i}function Yh(){var e=Gh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var h=t().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 e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(h){return arguments.length?(s=!!h,f()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},e.copy=function(){return Yh(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},wt.apply(f(),arguments)}function Ib(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ib(t())},e}function Wh(){return Ib(Yh.apply(null,arguments).paddingInner(1))}function mk(e){return function(){return e}}function Bl(e){return+e}var Bb=[0,1];function rt(e){return e}function Xh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:mk(isNaN(t)?NaN:.5)}function yk(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function bk(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[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(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Xh(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=jn(e,s,1,r)-1;return o[l](i[l](s))}}function Jo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Nl(){var e=Bb,t=Bb,n=nn,r,i,o,a=rt,s,l,u;function c(){var h=Math.min(e.length,t.length);return a!==rt&&(a=yk(e[0],e[h-1])),s=h>2?xk:bk,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((u||(u=s(t,e.map(r),vt)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Bl),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=ws,c()},f.clamp=function(h){return arguments.length?(a=h?!0:rt,c()):a!==rt},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()(rt,rt)}function Nb(e,t,n,r){var i=Ja(e,t,n),o;switch(r=di(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));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(e),Math.abs(t))))&&(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(e){var t=e.domain;return e.ticks=function(n){var r=t();return Zn(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Nb(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),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,t(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 e},e}function xr(){var e=Vh();return e.copy=function(){return Jo(e,xr())},wt.apply(e,arguments),Ln(e)}function Fb(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Bl),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Fb(e).unknown(t)},e=arguments.length?Array.from(e,Bl):[0,1],Ln(n)}function zb(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Ob(e){return Math.log(e)}function Gb(e){return Math.exp(e)}function vk(e){return-Math.log(-e)}function $k(e){return-Math.exp(-e)}function _k(e){return isFinite(e)?+("1e"+e):e<0?0:e}function wk(e){return e===10?_k:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Sk(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Yb(e){return(t,n)=>-e(-t,n)}function Uh(e){const t=e(Ob,Gb),n=t.domain;let r=10,i,o;function a(){return i=Sk(r),o=wk(r),n()[0]<0?(i=Yb(i),o=Yb(o),e(vk,$k)):e(Ob,Gb),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.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},t.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/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},t.nice=()=>n(zb(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Wb(){const e=Uh(Nl()).domain([1,10]);return e.copy=()=>Jo(e,Wb()).base(e.base()),wt.apply(e,arguments),e}function Xb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Vb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Hh(e){var t=1,n=e(Xb(t),Vb(t));return n.constant=function(r){return arguments.length?e(Xb(t=+r),Vb(t)):t},Ln(n)}function Ub(){var e=Hh(Nl());return e.copy=function(){return Jo(e,Ub()).constant(e.constant())},wt.apply(e,arguments)}function Hb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Tk(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ak(e){return e<0?-e*e:e*e}function jh(e){var t=e(rt,rt),n=1;function r(){return n===1?e(rt,rt):n===.5?e(Tk,Ak):e(Hb(n),Hb(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ln(t)}function kn(){var e=jh(Nl());return e.copy=function(){return Jo(e,kn()).exponent(e.exponent())},wt.apply(e,arguments),e}function Pk(){return kn.apply(null,arguments).exponent(.5)}function jb(e){return Math.sign(e)*e*e}function Dk(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function qb(){var e=Vh(),t=[0,1],n=!1,r;function i(o){var a=Dk(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(jb(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Bl)).map(jb)),i):t.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?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return qb(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wt.apply(i,arguments),Ln(i)}function Zb(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=E0(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[jn(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(we),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Zb().domain(e).range(t).unknown(r)},wt.apply(o,arguments)}function Kb(){var e=0,t=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)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},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?[e,r[0]]:u>=n?[r[n-1],t]:[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([e,t]).range(i).unknown(o)},wt.apply(Ln(a),arguments)}function Qb(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[jn(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Qb().domain(e).range(t).unknown(n)},wt.apply(i,arguments)}const qh=new Date,Zh=new Date;function Me(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(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)),t(o,s),e(o);while(u<o&&o<a);return l},i.filter=o=>Me(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(qh.setTime(+o),Zh.setTime(+a),e(qh),e(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=Me(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wi.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Me(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):wi);const Jb=wi.range,hn=1e3,St=hn*60,pn=St*60,dn=pn*24,Kh=dn*7,ex=dn*30,Qh=dn*365,gn=Me(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*hn)},(e,t)=>(t-e)/hn,e=>e.getUTCSeconds()),tx=gn.range,Fl=Me(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hn)},(e,t)=>{e.setTime(+e+t*St)},(e,t)=>(t-e)/St,e=>e.getMinutes()),Ck=Fl.range,zl=Me(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*St)},(e,t)=>(t-e)/St,e=>e.getUTCMinutes()),Mk=zl.range,Ol=Me(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hn-e.getMinutes()*St)},(e,t)=>{e.setTime(+e+t*pn)},(e,t)=>(t-e)/pn,e=>e.getHours()),Lk=Ol.range,Gl=Me(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*pn)},(e,t)=>(t-e)/pn,e=>e.getUTCHours()),kk=Gl.range,Si=Me(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*St)/dn,e=>e.getDate()-1),Rk=Si.range,ea=Me(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/dn,e=>e.getUTCDate()-1),Ek=ea.range,Jh=Me(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/dn,e=>Math.floor(e/dn)),Ik=Jh.range;function vr(e){return Me(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*St)/Kh)}const Ti=vr(0),ta=vr(1),nx=vr(2),rx=vr(3),$r=vr(4),ix=vr(5),ox=vr(6),ax=Ti.range,Bk=ta.range,Nk=nx.range,Fk=rx.range,zk=$r.range,Ok=ix.range,Gk=ox.range;function _r(e){return Me(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/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=Me(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),jk=Yl.range,Wl=Me(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),qk=Wl.range,Kt=Me(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Kt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Me(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const Zk=Kt.range,Qt=Me(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Qt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Me(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const Kk=Qt.range;function hx(e,t,n,r,i,o){const a=[[gn,1,hn],[gn,5,5*hn],[gn,15,15*hn],[gn,30,30*hn],[o,1,St],[o,5,5*St],[o,15,15*St],[o,30,30*St],[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],[t,1,ex],[t,3,3*ex],[e,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 e.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(Qt,Wl,Ai,Jh,Gl,zl),[gx,mx]=hx(Kt,Yl,Ti,Si,Ol,Fl);function ep(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function tp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ra(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function yx(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.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:ie,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:t9,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(t,v),x.x=A(n,x),x.X=A(r,x),x.c=A(t,x);function A(q,ne){return function(se){var U=[],me=-1,fe=0,Ee=q.length,it,le,De;for(se instanceof Date||(se=new Date(+se));++me<Ee;)q.charCodeAt(me)===37&&(U.push(q.slice(fe,me)),(le=bx[it=q.charAt(++me)])!=null?it=q.charAt(++me):le=it==="e"?" ":"0",(De=ne[it])&&(it=De(se,le)),U.push(it),fe=me+1);return U.push(q.slice(fe,me)),U.join("")}}function w(q,ne){return function(se){var U=ra(1900,void 0,1),me=P(U,q,se+="",0),fe,Ee;if(me!=se.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(ne&&!("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?(fe=tp(ra(U.y,0,1)),Ee=fe.getUTCDay(),fe=Ee>4||Ee===0?na.ceil(fe):na(fe),fe=ea.offset(fe,(U.V-1)*7),U.y=fe.getUTCFullYear(),U.m=fe.getUTCMonth(),U.d=fe.getUTCDate()+(U.w+6)%7):(fe=ep(ra(U.y,0,1)),Ee=fe.getDay(),fe=Ee>4||Ee===0?ta.ceil(fe):ta(fe),fe=Si.offset(fe,(U.V-1)*7),U.y=fe.getFullYear(),U.m=fe.getMonth(),U.d=fe.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),Ee="Z"in U?tp(ra(U.y,0,1)).getUTCDay():ep(ra(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(Ee+5)%7:U.w+U.U*7-(Ee+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,tp(U)):ep(U)}}function P(q,ne,se,U){for(var me=0,fe=ne.length,Ee=se.length,it,le;me<fe;){if(U>=Ee)return-1;if(it=ne.charCodeAt(me++),it===37){if(it=ne.charAt(me++),le=_[it in bx?ne.charAt(me++):it],!le||(U=le(q,se,U))<0)return-1}else if(it!=se.charCodeAt(U++))return-1}return U}function C(q,ne,se){var U=u.exec(ne.slice(se));return U?(q.p=c.get(U[0].toLowerCase()),se+U[0].length):-1}function B(q,ne,se){var U=p.exec(ne.slice(se));return U?(q.w=d.get(U[0].toLowerCase()),se+U[0].length):-1}function $(q,ne,se){var U=f.exec(ne.slice(se));return U?(q.w=h.get(U[0].toLowerCase()),se+U[0].length):-1}function k(q,ne,se){var U=y.exec(ne.slice(se));return U?(q.m=b.get(U[0].toLowerCase()),se+U[0].length):-1}function M(q,ne,se){var U=m.exec(ne.slice(se));return U?(q.m=g.get(U[0].toLowerCase()),se+U[0].length):-1}function T(q,ne,se){return P(q,t,ne,se)}function S(q,ne,se){return P(q,n,ne,se)}function D(q,ne,se){return P(q,r,ne,se)}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 ie(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 ne=A(q+="",v);return ne.toString=function(){return q},ne},parse:function(q){var ne=w(q+="",!1);return ne.toString=function(){return q},ne},utcFormat:function(q){var ne=A(q+="",x);return ne.toString=function(){return q},ne},utcParse:function(q){var ne=w(q+="",!0);return ne.toString=function(){return q},ne}}}var bx={"-":"",_:" ",0:"0"},Fe=/^\s*\d+/,Qk=/^%/,Jk=/[\\^$*+?|[\]().{}]/g;function ye(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function e9(e){return e.replace(Jk,"\\$&")}function ia(e){return new RegExp("^(?:"+e.map(e9).join("|")+")","i")}function oa(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function t9(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function n9(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function r9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function i9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function o9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function xx(e,t,n){var r=Fe.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function vx(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function a9(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function s9(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function l9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $x(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function u9(e,t,n){var r=Fe.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function _x(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function c9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function f9(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function h9(e,t,n){var r=Fe.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function p9(e,t,n){var r=Fe.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function d9(e,t,n){var r=Qk.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function g9(e,t,n){var r=Fe.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function m9(e,t,n){var r=Fe.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function wx(e,t){return ye(e.getDate(),t,2)}function y9(e,t){return ye(e.getHours(),t,2)}function b9(e,t){return ye(e.getHours()%12||12,t,2)}function x9(e,t){return ye(1+Si.count(Kt(e),e),t,3)}function Sx(e,t){return ye(e.getMilliseconds(),t,3)}function v9(e,t){return Sx(e,t)+"000"}function $9(e,t){return ye(e.getMonth()+1,t,2)}function _9(e,t){return ye(e.getMinutes(),t,2)}function w9(e,t){return ye(e.getSeconds(),t,2)}function S9(e){var t=e.getDay();return t===0?7:t}function T9(e,t){return ye(Ti.count(Kt(e)-1,e),t,2)}function Tx(e){var t=e.getDay();return t>=4||t===0?$r(e):$r.ceil(e)}function A9(e,t){return e=Tx(e),ye($r.count(Kt(e),e)+(Kt(e).getDay()===4),t,2)}function P9(e){return e.getDay()}function D9(e,t){return ye(ta.count(Kt(e)-1,e),t,2)}function C9(e,t){return ye(e.getFullYear()%100,t,2)}function M9(e,t){return e=Tx(e),ye(e.getFullYear()%100,t,2)}function L9(e,t){return ye(e.getFullYear()%1e4,t,4)}function k9(e,t){var n=e.getDay();return e=n>=4||n===0?$r(e):$r.ceil(e),ye(e.getFullYear()%1e4,t,4)}function R9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function Ax(e,t){return ye(e.getUTCDate(),t,2)}function E9(e,t){return ye(e.getUTCHours(),t,2)}function I9(e,t){return ye(e.getUTCHours()%12||12,t,2)}function B9(e,t){return ye(1+ea.count(Qt(e),e),t,3)}function Px(e,t){return ye(e.getUTCMilliseconds(),t,3)}function N9(e,t){return Px(e,t)+"000"}function F9(e,t){return ye(e.getUTCMonth()+1,t,2)}function z9(e,t){return ye(e.getUTCMinutes(),t,2)}function O9(e,t){return ye(e.getUTCSeconds(),t,2)}function G9(e){var t=e.getUTCDay();return t===0?7:t}function Y9(e,t){return ye(Ai.count(Qt(e)-1,e),t,2)}function Dx(e){var t=e.getUTCDay();return t>=4||t===0?wr(e):wr.ceil(e)}function W9(e,t){return e=Dx(e),ye(wr.count(Qt(e),e)+(Qt(e).getUTCDay()===4),t,2)}function X9(e){return e.getUTCDay()}function V9(e,t){return ye(na.count(Qt(e)-1,e),t,2)}function U9(e,t){return ye(e.getUTCFullYear()%100,t,2)}function H9(e,t){return e=Dx(e),ye(e.getUTCFullYear()%100,t,2)}function j9(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function q9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?wr(e):wr.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function Z9(){return"+0000"}function Cx(){return"%"}function Mx(e){return+e}function Lx(e){return Math.floor(+e/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(e){return Pi=yx(e),np=Pi.format,kx=Pi.parse,Xl=Pi.utcFormat,rp=Pi.utcParse,Pi}var Ex="%Y-%m-%dT%H:%M:%S.%LZ";function K9(e){return e.toISOString()}var Q9=Date.prototype.toISOString?K9:Xl(Ex);const J9=Q9;function eR(e){var t=new Date(e);return isNaN(t)?null:t}var tR=+new Date("2000-01-01T00:00:00.000Z")?eR:rp(Ex);const nR=tR;function rR(e){return new Date(e)}function iR(e){return e instanceof Date?+e:+new Date(+e)}function ip(e,t,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 e(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=t(w[0],w[w.length-1],A??10)),A?h(zb(w,A)):c},c.copy=function(){return Jo(c,ip(e,t,n,r,i,o,a,s,l,u))},c}function oR(){return wt.apply(ip(gx,mx,Kt,Yl,Ti,Si,Ol,Fl,gn,np).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function aR(){return wt.apply(ip(px,dx,Qt,Wl,Ai,ea,Gl,zl,gn,Xl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vl(){var e=0,t=1,n,r,i,o,a=rt,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?([e,t]=f,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),u):[e,t]},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(e),r=f(t),i=n===r?0:1/(r-n),u}}function Rn(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Ix(){var e=Ln(Vl()(rt));return e.copy=function(){return Rn(e,Ix())},fn.apply(e,arguments)}function Bx(){var e=Uh(Vl()).domain([1,10]);return e.copy=function(){return Rn(e,Bx()).base(e.base())},fn.apply(e,arguments)}function Nx(){var e=Hh(Vl());return e.copy=function(){return Rn(e,Nx()).constant(e.constant())},fn.apply(e,arguments)}function op(){var e=jh(Vl());return e.copy=function(){return Rn(e,op()).exponent(e.exponent())},fn.apply(e,arguments)}function sR(){return op.apply(null,arguments).exponent(.5)}function Fx(){var e=[],t=rt;function n(r){if(r!=null&&!isNaN(r=+r))return t((jn(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(we),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>lo(e,o/r))},n.copy=function(){return Fx(t).domain(e)},fn.apply(n,arguments)}function Ul(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,u=rt,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?([e,t,n]=m,i=c(e=+e),o=c(t=+t),a=c(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,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(e),o=m(t),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 e=Ln(Ul()(rt));return e.copy=function(){return Rn(e,zx())},fn.apply(e,arguments)}function Ox(){var e=Uh(Ul()).domain([.1,1,10]);return e.copy=function(){return Rn(e,Ox()).base(e.base())},fn.apply(e,arguments)}function Gx(){var e=Hh(Ul());return e.copy=function(){return Rn(e,Gx()).constant(e.constant())},fn.apply(e,arguments)}function ap(){var e=jh(Ul());return e.copy=function(){return Rn(e,ap()).exponent(e.exponent())},fn.apply(e,arguments)}function lR(){return ap.apply(null,arguments).exponent(.5)}function ce(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const uR=ce("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),cR=ce("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),fR=ce("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),hR=ce("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),pR=ce("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),dR=ce("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),gR=ce("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),mR=ce("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),yR=ce("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bR=ce("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),xR=ce("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$e=e=>Pm(e[e.length-1]);var Yx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ce);const vR=$e(Yx);var Wx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ce);const $R=$e(Wx);var Xx=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ce);const _R=$e(Xx);var Vx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ce);const wR=$e(Vx);var Ux=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ce);const SR=$e(Ux);var Hx=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ce);const TR=$e(Hx);var jx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ce);const AR=$e(jx);var qx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ce);const PR=$e(qx);var Zx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ce);const DR=$e(Zx);var Kx=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ce);const CR=$e(Kx);var Qx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ce);const MR=$e(Qx);var Jx=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ce);const LR=$e(Jx);var ev=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ce);const kR=$e(ev);var tv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ce);const RR=$e(tv);var nv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ce);const ER=$e(nv);var rv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ce);const IR=$e(rv);var iv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ce);const BR=$e(iv);var ov=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ce);const NR=$e(ov);var av=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ce);const FR=$e(av);var sv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ce);const zR=$e(sv);var lv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ce);const OR=$e(lv);var uv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ce);const GR=$e(uv);var cv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ce);const YR=$e(cv);var fv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ce);const WR=$e(fv);var hv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ce);const XR=$e(hv);var pv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ce);const VR=$e(pv);var dv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ce);const UR=$e(dv);function HR(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const jR=Ts(Et(300,.5,0),Et(-240,.5,1));var qR=Ts(Et(-100,.75,.35),Et(80,1.5,.8)),ZR=Ts(Et(260,.75,.35),Et(80,1.5,.8)),Hl=Et();function KR(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Hl.h=360*e-100,Hl.s=1.5-1.5*t,Hl.l=.8-.9*t,Hl+""}var jl=ni(),QR=Math.PI/3,JR=Math.PI*2/3;function eE(e){var t;return e=(.5-e)*Math.PI,jl.r=255*(t=Math.sin(e))*t,jl.g=255*(t=Math.sin(e+QR))*t,jl.b=255*(t=Math.sin(e+JR))*t,jl+""}function tE(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function ql(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const nE=ql(ce("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var rE=ql(ce("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),iE=ql(ce("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),oE=ql(ce("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ue(e){return function(){return e}}const gv=Math.abs,Xe=Math.atan2,mn=Math.cos,aE=Math.max,Di=Math.min,ct=Math.sin,_e=Math.sqrt,Ve=1e-12,En=Math.PI,Zl=En/2,In=2*En;function sE(e){return e>1?0:e<-1?En:Math.acos(e)}function mv(e){return e>=1?Zl:e<=-1?-Zl:Math.asin(e)}function aa(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Ao(t)}function lE(e){return e.innerRadius}function uE(e){return e.outerRadius}function cE(e){return e.startAngle}function fE(e){return e.endAngle}function hE(e){return e&&e.padAngle}function pE(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,f=s-o,h=f*l-c*u;if(!(h*h<Ve))return h=(c*(t-o)-f*(e-i))/h,[e+h*l,t+h*u]}function Kl(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/_e(s*s+l*l),c=u*l,f=-u*s,h=e+c,p=t+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)*_e(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 e=lE,t=uE,n=ue(0),r=null,i=cE,o=fE,a=hE,s=null,l=aa(u);function u(){var c,f,h=+e.apply(this,arguments),p=+t.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>Ve))s.moveTo(0,0);else if(g>In-Ve)s.moveTo(p*mn(d),p*ct(d)),s.arc(0,0,p,d,m,!y),h>Ve&&(s.moveTo(h*mn(m),h*ct(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>Ve&&(r?+r.apply(this,arguments):_e(h*h+p*p)),B=Di(gv(p-h)/2,+n.apply(this,arguments)),$=B,k=B,M,T;if(C>Ve){var S=mv(C/h*ct(P)),D=mv(C/p*ct(P));(A-=S*2)>Ve?(S*=y?1:-1,x+=S,_-=S):(A=0,x=_=(d+m)/2),(w-=D*2)>Ve?(D*=y?1:-1,b+=D,v-=D):(w=0,b=v=(d+m)/2)}var F=p*mn(b),z=p*ct(b),I=h*mn(_),N=h*ct(_);if(B>Ve){var E=p*mn(v),O=p*ct(v),j=h*mn(x),ie=h*ct(x),W;if(g<En)if(W=pE(F,z,j,ie,E,O,I,N)){var Q=F-W[0],X=z-W[1],K=E-W[0],q=O-W[1],ne=1/ct(sE((Q*K+X*q)/(_e(Q*Q+X*X)*_e(K*K+q*q)))/2),se=_e(W[0]*W[0]+W[1]*W[1]);$=Di(B,(h-se)/(ne-1)),k=Di(B,(p-se)/(ne+1))}else $=k=0}w>Ve?k>Ve?(M=Kl(j,ie,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,Xe(M.y01,M.x01),Xe(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,k,Xe(M.y01,M.x01),Xe(M.y11,M.x11),!y),s.arc(0,0,p,Xe(M.cy+M.y11,M.cx+M.x11),Xe(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,k,Xe(T.y11,T.x11),Xe(T.y01,T.x01),!y))):(s.moveTo(F,z),s.arc(0,0,p,b,v,!y)):s.moveTo(F,z),!(h>Ve)||!(A>Ve)?s.lineTo(I,N):$>Ve?(M=Kl(I,N,E,O,h,-$,y),T=Kl(F,z,j,ie,h,-$,y),s.lineTo(M.cx+M.x01,M.cy+M.y01),$<B?s.arc(M.cx,M.cy,$,Xe(M.y01,M.x01),Xe(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,$,Xe(M.y01,M.x01),Xe(M.y11,M.x11),!y),s.arc(0,0,h,Xe(M.cy+M.y11,M.cx+M.x11),Xe(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,$,Xe(T.y11,T.x11),Xe(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=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-En/2;return[mn(f)*c,ct(f)*c]},u.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:ue(+c),u):e},u.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ue(+c),u):t},u.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:ue(+c),u):n},u.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:ue(+c),u):r},u.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:ue(+c),u):i},u.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:ue(+c),u):o},u.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ue(+c),u):a},u.context=function(c){return arguments.length?(s=c??null,u):s},u}var dE=Array.prototype.slice;function Jl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function yv(e){this._context=e}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function eu(e){return new yv(e)}function sp(e){return e[0]}function lp(e){return e[1]}function tu(e,t){var n=ue(!0),r=null,i=eu,o=null,a=aa(s);e=typeof e=="function"?e:e===void 0?sp:ue(e),t=typeof t=="function"?t:t===void 0?lp:ue(t);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(+e(f,u,l),+t(f,u,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ue(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ue(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ue(!!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(e,t,n){var r=null,i=ue(!0),o=null,a=eu,s=null,l=aa(u);e=typeof e=="function"?e:e===void 0?sp:ue(+e),t=typeof t=="function"?t:ue(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?lp:ue(+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]=+e(g,h,f),x[h]=+t(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 tu().defined(i).curve(a).context(o)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:ue(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ue(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ue(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:ue(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ue(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ue(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ue(!!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(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function mE(e){return e}function bv(){var e=mE,t=gE,n=null,r=ue(0),i=ue(In),o=ue(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]=+e(s[l],l,s))>0&&(h+=x);for(t!=null?p.sort(function(_,A){return t(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?(e=typeof s=="function"?s:ue(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ue(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ue(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ue(+s),a):o},a}var xv=cp(eu);function vv(e){this._curve=e}vv.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function cp(e){function t(n){return new vv(e(n))}return t._curve=e,t}function sa(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(cp(n)):t()._curve},e}function $v(){return sa(tu().curve(xv))}function _v(){var e=up().curve(xv),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return sa(n())},delete e.lineX0,e.lineEndAngle=function(){return sa(r())},delete e.lineX1,e.lineInnerRadius=function(){return sa(i())},delete e.lineY0,e.lineOuterRadius=function(){return sa(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(cp(a)):t()._curve},e}function la(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}class wv{constructor(t,n){this._context=t,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(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}class yE{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,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(t,this._y0),a=la(t,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=t,this._y0=n}}function Sv(e){return new wv(e,!0)}function Tv(e){return new wv(e,!1)}function bE(e){return new yE(e)}function xE(e){return e.source}function vE(e){return e.target}function nu(e){let t=xE,n=vE,r=sp,i=lp,o=null,a=null,s=aa(l);function l(){let u;const c=dE.call(arguments),f=t.apply(this,c),h=n.apply(this,c);if(o==null&&(a=e(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?(t=u,l):t},l.target=function(u){return arguments.length?(n=u,l):n},l.x=function(u){return arguments.length?(r=typeof u=="function"?u:ue(+u),l):r},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:ue(+u),l):i},l.context=function(u){return arguments.length?(u==null?o=a=null:a=e(o=u),l):o},l}function $E(){return nu(Sv)}function _E(){return nu(Tv)}function wE(){const e=nu(bE);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const SE=_e(3),Av={draw(e,t){const n=_e(t+Di(t/28,.75))*.59436,r=n/2,i=r*SE;e.moveTo(0,n),e.lineTo(0,-n),e.moveTo(-i,-r),e.lineTo(i,r),e.moveTo(-i,r),e.lineTo(i,-r)}},ru={draw(e,t){const n=_e(t/En);e.moveTo(n,0),e.arc(0,0,n,0,In)}},Pv={draw(e,t){const n=_e(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Dv=_e(1/3),TE=Dv*2,Cv={draw(e,t){const n=_e(t/TE),r=n*Dv;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Mv={draw(e,t){const n=_e(t)*.62625;e.moveTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.lineTo(-n,0),e.closePath()}},Lv={draw(e,t){const n=_e(t-Di(t/7,2))*.87559;e.moveTo(-n,0),e.lineTo(n,0),e.moveTo(0,n),e.lineTo(0,-n)}},kv={draw(e,t){const n=_e(t),r=-n/2;e.rect(r,r,n,n)}},Rv={draw(e,t){const n=_e(t)*.4431;e.moveTo(n,n),e.lineTo(n,-n),e.lineTo(-n,-n),e.lineTo(-n,n),e.closePath()}},AE=.8908130915292852,Ev=ct(En/10)/ct(7*En/10),PE=ct(In/10)*Ev,DE=-mn(In/10)*Ev,Iv={draw(e,t){const n=_e(t*AE),r=PE*n,i=DE*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=In*o/5,s=mn(a),l=ct(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},fp=_e(3),Bv={draw(e,t){const n=-_e(t/(fp*3));e.moveTo(0,n*2),e.lineTo(-fp*n,-n),e.lineTo(fp*n,-n),e.closePath()}},CE=_e(3),Nv={draw(e,t){const n=_e(t)*.6824,r=n/2,i=n*CE/2;e.moveTo(0,-n),e.lineTo(i,r),e.lineTo(-i,r),e.closePath()}},Tt=-.5,At=_e(3)/2,hp=1/_e(12),ME=(hp/2+1)*3,Fv={draw(e,t){const n=_e(t/ME),r=n/2,i=n*hp,o=r,a=n*hp+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Tt*r-At*i,At*r+Tt*i),e.lineTo(Tt*o-At*a,At*o+Tt*a),e.lineTo(Tt*s-At*l,At*s+Tt*l),e.lineTo(Tt*r+At*i,Tt*i-At*r),e.lineTo(Tt*o+At*a,Tt*a-At*o),e.lineTo(Tt*s+At*l,Tt*l-At*s),e.closePath()}},pp={draw(e,t){const n=_e(t-Di(t/6,1.7))*.6189;e.moveTo(-n,-n),e.lineTo(n,n),e.moveTo(-n,n),e.lineTo(n,-n)}},zv=[ru,Pv,Cv,kv,Iv,Bv,Fv],LE=[ru,Lv,pp,Nv,Av,Rv,Mv];function kE(e,t){let n=null,r=aa(i);e=typeof e=="function"?e:ue(e||ru),t=typeof t=="function"?t:ue(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ue(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ue(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Bn(){}function iu(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ou(e){this._context=e}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function RE(e){return new ou(e)}function Ov(e){this._context=e}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:iu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function EE(e){return new Ov(e)}function Gv(e){this._context=e}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(e,t){switch(e=+e,t=+t,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+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:iu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IE(e){return new Gv(e)}function Yv(e,t){this._basis=new ou(e),this._beta=t}Yv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const BE=function e(t){function n(r){return t===1?new ou(r):new Yv(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function au(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function dp(e,t){this._context=e,this._k=(1-t)/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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:au(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const NE=function e(t){function n(r){return new dp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function gp(e,t){this._context=e,this._k=(1-t)/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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:au(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const FE=function e(t){function n(r){return new gp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function mp(e,t){this._context=e,this._k=(1-t)/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(e,t){switch(e=+e,t=+t,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,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zE=function e(t){function n(r){return new mp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function yp(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Ve){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Ve){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function Wv(e,t){this._context=e,this._alpha=t}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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:yp(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const OE=function e(t){function n(r){return t?new Wv(r,t):new dp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Xv(e,t){this._context=e,this._alpha=t}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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:yp(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const GE=function e(t){function n(r){return t?new Xv(r,t):new gp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Vv(e,t){this._context=e,this._alpha=t}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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const YE=function e(t){function n(r){return t?new Vv(r,t):new mp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Uv(e){this._context=e}Uv.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function WE(e){return new Uv(e)}function Hv(e){return e<0?-1:1}function jv(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._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(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function bp(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function su(e){this._context=e}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(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,bp(this,qv(this,n=jv(this,e,t)),n);break;default:bp(this,this._t0,n=jv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Zv(e){this._context=new Kv(e)}(Zv.prototype=Object.create(su.prototype)).point=function(e,t){su.prototype.point.call(this,t,e)};function Kv(e){this._context=e}Kv.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function XE(e){return new su(e)}function VE(e){return new Zv(e)}function Qv(e){this._context=e}Qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Jv(e),i=Jv(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Jv(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function UE(e){return new Qv(e)}function lu(e,t){this._context=e,this._t=t}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function HE(e){return new lu(e,.5)}function jE(e){return new lu(e,0)}function qE(e){return new lu(e,1)}function Ci(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Mi(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function ZE(e,t){return e[t]}function KE(e){const t=[];return t.key=e,t}function QE(){var e=ue([]),t=Mi,n=Ci,r=ZE;function i(o){var a=Array.from(e.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(t(a));s<l;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ue(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ue(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?Mi:typeof o=="function"?o:ue(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Ci,i):n},i}function JE(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}Ci(e,t)}}function eI(e,t){if((l=e.length)>0)for(var n,r=0,i,o,a,s,l,u=e[t[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=e[t[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 tI(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Ci(e,t)}}function nI(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[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=e[t[s]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<s;++d){var m=e[t[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(e,t)}}function e$(e){var t=e.map(rI);return Mi(e).sort(function(n,r){return t[n]-t[r]})}function rI(e){for(var t=-1,n=0,r=e.length,i,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function t$(e){var t=e.map(n$);return Mi(e).sort(function(n,r){return t[n]-t[r]})}function n$(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function iI(e){return t$(e).reverse()}function oI(e){var t=e.length,n,r,i=e.map(n$),o=e$(e),a=0,s=0,l=[],u=[];for(n=0;n<t;++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(e){return Mi(e).reverse()}const uu=e=>()=>e;function sI(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Jt(e,t,n){this.k=e,this.x=t,this.y=n}Jt.prototype={constructor:Jt,scale:function(e){return e===1?this:new Jt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Jt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Li=new Jt(1,0,0);r$.prototype=Jt.prototype;function r$(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Li;return e.__zoom}function xp(e){e.stopImmediatePropagation()}function ua(e){e.preventDefault(),e.stopImmediatePropagation()}function lI(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function uI(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function i$(){return this.__zoom||Li}function cI(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function fI(){return navigator.maxTouchPoints||"ontouchstart"in this}function hI(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.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 e=lI,t=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=t.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),t.apply(this,arguments),a)},null,F)},y.translateTo=function(T,S,D,F,z){y.transform(T,function(){var I=t.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 Jt(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 Jt(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=t.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]),ie=z.__zoom,W=typeof S=="function"?S.apply(z,I):S,Q=l(ie.invert(O).concat(j/ie.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 Jt(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=t.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(!e.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=gt(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||!e.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=gt(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(ie){if(ua(ie),!F.moved){var W=ie.clientX-N,Q=ie.clientY-E;F.moved=W*W+Q*Q>m}F.event(ie).zoom("mouse",n(v(F.that.__zoom,F.mouse[0]=gt(ie,D),F.mouse[1]),F.extent,a))}function j(ie){z.on("mousemove.zoom mouseup.zoom",null),cs(ie.view,F.moved),ua(ie),F.event(ie).end()}}function B(T,...S){if(e.apply(this,arguments)){var D=this.__zoom,F=gt(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),t.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(e.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=gt(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=gt(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],ie=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]-ie[0])*K+(K=Q[1]-ie[1])*K;N=b(N,Math.sqrt(X/K)),E=[(j[0]+W[0])/2,(j[1]+W[1])/2],O=[(ie[0]+Q[0])/2,(ie[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=gt(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?(e=typeof T=="function"?T:uu(!!T),y):e},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:uu(!!T),y):i},y.extent=function(T){return arguments.length?(t=typeof T=="function"?T:uu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):t},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:ke,Delaunay:Cf,FormatSpecifier:Hs,InternMap:oo,InternSet:qn,Node:yr,Path:Ao,Voronoi:Ay,ZoomTransform:Jt,active:b5,arc:Ql,area:up,areaRadial:_v,ascending:we,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:Et,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:eu,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:ey,easePolyIn:U3,easePolyInOut:ey,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:th,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:Zt,geoProjectionMutator:vh,geoRotation:v1,geoStereographic:j4,geoStereographicRaw:Dh,geoStream:Bt,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:vt,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:eE,interpolateSpectral:DR,interpolateString:Kc,interpolateTransformCss:Im,interpolateTransformSvg:Bm,interpolateTurbo:tE,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:e8,lab:bs,lch:hL,least:zD,leastIndex:B0,line:tu,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:es,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:gt,pointers:HM,polygonArea:q7,polygonCentroid:Z7,polygonContains:ek,polygonHull:J7,polygonLength:tk,precisionFixed:Hy,precisionPrefix:jy,precisionRound:qy,quadtree:Ys,quantile:lo,quantileIndex:I0,quantileSorted:E0,quantize:RL,quickselect:ts,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:ev,schemeOranges:dv,schemePRGn:Wx,schemePaired:pR,schemePastel1:dR,schemePastel2:gR,schemePiYG:Xx,schemePuBu:nv,schemePuBuGn:tv,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:er,selector:ss,selectorAll:kc,shuffle:YD,shuffler:N0,some:UD,sort:bc,stack:QE,stackOffsetDiverging:eI,stackOffsetExpand:JE,stackOffsetNone:Ci,stackOffsetSilhouette:tI,stackOffsetWiggle:nI,stackOrderAppearance:e$,stackOrderAscending:t$,stackOrderDescending:iI,stackOrderInsideOut:oI,stackOrderNone:Mi,stackOrderReverse:aI,stratify:F7,style:Jn,subset:tC,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:Me,timeMillisecond:wi,timeMilliseconds:Jb,timeMinute:Fl,timeMinutes:Ck,timeMonday:ta,timeMondays:Bk,timeMonth:Yl,timeMonths:jk,get timeParse(){return kx},timeSaturday:ox,timeSaturdays:Gk,timeSecond:gn,timeSeconds:tx,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:Kt,timeYears:Zk,timeout:ef,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:ea,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:tx,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:Qt,utcYears:Kk,variance:v0,window:Ec,xml:t8,zip:XD,zoom:yn,zoomIdentity:Li,zoomTransform:r$},Symbol.toStringTag,{value:"Module"}));function o$(e){try{return e.node().getBBox()}catch(t){throw new Error(t)}}function pI(e,t){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=e.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);e.node().appendChild(n(t))}function ca(e){return e.substring(0,4)!=="ease"?wo:vp[e]??wo}function cu({axisWidth:e,innerRadius:t,outerRadius:n,padAngle:r,cornerRadius:i}){const o=xr().domain([0,1]).range([0,e/2]),a=o(n);return Ql().innerRadius(o(t)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Sr=(e,t)=>{if(t instanceof Function){const n=t(e);return String(n??"")}return Mo(t)(e)};function fa(e,t=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(e))==null?void 0:i.width)??0)*t/10}function be(e,t){const n=t.colors[t.colorScheme];return e==="label"?n.label[0]:e=="none"?"none":n[e]!=null?n[e]:n.primary}function Ce({datum:e,colorType:t,fullChartParams:n}){return t==="label"?e.color?e.color:n.colors[n.colorScheme].label[0]:t=="none"?"none":n.colors[n.colorScheme][t]!=null?n.colors[n.colorScheme][t]:n.colors[n.colorScheme].primary}function Z(e,t,n){const r=n?`--${n}`:"";return`orbcharts-${e}__${t}${r}`}function Pt(e,t){const r=Math.random().toString(36).substr(2,5);return Z(e,t,r)}function ha(e,t){let n=new de(()=>{});return e.each(function(){const r=Iu(this,t);n=Bu(n,r)}),n}const Tr=({selection:e,pluginName:t,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=Z(t,"series"),l=Z(t,"axes"),u=Z(t,"graphic"),c=r.pipe(R((d,m)=>e.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())),pe(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)),pe(1)),h=f.pipe(R(d=>d.select("defs")),pe(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}),pe(1));return{seriesSelection$:c,axesSelection$:f,defsSelection$:h,graphicGSelection$:p}},a$=({fullDataFormatter$:e,gridAxesSize$:t,computedData$:n,fullChartParams$:r,gridContainerPosition$:i,layout$:o})=>{const a=new J,s=Y({fullDataFormatter:e,gridAxesSize:t,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]}),pe(1)),l=Y({fullDataFormatter:e,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),ee()),f=i.pipe(R(h=>h.reduce((d,m)=>m.rowIndex>d?m.rowIndex:d,0)+1),ee());return new de(h=>{Y({dataFormatter:e,axisSize:t,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:e,fullDataFormatter$:t,gridAxesSize$:n,computedData$:r,fullChartParams$:i,gridContainerPosition$:o,layout$:a})=>{const s=ha(e,"mousemove"),l=Y({fullDataFormatter:t,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,_]}),pe(1)),u=Y({fullDataFormatter:t,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=t.pipe(R(b=>b.valueAxis.position==="right"||b.valueAxis.position==="bottom")),h=Y({reverse:f,gridAxesSize:n,scaleRangeGroupLabels:c,fullDataFormatter:t}).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),ee()),d=o.pipe(R(b=>b.reduce((x,_)=>_.rowIndex>x?_.rowIndex:x,0)+1),ee()),m=Y({fullDataFormatter:t,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(e="curveLinear"){return tu().x(t=>t.axisX).y(t=>t.axisY).curve(vp[e])}function mI(e){let t=[[]],n=0;for(let r in e){if(e[r].visible==!1||e[r].value===void 0||e[r].value===null){t[n].length&&(n++,t[n]=[]);continue}t[n].push(e[r])}return t}function yI({selection:e,pathClassName:t,segmentData:n,linePath:r,params:i}){return e.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(t,!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:e,seriesLabel:t,fullChartParams:n}){if(e.interrupt("highlight"),!t){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{r===t?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function xI({defsSelection:e,clipPathData:t,transitionDuration:n,transitionEase:r}){e.selectAll("clipPath").data(t).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$=(e,{selection:t,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,_=Pt(e,"clipPath-box"),A=Z(e,"path"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:t,pluginName:e,clipPathID:_,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p}),$=new de(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),ee()),M=f.pipe(R(z=>z.transitionEase),ee());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),ee()),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:ie}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(ie).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group: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:ie}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(ie).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group: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:ie}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(ie).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group: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:ie}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(ie).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group: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,bt=5,fu=6,$p=7,ki=8,Ri=9,f$="Lines",vI=st({name:f$,defaultParams:Dr,layerIndex:bt,validator:(e,{validateColumns:t})=>t(e,{lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:e,rootSelection:t,name:n,observer:r,subject:i})=>{const o=new J,a=s$(f$,{selection:e,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(e="curveLinear",t){return up().x(n=>n.axisX).y0(n=>t).y1(n=>n.axisY).curve(vp[e])}function _I(e){let t=[[]],n=0;for(let r in e){if(e[r].visible==!1||e[r].value===void 0||e[r].value===null){t[n].length&&(n++,t[n]=[]);continue}t[n].push(e[r])}return t}function wI({selection:e,pathClassName:t,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return e.selectAll("path").data(n,(s,l)=>s.length?`${s[0].id}_${s[s.length-1].id}`:l).join(s=>s.append("path").classed(t,!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:e,seriesLabel:t,fullChartParams:n}){if(e.interrupt("highlight"),!t){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{r===t?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function TI({defsSelection:e,computedData:t,linearGradientIds:n,params:r}){e.selectAll("linearGradient").data(t??[]).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 AI({defsSelection:e,clipPathData:t,transitionDuration:n,transitionEase:r}){e.selectAll("clipPath").data(t).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$=(e,{selection:t,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=Pt(e,"clipPath-box"),_=Z(e,"path"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:t,pluginName:e,clipPathID:x,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p}),B=p.pipe(L(v),R(I=>-I.translate[1]/I.scale[1])),$=new de(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),ee()),M=f.pipe(R(I=>I.transitionEase),ee());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),ee()),F=a.pipe(L(v),R(I=>I.map((N,E)=>Pt(e,`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 ie=_I(I.visibleComputedLayoutData[O]??[]);N[O]=wI({selection:V(j[O]),pathClassName:_,areaPath:I.areaPath,segmentData:ie,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:ie,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mouseover",pluginName:e,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:ie,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mousemove",pluginName:e,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:ie,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mouseout",pluginName:e,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:ie,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"click",pluginName:e,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=st({name:p$,defaultParams:ed,layerIndex:c$,validator:(e,{validateColumns:t})=>t(e,{lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:e,name:t,observer:n,subject:r})=>{const i=new J,o=h$(p$,{selection:e,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:e,groupAmount:t,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((t>1?e/(t-1):e)-i)/n-r;return a>1?a:1}function DI(e,t,n){const r=e/2,i=e*t.length+n.barPadding*t.length;return Wh().domain(t).range([-i/2+r,i/2-r])}function CI(e,t){return e<=1?0:t/(e-1)*d$}function MI(e,t){return e<=1?t:t*(1-d$)}function LI({graphicGSelection:e,rectClassName:t,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 e.each((m,g,y)=>{V(y[g]).selectAll(`rect.${t}`).data(n[g]??[],b=>b.id).join(b=>b.append("rect").classed(t,!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)}),e.selectAll(`rect.${t}`)}function kI({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).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:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const _p=(e,{selection:t,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=Pt(e,"clipPath-box"),_=Z(e,"rect"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:t,pluginName:e,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)),ee()),$=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})),ee()),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,ie)=>{const W=N.gridGraphicReverseScale[ie]??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),ee()),D=new de(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),ee()),F=new de(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),ee());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),ee()),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:e,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:e,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:e,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:e,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=st({name:m$,defaultParams:ga,layerIndex:bt,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new J,o=_p(m$,{selection:e,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=st({name:y$,defaultParams:ga,layerIndex:bt,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new J,o=_p(y$,{selection:e,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:e,groupAmount:t,barGroupPadding:n=0}){const i=(t>1?e/(t-1):e)-n;return i>1?i:1}function NI(e,t){return e<=1?0:t/(e-1)*b$}function FI(e,t){return e<=1?t:t*(1-b$)}function zI({graphicGSelection:e,rectClassName:t,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 e.each((d,m,g)=>{V(g[m]).selectAll(`rect.${t}`).data(n[m]??[],y=>y.id).join(y=>y.append("rect").classed(t,!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)}),e.selectAll(`rect.${t}`)}function OI({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).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:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const x$=(e,{selection:t,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,_=Pt(e,"clipPath-box"),A=Z(e,"rect"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:t,pluginName:e,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),ee()),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})),ee()),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 ne=W.gridGraphicReverseScale[q]??W.gridGraphicReverseScale[0],se=X*ne[0],U=X*ne[1];return[se,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)}),pe(1)),S=f.pipe(L(x),R(W=>W.transitionDuration),ee()),D=new de(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),ee()),F=new de(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),ee()),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(me=>me.filter((fe,Ee)=>fe.groupIndex>=Q&&fe.groupIndex<=X)).flat();if(q.length<=1)return 1;const ne=q.reduce((me,fe)=>fe.value>me.value?fe:me,q[0]),se=ne.groupIndex,U=q.filter(me=>me.groupIndex===se).reduce((me,fe)=>me+fe.value,0);return ne.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,ne)=>{const se=Q[ne];let U=0;return q.visible&&(U=q.axisYFromZero*W.yRatio,Q[ne]=Q[ne]+U),{...q,_barStartY:se,_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),ee()),ie=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:ie,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:e,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:e,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:e,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:e,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:ie,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=st({name:v$,defaultParams:nd,layerIndex:5,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new J,o=x$(v$,{selection:e,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:e,groupAmount:t,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((t>1?e/(t-1):e)-i)/n-r;return a>1?a:1}function WI(e,t,n){const r=e/2,i=e*t.length+n.barPadding*t.length;return Wh().domain(t).range([-i/2+r,i/2-r])}function XI(e,t){return e<=1?0:t/(e-1)*$$}function VI(e,t){return e<=1?t:t*(1-$$)}function UI({graphicGSelection:e,pathGClassName:t,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 e.each((g,y,b)=>{V(b[y]).selectAll(`g.${t}`).data(r[y]??[]).join(x=>{const _=x.append("g").classed(t,!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}`})}),e.selectAll(`path.${n}`)}function HI({defsSelection:e,computedData:t,linearGradientIds:n,params:r}){e.selectAll("linearGradient").data(t??[]).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:e,clipPathData:t,transitionDuration:n,transitionEase:r}){e.selectAll("clipPath").data(t).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$=(e,{selection:t,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=Pt(e,"clipPath-box"),_=Z(e,"path"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:t,pluginName:e,clipPathID:x,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p}),B=p.pipe(L(v),R(I=>-I.translate[1]/I.scale[1])),$=new de(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),ee()),M=f.pipe(R(I=>I.transitionEase),ee());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),ee()),F=a.pipe(L(v),R(I=>I.map((N,E)=>Pt(e,`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 ie=_I(I.visibleComputedLayoutData[O]??[]);N[O]=wI({selection:V(j[O]),pathClassName:_,areaPath:I.areaPath,segmentData:ie,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:ie,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,group: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:ie,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,group: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:ie,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,group: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:ie,groupLabel:W}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(W).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,group: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=st({name:p$,defaultParams:ed,layerIndex:c$,validator:(e,{validateColumns:t})=>t(e,{lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:e,name:t,observer:n,subject:r})=>{const i=new J,o=h$(p$,{selection:e,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:e,groupAmount:t,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((t>1?e/(t-1):e)-i)/n-r;return a>1?a:1}function DI(e,t,n){const r=e/2,i=e*t.length+n.barPadding*t.length;return Wh().domain(t).range([-i/2+r,i/2-r])}function CI(e,t){return e<=1?0:t/(e-1)*d$}function MI(e,t){return e<=1?t:t*(1-d$)}function LI({graphicGSelection:e,rectClassName:t,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 e.each((m,g,y)=>{V(y[g]).selectAll(`rect.${t}`).data(n[g]??[],b=>b.id).join(b=>b.append("rect").classed(t,!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)}),e.selectAll(`rect.${t}`)}function kI({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).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:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const _p=(e,{selection:t,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=Pt(e,"clipPath-box"),_=Z(e,"rect"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:t,pluginName:e,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)),ee()),$=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})),ee()),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,ie)=>{const W=N.gridGraphicReverseScale[ie]??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),ee()),D=new de(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),ee()),F=new de(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),ee());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),ee()),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:e,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,group: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:e,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,group: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:e,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,group: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:e,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,group: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=st({name:m$,defaultParams:ga,layerIndex:bt,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new J,o=_p(m$,{selection:e,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=st({name:y$,defaultParams:ga,layerIndex:bt,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new J,o=_p(y$,{selection:e,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:e,groupAmount:t,barGroupPadding:n=0}){const i=(t>1?e/(t-1):e)-n;return i>1?i:1}function NI(e,t){return e<=1?0:t/(e-1)*b$}function FI(e,t){return e<=1?t:t*(1-b$)}function zI({graphicGSelection:e,rectClassName:t,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 e.each((d,m,g)=>{V(g[m]).selectAll(`rect.${t}`).data(n[m]??[],y=>y.id).join(y=>y.append("rect").classed(t,!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)}),e.selectAll(`rect.${t}`)}function OI({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).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:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const x$=(e,{selection:t,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,_=Pt(e,"clipPath-box"),A=Z(e,"rect"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:t,pluginName:e,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),ee()),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})),ee()),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 ne=W.gridGraphicReverseScale[q]??W.gridGraphicReverseScale[0],se=X*ne[0],U=X*ne[1];return[se,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)}),pe(1)),S=f.pipe(L(x),R(W=>W.transitionDuration),ee()),D=new de(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),ee()),F=new de(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),ee()),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(me=>me.filter((fe,Ee)=>fe.groupIndex>=Q&&fe.groupIndex<=X)).flat();if(q.length<=1)return 1;const ne=q.reduce((me,fe)=>fe.value>me.value?fe:me,q[0]),se=ne.groupIndex,U=q.filter(me=>me.groupIndex===se).reduce((me,fe)=>me+fe.value,0);return ne.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,ne)=>{const se=Q[ne];let U=0;return q.visible&&(U=q.axisYFromZero*W.yRatio,Q[ne]=Q[ne]+U),{...q,_barStartY:se,_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),ee()),ie=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:ie,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:e,highlightTarget:W.highlightTarget,datum:X,gridIndex:X.gridIndex,series:W.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group: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:e,highlightTarget:W.highlightTarget,datum:X,gridIndex:X.gridIndex,series:W.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group: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:e,highlightTarget:W.highlightTarget,datum:X,gridIndex:X.gridIndex,series:W.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group: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:e,highlightTarget:W.highlightTarget,datum:X,gridIndex:X.gridIndex,series:W.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:W.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:W.computedData})})}),Y({barSelection:ie,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=st({name:v$,defaultParams:nd,layerIndex:5,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new J,o=x$(v$,{selection:e,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:e,groupAmount:t,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((t>1?e/(t-1):e)-i)/n-r;return a>1?a:1}function WI(e,t,n){const r=e/2,i=e*t.length+n.barPadding*t.length;return Wh().domain(t).range([-i/2+r,i/2-r])}function XI(e,t){return e<=1?0:t/(e-1)*$$}function VI(e,t){return e<=1?t:t*(1-$$)}function UI({graphicGSelection:e,pathGClassName:t,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 e.each((g,y,b)=>{V(b[y]).selectAll(`g.${t}`).data(r[y]??[]).join(x=>{const _=x.append("g").classed(t,!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}`})}),e.selectAll(`path.${n}`)}function HI({defsSelection:e,computedData:t,linearGradientIds:n,params:r}){e.selectAll("linearGradient").data(t??[]).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 jI({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).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:e,ids:t,fullChartParams:n}){e.interrupt("highlight");const r=()=>{e.transition("highlight").duration(200).style("opacity",1)};if(!t.length){r();return}e.each((i,o,a)=>{t.includes(i.id)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const w$=(e,{selection:t,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=Pt(e,"clipPath-box"),_=Z(e,"pathG"),A=Z(e,"path"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:t,pluginName:e,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)),ee()),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(ie=>{O.add(ie.groupLabel)})}),Array.from(O)})),T=new de(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),ee()),D=new de(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),ee()),F=new de(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),ee());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),ee()),I=s.pipe(L(v),R(E=>E.map((O,j)=>Pt(e,`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:e,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:e,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:e,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:e,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=st({name:S$,defaultParams:rd,layerIndex:5,validator:(e,{validateColumns:t})=>t(e,{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:e,name:t,subject:n,observer:r})=>{const i=new J,o=w$(S$,{selection:e,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:e,circleGClassName:t,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 e.each((c,f,h)=>{V(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(l=s(p),p.append("g").classed(t,!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)=>Ce({datum:g,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(g,y)=>Ce({datum:g,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),e.selectAll(`circle.${n}`)}function QI({selection:e,ids:t,onlyShowHighlighted:n,fullChartParams:r}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}e.each((i,o,a)=>{t.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:e,clipPathData:t}){e.selectAll("clipPath").data(t).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$=(e,{selection:t,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=Pt(e,"clipPath-box"),x=Z(e,"circleG"),_=Z(e,"circle"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:t,pluginName:e,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),ee()),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:e,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:e,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:e,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:e,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),ee());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",eB=st({name:A$,defaultParams:td,layerIndex:fu,validator:(e,{validateColumns:t})=>t(e,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new J,o=T$(A$,{selection:e,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()}}),tB=" - ",nB={listRectWidth:14,listRectHeight:14,listRectRadius:0};function P$(e,t){const n=e<t.colors[t.colorScheme].label.length?e:e%t.colors[t.colorScheme].label.length;return t.colors[t.colorScheme].label[n]}const Ei=(e,{rootSelection:t,legendLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=Z(e,"root-position"),l=Z(e,"legend-card"),u=Z(e,"legend-list"),c=Z(e,"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"),ee(($,k)=>$===k),pe(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")),ee(($,k)=>$===k),pe(1)),g=d.pipe(L(f),R($=>$==="bottom"||$==="top"?"row":"column"),ee(($,k)=>$===k),pe(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($=>t.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:tB,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,ne=0,se=0;if(W.lineDirection==="column"){let U=X?X.translateY+W.textSizePx+W.fullParams.gap:0;if(U+W.textSizePx>W.lineMaxSize){ne=X.lineIndex+1,se=0,q=0;const me=Q[Q.length-1].reduce((fe,Ee)=>Ee.itemWidth>fe?Ee.itemWidth:fe,0);K=X.translateX+me+W.fullParams.gap}else ne=X?X.lineIndex:0,se=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?(ne=X.lineIndex+1,se=0,K=0):(ne=X?X.lineIndex:0,se=X?X.itemIndex+1:0,K=U),q=(W.textSizePx+W.fullParams.gap)*ne}return{translateX:K,translateY:q,lineIndex:ne,itemIndex:se}})($,k,I);k[O]||(k[O]=[]);const ie=$.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:ie.listRectWidth,listRectHeight:ie.listRectHeight,listRectRadius:ie.listRectRadius}),k},[])),pe(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}}),pe(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",be($.fullParams.backgroundFill,$.fullChartParams)).attr("stroke",be($.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):be($.fullParams.textColorType,$.fullChartParams)).text(I=>I.text)})})).subscribe(),()=>{t.select(`g.${s}`).remove(),f.next(void 0)}},D$="GridLegend",rB=st({name:D$,defaultParams:ad,layerIndex:ki,validator:(e,{validateColumns:t})=>t(e,{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:e,rootSelection:t,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:t,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}});function C$(e,{text:t,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(e==null||t==null){console.error("selection or text is not defined");return}n==null&&(n=e.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(e,t)}function wp(e,{textArr:t,textSizePx:n,groupAxisPosition:r}){e.text(null);const i=Number(e.attr("x"));let o=Number(e.attr("y"));r==="top"&&(o-=(t.length-1)*n),e.selectAll("tspan").data(t).join("tspan").attr("x",i).attr("y",(a,s)=>o+s*n).text(a=>a)}function M$(e,{textArr:t,textSizePx:n,quadrant:r}){e.selectAll("tspan").data(t).join("tspan").attr("x",0).attr("y",(i,o)=>r==1||r==2?-(t.length-1-o)*n:o*n).text(i=>i)}const iB=6;function oB(e,t){return e.map((n,r)=>{const i=Sr(n,t),o=typeof i=="string"?i.split(`
52
+ `})}function jI({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).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:e,ids:t,fullChartParams:n}){e.interrupt("highlight");const r=()=>{e.transition("highlight").duration(200).style("opacity",1)};if(!t.length){r();return}e.each((i,o,a)=>{t.includes(i.id)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const w$=(e,{selection:t,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=Pt(e,"clipPath-box"),_=Z(e,"pathG"),A=Z(e,"path"),{seriesSelection$:w,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:t,pluginName:e,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)),ee()),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(ie=>{O.add(ie.groupLabel)})}),Array.from(O)})),T=new de(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),ee()),D=new de(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),ee()),F=new de(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),ee());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),ee()),I=s.pipe(L(v),R(E=>E.map((O,j)=>Pt(e,`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:e,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,group: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:e,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,group: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:e,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,group: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:e,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,group: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=st({name:S$,defaultParams:rd,layerIndex:5,validator:(e,{validateColumns:t})=>t(e,{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:e,name:t,subject:n,observer:r})=>{const i=new J,o=w$(S$,{selection:e,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:e,circleGClassName:t,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 e.each((c,f,h)=>{V(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(l=s(p),p.append("g").classed(t,!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)=>Ce({datum:g,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(g,y)=>Ce({datum:g,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),e.selectAll(`circle.${n}`)}function QI({selection:e,ids:t,onlyShowHighlighted:n,fullChartParams:r}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}e.each((i,o,a)=>{t.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:e,clipPathData:t}){e.selectAll("clipPath").data(t).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$=(e,{selection:t,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=Pt(e,"clipPath-box"),x=Z(e,"circleG"),_=Z(e,"circle"),{seriesSelection$:A,axesSelection$:w,defsSelection$:P,graphicGSelection$:C}=Tr({selection:t,pluginName:e,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),ee()),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:e,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,group: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:e,highlightTarget:T.highlightTarget,data:T.computedData,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,group:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:S})}).on("mouseout",(S,D)=>{y.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,group: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:e,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,group: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),ee());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",eB=st({name:A$,defaultParams:td,layerIndex:fu,validator:(e,{validateColumns:t})=>t(e,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new J,o=T$(A$,{selection:e,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()}}),tB=" - ",nB={listRectWidth:14,listRectHeight:14,listRectRadius:0};function P$(e,t){const n=e<t.colors[t.colorScheme].label.length?e:e%t.colors[t.colorScheme].label.length;return t.colors[t.colorScheme].label[n]}const Ei=(e,{rootSelection:t,legendLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=Z(e,"root-position"),l=Z(e,"legend-card"),u=Z(e,"legend-list"),c=Z(e,"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"),ee(($,k)=>$===k),pe(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")),ee(($,k)=>$===k),pe(1)),g=d.pipe(L(f),R($=>$==="bottom"||$==="top"?"row":"column"),ee(($,k)=>$===k),pe(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($=>t.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:tB,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,ne=0,se=0;if(W.lineDirection==="column"){let U=X?X.translateY+W.textSizePx+W.fullParams.gap:0;if(U+W.textSizePx>W.lineMaxSize){ne=X.lineIndex+1,se=0,q=0;const me=Q[Q.length-1].reduce((fe,Ee)=>Ee.itemWidth>fe?Ee.itemWidth:fe,0);K=X.translateX+me+W.fullParams.gap}else ne=X?X.lineIndex:0,se=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?(ne=X.lineIndex+1,se=0,K=0):(ne=X?X.lineIndex:0,se=X?X.itemIndex+1:0,K=U),q=(W.textSizePx+W.fullParams.gap)*ne}return{translateX:K,translateY:q,lineIndex:ne,itemIndex:se}})($,k,I);k[O]||(k[O]=[]);const ie=$.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:ie.listRectWidth,listRectHeight:ie.listRectHeight,listRectRadius:ie.listRectRadius}),k},[])),pe(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}}),pe(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",be($.fullParams.backgroundFill,$.fullChartParams)).attr("stroke",be($.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):be($.fullParams.textColorType,$.fullChartParams)).text(I=>I.text)})})).subscribe(),()=>{t.select(`g.${s}`).remove(),f.next(void 0)}},D$="GridLegend",rB=st({name:D$,defaultParams:ad,layerIndex:ki,validator:(e,{validateColumns:t})=>t(e,{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:e,rootSelection:t,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:t,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}});function C$(e,{text:t,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(e==null||t==null){console.error("selection or text is not defined");return}n==null&&(n=e.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(e,t)}function wp(e,{textArr:t,textSizePx:n,groupAxisPosition:r}){e.text(null);const i=Number(e.attr("x"));let o=Number(e.attr("y"));r==="top"&&(o-=(t.length-1)*n),e.selectAll("tspan").data(t).join("tspan").attr("x",i).attr("y",(a,s)=>o+s*n).text(a=>a)}function M$(e,{textArr:t,textSizePx:n,quadrant:r}){e.selectAll("tspan").data(t).join("tspan").attr("x",0).attr("y",(i,o)=>r==1||r==2?-(t.length-1-o)*n:o*n).text(i=>i)}const iB=6;function oB(e,t){return e.map((n,r)=>{const i=Sr(n,t),o=typeof i=="string"?i.split(`
53
53
  `):[i];return{text:i,textArr:o}})}function aB({selection:e,groupingLabelClassName:t,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)),e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!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",be(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:e,xAxisClassName:t,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:s,groupScaleDomain:l,groupLabelData:u,textReverseTransformWithRotate:c,textSizePx:f}){const h=e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!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?be(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),y.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?be(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",a.styles.textSize).attr("fill",be(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$=(e,{selection:t,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(e,"container"),d=Z(e,"xAxisG"),m=Z(e,"xAxis"),g=Z(e,"groupingLabel"),y=Y({computedData:n.pipe(ee(($,k)=>$.length===k.length)),isSeriesSeprate:c}).pipe(L(h),G(async $=>$),R($=>$.isSeriesSeprate?$.computedData:[$.computedData[0]]),R(($,k)=>t.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}`}),ee()),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]}),pe(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=st({name:k$,defaultParams:xu,layerIndex:bn,validator:(e,{validateColumns:t})=>t(e,{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:e,name:t,observer:n,subject:r})=>{const i=new J,o=L$(k$,{selection:e,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:e,textClassName:t,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)),e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!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",be(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:e,yAxisClassName:t,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,textReverseTransformWithRotate:l,filteredMinMaxValue:u}){const c=e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!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?be(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?be(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges");const m=c.selectAll("text").attr("font-size",a.styles.textSize).style("color",be(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=(e,{selection:t,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(e,"container"),d=Z(e,"yAxisG"),m=Z(e,"yAxis"),g=Z(e,"text"),y=Y({computedData:n.pipe(ee((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)=>t.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} ${$}`}),ee()),x=Y({textReverseTransform:v,fullParams:i}).pipe(L(h),G(async P=>P),R(P=>`${P.textReverseTransform} rotate(${P.fullParams.tickTextRotate}deg)`)),_=new de(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=st({name:R$,defaultParams:ma,layerIndex:bn,validator:(e,{validateColumns:t})=>t(e,{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:e,name:t,observer:n,subject:r})=>{const i=new J,o=Ii(R$,{selection:e,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=st({name:E$,defaultParams:id,layerIndex:bn,validator:(e,{validateColumns:t})=>t(e,{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:e,name:t,observer:n,subject:r})=>{const i=new J,o=Ii(E$,{selection:e,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$(e,t){const n=t.textSizePx*1.5,i=(e==null?[]:Array.isArray(e)?e:typeof e=="string"?e.split(`
54
54
  `):[e]).filter(o=>o!="").map((o,a)=>`<tspan x="0" y="${a*n}">${o}</tspan>`).join("");return i?`<text font-size="${t.textSize}" fill="${t.textColor}" x="0" y="0" style="dominant-baseline:text-before-edge">
55
55
  ${i}
56
56
  </text>`:""}function dB({rootSelection:e,pluginName:t,gClassName:n,boxClassName:r,rootWidth:i,rootHeight:o,svgString:a,tooltipStyle:s,event:l}){e.interrupt("fadeout");const u=5,c=a?[a]:[],f=a?[s]:[],p=e.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(t,"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(t,"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=(e,{rootSelection:t,fullParams$:n,fullChartParams$:r,layout$:i,event$:o})=>{const a=new J,s=Z(e,"g"),l=Z(e,"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:be(b.fullParams.backgroundColorType,b.fullChartParams),backgroundOpacity:b.fullParams.backgroundOpacity,strokeColor:be(b.fullParams.strokeColorType,b.fullChartParams),offset:b.fullParams.offset,padding:b.fullParams.padding,textSize:b.fullChartParams.styles.textSize,textSizePx:b.textSizePx,textColor:be(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
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),ee((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:t,pluginName:e,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=st({name:B$,defaultParams:vu,layerIndex:Ri,validator:(e,{validateColumns:t})=>t(e,{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:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(B$,{rootSelection:t,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),mB=st({name:"GridZoom",defaultParams:od,layerIndex:l$,validator:(e,{validateColumns:t})=>({status:"success",columnName:"",expectToBe:""})})(({selection:e,rootSelection:t,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),ee()),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)});t.call(p)}),()=>{o.next(void 0),t.call(yn().on("zoom",null))}}),hu="GroupAux",Sp=Z(hu,"label-box"),yB={name:hu,defaultParams:bu,layerIndex:u$,validator:(e,{validateColumns:t})=>t(e,{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:e,axisX:t,axisHeight:n,fullParams:r}){return r.showLine&&e?[{id:e,x1:t,x2:t,y1:0,y2:n}]:[]}function xB({groupLabel:e,axisX:t,fullParams:n,textSizePx:r,rowAmount:i}){const o=Sr(e,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&&e?[{id:e,x:t,y:-n.labelPadding*i,text:o,textArr:a,textWidth:l,textHeight:u}]:[]}function vB({selection:e,pluginName:t,lineData:n,fullParams:r,fullChartParams:i}){const o=Z(t,"auxline");return e.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=>be(r.lineColorType,i)).style("stroke-dasharray",r.lineDashArray??"none")}function $B(e){e.selectAll("line").data([]).exit().remove()}function _B({selection:e,labelData:t,fullParams:n,fullDataFormatter:r,fullChartParams:i,textReverseTransformWithRotate:o,textSizePx:a}){return e.selectAll(`g.${Sp}`).data(t).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=>be(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=>be(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(e){e.selectAll(`g.${Sp}`).data([]).exit().remove()}const SB=st(yB)(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new J;let a=!1;const s=t.insert("rect","g").classed(Z(hu,"rect"),!0).attr("opacity",0),{seriesSelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:f}=Tr({selection:e,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),ee()),d=ha(t,"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}`}),ee()),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),ee()),b=i.gridContainerPosition$.pipe(L(o),R(_=>_.reduce((w,P)=>P.rowIndex>w?P.rowIndex:w,0)+1),ee()),v=dI({rootSelection:t,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:e=>e,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:(e,{styles:t,utils:n})=>{const r=t.textSizePx*.7,i=t.textSizePx/2-r/2,o=`<g><text dominant-baseline="hanging" font-size="${t.textSizePx}">${e.groupLabel}</text></g>`,a=e.groups.reduce((c,f)=>{const h=`${f.seriesLabel}${f.value}`;return h.length>c.length?h:c},""),l=n.measureTextWidth(a,t.textSizePx)+t.textSizePx*2,u=e.groups.map((c,f)=>{const h=f*t.textSizePx*1.5,p=c.id===(e.datum&&e.datum.id);return`<g transform="translate(0, ${t.textSizePx*2})">
58
+ `),s=a.reduce((c,f)=>f.length>c.length?f:c,""),l=fa(s,r),u=r*a.length;return n.showLabel&&e?[{id:e,x:t,y:-n.labelPadding*i,text:o,textArr:a,textWidth:l,textHeight:u}]:[]}function vB({selection:e,pluginName:t,lineData:n,fullParams:r,fullChartParams:i}){const o=Z(t,"auxline");return e.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=>be(r.lineColorType,i)).style("stroke-dasharray",r.lineDashArray??"none")}function $B(e){e.selectAll("line").data([]).exit().remove()}function _B({selection:e,labelData:t,fullParams:n,fullDataFormatter:r,fullChartParams:i,textReverseTransformWithRotate:o,textSizePx:a}){return e.selectAll(`g.${Sp}`).data(t).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=>be(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=>be(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(e){e.selectAll(`g.${Sp}`).data([]).exit().remove()}const SB=st(yB)(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new J;let a=!1;const s=t.insert("rect","g").classed(Z(hu,"rect"),!0).attr("opacity",0),{seriesSelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:f}=Tr({selection:e,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),ee()),d=ha(t,"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}`}),ee()),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),ee()),b=i.gridContainerPosition$.pipe(L(o),R(_=>_.reduce((w,P)=>P.rowIndex>w?P.rowIndex:w,0)+1),ee()),v=dI({rootSelection:t,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:"",group:_.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:"",group:_.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:"",group:_.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:"",group:_.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:e=>e,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:(e,{styles:t,utils:n})=>{const r=t.textSizePx*.7,i=t.textSizePx/2-r/2,o=`<g><text dominant-baseline="hanging" font-size="${t.textSizePx}">${e.groupLabel}</text></g>`,a=e.group.reduce((c,f)=>{const h=`${f.seriesLabel}${f.value}`;return h.length>c.length?h:c},""),l=n.measureTextWidth(a,t.textSizePx)+t.textSizePx*2,u=e.group.map((c,f)=>{const h=f*t.textSizePx*1.5,p=c.id===(e.datum&&e.datum.id);return`<g transform="translate(0, ${t.textSizePx*2})">
59
59
  <rect width="${r}" height="${r}" x="${i}" y="${h+i}" rx="${r/2}" fill="${c.color}"></rect>
60
60
  <text x="${t.textSizePx*1.5}" y="${h}" font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
61
61
  <tspan font-weight="${p?"bold":""}">${c.seriesLabel}</tspan>
@@ -67,13 +67,13 @@ ${u}`}};Pp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
67
67
  const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
68
68
 
69
69
  const titleSvg = \`<g><text dominant-baseline="hanging" font-size="\${styles.textSizePx}">\${eventData.groupLabel}</text></g>\`
70
- const maxLengthText = eventData.groups.reduce((acc, group) => {
70
+ const maxLengthText = eventData.group.reduce((acc, group) => {
71
71
  const text = \`\${group.seriesLabel}\${group.value}\`
72
72
  return text.length > acc.length ? text : acc
73
73
  }, '')
74
74
  const maxTextWidth = utils.measureTextWidth(maxLengthText, styles.textSizePx)
75
75
  const lineEndX = maxTextWidth + styles.textSizePx * 2
76
- const contentSvg = eventData.groups
76
+ const contentSvg = eventData.group
77
77
  .map((group, i) => {
78
78
  const y = i * styles.textSizePx * 1.5
79
79
  const isHighlight = group.id === (eventData.datum && eventData.datum.id)