@orbcharts/plugins-basic 3.0.0-alpha.29 → 3.0.0-alpha.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. package/dist/orbcharts-plugins-basic.es.js +15826 -15642
  2. package/dist/orbcharts-plugins-basic.umd.js +8 -8
  3. package/dist/src/base/BaseBarStack.d.ts +29 -0
  4. package/dist/src/base/BaseBars.d.ts +29 -0
  5. package/dist/src/base/BaseBarsTriangle.d.ts +28 -0
  6. package/dist/src/base/BaseLegend.d.ts +12 -3
  7. package/dist/src/base/BaseLines.d.ts +27 -0
  8. package/dist/src/base/types.d.ts +2 -2
  9. package/dist/src/grid/plugins/BarStack.d.ts +1 -3
  10. package/dist/src/grid/plugins/Bars.d.ts +1 -3
  11. package/dist/src/grid/plugins/BarsTriangle.d.ts +1 -3
  12. package/dist/src/grid/plugins/Lines.d.ts +1 -3
  13. package/dist/src/index.d.ts +1 -0
  14. package/dist/src/multiGrid/defaults.d.ts +3 -0
  15. package/dist/src/multiGrid/index.d.ts +3 -0
  16. package/dist/src/multiGrid/plugins/BarsAndLines.d.ts +1 -0
  17. package/dist/src/multiGrid/types.d.ts +7 -0
  18. package/package.json +2 -2
  19. package/src/base/BaseBarStack.ts +699 -0
  20. package/src/base/BaseBars.ts +639 -0
  21. package/src/base/BaseBarsTriangle.ts +626 -0
  22. package/src/base/BaseLegend.ts +9 -7
  23. package/src/base/BaseLines.ts +566 -0
  24. package/src/base/types.ts +2 -2
  25. package/src/grid/plugins/BarStack.ts +16 -643
  26. package/src/grid/plugins/Bars.ts +15 -586
  27. package/src/grid/plugins/BarsTriangle.ts +14 -577
  28. package/src/grid/plugins/Lines.ts +14 -508
  29. package/src/index.ts +1 -0
  30. package/src/multiGrid/defaults.ts +14 -0
  31. package/src/multiGrid/index.ts +3 -0
  32. package/src/multiGrid/plugins/BarStackAndLines.ts +0 -0
  33. package/src/multiGrid/plugins/BarsAndLines.ts +110 -0
  34. package/src/multiGrid/plugins/BarsTriangleAndLines.ts +0 -0
  35. package/src/multiGrid/plugins/DivergingValueAxes.ts +0 -0
  36. package/src/multiGrid/plugins/FirstGroupScaleAxis.ts +0 -0
  37. package/src/multiGrid/plugins/MultiGridLegend.ts +0 -0
  38. package/src/multiGrid/plugins/TwoValueScaleAxes.ts +0 -0
  39. package/src/multiGrid/types.ts +8 -0
  40. /package/dist/src/multiGrid/plugins/{DivergingAxes.d.ts → BarStackAndLines.d.ts} +0 -0
  41. /package/dist/src/multiGrid/plugins/{TwoScaleAxes.d.ts → BarsTriangleAndLines.d.ts} +0 -0
  42. /package/dist/src/multiGrid/plugins/{TwoScales.d.ts → DivergingValueAxes.d.ts} +0 -0
  43. /package/{src/multiGrid/plugins/DivergingAxes.ts → dist/src/multiGrid/plugins/FirstGroupScaleAxis.d.ts} +0 -0
  44. /package/{src/multiGrid/plugins/TwoScaleAxes.ts → dist/src/multiGrid/plugins/MultiGridLegend.d.ts} +0 -0
  45. /package/{src/multiGrid/plugins/TwoScales.ts → dist/src/multiGrid/plugins/TwoValueScaleAxes.d.ts} +0 -0
@@ -1,12 +1,12 @@
1
- (function(et,rr){typeof exports=="object"&&typeof module<"u"?rr(exports):typeof define=="function"&&define.amd?define(["exports"],rr):(et=typeof globalThis<"u"?globalThis:et||self,rr(et["orbcharts-plugins-basic"]={}))})(this,function(et){"use strict";const rr={lineCurve:"curveLinear",lineWidth:2},Sh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Th={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Ph={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Dh={barWidth:0,barGroupPadding:10,barRadius:!1},kh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Eh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},As={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"},Nh=As,Lh={},Ch={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function bt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ih(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function To(t){let e,n,r;t.length!==2?(e=bt,n=(u,c)=>bt(t(u),c),r=(u,c)=>t(u)-c):(e=t===bt||t===Ih?t:Nv,n=t,r=t);function i(u,c,s=0,f=u.length){if(s<f){if(e(c,c)!==0)return f;do{const h=s+f>>>1;n(u[h],c)<0?s=h+1:f=h}while(s<f)}return s}function o(u,c,s=0,f=u.length){if(s<f){if(e(c,c)!==0)return f;do{const h=s+f>>>1;n(u[h],c)<=0?s=h+1:f=h}while(s<f)}return s}function a(u,c,s=0,f=u.length){const h=i(u,c,s,f-1);return h>s&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:o}}function Nv(){return 0}function Po(t){return t===null?NaN:+t}function*Lv(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Rh=To(bt),Fh=Rh.right,Cv=Rh.left,Iv=To(Po).center,wn=Fh;function Rv(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=$s(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const zh=Oh($s),Fv=Oh(zv);function Oh(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const u=n&&t(n),c=r&&t(r),s=i.slice();return u&&c?(ir(u,s,i,o,a),ir(u,i,s,o,a),ir(u,s,i,o,a),or(c,i,s,o,a),or(c,s,i,o,a),or(c,i,s,o,a)):u?(ir(u,i,s,o,a),ir(u,s,i,o,a),ir(u,i,s,o,a)):c&&(or(c,i,s,o,a),or(c,s,i,o,a),or(c,i,s,o,a)),e}}function ir(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function or(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function zv(t){const e=$s(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function $s(t){const e=Math.floor(t);if(e===t)return Ov(t);const n=t-e,r=2*t+1;return(i,o,a,u,c)=>{if(!((u-=c)>=a))return;let s=e*o[a];const f=c*e,h=f+c;for(let l=a,p=a+f;l<p;l+=c)s+=o[Math.min(u,l)];for(let l=a,p=u;l<=p;l+=c)s+=o[Math.min(u,l+f)],i[l]=(s+n*(o[Math.max(a,l-h)]+o[Math.min(u,l+h)]))/r,s-=o[Math.max(a,l-f)]}}function Ov(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let u=t*r[i];const c=a*t;for(let s=i,f=i+c;s<f;s+=a)u+=r[Math.min(o,s)];for(let s=i,f=o;s<=f;s+=a)u+=r[Math.min(o,s+c)],n[s]=u/e,u-=r[Math.max(i,s-c)]}}function Do(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function Gv(t){return t.length|0}function Uv(t){return!(t>0)}function Yv(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Bv(t){return e=>t(...e)}function qv(...t){const e=typeof t[t.length-1]=="function"&&Bv(t.pop());t=t.map(Yv);const n=t.map(Gv),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(Uv))return o;for(;;){o.push(i.map((u,c)=>t[c][u]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function Wv(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function Gh(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let u of t)(u=e(u,++a,t))!=null&&(u=+u)>=u&&(r=u-i,i+=r/++n,o+=r*(u-i))}if(n>1)return o/(n-1)}function Uh(t,e){const n=Gh(t,e);return n&&Math.sqrt(n)}function ei(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Dt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,u=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);u&&(n[r++]=u),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function Hv(t,e){const n=new Dt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function Xv(t,e){const n=new Dt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class ni extends Map{constructor(e,n=qh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Ms(this,e))}has(e){return super.has(Ms(this,e))}set(e,n){return super.set(Yh(this,e),n)}delete(e){return super.delete(Bh(this,e))}}class An extends Set{constructor(e,n=qh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(Ms(this,e))}add(e){return super.add(Yh(this,e))}delete(e){return super.delete(Bh(this,e))}}function Ms({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Yh({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Bh({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function qh(t){return t!==null&&typeof t=="object"?t.valueOf():t}function ar(t){return t}function Wh(t,...e){return ur(t,ar,ar,e)}function Hh(t,...e){return ur(t,Array.from,ar,e)}function Xh(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function Vv(t,...e){return Xh(Hh(t,...e),e)}function jv(t,e,...n){return Xh(jh(t,e,...n),n)}function Vh(t,e,...n){return ur(t,ar,e,n)}function jh(t,e,...n){return ur(t,Array.from,e,n)}function Zv(t,...e){return ur(t,ar,Zh,e)}function Kv(t,...e){return ur(t,Array.from,Zh,e)}function Zh(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function ur(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const u=new ni,c=r[a++];let s=-1;for(const f of o){const h=c(f,++s,o),l=u.get(h);l?l.push(f):u.set(h,[f])}for(const[f,h]of u)u.set(f,i(h,a));return e(u)}(t,0)}function Kh(t,e){return Array.from(e,n=>t[n])}function Ss(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const u=sr(a[i],a[o]);if(u)return u}})):(n=t.map(n),r.sort((i,o)=>sr(n[i],n[o]))),Kh(t,r)}return t.sort(Ts(n))}function Ts(t=bt){if(t===bt)return sr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function sr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function Qv(t,e,n){return(e.length!==2?Ss(Vh(t,e,n),([r,i],[o,a])=>bt(i,a)||bt(r,o)):Ss(Wh(t,n),([r,i],[o,a])=>e(i,a)||bt(r,o))).map(([r])=>r)}var Jv=Array.prototype,tx=Jv.slice;function Ps(t){return()=>t}const ex=Math.sqrt(50),nx=Math.sqrt(10),rx=Math.sqrt(2);function ko(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=ex?10:o>=nx?5:o>=rx?2:1;let u,c,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),c=Math.round(e*s),u/s<t&&++u,c/s>e&&--c,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),c=Math.round(e/s),u*s<t&&++u,c*s>e&&--c),c<u&&.5<=n&&n<2?ko(t,e,n*2):[u,c,s]}function $n(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?ko(e,t,n):ko(t,e,n);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(a<0)for(let s=0;s<u;++s)c[s]=(o-s)/-a;else for(let s=0;s<u;++s)c[s]=(o-s)*a;else if(a<0)for(let s=0;s<u;++s)c[s]=(i+s)/-a;else for(let s=0;s<u;++s)c[s]=(i+s)*a;return c}function Mn(t,e,n){return e=+e,t=+t,n=+n,ko(t,e,n)[2]}function Eo(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Mn(e,t,n):Mn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Ds(t,e,n){let r;for(;;){const i=Mn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function ks(t){return Math.max(1,Math.ceil(Math.log(Do(t))/Math.LN2)+1)}function Qh(){var t=ar,e=ei,n=ks;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,u,c,s=new Array(a);for(o=0;o<a;++o)s[o]=t(i[o],o,i);var f=e(s),h=f[0],l=f[1],p=n(s,h,l);if(!Array.isArray(p)){const _=l,v=+p;if(e===ei&&([h,l]=Ds(h,l,v)),p=$n(h,l,v),p[0]<=h&&(c=Mn(h,l,v)),p[p.length-1]>=l)if(_>=l&&e===ei){const w=Mn(h,l,v);isFinite(w)&&(w>0?l=(Math.floor(l/w)+1)*w:w<0&&(l=(Math.ceil(l*-w)+1)/-w))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>l;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var b=new Array(d+1),x;for(o=0;o<=d;++o)x=b[o]=[],x.x0=o>0?p[o-1]:h,x.x1=o<d?p[o]:l;if(isFinite(c)){if(c>0)for(o=0;o<a;++o)(u=s[o])!=null&&h<=u&&u<=l&&b[Math.min(d,Math.floor((u-h)/c))].push(i[o]);else if(c<0){for(o=0;o<a;++o)if((u=s[o])!=null&&h<=u&&u<=l){const _=Math.floor((h-u)*c);b[Math.min(d,_+(p[_]<=u))].push(i[o])}}}else for(o=0;o<a;++o)(u=s[o])!=null&&h<=u&&u<=l&&b[wn(p,u,0,d)].push(i[o]);return b}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ps(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Ps([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ps(Array.isArray(i)?tx.call(i):i),r):n},r}function ri(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Es(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function No(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ns(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function Lo(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?sr:Ts(i);r>n;){if(r-n>600){const c=r-n+1,s=e-n+1,f=Math.log(c),h=.5*Math.exp(2*f/3),l=.5*Math.sqrt(f*h*(c-h)/c)*(s-c/2<0?-1:1),p=Math.max(n,Math.floor(e-s*h/c+l)),d=Math.min(r,Math.floor(e+(c-s)*h/c+l));Lo(t,e,p,d,i)}const o=t[e];let a=n,u=r;for(ii(t,n,e),i(t[r],o)>0&&ii(t,n,r);a<u;){for(ii(t,a,u),++a,--u;i(t[a],o)<0;)++a;for(;i(t[u],o)>0;)--u}i(t[n],o)===0?ii(t,n,u):(++u,ii(t,u,r)),u<=e&&(n=u+1),e<=u&&(r=u-1)}return t}function ii(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Jh(t,e=bt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?bt(a,i)>0:bt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function oi(t,e,n){if(t=Float64Array.from(Lv(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return No(t);if(e>=1)return ri(t);var r,i=(r-1)*e,o=Math.floor(i),a=ri(Lo(t,o).subarray(0,o+1)),u=No(t.subarray(o+1));return a+(u-a)*(i-o)}}function t0(t,e,n=Po){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),u=+n(t[o+1],o+1,t);return a+(u-a)*(i-o)}}function e0(t,e,n=Po){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(u,c)=>Po(n(t[c],c,t))),e<=0)return Ns(r);if(e>=1)return Es(r);var r,i=Uint32Array.from(t,(u,c)=>c),o=r.length-1,a=Math.floor(o*e);return Lo(i,a,0,o,(u,c)=>sr(r[u],r[c])),a=Jh(i.subarray(0,a+1),u=>r[u]),a>=0?a:-1}}function ix(t,e,n){const r=Do(t),i=oi(t,.75)-oi(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function ox(t,e,n){const r=Do(t),i=Uh(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function ax(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function ux(t,e){return oi(t,.5,e)}function sx(t,e){return e0(t,.5,e)}function*cx(t){for(const e of t)yield*e}function Ls(t){return Array.from(cx(t))}function lx(t,e){const n=new ni;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function fx(t,e=hx){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function hx(t,e){return[t,e]}function an(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function px(t,e=bt){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=bt);const i=(u,c)=>e(n[u],n[c]);let o,a;return t=Uint32Array.from(n,(u,c)=>c),t.sort(e===bt?(u,c)=>sr(n[u],n[c]):Ts(i)),t.forEach((u,c)=>{const s=i(u,o===void 0?u:o);s>=0?((o===void 0||s>0)&&(o=u,a=c),r[u]=a):r[u]=NaN}),r}function dx(t,e=bt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?bt(a,i)<0:bt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function n0(t,e=bt){if(e.length===1)return Ns(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function gx(t,e=bt){if(e.length===1)return Es(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function mx(t,e){const n=n0(t,e);return n<0?void 0:n}const yx=r0(Math.random);function r0(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,u=n[o+r];n[o+r]=n[a+r],n[a+r]=u}return n}}function bx(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function i0(t){if(!(o=t.length))return[];for(var e=-1,n=No(t,vx),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function vx(t){return t.length}function xx(){return i0(arguments)}function _x(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function wx(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function Ax(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function $x(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function Mx(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function Sx(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Tx(t,...e){t=new An(t);for(const n of e)for(const r of n)t.delete(r);return t}function Px(t,e){const n=e[Symbol.iterator](),r=new An;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function Dx(t,...e){t=new An(t),e=e.map(kx);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function kx(t){return t instanceof An?t:new An(t)}function o0(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=a0(i);if(r.has(o))continue;let a,u;for(;{value:a,done:u}=n.next();){if(u)return!1;const c=a0(a);if(r.add(c),Object.is(o,c))break}}return!0}function a0(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ex(t,e){return o0(e,t)}function Nx(...t){const e=new An;for(const n of t)for(const r of n)e.add(r);return e}function Lx(t){return t}var Co=1,Io=2,Cs=3,ai=4,u0=1e-6;function Cx(t){return"translate("+t+",0)"}function Ix(t){return"translate(0,"+t+")"}function Rx(t){return e=>+t(e)}function Fx(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function zx(){return!this.__axis}function Ro(t,e){var n=[],r=null,i=null,o=6,a=6,u=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,s=t===Co||t===ai?-1:1,f=t===ai||t===Io?"x":"y",h=t===Co||t===Cs?Cx:Ix;function l(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):Lx),m=Math.max(o,0)+u,b=e.range(),x=+b[0]+c,_=+b[b.length-1]+c,v=(e.bandwidth?Fx:Rx)(e.copy(),c),w=p.selection?p.selection():p,y=w.selectAll(".domain").data([null]),A=w.selectAll(".tick").data(d,e).order(),M=A.exit(),$=A.enter().append("g").attr("class","tick"),P=A.select("line"),S=A.select("text");y=y.merge(y.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge($),P=P.merge($.append("line").attr("stroke","currentColor").attr(f+"2",s*o)),S=S.merge($.append("text").attr("fill","currentColor").attr(f,s*m).attr("dy",t===Co?"0em":t===Cs?"0.71em":"0.32em")),p!==w&&(y=y.transition(p),A=A.transition(p),P=P.transition(p),S=S.transition(p),M=M.transition(p).attr("opacity",u0).attr("transform",function(L){return isFinite(L=v(L))?h(L+c):this.getAttribute("transform")}),$.attr("opacity",u0).attr("transform",function(L){var E=this.parentNode.__axis;return h((E&&isFinite(E=E(L))?E:v(L))+c)})),M.remove(),y.attr("d",t===ai||t===Io?a?"M"+s*a+","+x+"H"+c+"V"+_+"H"+s*a:"M"+c+","+x+"V"+_:a?"M"+x+","+s*a+"V"+c+"H"+_+"V"+s*a:"M"+x+","+c+"H"+_),A.attr("opacity",1).attr("transform",function(L){return h(v(L)+c)}),P.attr(f+"2",s*o),S.attr(f,s*m).text(g),w.filter(zx).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Io?"start":t===ai?"end":"middle"),w.each(function(){this.__axis=v})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(i=p,l):i},l.tickSize=function(p){return arguments.length?(o=a=+p,l):o},l.tickSizeInner=function(p){return arguments.length?(o=+p,l):o},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(u=+p,l):u},l.offset=function(p){return arguments.length?(c=+p,l):c},l}function s0(t){return Ro(Co,t)}function Ox(t){return Ro(Io,t)}function Gx(t){return Ro(Cs,t)}function Is(t){return Ro(ai,t)}var Ux={value:()=>{}};function Sn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Fo(n)}function Fo(t){this._=t}function Yx(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Fo.prototype=Sn.prototype={constructor:Fo,on:function(t,e){var n=this._,r=Yx(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=Bx(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=c0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=c0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Fo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function Bx(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function c0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ux,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Rs="http://www.w3.org/1999/xhtml";const Fs={svg:"http://www.w3.org/2000/svg",xhtml:Rs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ui(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Fs.hasOwnProperty(e)?{space:Fs[e],local:t}:t}function qx(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Rs&&e.documentElement.namespaceURI===Rs?e.createElement(t):e.createElementNS(n,t)}}function Wx(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function zo(t){var e=ui(t);return(e.local?Wx:qx)(e)}function Hx(){}function Oo(t){return t==null?Hx:function(){return this.querySelector(t)}}function Xx(t){typeof t!="function"&&(t=Oo(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=new Array(a),c,s,f=0;f<a;++f)(c=o[f])&&(s=t.call(c,c.__data__,f,o))&&("__data__"in c&&(s.__data__=c.__data__),u[f]=s);return new Yt(r,this._parents)}function l0(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Vx(){return[]}function zs(t){return t==null?Vx:function(){return this.querySelectorAll(t)}}function jx(t){return function(){return l0(t.apply(this,arguments))}}function Zx(t){typeof t=="function"?t=jx(t):t=zs(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&(r.push(t.call(c,c.__data__,s,a)),i.push(c));return new Yt(r,i)}function Os(t){return function(){return this.matches(t)}}function f0(t){return function(e){return e.matches(t)}}var Kx=Array.prototype.find;function Qx(t){return function(){return Kx.call(this.children,t)}}function Jx(){return this.firstElementChild}function t_(t){return this.select(t==null?Jx:Qx(typeof t=="function"?t:f0(t)))}var e_=Array.prototype.filter;function n_(){return Array.from(this.children)}function r_(t){return function(){return e_.call(this.children,t)}}function i_(t){return this.selectAll(t==null?n_:r_(typeof t=="function"?t:f0(t)))}function o_(t){typeof t!="function"&&(t=Os(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Yt(r,this._parents)}function h0(t){return new Array(t.length)}function a_(){return new Yt(this._enter||this._groups.map(h0),this._parents)}function Go(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Go.prototype={constructor:Go,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function u_(t){return function(){return t}}function s_(t,e,n,r,i,o){for(var a=0,u,c=e.length,s=o.length;a<s;++a)(u=e[a])?(u.__data__=o[a],r[a]=u):n[a]=new Go(t,o[a]);for(;a<c;++a)(u=e[a])&&(i[a]=u)}function c_(t,e,n,r,i,o,a){var u,c,s=new Map,f=e.length,h=o.length,l=new Array(f),p;for(u=0;u<f;++u)(c=e[u])&&(l[u]=p=a.call(c,c.__data__,u,e)+"",s.has(p)?i[u]=c:s.set(p,c));for(u=0;u<h;++u)p=a.call(t,o[u],u,o)+"",(c=s.get(p))?(r[u]=c,c.__data__=o[u],s.delete(p)):n[u]=new Go(t,o[u]);for(u=0;u<f;++u)(c=e[u])&&s.get(l[u])===c&&(i[u]=c)}function l_(t){return t.__data__}function f_(t,e){if(!arguments.length)return Array.from(this,l_);var n=e?c_:s_,r=this._parents,i=this._groups;typeof t!="function"&&(t=u_(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),s=0;s<o;++s){var f=r[s],h=i[s],l=h.length,p=h_(t.call(f,f&&f.__data__,s,r)),d=p.length,g=u[s]=new Array(d),m=a[s]=new Array(d),b=c[s]=new Array(l);n(f,h,g,m,b,p,e);for(var x=0,_=0,v,w;x<d;++x)if(v=g[x]){for(x>=_&&(_=x+1);!(w=m[_])&&++_<d;);v._next=w||null}}return a=new Yt(a,r),a._enter=u,a._exit=c,a}function h_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function p_(){return new Yt(this._exit||this._groups.map(h0),this._parents)}function d_(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function g_(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var s=n[c],f=r[c],h=s.length,l=u[c]=new Array(h),p,d=0;d<h;++d)(p=s[d]||f[d])&&(l[d]=p);for(;c<i;++c)u[c]=n[c];return new Yt(u,this._parents)}function m_(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function y_(t){t||(t=b_);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],u=a.length,c=i[o]=new Array(u),s,f=0;f<u;++f)(s=a[f])&&(c[f]=s);c.sort(e)}return new Yt(i,this._parents).order()}function b_(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function v_(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function x_(){return Array.from(this)}function __(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function w_(){let t=0;for(const e of this)++t;return t}function A_(){return!this.node()}function $_(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,u;o<a;++o)(u=i[o])&&t.call(u,u.__data__,o,i);return this}function M_(t){return function(){this.removeAttribute(t)}}function S_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function T_(t,e){return function(){this.setAttribute(t,e)}}function P_(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function D_(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function k_(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function E_(t,e){var n=ui(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?S_:M_:typeof e=="function"?n.local?k_:D_:n.local?P_:T_)(n,e))}function Gs(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function N_(t){return function(){this.style.removeProperty(t)}}function L_(t,e,n){return function(){this.style.setProperty(t,e,n)}}function C_(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function I_(t,e,n){return arguments.length>1?this.each((e==null?N_:typeof e=="function"?C_:L_)(t,e,n??"")):Tn(this.node(),t)}function Tn(t,e){return t.style.getPropertyValue(e)||Gs(t).getComputedStyle(t,null).getPropertyValue(e)}function R_(t){return function(){delete this[t]}}function F_(t,e){return function(){this[t]=e}}function z_(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function O_(t,e){return arguments.length>1?this.each((e==null?R_:typeof e=="function"?z_:F_)(t,e)):this.node()[t]}function p0(t){return t.trim().split(/^|\s+/)}function Us(t){return t.classList||new d0(t)}function d0(t){this._node=t,this._names=p0(t.getAttribute("class")||"")}d0.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function g0(t,e){for(var n=Us(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function m0(t,e){for(var n=Us(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function G_(t){return function(){g0(this,t)}}function U_(t){return function(){m0(this,t)}}function Y_(t,e){return function(){(e.apply(this,arguments)?g0:m0)(this,t)}}function B_(t,e){var n=p0(t+"");if(arguments.length<2){for(var r=Us(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Y_:e?G_:U_)(n,e))}function q_(){this.textContent=""}function W_(t){return function(){this.textContent=t}}function H_(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function X_(t){return arguments.length?this.each(t==null?q_:(typeof t=="function"?H_:W_)(t)):this.node().textContent}function V_(){this.innerHTML=""}function j_(t){return function(){this.innerHTML=t}}function Z_(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function K_(t){return arguments.length?this.each(t==null?V_:(typeof t=="function"?Z_:j_)(t)):this.node().innerHTML}function Q_(){this.nextSibling&&this.parentNode.appendChild(this)}function J_(){return this.each(Q_)}function tw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ew(){return this.each(tw)}function nw(t){var e=typeof t=="function"?t:zo(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function rw(){return null}function iw(t,e){var n=typeof t=="function"?t:zo(t),r=e==null?rw:typeof e=="function"?e:Oo(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ow(){var t=this.parentNode;t&&t.removeChild(this)}function aw(){return this.each(ow)}function uw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function sw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function cw(t){return this.select(t?sw:uw)}function lw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function fw(t){return function(e){t.call(this,e,this.__data__)}}function hw(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function pw(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function dw(t,e,n){return function(){var r=this.__on,i,o=fw(e);if(r){for(var a=0,u=r.length;a<u;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function gw(t,e,n){var r=hw(t+""),i,o=r.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,s=u.length,f;c<s;++c)for(i=0,f=u[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=e?dw:pw,i=0;i<o;++i)this.each(u(r[i],e,n));return this}function y0(t,e,n){var r=Gs(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function mw(t,e){return function(){return y0(this,t,e)}}function yw(t,e){return function(){return y0(this,t,e.apply(this,arguments))}}function bw(t,e){return this.each((typeof e=="function"?yw:mw)(t,e))}function*vw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Ys=[null];function Yt(t,e){this._groups=t,this._parents=e}function Pn(){return new Yt([[document.documentElement]],Ys)}function xw(){return this}Yt.prototype=Pn.prototype={constructor:Yt,select:Xx,selectAll:Zx,selectChild:t_,selectChildren:i_,filter:o_,data:f_,enter:a_,exit:p_,join:d_,merge:g_,selection:xw,order:m_,sort:y_,call:v_,nodes:x_,node:__,size:w_,empty:A_,each:$_,attr:E_,style:I_,property:O_,classed:B_,text:X_,html:K_,raise:J_,lower:ew,append:nw,insert:iw,remove:aw,clone:cw,datum:lw,on:gw,dispatch:bw,[Symbol.iterator]:vw};function j(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Ys)}function _w(t){return j(zo(t).call(document.documentElement))}var ww=0;function b0(){return new Bs}function Bs(){this._="@"+(++ww).toString(36)}Bs.prototype=b0.prototype={constructor:Bs,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function v0(t){let e;for(;e=t.sourceEvent;)t=e;return t}function oe(t,e){if(t=v0(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function Aw(t,e){return t.target&&(t=v0(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>oe(n,e))}function $w(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([l0(t)],Ys)}const Mw={passive:!1},si={capture:!0,passive:!1};function qs(t){t.stopImmediatePropagation()}function cr(t){t.preventDefault(),t.stopImmediatePropagation()}function Uo(t){var e=t.document.documentElement,n=j(t).on("dragstart.drag",cr,si);"onselectstart"in e?n.on("selectstart.drag",cr,si):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Yo(t,e){var n=t.document.documentElement,r=j(t).on("dragstart.drag",null);e&&(r.on("click.drag",cr,si),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Bo=t=>()=>t;function Ws(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:s,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:f}})}Ws.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Sw(t){return!t.ctrlKey&&!t.button}function Tw(){return this.parentNode}function Pw(t,e){return e??{x:t.x,y:t.y}}function Dw(){return navigator.maxTouchPoints||"ontouchstart"in this}function x0(){var t=Sw,e=Tw,n=Pw,r=Dw,i={},o=Sn("start","drag","end"),a=0,u,c,s,f,h=0;function l(v){v.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",b,Mw).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(v,w){if(!(f||!t.call(this,v,w))){var y=_(this,e.call(this,v,w),v,w,"mouse");y&&(j(v.view).on("mousemove.drag",d,si).on("mouseup.drag",g,si),Uo(v.view),qs(v),s=!1,u=v.clientX,c=v.clientY,y("start",v))}}function d(v){if(cr(v),!s){var w=v.clientX-u,y=v.clientY-c;s=w*w+y*y>h}i.mouse("drag",v)}function g(v){j(v.view).on("mousemove.drag mouseup.drag",null),Yo(v.view,s),cr(v),i.mouse("end",v)}function m(v,w){if(t.call(this,v,w)){var y=v.changedTouches,A=e.call(this,v,w),M=y.length,$,P;for($=0;$<M;++$)(P=_(this,A,v,w,y[$].identifier,y[$]))&&(qs(v),P("start",v,y[$]))}}function b(v){var w=v.changedTouches,y=w.length,A,M;for(A=0;A<y;++A)(M=i[w[A].identifier])&&(cr(v),M("drag",v,w[A]))}function x(v){var w=v.changedTouches,y=w.length,A,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),A=0;A<y;++A)(M=i[w[A].identifier])&&(qs(v),M("end",v,w[A]))}function _(v,w,y,A,M,$){var P=o.copy(),S=oe($||y,w),L,E,T;if((T=n.call(v,new Ws("beforestart",{sourceEvent:y,target:l,identifier:M,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:P}),A))!=null)return L=T.x-S[0]||0,E=T.y-S[1]||0,function k(D,N,I){var C=S,z;switch(D){case"start":i[M]=k,z=a++;break;case"end":delete i[M],--a;case"drag":S=oe(I||N,w),z=a;break}P.call(D,v,new Ws(D,{sourceEvent:N,subject:T,target:l,identifier:M,active:z,x:S[0]+L,y:S[1]+E,dx:S[0]-C[0],dy:S[1]-C[1],dispatch:P}),A)}}return l.filter=function(v){return arguments.length?(t=typeof v=="function"?v:Bo(!!v),l):t},l.container=function(v){return arguments.length?(e=typeof v=="function"?v:Bo(v),l):e},l.subject=function(v){return arguments.length?(n=typeof v=="function"?v:Bo(v),l):n},l.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:Bo(!!v),l):r},l.on=function(){var v=o.on.apply(o,arguments);return v===o?l:v},l.clickDistance=function(v){return arguments.length?(h=(v=+v)*v,l):Math.sqrt(h)},l}function lr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ci(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function un(){}var Dn=.7,fr=1/Dn,hr="\\s*([+-]?\\d+)\\s*",li="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kw=/^#([0-9a-f]{3,8})$/,Ew=new RegExp(`^rgb\\(${hr},${hr},${hr}\\)$`),Nw=new RegExp(`^rgb\\(${De},${De},${De}\\)$`),Lw=new RegExp(`^rgba\\(${hr},${hr},${hr},${li}\\)$`),Cw=new RegExp(`^rgba\\(${De},${De},${De},${li}\\)$`),Iw=new RegExp(`^hsl\\(${li},${De},${De}\\)$`),Rw=new RegExp(`^hsla\\(${li},${De},${De},${li}\\)$`),_0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};lr(un,sn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:w0,formatHex:w0,formatHex8:Fw,formatHsl:zw,formatRgb:A0,toString:A0});function w0(){return this.rgb().formatHex()}function Fw(){return this.rgb().formatHex8()}function zw(){return P0(this).formatHsl()}function A0(){return this.rgb().formatRgb()}function sn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=kw.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?$0(e):n===3?new Nt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?qo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ew.exec(t))?new Nt(e[1],e[2],e[3],1):(e=Nw.exec(t))?new Nt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Lw.exec(t))?qo(e[1],e[2],e[3],e[4]):(e=Cw.exec(t))?qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Iw.exec(t))?T0(e[1],e[2]/100,e[3]/100,1):(e=Rw.exec(t))?T0(e[1],e[2]/100,e[3]/100,e[4]):_0.hasOwnProperty(t)?$0(_0[t]):t==="transparent"?new Nt(NaN,NaN,NaN,0):null}function $0(t){return new Nt(t>>16&255,t>>8&255,t&255,1)}function qo(t,e,n,r){return r<=0&&(t=e=n=NaN),new Nt(t,e,n,r)}function Hs(t){return t instanceof un||(t=sn(t)),t?(t=t.rgb(),new Nt(t.r,t.g,t.b,t.opacity)):new Nt}function pr(t,e,n,r){return arguments.length===1?Hs(t):new Nt(t,e,n,r??1)}function Nt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}lr(Nt,pr,ci(un,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new Nt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Dn:Math.pow(Dn,t),new Nt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Nt(kn(this.r),kn(this.g),kn(this.b),Wo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:M0,formatHex:M0,formatHex8:Ow,formatRgb:S0,toString:S0}));function M0(){return`#${En(this.r)}${En(this.g)}${En(this.b)}`}function Ow(){return`#${En(this.r)}${En(this.g)}${En(this.b)}${En((isNaN(this.opacity)?1:this.opacity)*255)}`}function S0(){const t=Wo(this.opacity);return`${t===1?"rgb(":"rgba("}${kn(this.r)}, ${kn(this.g)}, ${kn(this.b)}${t===1?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function kn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function En(t){return t=kn(t),(t<16?"0":"")+t.toString(16)}function T0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new me(t,e,n,r)}function P0(t){if(t instanceof me)return new me(t.h,t.s,t.l,t.opacity);if(t instanceof un||(t=sn(t)),!t)return new me;if(t instanceof me)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,c=(o+i)/2;return u?(e===o?a=(n-r)/u+(n<r)*6:n===o?a=(r-e)/u+2:a=(e-n)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new me(a,u,c,t.opacity)}function Ho(t,e,n,r){return arguments.length===1?P0(t):new me(t,e,n,r??1)}function me(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}lr(me,Ho,ci(un,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new me(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Dn:Math.pow(Dn,t),new me(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Nt(Xs(t>=240?t-240:t+120,i,r),Xs(t,i,r),Xs(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new me(D0(this.h),Xo(this.s),Xo(this.l),Wo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Wo(this.opacity);return`${t===1?"hsl(":"hsla("}${D0(this.h)}, ${Xo(this.s)*100}%, ${Xo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function D0(t){return t=(t||0)%360,t<0?t+360:t}function Xo(t){return Math.max(0,Math.min(1,t||0))}function Xs(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const k0=Math.PI/180,E0=180/Math.PI,Vo=18,N0=.96422,L0=1,C0=.82521,I0=4/29,dr=6/29,R0=3*dr*dr,Gw=dr*dr*dr;function F0(t){if(t instanceof ye)return new ye(t.l,t.a,t.b,t.opacity);if(t instanceof ke)return O0(t);t instanceof Nt||(t=Hs(t));var e=Ks(t.r),n=Ks(t.g),r=Ks(t.b),i=Vs((.2225045*e+.7168786*n+.0606169*r)/L0),o,a;return e===n&&n===r?o=a=i:(o=Vs((.4360747*e+.3850649*n+.1430804*r)/N0),a=Vs((.0139322*e+.0971045*n+.7141733*r)/C0)),new ye(116*i-16,500*(o-i),200*(i-a),t.opacity)}function Uw(t,e){return new ye(t,0,0,e??1)}function jo(t,e,n,r){return arguments.length===1?F0(t):new ye(t,e,n,r??1)}function ye(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}lr(ye,jo,ci(un,{brighter(t){return new ye(this.l+Vo*(t??1),this.a,this.b,this.opacity)},darker(t){return new ye(this.l-Vo*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=N0*js(e),t=L0*js(t),n=C0*js(n),new Nt(Zs(3.1338561*e-1.6168667*t-.4906146*n),Zs(-.9787684*e+1.9161415*t+.033454*n),Zs(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Vs(t){return t>Gw?Math.pow(t,1/3):t/R0+I0}function js(t){return t>dr?t*t*t:R0*(t-I0)}function Zs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ks(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function z0(t){if(t instanceof ke)return new ke(t.h,t.c,t.l,t.opacity);if(t instanceof ye||(t=F0(t)),t.a===0&&t.b===0)return new ke(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*E0;return new ke(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Yw(t,e,n,r){return arguments.length===1?z0(t):new ke(n,e,t,r??1)}function Zo(t,e,n,r){return arguments.length===1?z0(t):new ke(t,e,n,r??1)}function ke(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function O0(t){if(isNaN(t.h))return new ye(t.l,0,0,t.opacity);var e=t.h*k0;return new ye(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}lr(ke,Zo,ci(un,{brighter(t){return new ke(this.h,this.c,this.l+Vo*(t??1),this.opacity)},darker(t){return new ke(this.h,this.c,this.l-Vo*(t??1),this.opacity)},rgb(){return O0(this).rgb()}}));var G0=-.14861,Qs=1.78277,Js=-.29227,Ko=-.90649,fi=1.97294,U0=fi*Ko,Y0=fi*Qs,B0=Qs*Js-Ko*G0;function Bw(t){if(t instanceof Nn)return new Nn(t.h,t.s,t.l,t.opacity);t instanceof Nt||(t=Hs(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(B0*r+U0*e-Y0*n)/(B0+U0-Y0),o=r-i,a=(fi*(n-i)-Js*o)/Ko,u=Math.sqrt(a*a+o*o)/(fi*i*(1-i)),c=u?Math.atan2(a,o)*E0-120:NaN;return new Nn(c<0?c+360:c,u,i,t.opacity)}function be(t,e,n,r){return arguments.length===1?Bw(t):new Nn(t,e,n,r??1)}function Nn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}lr(Nn,be,ci(un,{brighter(t){return t=t==null?fr:Math.pow(fr,t),new Nn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Dn:Math.pow(Dn,t),new Nn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*k0,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Nt(255*(e+n*(G0*r+Qs*i)),255*(e+n*(Js*r+Ko*i)),255*(e+n*(fi*r)),this.opacity)}}));function q0(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function W0(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<e-1?t[r+2]:2*o-i;return q0((n-r/e)*e,a,i,o,u)}}function H0(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],u=t[(r+2)%e];return q0((n-r/e)*e,i,o,a,u)}}const Qo=t=>()=>t;function X0(t,e){return function(n){return t+n*e}}function qw(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Jo(t,e){var n=e-t;return n?X0(t,n>180||n<-180?n-360*Math.round(n/360):n):Qo(isNaN(t)?e:t)}function Ww(t){return(t=+t)==1?Lt:function(e,n){return n-e?qw(e,n,t):Qo(isNaN(e)?n:e)}}function Lt(t,e){var n=e-t;return n?X0(t,n):Qo(isNaN(t)?e:t)}const hi=function t(e){var n=Ww(e);function r(i,o){var a=n((i=pr(i)).r,(o=pr(o)).r),u=n(i.g,o.g),c=n(i.b,o.b),s=Lt(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=c(f),i.opacity=s(f),i+""}}return r.gamma=t,r}(1);function V0(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,u;for(a=0;a<n;++a)u=pr(e[a]),r[a]=u.r||0,i[a]=u.g||0,o[a]=u.b||0;return r=t(r),i=t(i),o=t(o),u.opacity=1,function(c){return u.r=r(c),u.g=i(c),u.b=o(c),u+""}}}var j0=V0(W0),Hw=V0(H0);function tc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function Z0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Xw(t,e){return(Z0(e)?tc:K0)(t,e)}function K0(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=cn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(u){for(a=0;a<r;++a)o[a]=i[a](u);return o}}function Q0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ce(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function J0(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=cn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ec=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nc=new RegExp(ec.source,"g");function Vw(t){return function(){return t}}function jw(t){return function(e){return t(e)+""}}function rc(t,e){var n=ec.lastIndex=nc.lastIndex=0,r,i,o,a=-1,u=[],c=[];for(t=t+"",e=e+"";(r=ec.exec(t))&&(i=nc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:ce(r,i)})),n=nc.lastIndex;return n<e.length&&(o=e.slice(n),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?jw(c[0].x):Vw(e):(e=c.length,function(s){for(var f=0,h;f<e;++f)u[(h=c[f]).i]=h.x(s);return u.join("")})}function cn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Qo(e):(n==="number"?ce:n==="string"?(r=sn(e))?(e=r,hi):rc:e instanceof sn?hi:e instanceof Date?Q0:Z0(e)?tc:Array.isArray(e)?K0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?J0:ce)(t,e)}function Zw(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Kw(t,e){var n=Jo(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function ta(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var tp=180/Math.PI,ic={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ep(t,e,n,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,c/=u),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tp,skewX:Math.atan(c)*tp,scaleX:a,scaleY:u}}var ea;function Qw(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ic:ep(e.a,e.b,e.c,e.d,e.e,e.f)}function Jw(t){return t==null||(ea||(ea=document.createElementNS("http://www.w3.org/2000/svg","g")),ea.setAttribute("transform",t),!(t=ea.transform.baseVal.consolidate()))?ic:(t=t.matrix,ep(t.a,t.b,t.c,t.d,t.e,t.f))}function np(t,e,n,r){function i(s){return s.length?s.pop()+" ":""}function o(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ce(s,h)},{i:g-2,x:ce(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(s,f,h,l){s!==f?(s-f>180?f+=360:f-s>180&&(s+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ce(s,f)})):f&&h.push(i(h)+"rotate("+f+r)}function u(s,f,h,l){s!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ce(s,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ce(s,h)},{i:g-2,x:ce(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(s,f){var h=[],l=[];return s=t(s),f=t(f),o(s.translateX,s.translateY,f.translateX,f.translateY,h,l),a(s.rotate,f.rotate,h,l),u(s.skewX,f.skewX,h,l),c(s.scaleX,s.scaleY,f.scaleX,f.scaleY,h,l),s=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var rp=np(Qw,"px, ","px)","deg)"),ip=np(Jw,", ",")",")"),t3=1e-12;function op(t){return((t=Math.exp(t))+1/t)/2}function e3(t){return((t=Math.exp(t))-1/t)/2}function n3(t){return((t=Math.exp(2*t))-1)/(t+1)}const ap=function t(e,n,r){function i(o,a){var u=o[0],c=o[1],s=o[2],f=a[0],h=a[1],l=a[2],p=f-u,d=h-c,g=p*p+d*d,m,b;if(g<t3)b=Math.log(l/s)/e,m=function(A){return[u+A*p,c+A*d,s*Math.exp(e*A*b)]};else{var x=Math.sqrt(g),_=(l*l-s*s+r*g)/(2*s*n*x),v=(l*l-s*s-r*g)/(2*l*n*x),w=Math.log(Math.sqrt(_*_+1)-_),y=Math.log(Math.sqrt(v*v+1)-v);b=(y-w)/e,m=function(A){var M=A*b,$=op(w),P=s/(n*x)*($*n3(e*M+w)-e3(w));return[u+P*p,c+P*d,s*$/op(e*M+w)]}}return m.duration=b*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),u=a*a,c=u*u;return t(a,u,c)},i}(Math.SQRT2,2,4);function up(t){return function(e,n){var r=t((e=Ho(e)).h,(n=Ho(n)).h),i=Lt(e.s,n.s),o=Lt(e.l,n.l),a=Lt(e.opacity,n.opacity);return function(u){return e.h=r(u),e.s=i(u),e.l=o(u),e.opacity=a(u),e+""}}}const r3=up(Jo);var i3=up(Lt);function o3(t,e){var n=Lt((t=jo(t)).l,(e=jo(e)).l),r=Lt(t.a,e.a),i=Lt(t.b,e.b),o=Lt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function sp(t){return function(e,n){var r=t((e=Zo(e)).h,(n=Zo(n)).h),i=Lt(e.c,n.c),o=Lt(e.l,n.l),a=Lt(e.opacity,n.opacity);return function(u){return e.h=r(u),e.c=i(u),e.l=o(u),e.opacity=a(u),e+""}}}const a3=sp(Jo);var u3=sp(Lt);function cp(t){return function e(n){n=+n;function r(i,o){var a=t((i=be(i)).h,(o=be(o)).h),u=Lt(i.s,o.s),c=Lt(i.l,o.l),s=Lt(i.opacity,o.opacity);return function(f){return i.h=a(f),i.s=u(f),i.l=c(Math.pow(f,n)),i.opacity=s(f),i+""}}return r.gamma=e,r}(1)}const s3=cp(Jo);var na=cp(Lt);function lp(t,e){e===void 0&&(e=t,t=cn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var u=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[u](a-u)}}function c3(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var gr=0,pi=0,di=0,fp=1e3,ra,gi,ia=0,Ln=0,oa=0,mi=typeof performance=="object"&&performance.now?performance:Date,hp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function yi(){return Ln||(hp(l3),Ln=mi.now()+oa)}function l3(){Ln=0}function bi(){this._call=this._time=this._next=null}bi.prototype=aa.prototype={constructor:bi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?yi():+n)+(e==null?0:+e),!this._next&&gi!==this&&(gi?gi._next=this:ra=this,gi=this),this._call=t,this._time=n,oc()},stop:function(){this._call&&(this._call=null,this._time=1/0,oc())}};function aa(t,e,n){var r=new bi;return r.restart(t,e,n),r}function pp(){yi(),++gr;for(var t=ra,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--gr}function dp(){Ln=(ia=mi.now())+oa,gr=pi=0;try{pp()}finally{gr=0,h3(),Ln=0}}function f3(){var t=mi.now(),e=t-ia;e>fp&&(oa-=e,ia=t)}function h3(){for(var t,e=ra,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ra=n);gi=t,oc(r)}function oc(t){if(!gr){pi&&(pi=clearTimeout(pi));var e=t-Ln;e>24?(t<1/0&&(pi=setTimeout(dp,t-mi.now()-oa)),di&&(di=clearInterval(di))):(di||(ia=mi.now(),di=setInterval(f3,fp)),gr=1,hp(dp))}}function ac(t,e,n){var r=new bi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function p3(t,e,n){var r=new bi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,u){a=+a,u=u==null?yi():+u,r._restart(function c(s){s+=i,r._restart(c,i+=a,u),o(s)},a,u)},r.restart(t,e,n),r)}var d3=Sn("start","end","cancel","interrupt"),g3=[],gp=0,uc=1,sc=2,ua=3,mp=4,cc=5,sa=6;function ca(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;m3(t,n,{name:e,index:r,group:i,on:d3,tween:g3,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:gp})}function lc(t,e){var n=ve(t,e);if(n.state>gp)throw new Error("too late; already scheduled");return n}function Ee(t,e){var n=ve(t,e);if(n.state>ua)throw new Error("too late; already running");return n}function ve(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function m3(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=aa(o,0,n.time);function o(s){n.state=uc,n.timer.restart(a,n.delay,n.time),n.delay<=s&&a(s-n.delay)}function a(s){var f,h,l,p;if(n.state!==uc)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===ua)return ac(a);p.state===mp?(p.state=sa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=sa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(ac(function(){n.state===ua&&(n.state=mp,n.timer.restart(u,n.delay,n.time),u(s))}),n.state=sc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===sc){for(n.state=ua,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function u(s){for(var f=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(c),n.state=cc,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===cc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=sa,n.timer.stop(),delete r[e];for(var s in r)return;delete t.__transition}}function Cn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>sc&&r.state<cc,r.state=sa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function y3(t){return this.each(function(){Cn(this,t)})}function b3(t,e){var n,r;return function(){var i=Ee(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function v3(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ee(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},c=0,s=i.length;c<s;++c)if(i[c].name===e){i[c]=u;break}c===s&&i.push(u)}o.tween=i}}function x3(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=ve(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?b3:v3)(n,t,e))}function fc(t,e,n){var r=t._id;return t.each(function(){var i=Ee(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return ve(i,r).value[e]}}function yp(t,e){var n;return(typeof e=="number"?ce:e instanceof sn?hi:(n=sn(e))?(e=n,hi):rc)(t,e)}function _3(t){return function(){this.removeAttribute(t)}}function w3(t){return function(){this.removeAttributeNS(t.space,t.local)}}function A3(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function $3(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function M3(t,e,n){var r,i,o;return function(){var a,u=n(this),c;return u==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u)))}}function S3(t,e,n){var r,i,o;return function(){var a,u=n(this),c;return u==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u)))}}function T3(t,e){var n=ui(t),r=n==="transform"?ip:yp;return this.attrTween(t,typeof e=="function"?(n.local?S3:M3)(n,r,fc(this,"attr."+t,e)):e==null?(n.local?w3:_3)(n):(n.local?$3:A3)(n,r,e))}function P3(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function D3(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function k3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&D3(t,o)),n}return i._value=e,i}function E3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&P3(t,o)),n}return i._value=e,i}function N3(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ui(t);return this.tween(n,(r.local?k3:E3)(r,e))}function L3(t,e){return function(){lc(this,t).delay=+e.apply(this,arguments)}}function C3(t,e){return e=+e,function(){lc(this,t).delay=e}}function I3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?L3:C3)(e,t)):ve(this.node(),e).delay}function R3(t,e){return function(){Ee(this,t).duration=+e.apply(this,arguments)}}function F3(t,e){return e=+e,function(){Ee(this,t).duration=e}}function z3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?R3:F3)(e,t)):ve(this.node(),e).duration}function O3(t,e){if(typeof e!="function")throw new Error;return function(){Ee(this,t).ease=e}}function G3(t){var e=this._id;return arguments.length?this.each(O3(e,t)):ve(this.node(),e).ease}function U3(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ee(this,t).ease=n}}function Y3(t){if(typeof t!="function")throw new Error;return this.each(U3(this._id,t))}function B3(t){typeof t!="function"&&(t=Os(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Ne(r,this._parents,this._name,this._id)}function q3(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),l,p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new Ne(a,this._parents,this._name,this._id)}function W3(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function H3(t,e,n){var r,i,o=W3(e)?lc:Ee;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}function X3(t,e){var n=this._id;return arguments.length<2?ve(this.node(),n).on.on(t):this.each(H3(n,t,e))}function V3(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function j3(){return this.on("end.remove",V3(this._id))}function Z3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Oo(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,s=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=u[l])&&(h=t.call(f,f.__data__,l,u))&&("__data__"in f&&(h.__data__=f.__data__),s[l]=h,ca(s[l],e,n,l,s,ve(f,n)));return new Ne(o,this._parents,e,n)}function K3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=zs(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c=r[u],s=c.length,f,h=0;h<s;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=ve(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&ca(p,e,n,g,l,d);o.push(l),a.push(f)}return new Ne(o,a,e,n)}var Q3=Pn.prototype.constructor;function J3(){return new Q3(this._groups,this._parents)}function t5(t,e){var n,r,i;return function(){var o=Tn(this,t),a=(this.style.removeProperty(t),Tn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function bp(t){return function(){this.style.removeProperty(t)}}function e5(t,e,n){var r,i=n+"",o;return function(){var a=Tn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function n5(t,e,n){var r,i,o;return function(){var a=Tn(this,t),u=n(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(t),Tn(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u))}}function r5(t,e){var n,r,i,o="style."+e,a="end."+o,u;return function(){var c=Ee(this,t),s=c.on,f=c.value[o]==null?u||(u=bp(e)):void 0;(s!==n||i!==f)&&(r=(n=s).copy()).on(a,i=f),c.on=r}}function i5(t,e,n){var r=(t+="")=="transform"?rp:yp;return e==null?this.styleTween(t,t5(t,r)).on("end.style."+t,bp(t)):typeof e=="function"?this.styleTween(t,n5(t,r,fc(this,"style."+t,e))).each(r5(this._id,t)):this.styleTween(t,e5(t,r,e),n).on("end.style."+t,null)}function o5(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function a5(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&o5(t,a,n)),r}return o._value=e,o}function u5(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,a5(t,e,n??""))}function s5(t){return function(){this.textContent=t}}function c5(t){return function(){var e=t(this);this.textContent=e??""}}function l5(t){return this.tween("text",typeof t=="function"?c5(fc(this,"text",t)):s5(t==null?"":t+""))}function f5(t){return function(e){this.textContent=t.call(this,e)}}function h5(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&f5(i)),e}return r._value=t,r}function p5(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,h5(t))}function d5(){for(var t=this._name,e=this._id,n=xp(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)if(c=a[s]){var f=ve(c,e);ca(c,t,n,s,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ne(r,this._parents,t,n)}function g5(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var s=Ee(this,r),f=s.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(c)),s.on=e}),i===0&&o()})}var m5=0;function Ne(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function vp(t){return Pn().transition(t)}function xp(){return++m5}var Ye=Pn.prototype;Ne.prototype=vp.prototype={constructor:Ne,select:Z3,selectAll:K3,selectChild:Ye.selectChild,selectChildren:Ye.selectChildren,filter:B3,merge:q3,selection:J3,transition:d5,call:Ye.call,nodes:Ye.nodes,node:Ye.node,size:Ye.size,empty:Ye.empty,each:Ye.each,on:X3,attr:T3,attrTween:N3,style:i5,styleTween:u5,text:l5,textTween:p5,remove:j3,tween:x3,delay:I3,duration:z3,ease:G3,easeVarying:Y3,end:g5,[Symbol.iterator]:Ye[Symbol.iterator]};const y5=t=>+t;function b5(t){return t*t}function v5(t){return t*(2-t)}function _p(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function x5(t){return t*t*t}function _5(t){return--t*t*t+1}function vi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var hc=3,w5=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(hc),A5=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(hc),wp=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(hc),Ap=Math.PI,$p=Ap/2;function $5(t){return+t==1?1:1-Math.cos(t*$p)}function M5(t){return Math.sin(t*$p)}function Mp(t){return(1-Math.cos(Ap*t))/2}function ln(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function S5(t){return ln(1-+t)}function T5(t){return 1-ln(t)}function Sp(t){return((t*=2)<=1?ln(1-t):2-ln(t-1))/2}function P5(t){return 1-Math.sqrt(1-t*t)}function D5(t){return Math.sqrt(1- --t*t)}function Tp(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var pc=4/11,k5=6/11,E5=8/11,N5=3/4,L5=9/11,C5=10/11,I5=15/16,R5=21/22,F5=63/64,la=1/pc/pc;function z5(t){return 1-xi(1-t)}function xi(t){return(t=+t)<pc?la*t*t:t<E5?la*(t-=k5)*t+N5:t<C5?la*(t-=L5)*t+I5:la*(t-=R5)*t+F5}function O5(t){return((t*=2)<=1?1-xi(1-t):xi(t-1)+1)/2}var dc=1.70158,G5=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(dc),U5=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(dc),Pp=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(dc),mr=2*Math.PI,gc=1,mc=.3,Y5=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=mr);function i(o){return e*ln(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*mr)},i.period=function(o){return t(e,o)},i}(gc,mc),fa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=mr);function i(o){return 1-e*ln(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*mr)},i.period=function(o){return t(e,o)},i}(gc,mc),B5=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=mr);function i(o){return((o=o*2-1)<0?e*ln(-o)*Math.sin((r-o)/n):2-e*ln(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*mr)},i.period=function(o){return t(e,o)},i}(gc,mc),q5={time:null,delay:0,duration:250,ease:vi};function W5(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function H5(t){var e,n;t instanceof Ne?(e=t._id,t=t._name):(e=xp(),(n=q5).time=yi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&ca(c,t,e,s,a,n||W5(c,e));return new Ne(r,this._parents,t,e)}Pn.prototype.interrupt=y3,Pn.prototype.transition=H5;var X5=[null];function V5(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>uc&&r.name===e)return new Ne([[t]],X5,e,+i)}return null}const yc=t=>()=>t;function j5(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Z5(t){t.stopImmediatePropagation()}function bc(t){t.preventDefault(),t.stopImmediatePropagation()}var Dp={name:"drag"},vc={name:"space"},yr={name:"handle"},br={name:"center"};const{abs:kp,max:Ft,min:zt}=Math;function Ep(t){return[+t[0],+t[1]]}function xc(t){return[Ep(t[0]),Ep(t[1])]}var ha={name:"x",handles:["w","e"].map(_i),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},pa={name:"y",handles:["n","s"].map(_i),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},K5={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(_i),input:function(t){return t==null?null:xc(t)},output:function(t){return t}},Be={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Np={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Lp={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Q5={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},J5={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function _i(t){return{type:t}}function t6(t){return!t.ctrlKey&&!t.button}function e6(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function n6(){return navigator.maxTouchPoints||"ontouchstart"in this}function _c(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function r6(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function i6(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function o6(){return wc(ha)}function a6(){return wc(pa)}function u6(){return wc(K5)}function wc(t){var e=e6,n=t6,r=n6,i=!0,o=Sn("start","brush","end"),a=6,u;function c(m){var b=m.property("__brush",g).selectAll(".overlay").data([_i("overlay")]);b.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Be.overlay).merge(b).each(function(){var _=_c(this).extent;j(this).attr("x",_[0][0]).attr("y",_[0][1]).attr("width",_[1][0]-_[0][0]).attr("height",_[1][1]-_[0][1])}),m.selectAll(".selection").data([_i("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Be.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=m.selectAll(".handle").data(t.handles,function(_){return _.type});x.exit().remove(),x.enter().append("rect").attr("class",function(_){return"handle handle--"+_.type}).attr("cursor",function(_){return Be[_.type]}),m.each(s).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",l).filter(r).on("touchstart.brush",l).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(m,b,x){m.tween?m.on("start.brush",function(_){f(this,arguments).beforestart().start(_)}).on("interrupt.brush end.brush",function(_){f(this,arguments).end(_)}).tween("brush",function(){var _=this,v=_.__brush,w=f(_,arguments),y=v.selection,A=t.input(typeof b=="function"?b.apply(this,arguments):b,v.extent),M=cn(y,A);function $(P){v.selection=P===1&&A===null?null:M(P),s.call(_),w.brush()}return y!==null&&A!==null?$:$(1)}):m.each(function(){var _=this,v=arguments,w=_.__brush,y=t.input(typeof b=="function"?b.apply(_,v):b,w.extent),A=f(_,v).beforestart();Cn(_),w.selection=y===null?null:y,s.call(_),A.start(x).brush(x).end(x)})},c.clear=function(m,b){c.move(m,null,b)};function s(){var m=j(this),b=_c(this).selection;b?(m.selectAll(".selection").style("display",null).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?b[1][0]-a/2:b[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?b[1][1]-a/2:b[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?b[1][0]-b[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?b[1][1]-b[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(m,b,x){var _=m.__brush.emitter;return _&&(!x||!_.clean)?_:new h(m,b,x)}function h(m,b,x){this.that=m,this.args=b,this.state=m.__brush,this.active=0,this.clean=x}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,b){return this.starting?(this.starting=!1,this.emit("start",m,b)):this.emit("brush",m),this},brush:function(m,b){return this.emit("brush",m,b),this},end:function(m,b){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,b)),this},emit:function(m,b,x){var _=j(this.that).datum();o.call(m,this.that,new j5(m,{sourceEvent:b,target:c,selection:t.output(this.state.selection),mode:x,dispatch:o}),_)}};function l(m){if(u&&!m.touches||!n.apply(this,arguments))return;var b=this,x=m.target.__data__.type,_=(i&&m.metaKey?x="overlay":x)==="selection"?Dp:i&&m.altKey?br:yr,v=t===pa?null:Q5[x],w=t===ha?null:J5[x],y=_c(b),A=y.extent,M=y.selection,$=A[0][0],P,S,L=A[0][1],E,T,k=A[1][0],D,N,I=A[1][1],C,z,Y=0,W=0,st,rt=v&&w&&i&&m.shiftKey,at,_t,ct=Array.from(m.touches||[m],Z=>{const Mt=Z.identifier;return Z=oe(Z,b),Z.point0=Z.slice(),Z.identifier=Mt,Z});Cn(b);var St=f(b,arguments,!0).beforestart();if(x==="overlay"){M&&(st=!0);const Z=[ct[0],ct[1]||ct[0]];y.selection=M=[[P=t===pa?$:zt(Z[0][0],Z[1][0]),E=t===ha?L:zt(Z[0][1],Z[1][1])],[D=t===pa?k:Ft(Z[0][0],Z[1][0]),C=t===ha?I:Ft(Z[0][1],Z[1][1])]],ct.length>1&&$t(m)}else P=M[0][0],E=M[0][1],D=M[1][0],C=M[1][1];S=P,T=E,N=D,z=C;var G=j(b).attr("pointer-events","none"),Q=G.selectAll(".overlay").attr("cursor",Be[x]);if(m.touches)St.moved=F,St.ended=ht;else{var ot=j(m.view).on("mousemove.brush",F,!0).on("mouseup.brush",ht,!0);i&&ot.on("keydown.brush",Jt,!0).on("keyup.brush",te,!0),Uo(m.view)}s.call(b),St.start(m,_.name);function F(Z){for(const Mt of Z.changedTouches||[Z])for(const So of ct)So.identifier===Mt.identifier&&(So.cur=oe(Mt,b));if(rt&&!at&&!_t&&ct.length===1){const Mt=ct[0];kp(Mt.cur[0]-Mt[0])>kp(Mt.cur[1]-Mt[1])?_t=!0:at=!0}for(const Mt of ct)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);st=!0,bc(Z),$t(Z)}function $t(Z){const Mt=ct[0],So=Mt.point0;var _n;switch(Y=Mt[0]-So[0],W=Mt[1]-So[1],_){case vc:case Dp:{v&&(Y=Ft($-P,zt(k-D,Y)),S=P+Y,N=D+Y),w&&(W=Ft(L-E,zt(I-C,W)),T=E+W,z=C+W);break}case yr:{ct[1]?(v&&(S=Ft($,zt(k,ct[0][0])),N=Ft($,zt(k,ct[1][0])),v=1),w&&(T=Ft(L,zt(I,ct[0][1])),z=Ft(L,zt(I,ct[1][1])),w=1)):(v<0?(Y=Ft($-P,zt(k-P,Y)),S=P+Y,N=D):v>0&&(Y=Ft($-D,zt(k-D,Y)),S=P,N=D+Y),w<0?(W=Ft(L-E,zt(I-E,W)),T=E+W,z=C):w>0&&(W=Ft(L-C,zt(I-C,W)),T=E,z=C+W));break}case br:{v&&(S=Ft($,zt(k,P-Y*v)),N=Ft($,zt(k,D+Y*v))),w&&(T=Ft(L,zt(I,E-W*w)),z=Ft(L,zt(I,C+W*w)));break}}N<S&&(v*=-1,_n=P,P=D,D=_n,_n=S,S=N,N=_n,x in Np&&Q.attr("cursor",Be[x=Np[x]])),z<T&&(w*=-1,_n=E,E=C,C=_n,_n=T,T=z,z=_n,x in Lp&&Q.attr("cursor",Be[x=Lp[x]])),y.selection&&(M=y.selection),at&&(S=M[0][0],N=M[1][0]),_t&&(T=M[0][1],z=M[1][1]),(M[0][0]!==S||M[0][1]!==T||M[1][0]!==N||M[1][1]!==z)&&(y.selection=[[S,T],[N,z]],s.call(b),St.brush(Z,_.name))}function ht(Z){if(Z5(Z),Z.touches){if(Z.touches.length)return;u&&clearTimeout(u),u=setTimeout(function(){u=null},500)}else Yo(Z.view,st),ot.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);G.attr("pointer-events","all"),Q.attr("cursor",Be.overlay),y.selection&&(M=y.selection),r6(M)&&(y.selection=null,s.call(b)),St.end(Z,_.name)}function Jt(Z){switch(Z.keyCode){case 16:{rt=v&&w;break}case 18:{_===yr&&(v&&(D=N-Y*v,P=S+Y*v),w&&(C=z-W*w,E=T+W*w),_=br,$t(Z));break}case 32:{(_===yr||_===br)&&(v<0?D=N-Y:v>0&&(P=S-Y),w<0?C=z-W:w>0&&(E=T-W),_=vc,Q.attr("cursor",Be.selection),$t(Z));break}default:return}bc(Z)}function te(Z){switch(Z.keyCode){case 16:{rt&&(at=_t=rt=!1,$t(Z));break}case 18:{_===br&&(v<0?D=N:v>0&&(P=S),w<0?C=z:w>0&&(E=T),_=yr,$t(Z));break}case 32:{_===vc&&(Z.altKey?(v&&(D=N-Y*v,P=S+Y*v),w&&(C=z-W*w,E=T+W*w),_=br):(v<0?D=N:v>0&&(P=S),w<0?C=z:w>0&&(E=T),_=yr),Q.attr("cursor",Be[x]),$t(Z));break}default:return}bc(Z)}}function p(m){f(this,arguments).moved(m)}function d(m){f(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=xc(e.apply(this,arguments)),m.dim=t,m}return c.extent=function(m){return arguments.length?(e=typeof m=="function"?m:yc(xc(m)),c):e},c.filter=function(m){return arguments.length?(n=typeof m=="function"?m:yc(!!m),c):n},c.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:yc(!!m),c):r},c.handleSize=function(m){return arguments.length?(a=+m,c):a},c.keyModifiers=function(m){return arguments.length?(i=!!m,c):i},c.on=function(){var m=o.on.apply(o,arguments);return m===o?c:m},c}var Cp=Math.abs,vr=Math.cos,xr=Math.sin,Ip=Math.PI,da=Ip/2,Rp=Ip*2,Fp=Math.max,Ac=1e-12;function $c(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function s6(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function c6(){return Mc(!1,!1)}function l6(){return Mc(!1,!0)}function f6(){return Mc(!0,!1)}function Mc(t,e){var n=0,r=null,i=null,o=null;function a(u){var c=u.length,s=new Array(c),f=$c(0,c),h=new Array(c*c),l=new Array(c),p=0,d;u=Float64Array.from({length:c*c},e?(g,m)=>u[m%c][m/c|0]:(g,m)=>u[m/c|0][m%c]);for(let g=0;g<c;++g){let m=0;for(let b=0;b<c;++b)m+=u[g*c+b]+t*u[b*c+g];p+=s[g]=m}p=Fp(0,Rp-n*c)/p,d=p?n:Rp/c;{let g=0;r&&f.sort((m,b)=>r(s[m],s[b]));for(const m of f){const b=g;if(t){const x=$c(~c+1,c).filter(_=>_<0?u[~_*c+m]:u[m*c+_]);i&&x.sort((_,v)=>i(_<0?-u[~_*c+m]:u[m*c+_],v<0?-u[~v*c+m]:u[m*c+v]));for(const _ of x)if(_<0){const v=h[~_*c+m]||(h[~_*c+m]={source:null,target:null});v.target={index:m,startAngle:g,endAngle:g+=u[~_*c+m]*p,value:u[~_*c+m]}}else{const v=h[m*c+_]||(h[m*c+_]={source:null,target:null});v.source={index:m,startAngle:g,endAngle:g+=u[m*c+_]*p,value:u[m*c+_]}}l[m]={index:m,startAngle:b,endAngle:g,value:s[m]}}else{const x=$c(0,c).filter(_=>u[m*c+_]||u[_*c+m]);i&&x.sort((_,v)=>i(u[m*c+_],u[m*c+v]));for(const _ of x){let v;if(m<_?(v=h[m*c+_]||(h[m*c+_]={source:null,target:null}),v.source={index:m,startAngle:g,endAngle:g+=u[m*c+_]*p,value:u[m*c+_]}):(v=h[_*c+m]||(h[_*c+m]={source:null,target:null}),v.target={index:m,startAngle:g,endAngle:g+=u[m*c+_]*p,value:u[m*c+_]},m===_&&(v.source=v.target)),v.source&&v.target&&v.source.value<v.target.value){const w=v.source;v.source=v.target,v.target=w}}l[m]={index:m,startAngle:b,endAngle:g,value:s[m]}}g+=d}}return h=Object.values(h),h.groups=l,o?h.sort(o):h}return a.padAngle=function(u){return arguments.length?(n=Fp(0,u),a):n},a.sortGroups=function(u){return arguments.length?(r=u,a):r},a.sortSubgroups=function(u){return arguments.length?(i=u,a):i},a.sortChords=function(u){return arguments.length?(u==null?o=null:(o=s6(u))._=u,a):o&&o._},a}const Sc=Math.PI,Tc=2*Sc,In=1e-6,h6=Tc-In;function zp(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function p6(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zp;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let wi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?zp:p6(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,u=this._y1,c=r-e,s=i-n,f=a-e,h=u-n,l=f*f+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>In)if(!(Math.abs(h*c-s*f)>In)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-u,g=c*c+s*s,m=p*p+d*d,b=Math.sqrt(g),x=Math.sqrt(l),_=o*Math.tan((Sc-Math.acos((g+l-m)/(2*b*x)))/2),v=_/x,w=_/b;Math.abs(v-1)>In&&this._append`L${e+v*f},${n+v*h}`,this._append`A${o},${o},0,0,${+(h*p>f*d)},${this._x1=e+w*c},${this._y1=n+w*s}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),c=r*Math.sin(i),s=e+u,f=n+c,h=1^a,l=a?i-o:o-i;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>In||Math.abs(this._y1-f)>In)&&this._append`L${s},${f}`,r&&(l<0&&(l=l%Tc+Tc),l>h6?this._append`A${r},${r},0,1,${h},${e-u},${n-c}A${r},${r},0,1,${h},${this._x1=s},${this._y1=f}`:l>In&&this._append`A${r},${r},0,${+(l>=Sc)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Pc(){return new wi}Pc.prototype=wi.prototype;function d6(t=3){return new wi(+t)}var g6=Array.prototype.slice;function Rn(t){return function(){return t}}function m6(t){return t.source}function y6(t){return t.target}function Op(t){return t.radius}function b6(t){return t.startAngle}function v6(t){return t.endAngle}function x6(){return 0}function _6(){return 10}function Gp(t){var e=m6,n=y6,r=Op,i=Op,o=b6,a=v6,u=x6,c=null;function s(){var f,h=e.apply(this,arguments),l=n.apply(this,arguments),p=u.apply(this,arguments)/2,d=g6.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-da,b=a.apply(this,d)-da,x=+i.apply(this,(d[0]=l,d)),_=o.apply(this,d)-da,v=a.apply(this,d)-da;if(c||(c=f=Pc()),p>Ac&&(Cp(b-m)>p*2+Ac?b>m?(m+=p,b-=p):(m-=p,b+=p):m=b=(m+b)/2,Cp(v-_)>p*2+Ac?v>_?(_+=p,v-=p):(_-=p,v+=p):_=v=(_+v)/2),c.moveTo(g*vr(m),g*xr(m)),c.arc(0,0,g,m,b),m!==_||b!==v)if(t){var w=+t.apply(this,arguments),y=x-w,A=(_+v)/2;c.quadraticCurveTo(0,0,y*vr(_),y*xr(_)),c.lineTo(x*vr(A),x*xr(A)),c.lineTo(y*vr(v),y*xr(v))}else c.quadraticCurveTo(0,0,x*vr(_),x*xr(_)),c.arc(0,0,x,_,v);if(c.quadraticCurveTo(0,0,g*vr(m),g*xr(m)),c.closePath(),f)return c=null,f+""||null}return t&&(s.headRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Rn(+f),s):t}),s.radius=function(f){return arguments.length?(r=i=typeof f=="function"?f:Rn(+f),s):r},s.sourceRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Rn(+f),s):r},s.targetRadius=function(f){return arguments.length?(i=typeof f=="function"?f:Rn(+f),s):i},s.startAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Rn(+f),s):o},s.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Rn(+f),s):a},s.padAngle=function(f){return arguments.length?(u=typeof f=="function"?f:Rn(+f),s):u},s.source=function(f){return arguments.length?(e=f,s):e},s.target=function(f){return arguments.length?(n=f,s):n},s.context=function(f){return arguments.length?(c=f??null,s):c},s}function w6(){return Gp()}function A6(){return Gp(_6)}var $6=Array.prototype,Up=$6.slice;function M6(t,e){return t-e}function S6(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const fn=t=>()=>t;function T6(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=P6(t,e[n]))return i;return 0}function P6(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,u=a-1;o<a;u=o++){var c=t[o],s=c[0],f=c[1],h=t[u],l=h[0],p=h[1];if(D6(c,h,e))return 0;f>r!=p>r&&n<(l-s)*(r-f)/(p-f)+s&&(i=-i)}return i}function D6(t,e,n){var r;return k6(t,e,n)&&E6(t[r=+(t[0]===e[0])],n[r],e[r])}function k6(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function E6(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function N6(){}var qe=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Dc(){var t=1,e=1,n=ks,r=c;function i(s){var f=n(s);if(Array.isArray(f))f=f.slice().sort(M6);else{const h=ei(s,L6);for(f=$n(...Ds(h[0],h[1],f),f);f[f.length-1]>=h[1];)f.pop();for(;f[1]<h[0];)f.shift()}return f.map(h=>o(s,h))}function o(s,f){const h=f==null?NaN:+f;if(isNaN(h))throw new Error(`invalid value: ${f}`);var l=[],p=[];return a(s,h,function(d){r(d,s,h),S6(d)>0?l.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=l.length,b;g<m;++g)if(T6((b=l[g])[0],d)!==-1){b.push(d);return}}),{type:"MultiPolygon",value:f,coordinates:l}}function a(s,f,h){var l=new Array,p=new Array,d,g,m,b,x,_;for(d=g=-1,b=Fn(s[0],f),qe[b<<1].forEach(v);++d<t-1;)m=b,b=Fn(s[d+1],f),qe[m|b<<1].forEach(v);for(qe[b<<0].forEach(v);++g<e-1;){for(d=-1,b=Fn(s[g*t+t],f),x=Fn(s[g*t],f),qe[b<<1|x<<2].forEach(v);++d<t-1;)m=b,b=Fn(s[g*t+t+d+1],f),_=x,x=Fn(s[g*t+d+1],f),qe[m|b<<1|x<<2|_<<3].forEach(v);qe[b|x<<3].forEach(v)}for(d=-1,x=s[g*t]>=f,qe[x<<2].forEach(v);++d<t-1;)_=x,x=Fn(s[g*t+d+1],f),qe[x<<2|_<<3].forEach(v);qe[x<<3].forEach(v);function v(w){var y=[w[0][0]+d,w[0][1]+g],A=[w[1][0]+d,w[1][1]+g],M=u(y),$=u(A),P,S;(P=p[M])?(S=l[$])?(delete p[P.end],delete l[S.start],P===S?(P.ring.push(A),h(P.ring)):l[P.start]=p[S.end]={start:P.start,end:S.end,ring:P.ring.concat(S.ring)}):(delete p[P.end],P.ring.push(A),p[P.end=$]=P):(P=l[$])?(S=p[M])?(delete l[P.start],delete p[S.end],P===S?(P.ring.push(A),h(P.ring)):l[S.start]=p[P.end]={start:S.start,end:P.end,ring:S.ring.concat(P.ring)}):(delete l[P.start],P.ring.unshift(y),l[P.start=M]=P):l[M]=p[$]={start:M,end:$,ring:[y,A]}}}function u(s){return s[0]*2+s[1]*(t+1)*4}function c(s,f,h){s.forEach(function(l){var p=l[0],d=l[1],g=p|0,m=d|0,b=kc(f[m*t+g]);p>0&&p<t&&g===p&&(l[0]=Yp(p,kc(f[m*t+g-1]),b,h)),d>0&&d<e&&m===d&&(l[1]=Yp(d,kc(f[(m-1)*t+g]),b,h))})}return i.contour=o,i.size=function(s){if(!arguments.length)return[t,e];var f=Math.floor(s[0]),h=Math.floor(s[1]);if(!(f>=0&&h>=0))throw new Error("invalid size");return t=f,e=h,i},i.thresholds=function(s){return arguments.length?(n=typeof s=="function"?s:Array.isArray(s)?fn(Up.call(s)):fn(s),i):n},i.smooth=function(s){return arguments.length?(r=s?c:N6,i):r===c},i}function L6(t){return isFinite(t)?t:NaN}function Fn(t,e){return t==null?!1:+t>=e}function kc(t){return t==null||isNaN(t=+t)?-1/0:t}function Yp(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function C6(t){return t[0]}function I6(t){return t[1]}function R6(){return 1}function F6(){var t=C6,e=I6,n=R6,r=960,i=500,o=20,a=2,u=o*3,c=r+u*2>>a,s=i+u*2>>a,f=fn(20);function h(x){var _=new Float32Array(c*s),v=Math.pow(2,-a),w=-1;for(const E of x){var y=(t(E,++w,x)+u)*v,A=(e(E,w,x)+u)*v,M=+n(E,w,x);if(M&&y>=0&&y<c&&A>=0&&A<s){var $=Math.floor(y),P=Math.floor(A),S=y-$-.5,L=A-P-.5;_[$+P*c]+=(1-S)*(1-L)*M,_[$+1+P*c]+=S*(1-L)*M,_[$+1+(P+1)*c]+=S*L*M,_[$+(P+1)*c]+=(1-S)*L*M}}return zh({data:_,width:c,height:s},o*v),_}function l(x){var _=h(x),v=f(_),w=Math.pow(2,2*a);return Array.isArray(v)||(v=$n(Number.MIN_VALUE,ri(_)/w,v)),Dc().size([c,s]).thresholds(v.map(y=>y*w))(_).map((y,A)=>(y.value=+v[A],p(y)))}l.contours=function(x){var _=h(x),v=Dc().size([c,s]),w=Math.pow(2,2*a),y=A=>{A=+A;var M=p(v.contour(_,A*w));return M.value=A,M};return Object.defineProperty(y,"max",{get:()=>ri(_)/w}),y};function p(x){return x.coordinates.forEach(d),x}function d(x){x.forEach(g)}function g(x){x.forEach(m)}function m(x){x[0]=x[0]*Math.pow(2,a)-u,x[1]=x[1]*Math.pow(2,a)-u}function b(){return u=o*3,c=r+u*2>>a,s=i+u*2>>a,l}return l.x=function(x){return arguments.length?(t=typeof x=="function"?x:fn(+x),l):t},l.y=function(x){return arguments.length?(e=typeof x=="function"?x:fn(+x),l):e},l.weight=function(x){return arguments.length?(n=typeof x=="function"?x:fn(+x),l):n},l.size=function(x){if(!arguments.length)return[r,i];var _=+x[0],v=+x[1];if(!(_>=0&&v>=0))throw new Error("invalid size");return r=_,i=v,b()},l.cellSize=function(x){if(!arguments.length)return 1<<a;if(!((x=+x)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(x)/Math.LN2),b()},l.thresholds=function(x){return arguments.length?(f=typeof x=="function"?x:Array.isArray(x)?fn(Up.call(x)):fn(x),l):f},l.bandwidth=function(x){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*x*x+1)-1)/2,b()},l}const We=11102230246251565e-32,Ot=134217729,z6=(3+8*We)*We;function Ec(t,e,n,r,i){let o,a,u,c,s=e[0],f=r[0],h=0,l=0;f>s==f>-s?(o=s,s=e[++h]):(o=f,f=r[++l]);let p=0;if(h<t&&l<n)for(f>s==f>-s?(a=s+o,u=o-(a-s),s=e[++h]):(a=f+o,u=o-(a-f),f=r[++l]),o=a,u!==0&&(i[p++]=u);h<t&&l<n;)f>s==f>-s?(a=o+s,c=a-o,u=o-(a-c)+(s-c),s=e[++h]):(a=o+f,c=a-o,u=o-(a-c)+(f-c),f=r[++l]),o=a,u!==0&&(i[p++]=u);for(;h<t;)a=o+s,c=a-o,u=o-(a-c)+(s-c),s=e[++h],o=a,u!==0&&(i[p++]=u);for(;l<n;)a=o+f,c=a-o,u=o-(a-c)+(f-c),f=r[++l],o=a,u!==0&&(i[p++]=u);return(o!==0||p===0)&&(i[p++]=o),p}function O6(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Ai(t){return new Float64Array(t)}const G6=(3+16*We)*We,U6=(2+12*We)*We,Y6=(9+64*We)*We*We,_r=Ai(4),Bp=Ai(8),qp=Ai(12),Wp=Ai(16),Bt=Ai(4);function B6(t,e,n,r,i,o,a){let u,c,s,f,h,l,p,d,g,m,b,x,_,v,w,y,A,M;const $=t-i,P=n-i,S=e-o,L=r-o;v=$*L,l=Ot*$,p=l-(l-$),d=$-p,l=Ot*L,g=l-(l-L),m=L-g,w=d*m-(v-p*g-d*g-p*m),y=S*P,l=Ot*S,p=l-(l-S),d=S-p,l=Ot*P,g=l-(l-P),m=P-g,A=d*m-(y-p*g-d*g-p*m),b=w-A,h=w-b,_r[0]=w-(b+h)+(h-A),x=v+b,h=x-v,_=v-(x-h)+(b-h),b=_-y,h=_-b,_r[1]=_-(b+h)+(h-y),M=x+b,h=M-x,_r[2]=x-(M-h)+(b-h),_r[3]=M;let E=O6(4,_r),T=U6*a;if(E>=T||-E>=T||(h=t-$,u=t-($+h)+(h-i),h=n-P,s=n-(P+h)+(h-i),h=e-S,c=e-(S+h)+(h-o),h=r-L,f=r-(L+h)+(h-o),u===0&&c===0&&s===0&&f===0)||(T=Y6*a+z6*Math.abs(E),E+=$*f+L*u-(S*s+P*c),E>=T||-E>=T))return E;v=u*L,l=Ot*u,p=l-(l-u),d=u-p,l=Ot*L,g=l-(l-L),m=L-g,w=d*m-(v-p*g-d*g-p*m),y=c*P,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*P,g=l-(l-P),m=P-g,A=d*m-(y-p*g-d*g-p*m),b=w-A,h=w-b,Bt[0]=w-(b+h)+(h-A),x=v+b,h=x-v,_=v-(x-h)+(b-h),b=_-y,h=_-b,Bt[1]=_-(b+h)+(h-y),M=x+b,h=M-x,Bt[2]=x-(M-h)+(b-h),Bt[3]=M;const k=Ec(4,_r,4,Bt,Bp);v=$*f,l=Ot*$,p=l-(l-$),d=$-p,l=Ot*f,g=l-(l-f),m=f-g,w=d*m-(v-p*g-d*g-p*m),y=S*s,l=Ot*S,p=l-(l-S),d=S-p,l=Ot*s,g=l-(l-s),m=s-g,A=d*m-(y-p*g-d*g-p*m),b=w-A,h=w-b,Bt[0]=w-(b+h)+(h-A),x=v+b,h=x-v,_=v-(x-h)+(b-h),b=_-y,h=_-b,Bt[1]=_-(b+h)+(h-y),M=x+b,h=M-x,Bt[2]=x-(M-h)+(b-h),Bt[3]=M;const D=Ec(k,Bp,4,Bt,qp);v=u*f,l=Ot*u,p=l-(l-u),d=u-p,l=Ot*f,g=l-(l-f),m=f-g,w=d*m-(v-p*g-d*g-p*m),y=c*s,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*s,g=l-(l-s),m=s-g,A=d*m-(y-p*g-d*g-p*m),b=w-A,h=w-b,Bt[0]=w-(b+h)+(h-A),x=v+b,h=x-v,_=v-(x-h)+(b-h),b=_-y,h=_-b,Bt[1]=_-(b+h)+(h-y),M=x+b,h=M-x,Bt[2]=x-(M-h)+(b-h),Bt[3]=M;const N=Ec(D,qp,4,Bt,Wp);return Wp[N-1]}function ga(t,e,n,r,i,o){const a=(e-o)*(n-i),u=(t-i)*(r-o),c=a-u,s=Math.abs(a+u);return Math.abs(c)>=G6*s?c:-B6(t,e,n,r,i,o,s)}const Hp=Math.pow(2,-52),ma=new Uint32Array(512);class ya{static from(e,n=V6,r=j6){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const u=e[a];o[2*a]=n(u),o[2*a+1]=r(u)}return new ya(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let u=1/0,c=1/0,s=-1/0,f=-1/0;for(let $=0;$<a;$++){const P=e[2*$],S=e[2*$+1];P<u&&(u=P),S<c&&(c=S),P>s&&(s=P),S>f&&(f=S),this._ids[$]=$}const h=(u+s)/2,l=(c+f)/2;let p,d,g;for(let $=0,P=1/0;$<a;$++){const S=Nc(h,l,e[2*$],e[2*$+1]);S<P&&(p=$,P=S)}const m=e[2*p],b=e[2*p+1];for(let $=0,P=1/0;$<a;$++){if($===p)continue;const S=Nc(m,b,e[2*$],e[2*$+1]);S<P&&S>0&&(d=$,P=S)}let x=e[2*d],_=e[2*d+1],v=1/0;for(let $=0;$<a;$++){if($===p||$===d)continue;const P=H6(m,b,x,_,e[2*$],e[2*$+1]);P<v&&(g=$,v=P)}let w=e[2*g],y=e[2*g+1];if(v===1/0){for(let S=0;S<a;S++)this._dists[S]=e[2*S]-e[0]||e[2*S+1]-e[1];wr(this._ids,this._dists,0,a-1);const $=new Uint32Array(a);let P=0;for(let S=0,L=-1/0;S<a;S++){const E=this._ids[S],T=this._dists[E];T>L&&($[P++]=E,L=T)}this.hull=$.subarray(0,P),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(ga(m,b,x,_,w,y)<0){const $=d,P=x,S=_;d=g,x=w,_=y,g=$,w=P,y=S}const A=X6(m,b,x,_,w,y);this._cx=A.x,this._cy=A.y;for(let $=0;$<a;$++)this._dists[$]=Nc(e[2*$],e[2*$+1],A.x,A.y);wr(this._ids,this._dists,0,a-1),this._hullStart=p;let M=3;r[p]=n[g]=d,r[d]=n[p]=g,r[g]=n[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,b)]=p,o[this._hashKey(x,_)]=d,o[this._hashKey(w,y)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let $=0,P,S;$<this._ids.length;$++){const L=this._ids[$],E=e[2*L],T=e[2*L+1];if($>0&&Math.abs(E-P)<=Hp&&Math.abs(T-S)<=Hp||(P=E,S=T,L===p||L===d||L===g))continue;let k=0;for(let z=0,Y=this._hashKey(E,T);z<this._hashSize&&(k=o[(Y+z)%this._hashSize],!(k!==-1&&k!==r[k]));z++);k=n[k];let D=k,N;for(;N=r[D],ga(E,T,e[2*D],e[2*D+1],e[2*N],e[2*N+1])>=0;)if(D=N,D===k){D=-1;break}if(D===-1)continue;let I=this._addTriangle(D,L,r[D],-1,-1,i[D]);i[L]=this._legalize(I+2),i[D]=I,M++;let C=r[D];for(;N=r[C],ga(E,T,e[2*C],e[2*C+1],e[2*N],e[2*N+1])<0;)I=this._addTriangle(C,L,N,i[L],-1,i[C]),i[L]=this._legalize(I+2),r[C]=C,M--,C=N;if(D===k)for(;N=n[D],ga(E,T,e[2*N],e[2*N+1],e[2*D],e[2*D+1])<0;)I=this._addTriangle(N,L,D,-1,i[D],i[N]),this._legalize(I+2),i[N]=I,r[D]=D,M--,D=N;this._hullStart=n[L]=D,r[D]=n[C]=L,r[L]=C,o[this._hashKey(E,T)]=L,o[this._hashKey(e[2*D],e[2*D+1])]=D}this.hull=new Uint32Array(M);for(let $=0,P=this._hullStart;$<M;$++)this.hull[$]=P,P=r[P];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(q6(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const u=r[e],c=e-e%3;if(a=c+(e+2)%3,u===-1){if(o===0)break;e=ma[--o];continue}const s=u-u%3,f=c+(e+1)%3,h=s+(u+2)%3,l=n[a],p=n[e],d=n[f],g=n[h];if(W6(i[2*l],i[2*l+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){n[e]=g,n[u]=l;const b=r[h];if(b===-1){let _=this._hullStart;do{if(this._hullTri[_]===h){this._hullTri[_]=e;break}_=this._hullPrev[_]}while(_!==this._hullStart)}this._link(e,b),this._link(u,r[a]),this._link(a,h);const x=s+(u+1)%3;o<ma.length&&(ma[o++]=x)}else{if(o===0)break;e=ma[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const u=this.trianglesLen;return this._triangles[u]=e,this._triangles[u+1]=n,this._triangles[u+2]=r,this._link(u,i),this._link(u+1,o),this._link(u+2,a),this.trianglesLen+=3,u}}function q6(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Nc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function W6(t,e,n,r,i,o,a,u){const c=t-a,s=e-u,f=n-a,h=r-u,l=i-a,p=o-u,d=c*c+s*s,g=f*f+h*h,m=l*l+p*p;return c*(h*m-g*p)-s*(f*m-g*l)+d*(f*p-h*l)<0}function H6(t,e,n,r,i,o){const a=n-t,u=r-e,c=i-t,s=o-e,f=a*a+u*u,h=c*c+s*s,l=.5/(a*s-u*c),p=(s*f-u*h)*l,d=(a*h-c*f)*l;return p*p+d*d}function X6(t,e,n,r,i,o){const a=n-t,u=r-e,c=i-t,s=o-e,f=a*a+u*u,h=c*c+s*s,l=.5/(a*s-u*c),p=t+(s*f-u*h)*l,d=e+(a*h-c*f)*l;return{x:p,y:d}}function wr(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let u=i-1;for(;u>=n&&e[t[u]]>a;)t[u+1]=t[u--];t[u+1]=o}else{const i=n+r>>1;let o=n+1,a=r;$i(t,i,o),e[t[n]]>e[t[r]]&&$i(t,n,r),e[t[o]]>e[t[r]]&&$i(t,o,r),e[t[n]]>e[t[o]]&&$i(t,n,o);const u=t[o],c=e[u];for(;;){do o++;while(e[t[o]]<c);do a--;while(e[t[a]]>c);if(a<o)break;$i(t,o,a)}t[n+1]=t[a],t[a]=u,r-o+1>=a-n?(wr(t,e,o,r),wr(t,e,n,a-1)):(wr(t,e,n,a-1),wr(t,e,o,r))}}function $i(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function V6(t){return t[0]}function j6(t){return t[1]}const Xp=1e-6;class zn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Xp||Math.abs(this._y1-o)>Xp)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Lc{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class Vp{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const u=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,b=r.length,x,_;g<b;g+=3,m+=2){const v=r[g]*2,w=r[g+1]*2,y=r[g+2]*2,A=e[v],M=e[v+1],$=e[w],P=e[w+1],S=e[y],L=e[y+1],E=$-A,T=P-M,k=S-A,D=L-M,N=(E*D-T*k)*2;if(Math.abs(N)<1e-9){if(o===void 0){o=a=0;for(const C of n)o+=e[C*2],a+=e[C*2+1];o/=n.length,a/=n.length}const I=1e9*Math.sign((o-A)*D-(a-M)*k);x=(A+S)/2-I*D,_=(M+L)/2+I*k}else{const I=1/N,C=E*E+T*T,z=k*k+D*D;x=A+(D*C-T*z)*I,_=M+(E*z-k*C)*I}u[m]=x,u[m+1]=_}let c=n[n.length-1],s,f=c*4,h,l=e[2*c],p,d=e[2*c+1];i.fill(0);for(let g=0;g<n.length;++g)c=n[g],s=f,h=l,p=d,f=c*4,l=e[2*c],d=e[2*c+1],i[s+2]=i[f]=p-d,i[s+3]=i[f+1]=l-h}render(e){const n=e==null?e=new zn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:u}=this;if(o.length<=1)return null;for(let f=0,h=r.length;f<h;++f){const l=r[f];if(l<f)continue;const p=Math.floor(f/3)*2,d=Math.floor(l/3)*2,g=a[p],m=a[p+1],b=a[d],x=a[d+1];this._renderSegment(g,m,b,x,e)}let c,s=o[o.length-1];for(let f=0;f<o.length;++f){c=s,s=o[f];const h=Math.floor(i[s]/3)*2,l=a[h],p=a[h+1],d=c*4,g=this._project(l,p,u[d+2],u[d+3]);g&&this._renderSegment(l,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new zn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new zn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Lc;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const u=this._regioncode(e,n),c=this._regioncode(r,i);u===0&&c===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,u,c))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let u=0,c=i.length;u<c;u+=2)if(n[o]===i[u]&&n[o+1]===i[u+1]&&n[(o+2)%a]===i[(u+c-2)%c]&&n[(o+3)%a]===i[(u+c-1)%c]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const u=[];let c=a;do{const s=Math.floor(c/3);if(u.push(n[s*2],n[s*2+1]),c=c%3===2?c-2:c+1,o[c]!==e)break;c=i[c]}while(c!==a&&c!==-1);return u}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,u=n[r-2],c=n[r-1],s,f=this._regioncode(u,c),h,l=0;for(let p=0;p<r;p+=2)if(o=u,a=c,u=n[p],c=n[p+1],s=f,f=this._regioncode(u,c),s===0&&f===0)h=l,l=0,i?i.push(u,c):i=[u,c];else{let d,g,m,b,x;if(s===0){if((d=this._clipSegment(o,a,u,c,s,f))===null)continue;[g,m,b,x]=d}else{if((d=this._clipSegment(u,c,o,a,f,s))===null)continue;[b,x,g,m]=d,h=l,l=this._edgecode(g,m),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(g,m):i=[g,m]}h=l,l=this._edgecode(b,x),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(b,x):i=[b,x]}if(i)h=l,l=this._edgecode(i[0],i[1]),h&&l&&this._edge(e,h,l,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const u=o<a;for(u&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return u?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let c,s,f=o||a;f&8?(c=e+(r-e)*(this.ymax-n)/(i-n),s=this.ymax):f&4?(c=e+(r-e)*(this.ymin-n)/(i-n),s=this.ymin):f&2?(s=n+(i-n)*(this.xmax-e)/(r-e),c=this.xmax):(s=n+(i-n)*(this.xmin-e)/(r-e),c=this.xmin),o?(e=c,n=s,o=this._regioncode(e,n)):(r=c,i=s,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let u=Array.from(n),c;if((c=this._project(u[0],u[1],r,i))&&u.unshift(c[0],c[1]),(c=this._project(u[u.length-2],u[u.length-1],o,a))&&u.push(c[0],c[1]),u=this._clipFinite(e,u))for(let s=0,f=u.length,h,l=this._edgecode(u[f-2],u[f-1]);s<f;s+=2)h=l,l=this._edgecode(u[s],u[s+1]),h&&l&&(s=this._edge(e,h,l,u,s),f=u.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(u=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return u}_edge(e,n,r,i,o){for(;n!==r;){let a,u;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,u=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,u=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,u=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,u=this.ymin;break}(i[o]!==a||i[o+1]!==u)&&this.contains(e,a,u)&&(i.splice(o,0,a,u),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,u,c;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(c=this.ymin,u=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(c=this.ymax,u=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(u=this.xmax,c=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(u=this.xmin,c=n+(o=a)*i)}return[u,c]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const Z6=2*Math.PI,Ar=Math.pow;function K6(t){return t[0]}function Q6(t){return t[1]}function J6(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function t8(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Cc{static from(e,n=K6,r=Q6,i){return new Cc("length"in e?e8(e,n,r,i):Float64Array.from(n8(e,n,r,i)))}constructor(e){this._delaunator=new ya(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&J6(e)){this.collinear=Int32Array.from({length:n.length/2},(l,p)=>p).sort((l,p)=>n[2*l]-n[2*p]||n[2*l+1]-n[2*p+1]);const c=this.collinear[0],s=this.collinear[this.collinear.length-1],f=[n[2*c],n[2*c+1],n[2*s],n[2*s+1]],h=1e-8*Math.hypot(f[3]-f[1],f[2]-f[0]);for(let l=0,p=n.length/2;l<p;++l){const d=t8(n[2*l],n[2*l+1],h);n[2*l]=d[0],n[2*l+1]=d[1]}this._delaunator=new ya(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),u=this._hullIndex.fill(-1);for(let c=0,s=r.length;c<s;++c){const f=o[c%3===2?c-2:c+1];(r[c]===-1||a[f]===-1)&&(a[f]=c)}for(let c=0,s=i.length;c<s;++c)u[i[c]]=c;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new Vp(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:u}=this;if(u){const h=u.indexOf(e);h>0&&(yield u[h-1]),h<u.length-1&&(yield u[h+1]);return}const c=n[e];if(c===-1)return;let s=c,f=-1;do{if(yield f=a[s],s=s%3===2?s-2:s+1,a[s]!==e)return;if(s=o[s],s===-1){const h=r[(i[e]+1)%r.length];h!==f&&(yield h);return}}while(s!==c)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:u,triangles:c,points:s}=this;if(i[e]===-1||!s.length)return(e+1)%(s.length>>1);let f=e,h=Ar(n-s[e*2],2)+Ar(r-s[e*2+1],2);const l=i[e];let p=l;do{let d=c[p];const g=Ar(n-s[d*2],2)+Ar(r-s[d*2+1],2);if(g<h&&(h=g,f=d),p=p%3===2?p-2:p+1,c[p]!==e)break;if(p=u[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Ar(n-s[p*2],2)+Ar(r-s[p*2+1],2)<h)return p;break}}while(p!==l);return f}render(e){const n=e==null?e=new zn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,u=i.length;a<u;++a){const c=i[a];if(c<a)continue;const s=o[a]*2,f=o[c]*2;e.moveTo(r[s],r[s+1]),e.lineTo(r[f],r[f+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new zn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const u=i[o],c=i[o+1];e.moveTo(u+n,c),e.arc(u,c,n,0,Z6)}return r&&r.value()}renderHull(e){const n=e==null?e=new zn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let u=1;u<a;++u){const c=2*r[u];e.lineTo(i[c],i[c+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Lc;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new zn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,u=o[e+1]*2,c=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[u],i[u+1]),n.lineTo(i[c],i[c+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Lc;return this.renderTriangle(e,n),n.value()}}function e8(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const u=t[a];o[a*2]=e.call(r,u,a,t),o[a*2+1]=n.call(r,u,a,t)}return o}function*n8(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var jp={},Ic={},Rc=34,Mi=10,Fc=13;function Zp(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function r8(t,e){var n=Zp(t);return function(r,i){return e(n(r),i,t)}}function Kp(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ee(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function i8(t){return t<0?"-"+ee(-t,6):t>9999?"+"+ee(t,6):ee(t,4)}function o8(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":i8(t.getUTCFullYear())+"-"+ee(t.getUTCMonth()+1,2)+"-"+ee(t.getUTCDate(),2)+(i?"T"+ee(e,2)+":"+ee(n,2)+":"+ee(r,2)+"."+ee(i,3)+"Z":r?"T"+ee(e,2)+":"+ee(n,2)+":"+ee(r,2)+"Z":n||e?"T"+ee(e,2)+":"+ee(n,2)+"Z":"")}function ba(t){var e=new RegExp('["'+t+`
2
- \r]`),n=t.charCodeAt(0);function r(h,l){var p,d,g=i(h,function(m,b){if(p)return p(m,b-1);d=m,p=l?r8(m,l):Zp(m)});return g.columns=d||[],g}function i(h,l){var p=[],d=h.length,g=0,m=0,b,x=d<=0,_=!1;h.charCodeAt(d-1)===Mi&&--d,h.charCodeAt(d-1)===Fc&&--d;function v(){if(x)return Ic;if(_)return _=!1,jp;var y,A=g,M;if(h.charCodeAt(A)===Rc){for(;g++<d&&h.charCodeAt(g)!==Rc||h.charCodeAt(++g)===Rc;);return(y=g)>=d?x=!0:(M=h.charCodeAt(g++))===Mi?_=!0:M===Fc&&(_=!0,h.charCodeAt(g)===Mi&&++g),h.slice(A+1,y-1).replace(/""/g,'"')}for(;g<d;){if((M=h.charCodeAt(y=g++))===Mi)_=!0;else if(M===Fc)_=!0,h.charCodeAt(g)===Mi&&++g;else if(M!==n)continue;return h.slice(A,y)}return x=!0,h.slice(A,d)}for(;(b=v())!==Ic;){for(var w=[];b!==jp&&b!==Ic;)w.push(b),b=v();l&&(w=l(w,m++))==null||p.push(w)}return p}function o(h,l){return h.map(function(p){return l.map(function(d){return f(p[d])}).join(t)})}function a(h,l){return l==null&&(l=Kp(h)),[l.map(f).join(t)].concat(o(h,l)).join(`
3
- `)}function u(h,l){return l==null&&(l=Kp(h)),o(h,l).join(`
4
- `)}function c(h){return h.map(s).join(`
5
- `)}function s(h){return h.map(f).join(t)}function f(h){return h==null?"":h instanceof Date?o8(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:u,formatRows:c,formatRow:s,formatValue:f}}var On=ba(","),Qp=On.parse,a8=On.parseRows,u8=On.format,s8=On.formatBody,c8=On.formatRows,l8=On.formatRow,f8=On.formatValue,Gn=ba(" "),Jp=Gn.parse,h8=Gn.parseRows,p8=Gn.format,d8=Gn.formatBody,g8=Gn.formatRows,m8=Gn.formatRow,y8=Gn.formatValue;function b8(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))v8&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const v8=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function x8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function _8(t,e){return fetch(t,e).then(x8)}function w8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function A8(t,e){return fetch(t,e).then(w8)}function $8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function va(t,e){return fetch(t,e).then($8)}function td(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),va(e,n).then(function(i){return t(i,r)})}}function M8(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=ba(t);return va(e,n).then(function(o){return i.parse(o,r)})}var S8=td(Qp),T8=td(Jp);function P8(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function D8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function k8(t,e){return fetch(t,e).then(D8)}function zc(t){return(e,n)=>va(e,n).then(r=>new DOMParser().parseFromString(r,t))}const E8=zc("application/xml");var N8=zc("text/html"),L8=zc("image/svg+xml");function C8(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,u,c=0,s=0;for(o=0;o<a;++o)u=n[o],c+=u.x,s+=u.y;for(c=(c/a-t)*r,s=(s/a-e)*r,o=0;o<a;++o)u=n[o],u.x-=c,u.y-=s}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function I8(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return ed(this.cover(e,n),e,n,t)}function ed(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},u=t._x0,c=t._y0,s=t._x1,f=t._y1,h,l,p,d,g,m,b,x;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(u+s)/2))?u=h:s=h,(m=n>=(l=(c+f)/2))?c=l:f=l,i=o,!(o=o[b=m<<1|g]))return i[b]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)return a.next=o,i?i[b]=a:t._root=a,t;do i=i?i[b]=new Array(4):t._root=new Array(4),(g=e>=(h=(u+s)/2))?u=h:s=h,(m=n>=(l=(c+f)/2))?c=l:f=l;while((b=m<<1|g)===(x=(d>=l)<<1|p>=h));return i[x]=o,i[b]=a,t}function R8(t){var e,n,r=t.length,i,o,a=new Array(r),u=new Array(r),c=1/0,s=1/0,f=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,u[n]=o,i<c&&(c=i),i>f&&(f=i),o<s&&(s=o),o>h&&(h=o));if(c>f||s>h)return this;for(this.cover(c,s).cover(f,h),n=0;n<r;++n)ed(this,a[n],u[n],t[n]);return this}function F8(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,u=this._root,c,s;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,c=new Array(4),c[s]=u,u=c,a*=2,s){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=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function z8(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function O8(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function G8(t,e,n){var r,i=this._x0,o=this._y0,a,u,c,s,f=this._x1,h=this._y1,l=[],p=this._root,d,g;for(p&&l.push(new qt(p,i,o,f,h)),n==null?n=1/0:(i=t-n,o=e-n,f=t+n,h=e+n,n*=n);d=l.pop();)if(!(!(p=d.node)||(a=d.x0)>f||(u=d.y0)>h||(c=d.x1)<i||(s=d.y1)<o))if(p.length){var m=(a+c)/2,b=(u+s)/2;l.push(new qt(p[3],m,b,c,s),new qt(p[2],a,b,m,s),new qt(p[1],m,u,c,b),new qt(p[0],a,u,m,b)),(g=(e>=b)<<1|t>=m)&&(d=l[l.length-1],l[l.length-1]=l[l.length-1-g],l[l.length-1-g]=d)}else{var x=t-+this._x.call(null,p.data),_=e-+this._y.call(null,p.data),v=x*x+_*_;if(v<n){var w=Math.sqrt(n=v);i=t-w,o=e-w,f=t+w,h=e+w,r=p.data}}return r}function U8(t){if(isNaN(f=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,u=this._y0,c=this._x1,s=this._y1,f,h,l,p,d,g,m,b;if(!n)return this;if(n.length)for(;;){if((d=f>=(l=(a+c)/2))?a=l:c=l,(g=h>=(p=(u+s)/2))?u=p:s=p,e=n,!(n=n[m=g<<1|d]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,b=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[b]=n:this._root=n),this):(this._root=o,this)}function Y8(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function B8(){return this._root}function q8(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function W8(t){var e=[],n,r=this._root,i,o,a,u,c;for(r&&e.push(new qt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,u=n.x1,c=n.y1)&&r.length){var s=(o+u)/2,f=(a+c)/2;(i=r[3])&&e.push(new qt(i,s,f,u,c)),(i=r[2])&&e.push(new qt(i,o,f,s,c)),(i=r[1])&&e.push(new qt(i,s,a,u,f)),(i=r[0])&&e.push(new qt(i,o,a,s,f))}return this}function H8(t){var e=[],n=[],r;for(this._root&&e.push(new qt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,u=r.y0,c=r.x1,s=r.y1,f=(a+c)/2,h=(u+s)/2;(o=i[0])&&e.push(new qt(o,a,u,f,h)),(o=i[1])&&e.push(new qt(o,f,u,c,h)),(o=i[2])&&e.push(new qt(o,a,h,f,s)),(o=i[3])&&e.push(new qt(o,f,h,c,s))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function X8(t){return t[0]}function V8(t){return arguments.length?(this._x=t,this):this._x}function j8(t){return t[1]}function Z8(t){return arguments.length?(this._y=t,this):this._y}function xa(t,e,n){var r=new Oc(e??X8,n??j8,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Oc(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function nd(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Wt=xa.prototype=Oc.prototype;Wt.copy=function(){var t=new Oc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=nd(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=nd(r));return t},Wt.add=I8,Wt.addAll=R8,Wt.cover=F8,Wt.data=z8,Wt.extent=O8,Wt.find=G8,Wt.remove=U8,Wt.removeAll=Y8,Wt.root=B8,Wt.size=q8,Wt.visit=W8,Wt.visitAfter=H8,Wt.x=V8,Wt.y=Z8;function kt(t){return function(){return t}}function hn(t){return(t()-.5)*1e-6}function K8(t){return t.x+t.vx}function Q8(t){return t.y+t.vy}function rd(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=kt(t==null?1:+t));function a(){for(var s,f=e.length,h,l,p,d,g,m,b=0;b<o;++b)for(h=xa(e,K8,Q8).visitAfter(u),s=0;s<f;++s)l=e[s],g=n[l.index],m=g*g,p=l.x+l.vx,d=l.y+l.vy,h.visit(x);function x(_,v,w,y,A){var M=_.data,$=_.r,P=g+$;if(M){if(M.index>l.index){var S=p-M.x-M.vx,L=d-M.y-M.vy,E=S*S+L*L;E<P*P&&(S===0&&(S=hn(r),E+=S*S),L===0&&(L=hn(r),E+=L*L),E=(P-(E=Math.sqrt(E)))/E*i,l.vx+=(S*=E)*(P=($*=$)/(m+$)),l.vy+=(L*=E)*P,M.vx-=S*(P=1-P),M.vy-=L*P)}return}return v>p+P||y<p-P||w>d+P||A<d-P}}function u(s){if(s.data)return s.r=n[s.data.index];for(var f=s.r=0;f<4;++f)s[f]&&s[f].r>s.r&&(s.r=s[f].r)}function c(){if(e){var s,f=e.length,h;for(n=new Array(f),s=0;s<f;++s)h=e[s],n[h.index]=+t(h,s,e)}}return a.initialize=function(s,f){e=s,r=f,c()},a.iterations=function(s){return arguments.length?(o=+s,a):o},a.strength=function(s){return arguments.length?(i=+s,a):i},a.radius=function(s){return arguments.length?(t=typeof s=="function"?s:kt(+s),c(),a):t},a}function J8(t){return t.index}function id(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function t4(t){var e=J8,n=h,r,i=kt(30),o,a,u,c,s,f=1;t==null&&(t=[]);function h(m){return 1/Math.min(u[m.source.index],u[m.target.index])}function l(m){for(var b=0,x=t.length;b<f;++b)for(var _=0,v,w,y,A,M,$,P;_<x;++_)v=t[_],w=v.source,y=v.target,A=y.x+y.vx-w.x-w.vx||hn(s),M=y.y+y.vy-w.y-w.vy||hn(s),$=Math.sqrt(A*A+M*M),$=($-o[_])/$*m*r[_],A*=$,M*=$,y.vx-=A*(P=c[_]),y.vy-=M*P,w.vx+=A*(P=1-P),w.vy+=M*P}function p(){if(a){var m,b=a.length,x=t.length,_=new Map(a.map((w,y)=>[e(w,y,a),w])),v;for(m=0,u=new Array(b);m<x;++m)v=t[m],v.index=m,typeof v.source!="object"&&(v.source=id(_,v.source)),typeof v.target!="object"&&(v.target=id(_,v.target)),u[v.source.index]=(u[v.source.index]||0)+1,u[v.target.index]=(u[v.target.index]||0)+1;for(m=0,c=new Array(x);m<x;++m)v=t[m],c[m]=u[v.source.index]/(u[v.source.index]+u[v.target.index]);r=new Array(x),d(),o=new Array(x),g()}}function d(){if(a)for(var m=0,b=t.length;m<b;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,b=t.length;m<b;++m)o[m]=+i(t[m],m,t)}return l.initialize=function(m,b){a=m,s=b,p()},l.links=function(m){return arguments.length?(t=m,p(),l):t},l.id=function(m){return arguments.length?(e=m,l):e},l.iterations=function(m){return arguments.length?(f=+m,l):f},l.strength=function(m){return arguments.length?(n=typeof m=="function"?m:kt(+m),d(),l):n},l.distance=function(m){return arguments.length?(i=typeof m=="function"?m:kt(+m),g(),l):i},l}const e4=1664525,n4=1013904223,od=4294967296;function r4(){let t=1;return()=>(t=(e4*t+n4)%od)/od}function i4(t){return t.x}function o4(t){return t.y}var a4=10,u4=Math.PI*(3-Math.sqrt(5));function ad(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=new Map,c=aa(h),s=Sn("tick","end"),f=r4();t==null&&(t=[]);function h(){l(),s.call("tick",e),n<r&&(c.stop(),s.call("end",e))}function l(g){var m,b=t.length,x;g===void 0&&(g=1);for(var _=0;_<g;++_)for(n+=(o-n)*i,u.forEach(function(v){v(n)}),m=0;m<b;++m)x=t[m],x.fx==null?x.x+=x.vx*=a:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=a:(x.y=x.fy,x.vy=0);return e}function p(){for(var g=0,m=t.length,b;g<m;++g){if(b=t[g],b.index=g,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var x=a4*Math.sqrt(.5+g),_=g*u4;b.x=x*Math.cos(_),b.y=x*Math.sin(_)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function d(g){return g.initialize&&g.initialize(t,f),g}return p(),e={tick:l,restart:function(){return c.restart(h),e},stop:function(){return c.stop(),e},nodes:function(g){return arguments.length?(t=g,p(),u.forEach(d),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(f=g,u.forEach(d),e):f},force:function(g,m){return arguments.length>1?(m==null?u.delete(g):u.set(g,d(m)),e):u.get(g)},find:function(g,m,b){var x=0,_=t.length,v,w,y,A,M;for(b==null?b=1/0:b*=b,x=0;x<_;++x)A=t[x],v=g-A.x,w=m-A.y,y=v*v+w*w,y<b&&(M=A,b=y);return M},on:function(g,m){return arguments.length>1?(s.on(g,m),e):s.on(g)}}}function ud(){var t,e,n,r,i=kt(-30),o,a=1,u=1/0,c=.81;function s(p){var d,g=t.length,m=xa(t,i4,o4).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(l)}function f(){if(t){var p,d=t.length,g;for(o=new Array(d),p=0;p<d;++p)g=t[p],o[g.index]=+i(g,p,t)}}function h(p){var d=0,g,m,b=0,x,_,v;if(p.length){for(x=_=v=0;v<4;++v)(g=p[v])&&(m=Math.abs(g.value))&&(d+=g.value,b+=m,x+=m*g.x,_+=m*g.y);p.x=x/b,p.y=_/b}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function l(p,d,g,m){if(!p.value)return!0;var b=p.x-e.x,x=p.y-e.y,_=m-d,v=b*b+x*x;if(_*_/c<v)return v<u&&(b===0&&(b=hn(n),v+=b*b),x===0&&(x=hn(n),v+=x*x),v<a&&(v=Math.sqrt(a*v)),e.vx+=b*p.value*r/v,e.vy+=x*p.value*r/v),!0;if(p.length||v>=u)return;(p.data!==e||p.next)&&(b===0&&(b=hn(n),v+=b*b),x===0&&(x=hn(n),v+=x*x),v<a&&(v=Math.sqrt(a*v)));do p.data!==e&&(_=o[p.data.index]*r/v,e.vx+=b*_,e.vy+=x*_);while(p=p.next)}return s.initialize=function(p,d){t=p,n=d,f()},s.strength=function(p){return arguments.length?(i=typeof p=="function"?p:kt(+p),f(),s):i},s.distanceMin=function(p){return arguments.length?(a=p*p,s):Math.sqrt(a)},s.distanceMax=function(p){return arguments.length?(u=p*p,s):Math.sqrt(u)},s.theta=function(p){return arguments.length?(c=p*p,s):Math.sqrt(c)},s}function s4(t,e,n){var r,i=kt(.1),o,a;typeof t!="function"&&(t=kt(+t)),e==null&&(e=0),n==null&&(n=0);function u(s){for(var f=0,h=r.length;f<h;++f){var l=r[f],p=l.x-e||1e-6,d=l.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[f]-g)*o[f]*s/g;l.vx+=p*m,l.vy+=d*m}}function c(){if(r){var s,f=r.length;for(o=new Array(f),a=new Array(f),s=0;s<f;++s)a[s]=+t(r[s],s,r),o[s]=isNaN(a[s])?0:+i(r[s],s,r)}}return u.initialize=function(s){r=s,c()},u.strength=function(s){return arguments.length?(i=typeof s=="function"?s:kt(+s),c(),u):i},u.radius=function(s){return arguments.length?(t=typeof s=="function"?s:kt(+s),c(),u):t},u.x=function(s){return arguments.length?(e=+s,u):e},u.y=function(s){return arguments.length?(n=+s,u):n},u}function sd(t){var e=kt(.1),n,r,i;typeof t!="function"&&(t=kt(t==null?0:+t));function o(u){for(var c=0,s=n.length,f;c<s;++c)f=n[c],f.vx+=(i[c]-f.x)*r[c]*u}function a(){if(n){var u,c=n.length;for(r=new Array(c),i=new Array(c),u=0;u<c;++u)r[u]=isNaN(i[u]=+t(n[u],u,n))?0:+e(n[u],u,n)}}return o.initialize=function(u){n=u,a()},o.strength=function(u){return arguments.length?(e=typeof u=="function"?u:kt(+u),a(),o):e},o.x=function(u){return arguments.length?(t=typeof u=="function"?u:kt(+u),a(),o):t},o}function cd(t){var e=kt(.1),n,r,i;typeof t!="function"&&(t=kt(t==null?0:+t));function o(u){for(var c=0,s=n.length,f;c<s;++c)f=n[c],f.vy+=(i[c]-f.y)*r[c]*u}function a(){if(n){var u,c=n.length;for(r=new Array(c),i=new Array(c),u=0;u<c;++u)r[u]=isNaN(i[u]=+t(n[u],u,n))?0:+e(n[u],u,n)}}return o.initialize=function(u){n=u,a()},o.strength=function(u){return arguments.length?(e=typeof u=="function"?u:kt(+u),a(),o):e},o.y=function(u){return arguments.length?(t=typeof u=="function"?u:kt(+u),a(),o):t},o}function c4(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function _a(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function $r(t){return t=_a(Math.abs(t)),t?t[1]:NaN}function l4(t,e){return function(n,r){for(var i=n.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(n.substring(i-=u,i+u)),!((c+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(e)}}function f4(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var h4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mr(t){if(!(e=h4.exec(t)))throw new Error("invalid format: "+t);var e;return new wa({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Mr.prototype=wa.prototype;function wa(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}wa.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 p4(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var ld;function d4(t,e){var n=_a(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ld=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")+_a(t,Math.max(0,e+o-1))[0]}function fd(t,e){var n=_a(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const hd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:c4,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>fd(t*100,e),r:fd,s:d4,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function pd(t){return t}var dd=Array.prototype.map,gd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function md(t){var e=t.grouping===void 0||t.thousands===void 0?pd:l4(dd.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?pd:f4(dd.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function s(h){h=Mr(h);var l=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,b=h.width,x=h.comma,_=h.precision,v=h.trim,w=h.type;w==="n"?(x=!0,w="g"):hd[w]||(_===void 0&&(_=12),v=!0,w="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var y=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",M=hd[w],$=/[defgprs%]/.test(w);_=_===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function P(S){var L=y,E=A,T,k,D;if(w==="c")E=M(S)+E,S="";else{S=+S;var N=S<0||1/S<0;if(S=isNaN(S)?c:M(Math.abs(S),_),v&&(S=p4(S)),N&&+S==0&&d!=="+"&&(N=!1),L=(N?d==="("?d:u:d==="-"||d==="("?"":d)+L,E=(w==="s"?gd[8+ld/3]:"")+E+(N&&d==="("?")":""),$){for(T=-1,k=S.length;++T<k;)if(D=S.charCodeAt(T),48>D||D>57){E=(D===46?i+S.slice(T+1):S.slice(T))+E,S=S.slice(0,T);break}}}x&&!m&&(S=e(S,1/0));var I=L.length+S.length+E.length,C=I<b?new Array(b-I+1).join(l):"";switch(x&&m&&(S=e(C+S,C.length?b-E.length:1/0),C=""),p){case"<":S=L+S+E+C;break;case"=":S=L+C+S+E;break;case"^":S=C.slice(0,I=C.length>>1)+L+S+E+C.slice(I);break;default:S=C+L+S+E;break}return o(S)}return P.toString=function(){return h+""},P}function f(h,l){var p=s((h=Mr(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor($r(l)/3)))*3,g=Math.pow(10,-d),m=gd[8+d/3];return function(b){return p(g*b)+m}}return{format:s,formatPrefix:f}}var Aa,Si,Gc;yd({thousands:",",grouping:[3],currency:["$",""]});function yd(t){return Aa=md(t),Si=Aa.format,Gc=Aa.formatPrefix,Aa}function bd(t){return Math.max(0,-$r(Math.abs(t)))}function vd(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($r(e)/3)))*3-$r(Math.abs(t)))}function xd(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$r(e)-$r(t))+1}var X=1e-6,Ti=1e-12,it=Math.PI,wt=it/2,$a=it/4,Ht=it*2,dt=180/it,V=it/180,ut=Math.abs,Sr=Math.atan,Xt=Math.atan2,H=Math.cos,Ma=Math.ceil,_d=Math.exp,Uc=Math.hypot,Sa=Math.log,Yc=Math.pow,B=Math.sin,le=Math.sign||function(t){return t>0?1:t<0?-1:0},Ct=Math.sqrt,Bc=Math.tan;function wd(t){return t>1?0:t<-1?it:Math.acos(t)}function Vt(t){return t>1?wt:t<-1?-wt:Math.asin(t)}function Ad(t){return(t=B(t/2))*t}function vt(){}function Ta(t,e){t&&Md.hasOwnProperty(t.type)&&Md[t.type](t,e)}var $d={Feature:function(t,e){Ta(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Ta(n[r].geometry,e)}},Md={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){qc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)qc(n[r],e,0)},Polygon:function(t,e){Sd(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Sd(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Ta(n[r],e)}};function qc(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function Sd(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)qc(t[n],e,1);e.polygonEnd()}function xe(t,e){t&&$d.hasOwnProperty(t.type)?$d[t.type](t,e):Ta(t,e)}var Pa=new Dt,Da=new Dt,Td,Pd,Wc,Hc,Xc,Le={point:vt,lineStart:vt,lineEnd:vt,polygonStart:function(){Pa=new Dt,Le.lineStart=g4,Le.lineEnd=m4},polygonEnd:function(){var t=+Pa;Da.add(t<0?Ht+t:t),this.lineStart=this.lineEnd=this.point=vt},sphere:function(){Da.add(Ht)}};function g4(){Le.point=y4}function m4(){Dd(Td,Pd)}function y4(t,e){Le.point=Dd,Td=t,Pd=e,t*=V,e*=V,Wc=t,Hc=H(e=e/2+$a),Xc=B(e)}function Dd(t,e){t*=V,e*=V,e=e/2+$a;var n=t-Wc,r=n>=0?1:-1,i=r*n,o=H(e),a=B(e),u=Xc*a,c=Hc*o+u*H(i),s=u*r*B(i);Pa.add(Xt(s,c)),Wc=t,Hc=o,Xc=a}function b4(t){return Da=new Dt,xe(t,Le),Da*2}function ka(t){return[Xt(t[1],t[0]),Vt(t[2])]}function Un(t){var e=t[0],n=t[1],r=H(n);return[r*H(e),r*B(e),B(n)]}function Ea(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Tr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Vc(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Na(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function La(t){var e=Ct(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var xt,ne,At,ae,Yn,kd,Ed,Pr,Pi,pn,He,Xe={point:jc,lineStart:Ld,lineEnd:Cd,polygonStart:function(){Xe.point=Id,Xe.lineStart=v4,Xe.lineEnd=x4,Pi=new Dt,Le.polygonStart()},polygonEnd:function(){Le.polygonEnd(),Xe.point=jc,Xe.lineStart=Ld,Xe.lineEnd=Cd,Pa<0?(xt=-(At=180),ne=-(ae=90)):Pi>X?ae=90:Pi<-X&&(ne=-90),He[0]=xt,He[1]=At},sphere:function(){xt=-(At=180),ne=-(ae=90)}};function jc(t,e){pn.push(He=[xt=t,At=t]),e<ne&&(ne=e),e>ae&&(ae=e)}function Nd(t,e){var n=Un([t*V,e*V]);if(Pr){var r=Tr(Pr,n),i=[r[1],-r[0],0],o=Tr(i,r);La(o),o=ka(o);var a=t-Yn,u=a>0?1:-1,c=o[0]*dt*u,s,f=ut(a)>180;f^(u*Yn<c&&c<u*t)?(s=o[1]*dt,s>ae&&(ae=s)):(c=(c+360)%360-180,f^(u*Yn<c&&c<u*t)?(s=-o[1]*dt,s<ne&&(ne=s)):(e<ne&&(ne=e),e>ae&&(ae=e))),f?t<Yn?ue(xt,t)>ue(xt,At)&&(At=t):ue(t,At)>ue(xt,At)&&(xt=t):At>=xt?(t<xt&&(xt=t),t>At&&(At=t)):t>Yn?ue(xt,t)>ue(xt,At)&&(At=t):ue(t,At)>ue(xt,At)&&(xt=t)}else pn.push(He=[xt=t,At=t]);e<ne&&(ne=e),e>ae&&(ae=e),Pr=n,Yn=t}function Ld(){Xe.point=Nd}function Cd(){He[0]=xt,He[1]=At,Xe.point=jc,Pr=null}function Id(t,e){if(Pr){var n=t-Yn;Pi.add(ut(n)>180?n+(n>0?360:-360):n)}else kd=t,Ed=e;Le.point(t,e),Nd(t,e)}function v4(){Le.lineStart()}function x4(){Id(kd,Ed),Le.lineEnd(),ut(Pi)>X&&(xt=-(At=180)),He[0]=xt,He[1]=At,Pr=null}function ue(t,e){return(e-=t)<0?e+360:e}function _4(t,e){return t[0]-e[0]}function Rd(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function w4(t){var e,n,r,i,o,a,u;if(ae=At=-(xt=ne=1/0),pn=[],xe(t,Xe),n=pn.length){for(pn.sort(_4),e=1,r=pn[0],o=[r];e<n;++e)i=pn[e],Rd(r,i[0])||Rd(r,i[1])?(ue(r[0],i[1])>ue(r[0],r[1])&&(r[1]=i[1]),ue(i[0],r[1])>ue(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(u=ue(r[1],i[0]))>a&&(a=u,xt=i[0],At=r[1])}return pn=He=null,xt===1/0||ne===1/0?[[NaN,NaN],[NaN,NaN]]:[[xt,ne],[At,ae]]}var Di,Ca,Ia,Ra,Fa,za,Oa,Ga,Zc,Kc,Qc,Fd,zd,jt,Zt,Kt,_e={sphere:vt,point:Jc,lineStart:Od,lineEnd:Gd,polygonStart:function(){_e.lineStart=M4,_e.lineEnd=S4},polygonEnd:function(){_e.lineStart=Od,_e.lineEnd=Gd}};function Jc(t,e){t*=V,e*=V;var n=H(e);ki(n*H(t),n*B(t),B(e))}function ki(t,e,n){++Di,Ia+=(t-Ia)/Di,Ra+=(e-Ra)/Di,Fa+=(n-Fa)/Di}function Od(){_e.point=A4}function A4(t,e){t*=V,e*=V;var n=H(e);jt=n*H(t),Zt=n*B(t),Kt=B(e),_e.point=$4,ki(jt,Zt,Kt)}function $4(t,e){t*=V,e*=V;var n=H(e),r=n*H(t),i=n*B(t),o=B(e),a=Xt(Ct((a=Zt*o-Kt*i)*a+(a=Kt*r-jt*o)*a+(a=jt*i-Zt*r)*a),jt*r+Zt*i+Kt*o);Ca+=a,za+=a*(jt+(jt=r)),Oa+=a*(Zt+(Zt=i)),Ga+=a*(Kt+(Kt=o)),ki(jt,Zt,Kt)}function Gd(){_e.point=Jc}function M4(){_e.point=T4}function S4(){Ud(Fd,zd),_e.point=Jc}function T4(t,e){Fd=t,zd=e,t*=V,e*=V,_e.point=Ud;var n=H(e);jt=n*H(t),Zt=n*B(t),Kt=B(e),ki(jt,Zt,Kt)}function Ud(t,e){t*=V,e*=V;var n=H(e),r=n*H(t),i=n*B(t),o=B(e),a=Zt*o-Kt*i,u=Kt*r-jt*o,c=jt*i-Zt*r,s=Uc(a,u,c),f=Vt(s),h=s&&-f/s;Zc.add(h*a),Kc.add(h*u),Qc.add(h*c),Ca+=f,za+=f*(jt+(jt=r)),Oa+=f*(Zt+(Zt=i)),Ga+=f*(Kt+(Kt=o)),ki(jt,Zt,Kt)}function P4(t){Di=Ca=Ia=Ra=Fa=za=Oa=Ga=0,Zc=new Dt,Kc=new Dt,Qc=new Dt,xe(t,_e);var e=+Zc,n=+Kc,r=+Qc,i=Uc(e,n,r);return i<Ti&&(e=za,n=Oa,r=Ga,Ca<X&&(e=Ia,n=Ra,r=Fa),i=Uc(e,n,r),i<Ti)?[NaN,NaN]:[Xt(n,e)*dt,Vt(r/i)*dt]}function Dr(t){return function(){return t}}function tl(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function el(t,e){return ut(t)>it&&(t-=Math.round(t/Ht)*Ht),[t,e]}el.invert=el;function nl(t,e,n){return(t%=Ht)?e||n?tl(Bd(t),qd(e,n)):Bd(t):e||n?qd(e,n):el}function Yd(t){return function(e,n){return e+=t,ut(e)>it&&(e-=Math.round(e/Ht)*Ht),[e,n]}}function Bd(t){var e=Yd(t);return e.invert=Yd(-t),e}function qd(t,e){var n=H(t),r=B(t),i=H(e),o=B(e);function a(u,c){var s=H(c),f=H(u)*s,h=B(u)*s,l=B(c),p=l*n+f*r;return[Xt(h*i-p*o,f*n-l*r),Vt(p*i+h*o)]}return a.invert=function(u,c){var s=H(c),f=H(u)*s,h=B(u)*s,l=B(c),p=l*i-h*o;return[Xt(h*i+l*o,f*n+p*r),Vt(p*n-f*r)]},a}function Wd(t){t=nl(t[0]*V,t[1]*V,t.length>2?t[2]*V:0);function e(n){return n=t(n[0]*V,n[1]*V),n[0]*=dt,n[1]*=dt,n}return e.invert=function(n){return n=t.invert(n[0]*V,n[1]*V),n[0]*=dt,n[1]*=dt,n},e}function Hd(t,e,n,r,i,o){if(n){var a=H(e),u=B(e),c=r*n;i==null?(i=e+r*Ht,o=e-c/2):(i=Xd(a,i),o=Xd(a,o),(r>0?i<o:i>o)&&(i+=r*Ht));for(var s,f=i;r>0?f>o:f<o;f-=c)s=ka([a,-u*H(f),-u*B(f)]),t.point(s[0],s[1])}}function Xd(t,e){e=Un(e),e[0]-=t,La(e);var n=wd(-e[1]);return((-e[2]<0?-n:n)+Ht-X)%Ht}function D4(){var t=Dr([0,0]),e=Dr(90),n=Dr(2),r,i,o={point:a};function a(c,s){r.push(c=i(c,s)),c[0]*=dt,c[1]*=dt}function u(){var c=t.apply(this,arguments),s=e.apply(this,arguments)*V,f=n.apply(this,arguments)*V;return r=[],i=nl(-c[0]*V,-c[1]*V,0).invert,Hd(o,s,f,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return u.center=function(c){return arguments.length?(t=typeof c=="function"?c:Dr([+c[0],+c[1]]),u):t},u.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Dr(+c),u):e},u.precision=function(c){return arguments.length?(n=typeof c=="function"?c:Dr(+c),u):n},u}function Vd(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:vt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ua(t,e){return ut(t[0]-e[0])<X&&ut(t[1]-e[1])<X}function Ya(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function jd(t,e,n,r,i){var o=[],a=[],u,c;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],b=d[g],x;if(Ua(m,b)){if(!m[2]&&!b[2]){for(i.lineStart(),u=0;u<g;++u)i.point((m=d[u])[0],m[1]);i.lineEnd();return}b[0]+=2*X}o.push(x=new Ya(m,d,null,!0)),a.push(x.o=new Ya(m,null,x,!1)),o.push(x=new Ya(b,d,null,!1)),a.push(x.o=new Ya(b,null,x,!0))}}),!!o.length){for(a.sort(e),Zd(o),Zd(a),u=0,c=a.length;u<c;++u)a[u].e=n=!n;for(var s=o[0],f,h;;){for(var l=s,p=!0;l.v;)if((l=l.n)===s)return;f=l.z,i.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(u=0,c=f.length;u<c;++u)i.point((h=f[u])[0],h[1]);else r(l.x,l.n.x,1,i);l=l.n}else{if(p)for(f=l.p.z,u=f.length-1;u>=0;--u)i.point((h=f[u])[0],h[1]);else r(l.x,l.p.x,-1,i);l=l.p}l=l.o,f=l.z,p=!p}while(!l.v);i.lineEnd()}}}function Zd(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function rl(t){return ut(t[0])<=it?t[0]:le(t[0])*((ut(t[0])+it)%Ht-it)}function Kd(t,e){var n=rl(e),r=e[1],i=B(r),o=[B(n),-H(n),0],a=0,u=0,c=new Dt;i===1?r=wt+X:i===-1&&(r=-wt-X);for(var s=0,f=t.length;s<f;++s)if(l=(h=t[s]).length)for(var h,l,p=h[l-1],d=rl(p),g=p[1]/2+$a,m=B(g),b=H(g),x=0;x<l;++x,d=v,m=y,b=A,p=_){var _=h[x],v=rl(_),w=_[1]/2+$a,y=B(w),A=H(w),M=v-d,$=M>=0?1:-1,P=$*M,S=P>it,L=m*y;if(c.add(Xt(L*$*B(P),b*A+L*H(P))),a+=S?M+$*Ht:M,S^d>=n^v>=n){var E=Tr(Un(p),Un(_));La(E);var T=Tr(o,E);La(T);var k=(S^M>=0?-1:1)*Vt(T[2]);(r>k||r===k&&(E[0]||E[1]))&&(u+=S^M>=0?1:-1)}}return(a<-X||a<X&&c<-Ti)^u&1}function Qd(t,e,n,r){return function(i){var o=e(i),a=Vd(),u=e(a),c=!1,s,f,h,l={point:p,lineStart:g,lineEnd:m,polygonStart:function(){l.point=b,l.lineStart=x,l.lineEnd=_,f=[],s=[]},polygonEnd:function(){l.point=p,l.lineStart=g,l.lineEnd=m,f=Ls(f);var v=Kd(s,r);f.length?(c||(i.polygonStart(),c=!0),jd(f,E4,v,n,i)):v&&(c||(i.polygonStart(),c=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),f=s=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(v,w){t(v,w)&&i.point(v,w)}function d(v,w){o.point(v,w)}function g(){l.point=d,o.lineStart()}function m(){l.point=p,o.lineEnd()}function b(v,w){h.push([v,w]),u.point(v,w)}function x(){u.lineStart(),h=[]}function _(){b(h[0][0],h[0][1]),u.lineEnd();var v=u.clean(),w=a.result(),y,A=w.length,M,$,P;if(h.pop(),s.push(h),h=null,!!A){if(v&1){if($=w[0],(M=$.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),y=0;y<M;++y)i.point((P=$[y])[0],P[1]);i.lineEnd()}return}A>1&&v&2&&w.push(w.pop().concat(w.shift())),f.push(w.filter(k4))}}return l}}function k4(t){return t.length>1}function E4(t,e){return((t=t.x)[0]<0?t[1]-wt-X:wt-t[1])-((e=e.x)[0]<0?e[1]-wt-X:wt-e[1])}const il=Qd(function(){return!0},N4,C4,[-it,-wt]);function N4(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var u=o>0?it:-it,c=ut(o-e);ut(c-it)<X?(t.point(e,n=(n+a)/2>0?wt:-wt),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(o,n),i=0):r!==u&&c>=it&&(ut(e-r)<X&&(e-=r*X),ut(o-u)<X&&(o-=u*X),n=L4(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(u,n),i=0),t.point(e=o,n=a),r=u},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function L4(t,e,n,r){var i,o,a=B(t-n);return ut(a)>X?Sr((B(e)*(o=H(r))*B(n)-B(r)*(i=H(e))*B(t))/(i*o*a)):(e+r)/2}function C4(t,e,n,r){var i;if(t==null)i=n*wt,r.point(-it,i),r.point(0,i),r.point(it,i),r.point(it,0),r.point(it,-i),r.point(0,-i),r.point(-it,-i),r.point(-it,0),r.point(-it,i);else if(ut(t[0]-e[0])>X){var o=t[0]<e[0]?it:-it;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function Jd(t){var e=H(t),n=2*V,r=e>0,i=ut(e)>X;function o(f,h,l,p){Hd(p,t,n,l,f,h)}function a(f,h){return H(f)*H(h)>e}function u(f){var h,l,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,b){var x=[m,b],_,v=a(m,b),w=r?v?0:s(m,b):v?s(m+(m<0?it:-it),b):0;if(!h&&(d=p=v)&&f.lineStart(),v!==p&&(_=c(h,x),(!_||Ua(h,_)||Ua(x,_))&&(x[2]=1)),v!==p)g=0,v?(f.lineStart(),_=c(x,h),f.point(_[0],_[1])):(_=c(h,x),f.point(_[0],_[1],2),f.lineEnd()),h=_;else if(i&&h&&r^v){var y;!(w&l)&&(y=c(x,h,!0))&&(g=0,r?(f.lineStart(),f.point(y[0][0],y[0][1]),f.point(y[1][0],y[1][1]),f.lineEnd()):(f.point(y[1][0],y[1][1]),f.lineEnd(),f.lineStart(),f.point(y[0][0],y[0][1],3)))}v&&(!h||!Ua(h,x))&&f.point(x[0],x[1]),h=x,p=v,l=w},lineEnd:function(){p&&f.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function c(f,h,l){var p=Un(f),d=Un(h),g=[1,0,0],m=Tr(p,d),b=Ea(m,m),x=m[0],_=b-x*x;if(!_)return!l&&f;var v=e*b/_,w=-e*x/_,y=Tr(g,m),A=Na(g,v),M=Na(m,w);Vc(A,M);var $=y,P=Ea(A,$),S=Ea($,$),L=P*P-S*(Ea(A,A)-1);if(!(L<0)){var E=Ct(L),T=Na($,(-P-E)/S);if(Vc(T,A),T=ka(T),!l)return T;var k=f[0],D=h[0],N=f[1],I=h[1],C;D<k&&(C=k,k=D,D=C);var z=D-k,Y=ut(z-it)<X,W=Y||z<X;if(!Y&&I<N&&(C=N,N=I,I=C),W?Y?N+I>0^T[1]<(ut(T[0]-k)<X?N:I):N<=T[1]&&T[1]<=I:z>it^(k<=T[0]&&T[0]<=D)){var st=Na($,(-P+E)/S);return Vc(st,A),[T,ka(st)]}}}function s(f,h){var l=r?t:it-t,p=0;return f<-l?p|=1:f>l&&(p|=2),h<-l?p|=4:h>l&&(p|=8),p}return Qd(a,u,o,r?[0,-t]:[-it,t-it])}function I4(t,e,n,r,i,o){var a=t[0],u=t[1],c=e[0],s=e[1],f=0,h=1,l=c-a,p=s-u,d;if(d=n-a,!(!l&&d>0)){if(d/=l,l<0){if(d<f)return;d<h&&(h=d)}else if(l>0){if(d>h)return;d>f&&(f=d)}if(d=i-a,!(!l&&d<0)){if(d/=l,l<0){if(d>h)return;d>f&&(f=d)}else if(l>0){if(d<f)return;d<h&&(h=d)}if(d=r-u,!(!p&&d>0)){if(d/=p,p<0){if(d<f)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>f&&(f=d)}if(d=o-u,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>f&&(f=d)}else if(p>0){if(d<f)return;d<h&&(h=d)}return f>0&&(t[0]=a+f*l,t[1]=u+f*p),h<1&&(e[0]=a+h*l,e[1]=u+h*p),!0}}}}}var Ei=1e9,Ba=-Ei;function qa(t,e,n,r){function i(s,f){return t<=s&&s<=n&&e<=f&&f<=r}function o(s,f,h,l){var p=0,d=0;if(s==null||(p=a(s,h))!==(d=a(f,h))||c(s,f)<0^h>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+h+4)%4)!==d);else l.point(f[0],f[1])}function a(s,f){return ut(s[0]-t)<X?f>0?0:3:ut(s[0]-n)<X?f>0?2:1:ut(s[1]-e)<X?f>0?1:0:f>0?3:2}function u(s,f){return c(s.x,f.x)}function c(s,f){var h=a(s,1),l=a(f,1);return h!==l?h-l:h===0?f[1]-s[1]:h===1?s[0]-f[0]:h===2?s[1]-f[1]:f[0]-s[0]}return function(s){var f=s,h=Vd(),l,p,d,g,m,b,x,_,v,w,y,A={point:M,lineStart:L,lineEnd:E,polygonStart:P,polygonEnd:S};function M(k,D){i(k,D)&&f.point(k,D)}function $(){for(var k=0,D=0,N=p.length;D<N;++D)for(var I=p[D],C=1,z=I.length,Y=I[0],W,st,rt=Y[0],at=Y[1];C<z;++C)W=rt,st=at,Y=I[C],rt=Y[0],at=Y[1],st<=r?at>r&&(rt-W)*(r-st)>(at-st)*(t-W)&&++k:at<=r&&(rt-W)*(r-st)<(at-st)*(t-W)&&--k;return k}function P(){f=h,l=[],p=[],y=!0}function S(){var k=$(),D=y&&k,N=(l=Ls(l)).length;(D||N)&&(s.polygonStart(),D&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),N&&jd(l,u,k,o,s),s.polygonEnd()),f=s,l=p=d=null}function L(){A.point=T,p&&p.push(d=[]),w=!0,v=!1,x=_=NaN}function E(){l&&(T(g,m),b&&v&&h.rejoin(),l.push(h.result())),A.point=M,v&&f.lineEnd()}function T(k,D){var N=i(k,D);if(p&&d.push([k,D]),w)g=k,m=D,b=N,w=!1,N&&(f.lineStart(),f.point(k,D));else if(N&&v)f.point(k,D);else{var I=[x=Math.max(Ba,Math.min(Ei,x)),_=Math.max(Ba,Math.min(Ei,_))],C=[k=Math.max(Ba,Math.min(Ei,k)),D=Math.max(Ba,Math.min(Ei,D))];I4(I,C,t,e,n,r)?(v||(f.lineStart(),f.point(I[0],I[1])),f.point(C[0],C[1]),N||f.lineEnd(),y=!1):N&&(f.lineStart(),f.point(k,D),y=!1)}x=k,_=D,v=N}return A}}function R4(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(u){return i&&o===u?i:i=qa(t,e,n,r)(o=u)},extent:function(u){return arguments.length?(t=+u[0][0],e=+u[0][1],n=+u[1][0],r=+u[1][1],i=o=null,a):[[t,e],[n,r]]}}}var ol,al,Wa,Ha,kr={sphere:vt,point:vt,lineStart:F4,lineEnd:vt,polygonStart:vt,polygonEnd:vt};function F4(){kr.point=O4,kr.lineEnd=z4}function z4(){kr.point=kr.lineEnd=vt}function O4(t,e){t*=V,e*=V,al=t,Wa=B(e),Ha=H(e),kr.point=G4}function G4(t,e){t*=V,e*=V;var n=B(e),r=H(e),i=ut(t-al),o=H(i),a=B(i),u=r*a,c=Ha*n-Wa*r*o,s=Wa*n+Ha*r*o;ol.add(Xt(Ct(u*u+c*c),s)),al=t,Wa=n,Ha=r}function tg(t){return ol=new Dt,xe(t,kr),+ol}var ul=[null,null],U4={type:"LineString",coordinates:ul};function Xa(t,e){return ul[0]=t,ul[1]=e,tg(U4)}var eg={Feature:function(t,e){return Va(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Va(n[r].geometry,e))return!0;return!1}},ng={Sphere:function(){return!0},Point:function(t,e){return rg(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(rg(n[r],e))return!0;return!1},LineString:function(t,e){return ig(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(ig(n[r],e))return!0;return!1},Polygon:function(t,e){return og(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(og(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Va(n[r],e))return!0;return!1}};function Va(t,e){return t&&ng.hasOwnProperty(t.type)?ng[t.type](t,e):!1}function rg(t,e){return Xa(t,e)===0}function ig(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Xa(t[o],e),r===0||o>0&&(i=Xa(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ti*i))return!0;n=r}return!1}function og(t,e){return!!Kd(t.map(Y4),ag(e))}function Y4(t){return t=t.map(ag),t.pop(),t}function ag(t){return[t[0]*V,t[1]*V]}function B4(t,e){return(t&&eg.hasOwnProperty(t.type)?eg[t.type]:Va)(t,e)}function ug(t,e,n){var r=an(t,e-X,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function sg(t,e,n){var r=an(t,e-X,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function cg(){var t,e,n,r,i,o,a,u,c=10,s=c,f=90,h=360,l,p,d,g,m=2.5;function b(){return{type:"MultiLineString",coordinates:x()}}function x(){return an(Ma(r/f)*f,n,f).map(d).concat(an(Ma(u/h)*h,a,h).map(g)).concat(an(Ma(e/c)*c,t,c).filter(function(_){return ut(_%f)>X}).map(l)).concat(an(Ma(o/s)*s,i,s).filter(function(_){return ut(_%h)>X}).map(p))}return b.lines=function(){return x().map(function(_){return{type:"LineString",coordinates:_}})},b.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(u).reverse().slice(1))]}},b.extent=function(_){return arguments.length?b.extentMajor(_).extentMinor(_):b.extentMinor()},b.extentMajor=function(_){return arguments.length?(r=+_[0][0],n=+_[1][0],u=+_[0][1],a=+_[1][1],r>n&&(_=r,r=n,n=_),u>a&&(_=u,u=a,a=_),b.precision(m)):[[r,u],[n,a]]},b.extentMinor=function(_){return arguments.length?(e=+_[0][0],t=+_[1][0],o=+_[0][1],i=+_[1][1],e>t&&(_=e,e=t,t=_),o>i&&(_=o,o=i,i=_),b.precision(m)):[[e,o],[t,i]]},b.step=function(_){return arguments.length?b.stepMajor(_).stepMinor(_):b.stepMinor()},b.stepMajor=function(_){return arguments.length?(f=+_[0],h=+_[1],b):[f,h]},b.stepMinor=function(_){return arguments.length?(c=+_[0],s=+_[1],b):[c,s]},b.precision=function(_){return arguments.length?(m=+_,l=ug(o,i,90),p=sg(e,t,m),d=ug(u,a,90),g=sg(r,n,m),b):m},b.extentMajor([[-180,-90+X],[180,90-X]]).extentMinor([[-180,-80-X],[180,80+X]])}function q4(){return cg()()}function W4(t,e){var n=t[0]*V,r=t[1]*V,i=e[0]*V,o=e[1]*V,a=H(r),u=B(r),c=H(o),s=B(o),f=a*H(n),h=a*B(n),l=c*H(i),p=c*B(i),d=2*Vt(Ct(Ad(o-r)+a*c*Ad(i-n))),g=B(d),m=d?function(b){var x=B(b*=d)/g,_=B(d-b)/g,v=_*f+x*l,w=_*h+x*p,y=_*u+x*s;return[Xt(w,v)*dt,Xt(y,Ct(v*v+w*w))*dt]}:function(){return[n*dt,r*dt]};return m.distance=d,m}const Ni=t=>t;var sl=new Dt,cl=new Dt,lg,fg,ll,fl,Ve={point:vt,lineStart:vt,lineEnd:vt,polygonStart:function(){Ve.lineStart=H4,Ve.lineEnd=V4},polygonEnd:function(){Ve.lineStart=Ve.lineEnd=Ve.point=vt,sl.add(ut(cl)),cl=new Dt},result:function(){var t=sl/2;return sl=new Dt,t}};function H4(){Ve.point=X4}function X4(t,e){Ve.point=hg,lg=ll=t,fg=fl=e}function hg(t,e){cl.add(fl*t-ll*e),ll=t,fl=e}function V4(){hg(lg,fg)}var Er=1/0,ja=Er,Li=-Er,Za=Li,Ka={point:j4,lineStart:vt,lineEnd:vt,polygonStart:vt,polygonEnd:vt,result:function(){var t=[[Er,ja],[Li,Za]];return Li=Za=-(ja=Er=1/0),t}};function j4(t,e){t<Er&&(Er=t),t>Li&&(Li=t),e<ja&&(ja=e),e>Za&&(Za=e)}var hl=0,pl=0,Ci=0,Qa=0,Ja=0,Nr=0,dl=0,gl=0,Ii=0,pg,dg,Ce,Ie,fe={point:Bn,lineStart:gg,lineEnd:mg,polygonStart:function(){fe.lineStart=Q4,fe.lineEnd=J4},polygonEnd:function(){fe.point=Bn,fe.lineStart=gg,fe.lineEnd=mg},result:function(){var t=Ii?[dl/Ii,gl/Ii]:Nr?[Qa/Nr,Ja/Nr]:Ci?[hl/Ci,pl/Ci]:[NaN,NaN];return hl=pl=Ci=Qa=Ja=Nr=dl=gl=Ii=0,t}};function Bn(t,e){hl+=t,pl+=e,++Ci}function gg(){fe.point=Z4}function Z4(t,e){fe.point=K4,Bn(Ce=t,Ie=e)}function K4(t,e){var n=t-Ce,r=e-Ie,i=Ct(n*n+r*r);Qa+=i*(Ce+t)/2,Ja+=i*(Ie+e)/2,Nr+=i,Bn(Ce=t,Ie=e)}function mg(){fe.point=Bn}function Q4(){fe.point=t7}function J4(){yg(pg,dg)}function t7(t,e){fe.point=yg,Bn(pg=Ce=t,dg=Ie=e)}function yg(t,e){var n=t-Ce,r=e-Ie,i=Ct(n*n+r*r);Qa+=i*(Ce+t)/2,Ja+=i*(Ie+e)/2,Nr+=i,i=Ie*t-Ce*e,dl+=i*(Ce+t),gl+=i*(Ie+e),Ii+=i*3,Bn(Ce=t,Ie=e)}function bg(t){this._context=t}bg.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Ht);break}}},result:vt};var ml=new Dt,yl,vg,xg,Ri,Fi,zi={point:vt,lineStart:function(){zi.point=e7},lineEnd:function(){yl&&_g(vg,xg),zi.point=vt},polygonStart:function(){yl=!0},polygonEnd:function(){yl=null},result:function(){var t=+ml;return ml=new Dt,t}};function e7(t,e){zi.point=_g,vg=Ri=t,xg=Fi=e}function _g(t,e){Ri-=t,Fi-=e,ml.add(Ct(Ri*Ri+Fi*Fi)),Ri=t,Fi=e}let wg,tu,Ag,$g;class Mg{constructor(e){this._append=e==null?Sg:n7(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Ag||this._append!==tu){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`,Ag=r,tu=this._append,$g=this._,this._=i}this._+=$g;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Sg(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function n7(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Sg;if(e!==wg){const n=10**e;wg=e,tu=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 tu}function r7(t,e){let n=3,r=4.5,i,o;function a(u){return u&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),xe(u,i(o))),o.result()}return a.area=function(u){return xe(u,i(Ve)),Ve.result()},a.measure=function(u){return xe(u,i(zi)),zi.result()},a.bounds=function(u){return xe(u,i(Ka)),Ka.result()},a.centroid=function(u){return xe(u,i(fe)),fe.result()},a.projection=function(u){return arguments.length?(i=u==null?(t=null,Ni):(t=u).stream,a):t},a.context=function(u){return arguments.length?(o=u==null?(e=null,new Mg(n)):new bg(e=u),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(u){return arguments.length?(r=typeof u=="function"?u:(o.pointRadius(+u),+u),a):r},a.digits=function(u){if(!arguments.length)return n;if(u==null)n=null;else{const c=Math.floor(u);if(!(c>=0))throw new RangeError(`invalid digits: ${u}`);n=c}return e===null&&(o=new Mg(n)),a},a.projection(t).digits(n).context(e)}function i7(t){return{stream:Oi(t)}}function Oi(t){return function(e){var n=new bl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function bl(){}bl.prototype={constructor:bl,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function vl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),xe(n,t.stream(Ka)),e(Ka.result()),r!=null&&t.clipExtent(r),t}function eu(t,e,n){return vl(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),u=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,c=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([u,c])},n)}function xl(t,e,n){return eu(t,[[0,0],e],n)}function _l(t,e,n){return vl(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,u=-o*r[0][1];t.scale(150*o).translate([a,u])},n)}function wl(t,e,n){return vl(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],u=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,u])},n)}var Tg=16,o7=H(30*V);function Pg(t,e){return+e?u7(t,e):a7(t)}function a7(t){return Oi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function u7(t,e){function n(r,i,o,a,u,c,s,f,h,l,p,d,g,m){var b=s-r,x=f-i,_=b*b+x*x;if(_>4*e&&g--){var v=a+l,w=u+p,y=c+d,A=Ct(v*v+w*w+y*y),M=Vt(y/=A),$=ut(ut(y)-1)<X||ut(o-h)<X?(o+h)/2:Xt(w,v),P=t($,M),S=P[0],L=P[1],E=S-r,T=L-i,k=x*E-b*T;(k*k/_>e||ut((b*E+x*T)/_-.5)>.3||a*l+u*p+c*d<o7)&&(n(r,i,o,a,u,c,S,L,$,v/=A,w/=A,y,g,m),m.point(S,L),n(S,L,$,v,w,y,s,f,h,l,p,d,g,m))}}return function(r){var i,o,a,u,c,s,f,h,l,p,d,g,m={point:b,lineStart:x,lineEnd:v,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function b(M,$){M=t(M,$),r.point(M[0],M[1])}function x(){h=NaN,m.point=_,r.lineStart()}function _(M,$){var P=Un([M,$]),S=t(M,$);n(h,l,f,p,d,g,h=S[0],l=S[1],f=M,p=P[0],d=P[1],g=P[2],Tg,r),r.point(h,l)}function v(){m.point=b,r.lineEnd()}function w(){x(),m.point=y,m.lineEnd=A}function y(M,$){_(i=M,$),o=h,a=l,u=p,c=d,s=g,m.point=_}function A(){n(h,l,f,p,d,g,o,a,i,u,c,s,Tg,r),m.lineEnd=v,v()}return m}}var s7=Oi({point:function(t,e){this.stream.point(t*V,e*V)}});function c7(t){return Oi({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function l7(t,e,n,r,i){function o(a,u){return a*=r,u*=i,[e+t*a,n-t*u]}return o.invert=function(a,u){return[(a-e)/t*r,(n-u)/t*i]},o}function Dg(t,e,n,r,i,o){if(!o)return l7(t,e,n,r,i);var a=H(o),u=B(o),c=a*t,s=u*t,f=a/t,h=u/t,l=(u*n-a*e)/t,p=(u*e+a*n)/t;function d(g,m){return g*=r,m*=i,[c*g-s*m+e,n-s*g-c*m]}return d.invert=function(g,m){return[r*(f*g-h*m+l),i*(p-h*g-f*m)]},d}function Re(t){return Al(function(){return t})()}function Al(t){var e,n=150,r=480,i=250,o=0,a=0,u=0,c=0,s=0,f,h=0,l=1,p=1,d=null,g=il,m=null,b,x,_,v=Ni,w=.5,y,A,M,$,P;function S(k){return M(k[0]*V,k[1]*V)}function L(k){return k=M.invert(k[0],k[1]),k&&[k[0]*dt,k[1]*dt]}S.stream=function(k){return $&&P===k?$:$=s7(c7(f)(g(y(v(P=k)))))},S.preclip=function(k){return arguments.length?(g=k,d=void 0,T()):g},S.postclip=function(k){return arguments.length?(v=k,m=b=x=_=null,T()):v},S.clipAngle=function(k){return arguments.length?(g=+k?Jd(d=k*V):(d=null,il),T()):d*dt},S.clipExtent=function(k){return arguments.length?(v=k==null?(m=b=x=_=null,Ni):qa(m=+k[0][0],b=+k[0][1],x=+k[1][0],_=+k[1][1]),T()):m==null?null:[[m,b],[x,_]]},S.scale=function(k){return arguments.length?(n=+k,E()):n},S.translate=function(k){return arguments.length?(r=+k[0],i=+k[1],E()):[r,i]},S.center=function(k){return arguments.length?(o=k[0]%360*V,a=k[1]%360*V,E()):[o*dt,a*dt]},S.rotate=function(k){return arguments.length?(u=k[0]%360*V,c=k[1]%360*V,s=k.length>2?k[2]%360*V:0,E()):[u*dt,c*dt,s*dt]},S.angle=function(k){return arguments.length?(h=k%360*V,E()):h*dt},S.reflectX=function(k){return arguments.length?(l=k?-1:1,E()):l<0},S.reflectY=function(k){return arguments.length?(p=k?-1:1,E()):p<0},S.precision=function(k){return arguments.length?(y=Pg(A,w=k*k),T()):Ct(w)},S.fitExtent=function(k,D){return eu(S,k,D)},S.fitSize=function(k,D){return xl(S,k,D)},S.fitWidth=function(k,D){return _l(S,k,D)},S.fitHeight=function(k,D){return wl(S,k,D)};function E(){var k=Dg(n,0,0,l,p,h).apply(null,e(o,a)),D=Dg(n,r-k[0],i-k[1],l,p,h);return f=nl(u,c,s),A=tl(e,D),M=tl(f,A),y=Pg(A,w),T()}function T(){return $=P=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&L,E()}}function $l(t){var e=0,n=it/3,r=Al(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*V,n=o[1]*V):[e*dt,n*dt]},i}function f7(t){var e=H(t);function n(r,i){return[r*e,B(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function kg(t,e){var n=B(t),r=(n+B(e))/2;if(ut(r)<X)return f7(t);var i=1+n*(2*r-n),o=Ct(i)/r;function a(u,c){var s=Ct(i-2*r*B(c))/r;return[s*B(u*=r),o-s*H(u)]}return a.invert=function(u,c){var s=o-c,f=Xt(u,ut(s))*le(s);return s*r<0&&(f-=it*le(u)*le(s)),[f/r,Vt((i-(u*u+s*s)*r*r)/(2*r))]},a}function nu(){return $l(kg).scale(155.424).center([0,33.6442])}function Eg(){return nu().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function h7(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function p7(){var t,e,n=Eg(),r,i=nu().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=nu().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u,c,s={point:function(l,p){c=[l,p]}};function f(l){var p=l[0],d=l[1];return c=null,r.point(p,d),c||(o.point(p,d),c)||(u.point(p,d),c)}f.invert=function(l){var p=n.scale(),d=n.translate(),g=(l[0]-d[0])/p,m=(l[1]-d[1])/p;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(l)},f.stream=function(l){return t&&e===l?t:t=h7([n.stream(e=l),i.stream(l),a.stream(l)])},f.precision=function(l){return arguments.length?(n.precision(l),i.precision(l),a.precision(l),h()):n.precision()},f.scale=function(l){return arguments.length?(n.scale(l),i.scale(l*.35),a.scale(l),f.translate(n.translate())):n.scale()},f.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),d=+l[0],g=+l[1];return r=n.translate(l).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(s),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+X,g+.12*p+X],[d-.214*p-X,g+.234*p-X]]).stream(s),u=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+X,g+.166*p+X],[d-.115*p-X,g+.234*p-X]]).stream(s),h()},f.fitExtent=function(l,p){return eu(f,l,p)},f.fitSize=function(l,p){return xl(f,l,p)},f.fitWidth=function(l,p){return _l(f,l,p)},f.fitHeight=function(l,p){return wl(f,l,p)};function h(){return t=e=null,f}return f.scale(1070)}function Ng(t){return function(e,n){var r=H(e),i=H(n),o=t(r*i);return o===1/0?[2,0]:[o*i*B(e),o*B(n)]}}function Gi(t){return function(e,n){var r=Ct(e*e+n*n),i=t(r),o=B(i),a=H(i);return[Xt(e*o,r*a),Vt(r&&n*o/r)]}}var Ml=Ng(function(t){return Ct(2/(1+t))});Ml.invert=Gi(function(t){return 2*Vt(t/2)});function d7(){return Re(Ml).scale(124.75).clipAngle(180-.001)}var Sl=Ng(function(t){return(t=wd(t))&&t/B(t)});Sl.invert=Gi(function(t){return t});function g7(){return Re(Sl).scale(79.4188).clipAngle(180-.001)}function Ui(t,e){return[t,Sa(Bc((wt+e)/2))]}Ui.invert=function(t,e){return[t,2*Sr(_d(e))-wt]};function m7(){return Lg(Ui).scale(961/Ht)}function Lg(t){var e=Re(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,u,c,s;e.scale=function(h){return arguments.length?(r(h),f()):r()},e.translate=function(h){return arguments.length?(i(h),f()):i()},e.center=function(h){return arguments.length?(n(h),f()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=u=c=s=null:(a=+h[0][0],u=+h[0][1],c=+h[1][0],s=+h[1][1]),f()):a==null?null:[[a,u],[c,s]]};function f(){var h=it*r(),l=e(Wd(e.rotate()).invert([0,0]));return o(a==null?[[l[0]-h,l[1]-h],[l[0]+h,l[1]+h]]:t===Ui?[[Math.max(l[0]-h,a),u],[Math.min(l[0]+h,c),s]]:[[a,Math.max(l[1]-h,u)],[c,Math.min(l[1]+h,s)]])}return f()}function ru(t){return Bc((wt+t)/2)}function Cg(t,e){var n=H(t),r=t===e?B(t):Sa(n/H(e))/Sa(ru(e)/ru(t)),i=n*Yc(ru(t),r)/r;if(!r)return Ui;function o(a,u){i>0?u<-wt+X&&(u=-wt+X):u>wt-X&&(u=wt-X);var c=i/Yc(ru(u),r);return[c*B(r*a),i-c*H(r*a)]}return o.invert=function(a,u){var c=i-u,s=le(r)*Ct(a*a+c*c),f=Xt(a,ut(c))*le(c);return c*r<0&&(f-=it*le(a)*le(c)),[f/r,2*Sr(Yc(i/s,1/r))-wt]},o}function y7(){return $l(Cg).scale(109.5).parallels([30,30])}function Yi(t,e){return[t,e]}Yi.invert=Yi;function b7(){return Re(Yi).scale(152.63)}function Ig(t,e){var n=H(t),r=t===e?B(t):(n-H(e))/(e-t),i=n/r+t;if(ut(r)<X)return Yi;function o(a,u){var c=i-u,s=r*a;return[c*B(s),i-c*H(s)]}return o.invert=function(a,u){var c=i-u,s=Xt(a,ut(c))*le(c);return c*r<0&&(s-=it*le(a)*le(c)),[s/r,i-le(r)*Ct(a*a+c*c)]},o}function v7(){return $l(Ig).scale(131.154).center([0,13.9389])}var Bi=1.340264,qi=-.081106,Wi=893e-6,Hi=.003796,iu=Ct(3)/2,x7=12;function Tl(t,e){var n=Vt(iu*B(e)),r=n*n,i=r*r*r;return[t*H(n)/(iu*(Bi+3*qi*r+i*(7*Wi+9*Hi*r))),n*(Bi+qi*r+i*(Wi+Hi*r))]}Tl.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,u,c;o<x7&&(u=n*(Bi+qi*r+i*(Wi+Hi*r))-e,c=Bi+3*qi*r+i*(7*Wi+9*Hi*r),n-=a=u/c,r=n*n,i=r*r*r,!(ut(a)<Ti));++o);return[iu*t*(Bi+3*qi*r+i*(7*Wi+9*Hi*r))/H(n),Vt(B(n)/iu)]};function _7(){return Re(Tl).scale(177.158)}function Pl(t,e){var n=H(e),r=H(t)*n;return[n*B(t)/r,B(e)/r]}Pl.invert=Gi(Sr);function w7(){return Re(Pl).scale(144.049).clipAngle(60)}function A7(){var t=1,e=0,n=0,r=1,i=1,o=0,a,u,c=null,s,f,h,l=1,p=1,d=Oi({point:function(v,w){var y=_([v,w]);this.stream.point(y[0],y[1])}}),g=Ni,m,b;function x(){return l=t*r,p=t*i,m=b=null,_}function _(v){var w=v[0]*l,y=v[1]*p;if(o){var A=y*a-w*u;w=w*a+y*u,y=A}return[w+e,y+n]}return _.invert=function(v){var w=v[0]-e,y=v[1]-n;if(o){var A=y*a+w*u;w=w*a-y*u,y=A}return[w/l,y/p]},_.stream=function(v){return m&&b===v?m:m=d(g(b=v))},_.postclip=function(v){return arguments.length?(g=v,c=s=f=h=null,x()):g},_.clipExtent=function(v){return arguments.length?(g=v==null?(c=s=f=h=null,Ni):qa(c=+v[0][0],s=+v[0][1],f=+v[1][0],h=+v[1][1]),x()):c==null?null:[[c,s],[f,h]]},_.scale=function(v){return arguments.length?(t=+v,x()):t},_.translate=function(v){return arguments.length?(e=+v[0],n=+v[1],x()):[e,n]},_.angle=function(v){return arguments.length?(o=v%360*V,u=B(o),a=H(o),x()):o*dt},_.reflectX=function(v){return arguments.length?(r=v?-1:1,x()):r<0},_.reflectY=function(v){return arguments.length?(i=v?-1:1,x()):i<0},_.fitExtent=function(v,w){return eu(_,v,w)},_.fitSize=function(v,w){return xl(_,v,w)},_.fitWidth=function(v,w){return _l(_,v,w)},_.fitHeight=function(v,w){return wl(_,v,w)},_}function Dl(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Dl.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ut(i)>X&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function $7(){return Re(Dl).scale(175.295)}function kl(t,e){return[H(e)*B(t),B(e)]}kl.invert=Gi(Vt);function M7(){return Re(kl).scale(249.5).clipAngle(90+X)}function El(t,e){var n=H(e),r=1+H(t)*n;return[n*B(t)/r,B(e)/r]}El.invert=Gi(function(t){return 2*Sr(t)});function S7(){return Re(El).scale(250).clipAngle(142)}function Nl(t,e){return[Sa(Bc((wt+e)/2)),-t]}Nl.invert=function(t,e){return[-e,2*Sr(_d(t))-wt]};function T7(){var t=Lg(Nl),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function P7(t,e){return t.parent===e.parent?1:2}function D7(t){return t.reduce(k7,0)/t.length}function k7(t,e){return t+e.x}function E7(t){return 1+t.reduce(N7,0)}function N7(t,e){return Math.max(t,e.y)}function L7(t){for(var e;e=t.children;)t=e[0];return t}function C7(t){for(var e;e=t.children;)t=e[e.length-1];return t}function I7(){var t=P7,e=1,n=1,r=!1;function i(o){var a,u=0;o.eachAfter(function(l){var p=l.children;p?(l.x=D7(p),l.y=E7(p)):(l.x=a?u+=t(l,a):0,l.y=0,a=l)});var c=L7(o),s=C7(o),f=c.x-t(c,s)/2,h=s.x+t(s,c)/2;return o.eachAfter(r?function(l){l.x=(l.x-o.x)*e,l.y=(o.y-l.y)*n}:function(l){l.x=(l.x-f)/(h-f)*e,l.y=(1-(o.y?l.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function R7(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function F7(){return this.eachAfter(R7)}function z7(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function O7(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function G7(t,e){for(var n=this,r=[n],i=[],o,a,u,c=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,u=o.length;a<u;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function U7(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function Y7(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function B7(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function q7(t){for(var e=this,n=W7(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function W7(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function H7(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function X7(){return Array.from(this)}function V7(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function j7(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*Z7(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Ll(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=J7)):e===void 0&&(e=Q7);for(var n=new qn(t),r,i=[n],o,a,u,c;r=i.pop();)if((a=e(r.data))&&(c=(a=Array.from(a)).length))for(r.children=a,u=c-1;u>=0;--u)i.push(o=a[u]=new qn(a[u])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(Rg)}function K7(){return Ll(this).eachBefore(tA)}function Q7(t){return t.children}function J7(t){return Array.isArray(t)?t[1]:null}function tA(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Rg(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function qn(t){this.data=t,this.depth=this.height=0,this.parent=null}qn.prototype=Ll.prototype={constructor:qn,count:F7,each:z7,eachAfter:G7,eachBefore:O7,find:U7,sum:Y7,sort:B7,path:q7,ancestors:H7,descendants:X7,leaves:V7,links:j7,copy:K7,[Symbol.iterator]:Z7};function ou(t){return t==null?null:Fg(t)}function Fg(t){if(typeof t!="function")throw new Error;return t}function Wn(){return 0}function Lr(t){return function(){return t}}const eA=1664525,nA=1013904223,zg=4294967296;function Cl(){let t=1;return()=>(t=(eA*t+nA)%zg)/zg}function rA(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function iA(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function oA(t){return Og(t,Cl())}function Og(t,e){for(var n=0,r=(t=iA(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&Gg(a,o)?++n:(a=uA(i=aA(i,o)),n=0);return a}function aA(t,e){var n,r;if(Il(e,t))return[e];for(n=0;n<t.length;++n)if(au(e,t[n])&&Il(Xi(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(au(Xi(t[n],t[r]),e)&&au(Xi(t[n],e),t[r])&&au(Xi(t[r],e),t[n])&&Il(Ug(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function au(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Gg(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Il(t,e){for(var n=0;n<e.length;++n)if(!Gg(t,e[n]))return!1;return!0}function uA(t){switch(t.length){case 1:return sA(t[0]);case 2:return Xi(t[0],t[1]);case 3:return Ug(t[0],t[1],t[2])}}function sA(t){return{x:t.x,y:t.y,r:t.r}}function Xi(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,u=e.r,c=o-n,s=a-r,f=u-i,h=Math.sqrt(c*c+s*s);return{x:(n+o+c/h*f)/2,y:(r+a+s/h*f)/2,r:(h+i+u)/2}}function Ug(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,u=e.y,c=e.r,s=n.x,f=n.y,h=n.r,l=r-a,p=r-s,d=i-u,g=i-f,m=c-o,b=h-o,x=r*r+i*i-o*o,_=x-a*a-u*u+c*c,v=x-s*s-f*f+h*h,w=p*d-l*g,y=(d*v-g*_)/(w*2)-r,A=(g*m-d*b)/w,M=(p*_-l*v)/(w*2)-i,$=(l*b-p*m)/w,P=A*A+$*$-1,S=2*(o+y*A+M*$),L=y*y+M*M-o*o,E=-(Math.abs(P)>1e-6?(S+Math.sqrt(S*S-4*P*L))/(2*P):L/S);return{x:r+y+A*E,y:i+M+$*E,r:E}}function Yg(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,u,c,s=r*r+a*a;s?(o=e.r+n.r,o*=o,c=t.r+n.r,c*=c,o>c?(i=(s+c-o)/(2*s),u=Math.sqrt(Math.max(0,c/s-i*i)),n.x=t.x-i*r-u*a,n.y=t.y-i*a+u*r):(i=(s+o-c)/(2*s),u=Math.sqrt(Math.max(0,o/s-i*i)),n.x=e.x+i*r-u*a,n.y=e.y+i*a+u*r)):(n.x=e.x+n.r,n.y=e.y)}function Bg(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function qg(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function uu(t){this._=t,this.next=null,this.previous=null}function Wg(t,e){if(!(o=(t=rA(t)).length))return 0;var n,r,i,o,a,u,c,s,f,h,l;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Yg(r,n,i=t[2]),n=new uu(n),r=new uu(r),i=new uu(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<o;++c){Yg(n._,r._,i=t[c]),i=new uu(i),s=r.next,f=n.previous,h=r._.r,l=n._.r;do if(h<=l){if(Bg(s._,i._)){r=s,n.next=r,r.previous=n,--c;continue t}h+=s._.r,s=s.next}else{if(Bg(f._,i._)){n=f,n.next=r,r.previous=n,--c;continue t}l+=f._.r,f=f.previous}while(s!==f.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=qg(n);(i=i.next)!==r;)(u=qg(i))<a&&(n=i,a=u);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Og(n,e),c=0;c<o;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function cA(t){return Wg(t,Cl()),t}function lA(t){return Math.sqrt(t.value)}function fA(){var t=null,e=1,n=1,r=Wn;function i(o){const a=Cl();return o.x=e/2,o.y=n/2,t?o.eachBefore(Hg(t)).eachAfter(Rl(r,.5,a)).eachBefore(Xg(1)):o.eachBefore(Hg(lA)).eachAfter(Rl(Wn,1,a)).eachAfter(Rl(r,o.r/Math.min(e,n),a)).eachBefore(Xg(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=ou(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Lr(+o),i):r},i}function Hg(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Rl(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,u=t(r)*e||0,c;if(u)for(o=0;o<a;++o)i[o].r+=u;if(c=Wg(i,n),u)for(o=0;o<a;++o)i[o].r-=u;r.r=c+u}}}function Xg(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Vg(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Vi(t,e,n,r,i){for(var o=t.children,a,u=-1,c=o.length,s=t.value&&(r-e)/t.value;++u<c;)a=o[u],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*s}function hA(){var t=1,e=1,n=0,r=!1;function i(a){var u=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/u,a.eachBefore(o(e,u)),r&&a.eachBefore(Vg),a}function o(a,u){return function(c){c.children&&Vi(c,c.x0,a*(c.depth+1)/u,c.x1,a*(c.depth+2)/u);var s=c.x0,f=c.y0,h=c.x1-n,l=c.y1-n;h<s&&(s=h=(s+h)/2),l<f&&(f=l=(f+l)/2),c.x0=s,c.y0=f,c.x1=h,c.y1=l}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var pA={depth:-1},jg={},Fl={};function dA(t){return t.id}function gA(t){return t.parentId}function mA(){var t=dA,e=gA,n;function r(i){var o=Array.from(i),a=t,u=e,c,s,f,h,l,p,d,g,m=new Map;if(n!=null){const b=o.map((v,w)=>yA(n(v,w,i))),x=b.map(Zg),_=new Set(b).add("");for(const v of x)_.has(v)||(_.add(v),b.push(v),x.push(Zg(v)),o.push(Fl));a=(v,w)=>b[w],u=(v,w)=>x[w]}for(f=0,c=o.length;f<c;++f)s=o[f],p=o[f]=new qn(s),(d=a(s,f,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?jg:p)),(d=u(s,f,i))!=null&&(d+="")&&(p.parent=d);for(f=0;f<c;++f)if(p=o[f],d=p.parent){if(l=m.get(d),!l)throw new Error("missing: "+d);if(l===jg)throw new Error("ambiguous: "+d);l.children?l.children.push(p):l.children=[p],p.parent=l}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Fl&&h.children.length===1;)h=h.children[0],--c;for(let b=o.length-1;b>=0&&(p=o[b],p.data===Fl);--b)p.data=null}if(h.parent=pA,h.eachBefore(function(b){b.depth=b.parent.depth+1,--c}).eachBefore(Rg),h.parent=null,c>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=ou(i),r):t},r.parentId=function(i){return arguments.length?(e=ou(i),r):e},r.path=function(i){return arguments.length?(n=ou(i),r):n},r}function yA(t){t=`${t}`;let e=t.length;return zl(t,e-1)&&!zl(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Zg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!zl(t,e););return t.slice(0,e)}function zl(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function bA(t,e){return t.parent===e.parent?1:2}function Ol(t){var e=t.children;return e?e[0]:t.t}function Gl(t){var e=t.children;return e?e[e.length-1]:t.t}function vA(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function xA(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function _A(t,e,n){return t.a.parent===e.parent?t.a:n}function su(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}su.prototype=Object.create(qn.prototype);function wA(t){for(var e=new su(t,0),n,r=[e],i,o,a,u;n=r.pop();)if(o=n._.children)for(n.children=new Array(u=o.length),a=u-1;a>=0;--a)r.push(i=n.children[a]=new su(o[a],a)),i.parent=n;return(e.parent=new su(null,0)).children=[e],e}function AA(){var t=bA,e=1,n=1,r=null;function i(s){var f=wA(s);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(a),r)s.eachBefore(c);else{var h=s,l=s,p=s;s.eachBefore(function(x){x.x<h.x&&(h=x),x.x>l.x&&(l=x),x.depth>p.depth&&(p=x)});var d=h===l?1:t(h,l)/2,g=d-h.x,m=e/(l.x+d+g),b=n/(p.depth||1);s.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*b})}return s}function o(s){var f=s.children,h=s.parent.children,l=s.i?h[s.i-1]:null;if(f){xA(s);var p=(f[0].z+f[f.length-1].z)/2;l?(s.z=l.z+t(s._,l._),s.m=s.z-p):s.z=p}else l&&(s.z=l.z+t(s._,l._));s.parent.A=u(s,l,s.parent.A||h[0])}function a(s){s._.x=s.z+s.parent.m,s.m+=s.parent.m}function u(s,f,h){if(f){for(var l=s,p=s,d=f,g=l.parent.children[0],m=l.m,b=p.m,x=d.m,_=g.m,v;d=Gl(d),l=Ol(l),d&&l;)g=Ol(g),p=Gl(p),p.a=s,v=d.z+x-l.z-m+t(d._,l._),v>0&&(vA(_A(d,s,h),s,v),m+=v,b+=v),x+=d.m,m+=l.m,_+=g.m,b+=p.m;d&&!Gl(p)&&(p.t=d,p.m+=x-b),l&&!Ol(g)&&(g.t=l,g.m+=m-_,h=s)}return h}function c(s){s.x*=e,s.y=s.depth*n}return i.separation=function(s){return arguments.length?(t=s,i):t},i.size=function(s){return arguments.length?(r=!1,e=+s[0],n=+s[1],i):r?null:[e,n]},i.nodeSize=function(s){return arguments.length?(r=!0,e=+s[0],n=+s[1],i):r?[e,n]:null},i}function cu(t,e,n,r,i){for(var o=t.children,a,u=-1,c=o.length,s=t.value&&(i-n)/t.value;++u<c;)a=o[u],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*s}var Kg=(1+Math.sqrt(5))/2;function Qg(t,e,n,r,i,o){for(var a=[],u=e.children,c,s,f=0,h=0,l=u.length,p,d,g=e.value,m,b,x,_,v,w,y;f<l;){p=i-n,d=o-r;do m=u[h++].value;while(!m&&h<l);for(b=x=m,w=Math.max(d/p,p/d)/(g*t),y=m*m*w,v=Math.max(x/y,y/b);h<l;++h){if(m+=s=u[h].value,s<b&&(b=s),s>x&&(x=s),y=m*m*w,_=Math.max(x/y,y/b),_>v){m-=s;break}v=_}a.push(c={value:m,dice:p<d,children:u.slice(f,h)}),c.dice?Vi(c,n,r,i,g?r+=d*m/g:o):cu(c,n,r,g?n+=p*m/g:i,o),g-=m,f=h}return a}const Jg=function t(e){function n(r,i,o,a,u){Qg(e,r,i,o,a,u)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Kg);function $A(){var t=Jg,e=!1,n=1,r=1,i=[0],o=Wn,a=Wn,u=Wn,c=Wn,s=Wn;function f(l){return l.x0=l.y0=0,l.x1=n,l.y1=r,l.eachBefore(h),i=[0],e&&l.eachBefore(Vg),l}function h(l){var p=i[l.depth],d=l.x0+p,g=l.y0+p,m=l.x1-p,b=l.y1-p;m<d&&(d=m=(d+m)/2),b<g&&(g=b=(g+b)/2),l.x0=d,l.y0=g,l.x1=m,l.y1=b,l.children&&(p=i[l.depth+1]=o(l)/2,d+=s(l)-p,g+=a(l)-p,m-=u(l)-p,b-=c(l)-p,m<d&&(d=m=(d+m)/2),b<g&&(g=b=(g+b)/2),t(l,d,g,m,b))}return f.round=function(l){return arguments.length?(e=!!l,f):e},f.size=function(l){return arguments.length?(n=+l[0],r=+l[1],f):[n,r]},f.tile=function(l){return arguments.length?(t=Fg(l),f):t},f.padding=function(l){return arguments.length?f.paddingInner(l).paddingOuter(l):f.paddingInner()},f.paddingInner=function(l){return arguments.length?(o=typeof l=="function"?l:Lr(+l),f):o},f.paddingOuter=function(l){return arguments.length?f.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l):f.paddingTop()},f.paddingTop=function(l){return arguments.length?(a=typeof l=="function"?l:Lr(+l),f):a},f.paddingRight=function(l){return arguments.length?(u=typeof l=="function"?l:Lr(+l),f):u},f.paddingBottom=function(l){return arguments.length?(c=typeof l=="function"?l:Lr(+l),f):c},f.paddingLeft=function(l){return arguments.length?(s=typeof l=="function"?l:Lr(+l),f):s},f}function MA(t,e,n,r,i){var o=t.children,a,u=o.length,c,s=new Array(u+1);for(s[0]=c=a=0;a<u;++a)s[a+1]=c+=o[a].value;f(0,u,t.value,e,n,r,i);function f(h,l,p,d,g,m,b){if(h>=l-1){var x=o[h];x.x0=d,x.y0=g,x.x1=m,x.y1=b;return}for(var _=s[h],v=p/2+_,w=h+1,y=l-1;w<y;){var A=w+y>>>1;s[A]<v?w=A+1:y=A}v-s[w-1]<s[w]-v&&h+1<w&&--w;var M=s[w]-_,$=p-M;if(m-d>b-g){var P=p?(d*$+m*M)/p:m;f(h,w,M,d,g,P,b),f(w,l,$,P,g,m,b)}else{var S=p?(g*$+b*M)/p:b;f(h,w,M,d,g,m,S),f(w,l,$,d,S,m,b)}}}function SA(t,e,n,r,i){(t.depth&1?cu:Vi)(t,e,n,r,i)}const TA=function t(e){function n(r,i,o,a,u){if((c=r._squarify)&&c.ratio===e)for(var c,s,f,h,l=-1,p,d=c.length,g=r.value;++l<d;){for(s=c[l],f=s.children,h=s.value=0,p=f.length;h<p;++h)s.value+=f[h].value;s.dice?Vi(s,i,o,a,g?o+=(u-o)*s.value/g:u):cu(s,i,o,g?i+=(a-i)*s.value/g:a,u),g-=s.value}else r._squarify=c=Qg(e,r,i,o,a,u),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Kg);function PA(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function DA(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],u,c=0;++e<n;)o=a,a=t[e],c+=u=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*u,i+=(o[1]+a[1])*u;return c*=3,[r/c,i/c]}function kA(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function EA(t,e){return t[0]-e[0]||t[1]-e[1]}function t1(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&kA(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function NA(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(EA),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=t1(r),a=t1(i),u=a[0]===o[0],c=a[a.length-1]===o[o.length-1],s=[];for(e=o.length-1;e>=0;--e)s.push(t[r[o[e]][2]]);for(e=+u;e<a.length-c;++e)s.push(t[r[a[e]][2]]);return s}function LA(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],u=r[1],c,s,f=!1,h=0;h<n;++h)r=t[h],c=r[0],s=r[1],s>o!=u>o&&i<(a-c)*(o-s)/(u-s)+c&&(f=!f),a=c,u=s;return f}function CA(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],u=r[1],c=0;++e<n;)i=a,o=u,r=t[e],a=r[0],u=r[1],i-=a,o-=u,c+=Math.hypot(i,o);return c}const Rt=Math.random,IA=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Rt),RA=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Rt),Ul=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var u;if(o!=null)u=o,o=null;else do o=e()*2-1,u=e()*2-1,a=o*o+u*u;while(!a||a>1);return r+i*u*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Rt),FA=function t(e){var n=Ul.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Rt),e1=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Rt),zA=function t(e){var n=e1.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Rt),OA=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Rt),GA=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Rt),UA=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Rt),n1=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Rt),Yl=function t(e){var n=Ul.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,u=1/(3*Math.sqrt(a)),c=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var s=n(),f=1+u*s;while(f<=0);f*=f*f;var h=1-e()}while(h>=1-.0331*s*s*s*s&&Math.log(h)>=.5*s*s+a*(1-f+Math.log(f)));return a*f*c()*o}}return r.source=t,r}(Rt),r1=function t(e){var n=Yl.source(e);function r(i,o){var a=n(i),u=n(o);return function(){var c=a();return c===0?0:c/(c+u())}}return r.source=t,r}(Rt),i1=function t(e){var n=n1.source(e),r=r1.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var u=0,c=o,s=a;c*s>16&&c*(1-s)>16;){var f=Math.floor((c+1)*s),h=r(f,c-f+1)();h<=s?(u+=f,c-=f,s=(s-h)/(1-h)):(c=f-1,s/=h)}for(var l=s<.5,p=l?s:1-s,d=n(p),g=d(),m=0;g<=c;++m)g+=d();return u+(l?m:c-m)}}return i.source=t,i}(Rt),YA=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=u=>-Math.log(u):(r=1/r,a=u=>Math.pow(u,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Rt),BA=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Rt),qA=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Rt),WA=function t(e){var n=Yl.source(e),r=i1.source(e);function i(o){return function(){for(var a=0,u=o;u>16;){var c=Math.floor(.875*u),s=n(c)();if(s>u)return a+r(c-1,u/s)();a+=c,u-=s}for(var f=-Math.log1p(-e()),h=0;f<=u;++h)f-=Math.log1p(-e());return a+h}}return i.source=t,i}(Rt),HA=1664525,XA=1013904223,o1=1/4294967296;function VA(t=Math.random()){let e=(0<=t&&t<1?t/o1:Math.abs(t))|0;return()=>(e=HA*e+XA|0,o1*(e>>>0))}function he(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function je(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Bl=Symbol("implicit");function ql(){var t=new ni,e=[],n=[],r=Bl;function i(o){let a=t.get(o);if(a===void 0){if(r!==Bl)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new ni;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ql(e,n).unknown(r)},he.apply(i,arguments),i}function Wl(){var t=ql().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,u=!1,c=0,s=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+s*2),u&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),u&&(d=Math.round(d),a=Math.round(a));var m=an(l).map(function(b){return d+o*b});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,u=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(u=!!l,h()):u},t.padding=function(l){return arguments.length?(c=Math.min(1,s=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(s=+l,h()):s},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return Wl(e(),[r,i]).round(u).paddingInner(c).paddingOuter(s).align(f)},he.apply(h(),arguments)}function a1(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return a1(e())},t}function Hl(){return a1(Wl.apply(null,arguments).paddingInner(1))}function jA(t){return function(){return t}}function lu(t){return+t}var u1=[0,1];function Qt(t){return t}function Xl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:jA(isNaN(e)?NaN:.5)}function ZA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function KA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Xl(i,r),o=n(a,o)):(r=Xl(r,i),o=n(o,a)),function(u){return o(r(u))}}function QA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Xl(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(u){var c=wn(t,u,1,r)-1;return o[c](i[c](u))}}function ji(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function fu(){var t=u1,e=u1,n=cn,r,i,o,a=Qt,u,c,s;function f(){var l=Math.min(t.length,e.length);return a!==Qt&&(a=ZA(t[0],t[l-1])),u=l>2?QA:KA,c=s=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=u(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((s||(s=u(e,t.map(r),ce)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,lu),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=ta,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Qt,f()):a!==Qt},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function Vl(){return fu()(Qt,Qt)}function s1(t,e,n,r){var i=Eo(t,e,n),o;switch(r=Mr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=vd(i,a))&&(r.precision=o),Gc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=xd(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=bd(i))&&(r.precision=o-(r.type==="%")*2);break}}return Si(r)}function dn(t){var e=t.domain;return t.ticks=function(n){var r=e();return $n(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return s1(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],u=r[o],c,s,f=10;for(u<a&&(s=a,a=u,u=s,s=i,i=o,o=s);f-- >0;){if(s=Mn(a,u,n),s===c)return r[i]=a,r[o]=u,e(r);if(s>0)a=Math.floor(a/s)*s,u=Math.ceil(u/s)*s;else if(s<0)a=Math.ceil(a*s)/s,u=Math.floor(u*s)/s;else break;c=s}return t},t}function jl(){var t=Vl();return t.copy=function(){return ji(t,jl())},he.apply(t,arguments),dn(t)}function c1(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,lu),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return c1(t).unknown(e)},t=arguments.length?Array.from(t,lu):[0,1],dn(n)}function l1(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function f1(t){return Math.log(t)}function h1(t){return Math.exp(t)}function JA(t){return-Math.log(-t)}function t$(t){return-Math.exp(-t)}function e$(t){return isFinite(t)?+("1e"+t):t<0?0:t}function n$(t){return t===10?e$:t===Math.E?Math.exp:e=>Math.pow(t,e)}function r$(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function p1(t){return(e,n)=>-t(-e,n)}function Zl(t){const e=t(f1,h1),n=e.domain;let r=10,i,o;function a(){return i=r$(r),o=n$(r),n()[0]<0?(i=p1(i),o=p1(o),t(JA,t$)):t(f1,h1),e}return e.base=function(u){return arguments.length?(r=+u,a()):r},e.domain=function(u){return arguments.length?(n(u),a()):n()},e.ticks=u=>{const c=n();let s=c[0],f=c[c.length-1];const h=f<s;h&&([s,f]=[f,s]);let l=i(s),p=i(f),d,g;const m=u==null?10:+u;let b=[];if(!(r%1)&&p-l<m){if(l=Math.floor(l),p=Math.ceil(p),s>0){for(;l<=p;++l)for(d=1;d<r;++d)if(g=l<0?d/o(-l):d*o(l),!(g<s)){if(g>f)break;b.push(g)}}else for(;l<=p;++l)for(d=r-1;d>=1;--d)if(g=l>0?d/o(-l):d*o(l),!(g<s)){if(g>f)break;b.push(g)}b.length*2<m&&(b=$n(s,f,m))}else b=$n(l,p,Math.min(p-l,m)).map(o);return h?b.reverse():b},e.tickFormat=(u,c)=>{if(u==null&&(u=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Mr(c)).precision==null&&(c.trim=!0),c=Si(c)),u===1/0)return c;const s=Math.max(1,r*u/e.ticks().length);return f=>{let h=f/o(Math.round(i(f)));return h*r<r-.5&&(h*=r),h<=s?c(f):""}},e.nice=()=>n(l1(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),e}function d1(){const t=Zl(fu()).domain([1,10]);return t.copy=()=>ji(t,d1()).base(t.base()),he.apply(t,arguments),t}function g1(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function m1(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Kl(t){var e=1,n=t(g1(e),m1(e));return n.constant=function(r){return arguments.length?t(g1(e=+r),m1(e)):e},dn(n)}function y1(){var t=Kl(fu());return t.copy=function(){return ji(t,y1()).constant(t.constant())},he.apply(t,arguments)}function b1(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function i$(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function o$(t){return t<0?-t*t:t*t}function Ql(t){var e=t(Qt,Qt),n=1;function r(){return n===1?t(Qt,Qt):n===.5?t(i$,o$):t(b1(n),b1(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},dn(e)}function hu(){var t=Ql(fu());return t.copy=function(){return ji(t,hu()).exponent(t.exponent())},he.apply(t,arguments),t}function a$(){return hu.apply(null,arguments).exponent(.5)}function v1(t){return Math.sign(t)*t*t}function u$(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function x1(){var t=Vl(),e=[0,1],n=!1,r;function i(o){var a=u$(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(v1(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,lu)).map(v1)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return x1(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},he.apply(i,arguments),dn(i)}function _1(){var t=[],e=[],n=[],r;function i(){var a=0,u=Math.max(1,e.length);for(n=new Array(u-1);++a<u;)n[a-1]=t0(t,a/u);return o}function o(a){return a==null||isNaN(a=+a)?r:e[wn(n,a)]}return o.invertExtent=function(a){var u=e.indexOf(a);return u<0?[NaN,NaN]:[u>0?n[u-1]:t[0],u<n.length?n[u]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let u of a)u!=null&&!isNaN(u=+u)&&t.push(u);return t.sort(bt),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return _1().domain(t).range(e).unknown(r)},he.apply(o,arguments)}function w1(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[wn(r,c,0,n)]:o}function u(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,u()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,u()):i.slice()},a.invertExtent=function(c){var s=i.indexOf(c);return s<0?[NaN,NaN]:s<1?[t,r[0]]:s>=n?[r[n-1],e]:[r[s-1],r[s]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return w1().domain([t,e]).range(i).unknown(o)},he.apply(dn(a),arguments)}function A1(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[wn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return A1().domain(t).range(e).unknown(n)},he.apply(i,arguments)}const Jl=new Date,tf=new Date;function Tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a<u-o?a:u},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const c=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<a)||!(u>0))return c;let s;do c.push(s=new Date(+o)),e(o,u),t(o);while(s<o&&o<a);return c},i.filter=o=>Tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;e(a,-1),!o(a););else for(;--u>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Jl.setTime(+o),tf.setTime(+a),t(Jl),t(tf),Math.floor(n(Jl,tf))),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 Cr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Cr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Cr);const $1=Cr.range,Ze=1e3,pe=Ze*60,Ke=pe*60,Qe=Ke*24,ef=Qe*7,M1=Qe*30,nf=Qe*365,Je=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Ze)},(t,e)=>(e-t)/Ze,t=>t.getUTCSeconds()),S1=Je.range,pu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ze)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getMinutes()),s$=pu.range,du=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getUTCMinutes()),c$=du.range,gu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ze-t.getMinutes()*pe)},(t,e)=>{t.setTime(+t+e*Ke)},(t,e)=>(e-t)/Ke,t=>t.getHours()),l$=gu.range,mu=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ke)},(t,e)=>(e-t)/Ke,t=>t.getUTCHours()),f$=mu.range,Ir=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pe)/Qe,t=>t.getDate()-1),h$=Ir.range,Zi=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Qe,t=>t.getUTCDate()-1),p$=Zi.range,rf=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Qe,t=>Math.floor(t/Qe)),d$=rf.range;function Hn(t){return Tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*pe)/ef)}const Rr=Hn(0),Ki=Hn(1),T1=Hn(2),P1=Hn(3),Xn=Hn(4),D1=Hn(5),k1=Hn(6),E1=Rr.range,g$=Ki.range,m$=T1.range,y$=P1.range,b$=Xn.range,v$=D1.range,x$=k1.range;function Vn(t){return Tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/ef)}const Fr=Vn(0),Qi=Vn(1),N1=Vn(2),L1=Vn(3),jn=Vn(4),C1=Vn(5),I1=Vn(6),R1=Fr.range,_$=Qi.range,w$=N1.range,A$=L1.range,$$=jn.range,M$=C1.range,S$=I1.range,yu=Tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),T$=yu.range,bu=Tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),P$=bu.range,Fe=Tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Fe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const D$=Fe.range,ze=Tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ze.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const k$=ze.range;function F1(t,e,n,r,i,o){const a=[[Je,1,Ze],[Je,5,5*Ze],[Je,15,15*Ze],[Je,30,30*Ze],[o,1,pe],[o,5,5*pe],[o,15,15*pe],[o,30,30*pe],[i,1,Ke],[i,3,3*Ke],[i,6,6*Ke],[i,12,12*Ke],[r,1,Qe],[r,2,2*Qe],[n,1,ef],[e,1,M1],[e,3,3*M1],[t,1,nf]];function u(s,f,h){const l=f<s;l&&([s,f]=[f,s]);const p=h&&typeof h.range=="function"?h:c(s,f,h),d=p?p.range(s,+f+1):[];return l?d.reverse():d}function c(s,f,h){const l=Math.abs(f-s)/h,p=To(([,,m])=>m).right(a,l);if(p===a.length)return t.every(Eo(s/nf,f/nf,h));if(p===0)return Cr.every(Math.max(Eo(s,f,h),1));const[d,g]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return d.every(g)}return[u,c]}const[z1,O1]=F1(ze,bu,Fr,rf,mu,du),[G1,U1]=F1(Fe,yu,Rr,Ir,gu,pu);function of(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function af(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ji(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Y1(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,c=t.shortMonths,s=to(i),f=eo(i),h=to(o),l=eo(o),p=to(a),d=eo(a),g=to(u),m=eo(u),b=to(c),x=eo(c),_={a:N,A:I,b:C,B:z,c:null,d:V1,e:V1,f:J$,g:cM,G:fM,H:Z$,I:K$,j:Q$,L:j1,m:tM,M:eM,p:Y,q:W,Q:em,s:nm,S:nM,u:rM,U:iM,V:oM,w:aM,W:uM,x:null,X:null,y:sM,Y:lM,Z:hM,"%":tm},v={a:st,A:rt,b:at,B:_t,c:null,d:K1,e:K1,f:mM,g:SM,G:PM,H:pM,I:dM,j:gM,L:Q1,m:yM,M:bM,p:ct,q:St,Q:em,s:nm,S:vM,u:xM,U:_M,V:wM,w:AM,W:$M,x:null,X:null,y:MM,Y:TM,Z:DM,"%":tm},w={a:P,A:S,b:L,B:E,c:T,d:H1,e:H1,f:H$,g:W1,G:q1,H:X1,I:X1,j:Y$,L:W$,m:U$,M:B$,p:$,q:G$,Q:V$,s:j$,S:q$,u:I$,U:R$,V:F$,w:C$,W:z$,x:k,X:D,y:W1,Y:q1,Z:O$,"%":X$};_.x=y(n,_),_.X=y(r,_),_.c=y(e,_),v.x=y(n,v),v.X=y(r,v),v.c=y(e,v);function y(G,Q){return function(ot){var F=[],$t=-1,ht=0,Jt=G.length,te,Z,Mt;for(ot instanceof Date||(ot=new Date(+ot));++$t<Jt;)G.charCodeAt($t)===37&&(F.push(G.slice(ht,$t)),(Z=B1[te=G.charAt(++$t)])!=null?te=G.charAt(++$t):Z=te==="e"?" ":"0",(Mt=Q[te])&&(te=Mt(ot,Z)),F.push(te),ht=$t+1);return F.push(G.slice(ht,$t)),F.join("")}}function A(G,Q){return function(ot){var F=Ji(1900,void 0,1),$t=M(F,G,ot+="",0),ht,Jt;if($t!=ot.length)return null;if("Q"in F)return new Date(F.Q);if("s"in F)return new Date(F.s*1e3+("L"in F?F.L:0));if(Q&&!("Z"in F)&&(F.Z=0),"p"in F&&(F.H=F.H%12+F.p*12),F.m===void 0&&(F.m="q"in F?F.q:0),"V"in F){if(F.V<1||F.V>53)return null;"w"in F||(F.w=1),"Z"in F?(ht=af(Ji(F.y,0,1)),Jt=ht.getUTCDay(),ht=Jt>4||Jt===0?Qi.ceil(ht):Qi(ht),ht=Zi.offset(ht,(F.V-1)*7),F.y=ht.getUTCFullYear(),F.m=ht.getUTCMonth(),F.d=ht.getUTCDate()+(F.w+6)%7):(ht=of(Ji(F.y,0,1)),Jt=ht.getDay(),ht=Jt>4||Jt===0?Ki.ceil(ht):Ki(ht),ht=Ir.offset(ht,(F.V-1)*7),F.y=ht.getFullYear(),F.m=ht.getMonth(),F.d=ht.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),Jt="Z"in F?af(Ji(F.y,0,1)).getUTCDay():of(Ji(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-(Jt+5)%7:F.w+F.U*7-(Jt+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,af(F)):of(F)}}function M(G,Q,ot,F){for(var $t=0,ht=Q.length,Jt=ot.length,te,Z;$t<ht;){if(F>=Jt)return-1;if(te=Q.charCodeAt($t++),te===37){if(te=Q.charAt($t++),Z=w[te in B1?Q.charAt($t++):te],!Z||(F=Z(G,ot,F))<0)return-1}else if(te!=ot.charCodeAt(F++))return-1}return F}function $(G,Q,ot){var F=s.exec(Q.slice(ot));return F?(G.p=f.get(F[0].toLowerCase()),ot+F[0].length):-1}function P(G,Q,ot){var F=p.exec(Q.slice(ot));return F?(G.w=d.get(F[0].toLowerCase()),ot+F[0].length):-1}function S(G,Q,ot){var F=h.exec(Q.slice(ot));return F?(G.w=l.get(F[0].toLowerCase()),ot+F[0].length):-1}function L(G,Q,ot){var F=b.exec(Q.slice(ot));return F?(G.m=x.get(F[0].toLowerCase()),ot+F[0].length):-1}function E(G,Q,ot){var F=g.exec(Q.slice(ot));return F?(G.m=m.get(F[0].toLowerCase()),ot+F[0].length):-1}function T(G,Q,ot){return M(G,e,Q,ot)}function k(G,Q,ot){return M(G,n,Q,ot)}function D(G,Q,ot){return M(G,r,Q,ot)}function N(G){return a[G.getDay()]}function I(G){return o[G.getDay()]}function C(G){return c[G.getMonth()]}function z(G){return u[G.getMonth()]}function Y(G){return i[+(G.getHours()>=12)]}function W(G){return 1+~~(G.getMonth()/3)}function st(G){return a[G.getUTCDay()]}function rt(G){return o[G.getUTCDay()]}function at(G){return c[G.getUTCMonth()]}function _t(G){return u[G.getUTCMonth()]}function ct(G){return i[+(G.getUTCHours()>=12)]}function St(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var Q=y(G+="",_);return Q.toString=function(){return G},Q},parse:function(G){var Q=A(G+="",!1);return Q.toString=function(){return G},Q},utcFormat:function(G){var Q=y(G+="",v);return Q.toString=function(){return G},Q},utcParse:function(G){var Q=A(G+="",!0);return Q.toString=function(){return G},Q}}}var B1={"-":"",_:" ",0:"0"},It=/^\s*\d+/,E$=/^%/,N$=/[\\^$*+?|[\]().{}]/g;function lt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function L$(t){return t.replace(N$,"\\$&")}function to(t){return new RegExp("^(?:"+t.map(L$).join("|")+")","i")}function eo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function C$(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function I$(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function R$(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function F$(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function z$(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function q1(t,e,n){var r=It.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function W1(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function O$(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function G$(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function U$(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function H1(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Y$(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function X1(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function B$(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function q$(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function W$(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function H$(t,e,n){var r=It.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function X$(t,e,n){var r=E$.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function V$(t,e,n){var r=It.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function j$(t,e,n){var r=It.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function V1(t,e){return lt(t.getDate(),e,2)}function Z$(t,e){return lt(t.getHours(),e,2)}function K$(t,e){return lt(t.getHours()%12||12,e,2)}function Q$(t,e){return lt(1+Ir.count(Fe(t),t),e,3)}function j1(t,e){return lt(t.getMilliseconds(),e,3)}function J$(t,e){return j1(t,e)+"000"}function tM(t,e){return lt(t.getMonth()+1,e,2)}function eM(t,e){return lt(t.getMinutes(),e,2)}function nM(t,e){return lt(t.getSeconds(),e,2)}function rM(t){var e=t.getDay();return e===0?7:e}function iM(t,e){return lt(Rr.count(Fe(t)-1,t),e,2)}function Z1(t){var e=t.getDay();return e>=4||e===0?Xn(t):Xn.ceil(t)}function oM(t,e){return t=Z1(t),lt(Xn.count(Fe(t),t)+(Fe(t).getDay()===4),e,2)}function aM(t){return t.getDay()}function uM(t,e){return lt(Ki.count(Fe(t)-1,t),e,2)}function sM(t,e){return lt(t.getFullYear()%100,e,2)}function cM(t,e){return t=Z1(t),lt(t.getFullYear()%100,e,2)}function lM(t,e){return lt(t.getFullYear()%1e4,e,4)}function fM(t,e){var n=t.getDay();return t=n>=4||n===0?Xn(t):Xn.ceil(t),lt(t.getFullYear()%1e4,e,4)}function hM(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+lt(e/60|0,"0",2)+lt(e%60,"0",2)}function K1(t,e){return lt(t.getUTCDate(),e,2)}function pM(t,e){return lt(t.getUTCHours(),e,2)}function dM(t,e){return lt(t.getUTCHours()%12||12,e,2)}function gM(t,e){return lt(1+Zi.count(ze(t),t),e,3)}function Q1(t,e){return lt(t.getUTCMilliseconds(),e,3)}function mM(t,e){return Q1(t,e)+"000"}function yM(t,e){return lt(t.getUTCMonth()+1,e,2)}function bM(t,e){return lt(t.getUTCMinutes(),e,2)}function vM(t,e){return lt(t.getUTCSeconds(),e,2)}function xM(t){var e=t.getUTCDay();return e===0?7:e}function _M(t,e){return lt(Fr.count(ze(t)-1,t),e,2)}function J1(t){var e=t.getUTCDay();return e>=4||e===0?jn(t):jn.ceil(t)}function wM(t,e){return t=J1(t),lt(jn.count(ze(t),t)+(ze(t).getUTCDay()===4),e,2)}function AM(t){return t.getUTCDay()}function $M(t,e){return lt(Qi.count(ze(t)-1,t),e,2)}function MM(t,e){return lt(t.getUTCFullYear()%100,e,2)}function SM(t,e){return t=J1(t),lt(t.getUTCFullYear()%100,e,2)}function TM(t,e){return lt(t.getUTCFullYear()%1e4,e,4)}function PM(t,e){var n=t.getUTCDay();return t=n>=4||n===0?jn(t):jn.ceil(t),lt(t.getUTCFullYear()%1e4,e,4)}function DM(){return"+0000"}function tm(){return"%"}function em(t){return+t}function nm(t){return Math.floor(+t/1e3)}var zr,uf,rm,vu,sf;im({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 im(t){return zr=Y1(t),uf=zr.format,rm=zr.parse,vu=zr.utcFormat,sf=zr.utcParse,zr}var om="%Y-%m-%dT%H:%M:%S.%LZ";function kM(t){return t.toISOString()}var EM=Date.prototype.toISOString?kM:vu(om);const NM=EM;function LM(t){var e=new Date(t);return isNaN(e)?null:e}var CM=+new Date("2000-01-01T00:00:00.000Z")?LM:sf(om);const IM=CM;function RM(t){return new Date(t)}function FM(t){return t instanceof Date?+t:+new Date(+t)}function cf(t,e,n,r,i,o,a,u,c,s){var f=Vl(),h=f.invert,l=f.domain,p=s(".%L"),d=s(":%S"),g=s("%I:%M"),m=s("%I %p"),b=s("%a %d"),x=s("%b %d"),_=s("%B"),v=s("%Y");function w(y){return(c(y)<y?p:u(y)<y?d:a(y)<y?g:o(y)<y?m:r(y)<y?i(y)<y?b:x:n(y)<y?_:v)(y)}return f.invert=function(y){return new Date(h(y))},f.domain=function(y){return arguments.length?l(Array.from(y,FM)):l().map(RM)},f.ticks=function(y){var A=l();return t(A[0],A[A.length-1],y??10)},f.tickFormat=function(y,A){return A==null?w:s(A)},f.nice=function(y){var A=l();return(!y||typeof y.range!="function")&&(y=e(A[0],A[A.length-1],y??10)),y?l(l1(A,y)):f},f.copy=function(){return ji(f,cf(t,e,n,r,i,o,a,u,c,s))},f}function zM(){return he.apply(cf(G1,U1,Fe,yu,Rr,Ir,gu,pu,Je,uf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function OM(){return he.apply(cf(z1,O1,ze,bu,Fr,Zi,mu,du,Je,vu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function xu(){var t=0,e=1,n,r,i,o,a=Qt,u=!1,c;function s(h){return h==null||isNaN(h=+h)?c:a(i===0?.5:(h=(o(h)-n)*i,u?Math.max(0,Math.min(1,h)):h))}s.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),s):[t,e]},s.clamp=function(h){return arguments.length?(u=!!h,s):u},s.interpolator=function(h){return arguments.length?(a=h,s):a};function f(h){return function(l){var p,d;return arguments.length?([p,d]=l,a=h(p,d),s):[a(0),a(1)]}}return s.range=f(cn),s.rangeRound=f(ta),s.unknown=function(h){return arguments.length?(c=h,s):c},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),s}}function gn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function am(){var t=dn(xu()(Qt));return t.copy=function(){return gn(t,am())},je.apply(t,arguments)}function um(){var t=Zl(xu()).domain([1,10]);return t.copy=function(){return gn(t,um()).base(t.base())},je.apply(t,arguments)}function sm(){var t=Kl(xu());return t.copy=function(){return gn(t,sm()).constant(t.constant())},je.apply(t,arguments)}function lf(){var t=Ql(xu());return t.copy=function(){return gn(t,lf()).exponent(t.exponent())},je.apply(t,arguments)}function GM(){return lf.apply(null,arguments).exponent(.5)}function cm(){var t=[],e=Qt;function n(r){if(r!=null&&!isNaN(r=+r))return e((wn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(bt),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>oi(t,o/r))},n.copy=function(){return cm(e).domain(t)},je.apply(n,arguments)}function _u(){var t=0,e=.5,n=1,r=1,i,o,a,u,c,s=Qt,f,h=!1,l;function p(g){return isNaN(g=+g)?l:(g=.5+((g=+f(g))-o)*(r*g<r*o?u:c),s(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=f(t=+t),o=f(e=+e),a=f(n=+n),u=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(g){return arguments.length?(h=!!g,p):h},p.interpolator=function(g){return arguments.length?(s=g,p):s};function d(g){return function(m){var b,x,_;return arguments.length?([b,x,_]=m,s=lp(g,[b,x,_]),p):[s(0),s(.5),s(1)]}}return p.range=d(cn),p.rangeRound=d(ta),p.unknown=function(g){return arguments.length?(l=g,p):l},function(g){return f=g,i=g(t),o=g(e),a=g(n),u=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function lm(){var t=dn(_u()(Qt));return t.copy=function(){return gn(t,lm())},je.apply(t,arguments)}function fm(){var t=Zl(_u()).domain([.1,1,10]);return t.copy=function(){return gn(t,fm()).base(t.base())},je.apply(t,arguments)}function hm(){var t=Kl(_u());return t.copy=function(){return gn(t,hm()).constant(t.constant())},je.apply(t,arguments)}function ff(){var t=Ql(_u());return t.copy=function(){return gn(t,ff()).exponent(t.exponent())},je.apply(t,arguments)}function UM(){return ff.apply(null,arguments).exponent(.5)}function tt(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const YM=tt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),BM=tt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),qM=tt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),WM=tt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),HM=tt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),XM=tt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),VM=tt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),jM=tt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),ZM=tt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),KM=tt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),QM=tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),gt=t=>j0(t[t.length-1]);var pm=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(tt);const JM=gt(pm);var dm=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(tt);const tS=gt(dm);var gm=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(tt);const eS=gt(gm);var mm=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(tt);const nS=gt(mm);var ym=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(tt);const rS=gt(ym);var bm=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(tt);const iS=gt(bm);var vm=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(tt);const oS=gt(vm);var xm=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(tt);const aS=gt(xm);var _m=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(tt);const uS=gt(_m);var wm=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(tt);const sS=gt(wm);var Am=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(tt);const cS=gt(Am);var $m=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(tt);const lS=gt($m);var Mm=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(tt);const fS=gt(Mm);var Sm=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(tt);const hS=gt(Sm);var Tm=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(tt);const pS=gt(Tm);var Pm=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(tt);const dS=gt(Pm);var Dm=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(tt);const gS=gt(Dm);var km=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(tt);const mS=gt(km);var Em=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(tt);const yS=gt(Em);var Nm=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(tt);const bS=gt(Nm);var Lm=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(tt);const vS=gt(Lm);var Cm=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(tt);const xS=gt(Cm);var Im=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(tt);const _S=gt(Im);var Rm=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(tt);const wS=gt(Rm);var Fm=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(tt);const AS=gt(Fm);var zm=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(tt);const $S=gt(zm);var Om=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(tt);const MS=gt(Om);function SS(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const TS=na(be(300,.5,0),be(-240,.5,1));var PS=na(be(-100,.75,.35),be(80,1.5,.8)),DS=na(be(260,.75,.35),be(80,1.5,.8)),wu=be();function kS(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return wu.h=360*t-100,wu.s=1.5-1.5*e,wu.l=.8-.9*e,wu+""}var Au=pr(),ES=Math.PI/3,NS=Math.PI*2/3;function LS(t){var e;return t=(.5-t)*Math.PI,Au.r=255*(e=Math.sin(t))*e,Au.g=255*(e=Math.sin(t+ES))*e,Au.b=255*(e=Math.sin(t+NS))*e,Au+""}function CS(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function $u(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const IS=$u(tt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var RS=$u(tt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),FS=$u(tt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),zS=$u(tt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function J(t){return function(){return t}}const Gm=Math.abs,Gt=Math.atan2,tn=Math.cos,OS=Math.max,Or=Math.min,re=Math.sin,yt=Math.sqrt,Ut=1e-12,mn=Math.PI,Mu=mn/2,yn=2*mn;function GS(t){return t>1?0:t<-1?mn:Math.acos(t)}function Um(t){return t>=1?Mu:t<=-1?-Mu:Math.asin(t)}function no(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new wi(e)}function US(t){return t.innerRadius}function YS(t){return t.outerRadius}function BS(t){return t.startAngle}function qS(t){return t.endAngle}function WS(t){return t&&t.padAngle}function HS(t,e,n,r,i,o,a,u){var c=n-t,s=r-e,f=a-i,h=u-o,l=h*c-f*s;if(!(l*l<Ut))return l=(f*(e-o)-h*(t-i))/l,[t+l*c,e+l*s]}function Su(t,e,n,r,i,o,a){var u=t-n,c=e-r,s=(a?o:-o)/yt(u*u+c*c),f=s*c,h=-s*u,l=t+f,p=e+h,d=n+f,g=r+h,m=(l+d)/2,b=(p+g)/2,x=d-l,_=g-p,v=x*x+_*_,w=i-o,y=l*g-d*p,A=(_<0?-1:1)*yt(OS(0,w*w*v-y*y)),M=(y*_-x*A)/v,$=(-y*x-_*A)/v,P=(y*_+x*A)/v,S=(-y*x+_*A)/v,L=M-m,E=$-b,T=P-m,k=S-b;return L*L+E*E>T*T+k*k&&(M=P,$=S),{cx:M,cy:$,x01:-f,y01:-h,x11:M*(i/w-1),y11:$*(i/w-1)}}function Ym(){var t=US,e=YS,n=J(0),r=null,i=BS,o=qS,a=WS,u=null,c=no(s);function s(){var f,h,l=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-Mu,g=o.apply(this,arguments)-Mu,m=Gm(g-d),b=g>d;if(u||(u=f=c()),p<l&&(h=p,p=l,l=h),!(p>Ut))u.moveTo(0,0);else if(m>yn-Ut)u.moveTo(p*tn(d),p*re(d)),u.arc(0,0,p,d,g,!b),l>Ut&&(u.moveTo(l*tn(g),l*re(g)),u.arc(0,0,l,g,d,b));else{var x=d,_=g,v=d,w=g,y=m,A=m,M=a.apply(this,arguments)/2,$=M>Ut&&(r?+r.apply(this,arguments):yt(l*l+p*p)),P=Or(Gm(p-l)/2,+n.apply(this,arguments)),S=P,L=P,E,T;if($>Ut){var k=Um($/l*re(M)),D=Um($/p*re(M));(y-=k*2)>Ut?(k*=b?1:-1,v+=k,w-=k):(y=0,v=w=(d+g)/2),(A-=D*2)>Ut?(D*=b?1:-1,x+=D,_-=D):(A=0,x=_=(d+g)/2)}var N=p*tn(x),I=p*re(x),C=l*tn(w),z=l*re(w);if(P>Ut){var Y=p*tn(_),W=p*re(_),st=l*tn(v),rt=l*re(v),at;if(m<mn)if(at=HS(N,I,st,rt,Y,W,C,z)){var _t=N-at[0],ct=I-at[1],St=Y-at[0],G=W-at[1],Q=1/re(GS((_t*St+ct*G)/(yt(_t*_t+ct*ct)*yt(St*St+G*G)))/2),ot=yt(at[0]*at[0]+at[1]*at[1]);S=Or(P,(l-ot)/(Q-1)),L=Or(P,(p-ot)/(Q+1))}else S=L=0}A>Ut?L>Ut?(E=Su(st,rt,N,I,p,L,b),T=Su(Y,W,C,z,p,L,b),u.moveTo(E.cx+E.x01,E.cy+E.y01),L<P?u.arc(E.cx,E.cy,L,Gt(E.y01,E.x01),Gt(T.y01,T.x01),!b):(u.arc(E.cx,E.cy,L,Gt(E.y01,E.x01),Gt(E.y11,E.x11),!b),u.arc(0,0,p,Gt(E.cy+E.y11,E.cx+E.x11),Gt(T.cy+T.y11,T.cx+T.x11),!b),u.arc(T.cx,T.cy,L,Gt(T.y11,T.x11),Gt(T.y01,T.x01),!b))):(u.moveTo(N,I),u.arc(0,0,p,x,_,!b)):u.moveTo(N,I),!(l>Ut)||!(y>Ut)?u.lineTo(C,z):S>Ut?(E=Su(C,z,Y,W,l,-S,b),T=Su(N,I,st,rt,l,-S,b),u.lineTo(E.cx+E.x01,E.cy+E.y01),S<P?u.arc(E.cx,E.cy,S,Gt(E.y01,E.x01),Gt(T.y01,T.x01),!b):(u.arc(E.cx,E.cy,S,Gt(E.y01,E.x01),Gt(E.y11,E.x11),!b),u.arc(0,0,l,Gt(E.cy+E.y11,E.cx+E.x11),Gt(T.cy+T.y11,T.cx+T.x11),b),u.arc(T.cx,T.cy,S,Gt(T.y11,T.x11),Gt(T.y01,T.x01),!b))):u.arc(0,0,l,w,v,b)}if(u.closePath(),f)return u=null,f+""||null}return s.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-mn/2;return[tn(h)*f,re(h)*f]},s.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:J(+f),s):t},s.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:J(+f),s):e},s.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:J(+f),s):n},s.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:J(+f),s):r},s.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:J(+f),s):i},s.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:J(+f),s):o},s.padAngle=function(f){return arguments.length?(a=typeof f=="function"?f:J(+f),s):a},s.context=function(f){return arguments.length?(u=f??null,s):u},s}var XS=Array.prototype.slice;function Tu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Bm(t){this._context=t}Bm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Pu(t){return new Bm(t)}function hf(t){return t[0]}function pf(t){return t[1]}function Du(t,e){var n=J(!0),r=null,i=Pu,o=null,a=no(u);t=typeof t=="function"?t:t===void 0?hf:J(t),e=typeof e=="function"?e:e===void 0?pf:J(e);function u(c){var s,f=(c=Tu(c)).length,h,l=!1,p;for(r==null&&(o=i(p=a())),s=0;s<=f;++s)!(s<f&&n(h=c[s],s,c))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(h,s,c),+e(h,s,c));if(p)return o=null,p+""||null}return u.x=function(c){return arguments.length?(t=typeof c=="function"?c:J(+c),u):t},u.y=function(c){return arguments.length?(e=typeof c=="function"?c:J(+c),u):e},u.defined=function(c){return arguments.length?(n=typeof c=="function"?c:J(!!c),u):n},u.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),u):i},u.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),u):r},u}function qm(t,e,n){var r=null,i=J(!0),o=null,a=Pu,u=null,c=no(s);t=typeof t=="function"?t:t===void 0?hf:J(+t),e=typeof e=="function"?e:J(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?pf:J(+n);function s(h){var l,p,d,g=(h=Tu(h)).length,m,b=!1,x,_=new Array(g),v=new Array(g);for(o==null&&(u=a(x=c())),l=0;l<=g;++l){if(!(l<g&&i(m=h[l],l,h))===b)if(b=!b)p=l,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),d=l-1;d>=p;--d)u.point(_[d],v[d]);u.lineEnd(),u.areaEnd()}b&&(_[l]=+t(m,l,h),v[l]=+e(m,l,h),u.point(r?+r(m,l,h):_[l],n?+n(m,l,h):v[l]))}if(x)return u=null,x+""||null}function f(){return Du().defined(i).curve(a).context(o)}return s.x=function(h){return arguments.length?(t=typeof h=="function"?h:J(+h),r=null,s):t},s.x0=function(h){return arguments.length?(t=typeof h=="function"?h:J(+h),s):t},s.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:J(+h),s):r},s.y=function(h){return arguments.length?(e=typeof h=="function"?h:J(+h),n=null,s):e},s.y0=function(h){return arguments.length?(e=typeof h=="function"?h:J(+h),s):e},s.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:J(+h),s):n},s.lineX0=s.lineY0=function(){return f().x(t).y(e)},s.lineY1=function(){return f().x(t).y(n)},s.lineX1=function(){return f().x(r).y(e)},s.defined=function(h){return arguments.length?(i=typeof h=="function"?h:J(!!h),s):i},s.curve=function(h){return arguments.length?(a=h,o!=null&&(u=a(o)),s):a},s.context=function(h){return arguments.length?(h==null?o=u=null:u=a(o=h),s):o},s}function VS(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function jS(t){return t}function Wm(){var t=jS,e=VS,n=null,r=J(0),i=J(yn),o=J(0);function a(u){var c,s=(u=Tu(u)).length,f,h,l=0,p=new Array(s),d=new Array(s),g=+r.apply(this,arguments),m=Math.min(yn,Math.max(-yn,i.apply(this,arguments)-g)),b,x=Math.min(Math.abs(m)/s,o.apply(this,arguments)),_=x*(m<0?-1:1),v;for(c=0;c<s;++c)(v=d[p[c]=c]=+t(u[c],c,u))>0&&(l+=v);for(e!=null?p.sort(function(w,y){return e(d[w],d[y])}):n!=null&&p.sort(function(w,y){return n(u[w],u[y])}),c=0,h=l?(m-s*_)/l:0;c<s;++c,g=b)f=p[c],v=d[f],b=g+(v>0?v*h:0)+_,d[f]={data:u[f],index:c,value:v,startAngle:g,endAngle:b,padAngle:x};return d}return a.value=function(u){return arguments.length?(t=typeof u=="function"?u:J(+u),a):t},a.sortValues=function(u){return arguments.length?(e=u,n=null,a):e},a.sort=function(u){return arguments.length?(n=u,e=null,a):n},a.startAngle=function(u){return arguments.length?(r=typeof u=="function"?u:J(+u),a):r},a.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:J(+u),a):i},a.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:J(+u),a):o},a}var Hm=df(Pu);function Xm(t){this._curve=t}Xm.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function df(t){function e(n){return new Xm(t(n))}return e._curve=t,e}function ro(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(df(n)):e()._curve},t}function Vm(){return ro(Du().curve(Hm))}function jm(){var t=qm().curve(Hm),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return ro(n())},delete t.lineX0,t.lineEndAngle=function(){return ro(r())},delete t.lineX1,t.lineInnerRadius=function(){return ro(i())},delete t.lineY0,t.lineOuterRadius=function(){return ro(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(df(a)):e()._curve},t}function io(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Zm{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class ZS{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=io(this._x0,this._y0),i=io(this._x0,this._y0=(this._y0+n)/2),o=io(e,this._y0),a=io(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Km(t){return new Zm(t,!0)}function Qm(t){return new Zm(t,!1)}function KS(t){return new ZS(t)}function QS(t){return t.source}function JS(t){return t.target}function ku(t){let e=QS,n=JS,r=hf,i=pf,o=null,a=null,u=no(c);function c(){let s;const f=XS.call(arguments),h=e.apply(this,f),l=n.apply(this,f);if(o==null&&(a=t(s=u())),a.lineStart(),f[0]=h,a.point(+r.apply(this,f),+i.apply(this,f)),f[0]=l,a.point(+r.apply(this,f),+i.apply(this,f)),a.lineEnd(),s)return a=null,s+""||null}return c.source=function(s){return arguments.length?(e=s,c):e},c.target=function(s){return arguments.length?(n=s,c):n},c.x=function(s){return arguments.length?(r=typeof s=="function"?s:J(+s),c):r},c.y=function(s){return arguments.length?(i=typeof s=="function"?s:J(+s),c):i},c.context=function(s){return arguments.length?(s==null?o=a=null:a=t(o=s),c):o},c}function t9(){return ku(Km)}function e9(){return ku(Qm)}function n9(){const t=ku(KS);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const r9=yt(3),Jm={draw(t,e){const n=yt(e+Or(e/28,.75))*.59436,r=n/2,i=r*r9;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},Eu={draw(t,e){const n=yt(e/mn);t.moveTo(n,0),t.arc(0,0,n,0,yn)}},ty={draw(t,e){const n=yt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},ey=yt(1/3),i9=ey*2,ny={draw(t,e){const n=yt(e/i9),r=n*ey;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},ry={draw(t,e){const n=yt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},iy={draw(t,e){const n=yt(e-Or(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},oy={draw(t,e){const n=yt(e),r=-n/2;t.rect(r,r,n,n)}},ay={draw(t,e){const n=yt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},o9=.8908130915292852,uy=re(mn/10)/re(7*mn/10),a9=re(yn/10)*uy,u9=-tn(yn/10)*uy,sy={draw(t,e){const n=yt(e*o9),r=a9*n,i=u9*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=yn*o/5,u=tn(a),c=re(a);t.lineTo(c*n,-u*n),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},gf=yt(3),cy={draw(t,e){const n=-yt(e/(gf*3));t.moveTo(0,n*2),t.lineTo(-gf*n,-n),t.lineTo(gf*n,-n),t.closePath()}},s9=yt(3),ly={draw(t,e){const n=yt(e)*.6824,r=n/2,i=n*s9/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},de=-.5,ge=yt(3)/2,mf=1/yt(12),c9=(mf/2+1)*3,fy={draw(t,e){const n=yt(e/c9),r=n/2,i=n*mf,o=r,a=n*mf+n,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(de*r-ge*i,ge*r+de*i),t.lineTo(de*o-ge*a,ge*o+de*a),t.lineTo(de*u-ge*c,ge*u+de*c),t.lineTo(de*r+ge*i,de*i-ge*r),t.lineTo(de*o+ge*a,de*a-ge*o),t.lineTo(de*u+ge*c,de*c-ge*u),t.closePath()}},yf={draw(t,e){const n=yt(e-Or(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},hy=[Eu,ty,ny,oy,sy,cy,fy],l9=[Eu,iy,yf,ly,Jm,ay,ry];function f9(t,e){let n=null,r=no(i);t=typeof t=="function"?t:J(t||Eu),e=typeof e=="function"?e:J(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:J(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:J(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function bn(){}function Nu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Lu(t){this._context=t}Lu.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:Nu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Nu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function h9(t){return new Lu(t)}function py(t){this._context=t}py.prototype={areaStart:bn,areaEnd:bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Nu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function p9(t){return new py(t)}function dy(t){this._context=t}dy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Nu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function d9(t){return new dy(t)}function gy(t,e){this._basis=new Lu(t),this._beta=e}gy.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,u=-1,c;++u<=n;)c=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(r+c*o),this._beta*e[u]+(1-this._beta)*(i+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const g9=function t(e){function n(r){return e===1?new Lu(r):new gy(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function Cu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function bf(t,e){this._context=t,this._k=(1-e)/6}bf.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:Cu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Cu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const m9=function t(e){function n(r){return new bf(r,e)}return n.tension=function(r){return t(+r)},n}(0);function vf(t,e){this._context=t,this._k=(1-e)/6}vf.prototype={areaStart:bn,areaEnd:bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Cu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const y9=function t(e){function n(r){return new vf(r,e)}return n.tension=function(r){return t(+r)},n}(0);function xf(t,e){this._context=t,this._k=(1-e)/6}xf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Cu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const b9=function t(e){function n(r){return new xf(r,e)}return n.tension=function(r){return t(+r)},n}(0);function _f(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ut){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ut){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-e*t._l12_2a)/f,a=(a*s+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function my(t,e){this._context=t,this._alpha=e}my.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:_f(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const v9=function t(e){function n(r){return e?new my(r,e):new bf(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function yy(t,e){this._context=t,this._alpha=e}yy.prototype={areaStart:bn,areaEnd:bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:_f(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const x9=function t(e){function n(r){return e?new yy(r,e):new vf(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function by(t,e){this._context=t,this._alpha=e}by.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_f(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _9=function t(e){function n(r){return e?new by(r,e):new xf(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function vy(t){this._context=t}vy.prototype={areaStart:bn,areaEnd:bn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function w9(t){return new vy(t)}function xy(t){return t<0?-1:1}function _y(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(xy(o)+xy(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function wy(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function wf(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*e,o-u,a-u*n,o,a)}function Iu(t){this._context=t}Iu.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:wf(this,this._t0,wy(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,wf(this,wy(this,n=_y(this,t,e)),n);break;default:wf(this,this._t0,n=_y(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Ay(t){this._context=new $y(t)}(Ay.prototype=Object.create(Iu.prototype)).point=function(t,e){Iu.prototype.point.call(this,e,t)};function $y(t){this._context=t}$y.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function A9(t){return new Iu(t)}function $9(t){return new Ay(t)}function My(t){this._context=t}My.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Sy(t),i=Sy(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Sy(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function M9(t){return new My(t)}function Ru(t,e){this._context=t,this._t=e}Ru.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function S9(t){return new Ru(t,.5)}function T9(t){return new Ru(t,0)}function P9(t){return new Ru(t,1)}function Gr(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,u=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Ur(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function D9(t,e){return t[e]}function k9(t){const e=[];return e.key=t,e}function E9(){var t=J([]),e=Ur,n=Gr,r=D9;function i(o){var a=Array.from(t.apply(this,arguments),k9),u,c=a.length,s=-1,f;for(const h of o)for(u=0,++s;u<c;++u)(a[u][s]=[0,+r(h,a[u].key,s,o)]).data=h;for(u=0,f=Tu(e(a));u<c;++u)a[f[u]].index=u;return n(a,f),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:J(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?Ur:typeof o=="function"?o:J(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??Gr,i):n},i}function N9(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}Gr(t,e)}}function L9(t,e){if((c=t.length)>0)for(var n,r=0,i,o,a,u,c,s=t[e[0]].length;r<s;++r)for(a=u=0,n=0;n<c;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=u,i[0]=u+=o):(i[0]=0,i[1]=o)}function C9(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,u=0;a<i;++a)u+=t[a][n][1]||0;r[n][1]+=r[n][0]=-u/2}Gr(t,e)}}function I9(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var u=0,c=0,s=0;u<a;++u){for(var f=t[e[u]],h=f[r][1]||0,l=f[r-1][1]||0,p=(h-l)/2,d=0;d<u;++d){var g=t[e[d]],m=g[r][1]||0,b=g[r-1][1]||0;p+=m-b}c+=h,s+=p*h}i[r-1][1]+=i[r-1][0]=n,c&&(n-=s/c)}i[r-1][1]+=i[r-1][0]=n,Gr(t,e)}}function Ty(t){var e=t.map(R9);return Ur(t).sort(function(n,r){return e[n]-e[r]})}function R9(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function Py(t){var e=t.map(Dy);return Ur(t).sort(function(n,r){return e[n]-e[r]})}function Dy(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function F9(t){return Py(t).reverse()}function z9(t){var e=t.length,n,r,i=t.map(Dy),o=Ty(t),a=0,u=0,c=[],s=[];for(n=0;n<e;++n)r=o[n],a<u?(a+=i[r],c.push(r)):(u+=i[r],s.push(r));return s.reverse().concat(c)}function O9(t){return Ur(t).reverse()}const Fu=t=>()=>t;function G9(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Oe(t,e,n){this.k=t,this.x=e,this.y=n}Oe.prototype={constructor:Oe,scale:function(t){return t===1?this:new Oe(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Oe(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zu=new Oe(1,0,0);ky.prototype=Oe.prototype;function ky(t){for(;!t.__zoom;)if(!(t=t.parentNode))return zu;return t.__zoom}function Af(t){t.stopImmediatePropagation()}function oo(t){t.preventDefault(),t.stopImmediatePropagation()}function U9(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Y9(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Ey(){return this.__zoom||zu}function B9(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function q9(){return navigator.maxTouchPoints||"ontouchstart"in this}function W9(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Ny(){var t=U9,e=Y9,n=W9,r=B9,i=q9,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,c=ap,s=Sn("start","zoom","end"),f,h,l,p=500,d=150,g=0,m=10;function b(T){T.property("__zoom",Ey).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(T,k,D,N){var I=T.selection?T.selection():T;I.property("__zoom",Ey),T!==I?w(T,k,D,N):I.interrupt().each(function(){y(this,arguments).event(N).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},b.scaleBy=function(T,k,D,N){b.scaleTo(T,function(){var I=this.__zoom.k,C=typeof k=="function"?k.apply(this,arguments):k;return I*C},D,N)},b.scaleTo=function(T,k,D,N){b.transform(T,function(){var I=e.apply(this,arguments),C=this.__zoom,z=D==null?v(I):typeof D=="function"?D.apply(this,arguments):D,Y=C.invert(z),W=typeof k=="function"?k.apply(this,arguments):k;return n(_(x(C,W),z,Y),I,a)},D,N)},b.translateBy=function(T,k,D,N){b.transform(T,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof D=="function"?D.apply(this,arguments):D),e.apply(this,arguments),a)},null,N)},b.translateTo=function(T,k,D,N,I){b.transform(T,function(){var C=e.apply(this,arguments),z=this.__zoom,Y=N==null?v(C):typeof N=="function"?N.apply(this,arguments):N;return n(zu.translate(Y[0],Y[1]).scale(z.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof D=="function"?-D.apply(this,arguments):-D),C,a)},N,I)};function x(T,k){return k=Math.max(o[0],Math.min(o[1],k)),k===T.k?T:new Oe(k,T.x,T.y)}function _(T,k,D){var N=k[0]-D[0]*T.k,I=k[1]-D[1]*T.k;return N===T.x&&I===T.y?T:new Oe(T.k,N,I)}function v(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function w(T,k,D,N){T.on("start.zoom",function(){y(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){y(this,arguments).event(N).end()}).tween("zoom",function(){var I=this,C=arguments,z=y(I,C).event(N),Y=e.apply(I,C),W=D==null?v(Y):typeof D=="function"?D.apply(I,C):D,st=Math.max(Y[1][0]-Y[0][0],Y[1][1]-Y[0][1]),rt=I.__zoom,at=typeof k=="function"?k.apply(I,C):k,_t=c(rt.invert(W).concat(st/rt.k),at.invert(W).concat(st/at.k));return function(ct){if(ct===1)ct=at;else{var St=_t(ct),G=st/St[2];ct=new Oe(G,W[0]-St[0]*G,W[1]-St[1]*G)}z.zoom(null,ct)}})}function y(T,k,D){return!D&&T.__zooming||new A(T,k)}function A(T,k){this.that=T,this.args=k,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,k),this.taps=0}A.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,k){return this.mouse&&T!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var k=j(this.that).datum();s.call(T,this.that,new G9(T,{sourceEvent:this.sourceEvent,target:b,type:T,transform:this.that.__zoom,dispatch:s}),k)}};function M(T,...k){if(!t.apply(this,arguments))return;var D=y(this,k).event(T),N=this.__zoom,I=Math.max(o[0],Math.min(o[1],N.k*Math.pow(2,r.apply(this,arguments)))),C=oe(T);if(D.wheel)(D.mouse[0][0]!==C[0]||D.mouse[0][1]!==C[1])&&(D.mouse[1]=N.invert(D.mouse[0]=C)),clearTimeout(D.wheel);else{if(N.k===I)return;D.mouse=[C,N.invert(C)],Cn(this),D.start()}oo(T),D.wheel=setTimeout(z,d),D.zoom("mouse",n(_(x(N,I),D.mouse[0],D.mouse[1]),D.extent,a));function z(){D.wheel=null,D.end()}}function $(T,...k){if(l||!t.apply(this,arguments))return;var D=T.currentTarget,N=y(this,k,!0).event(T),I=j(T.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",st,!0),C=oe(T,D),z=T.clientX,Y=T.clientY;Uo(T.view),Af(T),N.mouse=[C,this.__zoom.invert(C)],Cn(this),N.start();function W(rt){if(oo(rt),!N.moved){var at=rt.clientX-z,_t=rt.clientY-Y;N.moved=at*at+_t*_t>g}N.event(rt).zoom("mouse",n(_(N.that.__zoom,N.mouse[0]=oe(rt,D),N.mouse[1]),N.extent,a))}function st(rt){I.on("mousemove.zoom mouseup.zoom",null),Yo(rt.view,N.moved),oo(rt),N.event(rt).end()}}function P(T,...k){if(t.apply(this,arguments)){var D=this.__zoom,N=oe(T.changedTouches?T.changedTouches[0]:T,this),I=D.invert(N),C=D.k*(T.shiftKey?.5:2),z=n(_(x(D,C),N,I),e.apply(this,k),a);oo(T),u>0?j(this).transition().duration(u).call(w,z,N,T):j(this).call(b.transform,z,N,T)}}function S(T,...k){if(t.apply(this,arguments)){var D=T.touches,N=D.length,I=y(this,k,T.changedTouches.length===N).event(T),C,z,Y,W;for(Af(T),z=0;z<N;++z)Y=D[z],W=oe(Y,this),W=[W,this.__zoom.invert(W),Y.identifier],I.touch0?!I.touch1&&I.touch0[2]!==W[2]&&(I.touch1=W,I.taps=0):(I.touch0=W,C=!0,I.taps=1+!!f);f&&(f=clearTimeout(f)),C&&(I.taps<2&&(h=W[0],f=setTimeout(function(){f=null},p)),Cn(this),I.start())}}function L(T,...k){if(this.__zooming){var D=y(this,k).event(T),N=T.changedTouches,I=N.length,C,z,Y,W;for(oo(T),C=0;C<I;++C)z=N[C],Y=oe(z,this),D.touch0&&D.touch0[2]===z.identifier?D.touch0[0]=Y:D.touch1&&D.touch1[2]===z.identifier&&(D.touch1[0]=Y);if(z=D.that.__zoom,D.touch1){var st=D.touch0[0],rt=D.touch0[1],at=D.touch1[0],_t=D.touch1[1],ct=(ct=at[0]-st[0])*ct+(ct=at[1]-st[1])*ct,St=(St=_t[0]-rt[0])*St+(St=_t[1]-rt[1])*St;z=x(z,Math.sqrt(ct/St)),Y=[(st[0]+at[0])/2,(st[1]+at[1])/2],W=[(rt[0]+_t[0])/2,(rt[1]+_t[1])/2]}else if(D.touch0)Y=D.touch0[0],W=D.touch0[1];else return;D.zoom("touch",n(_(z,Y,W),D.extent,a))}}function E(T,...k){if(this.__zooming){var D=y(this,k).event(T),N=T.changedTouches,I=N.length,C,z;for(Af(T),l&&clearTimeout(l),l=setTimeout(function(){l=null},p),C=0;C<I;++C)z=N[C],D.touch0&&D.touch0[2]===z.identifier?delete D.touch0:D.touch1&&D.touch1[2]===z.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&&(z=oe(z,this),Math.hypot(h[0]-z[0],h[1]-z[1])<m)){var Y=j(this).on("dblclick.zoom");Y&&Y.apply(this,arguments)}}}return b.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:Fu(+T),b):r},b.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Fu(!!T),b):t},b.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Fu(!!T),b):i},b.extent=function(T){return arguments.length?(e=typeof T=="function"?T:Fu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),b):e},b.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],b):[o[0],o[1]]},b.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],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(T){return arguments.length?(n=T,b):n},b.duration=function(T){return arguments.length?(u=+T,b):u},b.interpolate=function(T){return arguments.length?(c=T,b):c},b.on=function(){var T=s.on.apply(s,arguments);return T===s?b:T},b.clickDistance=function(T){return arguments.length?(g=(T=+T)*T,b):Math.sqrt(g)},b.tapDistance=function(T){return arguments.length?(m=+T,b):m},b}const Ly=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Cc,FormatSpecifier:wa,InternMap:ni,InternSet:An,Node:qn,Path:wi,Voronoi:Vp,ZoomTransform:Oe,active:V5,arc:Ym,area:qm,areaRadial:jm,ascending:bt,autoType:b8,axisBottom:Gx,axisLeft:Is,axisRight:Ox,axisTop:s0,bin:Qh,bisect:wn,bisectCenter:Iv,bisectLeft:Cv,bisectRight:Fh,bisector:To,blob:_8,blur:Rv,blur2:zh,blurImage:Fv,brush:u6,brushSelection:i6,brushX:o6,brushY:a6,buffer:A8,chord:c6,chordDirected:f6,chordTranspose:l6,cluster:I7,color:sn,contourDensity:F6,contours:Dc,count:Do,create:_w,creator:zo,cross:qv,csv:S8,csvFormat:u8,csvFormatBody:s8,csvFormatRow:l8,csvFormatRows:c8,csvFormatValue:f8,csvParse:Qp,csvParseRows:a8,cubehelix:be,cumsum:Wv,curveBasis:h9,curveBasisClosed:p9,curveBasisOpen:d9,curveBumpX:Km,curveBumpY:Qm,curveBundle:g9,curveCardinal:m9,curveCardinalClosed:y9,curveCardinalOpen:b9,curveCatmullRom:v9,curveCatmullRomClosed:x9,curveCatmullRomOpen:_9,curveLinear:Pu,curveLinearClosed:w9,curveMonotoneX:A9,curveMonotoneY:$9,curveNatural:M9,curveStep:S9,curveStepAfter:P9,curveStepBefore:T9,descending:Ih,deviation:Uh,difference:Tx,disjoint:Px,dispatch:Sn,drag:x0,dragDisable:Uo,dragEnable:Yo,dsv:M8,dsvFormat:ba,easeBack:Pp,easeBackIn:G5,easeBackInOut:Pp,easeBackOut:U5,easeBounce:xi,easeBounceIn:z5,easeBounceInOut:O5,easeBounceOut:xi,easeCircle:Tp,easeCircleIn:P5,easeCircleInOut:Tp,easeCircleOut:D5,easeCubic:vi,easeCubicIn:x5,easeCubicInOut:vi,easeCubicOut:_5,easeElastic:fa,easeElasticIn:Y5,easeElasticInOut:B5,easeElasticOut:fa,easeExp:Sp,easeExpIn:S5,easeExpInOut:Sp,easeExpOut:T5,easeLinear:y5,easePoly:wp,easePolyIn:w5,easePolyInOut:wp,easePolyOut:A5,easeQuad:_p,easeQuadIn:b5,easeQuadInOut:_p,easeQuadOut:v5,easeSin:Mp,easeSinIn:$5,easeSinInOut:Mp,easeSinOut:M5,every:_x,extent:ei,fcumsum:Xv,filter:Ax,flatGroup:Vv,flatRollup:jv,forceCenter:C8,forceCollide:rd,forceLink:t4,forceManyBody:ud,forceRadial:s4,forceSimulation:ad,forceX:sd,forceY:cd,get format(){return Si},formatDefaultLocale:yd,formatLocale:md,get formatPrefix(){return Gc},formatSpecifier:Mr,fsum:Hv,geoAlbers:Eg,geoAlbersUsa:p7,geoArea:b4,geoAzimuthalEqualArea:d7,geoAzimuthalEqualAreaRaw:Ml,geoAzimuthalEquidistant:g7,geoAzimuthalEquidistantRaw:Sl,geoBounds:w4,geoCentroid:P4,geoCircle:D4,geoClipAntimeridian:il,geoClipCircle:Jd,geoClipExtent:R4,geoClipRectangle:qa,geoConicConformal:y7,geoConicConformalRaw:Cg,geoConicEqualArea:nu,geoConicEqualAreaRaw:kg,geoConicEquidistant:v7,geoConicEquidistantRaw:Ig,geoContains:B4,geoDistance:Xa,geoEqualEarth:_7,geoEqualEarthRaw:Tl,geoEquirectangular:b7,geoEquirectangularRaw:Yi,geoGnomonic:w7,geoGnomonicRaw:Pl,geoGraticule:cg,geoGraticule10:q4,geoIdentity:A7,geoInterpolate:W4,geoLength:tg,geoMercator:m7,geoMercatorRaw:Ui,geoNaturalEarth1:$7,geoNaturalEarth1Raw:Dl,geoOrthographic:M7,geoOrthographicRaw:kl,geoPath:r7,geoProjection:Re,geoProjectionMutator:Al,geoRotation:Wd,geoStereographic:S7,geoStereographicRaw:El,geoStream:xe,geoTransform:i7,geoTransverseMercator:T7,geoTransverseMercatorRaw:Nl,gray:Uw,greatest:Jh,greatestIndex:gx,group:Wh,groupSort:Qv,groups:Hh,hcl:Zo,hierarchy:Ll,histogram:Qh,hsl:Ho,html:N8,image:P8,index:Zv,indexes:Kv,interpolate:cn,interpolateArray:Xw,interpolateBasis:W0,interpolateBasisClosed:H0,interpolateBlues:xS,interpolateBrBG:JM,interpolateBuGn:sS,interpolateBuPu:cS,interpolateCividis:SS,interpolateCool:DS,interpolateCubehelix:s3,interpolateCubehelixDefault:TS,interpolateCubehelixLong:na,interpolateDate:Q0,interpolateDiscrete:Zw,interpolateGnBu:lS,interpolateGreens:_S,interpolateGreys:wS,interpolateHcl:a3,interpolateHclLong:u3,interpolateHsl:r3,interpolateHslLong:i3,interpolateHue:Kw,interpolateInferno:FS,interpolateLab:o3,interpolateMagma:RS,interpolateNumber:ce,interpolateNumberArray:tc,interpolateObject:J0,interpolateOrRd:fS,interpolateOranges:MS,interpolatePRGn:tS,interpolatePiYG:eS,interpolatePlasma:zS,interpolatePuBu:pS,interpolatePuBuGn:hS,interpolatePuOr:nS,interpolatePuRd:dS,interpolatePurples:AS,interpolateRainbow:kS,interpolateRdBu:rS,interpolateRdGy:iS,interpolateRdPu:gS,interpolateRdYlBu:oS,interpolateRdYlGn:aS,interpolateReds:$S,interpolateRgb:hi,interpolateRgbBasis:j0,interpolateRgbBasisClosed:Hw,interpolateRound:ta,interpolateSinebow:LS,interpolateSpectral:uS,interpolateString:rc,interpolateTransformCss:rp,interpolateTransformSvg:ip,interpolateTurbo:CS,interpolateViridis:IS,interpolateWarm:PS,interpolateYlGn:yS,interpolateYlGnBu:mS,interpolateYlOrBr:bS,interpolateYlOrRd:vS,interpolateZoom:ap,interrupt:Cn,intersection:Dx,interval:p3,isoFormat:NM,isoParse:IM,json:k8,lab:jo,lch:Yw,least:dx,leastIndex:n0,line:Du,lineRadial:Vm,link:ku,linkHorizontal:t9,linkRadial:n9,linkVertical:e9,local:b0,map:$x,matcher:Os,max:ri,maxIndex:Es,mean:ax,median:ux,medianIndex:sx,merge:Ls,min:No,minIndex:Ns,mode:lx,namespace:ui,namespaces:Fs,nice:Ds,now:yi,pack:fA,packEnclose:oA,packSiblings:cA,pairs:fx,partition:hA,path:Pc,pathRound:d6,permute:Kh,pie:Wm,piecewise:lp,pointRadial:io,pointer:oe,pointers:Aw,polygonArea:PA,polygonCentroid:DA,polygonContains:LA,polygonHull:NA,polygonLength:CA,precisionFixed:bd,precisionPrefix:vd,precisionRound:xd,quadtree:xa,quantile:oi,quantileIndex:e0,quantileSorted:t0,quantize:c3,quickselect:Lo,radialArea:jm,radialLine:Vm,randomBates:zA,randomBernoulli:UA,randomBeta:r1,randomBinomial:i1,randomCauchy:BA,randomExponential:OA,randomGamma:Yl,randomGeometric:n1,randomInt:RA,randomIrwinHall:e1,randomLcg:VA,randomLogNormal:FA,randomLogistic:qA,randomNormal:Ul,randomPareto:GA,randomPoisson:WA,randomUniform:IA,randomWeibull:YA,range:an,rank:px,reduce:Mx,reverse:Sx,rgb:pr,ribbon:w6,ribbonArrow:A6,rollup:Vh,rollups:jh,scaleBand:Wl,scaleDiverging:lm,scaleDivergingLog:fm,scaleDivergingPow:ff,scaleDivergingSqrt:UM,scaleDivergingSymlog:hm,scaleIdentity:c1,scaleImplicit:Bl,scaleLinear:jl,scaleLog:d1,scaleOrdinal:ql,scalePoint:Hl,scalePow:hu,scaleQuantile:_1,scaleQuantize:w1,scaleRadial:x1,scaleSequential:am,scaleSequentialLog:um,scaleSequentialPow:lf,scaleSequentialQuantile:cm,scaleSequentialSqrt:GM,scaleSequentialSymlog:sm,scaleSqrt:a$,scaleSymlog:y1,scaleThreshold:A1,scaleTime:zM,scaleUtc:OM,scan:mx,schemeAccent:BM,schemeBlues:Cm,schemeBrBG:pm,schemeBuGn:wm,schemeBuPu:Am,schemeCategory10:YM,schemeDark2:qM,schemeGnBu:$m,schemeGreens:Im,schemeGreys:Rm,schemeObservable10:WM,schemeOrRd:Mm,schemeOranges:Om,schemePRGn:dm,schemePaired:HM,schemePastel1:XM,schemePastel2:VM,schemePiYG:gm,schemePuBu:Tm,schemePuBuGn:Sm,schemePuOr:mm,schemePuRd:Pm,schemePurples:Fm,schemeRdBu:ym,schemeRdGy:bm,schemeRdPu:Dm,schemeRdYlBu:vm,schemeRdYlGn:xm,schemeReds:zm,schemeSet1:jM,schemeSet2:ZM,schemeSet3:KM,schemeSpectral:_m,schemeTableau10:QM,schemeYlGn:Em,schemeYlGnBu:km,schemeYlOrBr:Nm,schemeYlOrRd:Lm,select:j,selectAll:$w,selection:Pn,selector:Oo,selectorAll:zs,shuffle:yx,shuffler:r0,some:wx,sort:Ss,stack:E9,stackOffsetDiverging:L9,stackOffsetExpand:N9,stackOffsetNone:Gr,stackOffsetSilhouette:C9,stackOffsetWiggle:I9,stackOrderAppearance:Ty,stackOrderAscending:Py,stackOrderDescending:F9,stackOrderInsideOut:z9,stackOrderNone:Ur,stackOrderReverse:O9,stratify:mA,style:Tn,subset:Ex,sum:bx,superset:o0,svg:L8,symbol:f9,symbolAsterisk:Jm,symbolCircle:Eu,symbolCross:ty,symbolDiamond:ny,symbolDiamond2:ry,symbolPlus:iy,symbolSquare:oy,symbolSquare2:ay,symbolStar:sy,symbolTimes:yf,symbolTriangle:cy,symbolTriangle2:ly,symbolWye:fy,symbolX:yf,symbols:hy,symbolsFill:hy,symbolsStroke:l9,text:va,thresholdFreedmanDiaconis:ix,thresholdScott:ox,thresholdSturges:ks,tickFormat:s1,tickIncrement:Mn,tickStep:Eo,ticks:$n,timeDay:Ir,timeDays:h$,get timeFormat(){return uf},timeFormatDefaultLocale:im,timeFormatLocale:Y1,timeFriday:D1,timeFridays:v$,timeHour:gu,timeHours:l$,timeInterval:Tt,timeMillisecond:Cr,timeMilliseconds:$1,timeMinute:pu,timeMinutes:s$,timeMonday:Ki,timeMondays:g$,timeMonth:yu,timeMonths:T$,get timeParse(){return rm},timeSaturday:k1,timeSaturdays:x$,timeSecond:Je,timeSeconds:S1,timeSunday:Rr,timeSundays:E1,timeThursday:Xn,timeThursdays:b$,timeTickInterval:U1,timeTicks:G1,timeTuesday:T1,timeTuesdays:m$,timeWednesday:P1,timeWednesdays:y$,timeWeek:Rr,timeWeeks:E1,timeYear:Fe,timeYears:D$,timeout:ac,timer:aa,timerFlush:pp,transition:vp,transpose:i0,tree:AA,treemap:$A,treemapBinary:MA,treemapDice:Vi,treemapResquarify:TA,treemapSlice:cu,treemapSliceDice:SA,treemapSquarify:Jg,tsv:T8,tsvFormat:p8,tsvFormatBody:d8,tsvFormatRow:m8,tsvFormatRows:g8,tsvFormatValue:y8,tsvParse:Jp,tsvParseRows:h8,union:Nx,unixDay:rf,unixDays:d$,utcDay:Zi,utcDays:p$,get utcFormat(){return vu},utcFriday:C1,utcFridays:M$,utcHour:mu,utcHours:f$,utcMillisecond:Cr,utcMilliseconds:$1,utcMinute:du,utcMinutes:c$,utcMonday:Qi,utcMondays:_$,utcMonth:bu,utcMonths:P$,get utcParse(){return sf},utcSaturday:I1,utcSaturdays:S$,utcSecond:Je,utcSeconds:S1,utcSunday:Fr,utcSundays:R1,utcThursday:jn,utcThursdays:$$,utcTickInterval:O1,utcTicks:z1,utcTuesday:N1,utcTuesdays:w$,utcWednesday:L1,utcWednesdays:A$,utcWeek:Fr,utcWeeks:R1,utcYear:ze,utcYears:k$,variance:Gh,window:Gs,xml:E8,zip:xx,zoom:Ny,zoomIdentity:zu,zoomTransform:ky},Symbol.toStringTag,{value:"Module"}));var $f=function(t,e){return $f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},$f(t,e)};function ao(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");$f(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function H9(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(f){try{s(r.next(f))}catch(h){a(h)}}function c(f){try{s(r.throw(f))}catch(h){a(h)}}function s(f){f.done?o(f.value):i(f.value).then(u,c)}s((r=r.apply(t,e||[])).next())})}function Cy(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(f){return c([s,f])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(f){s=[6,f],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Yr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function uo(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Ou(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Br(t){return this instanceof Br?(this.v=t,this):new Br(t)}function X9(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},u("next"),u("throw"),u("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function u(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,b){o.push([p,g,m,b])>1||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{s(r[p](d))}catch(g){l(o[0][3],g)}}function s(p){p.value instanceof Br?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function V9(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Yr=="function"?Yr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(u,c){a=t[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(s){o({value:s,done:u})},a)}}typeof SuppressedError=="function"&&SuppressedError;function mt(t){return typeof t=="function"}function Mf(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Sf=Mf(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
1
+ (function(nt,rr){typeof exports=="object"&&typeof module<"u"?rr(exports):typeof define=="function"&&define.amd?define(["exports"],rr):(nt=typeof globalThis<"u"?globalThis:nt||self,rr(nt["orbcharts-plugins-basic"]={}))})(this,function(nt){"use strict";const rr={lineCurve:"curveLinear",lineWidth:2},Ah={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Mh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},$h={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Sh={barWidth:0,barGroupPadding:10,barRadius:!1},Th={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Ph={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},_u={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"},Dh=_u,kh={},Eh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};var wu=function(t,e){return wu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},wu(t,e)};function ei(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function G2(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{u(r.next(f))}catch(h){a(h)}}function c(f){try{u(r.throw(f))}catch(h){a(h)}}function u(f){f.done?o(f.value):i(f.value).then(s,c)}u((r=r.apply(t,e||[])).next())})}function Nh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ir(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ni(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Po(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function or(t){return this instanceof or?(this.v=t,this):new or(t)}function U2(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{u(r[p](d))}catch(g){l(o[0][3],g)}}function u(p){p.value instanceof or?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function B2(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof ir=="function"?ir(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,c){a=t[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(u){o({value:u,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function mt(t){return typeof t=="function"}function Au(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Mu=Au(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
6
2
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
7
- `):"",this.name="UnsubscriptionError",this.errors=n}});function Tf(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Gu=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=Yr(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(mt(f))try{f()}catch(g){o=g instanceof Sf?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=Yr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{Fy(d)}catch(g){o=o??[],g instanceof Sf?o=Ou(Ou([],uo(o)),uo(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new Sf(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Fy(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Tf(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Tf(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Iy=Gu.EMPTY;function Ry(t){return t instanceof Gu||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Fy(t){mt(t)?t():t.unsubscribe()}var zy={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Oy={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ou([t,e],uo(n)))},clearTimeout:function(t){var e=Oy.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Gy(t){Oy.setTimeout(function(){throw t})}function Pf(){}function Uu(t){t()}var Df=function(t){ao(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Ry(n)&&n.add(r)):r.destination=Q9,r}return e.create=function(n,r,i){return new Ef(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Gu),j9=Function.prototype.bind;function kf(t,e){return j9.call(t,e)}var Z9=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Yu(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Yu(r)}else Yu(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Yu(n)}},t}(),Ef=function(t){ao(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var u;o&&zy.useDeprecatedNextContext?(u=Object.create(n),u.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&kf(n.next,u),error:n.error&&kf(n.error,u),complete:n.complete&&kf(n.complete,u)}):a=n}return o.destination=new Z9(a),o}return e}(Df);function Yu(t){Gy(t)}function K9(t){throw t}var Q9={closed:!0,next:Pf,error:K9,complete:Pf},Nf=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function qr(t){return t}function J9(t){return t.length===0?qr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var nt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=eT(e)?e:new Ef(e,n,r);return Uu(function(){var a=i,u=a.operator,c=a.source;o.add(u?u.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Uy(n),new n(function(i,o){var a=new Ef({next:function(u){try{e(u)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Nf]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return J9(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Uy(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Uy(t){var e;return(e=t??zy.Promise)!==null&&e!==void 0?e:Promise}function tT(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function eT(t){return t&&t instanceof Df||tT(t)&&Ry(t)}function nT(t){return mt(t==null?void 0:t.lift)}function we(t){return function(e){if(nT(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function se(t,e,n,r,i){return new rT(t,e,n,r,i)}var rT=function(t){ao(e,t);function e(n,r,i,o,a,u){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=r?function(s){try{r(s)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(s){try{o(s)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(s){n.error(s)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Df),iT=Mf(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),pt=function(t){ao(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Yy(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new iT},e.prototype.next=function(n){var r=this;Uu(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Yr(r.currentObservers),u=a.next();!u.done;u=a.next()){var c=u.value;c.next(n)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Uu(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Uu(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?Iy:(this.currentObservers=null,u.push(n),new Gu(function(){r.currentObservers=null,Tf(u,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new nt;return n.source=this,n},e.create=function(n,r){return new Yy(n,r)},e}(nt),Yy=function(t){ao(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Iy},e}(pt),By=new nt(function(t){return t.complete()});function oT(t){return t&&mt(t.schedule)}function Lf(t){return t[t.length-1]}function aT(t){return mt(Lf(t))?t.pop():void 0}function qy(t){return oT(Lf(t))?t.pop():void 0}function uT(t,e){return typeof Lf(t)=="number"?t.pop():e}var Cf=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Wy(t){return mt(t==null?void 0:t.then)}function Hy(t){return mt(t[Nf])}function Xy(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function Vy(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function sT(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var jy=sT();function Zy(t){return mt(t==null?void 0:t[jy])}function Ky(t){return X9(this,arguments,function(){var n,r,i,o;return Cy(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Br(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Br(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Br(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Qy(t){return mt(t==null?void 0:t.getReader)}function en(t){if(t instanceof nt)return t;if(t!=null){if(Hy(t))return cT(t);if(Cf(t))return lT(t);if(Wy(t))return fT(t);if(Xy(t))return Jy(t);if(Zy(t))return hT(t);if(Qy(t))return pT(t)}throw Vy(t)}function cT(t){return new nt(function(e){var n=t[Nf]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function lT(t){return new nt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function fT(t){return new nt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Gy)})}function hT(t){return new nt(function(e){var n,r;try{for(var i=Yr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Jy(t){return new nt(function(e){dT(t,e).catch(function(n){return e.error(n)})})}function pT(t){return Jy(Ky(t))}function dT(t,e){var n,r,i,o;return H9(this,void 0,void 0,function(){var a,u;return Cy(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=V9(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function vn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function tb(t,e){return e===void 0&&(e=0),we(function(n,r){n.subscribe(se(r,function(i){return vn(r,t,function(){return r.next(i)},e)},function(){return vn(r,t,function(){return r.complete()},e)},function(i){return vn(r,t,function(){return r.error(i)},e)}))})}function eb(t,e){return e===void 0&&(e=0),we(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function gT(t,e){return en(t).pipe(eb(e),tb(e))}function mT(t,e){return en(t).pipe(eb(e),tb(e))}function yT(t,e){return new nt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function bT(t,e){return new nt(function(n){var r;return vn(n,e,function(){r=t[jy](),vn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(u){n.error(u);return}a?n.complete():n.next(o)},0,!0)}),function(){return mt(r==null?void 0:r.return)&&r.return()}})}function nb(t,e){if(!t)throw new Error("Iterable cannot be null");return new nt(function(n){vn(n,e,function(){var r=t[Symbol.asyncIterator]();vn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function vT(t,e){return nb(Ky(t),e)}function xT(t,e){if(t!=null){if(Hy(t))return gT(t,e);if(Cf(t))return yT(t,e);if(Wy(t))return mT(t,e);if(Xy(t))return nb(t,e);if(Zy(t))return bT(t,e);if(Qy(t))return vT(t,e)}throw Vy(t)}function If(t,e){return e?xT(t,e):en(t)}var rb=Mf(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function O(t,e){return we(function(n,r){var i=0;n.subscribe(se(r,function(o){r.next(t.call(e,o,i++))}))})}var _T=Array.isArray;function wT(t,e){return _T(e)?t.apply(void 0,Ou([],uo(e))):t(e)}function ib(t){return O(function(e){return wT(t,e)})}var AT=Array.isArray,$T=Object.getPrototypeOf,MT=Object.prototype,ST=Object.keys;function TT(t){if(t.length===1){var e=t[0];if(AT(e))return{args:e,keys:null};if(PT(e)){var n=ST(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function PT(t){return t&&typeof t=="object"&&$T(t)===MT}function DT(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function q(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=qy(t),r=aT(t),i=TT(t),o=i.args,a=i.keys;if(o.length===0)return If([],n);var u=new nt(kT(o,n,a?function(c){return DT(a,c)}:qr));return r?u.pipe(ib(r)):u}function kT(t,e,n){return n===void 0&&(n=qr),function(r){ob(e,function(){for(var i=t.length,o=new Array(i),a=i,u=i,c=function(f){ob(e,function(){var h=If(t[f],e),l=!1;h.subscribe(se(r,function(p){o[f]=p,l||(l=!0,u--),u||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},s=0;s<i;s++)c(s)},r)}}function ob(t,e,n){t?vn(n,t,e):e()}function ET(t,e,n,r,i,o,a,u){var c=[],s=0,f=0,h=!1,l=function(){h&&!c.length&&!s&&e.complete()},p=function(g){return s<r?d(g):c.push(g)},d=function(g){s++;var m=!1;en(n(g,f++)).subscribe(se(e,function(b){e.next(b)},function(){m=!0},void 0,function(){if(m)try{s--;for(var b=function(){var x=c.shift();a||d(x)};c.length&&s<r;)b();l()}catch(x){e.error(x)}}))};return t.subscribe(se(e,p,function(){h=!0,l()})),function(){}}function Rf(t,e,n){return n===void 0&&(n=1/0),mt(e)?Rf(function(r,i){return O(function(o,a){return e(r,o,i,a)})(en(t(r,i)))},n):(typeof e=="number"&&(n=e),we(function(r,i){return ET(r,i,t,n)}))}function NT(t){return t===void 0&&(t=1/0),Rf(qr,t)}var LT=["addListener","removeListener"],CT=["addEventListener","removeEventListener"],IT=["on","off"];function Ff(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Ff(t,e,n).pipe(ib(r));var i=uo(zT(t)?CT.map(function(u){return function(c){return t[u](e,c,n)}}):RT(t)?LT.map(ab(t,e)):FT(t)?IT.map(ab(t,e)):[],2),o=i[0],a=i[1];if(!o&&Cf(t))return Rf(function(u){return Ff(u,e,n)})(en(t));if(!o)throw new TypeError("Invalid event target");return new nt(function(u){var c=function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];return u.next(1<s.length?s:s[0])};return o(c),function(){return a(c)}})}function ab(t,e){return function(n){return function(r){return t[n](e,r)}}}function RT(t){return mt(t.addListener)&&mt(t.removeListener)}function FT(t){return mt(t.on)&&mt(t.off)}function zT(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function zf(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=qy(t),r=uT(t,1/0),i=t;return i.length?i.length===1?en(i[0]):NT(r)(If(i,n)):By}function Bu(t,e){return we(function(n,r){var i=0;n.subscribe(se(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function OT(t){return we(function(e,n){var r=!1;e.subscribe(se(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function GT(t){return t<=0?function(){return By}:we(function(e,n){var r=0;e.subscribe(se(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function K(t,e){return e===void 0&&(e=qr),t=t??UT,we(function(n,r){var i,o=!0;n.subscribe(se(r,function(a){var u=e(a);(o||!t(i,u))&&(o=!1,i=u,r.next(a))}))})}function UT(t,e){return t===e}function YT(t){return t===void 0&&(t=BT),we(function(e,n){var r=!1;e.subscribe(se(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function BT(){return new rb}function so(t,e){var n=arguments.length>=2;return function(r){return r.pipe(qr,GT(1),n?OT(e):YT(function(){return new rb}))}}function U(t,e){return we(function(n,r){var i=null,o=0,a=!1,u=function(){return a&&!i&&r.complete()};n.subscribe(se(r,function(c){i==null||i.unsubscribe();var s=0,f=o++;en(t(c,f)).subscribe(i=se(r,function(h){return r.next(e?e(c,h,f,s++):h)},function(){i=null,u()}))},function(){a=!0,u()}))})}function R(t){return we(function(e,n){en(t).subscribe(se(n,function(){return n.complete()},Pf)),!n.closed&&e.subscribe(n)})}const Wr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function qu(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function qT(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ub(t){let e,n,r;t.length!==2?(e=qu,n=(u,c)=>qu(t(u),c),r=(u,c)=>t(u)-c):(e=t===qu||t===qT?t:WT,n=t,r=t);function i(u,c,s=0,f=u.length){if(s<f){if(e(c,c)!==0)return f;do{const h=s+f>>>1;n(u[h],c)<0?s=h+1:f=h}while(s<f)}return s}function o(u,c,s=0,f=u.length){if(s<f){if(e(c,c)!==0)return f;do{const h=s+f>>>1;n(u[h],c)<=0?s=h+1:f=h}while(s<f)}return s}function a(u,c,s=0,f=u.length){const h=i(u,c,s,f-1);return h>s&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:o}}function WT(){return 0}function HT(t){return t===null?NaN:+t}const XT=ub(qu),sb=XT.right;ub(HT).center;class cb extends Map{constructor(e,n=ZT){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(lb(this,e))}has(e){return super.has(lb(this,e))}set(e,n){return super.set(VT(this,e),n)}delete(e){return super.delete(jT(this,e))}}function lb({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function VT({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function jT({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function ZT(t){return t!==null&&typeof t=="object"?t.valueOf():t}const KT=Math.sqrt(50),QT=Math.sqrt(10),JT=Math.sqrt(2);function Wu(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=KT?10:o>=QT?5:o>=JT?2:1;let u,c,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),c=Math.round(e*s),u/s<t&&++u,c/s>e&&--c,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),c=Math.round(e/s),u*s<t&&++u,c*s>e&&--c),c<u&&.5<=n&&n<2?Wu(t,e,n*2):[u,c,s]}function tP(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Wu(e,t,n):Wu(t,e,n);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(a<0)for(let s=0;s<u;++s)c[s]=(o-s)/-a;else for(let s=0;s<u;++s)c[s]=(o-s)*a;else if(a<0)for(let s=0;s<u;++s)c[s]=(i+s)/-a;else for(let s=0;s<u;++s)c[s]=(i+s)*a;return c}function Of(t,e,n){return e=+e,t=+t,n=+n,Wu(t,e,n)[2]}function eP(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Of(e,t,n):Of(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function nP(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var rP={value:()=>{}};function fb(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Hu(n)}function Hu(t){this._=t}function iP(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Hu.prototype=fb.prototype={constructor:Hu,on:function(t,e){var n=this._,r=iP(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=oP(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=hb(n[i],t.name,e);else if(e==null)for(i in n)n[i]=hb(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Hu(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function oP(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function hb(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=rP,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Gf="http://www.w3.org/1999/xhtml";const pb={svg:"http://www.w3.org/2000/svg",xhtml:Gf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xu(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),pb.hasOwnProperty(e)?{space:pb[e],local:t}:t}function aP(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Gf&&e.documentElement.namespaceURI===Gf?e.createElement(t):e.createElementNS(n,t)}}function uP(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function db(t){var e=Xu(t);return(e.local?uP:aP)(e)}function sP(){}function Uf(t){return t==null?sP:function(){return this.querySelector(t)}}function cP(t){typeof t!="function"&&(t=Uf(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=new Array(a),c,s,f=0;f<a;++f)(c=o[f])&&(s=t.call(c,c.__data__,f,o))&&("__data__"in c&&(s.__data__=c.__data__),u[f]=s);return new Ae(r,this._parents)}function lP(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function fP(){return[]}function gb(t){return t==null?fP:function(){return this.querySelectorAll(t)}}function hP(t){return function(){return lP(t.apply(this,arguments))}}function pP(t){typeof t=="function"?t=hP(t):t=gb(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&(r.push(t.call(c,c.__data__,s,a)),i.push(c));return new Ae(r,i)}function mb(t){return function(){return this.matches(t)}}function yb(t){return function(e){return e.matches(t)}}var dP=Array.prototype.find;function gP(t){return function(){return dP.call(this.children,t)}}function mP(){return this.firstElementChild}function yP(t){return this.select(t==null?mP:gP(typeof t=="function"?t:yb(t)))}var bP=Array.prototype.filter;function vP(){return Array.from(this.children)}function xP(t){return function(){return bP.call(this.children,t)}}function _P(t){return this.selectAll(t==null?vP:xP(typeof t=="function"?t:yb(t)))}function wP(t){typeof t!="function"&&(t=mb(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new Ae(r,this._parents)}function bb(t){return new Array(t.length)}function AP(){return new Ae(this._enter||this._groups.map(bb),this._parents)}function Vu(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Vu.prototype={constructor:Vu,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function $P(t){return function(){return t}}function MP(t,e,n,r,i,o){for(var a=0,u,c=e.length,s=o.length;a<s;++a)(u=e[a])?(u.__data__=o[a],r[a]=u):n[a]=new Vu(t,o[a]);for(;a<c;++a)(u=e[a])&&(i[a]=u)}function SP(t,e,n,r,i,o,a){var u,c,s=new Map,f=e.length,h=o.length,l=new Array(f),p;for(u=0;u<f;++u)(c=e[u])&&(l[u]=p=a.call(c,c.__data__,u,e)+"",s.has(p)?i[u]=c:s.set(p,c));for(u=0;u<h;++u)p=a.call(t,o[u],u,o)+"",(c=s.get(p))?(r[u]=c,c.__data__=o[u],s.delete(p)):n[u]=new Vu(t,o[u]);for(u=0;u<f;++u)(c=e[u])&&s.get(l[u])===c&&(i[u]=c)}function TP(t){return t.__data__}function PP(t,e){if(!arguments.length)return Array.from(this,TP);var n=e?SP:MP,r=this._parents,i=this._groups;typeof t!="function"&&(t=$P(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),s=0;s<o;++s){var f=r[s],h=i[s],l=h.length,p=DP(t.call(f,f&&f.__data__,s,r)),d=p.length,g=u[s]=new Array(d),m=a[s]=new Array(d),b=c[s]=new Array(l);n(f,h,g,m,b,p,e);for(var x=0,_=0,v,w;x<d;++x)if(v=g[x]){for(x>=_&&(_=x+1);!(w=m[_])&&++_<d;);v._next=w||null}}return a=new Ae(a,r),a._enter=u,a._exit=c,a}function DP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function kP(){return new Ae(this._exit||this._groups.map(bb),this._parents)}function EP(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function NP(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var s=n[c],f=r[c],h=s.length,l=u[c]=new Array(h),p,d=0;d<h;++d)(p=s[d]||f[d])&&(l[d]=p);for(;c<i;++c)u[c]=n[c];return new Ae(u,this._parents)}function LP(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function CP(t){t||(t=IP);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],u=a.length,c=i[o]=new Array(u),s,f=0;f<u;++f)(s=a[f])&&(c[f]=s);c.sort(e)}return new Ae(i,this._parents).order()}function IP(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function RP(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function FP(){return Array.from(this)}function zP(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function OP(){let t=0;for(const e of this)++t;return t}function GP(){return!this.node()}function UP(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,u;o<a;++o)(u=i[o])&&t.call(u,u.__data__,o,i);return this}function YP(t){return function(){this.removeAttribute(t)}}function BP(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qP(t,e){return function(){this.setAttribute(t,e)}}function WP(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function HP(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function XP(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function VP(t,e){var n=Xu(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?BP:YP:typeof e=="function"?n.local?XP:HP:n.local?WP:qP)(n,e))}function vb(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function jP(t){return function(){this.style.removeProperty(t)}}function ZP(t,e,n){return function(){this.style.setProperty(t,e,n)}}function KP(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function QP(t,e,n){return arguments.length>1?this.each((e==null?jP:typeof e=="function"?KP:ZP)(t,e,n??"")):Hr(this.node(),t)}function Hr(t,e){return t.style.getPropertyValue(e)||vb(t).getComputedStyle(t,null).getPropertyValue(e)}function JP(t){return function(){delete this[t]}}function tD(t,e){return function(){this[t]=e}}function eD(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function nD(t,e){return arguments.length>1?this.each((e==null?JP:typeof e=="function"?eD:tD)(t,e)):this.node()[t]}function xb(t){return t.trim().split(/^|\s+/)}function Yf(t){return t.classList||new _b(t)}function _b(t){this._node=t,this._names=xb(t.getAttribute("class")||"")}_b.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function wb(t,e){for(var n=Yf(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ab(t,e){for(var n=Yf(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function rD(t){return function(){wb(this,t)}}function iD(t){return function(){Ab(this,t)}}function oD(t,e){return function(){(e.apply(this,arguments)?wb:Ab)(this,t)}}function aD(t,e){var n=xb(t+"");if(arguments.length<2){for(var r=Yf(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?oD:e?rD:iD)(n,e))}function uD(){this.textContent=""}function sD(t){return function(){this.textContent=t}}function cD(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function lD(t){return arguments.length?this.each(t==null?uD:(typeof t=="function"?cD:sD)(t)):this.node().textContent}function fD(){this.innerHTML=""}function hD(t){return function(){this.innerHTML=t}}function pD(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function dD(t){return arguments.length?this.each(t==null?fD:(typeof t=="function"?pD:hD)(t)):this.node().innerHTML}function gD(){this.nextSibling&&this.parentNode.appendChild(this)}function mD(){return this.each(gD)}function yD(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bD(){return this.each(yD)}function vD(t){var e=typeof t=="function"?t:db(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function xD(){return null}function _D(t,e){var n=typeof t=="function"?t:db(t),r=e==null?xD:typeof e=="function"?e:Uf(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function wD(){var t=this.parentNode;t&&t.removeChild(this)}function AD(){return this.each(wD)}function $D(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function MD(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function SD(t){return this.select(t?MD:$D)}function TD(t){return arguments.length?this.property("__data__",t):this.node().__data__}function PD(t){return function(e){t.call(this,e,this.__data__)}}function DD(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function kD(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function ED(t,e,n){return function(){var r=this.__on,i,o=PD(e);if(r){for(var a=0,u=r.length;a<u;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function ND(t,e,n){var r=DD(t+""),i,o=r.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,s=u.length,f;c<s;++c)for(i=0,f=u[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=e?ED:kD,i=0;i<o;++i)this.each(u(r[i],e,n));return this}function $b(t,e,n){var r=vb(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function LD(t,e){return function(){return $b(this,t,e)}}function CD(t,e){return function(){return $b(this,t,e.apply(this,arguments))}}function ID(t,e){return this.each((typeof e=="function"?CD:LD)(t,e))}function*RD(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var FD=[null];function Ae(t,e){this._groups=t,this._parents=e}function co(){return new Ae([[document.documentElement]],FD)}function zD(){return this}Ae.prototype=co.prototype={constructor:Ae,select:cP,selectAll:pP,selectChild:yP,selectChildren:_P,filter:wP,data:PP,enter:AP,exit:kP,join:EP,merge:NP,selection:zD,order:LP,sort:CP,call:RP,nodes:FP,node:zP,size:OP,empty:GP,each:UP,attr:VP,style:QP,property:nD,classed:aD,text:lD,html:dD,raise:mD,lower:bD,append:vD,insert:_D,remove:AD,clone:SD,datum:TD,on:ND,dispatch:ID,[Symbol.iterator]:RD};function Bf(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Mb(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function lo(){}var fo=.7,ju=1/fo,Xr="\\s*([+-]?\\d+)\\s*",ho="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",OD=/^#([0-9a-f]{3,8})$/,GD=new RegExp(`^rgb\\(${Xr},${Xr},${Xr}\\)$`),UD=new RegExp(`^rgb\\(${Ge},${Ge},${Ge}\\)$`),YD=new RegExp(`^rgba\\(${Xr},${Xr},${Xr},${ho}\\)$`),BD=new RegExp(`^rgba\\(${Ge},${Ge},${Ge},${ho}\\)$`),qD=new RegExp(`^hsl\\(${ho},${Ge},${Ge}\\)$`),WD=new RegExp(`^hsla\\(${ho},${Ge},${Ge},${ho}\\)$`),Sb={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Bf(lo,Zn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Tb,formatHex:Tb,formatHex8:HD,formatHsl:XD,formatRgb:Pb,toString:Pb});function Tb(){return this.rgb().formatHex()}function HD(){return this.rgb().formatHex8()}function XD(){return Lb(this).formatHsl()}function Pb(){return this.rgb().formatRgb()}function Zn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=OD.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Db(e):n===3?new ie(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Zu(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Zu(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=GD.exec(t))?new ie(e[1],e[2],e[3],1):(e=UD.exec(t))?new ie(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=YD.exec(t))?Zu(e[1],e[2],e[3],e[4]):(e=BD.exec(t))?Zu(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=qD.exec(t))?Nb(e[1],e[2]/100,e[3]/100,1):(e=WD.exec(t))?Nb(e[1],e[2]/100,e[3]/100,e[4]):Sb.hasOwnProperty(t)?Db(Sb[t]):t==="transparent"?new ie(NaN,NaN,NaN,0):null}function Db(t){return new ie(t>>16&255,t>>8&255,t&255,1)}function Zu(t,e,n,r){return r<=0&&(t=e=n=NaN),new ie(t,e,n,r)}function VD(t){return t instanceof lo||(t=Zn(t)),t?(t=t.rgb(),new ie(t.r,t.g,t.b,t.opacity)):new ie}function qf(t,e,n,r){return arguments.length===1?VD(t):new ie(t,e,n,r??1)}function ie(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Bf(ie,qf,Mb(lo,{brighter(t){return t=t==null?ju:Math.pow(ju,t),new ie(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?fo:Math.pow(fo,t),new ie(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ie(Kn(this.r),Kn(this.g),Kn(this.b),Ku(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kb,formatHex:kb,formatHex8:jD,formatRgb:Eb,toString:Eb}));function kb(){return`#${Qn(this.r)}${Qn(this.g)}${Qn(this.b)}`}function jD(){return`#${Qn(this.r)}${Qn(this.g)}${Qn(this.b)}${Qn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Eb(){const t=Ku(this.opacity);return`${t===1?"rgb(":"rgba("}${Kn(this.r)}, ${Kn(this.g)}, ${Kn(this.b)}${t===1?")":`, ${t})`}`}function Ku(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Kn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Qn(t){return t=Kn(t),(t<16?"0":"")+t.toString(16)}function Nb(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new $e(t,e,n,r)}function Lb(t){if(t instanceof $e)return new $e(t.h,t.s,t.l,t.opacity);if(t instanceof lo||(t=Zn(t)),!t)return new $e;if(t instanceof $e)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,c=(o+i)/2;return u?(e===o?a=(n-r)/u+(n<r)*6:n===o?a=(r-e)/u+2:a=(e-n)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new $e(a,u,c,t.opacity)}function ZD(t,e,n,r){return arguments.length===1?Lb(t):new $e(t,e,n,r??1)}function $e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Bf($e,ZD,Mb(lo,{brighter(t){return t=t==null?ju:Math.pow(ju,t),new $e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?fo:Math.pow(fo,t),new $e(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ie(Wf(t>=240?t-240:t+120,i,r),Wf(t,i,r),Wf(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new $e(Cb(this.h),Qu(this.s),Qu(this.l),Ku(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ku(this.opacity);return`${t===1?"hsl(":"hsla("}${Cb(this.h)}, ${Qu(this.s)*100}%, ${Qu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Cb(t){return t=(t||0)%360,t<0?t+360:t}function Qu(t){return Math.max(0,Math.min(1,t||0))}function Wf(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Hf=t=>()=>t;function KD(t,e){return function(n){return t+n*e}}function QD(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function JD(t){return(t=+t)==1?Ib:function(e,n){return n-e?QD(e,n,t):Hf(isNaN(e)?n:e)}}function Ib(t,e){var n=e-t;return n?KD(t,n):Hf(isNaN(t)?e:t)}const Ju=function t(e){var n=JD(e);function r(i,o){var a=n((i=qf(i)).r,(o=qf(o)).r),u=n(i.g,o.g),c=n(i.b,o.b),s=Ib(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=c(f),i.opacity=s(f),i+""}}return r.gamma=t,r}(1);function tk(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function ek(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function nk(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=jf(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(u){for(a=0;a<r;++a)o[a]=i[a](u);return o}}function rk(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Me(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ik(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=jf(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Xf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vf=new RegExp(Xf.source,"g");function ok(t){return function(){return t}}function ak(t){return function(e){return t(e)+""}}function Rb(t,e){var n=Xf.lastIndex=Vf.lastIndex=0,r,i,o,a=-1,u=[],c=[];for(t=t+"",e=e+"";(r=Xf.exec(t))&&(i=Vf.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:Me(r,i)})),n=Vf.lastIndex;return n<e.length&&(o=e.slice(n),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?ak(c[0].x):ok(e):(e=c.length,function(s){for(var f=0,h;f<e;++f)u[(h=c[f]).i]=h.x(s);return u.join("")})}function jf(t,e){var n=typeof e,r;return e==null||n==="boolean"?Hf(e):(n==="number"?Me:n==="string"?(r=Zn(e))?(e=r,Ju):Rb:e instanceof Zn?Ju:e instanceof Date?rk:ek(e)?tk:Array.isArray(e)?nk:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?ik:Me)(t,e)}function uk(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Fb=180/Math.PI,zb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ob(t,e,n,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,c/=u),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Fb,skewX:Math.atan(c)*Fb,scaleX:a,scaleY:u}}var ts;function sk(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?zb:Ob(e.a,e.b,e.c,e.d,e.e,e.f)}function ck(t){return t==null||(ts||(ts=document.createElementNS("http://www.w3.org/2000/svg","g")),ts.setAttribute("transform",t),!(t=ts.transform.baseVal.consolidate()))?zb:(t=t.matrix,Ob(t.a,t.b,t.c,t.d,t.e,t.f))}function Gb(t,e,n,r){function i(s){return s.length?s.pop()+" ":""}function o(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:Me(s,h)},{i:g-2,x:Me(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(s,f,h,l){s!==f?(s-f>180?f+=360:f-s>180&&(s+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Me(s,f)})):f&&h.push(i(h)+"rotate("+f+r)}function u(s,f,h,l){s!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Me(s,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(s,f,h,l,p,d){if(s!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Me(s,h)},{i:g-2,x:Me(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(s,f){var h=[],l=[];return s=t(s),f=t(f),o(s.translateX,s.translateY,f.translateX,f.translateY,h,l),a(s.rotate,f.rotate,h,l),u(s.skewX,f.skewX,h,l),c(s.scaleX,s.scaleY,f.scaleX,f.scaleY,h,l),s=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var lk=Gb(sk,"px, ","px)","deg)"),fk=Gb(ck,", ",")",")"),Vr=0,po=0,go=0,Ub=1e3,es,mo,ns=0,Jn=0,rs=0,yo=typeof performance=="object"&&performance.now?performance:Date,Yb=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zf(){return Jn||(Yb(hk),Jn=yo.now()+rs)}function hk(){Jn=0}function is(){this._call=this._time=this._next=null}is.prototype=Bb.prototype={constructor:is,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Zf():+n)+(e==null?0:+e),!this._next&&mo!==this&&(mo?mo._next=this:es=this,mo=this),this._call=t,this._time=n,Kf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kf())}};function Bb(t,e,n){var r=new is;return r.restart(t,e,n),r}function pk(){Zf(),++Vr;for(var t=es,e;t;)(e=Jn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Vr}function qb(){Jn=(ns=yo.now())+rs,Vr=po=0;try{pk()}finally{Vr=0,gk(),Jn=0}}function dk(){var t=yo.now(),e=t-ns;e>Ub&&(rs-=e,ns=t)}function gk(){for(var t,e=es,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:es=n);mo=t,Kf(r)}function Kf(t){if(!Vr){po&&(po=clearTimeout(po));var e=t-Jn;e>24?(t<1/0&&(po=setTimeout(qb,t-yo.now()-rs)),go&&(go=clearInterval(go))):(go||(ns=yo.now(),go=setInterval(dk,Ub)),Vr=1,Yb(qb))}}function Wb(t,e,n){var r=new is;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var mk=fb("start","end","cancel","interrupt"),yk=[],Hb=0,Xb=1,Qf=2,os=3,Vb=4,Jf=5,as=6;function us(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;bk(t,n,{name:e,index:r,group:i,on:mk,tween:yk,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Hb})}function th(t,e){var n=Se(t,e);if(n.state>Hb)throw new Error("too late; already scheduled");return n}function Ue(t,e){var n=Se(t,e);if(n.state>os)throw new Error("too late; already running");return n}function Se(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function bk(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Bb(o,0,n.time);function o(s){n.state=Xb,n.timer.restart(a,n.delay,n.time),n.delay<=s&&a(s-n.delay)}function a(s){var f,h,l,p;if(n.state!==Xb)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===os)return Wb(a);p.state===Vb?(p.state=as,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=as,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Wb(function(){n.state===os&&(n.state=Vb,n.timer.restart(u,n.delay,n.time),u(s))}),n.state=Qf,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Qf){for(n.state=os,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function u(s){for(var f=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(c),n.state=Jf,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===Jf&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=as,n.timer.stop(),delete r[e];for(var s in r)return;delete t.__transition}}function vk(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Qf&&r.state<Jf,r.state=as,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function xk(t){return this.each(function(){vk(this,t)})}function _k(t,e){var n,r;return function(){var i=Ue(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function wk(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ue(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},c=0,s=i.length;c<s;++c)if(i[c].name===e){i[c]=u;break}c===s&&i.push(u)}o.tween=i}}function Ak(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Se(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?_k:wk)(n,t,e))}function eh(t,e,n){var r=t._id;return t.each(function(){var i=Ue(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Se(i,r).value[e]}}function jb(t,e){var n;return(typeof e=="number"?Me:e instanceof Zn?Ju:(n=Zn(e))?(e=n,Ju):Rb)(t,e)}function $k(t){return function(){this.removeAttribute(t)}}function Mk(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Sk(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function Tk(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function Pk(t,e,n){var r,i,o;return function(){var a,u=n(this),c;return u==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u)))}}function Dk(t,e,n){var r,i,o;return function(){var a,u=n(this),c;return u==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=u+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u)))}}function kk(t,e){var n=Xu(t),r=n==="transform"?fk:jb;return this.attrTween(t,typeof e=="function"?(n.local?Dk:Pk)(n,r,eh(this,"attr."+t,e)):e==null?(n.local?Mk:$k)(n):(n.local?Tk:Sk)(n,r,e))}function Ek(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Nk(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Lk(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Nk(t,o)),n}return i._value=e,i}function Ck(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Ek(t,o)),n}return i._value=e,i}function Ik(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Xu(t);return this.tween(n,(r.local?Lk:Ck)(r,e))}function Rk(t,e){return function(){th(this,t).delay=+e.apply(this,arguments)}}function Fk(t,e){return e=+e,function(){th(this,t).delay=e}}function zk(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Rk:Fk)(e,t)):Se(this.node(),e).delay}function Ok(t,e){return function(){Ue(this,t).duration=+e.apply(this,arguments)}}function Gk(t,e){return e=+e,function(){Ue(this,t).duration=e}}function Uk(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ok:Gk)(e,t)):Se(this.node(),e).duration}function Yk(t,e){if(typeof e!="function")throw new Error;return function(){Ue(this,t).ease=e}}function Bk(t){var e=this._id;return arguments.length?this.each(Yk(e,t)):Se(this.node(),e).ease}function qk(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ue(this,t).ease=n}}function Wk(t){if(typeof t!="function")throw new Error;return this.each(qk(this._id,t))}function Hk(t){typeof t!="function"&&(t=mb(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,u=r[i]=[],c,s=0;s<a;++s)(c=o[s])&&t.call(c,c.__data__,s,o)&&u.push(c);return new nn(r,this._parents,this._name,this._id)}function Xk(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c=e[u],s=n[u],f=c.length,h=a[u]=new Array(f),l,p=0;p<f;++p)(l=c[p]||s[p])&&(h[p]=l);for(;u<r;++u)a[u]=e[u];return new nn(a,this._parents,this._name,this._id)}function Vk(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function jk(t,e,n){var r,i,o=Vk(e)?th:Ue;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}function Zk(t,e){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(t):this.each(jk(n,t,e))}function Kk(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Qk(){return this.on("end.remove",Kk(this._id))}function Jk(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Uf(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u=r[a],c=u.length,s=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=u[l])&&(h=t.call(f,f.__data__,l,u))&&("__data__"in f&&(h.__data__=f.__data__),s[l]=h,us(s[l],e,n,l,s,Se(f,n)));return new nn(o,this._parents,e,n)}function tE(t){var e=this._name,n=this._id;typeof t!="function"&&(t=gb(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c=r[u],s=c.length,f,h=0;h<s;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=Se(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&us(p,e,n,g,l,d);o.push(l),a.push(f)}return new nn(o,a,e,n)}var eE=co.prototype.constructor;function nE(){return new eE(this._groups,this._parents)}function rE(t,e){var n,r,i;return function(){var o=Hr(this,t),a=(this.style.removeProperty(t),Hr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Zb(t){return function(){this.style.removeProperty(t)}}function iE(t,e,n){var r,i=n+"",o;return function(){var a=Hr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function oE(t,e,n){var r,i,o;return function(){var a=Hr(this,t),u=n(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(t),Hr(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,u))}}function aE(t,e){var n,r,i,o="style."+e,a="end."+o,u;return function(){var c=Ue(this,t),s=c.on,f=c.value[o]==null?u||(u=Zb(e)):void 0;(s!==n||i!==f)&&(r=(n=s).copy()).on(a,i=f),c.on=r}}function uE(t,e,n){var r=(t+="")=="transform"?lk:jb;return e==null?this.styleTween(t,rE(t,r)).on("end.style."+t,Zb(t)):typeof e=="function"?this.styleTween(t,oE(t,r,eh(this,"style."+t,e))).each(aE(this._id,t)):this.styleTween(t,iE(t,r,e),n).on("end.style."+t,null)}function sE(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function cE(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&sE(t,a,n)),r}return o._value=e,o}function lE(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,cE(t,e,n??""))}function fE(t){return function(){this.textContent=t}}function hE(t){return function(){var e=t(this);this.textContent=e??""}}function pE(t){return this.tween("text",typeof t=="function"?hE(eh(this,"text",t)):fE(t==null?"":t+""))}function dE(t){return function(e){this.textContent=t.call(this,e)}}function gE(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&dE(i)),e}return r._value=t,r}function mE(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,gE(t))}function yE(){for(var t=this._name,e=this._id,n=Kb(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)if(c=a[s]){var f=Se(c,e);us(c,t,n,s,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new nn(r,this._parents,t,n)}function bE(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var s=Ue(this,r),f=s.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(c)),s.on=e}),i===0&&o()})}var vE=0;function nn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Kb(){return++vE}var rn=co.prototype;nn.prototype={constructor:nn,select:Jk,selectAll:tE,selectChild:rn.selectChild,selectChildren:rn.selectChildren,filter:Hk,merge:Xk,selection:nE,transition:yE,call:rn.call,nodes:rn.nodes,node:rn.node,size:rn.size,empty:rn.empty,each:rn.each,on:Zk,attr:kk,attrTween:Ik,style:uE,styleTween:lE,text:pE,textTween:mE,remove:Qk,tween:Ak,delay:zk,duration:Uk,ease:Bk,easeVarying:Wk,end:bE,[Symbol.iterator]:rn[Symbol.iterator]};function xE(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var _E={time:null,delay:0,duration:250,ease:xE};function wE(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function AE(t){var e,n;t instanceof nn?(e=t._id,t=t._name):(e=Kb(),(n=_E).time=Zf(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],u=a.length,c,s=0;s<u;++s)(c=a[s])&&us(c,t,e,s,a,n||wE(c,e));return new nn(r,this._parents,t,e)}co.prototype.interrupt=xk,co.prototype.transition=AE;function $E(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ss(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function jr(t){return t=ss(Math.abs(t)),t?t[1]:NaN}function ME(t,e){return function(n,r){for(var i=n.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(n.substring(i-=u,i+u)),!((c+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(e)}}function SE(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var TE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cs(t){if(!(e=TE.exec(t)))throw new Error("invalid format: "+t);var e;return new nh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}cs.prototype=nh.prototype;function nh(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}nh.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 PE(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Qb;function DE(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Qb=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")+ss(t,Math.max(0,e+o-1))[0]}function Jb(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const t2={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:$E,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Jb(t*100,e),r:Jb,s:DE,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function e2(t){return t}var n2=Array.prototype.map,r2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kE(t){var e=t.grouping===void 0||t.thousands===void 0?e2:ME(n2.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?e2:SE(n2.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function s(h){h=cs(h);var l=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,b=h.width,x=h.comma,_=h.precision,v=h.trim,w=h.type;w==="n"?(x=!0,w="g"):t2[w]||(_===void 0&&(_=12),v=!0,w="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var y=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",M=t2[w],$=/[defgprs%]/.test(w);_=_===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function P(S){var L=y,E=A,T,k,D;if(w==="c")E=M(S)+E,S="";else{S=+S;var N=S<0||1/S<0;if(S=isNaN(S)?c:M(Math.abs(S),_),v&&(S=PE(S)),N&&+S==0&&d!=="+"&&(N=!1),L=(N?d==="("?d:u:d==="-"||d==="("?"":d)+L,E=(w==="s"?r2[8+Qb/3]:"")+E+(N&&d==="("?")":""),$){for(T=-1,k=S.length;++T<k;)if(D=S.charCodeAt(T),48>D||D>57){E=(D===46?i+S.slice(T+1):S.slice(T))+E,S=S.slice(0,T);break}}}x&&!m&&(S=e(S,1/0));var I=L.length+S.length+E.length,C=I<b?new Array(b-I+1).join(l):"";switch(x&&m&&(S=e(C+S,C.length?b-E.length:1/0),C=""),p){case"<":S=L+S+E+C;break;case"=":S=L+C+S+E;break;case"^":S=C.slice(0,I=C.length>>1)+L+S+E+C.slice(I);break;default:S=C+L+S+E;break}return o(S)}return P.toString=function(){return h+""},P}function f(h,l){var p=s((h=cs(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(jr(l)/3)))*3,g=Math.pow(10,-d),m=r2[8+d/3];return function(b){return p(g*b)+m}}return{format:s,formatPrefix:f}}var ls,i2,o2;EE({thousands:",",grouping:[3],currency:["$",""]});function EE(t){return ls=kE(t),i2=ls.format,o2=ls.formatPrefix,ls}function NE(t){return Math.max(0,-jr(Math.abs(t)))}function LE(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(jr(e)/3)))*3-jr(Math.abs(t)))}function CE(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,jr(e)-jr(t))+1}function fs(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const a2=Symbol("implicit");function u2(){var t=new cb,e=[],n=[],r=a2;function i(o){let a=t.get(o);if(a===void 0){if(r!==a2)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new cb;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return u2(e,n).unknown(r)},fs.apply(i,arguments),i}function s2(){var t=u2().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,u=!1,c=0,s=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+s*2),u&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),u&&(d=Math.round(d),a=Math.round(a));var m=nP(l).map(function(b){return d+o*b});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,u=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(u=!!l,h()):u},t.padding=function(l){return arguments.length?(c=Math.min(1,s=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(s=+l,h()):s},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return s2(e(),[r,i]).round(u).paddingInner(c).paddingOuter(s).align(f)},fs.apply(h(),arguments)}function c2(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return c2(e())},t}function IE(){return c2(s2.apply(null,arguments).paddingInner(1))}function RE(t){return function(){return t}}function FE(t){return+t}var l2=[0,1];function Zr(t){return t}function rh(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:RE(isNaN(e)?NaN:.5)}function zE(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function OE(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=rh(i,r),o=n(a,o)):(r=rh(r,i),o=n(o,a)),function(u){return o(r(u))}}function GE(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=rh(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(u){var c=sb(t,u,1,r)-1;return o[c](i[c](u))}}function UE(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function YE(){var t=l2,e=l2,n=jf,r,i,o,a=Zr,u,c,s;function f(){var l=Math.min(t.length,e.length);return a!==Zr&&(a=zE(t[0],t[l-1])),u=l>2?GE:OE,c=s=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=u(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((s||(s=u(e,t.map(r),Me)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,FE),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=uk,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Zr,f()):a!==Zr},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function BE(){return YE()(Zr,Zr)}function qE(t,e,n,r){var i=eP(t,e,n),o;switch(r=cs(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=LE(i,a))&&(r.precision=o),o2(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=CE(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=NE(i))&&(r.precision=o-(r.type==="%")*2);break}}return i2(r)}function f2(t){var e=t.domain;return t.ticks=function(n){var r=e();return tP(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return qE(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],u=r[o],c,s,f=10;for(u<a&&(s=a,a=u,u=s,s=i,i=o,o=s);f-- >0;){if(s=Of(a,u,n),s===c)return r[i]=a,r[o]=u,e(r);if(s>0)a=Math.floor(a/s)*s,u=Math.ceil(u/s)*s;else if(s<0)a=Math.ceil(a*s)/s,u=Math.floor(u*s)/s;else break;c=s}return t},t}function h2(){var t=BE();return t.copy=function(){return UE(t,h2())},fs.apply(t,arguments),f2(t)}function p2(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[sb(r,c,0,n)]:o}function u(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,u()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,u()):i.slice()},a.invertExtent=function(c){var s=i.indexOf(c);return s<0?[NaN,NaN]:s<1?[t,r[0]]:s>=n?[r[n-1],e]:[r[s-1],r[s]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return p2().domain([t,e]).range(i).unknown(o)},fs.apply(f2(a),arguments)}function bo(t,e,n){this.k=t,this.x=e,this.y=n}bo.prototype={constructor:bo,scale:function(t){return t===1?this:new bo(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new bo(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},bo.prototype;function hs(t){return Object.prototype.toString.call(t)==="[object Object]"}function d2(t,e){if(hs(t)===!1||hs(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let u;hs(r[a])&&hs(i[a])?(u=n(r[a],i[a]),o[a]=u):o[a]=r[a]}return o};return n(t,e)}var ih=function(t,e){return ih=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ih(t,e)};function on(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ih(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function WE(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(f){try{s(r.next(f))}catch(h){a(h)}}function c(f){try{s(r.throw(f))}catch(h){a(h)}}function s(f){f.done?o(f.value):i(f.value).then(u,c)}s((r=r.apply(t,[])).next())})}function g2(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(f){return c([s,f])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=e.call(t,n)}catch(f){s=[6,f],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Kr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function vo(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function xo(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Qr(t){return this instanceof Qr?(this.v=t,this):new Qr(t)}function HE(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},u("next"),u("throw"),u("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function u(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,b){o.push([p,g,m,b])>1||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{s(r[p](d))}catch(g){l(o[0][3],g)}}function s(p){p.value instanceof Qr?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function XE(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Kr=="function"?Kr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(u,c){a=t[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(s){o({value:s,done:u})},a)}}function Et(t){return typeof t=="function"}function oh(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var ah=oh(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
3
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function $u(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Do=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=ir(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(mt(f))try{f()}catch(g){o=g instanceof Mu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=ir(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{Ch(d)}catch(g){o=o??[],g instanceof Mu?o=Po(Po([],ni(o)),ni(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new Mu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ch(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&$u(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&$u(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Lh=Do.EMPTY;function Ih(t){return t instanceof Do||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Ch(t){mt(t)?t():t.unsubscribe()}var Rh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Fh={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Po([t,e],ni(n)))},clearTimeout:function(t){var e=Fh.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function zh(t){Fh.setTimeout(function(){throw t})}function Su(){}function ko(t){t()}var Tu=function(t){ei(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Ih(n)&&n.add(r)):r.destination=H2,r}return e.create=function(n,r,i){return new Du(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Do),Y2=Function.prototype.bind;function Pu(t,e){return Y2.call(t,e)}var q2=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Eo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Eo(r)}else Eo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Eo(n)}},t}(),Du=function(t){ei(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Rh.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Pu(n.next,s),error:n.error&&Pu(n.error,s),complete:n.complete&&Pu(n.complete,s)}):a=n}return o.destination=new q2(a),o}return e}(Tu);function Eo(t){zh(t)}function W2(t){throw t}var H2={closed:!0,next:Su,error:W2,complete:Su},ku=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ar(t){return t}function X2(t){return t.length===0?ar:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var at=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=j2(e)?e:new Du(e,n,r);return ko(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Oh(n),new n(function(i,o){var a=new Du({next:function(s){try{e(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[ku]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return X2(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Oh(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Oh(t){var e;return(e=t??Rh.Promise)!==null&&e!==void 0?e:Promise}function V2(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function j2(t){return t&&t instanceof Tu||V2(t)&&Ih(t)}function Z2(t){return mt(t==null?void 0:t.lift)}function me(t){return function(e){if(Z2(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new K2(t,e,n,r,i)}var K2=function(t){ei(e,t);function e(n,r,i,o,a,s){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=r?function(u){try{r(u)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(u){try{o(u)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Tu),Q2=Au(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ft=function(t){ei(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Gh(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Q2},e.prototype.next=function(n){var r=this;ko(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=ir(r.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ko(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ko(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Lh:(this.currentObservers=null,s.push(n),new Do(function(){r.currentObservers=null,$u(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new at;return n.source=this,n},e.create=function(n,r){return new Gh(n,r)},e}(at),Gh=function(t){ei(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Lh},e}(ft),Uh=new at(function(t){return t.complete()});function J2(t){return t&&mt(t.schedule)}function Eu(t){return t[t.length-1]}function tx(t){return mt(Eu(t))?t.pop():void 0}function Bh(t){return J2(Eu(t))?t.pop():void 0}function ex(t,e){return typeof Eu(t)=="number"?t.pop():e}var Nu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Yh(t){return mt(t==null?void 0:t.then)}function qh(t){return mt(t[ku])}function Wh(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function Hh(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function nx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Xh=nx();function Vh(t){return mt(t==null?void 0:t[Xh])}function jh(t){return U2(this,arguments,function(){var n,r,i,o;return Nh(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,or(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,or(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,or(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Zh(t){return mt(t==null?void 0:t.getReader)}function Be(t){if(t instanceof at)return t;if(t!=null){if(qh(t))return rx(t);if(Nu(t))return ix(t);if(Yh(t))return ox(t);if(Wh(t))return Kh(t);if(Vh(t))return ax(t);if(Zh(t))return sx(t)}throw Hh(t)}function rx(t){return new at(function(e){var n=t[ku]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ix(t){return new at(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function ox(t){return new at(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,zh)})}function ax(t){return new at(function(e){var n,r;try{for(var i=ir(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Kh(t){return new at(function(e){ux(t,e).catch(function(n){return e.error(n)})})}function sx(t){return Kh(jh(t))}function ux(t,e){var n,r,i,o;return G2(this,void 0,void 0,function(){var a,s;return Nh(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=B2(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function an(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Qh(t,e){return e===void 0&&(e=0),me(function(n,r){n.subscribe(oe(r,function(i){return an(r,t,function(){return r.next(i)},e)},function(){return an(r,t,function(){return r.complete()},e)},function(i){return an(r,t,function(){return r.error(i)},e)}))})}function Jh(t,e){return e===void 0&&(e=0),me(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function cx(t,e){return Be(t).pipe(Jh(e),Qh(e))}function lx(t,e){return Be(t).pipe(Jh(e),Qh(e))}function fx(t,e){return new at(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function hx(t,e){return new at(function(n){var r;return an(n,e,function(){r=t[Xh](),an(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return mt(r==null?void 0:r.return)&&r.return()}})}function t0(t,e){if(!t)throw new Error("Iterable cannot be null");return new at(function(n){an(n,e,function(){var r=t[Symbol.asyncIterator]();an(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function px(t,e){return t0(jh(t),e)}function dx(t,e){if(t!=null){if(qh(t))return cx(t,e);if(Nu(t))return fx(t,e);if(Yh(t))return lx(t,e);if(Wh(t))return t0(t,e);if(Vh(t))return hx(t,e);if(Zh(t))return px(t,e)}throw Hh(t)}function Lu(t,e){return e?dx(t,e):Be(t)}var e0=Au(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function G(t,e){return me(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var gx=Array.isArray;function mx(t,e){return gx(e)?t.apply(void 0,Po([],ni(e))):t(e)}function n0(t){return G(function(e){return mx(t,e)})}var yx=Array.isArray,bx=Object.getPrototypeOf,vx=Object.prototype,xx=Object.keys;function _x(t){if(t.length===1){var e=t[0];if(yx(e))return{args:e,keys:null};if(wx(e)){var n=xx(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function wx(t){return t&&typeof t=="object"&&bx(t)===vx}function Ax(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function H(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Bh(t),r=tx(t),i=_x(t),o=i.args,a=i.keys;if(o.length===0)return Lu([],n);var s=new at(Mx(o,n,a?function(c){return Ax(a,c)}:ar));return r?s.pipe(n0(r)):s}function Mx(t,e,n){return n===void 0&&(n=ar),function(r){r0(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,c=function(f){r0(e,function(){var h=Lu(t[f],e),l=!1;h.subscribe(oe(r,function(p){o[f]=p,l||(l=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)c(u)},r)}}function r0(t,e,n){t?an(n,t,e):e()}function $x(t,e,n,r,i,o,a,s){var c=[],u=0,f=0,h=!1,l=function(){h&&!c.length&&!u&&e.complete()},p=function(g){return u<r?d(g):c.push(g)},d=function(g){u++;var m=!1;Be(n(g,f++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{u--;for(var y=function(){var _=c.shift();a||d(_)};c.length&&u<r;)y();l()}catch(_){e.error(_)}}))};return t.subscribe(oe(e,p,function(){h=!0,l()})),function(){}}function Iu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Iu(function(r,i){return G(function(o,a){return e(r,o,i,a)})(Be(t(r,i)))},n):(typeof e=="number"&&(n=e),me(function(r,i){return $x(r,i,t,n)}))}function Sx(t){return t===void 0&&(t=1/0),Iu(ar,t)}var Tx=["addListener","removeListener"],Px=["addEventListener","removeEventListener"],Dx=["on","off"];function Cu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Cu(t,e,n).pipe(n0(r));var i=ni(Nx(t)?Px.map(function(s){return function(c){return t[s](e,c,n)}}):kx(t)?Tx.map(i0(t,e)):Ex(t)?Dx.map(i0(t,e)):[],2),o=i[0],a=i[1];if(!o&&Nu(t))return Iu(function(s){return Cu(s,e,n)})(Be(t));if(!o)throw new TypeError("Invalid event target");return new at(function(s){var c=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return s.next(1<u.length?u:u[0])};return o(c),function(){return a(c)}})}function i0(t,e){return function(n){return function(r){return t[n](e,r)}}}function kx(t){return mt(t.addListener)&&mt(t.removeListener)}function Ex(t){return mt(t.on)&&mt(t.off)}function Nx(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function Ru(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Bh(t),r=ex(t,1/0),i=t;return i.length?i.length===1?Be(i[0]):Sx(r)(Lu(i,n)):Uh}function No(t,e){return me(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function Lx(t){return me(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function Ix(t){return t<=0?function(){return Uh}:me(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function J(t,e){return e===void 0&&(e=ar),t=t??Cx,me(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function Cx(t,e){return t===e}function Rx(t){return t===void 0&&(t=Fx),me(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function Fx(){return new e0}function ri(t,e){var n=arguments.length>=2;return function(r){return r.pipe(ar,Ix(1),n?Lx(e):Rx(function(){return new e0}))}}function Y(t,e){return me(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(c){i==null||i.unsubscribe();var u=0,f=o++;Be(t(c,f)).subscribe(i=oe(r,function(h){return r.next(e?e(c,h,f,u++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function R(t){return me(function(e,n){Be(t).subscribe(oe(n,function(){return n.complete()},Su)),!n.closed&&e.subscribe(n)})}const sr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Lo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zx(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function o0(t){let e,n,r;t.length!==2?(e=Lo,n=(s,c)=>Lo(t(s),c),r=(s,c)=>t(s)-c):(e=t===Lo||t===zx?t:Ox,n=t,r=t);function i(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<0?u=h+1:f=h}while(u<f)}return u}function o(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<=0?u=h+1:f=h}while(u<f)}return u}function a(s,c,u=0,f=s.length){const h=i(s,c,u,f-1);return h>u&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:i,center:a,right:o}}function Ox(){return 0}function Gx(t){return t===null?NaN:+t}const Ux=o0(Lo),a0=Ux.right;o0(Gx).center;class s0 extends Map{constructor(e,n=qx){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(u0(this,e))}has(e){return super.has(u0(this,e))}set(e,n){return super.set(Bx(this,e),n)}delete(e){return super.delete(Yx(this,e))}}function u0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Bx({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Yx({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function qx(t){return t!==null&&typeof t=="object"?t.valueOf():t}const Wx=Math.sqrt(50),Hx=Math.sqrt(10),Xx=Math.sqrt(2);function Io(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Wx?10:o>=Hx?5:o>=Xx?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?Io(t,e,n*2):[s,c,u]}function Vx(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Io(e,t,n):Io(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)c[u]=(o-u)/-a;else for(let u=0;u<s;++u)c[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)c[u]=(i+u)/-a;else for(let u=0;u<s;++u)c[u]=(i+u)*a;return c}function Fu(t,e,n){return e=+e,t=+t,n=+n,Io(t,e,n)[2]}function jx(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Fu(e,t,n):Fu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Zx(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var Kx={value:()=>{}};function c0(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Co(n)}function Co(t){this._=t}function Qx(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Co.prototype=c0.prototype={constructor:Co,on:function(t,e){var n=this._,r=Qx(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=Jx(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=l0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=l0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Co(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function Jx(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function l0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Kx,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var zu="http://www.w3.org/1999/xhtml";const f0={svg:"http://www.w3.org/2000/svg",xhtml:zu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ro(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),f0.hasOwnProperty(e)?{space:f0[e],local:t}:t}function t_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===zu&&e.documentElement.namespaceURI===zu?e.createElement(t):e.createElementNS(n,t)}}function e_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function h0(t){var e=Ro(t);return(e.local?e_:t_)(e)}function n_(){}function Ou(t){return t==null?n_:function(){return this.querySelector(t)}}function r_(t){typeof t!="function"&&(t=Ou(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),c,u,f=0;f<a;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),s[f]=u);return new ye(r,this._parents)}function i_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function o_(){return[]}function p0(t){return t==null?o_:function(){return this.querySelectorAll(t)}}function a_(t){return function(){return i_(t.apply(this,arguments))}}function s_(t){typeof t=="function"?t=a_(t):t=p0(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(r.push(t.call(c,c.__data__,u,a)),i.push(c));return new ye(r,i)}function d0(t){return function(){return this.matches(t)}}function g0(t){return function(e){return e.matches(t)}}var u_=Array.prototype.find;function c_(t){return function(){return u_.call(this.children,t)}}function l_(){return this.firstElementChild}function f_(t){return this.select(t==null?l_:c_(typeof t=="function"?t:g0(t)))}var h_=Array.prototype.filter;function p_(){return Array.from(this.children)}function d_(t){return function(){return h_.call(this.children,t)}}function g_(t){return this.selectAll(t==null?p_:d_(typeof t=="function"?t:g0(t)))}function m_(t){typeof t!="function"&&(t=d0(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new ye(r,this._parents)}function m0(t){return new Array(t.length)}function y_(){return new ye(this._enter||this._groups.map(m0),this._parents)}function Fo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Fo.prototype={constructor:Fo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function b_(t){return function(){return t}}function v_(t,e,n,r,i,o){for(var a=0,s,c=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Fo(t,o[a]);for(;a<c;++a)(s=e[a])&&(i[a]=s)}function x_(t,e,n,r,i,o,a){var s,c,u=new Map,f=e.length,h=o.length,l=new Array(f),p;for(s=0;s<f;++s)(c=e[s])&&(l[s]=p=a.call(c,c.__data__,s,e)+"",u.has(p)?i[s]=c:u.set(p,c));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(c=u.get(p))?(r[s]=c,c.__data__=o[s],u.delete(p)):n[s]=new Fo(t,o[s]);for(s=0;s<f;++s)(c=e[s])&&u.get(l[s])===c&&(i[s]=c)}function __(t){return t.__data__}function w_(t,e){if(!arguments.length)return Array.from(this,__);var n=e?x_:v_,r=this._parents,i=this._groups;typeof t!="function"&&(t=b_(t));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],h=i[u],l=h.length,p=A_(t.call(f,f&&f.__data__,u,r)),d=p.length,g=s[u]=new Array(d),m=a[u]=new Array(d),y=c[u]=new Array(l);n(f,h,g,m,y,p,e);for(var _=0,v=0,b,x;_<d;++_)if(b=g[_]){for(_>=v&&(v=_+1);!(x=m[v])&&++v<d;);b._next=x||null}}return a=new ye(a,r),a._enter=s,a._exit=c,a}function A_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function M_(){return new ye(this._exit||this._groups.map(m0),this._parents)}function $_(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function S_(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),c=0;c<a;++c)for(var u=n[c],f=r[c],h=u.length,l=s[c]=new Array(h),p,d=0;d<h;++d)(p=u[d]||f[d])&&(l[d]=p);for(;c<i;++c)s[c]=n[c];return new ye(s,this._parents)}function T_(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function P_(t){t||(t=D_);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,c=i[o]=new Array(s),u,f=0;f<s;++f)(u=a[f])&&(c[f]=u);c.sort(e)}return new ye(i,this._parents).order()}function D_(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function k_(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function E_(){return Array.from(this)}function N_(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function L_(){let t=0;for(const e of this)++t;return t}function I_(){return!this.node()}function C_(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function R_(t){return function(){this.removeAttribute(t)}}function F_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function z_(t,e){return function(){this.setAttribute(t,e)}}function O_(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function G_(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function U_(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function B_(t,e){var n=Ro(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?F_:R_:typeof e=="function"?n.local?U_:G_:n.local?O_:z_)(n,e))}function y0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Y_(t){return function(){this.style.removeProperty(t)}}function q_(t,e,n){return function(){this.style.setProperty(t,e,n)}}function W_(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function H_(t,e,n){return arguments.length>1?this.each((e==null?Y_:typeof e=="function"?W_:q_)(t,e,n??"")):ur(this.node(),t)}function ur(t,e){return t.style.getPropertyValue(e)||y0(t).getComputedStyle(t,null).getPropertyValue(e)}function X_(t){return function(){delete this[t]}}function V_(t,e){return function(){this[t]=e}}function j_(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Z_(t,e){return arguments.length>1?this.each((e==null?X_:typeof e=="function"?j_:V_)(t,e)):this.node()[t]}function b0(t){return t.trim().split(/^|\s+/)}function Gu(t){return t.classList||new v0(t)}function v0(t){this._node=t,this._names=b0(t.getAttribute("class")||"")}v0.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function x0(t,e){for(var n=Gu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function _0(t,e){for(var n=Gu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function K_(t){return function(){x0(this,t)}}function Q_(t){return function(){_0(this,t)}}function J_(t,e){return function(){(e.apply(this,arguments)?x0:_0)(this,t)}}function tw(t,e){var n=b0(t+"");if(arguments.length<2){for(var r=Gu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?J_:e?K_:Q_)(n,e))}function ew(){this.textContent=""}function nw(t){return function(){this.textContent=t}}function rw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function iw(t){return arguments.length?this.each(t==null?ew:(typeof t=="function"?rw:nw)(t)):this.node().textContent}function ow(){this.innerHTML=""}function aw(t){return function(){this.innerHTML=t}}function sw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function uw(t){return arguments.length?this.each(t==null?ow:(typeof t=="function"?sw:aw)(t)):this.node().innerHTML}function cw(){this.nextSibling&&this.parentNode.appendChild(this)}function lw(){return this.each(cw)}function fw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hw(){return this.each(fw)}function pw(t){var e=typeof t=="function"?t:h0(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function dw(){return null}function gw(t,e){var n=typeof t=="function"?t:h0(t),r=e==null?dw:typeof e=="function"?e:Ou(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function mw(){var t=this.parentNode;t&&t.removeChild(this)}function yw(){return this.each(mw)}function bw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function vw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xw(t){return this.select(t?vw:bw)}function _w(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ww(t){return function(e){t.call(this,e,this.__data__)}}function Aw(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Mw(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function $w(t,e,n){return function(){var r=this.__on,i,o=ww(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Sw(t,e,n){var r=Aw(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,f;c<u;++c)for(i=0,f=s[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?$w:Mw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function w0(t,e,n){var r=y0(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Tw(t,e){return function(){return w0(this,t,e)}}function Pw(t,e){return function(){return w0(this,t,e.apply(this,arguments))}}function Dw(t,e){return this.each((typeof e=="function"?Pw:Tw)(t,e))}function*kw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Ew=[null];function ye(t,e){this._groups=t,this._parents=e}function ii(){return new ye([[document.documentElement]],Ew)}function Nw(){return this}ye.prototype=ii.prototype={constructor:ye,select:r_,selectAll:s_,selectChild:f_,selectChildren:g_,filter:m_,data:w_,enter:y_,exit:M_,join:$_,merge:S_,selection:Nw,order:T_,sort:P_,call:k_,nodes:E_,node:N_,size:L_,empty:I_,each:C_,attr:B_,style:H_,property:Z_,classed:tw,text:iw,html:uw,raise:lw,lower:hw,append:pw,insert:gw,remove:yw,clone:xw,datum:_w,on:Sw,dispatch:Dw,[Symbol.iterator]:kw};function Uu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function A0(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function oi(){}var ai=.7,zo=1/ai,cr="\\s*([+-]?\\d+)\\s*",si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lw=/^#([0-9a-f]{3,8})$/,Iw=new RegExp(`^rgb\\(${cr},${cr},${cr}\\)$`),Cw=new RegExp(`^rgb\\(${De},${De},${De}\\)$`),Rw=new RegExp(`^rgba\\(${cr},${cr},${cr},${si}\\)$`),Fw=new RegExp(`^rgba\\(${De},${De},${De},${si}\\)$`),zw=new RegExp(`^hsl\\(${si},${De},${De}\\)$`),Ow=new RegExp(`^hsla\\(${si},${De},${De},${si}\\)$`),M0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Uu(oi,wn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:$0,formatHex:$0,formatHex8:Gw,formatHsl:Uw,formatRgb:S0,toString:S0});function $0(){return this.rgb().formatHex()}function Gw(){return this.rgb().formatHex8()}function Uw(){return E0(this).formatHsl()}function S0(){return this.rgb().formatRgb()}function wn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Lw.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?T0(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Oo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Oo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Iw.exec(t))?new ee(e[1],e[2],e[3],1):(e=Cw.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Rw.exec(t))?Oo(e[1],e[2],e[3],e[4]):(e=Fw.exec(t))?Oo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=zw.exec(t))?k0(e[1],e[2]/100,e[3]/100,1):(e=Ow.exec(t))?k0(e[1],e[2]/100,e[3]/100,e[4]):M0.hasOwnProperty(t)?T0(M0[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function T0(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function Oo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function Bw(t){return t instanceof oi||(t=wn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Bu(t,e,n,r){return arguments.length===1?Bw(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Uu(ee,Bu,A0(oi,{brighter(t){return t=t==null?zo:Math.pow(zo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ai:Math.pow(ai,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(An(this.r),An(this.g),An(this.b),Go(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:P0,formatHex:P0,formatHex8:Yw,formatRgb:D0,toString:D0}));function P0(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}`}function Yw(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}${Mn((isNaN(this.opacity)?1:this.opacity)*255)}`}function D0(){const t=Go(this.opacity);return`${t===1?"rgb(":"rgba("}${An(this.r)}, ${An(this.g)}, ${An(this.b)}${t===1?")":`, ${t})`}`}function Go(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function An(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mn(t){return t=An(t),(t<16?"0":"")+t.toString(16)}function k0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new be(t,e,n,r)}function E0(t){if(t instanceof be)return new be(t.h,t.s,t.l,t.opacity);if(t instanceof oi||(t=wn(t)),!t)return new be;if(t instanceof be)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new be(a,s,c,t.opacity)}function qw(t,e,n,r){return arguments.length===1?E0(t):new be(t,e,n,r??1)}function be(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Uu(be,qw,A0(oi,{brighter(t){return t=t==null?zo:Math.pow(zo,t),new be(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ai:Math.pow(ai,t),new be(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ee(Yu(t>=240?t-240:t+120,i,r),Yu(t,i,r),Yu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new be(N0(this.h),Uo(this.s),Uo(this.l),Go(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Go(this.opacity);return`${t===1?"hsl(":"hsla("}${N0(this.h)}, ${Uo(this.s)*100}%, ${Uo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function N0(t){return t=(t||0)%360,t<0?t+360:t}function Uo(t){return Math.max(0,Math.min(1,t||0))}function Yu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const qu=t=>()=>t;function Ww(t,e){return function(n){return t+n*e}}function Hw(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Xw(t){return(t=+t)==1?L0:function(e,n){return n-e?Hw(e,n,t):qu(isNaN(e)?n:e)}}function L0(t,e){var n=e-t;return n?Ww(t,n):qu(isNaN(t)?e:t)}const Bo=function t(e){var n=Xw(e);function r(i,o){var a=n((i=Bu(i)).r,(o=Bu(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),u=L0(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r}(1);function Vw(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function jw(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Zw(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Xu(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Kw(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ve(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Qw(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Xu(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Wu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hu=new RegExp(Wu.source,"g");function Jw(t){return function(){return t}}function t3(t){return function(e){return t(e)+""}}function I0(t,e){var n=Wu.lastIndex=Hu.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(t=t+"",e=e+"";(r=Wu.exec(t))&&(i=Hu.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:ve(r,i)})),n=Hu.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?t3(c[0].x):Jw(e):(e=c.length,function(u){for(var f=0,h;f<e;++f)s[(h=c[f]).i]=h.x(u);return s.join("")})}function Xu(t,e){var n=typeof e,r;return e==null||n==="boolean"?qu(e):(n==="number"?ve:n==="string"?(r=wn(e))?(e=r,Bo):I0:e instanceof wn?Bo:e instanceof Date?Kw:jw(e)?Vw:Array.isArray(e)?Zw:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Qw:ve)(t,e)}function e3(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var C0=180/Math.PI,R0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function F0(t,e,n,r,i,o){var a,s,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*C0,skewX:Math.atan(c)*C0,scaleX:a,scaleY:s}}var Yo;function n3(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?R0:F0(e.a,e.b,e.c,e.d,e.e,e.f)}function r3(t){return t==null||(Yo||(Yo=document.createElementNS("http://www.w3.org/2000/svg","g")),Yo.setAttribute("transform",t),!(t=Yo.transform.baseVal.consolidate()))?R0:(t=t.matrix,F0(t.a,t.b,t.c,t.d,t.e,t.f))}function z0(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ve(u,h)},{i:g-2,x:ve(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(u,f,h,l){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ve(u,f)})):f&&h.push(i(h)+"rotate("+f+r)}function s(u,f,h,l){u!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ve(u,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ve(u,h)},{i:g-2,x:ve(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(u,f){var h=[],l=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,h,l),a(u.rotate,f.rotate,h,l),s(u.skewX,f.skewX,h,l),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,h,l),u=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var i3=z0(n3,"px, ","px)","deg)"),o3=z0(r3,", ",")",")"),lr=0,ui=0,ci=0,O0=1e3,qo,li,Wo=0,$n=0,Ho=0,fi=typeof performance=="object"&&performance.now?performance:Date,G0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Vu(){return $n||(G0(a3),$n=fi.now()+Ho)}function a3(){$n=0}function Xo(){this._call=this._time=this._next=null}Xo.prototype=U0.prototype={constructor:Xo,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Vu():+n)+(e==null?0:+e),!this._next&&li!==this&&(li?li._next=this:qo=this,li=this),this._call=t,this._time=n,ju()},stop:function(){this._call&&(this._call=null,this._time=1/0,ju())}};function U0(t,e,n){var r=new Xo;return r.restart(t,e,n),r}function s3(){Vu(),++lr;for(var t=qo,e;t;)(e=$n-t._time)>=0&&t._call.call(void 0,e),t=t._next;--lr}function B0(){$n=(Wo=fi.now())+Ho,lr=ui=0;try{s3()}finally{lr=0,c3(),$n=0}}function u3(){var t=fi.now(),e=t-Wo;e>O0&&(Ho-=e,Wo=t)}function c3(){for(var t,e=qo,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:qo=n);li=t,ju(r)}function ju(t){if(!lr){ui&&(ui=clearTimeout(ui));var e=t-$n;e>24?(t<1/0&&(ui=setTimeout(B0,t-fi.now()-Ho)),ci&&(ci=clearInterval(ci))):(ci||(Wo=fi.now(),ci=setInterval(u3,O0)),lr=1,G0(B0))}}function Y0(t,e,n){var r=new Xo;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var l3=c0("start","end","cancel","interrupt"),f3=[],q0=0,W0=1,Zu=2,Vo=3,H0=4,Ku=5,jo=6;function Zo(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;h3(t,n,{name:e,index:r,group:i,on:l3,tween:f3,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:q0})}function Qu(t,e){var n=xe(t,e);if(n.state>q0)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=xe(t,e);if(n.state>Vo)throw new Error("too late; already running");return n}function xe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function h3(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=U0(o,0,n.time);function o(u){n.state=W0,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var f,h,l,p;if(n.state!==W0)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===Vo)return Y0(a);p.state===H0?(p.state=jo,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=jo,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Y0(function(){n.state===Vo&&(n.state=H0,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Zu,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Zu){for(n.state=Vo,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Ku,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===Ku&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=jo,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function p3(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Zu&&r.state<Ku,r.state=jo,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function d3(t){return this.each(function(){p3(this,t)})}function g3(t,e){var n,r;return function(){var i=ke(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function m3(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=ke(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function y3(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=xe(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?g3:m3)(n,t,e))}function Ju(t,e,n){var r=t._id;return t.each(function(){var i=ke(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return xe(i,r).value[e]}}function X0(t,e){var n;return(typeof e=="number"?ve:e instanceof wn?Bo:(n=wn(e))?(e=n,Bo):I0)(t,e)}function b3(t){return function(){this.removeAttribute(t)}}function v3(t){return function(){this.removeAttributeNS(t.space,t.local)}}function x3(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function _3(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function w3(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function A3(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function M3(t,e){var n=Ro(t),r=n==="transform"?o3:X0;return this.attrTween(t,typeof e=="function"?(n.local?A3:w3)(n,r,Ju(this,"attr."+t,e)):e==null?(n.local?v3:b3)(n):(n.local?_3:x3)(n,r,e))}function $3(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function S3(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function T3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&S3(t,o)),n}return i._value=e,i}function P3(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&$3(t,o)),n}return i._value=e,i}function D3(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ro(t);return this.tween(n,(r.local?T3:P3)(r,e))}function k3(t,e){return function(){Qu(this,t).delay=+e.apply(this,arguments)}}function E3(t,e){return e=+e,function(){Qu(this,t).delay=e}}function N3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?k3:E3)(e,t)):xe(this.node(),e).delay}function L3(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function I3(t,e){return e=+e,function(){ke(this,t).duration=e}}function C3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?L3:I3)(e,t)):xe(this.node(),e).duration}function R3(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function F3(t){var e=this._id;return arguments.length?this.each(R3(e,t)):xe(this.node(),e).ease}function z3(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function O3(t){if(typeof t!="function")throw new Error;return this.each(z3(this._id,t))}function G3(t){typeof t!="function"&&(t=d0(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Ye(r,this._parents,this._name,this._id)}function U3(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var c=e[s],u=n[s],f=c.length,h=a[s]=new Array(f),l,p=0;p<f;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<r;++s)a[s]=e[s];return new Ye(a,this._parents,this._name,this._id)}function B3(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Y3(t,e,n){var r,i,o=B3(e)?Qu:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function q3(t,e){var n=this._id;return arguments.length<2?xe(this.node(),n).on.on(t):this.each(Y3(n,t,e))}function W3(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function H3(){return this.on("end.remove",W3(this._id))}function X3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ou(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],c=s.length,u=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=s[l])&&(h=t.call(f,f.__data__,l,s))&&("__data__"in f&&(h.__data__=f.__data__),u[l]=h,Zo(u[l],e,n,l,u,xe(f,n)));return new Ye(o,this._parents,e,n)}function V3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=p0(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var c=r[s],u=c.length,f,h=0;h<u;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=xe(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&Zo(p,e,n,g,l,d);o.push(l),a.push(f)}return new Ye(o,a,e,n)}var j3=ii.prototype.constructor;function Z3(){return new j3(this._groups,this._parents)}function K3(t,e){var n,r,i;return function(){var o=ur(this,t),a=(this.style.removeProperty(t),ur(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function V0(t){return function(){this.style.removeProperty(t)}}function Q3(t,e,n){var r,i=n+"",o;return function(){var a=ur(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function J3(t,e,n){var r,i,o;return function(){var a=ur(this,t),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),ur(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s))}}function t5(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var c=ke(this,t),u=c.on,f=c.value[o]==null?s||(s=V0(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(a,i=f),c.on=r}}function e5(t,e,n){var r=(t+="")=="transform"?i3:X0;return e==null?this.styleTween(t,K3(t,r)).on("end.style."+t,V0(t)):typeof e=="function"?this.styleTween(t,J3(t,r,Ju(this,"style."+t,e))).each(t5(this._id,t)):this.styleTween(t,Q3(t,r,e),n).on("end.style."+t,null)}function n5(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function r5(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&n5(t,a,n)),r}return o._value=e,o}function i5(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,r5(t,e,n??""))}function o5(t){return function(){this.textContent=t}}function a5(t){return function(){var e=t(this);this.textContent=e??""}}function s5(t){return this.tween("text",typeof t=="function"?a5(Ju(this,"text",t)):o5(t==null?"":t+""))}function u5(t){return function(e){this.textContent=t.call(this,e)}}function c5(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&u5(i)),e}return r._value=t,r}function l5(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,c5(t))}function f5(){for(var t=this._name,e=this._id,n=j0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var f=xe(c,e);Zo(c,t,n,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ye(r,this._parents,t,n)}function h5(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var u=ke(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),u.on=e}),i===0&&o()})}var p5=0;function Ye(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function j0(){return++p5}var qe=ii.prototype;Ye.prototype={constructor:Ye,select:X3,selectAll:V3,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:G3,merge:U3,selection:Z3,transition:f5,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:q3,attr:M3,attrTween:D3,style:e5,styleTween:i5,text:s5,textTween:l5,remove:H3,tween:y3,delay:N3,duration:C3,ease:F3,easeVarying:O3,end:h5,[Symbol.iterator]:qe[Symbol.iterator]};function d5(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var g5={time:null,delay:0,duration:250,ease:d5};function m5(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function y5(t){var e,n;t instanceof Ye?(e=t._id,t=t._name):(e=j0(),(n=g5).time=Vu(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&Zo(c,t,e,u,a,n||m5(c,e));return new Ye(r,this._parents,t,e)}ii.prototype.interrupt=d3,ii.prototype.transition=y5;function b5(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ko(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function fr(t){return t=Ko(Math.abs(t)),t?t[1]:NaN}function v5(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function x5(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var _5=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qo(t){if(!(e=_5.exec(t)))throw new Error("invalid format: "+t);var e;return new tc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Qo.prototype=tc.prototype;function tc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}tc.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 w5(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Z0;function A5(t,e){var n=Ko(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Z0=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")+Ko(t,Math.max(0,e+o-1))[0]}function K0(t,e){var n=Ko(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Q0={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:b5,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>K0(t*100,e),r:K0,s:A5,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function J0(t){return t}var tp=Array.prototype.map,ep=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function M5(t){var e=t.grouping===void 0||t.thousands===void 0?J0:v5(tp.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?J0:x5(tp.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(h){h=Qo(h);var l=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,_=h.comma,v=h.precision,b=h.trim,x=h.type;x==="n"?(_=!0,x="g"):Q0[x]||(v===void 0&&(v=12),b=!0,x="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var A=g==="$"?n:g==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",T=g==="$"?r:/[%p]/.test(x)?a:"",D=Q0[x],k=/[defgprs%]/.test(x);v=v===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function E(S){var C=A,N=T,M,$,w;if(x==="c")N=D(S)+N,S="";else{S=+S;var P=S<0||1/S<0;if(S=isNaN(S)?c:D(Math.abs(S),v),b&&(S=w5(S)),P&&+S==0&&d!=="+"&&(P=!1),C=(P?d==="("?d:s:d==="-"||d==="("?"":d)+C,N=(x==="s"?ep[8+Z0/3]:"")+N+(P&&d==="("?")":""),k){for(M=-1,$=S.length;++M<$;)if(w=S.charCodeAt(M),48>w||w>57){N=(w===46?i+S.slice(M+1):S.slice(M))+N,S=S.slice(0,M);break}}}_&&!m&&(S=e(S,1/0));var I=C.length+S.length+N.length,L=I<y?new Array(y-I+1).join(l):"";switch(_&&m&&(S=e(L+S,L.length?y-N.length:1/0),L=""),p){case"<":S=C+S+N+L;break;case"=":S=C+L+S+N;break;case"^":S=L.slice(0,I=L.length>>1)+C+S+N+L.slice(I);break;default:S=L+C+S+N;break}return o(S)}return E.toString=function(){return h+""},E}function f(h,l){var p=u((h=Qo(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(fr(l)/3)))*3,g=Math.pow(10,-d),m=ep[8+d/3];return function(y){return p(g*y)+m}}return{format:u,formatPrefix:f}}var Jo,np,rp;$5({thousands:",",grouping:[3],currency:["$",""]});function $5(t){return Jo=M5(t),np=Jo.format,rp=Jo.formatPrefix,Jo}function S5(t){return Math.max(0,-fr(Math.abs(t)))}function T5(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fr(e)/3)))*3-fr(Math.abs(t)))}function P5(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,fr(e)-fr(t))+1}function ta(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const ip=Symbol("implicit");function op(){var t=new s0,e=[],n=[],r=ip;function i(o){let a=t.get(o);if(a===void 0){if(r!==ip)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new s0;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return op(e,n).unknown(r)},ta.apply(i,arguments),i}function ap(){var t=op().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,c=0,u=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+u*2),s&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),s&&(d=Math.round(d),a=Math.round(a));var m=Zx(l).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(s=!!l,h()):s},t.padding=function(l){return arguments.length?(c=Math.min(1,u=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(u=+l,h()):u},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return ap(e(),[r,i]).round(s).paddingInner(c).paddingOuter(u).align(f)},ta.apply(h(),arguments)}function sp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return sp(e())},t}function D5(){return sp(ap.apply(null,arguments).paddingInner(1))}function k5(t){return function(){return t}}function E5(t){return+t}var up=[0,1];function hr(t){return t}function ec(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:k5(isNaN(e)?NaN:.5)}function N5(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function L5(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=ec(i,r),o=n(a,o)):(r=ec(r,i),o=n(o,a)),function(s){return o(r(s))}}function I5(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=ec(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var c=a0(t,s,1,r)-1;return o[c](i[c](s))}}function C5(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function R5(){var t=up,e=up,n=Xu,r,i,o,a=hr,s,c,u;function f(){var l=Math.min(t.length,e.length);return a!==hr&&(a=N5(t[0],t[l-1])),s=l>2?I5:L5,c=u=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=s(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((u||(u=s(e,t.map(r),ve)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,E5),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=e3,f()},h.clamp=function(l){return arguments.length?(a=l?!0:hr,f()):a!==hr},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function F5(){return R5()(hr,hr)}function z5(t,e,n,r){var i=jx(t,e,n),o;switch(r=Qo(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=T5(i,a))&&(r.precision=o),rp(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=P5(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=S5(i))&&(r.precision=o-(r.type==="%")*2);break}}return np(r)}function cp(t){var e=t.domain;return t.ticks=function(n){var r=e();return Vx(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return z5(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],c,u,f=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);f-- >0;){if(u=Fu(a,s,n),u===c)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;c=u}return t},t}function lp(){var t=F5();return t.copy=function(){return C5(t,lp())},ta.apply(t,arguments),cp(t)}function fp(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[a0(r,c,0,n)]:o}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,s()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,s()):i.slice()},a.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return fp().domain([t,e]).range(i).unknown(o)},ta.apply(cp(a),arguments)}function hi(t,e,n){this.k=t,this.x=e,this.y=n}hi.prototype={constructor:hi,scale:function(t){return t===1?this:new hi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new hi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},hi.prototype;function ea(t){return Object.prototype.toString.call(t)==="[object Object]"}function hp(t,e){if(ea(t)===!1||ea(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;ea(r[a])&&ea(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var nc=function(t,e){return nc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},nc(t,e)};function We(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");nc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function O5(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{u(r.next(f))}catch(h){a(h)}}function c(f){try{u(r.throw(f))}catch(h){a(h)}}function u(f){f.done?o(f.value):i(f.value).then(s,c)}u((r=r.apply(t,[])).next())})}function pp(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function pr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function di(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function dr(t){return this instanceof dr?(this.v=t,this):new dr(t)}function G5(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,y){o.push([p,g,m,y])>1||c(p,g)})},d&&(i[p]=d(i[p])))}function c(p,d){try{u(r[p](d))}catch(g){l(o[0][3],g)}}function u(p){p.value instanceof dr?Promise.resolve(p.value.v).then(f,h):l(o[0][2],p)}function f(p){c("next",p)}function h(p){c("throw",p)}function l(p,d){p(d),o.shift(),o.length&&c(o[0][0],o[0][1])}}function U5(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof pr=="function"?pr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,c){a=t[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(u){o({value:u,done:s})},a)}}function Dt(t){return typeof t=="function"}function rc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var ic=rc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
8
4
  `+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
9
- `):"",this.name="UnsubscriptionError",this.errors=e}});function ps(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var _o=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=Kr(a),c=u.next();!c.done;c=u.next()){var s=c.value;s.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(Et(f))try{f()}catch(g){o=g instanceof ah?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=Kr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{b2(d)}catch(g){o=o??[],g instanceof ah?o=xo(xo([],vo(o)),vo(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new ah(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)b2(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&ps(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ps(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),m2=_o.EMPTY;function y2(t){return t instanceof _o||t&&"closed"in t&&Et(t.remove)&&Et(t.add)&&Et(t.unsubscribe)}function b2(t){Et(t)?t():t.unsubscribe()}var v2={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},VE={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,xo([t,e],vo(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function x2(t){VE.setTimeout(function(){throw t})}function uh(){}function ds(t){t()}var sh=function(t){on(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,y2(n)&&n.add(r)):r.destination=QE,r}return e.create=function(n,r,i){return new wo(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(_o),jE=Function.prototype.bind;function ch(t,e){return jE.call(t,e)}var ZE=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){gs(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){gs(r)}else gs(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){gs(n)}},t}(),wo=function(t){on(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Et(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var u;o&&v2.useDeprecatedNextContext?(u=Object.create(n),u.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&ch(n.next,u),error:n.error&&ch(n.error,u),complete:n.complete&&ch(n.complete,u)}):a=n}return o.destination=new ZE(a),o}return e}(sh);function gs(t){x2(t)}function KE(t){throw t}var QE={closed:!0,next:uh,error:KE,complete:uh},lh=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _2(t){return t}function JE(t){return t.length===0?_2:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var Te=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=eN(e)?e:new wo(e,n,r);return ds(function(){var a=i,u=a.operator,c=a.source;o.add(u?u.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=w2(n),new n(function(i,o){var a=new wo({next:function(u){try{e(u)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[lh]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return JE(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=w2(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function w2(t){var e;return(e=t??v2.Promise)!==null&&e!==void 0?e:Promise}function tN(t){return t&&Et(t.next)&&Et(t.error)&&Et(t.complete)}function eN(t){return t&&t instanceof sh||tN(t)&&y2(t)}function nN(t){return Et(t==null?void 0:t.lift)}function tr(t){return function(e){if(nN(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ao(t,e,n,r,i){return new rN(t,e,n,r,i)}var rN=function(t){on(e,t);function e(n,r,i,o,a,u){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=u,c._next=r?function(s){try{r(s)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(s){try{o(s)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(s){n.error(s)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(sh),iN=oh(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),$o=function(t){on(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new A2(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new iN},e.prototype.next=function(n){var r=this;ds(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Kr(r.currentObservers),u=a.next();!u.done;u=a.next()){var c=u.value;c.next(n)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ds(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ds(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?m2:(this.currentObservers=null,u.push(n),new _o(function(){r.currentObservers=null,ps(u,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new Te;return n.source=this,n},e.create=function(n,r){return new A2(n,r)},e}(Te),A2=function(t){on(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:m2},e}($o),fh={now:function(){return(fh.delegate||Date).now()},delegate:void 0},oN=function(t){on(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=fh);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,u=r._timestampProvider,c=r._windowTime;i||(o.push(n),!a&&o.push(u.now()+c)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,u=a.slice(),c=0;c<u.length&&!n.closed;c+=o?1:2)n.next(u[c]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,u=(a?1:2)*r;if(r<1/0&&u<o.length&&o.splice(0,o.length-u),!a){for(var c=i.now(),s=0,f=1;f<o.length&&o[f]<=c;f+=2)s=f;s&&o.splice(0,s+1)}},e}($o),aN=function(t){on(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(_o),$2={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,xo([t,e],vo(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},uN=function(t){on(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),$2.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&$2.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ps(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(aN),M2=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=fh.now,t}(),sN=function(t){on(e,t);function e(n,r){r===void 0&&(r=M2.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(M2);new sN(uN);function cN(t){return t&&Et(t.schedule)}function lN(t){return t[t.length-1]}function S2(t){return cN(lN(t))?t.pop():void 0}var T2=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function P2(t){return Et(t==null?void 0:t.then)}function D2(t){return Et(t[lh])}function k2(t){return Symbol.asyncIterator&&Et(t==null?void 0:t[Symbol.asyncIterator])}function E2(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function fN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var N2=fN();function L2(t){return Et(t==null?void 0:t[N2])}function C2(t){return HE(this,arguments,function(){var e,n,r,i;return g2(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Qr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,Qr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Qr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function I2(t){return Et(t==null?void 0:t.getReader)}function xn(t){if(t instanceof Te)return t;if(t!=null){if(D2(t))return hN(t);if(T2(t))return pN(t);if(P2(t))return dN(t);if(k2(t))return R2(t);if(L2(t))return gN(t);if(I2(t))return mN(t)}throw E2(t)}function hN(t){return new Te(function(e){var n=t[lh]();if(Et(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function pN(t){return new Te(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function dN(t){return new Te(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,x2)})}function gN(t){return new Te(function(e){var n,r;try{for(var i=Kr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function R2(t){return new Te(function(e){yN(t,e).catch(function(n){return e.error(n)})})}function mN(t){return R2(C2(t))}function yN(t,e){var n,r,i,o;return WE(this,void 0,void 0,function(){var a,u;return g2(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=XE(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=c.sent(),i={error:u},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function er(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function F2(t,e){return e===void 0&&(e=0),tr(function(n,r){n.subscribe(Ao(r,function(i){return er(r,t,function(){return r.next(i)},e)},function(){return er(r,t,function(){return r.complete()},e)},function(i){return er(r,t,function(){return r.error(i)},e)}))})}function z2(t,e){return e===void 0&&(e=0),tr(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function bN(t,e){return xn(t).pipe(z2(e),F2(e))}function vN(t,e){return xn(t).pipe(z2(e),F2(e))}function xN(t,e){return new Te(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function _N(t,e){return new Te(function(n){var r;return er(n,e,function(){r=t[N2](),er(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(u){n.error(u);return}a?n.complete():n.next(o)},0,!0)}),function(){return Et(r==null?void 0:r.return)&&r.return()}})}function O2(t,e){if(!t)throw new Error("Iterable cannot be null");return new Te(function(n){er(n,e,function(){var r=t[Symbol.asyncIterator]();er(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function wN(t,e){return O2(C2(t),e)}function AN(t,e){if(t!=null){if(D2(t))return bN(t,e);if(T2(t))return xN(t,e);if(P2(t))return vN(t,e);if(k2(t))return O2(t,e);if(L2(t))return _N(t,e);if(I2(t))return wN(t,e)}throw E2(t)}function $N(t,e){return e?AN(t,e):xn(t)}oh(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function G2(t,e){return tr(function(n,r){var i=0;n.subscribe(Ao(r,function(o){r.next(t.call(e,o,i++))}))})}function MN(t,e,n,r,i,o,a,u){var c=[],s=0,f=0,h=!1,l=function(){h&&!c.length&&!s&&e.complete()},p=function(g){return s<r?d(g):c.push(g)},d=function(g){s++;var m=!1;xn(n(g,f++)).subscribe(Ao(e,function(b){e.next(b)},function(){m=!0},void 0,function(){if(m)try{s--;for(var b=function(){var x=c.shift();a||d(x)};c.length&&s<r;)b();l()}catch(x){e.error(x)}}))};return t.subscribe(Ao(e,p,function(){h=!0,l()})),function(){}}function U2(t,e,n){return n===void 0&&(n=1/0),Et(e)?U2(function(r,i){return G2(function(o,a){return e(r,o,i,a)})(xn(t(r,i)))},n):(typeof e=="number"&&(n=e),tr(function(r,i){return MN(r,i,t,n)}))}function SN(t){return U2(_2,t)}function TN(){return SN(1)}function Y2(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return TN()($N(t,S2(t)))}function PN(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new $o}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,u=t.resetOnRefCountZero,c=u===void 0?!0:u;return function(s){var f,h,l,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},b=function(){m(),f=l=void 0,d=g=!1},x=function(){var _=f;b(),_==null||_.unsubscribe()};return tr(function(_,v){p++,!g&&!d&&m();var w=l=l??n();v.add(function(){p--,p===0&&!g&&!d&&(h=hh(x,c))}),w.subscribe(v),!f&&p>0&&(f=new wo({next:function(y){return w.next(y)},error:function(y){g=!0,m(),h=hh(b,i,y),w.error(y)},complete:function(){d=!0,m(),h=hh(b,a),w.complete()}}),xn(_).subscribe(f))})(s)}}function hh(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new wo({next:function(){i.unsubscribe(),t()}});return xn(e.apply(void 0,xo([],vo(n)))).subscribe(i)}}function DN(t,e,n){var r,i=!1;return r=t,PN({connector:function(){return new oN(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function kN(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=S2(t);return tr(function(r,i){(n?Y2(t,r,n):Y2(t,r)).subscribe(i)})}function EN(t){return tr(function(e,n){xn(t).subscribe(Ao(n,function(){return n.complete()},uh)),!n.closed&&e.subscribe(n)})}const ph=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=Wr.scaleDomain,scaleRange:i=Wr.scaleRange})=>{const o=r[0]??Wr.scaleDomain[0],a=r[1]??Wr.scaleDomain[1],u=i[0]??Wr.scaleRange[0],c=i[1]??Wr.scaleRange[1],s=o==="auto"?e:o,f=a==="auto"?t:a;let h=n*u,l=n*c;return h2().domain([s,f]).range([h,l])},B2=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return IE().domain(t).range(r).padding(n)},NN=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),p2().domain([-0,e+0]).range(i)};function LN({name:t,defaultParams:e,initFn:n}){const r=new $o,i=new $o,o=new WeakMap;let a=()=>{},u,c=e;return{params$:i,name:t,defaultParams:e,init(){u&&(a=n(u)??(()=>{}),o.set(u.selection,u))},destroy(){a(),u&&(u.selection.remove(),u=void 0),r.next(void 0)},setPresetParams:s=>{c=d2(s,e)},setContext:s=>{u=s,u.observer.fullParams$=i.pipe(EN(r),kN({}),G2(f=>d2(f,c)),DN(1))}}}const dh=()=>function(t,e){return function(n){return class{constructor(){const r=LN({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Mo=dh(),Pe=dh(),q2=dh();function W2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function CN(t,e){function n(i){var u;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&&((u=o==null?void 0:o.firstChild)!=null&&u.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function Jr(t){return t.substring(0,4)!=="ease"?vi:Ly[t]??vi}function ms({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=jl().domain([0,1]).range([0,t/2]),a=o(n);return Ym().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const ys=(t,e)=>e instanceof Function?e(t):Si(e)(t);function H2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function X2(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function IN(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return X2(e)}function Pt(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function RN(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}function gh({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function ft(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function ti(t,e){const r=Math.random().toString(36).substr(2,5);return ft(t,e,r)}function V2({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r}){const i=new pt,o=new nt(a=>{q({dataFormatter:t,computedData:n}).pipe(R(i),U(async u=>u)).subscribe(u=>{const s=u.computedData[0]?u.computedData[0].length-1:0,f=u.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-u.dataFormatter.groupAxis.scalePadding:u.dataFormatter.groupAxis.scaleDomain[0]-u.dataFormatter.groupAxis.scalePadding,h=u.dataFormatter.groupAxis.scaleDomain[1]==="auto"?s+u.dataFormatter.groupAxis.scalePadding:u.dataFormatter.groupAxis.scaleDomain[1]+u.dataFormatter.groupAxis.scalePadding,p=(u.dataFormatter.grid.seriesType==="row"?(u.computedData[0]??[]).map(d=>d.groupLabel):u.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=f&&g<=h);a.next(p)})});return new nt(a=>{q({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(R(i),U(async u=>u)).subscribe(u=>{const c=u.dataFormatter.valueAxis.position==="right"||u.dataFormatter.valueAxis.position==="bottom",s=NN({axisLabels:u.scaleRangeGroupLabels,axisWidth:u.axisSize.width,reverse:c}),f=l=>u.dataFormatter.groupAxis.position==="bottom"||u.dataFormatter.groupAxis.position==="top"?l.offsetX-u.fullChartParams.padding.left:l.offsetY-u.fullChartParams.padding.top,h=l=>{const p=f(l),d=s(p);return{groupIndex:d,groupLabel:u.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})}const bs="Lines",FN=ft(bs,"g"),zN=ft(bs,"path");function ON(t="curveLinear"){return Du().x(e=>e.axisX).y(e=>e.axisY).curve(Ly[t])}function GN(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function UN({selection:t,segmentData:e,linePath:n,params:r}){return t.selectAll("path").data(e,(o,a)=>o.length?`${o[0].id}_${o[o.length-1].id}`:a).join(o=>o.append("path").classed(zN,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),o=>o,o=>o.remove()).attr("stroke-width",r.lineWidth).attr("stroke",(o,a)=>o[0]&&o[0].color).attr("d",o=>n(o))}function YN({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function BN({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{j(a[o]).selectAll("rect").data([i]).join(u=>{const c=u.append("rect");return c.transition().duration(n).ease(Jr(r)).tween("tween",(s,f,h)=>l=>{const p=s.width*l;c.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),c},u=>u.attr("x",0).attr("y",0).attr("width",c=>c.width).attr("height",c=>c.height),u=>u.remove())})}const qN=Pe(bs,rr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new pt,o=ti(bs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new pt;n.gridAxesTransform$.pipe(R(i),O(x=>x.value),K()).subscribe(x=>{a.style("transform",x)}),n.gridGraphicTransform$.pipe(R(i),O(x=>x.value),K()).subscribe(x=>{c.transition().duration(50).style("transform",x)});const f=new nt(x=>{const _=n.fullParams$.pipe(R(i)).subscribe(v=>{if(!v)return;const w=ON(v.lineCurve);x.next(w)});return()=>{_.unsubscribe()}}),h=new nt(x=>{n.computedData$.pipe(R(i),U(async _=>_)).subscribe(_=>{const v=_[0]&&_[0][0]?_.map(w=>w[0].seriesLabel):[];x.next(v)})}),l=n.fullChartParams$.pipe(O(x=>x.transitionDuration),K()),p=n.fullChartParams$.pipe(O(x=>x.transitionEase),K());q({seriesLabels:h,axisSize:n.gridAxesSize$,transitionDuration:l,transitionEase:p}).pipe(R(i),U(async x=>x)).subscribe(x=>{const v=[{id:o,width:x.axisSize.width,height:x.axisSize.height}].concat(x.seriesLabels.map(w=>({id:`orbcharts__clipPath_${w}`,width:x.axisSize.width,height:x.axisSize.height})));BN({defsSelection:u,clipPathData:v,transitionDuration:x.transitionDuration,transitionEase:x.transitionEase})});const d=n.computedData$.pipe(O(x=>{const _=new Map;return x.flat().forEach(v=>_.set(v.id,v)),_})),g=V2({fullDataFormatter$:n.fullDataFormatter$,gridAxesSize$:n.gridAxesSize$,computedData$:n.computedData$,fullChartParams$:n.fullChartParams$}),m=n.fullChartParams$.pipe(R(i),O(x=>x.highlightTarget),K());q({seriesLabels:h,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,GroupDataMap:n.GroupDataMap$,linePath:f,params:n.fullParams$,highlightTarget:m,gridGroupPositionFn:g}).pipe(R(i),U(async x=>x)).subscribe(x=>{const _=c.selectAll("g").data(x.seriesLabels,(y,A)=>y),v=_.enter().append("g").classed(FN,!0);_.exit().remove();const w=_.merge(v).attr("clip-path",(y,A)=>`url(#orbcharts__clipPath_${y})`);w.each((y,A,M)=>{const $=GN(x.computedData[A]??[]);UN({selection:j(M[A]),linePath:x.linePath,segmentData:$,params:x.params}).on("mouseover",(S,L)=>{S.stopPropagation();const E=L[0]?L[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=x.gridGroupPositionFn(S),I=x.GroupDataMap.get(k).find(C=>C.seriesLabel===E)??L[0];r.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:x.highlightTarget,datum:I,series:x.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:x.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:S,data:x.computedData})}).on("mousemove",(S,L)=>{S.stopPropagation();const E=L[0]?L[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=x.gridGroupPositionFn(S),I=x.GroupDataMap.get(k).find(C=>C.seriesLabel===E)??L[0];r.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:x.highlightTarget,datum:I,series:x.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:x.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:S,data:x.computedData})}).on("mouseout",(S,L)=>{S.stopPropagation();const E=L[0]?L[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=x.gridGroupPositionFn(S),I=x.GroupDataMap.get(k).find(C=>C.seriesLabel===E)??L[0];r.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:x.highlightTarget,datum:I,series:x.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:x.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:S,data:x.computedData})}).on("click",(S,L)=>{S.stopPropagation();const E=L[0]?L[0].seriesLabel:"",{groupIndex:T,groupLabel:k}=x.gridGroupPositionFn(S),I=x.GroupDataMap.get(k).find(C=>C.seriesLabel===E)??L[0];r.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:x.highlightTarget,datum:I,series:x.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:x.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:S,data:x.computedData})})}),s.next(w)});const b=n.gridHighlight$.subscribe();return n.fullChartParams$.pipe(R(i),Bu(x=>x.highlightTarget==="series"),U(x=>q({graphicSelection:s,highlight:n.gridHighlight$,DataMap:d,fullChartParams:n.fullChartParams$}).pipe(R(i),U(async _=>_)))).subscribe(x=>{const _=x.DataMap.get(x.highlight[0]);YN({selection:x.graphicSelection,seriesLabel:_&&_.seriesLabel?_.seriesLabel:null,fullChartParams:x.fullChartParams})}),()=>{b.unsubscribe(),i.next(void 0)}}),vs="Bars",j2=ft(vs,"g"),Z2=ft(vs,"rect"),K2=.3;function WN({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function HN(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Hl().domain(e).range([-i/2+r,i/2-r])}function XN(t,e){return t<=1?0:e/(t-1)*K2}function VN(t,e){return t<=1?e:e*(1-K2)}function jN({selection:t,data:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:u,transformedBarRadius:c,delayGroup:s,transitionItem:f}){const h=u/2;return t.selectAll(`g.${j2}`).data(e,(d,g)=>r[g]).join(d=>d.append("g").classed(j2,!0).attr("cursor","pointer"),d=>d,d=>d.remove()).attr("transform",(d,g)=>`translate(${d[0]?d[0].axisX:0}, 0)`).each((d,g,m)=>{j(m[g]).selectAll("rect").data(d,b=>b.id).join(b=>b.append("rect").classed(Z2,!0).attr("height",x=>0),b=>b,b=>b.remove()).attr("fill",b=>b.color).attr("y",b=>b.axisY<n?b.axisY:n).attr("x",b=>i(b.seriesLabel)).attr("width",u).attr("transform",`translate(${-h}, 0)`).attr("rx",c[0]).attr("ry",c[1]).transition().duration(f).ease(Jr(a.transitionEase)).delay((b,x)=>b.groupIndex*s).attr("height",b=>Math.abs(b.axisYFromZero))}).selectAll(`rect.${Z2}`)}function ZN({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(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 KN({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const QN=Pe(vs,Ph)(({selection:t,name:e,subject:n,observer:r})=>{const i=new pt,o=ti(vs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new pt;r.gridAxesTransform$.pipe(R(i),O(y=>y.value),K()).subscribe(y=>{a.style("transform",y)}),r.gridGraphicTransform$.pipe(R(i),O(y=>y.value),K()).subscribe(y=>{c.transition().duration(50).style("transform",y)});const f=r.visibleComputedData$.pipe(O(y=>y[0]&&y[0][0]?y[0][0].axisY-y[0][0].axisYFromZero:0),K()),h=new nt(y=>{q({computedData:r.computedData$,visibleComputedData:r.visibleComputedData$,params:r.fullParams$,gridAxesSize:r.gridAxesSize$}).pipe(U(async A=>A)).subscribe(A=>{const M=A.params.barWidth?A.params.barWidth:WN({axisWidth:A.gridAxesSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barAmountOfGroup:A.visibleComputedData.length,barPadding:A.params.barPadding,barGroupPadding:A.params.barGroupPadding});y.next(M)})}).pipe(R(i),K()),l=q({gridGraphicTransform:r.gridGraphicTransform$,barWidth:h,params:r.fullParams$}).pipe(R(i),U(async y=>y),O(y=>{const A=y.barWidth/2,M=y.params.barRadius===!0?A:y.params.barRadius===!1?0:typeof y.params.barRadius=="number"?y.params.barRadius:0,$=M==0?0:M/y.gridGraphicTransform.scale[0],P=M==0?0:M/y.gridGraphicTransform.scale[1];return[$,P]})),p=r.visibleComputedData$.pipe(R(i),O(y=>{const A=new Set;return y.forEach(M=>{M.forEach($=>{A.add($.seriesLabel)})}),Array.from(A)})),d=r.visibleComputedData$.pipe(R(i),O(y=>{const A=new Set;return y.forEach(M=>{M.forEach($=>{A.add($.groupLabel)})}),Array.from(A)})),g=new nt(y=>{q({seriesLabels:p,barWidth:h,params:r.fullParams$}).pipe(R(i),U(async A=>A)).subscribe(A=>{const M=HN(A.barWidth,A.seriesLabels,A.params);y.next(M)})}),m=r.fullChartParams$.pipe(R(i),O(y=>y.transitionDuration),K()),b=new nt(y=>{q({groupLabels:d,transitionDuration:m}).pipe(U(async A=>A)).subscribe(A=>{const M=XN(A.groupLabels.length,A.transitionDuration);y.next(M)})}).pipe(R(i),K()),x=new nt(y=>{q({groupLabels:d,transitionDuration:m}).pipe(U(async A=>A)).subscribe(A=>{const M=VN(A.groupLabels.length,A.transitionDuration);y.next(M)})}).pipe(R(i),K()),_=r.visibleComputedData$.pipe(R(i),O(y=>{const A=y.length,M=y.reduce((P,S)=>Math.max(P,S.length),0),$=new Array(M).fill(null).map(()=>new Array(A).fill(null));for(let P=0;P<A;P++)for(let S=0;S<M;S++)$[S][P]=y[P][S];return $}));r.gridAxesSize$.pipe(R(i)).subscribe(y=>{const A=[{id:o,width:y.width,height:y.height}];ZN({defsSelection:u,clipPathData:A})});const v=r.fullChartParams$.pipe(R(i),O(y=>y.highlightTarget),K());q({computedData:r.computedData$,barData$:_,zeroY:f,groupLabels:d,barScale:g,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:v,barWidth:h,transformedBarRadius:l,delayGroup:b,transitionItem:x,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(R(i),U(async y=>y)).subscribe(y=>{const A=jN({selection:c,data:y.barData$,zeroY:y.zeroY,groupLabels:y.groupLabels,barScale:y.barScale,params:y.params,chartParams:y.chartParams,barWidth:y.barWidth,transformedBarRadius:y.transformedBarRadius,delayGroup:y.delayGroup,transitionItem:y.transitionItem});A.on("mouseover",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.computedData})}).on("mousemove",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.computedData})}).on("mouseout",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.computedData})}).on("click",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.computedData})}),s.next(A)});const w=r.gridHighlight$.subscribe();return q({barSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(R(i),U(async y=>y)).subscribe(y=>{KN({selection:y.barSelection,ids:y.highlight,fullChartParams:y.fullChartParams})}),()=>{i.next(void 0),w.unsubscribe()}}),xs="BarStack",Q2=ft(xs,"g"),J2=ft(xs,"g-content"),tv=.3;function JN({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function tL(t,e){return t<=1?0:e/(t-1)*tv}function eL(t,e){return t<=1?e:e*(1-tv)}function nL({selection:t,data:e,zeroY:n,groupLabels:r,params:i,chartParams:o,barWidth:a,transformedBarRadius:u,delayGroup:c,transitionItem:s}){const f=a/2;return t.selectAll(`g.${Q2}`).data(e,(p,d)=>r[d]).join(p=>p.append("g").classed(Q2,!0).attr("cursor","pointer"),p=>p,p=>p.remove()).attr("transform",(p,d)=>`translate(${p[0]?p[0].axisX:0}, 0)`).each((p,d,g)=>{j(g[d]).selectAll("g").data(p,m=>m.id).join(m=>m.append("g").classed(J2,!0),m=>m,m=>m.remove()).each((m,b,x)=>{j(x[b]).selectAll("rect").data([m],_=>_.id).join(_=>_.append("rect").attr("y",v=>n).attr("height",v=>0),_=>_,_=>_.remove()).attr("rx",u[0]).attr("ry",u[1]).attr("fill",_=>_.color).attr("transform",`translate(${-f}, 0)`).attr("x",_=>0).attr("width",a).transition().duration(s).ease(Jr(o.transitionEase)).delay((_,v)=>_.groupIndex*c).attr("y",_=>_._barStartY).attr("height",_=>Math.abs(_._barHeight))})}).selectAll(`g.${J2}`)}function rL({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(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 iL({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const oL=Pe(xs,Dh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new pt,o=ti(xs,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new pt;r.gridAxesTransform$.pipe(R(i),O(y=>y.value),K()).subscribe(y=>{a.style("transform",y)}),r.gridGraphicTransform$.pipe(R(i),U(async y=>y.value),K()).subscribe(y=>{c.transition().duration(50).style("transform",y)});const f=r.visibleComputedData$.pipe(O(y=>y[0]&&y[0][0]?y[0][0].axisY-y[0][0].axisYFromZero:0),K()),h=new nt(y=>{q({computedData:r.computedData$,params:r.fullParams$,axisSize:r.gridAxesSize$}).pipe(U(async A=>A)).subscribe(A=>{const M=A.params.barWidth?A.params.barWidth:JN({axisWidth:A.axisSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barGroupPadding:A.params.barGroupPadding});y.next(M)})}).pipe(R(i),K()),l=q({gridGraphicTransform:r.gridGraphicTransform$,barWidth:h,params:r.fullParams$}).pipe(R(i),U(async y=>y),O(y=>{const A=y.barWidth/2,M=y.params.barRadius===!0?A:y.params.barRadius===!1?0:typeof y.params.barRadius=="number"?y.params.barRadius:0,$=M==0?0:M/y.gridGraphicTransform.scale[0],P=M==0?0:M/y.gridGraphicTransform.scale[1];return[$,P]})),p=r.visibleComputedData$.pipe(R(i),O(y=>{const A=new Set;return y.forEach(M=>{M.forEach($=>{A.add($.groupLabel)})}),Array.from(A)})),d=r.fullChartParams$.pipe(R(i),O(y=>y.transitionDuration),K()),g=new nt(y=>{q({groupLabels:p,transitionDuration:d}).pipe(U(async A=>A)).subscribe(A=>{const M=tL(A.groupLabels.length,A.transitionDuration);y.next(M)})}).pipe(R(i),K()),m=new nt(y=>{q({groupLabels:p,transitionDuration:d}).pipe(U(async A=>A)).subscribe(A=>{const M=eL(A.groupLabels.length,A.transitionDuration);y.next(M)})}).pipe(R(i),K()),b=r.visibleComputedData$.pipe(R(i),O(y=>{console.log("visibleComputedData",y);const A=y.length,M=y.reduce((P,S)=>Math.max(P,S.length),0),$=new Array(M).fill(null).map(()=>new Array(A).fill(null));for(let P=0;P<A;P++)for(let S=0;S<M;S++)$[S][P]=y[P][S];return $})),x=q({transposedVisibleData:b,dataFormatter:r.fullDataFormatter$}).pipe(R(i),U(async y=>y),O(y=>{const M=y.transposedVisibleData.length-1,$=y.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-y.dataFormatter.groupAxis.scalePadding:y.dataFormatter.groupAxis.scaleDomain[0]-y.dataFormatter.groupAxis.scalePadding,P=y.dataFormatter.groupAxis.scaleDomain[1]==="auto"?M+y.dataFormatter.groupAxis.scalePadding:y.dataFormatter.groupAxis.scaleDomain[1]+y.dataFormatter.groupAxis.scalePadding,S=y.transposedVisibleData.map(L=>L.filter((E,T)=>E.groupIndex>=$&&E.groupIndex<=P));if(S.flat().length){const L=S.flat().map(D=>D.axisYFromZero),E=Math.max(...L),T=S.map(D=>D.reduce((N,I)=>N+I.axisYFromZero,0)),k=Math.max(...T);return E/k}else return 1})),_=q({transposedVisibleData:b,yRatio:x,zeroY:f}).pipe(R(i),O(y=>(console.log(y.transposedVisibleData),y.transposedVisibleData.map(A=>{let M=y.zeroY;return A.map($=>{const P=M,S=$.axisYFromZero*y.yRatio;return M=M+S,{...$,_barStartY:P,_barHeight:S}})}))));r.gridAxesSize$.pipe(R(i)).subscribe(y=>{const A=[{id:o,width:y.width,height:y.height}];rL({defsSelection:u,clipPathData:A})});const v=r.fullChartParams$.pipe(R(i),O(y=>y.highlightTarget),K());q({graphicData:_,zeroY:f,groupLabels:p,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:v,barWidth:h,transformedBarRadius:l,delayGroup:g,transitionItem:m,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(R(i),U(async y=>y)).subscribe(y=>{const A=nL({selection:c,data:y.graphicData,zeroY:y.zeroY,groupLabels:y.groupLabels,params:y.params,chartParams:y.chartParams,barWidth:y.barWidth,transformedBarRadius:y.transformedBarRadius,delayGroup:y.delayGroup,transitionItem:y.transitionItem});A.on("mouseover",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.graphicData})}).on("mousemove",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.graphicData})}).on("mouseout",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.graphicData})}).on("click",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.graphicData})}),s.next(A)});const w=r.gridHighlight$.subscribe();return q({barSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(R(i),U(async y=>y)).subscribe(y=>{iL({selection:y.barSelection,ids:y.highlight,fullChartParams:y.fullChartParams})}),()=>{i.next(void 0),w.unsubscribe()}}),_s="BarsTriangle",ev=ft(_s,"g"),nv=ft(_s,"g-content"),rv=.3;function aL({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const o=(t/e-i)/n-r;return o>1?o:1}function uL(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Hl().domain(e).range([-i/2+r,i/2-r])}function sL(t,e){return t<=1?0:e/(t-1)*rv}function cL(t,e){return t<=1?e:e*(1-rv)}function lL({selection:t,barData:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:u,delayGroup:c,transitionItem:s}){const f=t.selectAll(`g.${ev}`).data(e,(g,m)=>r[m]),h=f.enter().append("g").classed(ev,!0).attr("cursor","pointer");f.exit().remove();const l=f.merge(h);h.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`),f.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`);const p=u/2;return l.each((g,m,b)=>{const x=j(b[m]).selectAll("g").data(g,v=>v.id),_=x.enter().append("g").classed(nv,!0);_.append("path").style("vector-effect","non-scaling-stroke").attr("height",v=>0).attr("d",v=>{const w=i(v.seriesLabel),y=n,A=y;return`M${w-u/2},${y} L${w},${A} ${w+u/2},${y}`}),x.merge(_).select("path").style("fill",v=>`url(#${v.linearGradientId})`).attr("stroke",v=>v.color).attr("transform",`translate(${-p}, 0)`).transition().duration(s).ease(Jr(a.transitionEase)).delay((v,w)=>v.groupIndex*c).attr("transform",`translate(${-p}, 0)`).attr("height",v=>Math.abs(v.axisYFromZero)).attr("d",v=>{const w=i(v.seriesLabel),y=n,A=v.axisY;return`M${w},${y} L${w+u/2},${A} ${w+u},${y}`}),x.exit().remove()}),l.selectAll(`g.${nv}`)}function fL({defsSelection:t,barData:e,params:n}){const r=t.selectAll("linearGradient").data(e[0]??[],o=>o.seriesLabel),i=r.enter().append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad");r.merge(i).attr("id",(o,a)=>o.linearGradientId).html((o,a)=>`
5
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function na(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var gi=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=pr(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){e={error:g}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(Dt(f))try{f()}catch(g){o=g instanceof ic?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var l=pr(h),p=l.next();!p.done;p=l.next()){var d=p.value;try{mp(d)}catch(g){o=o??[],g instanceof ic?o=di(di([],pi(o)),pi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}if(o)throw new ic(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)mp(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&na(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&na(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),dp=gi.EMPTY;function gp(t){return t instanceof gi||t&&"closed"in t&&Dt(t.remove)&&Dt(t.add)&&Dt(t.unsubscribe)}function mp(t){Dt(t)?t():t.unsubscribe()}var yp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},B5={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,di([t,e],pi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function bp(t){B5.setTimeout(function(){throw t})}function oc(){}function ra(t){t()}var ac=function(t){We(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,gp(n)&&n.add(r)):r.destination=H5,r}return e.create=function(n,r,i){return new mi(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(gi),Y5=Function.prototype.bind;function sc(t,e){return Y5.call(t,e)}var q5=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){ia(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){ia(r)}else ia(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){ia(n)}},t}(),mi=function(t){We(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Dt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&yp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&sc(n.next,s),error:n.error&&sc(n.error,s),complete:n.complete&&sc(n.complete,s)}):a=n}return o.destination=new q5(a),o}return e}(ac);function ia(t){bp(t)}function W5(t){throw t}var H5={closed:!0,next:oc,error:W5,complete:oc},uc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function vp(t){return t}function X5(t){return t.length===0?vp:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var _e=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=j5(e)?e:new mi(e,n,r);return ra(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=xp(n),new n(function(i,o){var a=new mi({next:function(s){try{e(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[uc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return X5(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=xp(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function xp(t){var e;return(e=t??yp.Promise)!==null&&e!==void 0?e:Promise}function V5(t){return t&&Dt(t.next)&&Dt(t.error)&&Dt(t.complete)}function j5(t){return t&&t instanceof ac||V5(t)&&gp(t)}function Z5(t){return Dt(t==null?void 0:t.lift)}function Sn(t){return function(e){if(Z5(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function yi(t,e,n,r,i){return new K5(t,e,n,r,i)}var K5=function(t){We(e,t);function e(n,r,i,o,a,s){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=r?function(u){try{r(u)}catch(f){n.error(f)}}:t.prototype._next,c._error=o?function(u){try{o(u)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(ac),Q5=rc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),bi=function(t){We(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new _p(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Q5},e.prototype.next=function(n){var r=this;ra(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=pr(r.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ra(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ra(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?dp:(this.currentObservers=null,s.push(n),new gi(function(){r.currentObservers=null,na(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new _e;return n.source=this,n},e.create=function(n,r){return new _p(n,r)},e}(_e),_p=function(t){We(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:dp},e}(bi),cc={now:function(){return(cc.delegate||Date).now()},delegate:void 0},J5=function(t){We(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=cc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,c=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+c)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),c=0;c<s.length&&!n.closed;c+=o?1:2)n.next(s[c]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var c=i.now(),u=0,f=1;f<o.length&&o[f]<=c;f+=2)u=f;u&&o.splice(0,u+1)}},e}(bi),t6=function(t){We(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(gi),wp={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,di([t,e],pi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},e6=function(t){We(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),wp.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&wp.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,na(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(t6),Ap=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=cc.now,t}(),n6=function(t){We(e,t);function e(n,r){r===void 0&&(r=Ap.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(Ap);new n6(e6);function r6(t){return t&&Dt(t.schedule)}function i6(t){return t[t.length-1]}function Mp(t){return r6(i6(t))?t.pop():void 0}var $p=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Sp(t){return Dt(t==null?void 0:t.then)}function Tp(t){return Dt(t[uc])}function Pp(t){return Symbol.asyncIterator&&Dt(t==null?void 0:t[Symbol.asyncIterator])}function Dp(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function o6(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var kp=o6();function Ep(t){return Dt(t==null?void 0:t[kp])}function Np(t){return G5(this,arguments,function(){var e,n,r,i;return pp(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,dr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,dr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,dr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Lp(t){return Dt(t==null?void 0:t.getReader)}function sn(t){if(t instanceof _e)return t;if(t!=null){if(Tp(t))return a6(t);if($p(t))return s6(t);if(Sp(t))return u6(t);if(Pp(t))return Ip(t);if(Ep(t))return c6(t);if(Lp(t))return l6(t)}throw Dp(t)}function a6(t){return new _e(function(e){var n=t[uc]();if(Dt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function s6(t){return new _e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function u6(t){return new _e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,bp)})}function c6(t){return new _e(function(e){var n,r;try{for(var i=pr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Ip(t){return new _e(function(e){f6(t,e).catch(function(n){return e.error(n)})})}function l6(t){return Ip(Np(t))}function f6(t,e){var n,r,i,o;return O5(this,void 0,void 0,function(){var a,s;return pp(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=U5(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Tn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Cp(t,e){return e===void 0&&(e=0),Sn(function(n,r){n.subscribe(yi(r,function(i){return Tn(r,t,function(){return r.next(i)},e)},function(){return Tn(r,t,function(){return r.complete()},e)},function(i){return Tn(r,t,function(){return r.error(i)},e)}))})}function Rp(t,e){return e===void 0&&(e=0),Sn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function h6(t,e){return sn(t).pipe(Rp(e),Cp(e))}function p6(t,e){return sn(t).pipe(Rp(e),Cp(e))}function d6(t,e){return new _e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function g6(t,e){return new _e(function(n){var r;return Tn(n,e,function(){r=t[kp](),Tn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Dt(r==null?void 0:r.return)&&r.return()}})}function Fp(t,e){if(!t)throw new Error("Iterable cannot be null");return new _e(function(n){Tn(n,e,function(){var r=t[Symbol.asyncIterator]();Tn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function m6(t,e){return Fp(Np(t),e)}function y6(t,e){if(t!=null){if(Tp(t))return h6(t,e);if($p(t))return d6(t,e);if(Sp(t))return p6(t,e);if(Pp(t))return Fp(t,e);if(Ep(t))return g6(t,e);if(Lp(t))return m6(t,e)}throw Dp(t)}function b6(t,e){return e?y6(t,e):sn(t)}rc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function zp(t,e){return Sn(function(n,r){var i=0;n.subscribe(yi(r,function(o){r.next(t.call(e,o,i++))}))})}function v6(t,e,n,r,i,o,a,s){var c=[],u=0,f=0,h=!1,l=function(){h&&!c.length&&!u&&e.complete()},p=function(g){return u<r?d(g):c.push(g)},d=function(g){u++;var m=!1;sn(n(g,f++)).subscribe(yi(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{u--;for(var y=function(){var _=c.shift();a||d(_)};c.length&&u<r;)y();l()}catch(_){e.error(_)}}))};return t.subscribe(yi(e,p,function(){h=!0,l()})),function(){}}function Op(t,e,n){return n===void 0&&(n=1/0),Dt(e)?Op(function(r,i){return zp(function(o,a){return e(r,o,i,a)})(sn(t(r,i)))},n):(typeof e=="number"&&(n=e),Sn(function(r,i){return v6(r,i,t,n)}))}function x6(t){return Op(vp,t)}function _6(){return x6(1)}function Gp(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return _6()(b6(t,Mp(t)))}function w6(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new bi}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,c=s===void 0?!0:s;return function(u){var f,h,l,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),f=l=void 0,d=g=!1},_=function(){var v=f;y(),v==null||v.unsubscribe()};return Sn(function(v,b){p++,!g&&!d&&m();var x=l=l??n();b.add(function(){p--,p===0&&!g&&!d&&(h=lc(_,c))}),x.subscribe(b),!f&&p>0&&(f=new mi({next:function(A){return x.next(A)},error:function(A){g=!0,m(),h=lc(y,i,A),x.error(A)},complete:function(){d=!0,m(),h=lc(y,a),x.complete()}}),sn(v).subscribe(f))})(u)}}function lc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new mi({next:function(){i.unsubscribe(),t()}});return sn(e.apply(void 0,di([],pi(n)))).subscribe(i)}}function A6(t,e,n){var r,i=!1;return r=t,w6({connector:function(){return new J5(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function M6(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Mp(t);return Sn(function(r,i){(n?Gp(t,r,n):Gp(t,r)).subscribe(i)})}function $6(t){return Sn(function(e,n){sn(t).subscribe(yi(n,function(){return n.complete()},oc)),!n.closed&&e.subscribe(n)})}const fc=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=sr.scaleDomain,scaleRange:i=sr.scaleRange})=>{const o=r[0]??sr.scaleDomain[0],a=r[1]??sr.scaleDomain[1],s=i[0]??sr.scaleRange[0],c=i[1]??sr.scaleRange[1],u=o==="auto"?e:o,f=a==="auto"?t:a;let h=n*s,l=n*c;return lp().domain([u,f]).range([h,l])},Up=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return D5().domain(t).range(r).padding(n)},S6=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),fp().domain([-0,e+0]).range(i)};function T6({name:t,defaultParams:e,initFn:n}){const r=new bi,i=new bi,o=new WeakMap;let a=()=>{},s,c=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:u=>{c=hp(u,e)},setContext:u=>{s=u,s.observer.fullParams$=i.pipe($6(r),M6({}),zp(f=>hp(f,c)),A6(1))}}}const oa=()=>function(t,e){return function(n){return class{constructor(){const r=T6({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},vi=oa(),we=oa(),P6=oa(),Bp=oa();function xt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Yp(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function aa(t){let e,n,r;t.length!==2?(e=xt,n=(s,c)=>xt(t(s),c),r=(s,c)=>t(s)-c):(e=t===xt||t===Yp?t:D6,n=t,r=t);function i(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<0?u=h+1:f=h}while(u<f)}return u}function o(s,c,u=0,f=s.length){if(u<f){if(e(c,c)!==0)return f;do{const h=u+f>>>1;n(s[h],c)<=0?u=h+1:f=h}while(u<f)}return u}function a(s,c,u=0,f=s.length){const h=i(s,c,u,f-1);return h>u&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:i,center:a,right:o}}function D6(){return 0}function sa(t){return t===null?NaN:+t}function*k6(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const qp=aa(xt),Wp=qp.right,E6=qp.left,N6=aa(sa).center,Pn=Wp;function L6(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=hc(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const Hp=Xp(hc),I6=Xp(C6);function Xp(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),c=r&&t(r),u=i.slice();return s&&c?(gr(s,u,i,o,a),gr(s,i,u,o,a),gr(s,u,i,o,a),mr(c,i,u,o,a),mr(c,u,i,o,a),mr(c,i,u,o,a)):s?(gr(s,i,u,o,a),gr(s,u,i,o,a),gr(s,i,u,o,a)):c&&(mr(c,i,u,o,a),mr(c,u,i,o,a),mr(c,i,u,o,a)),e}}function gr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function mr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function C6(t){const e=hc(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function hc(t){const e=Math.floor(t);if(e===t)return R6(t);const n=t-e,r=2*t+1;return(i,o,a,s,c)=>{if(!((s-=c)>=a))return;let u=e*o[a];const f=c*e,h=f+c;for(let l=a,p=a+f;l<p;l+=c)u+=o[Math.min(s,l)];for(let l=a,p=s;l<=p;l+=c)u+=o[Math.min(s,l+f)],i[l]=(u+n*(o[Math.max(a,l-h)]+o[Math.min(s,l+h)]))/r,u-=o[Math.max(a,l-f)]}}function R6(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const c=a*t;for(let u=i,f=i+c;u<f;u+=a)s+=r[Math.min(o,u)];for(let u=i,f=o;u<=f;u+=a)s+=r[Math.min(o,u+c)],n[u]=s/e,s-=r[Math.max(i,u-c)]}}function ua(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function F6(t){return t.length|0}function z6(t){return!(t>0)}function O6(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function G6(t){return e=>t(...e)}function U6(...t){const e=typeof t[t.length-1]=="function"&&G6(t.pop());t=t.map(O6);const n=t.map(F6),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(z6))return o;for(;;){o.push(i.map((s,c)=>t[c][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function B6(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function Vp(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function jp(t,e){const n=Vp(t,e);return n&&Math.sqrt(n)}function xi(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class kt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function Y6(t,e){const n=new kt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function q6(t,e){const n=new kt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class _i extends Map{constructor(e,n=Qp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(pc(this,e))}has(e){return super.has(pc(this,e))}set(e,n){return super.set(Zp(this,e),n)}delete(e){return super.delete(Kp(this,e))}}class Dn extends Set{constructor(e,n=Qp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(pc(this,e))}add(e){return super.add(Zp(this,e))}delete(e){return super.delete(Kp(this,e))}}function pc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Zp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Kp({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Qp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function yr(t){return t}function Jp(t,...e){return br(t,yr,yr,e)}function td(t,...e){return br(t,Array.from,yr,e)}function ed(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function W6(t,...e){return ed(td(t,...e),e)}function H6(t,e,...n){return ed(rd(t,e,...n),n)}function nd(t,e,...n){return br(t,yr,e,n)}function rd(t,e,...n){return br(t,Array.from,e,n)}function X6(t,...e){return br(t,yr,id,e)}function V6(t,...e){return br(t,Array.from,id,e)}function id(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function br(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new _i,c=r[a++];let u=-1;for(const f of o){const h=c(f,++u,o),l=s.get(h);l?l.push(f):s.set(h,[f])}for(const[f,h]of s)s.set(f,i(h,a));return e(s)}(t,0)}function od(t,e){return Array.from(e,n=>t[n])}function dc(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=vr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>vr(n[i],n[o]))),od(t,r)}return t.sort(gc(n))}function gc(t=xt){if(t===xt)return vr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function vr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function j6(t,e,n){return(e.length!==2?dc(nd(t,e,n),([r,i],[o,a])=>xt(i,a)||xt(r,o)):dc(Jp(t,n),([r,i],[o,a])=>e(i,a)||xt(r,o))).map(([r])=>r)}var Z6=Array.prototype,K6=Z6.slice;function mc(t){return()=>t}const Q6=Math.sqrt(50),J6=Math.sqrt(10),t8=Math.sqrt(2);function ca(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Q6?10:o>=J6?5:o>=t8?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?ca(t,e,n*2):[s,c,u]}function kn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?ca(e,t,n):ca(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)c[u]=(o-u)/-a;else for(let u=0;u<s;++u)c[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)c[u]=(i+u)/-a;else for(let u=0;u<s;++u)c[u]=(i+u)*a;return c}function En(t,e,n){return e=+e,t=+t,n=+n,ca(t,e,n)[2]}function la(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?En(e,t,n):En(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function yc(t,e,n){let r;for(;;){const i=En(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function bc(t){return Math.max(1,Math.ceil(Math.log(ua(t))/Math.LN2)+1)}function ad(){var t=yr,e=xi,n=bc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,c,u=new Array(a);for(o=0;o<a;++o)u[o]=t(i[o],o,i);var f=e(u),h=f[0],l=f[1],p=n(u,h,l);if(!Array.isArray(p)){const v=l,b=+p;if(e===xi&&([h,l]=yc(h,l,b)),p=kn(h,l,b),p[0]<=h&&(c=En(h,l,b)),p[p.length-1]>=l)if(v>=l&&e===xi){const x=En(h,l,b);isFinite(x)&&(x>0?l=(Math.floor(l/x)+1)*x:x<0&&(l=(Math.ceil(l*-x)+1)/-x))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>l;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var y=new Array(d+1),_;for(o=0;o<=d;++o)_=y[o]=[],_.x0=o>0?p[o-1]:h,_.x1=o<d?p[o]:l;if(isFinite(c)){if(c>0)for(o=0;o<a;++o)(s=u[o])!=null&&h<=s&&s<=l&&y[Math.min(d,Math.floor((s-h)/c))].push(i[o]);else if(c<0){for(o=0;o<a;++o)if((s=u[o])!=null&&h<=s&&s<=l){const v=Math.floor((h-s)*c);y[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=u[o])!=null&&h<=s&&s<=l&&y[Pn(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:mc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:mc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:mc(Array.isArray(i)?K6.call(i):i),r):n},r}function wi(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function vc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function fa(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function xc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ha(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?vr:gc(i);r>n;){if(r-n>600){const c=r-n+1,u=e-n+1,f=Math.log(c),h=.5*Math.exp(2*f/3),l=.5*Math.sqrt(f*h*(c-h)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(e-u*h/c+l)),d=Math.min(r,Math.floor(e+(c-u)*h/c+l));ha(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Ai(t,n,e),i(t[r],o)>0&&Ai(t,n,r);a<s;){for(Ai(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ai(t,n,s):(++s,Ai(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ai(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function sd(t,e=xt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?xt(a,i)>0:xt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Mi(t,e,n){if(t=Float64Array.from(k6(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return fa(t);if(e>=1)return wi(t);var r,i=(r-1)*e,o=Math.floor(i),a=wi(ha(t,o).subarray(0,o+1)),s=fa(t.subarray(o+1));return a+(s-a)*(i-o)}}function ud(t,e,n=sa){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function cd(t,e,n=sa){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,c)=>sa(n(t[c],c,t))),e<=0)return xc(r);if(e>=1)return vc(r);var r,i=Uint32Array.from(t,(s,c)=>c),o=r.length-1,a=Math.floor(o*e);return ha(i,a,0,o,(s,c)=>vr(r[s],r[c])),a=sd(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function e8(t,e,n){const r=ua(t),i=Mi(t,.75)-Mi(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function n8(t,e,n){const r=ua(t),i=jp(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function r8(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function i8(t,e){return Mi(t,.5,e)}function o8(t,e){return cd(t,.5,e)}function*a8(t){for(const e of t)yield*e}function _c(t){return Array.from(a8(t))}function s8(t,e){const n=new _i;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function u8(t,e=c8){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function c8(t,e){return[t,e]}function un(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function l8(t,e=xt){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=xt);const i=(s,c)=>e(n[s],n[c]);let o,a;return t=Uint32Array.from(n,(s,c)=>c),t.sort(e===xt?(s,c)=>vr(n[s],n[c]):gc(i)),t.forEach((s,c)=>{const u=i(s,o===void 0?s:o);u>=0?((o===void 0||u>0)&&(o=s,a=c),r[s]=a):r[s]=NaN}),r}function f8(t,e=xt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?xt(a,i)<0:xt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function ld(t,e=xt){if(e.length===1)return xc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function h8(t,e=xt){if(e.length===1)return vc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function p8(t,e){const n=ld(t,e);return n<0?void 0:n}const d8=fd(Math.random);function fd(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function g8(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function hd(t){if(!(o=t.length))return[];for(var e=-1,n=fa(t,m8),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function m8(t){return t.length}function y8(){return hd(arguments)}function b8(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function v8(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function x8(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function _8(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function w8(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function A8(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function M8(t,...e){t=new Dn(t);for(const n of e)for(const r of n)t.delete(r);return t}function $8(t,e){const n=e[Symbol.iterator](),r=new Dn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function S8(t,...e){t=new Dn(t),e=e.map(T8);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function T8(t){return t instanceof Dn?t:new Dn(t)}function pd(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=dd(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const c=dd(a);if(r.add(c),Object.is(o,c))break}}return!0}function dd(t){return t!==null&&typeof t=="object"?t.valueOf():t}function P8(t,e){return pd(e,t)}function D8(...t){const e=new Dn;for(const n of t)for(const r of n)e.add(r);return e}function k8(t){return t}var pa=1,da=2,wc=3,$i=4,gd=1e-6;function E8(t){return"translate("+t+",0)"}function N8(t){return"translate(0,"+t+")"}function L8(t){return e=>+t(e)}function I8(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function C8(){return!this.__axis}function ga(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===pa||t===$i?-1:1,f=t===$i||t===da?"x":"y",h=t===pa||t===wc?E8:N8;function l(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):k8),m=Math.max(o,0)+s,y=e.range(),_=+y[0]+c,v=+y[y.length-1]+c,b=(e.bandwidth?I8:L8)(e.copy(),c),x=p.selection?p.selection():p,A=x.selectAll(".domain").data([null]),T=x.selectAll(".tick").data(d,e).order(),D=T.exit(),k=T.enter().append("g").attr("class","tick"),E=T.select("line"),S=T.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(k),E=E.merge(k.append("line").attr("stroke","currentColor").attr(f+"2",u*o)),S=S.merge(k.append("text").attr("fill","currentColor").attr(f,u*m).attr("dy",t===pa?"0em":t===wc?"0.71em":"0.32em")),p!==x&&(A=A.transition(p),T=T.transition(p),E=E.transition(p),S=S.transition(p),D=D.transition(p).attr("opacity",gd).attr("transform",function(C){return isFinite(C=b(C))?h(C+c):this.getAttribute("transform")}),k.attr("opacity",gd).attr("transform",function(C){var N=this.parentNode.__axis;return h((N&&isFinite(N=N(C))?N:b(C))+c)})),D.remove(),A.attr("d",t===$i||t===da?a?"M"+u*a+","+_+"H"+c+"V"+v+"H"+u*a:"M"+c+","+_+"V"+v:a?"M"+_+","+u*a+"V"+c+"H"+v+"V"+u*a:"M"+_+","+c+"H"+v),T.attr("opacity",1).attr("transform",function(C){return h(b(C)+c)}),E.attr(f+"2",u*o),S.attr(f,u*m).text(g),x.filter(C8).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===da?"start":t===$i?"end":"middle"),x.each(function(){this.__axis=b})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(i=p,l):i},l.tickSize=function(p){return arguments.length?(o=a=+p,l):o},l.tickSizeInner=function(p){return arguments.length?(o=+p,l):o},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(s=+p,l):s},l.offset=function(p){return arguments.length?(c=+p,l):c},l}function md(t){return ga(pa,t)}function R8(t){return ga(da,t)}function F8(t){return ga(wc,t)}function Ac(t){return ga($i,t)}var z8={value:()=>{}};function Nn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ma(n)}function ma(t){this._=t}function O8(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ma.prototype=Nn.prototype={constructor:ma,on:function(t,e){var n=this._,r=O8(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=G8(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=yd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=yd(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ma(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function G8(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function yd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=z8,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Mc="http://www.w3.org/1999/xhtml";const $c={svg:"http://www.w3.org/2000/svg",xhtml:Mc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Si(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),$c.hasOwnProperty(e)?{space:$c[e],local:t}:t}function U8(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Mc&&e.documentElement.namespaceURI===Mc?e.createElement(t):e.createElementNS(n,t)}}function B8(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ya(t){var e=Si(t);return(e.local?B8:U8)(e)}function Y8(){}function ba(t){return t==null?Y8:function(){return this.querySelector(t)}}function q8(t){typeof t!="function"&&(t=ba(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),c,u,f=0;f<a;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),s[f]=u);return new Bt(r,this._parents)}function bd(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function W8(){return[]}function Sc(t){return t==null?W8:function(){return this.querySelectorAll(t)}}function H8(t){return function(){return bd(t.apply(this,arguments))}}function X8(t){typeof t=="function"?t=H8(t):t=Sc(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(r.push(t.call(c,c.__data__,u,a)),i.push(c));return new Bt(r,i)}function Tc(t){return function(){return this.matches(t)}}function vd(t){return function(e){return e.matches(t)}}var V8=Array.prototype.find;function j8(t){return function(){return V8.call(this.children,t)}}function Z8(){return this.firstElementChild}function K8(t){return this.select(t==null?Z8:j8(typeof t=="function"?t:vd(t)))}var Q8=Array.prototype.filter;function J8(){return Array.from(this.children)}function t4(t){return function(){return Q8.call(this.children,t)}}function e4(t){return this.selectAll(t==null?J8:t4(typeof t=="function"?t:vd(t)))}function n4(t){typeof t!="function"&&(t=Tc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Bt(r,this._parents)}function xd(t){return new Array(t.length)}function r4(){return new Bt(this._enter||this._groups.map(xd),this._parents)}function va(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}va.prototype={constructor:va,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function i4(t){return function(){return t}}function o4(t,e,n,r,i,o){for(var a=0,s,c=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new va(t,o[a]);for(;a<c;++a)(s=e[a])&&(i[a]=s)}function a4(t,e,n,r,i,o,a){var s,c,u=new Map,f=e.length,h=o.length,l=new Array(f),p;for(s=0;s<f;++s)(c=e[s])&&(l[s]=p=a.call(c,c.__data__,s,e)+"",u.has(p)?i[s]=c:u.set(p,c));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(c=u.get(p))?(r[s]=c,c.__data__=o[s],u.delete(p)):n[s]=new va(t,o[s]);for(s=0;s<f;++s)(c=e[s])&&u.get(l[s])===c&&(i[s]=c)}function s4(t){return t.__data__}function u4(t,e){if(!arguments.length)return Array.from(this,s4);var n=e?a4:o4,r=this._parents,i=this._groups;typeof t!="function"&&(t=i4(t));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],h=i[u],l=h.length,p=c4(t.call(f,f&&f.__data__,u,r)),d=p.length,g=s[u]=new Array(d),m=a[u]=new Array(d),y=c[u]=new Array(l);n(f,h,g,m,y,p,e);for(var _=0,v=0,b,x;_<d;++_)if(b=g[_]){for(_>=v&&(v=_+1);!(x=m[v])&&++v<d;);b._next=x||null}}return a=new Bt(a,r),a._enter=s,a._exit=c,a}function c4(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function l4(){return new Bt(this._exit||this._groups.map(xd),this._parents)}function f4(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function h4(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),c=0;c<a;++c)for(var u=n[c],f=r[c],h=u.length,l=s[c]=new Array(h),p,d=0;d<h;++d)(p=u[d]||f[d])&&(l[d]=p);for(;c<i;++c)s[c]=n[c];return new Bt(s,this._parents)}function p4(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function d4(t){t||(t=g4);function e(h,l){return h&&l?t(h.__data__,l.__data__):!h-!l}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,c=i[o]=new Array(s),u,f=0;f<s;++f)(u=a[f])&&(c[f]=u);c.sort(e)}return new Bt(i,this._parents).order()}function g4(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function m4(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function y4(){return Array.from(this)}function b4(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function v4(){let t=0;for(const e of this)++t;return t}function x4(){return!this.node()}function _4(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function w4(t){return function(){this.removeAttribute(t)}}function A4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function M4(t,e){return function(){this.setAttribute(t,e)}}function $4(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function S4(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function T4(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function P4(t,e){var n=Si(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?A4:w4:typeof e=="function"?n.local?T4:S4:n.local?$4:M4)(n,e))}function Pc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function D4(t){return function(){this.style.removeProperty(t)}}function k4(t,e,n){return function(){this.style.setProperty(t,e,n)}}function E4(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function N4(t,e,n){return arguments.length>1?this.each((e==null?D4:typeof e=="function"?E4:k4)(t,e,n??"")):Ln(this.node(),t)}function Ln(t,e){return t.style.getPropertyValue(e)||Pc(t).getComputedStyle(t,null).getPropertyValue(e)}function L4(t){return function(){delete this[t]}}function I4(t,e){return function(){this[t]=e}}function C4(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function R4(t,e){return arguments.length>1?this.each((e==null?L4:typeof e=="function"?C4:I4)(t,e)):this.node()[t]}function _d(t){return t.trim().split(/^|\s+/)}function Dc(t){return t.classList||new wd(t)}function wd(t){this._node=t,this._names=_d(t.getAttribute("class")||"")}wd.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ad(t,e){for(var n=Dc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Md(t,e){for(var n=Dc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function F4(t){return function(){Ad(this,t)}}function z4(t){return function(){Md(this,t)}}function O4(t,e){return function(){(e.apply(this,arguments)?Ad:Md)(this,t)}}function G4(t,e){var n=_d(t+"");if(arguments.length<2){for(var r=Dc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?O4:e?F4:z4)(n,e))}function U4(){this.textContent=""}function B4(t){return function(){this.textContent=t}}function Y4(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function q4(t){return arguments.length?this.each(t==null?U4:(typeof t=="function"?Y4:B4)(t)):this.node().textContent}function W4(){this.innerHTML=""}function H4(t){return function(){this.innerHTML=t}}function X4(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function V4(t){return arguments.length?this.each(t==null?W4:(typeof t=="function"?X4:H4)(t)):this.node().innerHTML}function j4(){this.nextSibling&&this.parentNode.appendChild(this)}function Z4(){return this.each(j4)}function K4(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Q4(){return this.each(K4)}function J4(t){var e=typeof t=="function"?t:ya(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function t7(){return null}function e7(t,e){var n=typeof t=="function"?t:ya(t),r=e==null?t7:typeof e=="function"?e:ba(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function n7(){var t=this.parentNode;t&&t.removeChild(this)}function r7(){return this.each(n7)}function i7(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function o7(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function a7(t){return this.select(t?o7:i7)}function s7(t){return arguments.length?this.property("__data__",t):this.node().__data__}function u7(t){return function(e){t.call(this,e,this.__data__)}}function c7(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function l7(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function f7(t,e,n){return function(){var r=this.__on,i,o=u7(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function h7(t,e,n){var r=c7(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,f;c<u;++c)for(i=0,f=s[c];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?f7:l7,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function $d(t,e,n){var r=Pc(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function p7(t,e){return function(){return $d(this,t,e)}}function d7(t,e){return function(){return $d(this,t,e.apply(this,arguments))}}function g7(t,e){return this.each((typeof e=="function"?d7:p7)(t,e))}function*m7(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var kc=[null];function Bt(t,e){this._groups=t,this._parents=e}function In(){return new Bt([[document.documentElement]],kc)}function y7(){return this}Bt.prototype=In.prototype={constructor:Bt,select:q8,selectAll:X8,selectChild:K8,selectChildren:e4,filter:n4,data:u4,enter:r4,exit:l4,join:f4,merge:h4,selection:y7,order:p4,sort:d4,call:m4,nodes:y4,node:b4,size:v4,empty:x4,each:_4,attr:P4,style:N4,property:R4,classed:G4,text:q4,html:V4,raise:Z4,lower:Q4,append:J4,insert:e7,remove:r7,clone:a7,datum:s7,on:h7,dispatch:g7,[Symbol.iterator]:m7};function Z(t){return typeof t=="string"?new Bt([[document.querySelector(t)]],[document.documentElement]):new Bt([[t]],kc)}function b7(t){return Z(ya(t).call(document.documentElement))}var v7=0;function Sd(){return new Ec}function Ec(){this._="@"+(++v7).toString(36)}Ec.prototype=Sd.prototype={constructor:Ec,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Td(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ae(t,e){if(t=Td(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function x7(t,e){return t.target&&(t=Td(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ae(n,e))}function _7(t){return typeof t=="string"?new Bt([document.querySelectorAll(t)],[document.documentElement]):new Bt([bd(t)],kc)}const w7={passive:!1},Ti={capture:!0,passive:!1};function Nc(t){t.stopImmediatePropagation()}function xr(t){t.preventDefault(),t.stopImmediatePropagation()}function xa(t){var e=t.document.documentElement,n=Z(t).on("dragstart.drag",xr,Ti);"onselectstart"in e?n.on("selectstart.drag",xr,Ti):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function _a(t,e){var n=t.document.documentElement,r=Z(t).on("dragstart.drag",null);e&&(r.on("click.drag",xr,Ti),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const wa=t=>()=>t;function Lc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Lc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function A7(t){return!t.ctrlKey&&!t.button}function M7(){return this.parentNode}function $7(t,e){return e??{x:t.x,y:t.y}}function S7(){return navigator.maxTouchPoints||"ontouchstart"in this}function Pd(){var t=A7,e=M7,n=$7,r=S7,i={},o=Nn("start","drag","end"),a=0,s,c,u,f,h=0;function l(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,w7).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,x){if(!(f||!t.call(this,b,x))){var A=v(this,e.call(this,b,x),b,x,"mouse");A&&(Z(b.view).on("mousemove.drag",d,Ti).on("mouseup.drag",g,Ti),xa(b.view),Nc(b),u=!1,s=b.clientX,c=b.clientY,A("start",b))}}function d(b){if(xr(b),!u){var x=b.clientX-s,A=b.clientY-c;u=x*x+A*A>h}i.mouse("drag",b)}function g(b){Z(b.view).on("mousemove.drag mouseup.drag",null),_a(b.view,u),xr(b),i.mouse("end",b)}function m(b,x){if(t.call(this,b,x)){var A=b.changedTouches,T=e.call(this,b,x),D=A.length,k,E;for(k=0;k<D;++k)(E=v(this,T,b,x,A[k].identifier,A[k]))&&(Nc(b),E("start",b,A[k]))}}function y(b){var x=b.changedTouches,A=x.length,T,D;for(T=0;T<A;++T)(D=i[x[T].identifier])&&(xr(b),D("drag",b,x[T]))}function _(b){var x=b.changedTouches,A=x.length,T,D;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),T=0;T<A;++T)(D=i[x[T].identifier])&&(Nc(b),D("end",b,x[T]))}function v(b,x,A,T,D,k){var E=o.copy(),S=ae(k||A,x),C,N,M;if((M=n.call(b,new Lc("beforestart",{sourceEvent:A,target:l,identifier:D,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:E}),T))!=null)return C=M.x-S[0]||0,N=M.y-S[1]||0,function $(w,P,I){var L=S,F;switch(w){case"start":i[D]=$,F=a++;break;case"end":delete i[D],--a;case"drag":S=ae(I||P,x),F=a;break}E.call(w,b,new Lc(w,{sourceEvent:P,subject:M,target:l,identifier:D,active:F,x:S[0]+C,y:S[1]+N,dx:S[0]-L[0],dy:S[1]-L[1],dispatch:E}),T)}}return l.filter=function(b){return arguments.length?(t=typeof b=="function"?b:wa(!!b),l):t},l.container=function(b){return arguments.length?(e=typeof b=="function"?b:wa(b),l):e},l.subject=function(b){return arguments.length?(n=typeof b=="function"?b:wa(b),l):n},l.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:wa(!!b),l):r},l.on=function(){var b=o.on.apply(o,arguments);return b===o?l:b},l.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,l):Math.sqrt(h)},l}function _r(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function cn(){}var Cn=.7,wr=1/Cn,Ar="\\s*([+-]?\\d+)\\s*",Di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",T7=/^#([0-9a-f]{3,8})$/,P7=new RegExp(`^rgb\\(${Ar},${Ar},${Ar}\\)$`),D7=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),k7=new RegExp(`^rgba\\(${Ar},${Ar},${Ar},${Di}\\)$`),E7=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${Di}\\)$`),N7=new RegExp(`^hsl\\(${Di},${Ee},${Ee}\\)$`),L7=new RegExp(`^hsla\\(${Di},${Ee},${Ee},${Di}\\)$`),Dd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_r(cn,ln,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:kd,formatHex:kd,formatHex8:I7,formatHsl:C7,formatRgb:Ed,toString:Ed});function kd(){return this.rgb().formatHex()}function I7(){return this.rgb().formatHex8()}function C7(){return Rd(this).formatHsl()}function Ed(){return this.rgb().formatRgb()}function ln(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=T7.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Nd(e):n===3?new Nt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Aa(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Aa(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=P7.exec(t))?new Nt(e[1],e[2],e[3],1):(e=D7.exec(t))?new Nt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=k7.exec(t))?Aa(e[1],e[2],e[3],e[4]):(e=E7.exec(t))?Aa(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=N7.exec(t))?Cd(e[1],e[2]/100,e[3]/100,1):(e=L7.exec(t))?Cd(e[1],e[2]/100,e[3]/100,e[4]):Dd.hasOwnProperty(t)?Nd(Dd[t]):t==="transparent"?new Nt(NaN,NaN,NaN,0):null}function Nd(t){return new Nt(t>>16&255,t>>8&255,t&255,1)}function Aa(t,e,n,r){return r<=0&&(t=e=n=NaN),new Nt(t,e,n,r)}function Ic(t){return t instanceof cn||(t=ln(t)),t?(t=t.rgb(),new Nt(t.r,t.g,t.b,t.opacity)):new Nt}function Mr(t,e,n,r){return arguments.length===1?Ic(t):new Nt(t,e,n,r??1)}function Nt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}_r(Nt,Mr,Pi(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new Nt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new Nt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Nt(Rn(this.r),Rn(this.g),Rn(this.b),Ma(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ld,formatHex:Ld,formatHex8:R7,formatRgb:Id,toString:Id}));function Ld(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}`}function R7(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}${Fn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Id(){const t=Ma(this.opacity);return`${t===1?"rgb(":"rgba("}${Rn(this.r)}, ${Rn(this.g)}, ${Rn(this.b)}${t===1?")":`, ${t})`}`}function Ma(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Rn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fn(t){return t=Rn(t),(t<16?"0":"")+t.toString(16)}function Cd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ae(t,e,n,r)}function Rd(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof cn||(t=ln(t)),!t)return new Ae;if(t instanceof Ae)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new Ae(a,s,c,t.opacity)}function $a(t,e,n,r){return arguments.length===1?Rd(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}_r(Ae,$a,Pi(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new Ae(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new Ae(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Nt(Cc(t>=240?t-240:t+120,i,r),Cc(t,i,r),Cc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(Fd(this.h),Sa(this.s),Sa(this.l),Ma(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ma(this.opacity);return`${t===1?"hsl(":"hsla("}${Fd(this.h)}, ${Sa(this.s)*100}%, ${Sa(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Fd(t){return t=(t||0)%360,t<0?t+360:t}function Sa(t){return Math.max(0,Math.min(1,t||0))}function Cc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const zd=Math.PI/180,Od=180/Math.PI,Ta=18,Gd=.96422,Ud=1,Bd=.82521,Yd=4/29,$r=6/29,qd=3*$r*$r,F7=$r*$r*$r;function Wd(t){if(t instanceof Me)return new Me(t.l,t.a,t.b,t.opacity);if(t instanceof Ne)return Xd(t);t instanceof Nt||(t=Ic(t));var e=Oc(t.r),n=Oc(t.g),r=Oc(t.b),i=Rc((.2225045*e+.7168786*n+.0606169*r)/Ud),o,a;return e===n&&n===r?o=a=i:(o=Rc((.4360747*e+.3850649*n+.1430804*r)/Gd),a=Rc((.0139322*e+.0971045*n+.7141733*r)/Bd)),new Me(116*i-16,500*(o-i),200*(i-a),t.opacity)}function z7(t,e){return new Me(t,0,0,e??1)}function Pa(t,e,n,r){return arguments.length===1?Wd(t):new Me(t,e,n,r??1)}function Me(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}_r(Me,Pa,Pi(cn,{brighter(t){return new Me(this.l+Ta*(t??1),this.a,this.b,this.opacity)},darker(t){return new Me(this.l-Ta*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Gd*Fc(e),t=Ud*Fc(t),n=Bd*Fc(n),new Nt(zc(3.1338561*e-1.6168667*t-.4906146*n),zc(-.9787684*e+1.9161415*t+.033454*n),zc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Rc(t){return t>F7?Math.pow(t,1/3):t/qd+Yd}function Fc(t){return t>$r?t*t*t:qd*(t-Yd)}function zc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Hd(t){if(t instanceof Ne)return new Ne(t.h,t.c,t.l,t.opacity);if(t instanceof Me||(t=Wd(t)),t.a===0&&t.b===0)return new Ne(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Od;return new Ne(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function O7(t,e,n,r){return arguments.length===1?Hd(t):new Ne(n,e,t,r??1)}function Da(t,e,n,r){return arguments.length===1?Hd(t):new Ne(t,e,n,r??1)}function Ne(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Xd(t){if(isNaN(t.h))return new Me(t.l,0,0,t.opacity);var e=t.h*zd;return new Me(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}_r(Ne,Da,Pi(cn,{brighter(t){return new Ne(this.h,this.c,this.l+Ta*(t??1),this.opacity)},darker(t){return new Ne(this.h,this.c,this.l-Ta*(t??1),this.opacity)},rgb(){return Xd(this).rgb()}}));var Vd=-.14861,Gc=1.78277,Uc=-.29227,ka=-.90649,ki=1.97294,jd=ki*ka,Zd=ki*Gc,Kd=Gc*Uc-ka*Vd;function G7(t){if(t instanceof zn)return new zn(t.h,t.s,t.l,t.opacity);t instanceof Nt||(t=Ic(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Kd*r+jd*e-Zd*n)/(Kd+jd-Zd),o=r-i,a=(ki*(n-i)-Uc*o)/ka,s=Math.sqrt(a*a+o*o)/(ki*i*(1-i)),c=s?Math.atan2(a,o)*Od-120:NaN;return new zn(c<0?c+360:c,s,i,t.opacity)}function $e(t,e,n,r){return arguments.length===1?G7(t):new zn(t,e,n,r??1)}function zn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}_r(zn,$e,Pi(cn,{brighter(t){return t=t==null?wr:Math.pow(wr,t),new zn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cn:Math.pow(Cn,t),new zn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*zd,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Nt(255*(e+n*(Vd*r+Gc*i)),255*(e+n*(Uc*r+ka*i)),255*(e+n*(ki*r)),this.opacity)}}));function Qd(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function Jd(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return Qd((n-r/e)*e,a,i,o,s)}}function tg(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return Qd((n-r/e)*e,i,o,a,s)}}const Ea=t=>()=>t;function eg(t,e){return function(n){return t+n*e}}function U7(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Na(t,e){var n=e-t;return n?eg(t,n>180||n<-180?n-360*Math.round(n/360):n):Ea(isNaN(t)?e:t)}function B7(t){return(t=+t)==1?Lt:function(e,n){return n-e?U7(e,n,t):Ea(isNaN(e)?n:e)}}function Lt(t,e){var n=e-t;return n?eg(t,n):Ea(isNaN(t)?e:t)}const Ei=function t(e){var n=B7(e);function r(i,o){var a=n((i=Mr(i)).r,(o=Mr(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),u=Lt(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r}(1);function ng(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Mr(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(c){return s.r=r(c),s.g=i(c),s.b=o(c),s+""}}}var rg=ng(Jd),Y7=ng(tg);function Bc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function ig(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function q7(t,e){return(ig(e)?Bc:og)(t,e)}function og(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=fn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function ag(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ce(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function sg(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=fn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Yc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qc=new RegExp(Yc.source,"g");function W7(t){return function(){return t}}function H7(t){return function(e){return t(e)+""}}function Wc(t,e){var n=Yc.lastIndex=qc.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(t=t+"",e=e+"";(r=Yc.exec(t))&&(i=qc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:ce(r,i)})),n=qc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?H7(c[0].x):W7(e):(e=c.length,function(u){for(var f=0,h;f<e;++f)s[(h=c[f]).i]=h.x(u);return s.join("")})}function fn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ea(e):(n==="number"?ce:n==="string"?(r=ln(e))?(e=r,Ei):Wc:e instanceof ln?Ei:e instanceof Date?ag:ig(e)?Bc:Array.isArray(e)?og:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?sg:ce)(t,e)}function X7(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function V7(t,e){var n=Na(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function La(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var ug=180/Math.PI,Hc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cg(t,e,n,r,i,o){var a,s,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*ug,skewX:Math.atan(c)*ug,scaleX:a,scaleY:s}}var Ia;function j7(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Hc:cg(e.a,e.b,e.c,e.d,e.e,e.f)}function Z7(t){return t==null||(Ia||(Ia=document.createElementNS("http://www.w3.org/2000/svg","g")),Ia.setAttribute("transform",t),!(t=Ia.transform.baseVal.consolidate()))?Hc:(t=t.matrix,cg(t.a,t.b,t.c,t.d,t.e,t.f))}function lg(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:ce(u,h)},{i:g-2,x:ce(f,l)})}else(h||l)&&p.push("translate("+h+e+l+n)}function a(u,f,h,l){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),l.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ce(u,f)})):f&&h.push(i(h)+"rotate("+f+r)}function s(u,f,h,l){u!==f?l.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ce(u,f)}):f&&h.push(i(h)+"skewX("+f+r)}function c(u,f,h,l,p,d){if(u!==h||f!==l){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:ce(u,h)},{i:g-2,x:ce(f,l)})}else(h!==1||l!==1)&&p.push(i(p)+"scale("+h+","+l+")")}return function(u,f){var h=[],l=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,h,l),a(u.rotate,f.rotate,h,l),s(u.skewX,f.skewX,h,l),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,h,l),u=f=null,function(p){for(var d=-1,g=l.length,m;++d<g;)h[(m=l[d]).i]=m.x(p);return h.join("")}}}var fg=lg(j7,"px, ","px)","deg)"),hg=lg(Z7,", ",")",")"),K7=1e-12;function pg(t){return((t=Math.exp(t))+1/t)/2}function Q7(t){return((t=Math.exp(t))-1/t)/2}function J7(t){return((t=Math.exp(2*t))-1)/(t+1)}const dg=function t(e,n,r){function i(o,a){var s=o[0],c=o[1],u=o[2],f=a[0],h=a[1],l=a[2],p=f-s,d=h-c,g=p*p+d*d,m,y;if(g<K7)y=Math.log(l/u)/e,m=function(T){return[s+T*p,c+T*d,u*Math.exp(e*T*y)]};else{var _=Math.sqrt(g),v=(l*l-u*u+r*g)/(2*u*n*_),b=(l*l-u*u-r*g)/(2*l*n*_),x=Math.log(Math.sqrt(v*v+1)-v),A=Math.log(Math.sqrt(b*b+1)-b);y=(A-x)/e,m=function(T){var D=T*y,k=pg(x),E=u/(n*_)*(k*J7(e*D+x)-Q7(x));return[s+E*p,c+E*d,u*k/pg(e*D+x)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return t(a,s,c)},i}(Math.SQRT2,2,4);function gg(t){return function(e,n){var r=t((e=$a(e)).h,(n=$a(n)).h),i=Lt(e.s,n.s),o=Lt(e.l,n.l),a=Lt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const tA=gg(Na);var eA=gg(Lt);function nA(t,e){var n=Lt((t=Pa(t)).l,(e=Pa(e)).l),r=Lt(t.a,e.a),i=Lt(t.b,e.b),o=Lt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function mg(t){return function(e,n){var r=t((e=Da(e)).h,(n=Da(n)).h),i=Lt(e.c,n.c),o=Lt(e.l,n.l),a=Lt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const rA=mg(Na);var iA=mg(Lt);function yg(t){return function e(n){n=+n;function r(i,o){var a=t((i=$e(i)).h,(o=$e(o)).h),s=Lt(i.s,o.s),c=Lt(i.l,o.l),u=Lt(i.opacity,o.opacity);return function(f){return i.h=a(f),i.s=s(f),i.l=c(Math.pow(f,n)),i.opacity=u(f),i+""}}return r.gamma=e,r}(1)}const oA=yg(Na);var Ca=yg(Lt);function bg(t,e){e===void 0&&(e=t,t=fn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function aA(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Sr=0,Ni=0,Li=0,vg=1e3,Ra,Ii,Fa=0,On=0,za=0,Ci=typeof performance=="object"&&performance.now?performance:Date,xg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ri(){return On||(xg(sA),On=Ci.now()+za)}function sA(){On=0}function Fi(){this._call=this._time=this._next=null}Fi.prototype=Oa.prototype={constructor:Fi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ri():+n)+(e==null?0:+e),!this._next&&Ii!==this&&(Ii?Ii._next=this:Ra=this,Ii=this),this._call=t,this._time=n,Xc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xc())}};function Oa(t,e,n){var r=new Fi;return r.restart(t,e,n),r}function _g(){Ri(),++Sr;for(var t=Ra,e;t;)(e=On-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Sr}function wg(){On=(Fa=Ci.now())+za,Sr=Ni=0;try{_g()}finally{Sr=0,cA(),On=0}}function uA(){var t=Ci.now(),e=t-Fa;e>vg&&(za-=e,Fa=t)}function cA(){for(var t,e=Ra,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ra=n);Ii=t,Xc(r)}function Xc(t){if(!Sr){Ni&&(Ni=clearTimeout(Ni));var e=t-On;e>24?(t<1/0&&(Ni=setTimeout(wg,t-Ci.now()-za)),Li&&(Li=clearInterval(Li))):(Li||(Fa=Ci.now(),Li=setInterval(uA,vg)),Sr=1,xg(wg))}}function Vc(t,e,n){var r=new Fi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function lA(t,e,n){var r=new Fi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?Ri():+s,r._restart(function c(u){u+=i,r._restart(c,i+=a,s),o(u)},a,s)},r.restart(t,e,n),r)}var fA=Nn("start","end","cancel","interrupt"),hA=[],Ag=0,jc=1,Zc=2,Ga=3,Mg=4,Kc=5,Ua=6;function Ba(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;pA(t,n,{name:e,index:r,group:i,on:fA,tween:hA,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Ag})}function Qc(t,e){var n=Se(t,e);if(n.state>Ag)throw new Error("too late; already scheduled");return n}function Le(t,e){var n=Se(t,e);if(n.state>Ga)throw new Error("too late; already running");return n}function Se(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function pA(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Oa(o,0,n.time);function o(u){n.state=jc,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var f,h,l,p;if(n.state!==jc)return c();for(f in r)if(p=r[f],p.name===n.name){if(p.state===Ga)return Vc(a);p.state===Mg?(p.state=Ua,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=Ua,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Vc(function(){n.state===Ga&&(n.state=Mg,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Zc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Zc){for(n.state=Ga,i=new Array(l=n.tween.length),f=0,h=-1;f<l;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Kc,1),h=-1,l=i.length;++h<l;)i[h].call(t,f);n.state===Kc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Ua,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function Gn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Zc&&r.state<Kc,r.state=Ua,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function dA(t){return this.each(function(){Gn(this,t)})}function gA(t,e){var n,r;return function(){var i=Le(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function mA(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Le(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function yA(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Se(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?gA:mA)(n,t,e))}function Jc(t,e,n){var r=t._id;return t.each(function(){var i=Le(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Se(i,r).value[e]}}function $g(t,e){var n;return(typeof e=="number"?ce:e instanceof ln?Ei:(n=ln(e))?(e=n,Ei):Wc)(t,e)}function bA(t){return function(){this.removeAttribute(t)}}function vA(t){return function(){this.removeAttributeNS(t.space,t.local)}}function xA(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function _A(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function wA(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function AA(t,e,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s)))}}function MA(t,e){var n=Si(t),r=n==="transform"?hg:$g;return this.attrTween(t,typeof e=="function"?(n.local?AA:wA)(n,r,Jc(this,"attr."+t,e)):e==null?(n.local?vA:bA)(n):(n.local?_A:xA)(n,r,e))}function $A(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function SA(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function TA(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&SA(t,o)),n}return i._value=e,i}function PA(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&$A(t,o)),n}return i._value=e,i}function DA(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Si(t);return this.tween(n,(r.local?TA:PA)(r,e))}function kA(t,e){return function(){Qc(this,t).delay=+e.apply(this,arguments)}}function EA(t,e){return e=+e,function(){Qc(this,t).delay=e}}function NA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?kA:EA)(e,t)):Se(this.node(),e).delay}function LA(t,e){return function(){Le(this,t).duration=+e.apply(this,arguments)}}function IA(t,e){return e=+e,function(){Le(this,t).duration=e}}function CA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?LA:IA)(e,t)):Se(this.node(),e).duration}function RA(t,e){if(typeof e!="function")throw new Error;return function(){Le(this,t).ease=e}}function FA(t){var e=this._id;return arguments.length?this.each(RA(e,t)):Se(this.node(),e).ease}function zA(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Le(this,t).ease=n}}function OA(t){if(typeof t!="function")throw new Error;return this.each(zA(this._id,t))}function GA(t){typeof t!="function"&&(t=Tc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new Ie(r,this._parents,this._name,this._id)}function UA(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var c=e[s],u=n[s],f=c.length,h=a[s]=new Array(f),l,p=0;p<f;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<r;++s)a[s]=e[s];return new Ie(a,this._parents,this._name,this._id)}function BA(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function YA(t,e,n){var r,i,o=BA(e)?Qc:Le;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function qA(t,e){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(t):this.each(YA(n,t,e))}function WA(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function HA(){return this.on("end.remove",WA(this._id))}function XA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ba(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],c=s.length,u=o[a]=new Array(c),f,h,l=0;l<c;++l)(f=s[l])&&(h=t.call(f,f.__data__,l,s))&&("__data__"in f&&(h.__data__=f.__data__),u[l]=h,Ba(u[l],e,n,l,u,Se(f,n)));return new Ie(o,this._parents,e,n)}function VA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Sc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var c=r[s],u=c.length,f,h=0;h<u;++h)if(f=c[h]){for(var l=t.call(f,f.__data__,h,c),p,d=Se(f,n),g=0,m=l.length;g<m;++g)(p=l[g])&&Ba(p,e,n,g,l,d);o.push(l),a.push(f)}return new Ie(o,a,e,n)}var jA=In.prototype.constructor;function ZA(){return new jA(this._groups,this._parents)}function KA(t,e){var n,r,i;return function(){var o=Ln(this,t),a=(this.style.removeProperty(t),Ln(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Sg(t){return function(){this.style.removeProperty(t)}}function QA(t,e,n){var r,i=n+"",o;return function(){var a=Ln(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function JA(t,e,n){var r,i,o;return function(){var a=Ln(this,t),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),Ln(this,t))),a===c?null:a===r&&c===i?o:(i=c,o=e(r=a,s))}}function tM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var c=Le(this,t),u=c.on,f=c.value[o]==null?s||(s=Sg(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(a,i=f),c.on=r}}function eM(t,e,n){var r=(t+="")=="transform"?fg:$g;return e==null?this.styleTween(t,KA(t,r)).on("end.style."+t,Sg(t)):typeof e=="function"?this.styleTween(t,JA(t,r,Jc(this,"style."+t,e))).each(tM(this._id,t)):this.styleTween(t,QA(t,r,e),n).on("end.style."+t,null)}function nM(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function rM(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&nM(t,a,n)),r}return o._value=e,o}function iM(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,rM(t,e,n??""))}function oM(t){return function(){this.textContent=t}}function aM(t){return function(){var e=t(this);this.textContent=e??""}}function sM(t){return this.tween("text",typeof t=="function"?aM(Jc(this,"text",t)):oM(t==null?"":t+""))}function uM(t){return function(e){this.textContent=t.call(this,e)}}function cM(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&uM(i)),e}return r._value=t,r}function lM(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,cM(t))}function fM(){for(var t=this._name,e=this._id,n=Pg(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var f=Se(c,e);Ba(c,t,n,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ie(r,this._parents,t,n)}function hM(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var u=Le(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),u.on=e}),i===0&&o()})}var pM=0;function Ie(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Tg(t){return In().transition(t)}function Pg(){return++pM}var He=In.prototype;Ie.prototype=Tg.prototype={constructor:Ie,select:XA,selectAll:VA,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:GA,merge:UA,selection:ZA,transition:fM,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:qA,attr:MA,attrTween:DA,style:eM,styleTween:iM,text:sM,textTween:lM,remove:HA,tween:yA,delay:NA,duration:CA,ease:FA,easeVarying:OA,end:hM,[Symbol.iterator]:He[Symbol.iterator]};const dM=t=>+t;function gM(t){return t*t}function mM(t){return t*(2-t)}function Dg(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function yM(t){return t*t*t}function bM(t){return--t*t*t+1}function zi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var tl=3,vM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(tl),xM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(tl),kg=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(tl),Eg=Math.PI,Ng=Eg/2;function _M(t){return+t==1?1:1-Math.cos(t*Ng)}function wM(t){return Math.sin(t*Ng)}function Lg(t){return(1-Math.cos(Eg*t))/2}function hn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function AM(t){return hn(1-+t)}function MM(t){return 1-hn(t)}function Ig(t){return((t*=2)<=1?hn(1-t):2-hn(t-1))/2}function $M(t){return 1-Math.sqrt(1-t*t)}function SM(t){return Math.sqrt(1- --t*t)}function Cg(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var el=4/11,TM=6/11,PM=8/11,DM=3/4,kM=9/11,EM=10/11,NM=15/16,LM=21/22,IM=63/64,Ya=1/el/el;function CM(t){return 1-Oi(1-t)}function Oi(t){return(t=+t)<el?Ya*t*t:t<PM?Ya*(t-=TM)*t+DM:t<EM?Ya*(t-=kM)*t+NM:Ya*(t-=LM)*t+IM}function RM(t){return((t*=2)<=1?1-Oi(1-t):Oi(t-1)+1)/2}var nl=1.70158,FM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(nl),zM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(nl),Rg=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(nl),Tr=2*Math.PI,rl=1,il=.3,OM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return e*hn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),qa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return 1-e*hn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),GM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tr);function i(o){return((o=o*2-1)<0?e*hn(-o)*Math.sin((r-o)/n):2-e*hn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Tr)},i.period=function(o){return t(e,o)},i}(rl,il),UM={time:null,delay:0,duration:250,ease:zi};function BM(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function YM(t){var e,n;t instanceof Ie?(e=t._id,t=t._name):(e=Pg(),(n=UM).time=Ri(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&Ba(c,t,e,u,a,n||BM(c,e));return new Ie(r,this._parents,t,e)}In.prototype.interrupt=dA,In.prototype.transition=YM;var qM=[null];function WM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>jc&&r.name===e)return new Ie([[t]],qM,e,+i)}return null}const ol=t=>()=>t;function HM(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function XM(t){t.stopImmediatePropagation()}function al(t){t.preventDefault(),t.stopImmediatePropagation()}var Fg={name:"drag"},sl={name:"space"},Pr={name:"handle"},Dr={name:"center"};const{abs:zg,max:Ft,min:zt}=Math;function Og(t){return[+t[0],+t[1]]}function ul(t){return[Og(t[0]),Og(t[1])]}var Wa={name:"x",handles:["w","e"].map(Gi),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ha={name:"y",handles:["n","s"].map(Gi),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},VM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Gi),input:function(t){return t==null?null:ul(t)},output:function(t){return t}},Xe={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Gg={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ug={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},jM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},ZM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Gi(t){return{type:t}}function KM(t){return!t.ctrlKey&&!t.button}function QM(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function JM(){return navigator.maxTouchPoints||"ontouchstart"in this}function cl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function t$(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function e$(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function n$(){return ll(Wa)}function r$(){return ll(Ha)}function i$(){return ll(VM)}function ll(t){var e=QM,n=KM,r=JM,i=!0,o=Nn("start","brush","end"),a=6,s;function c(m){var y=m.property("__brush",g).selectAll(".overlay").data([Gi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Xe.overlay).merge(y).each(function(){var v=cl(this).extent;Z(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),m.selectAll(".selection").data([Gi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Xe.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var _=m.selectAll(".handle").data(t.handles,function(v){return v.type});_.exit().remove(),_.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return Xe[v.type]}),m.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",l).filter(r).on("touchstart.brush",l).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(m,y,_){m.tween?m.on("start.brush",function(v){f(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){f(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,x=f(v,arguments),A=b.selection,T=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),D=fn(A,T);function k(E){b.selection=E===1&&T===null?null:D(E),u.call(v),x.brush()}return A!==null&&T!==null?k:k(1)}):m.each(function(){var v=this,b=arguments,x=v.__brush,A=t.input(typeof y=="function"?y.apply(v,b):y,x.extent),T=f(v,b).beforestart();Gn(v),x.selection=A===null?null:A,u.call(v),T.start(_).brush(_).end(_)})},c.clear=function(m,y){c.move(m,null,y)};function u(){var m=Z(this),y=cl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(_){return _.type[_.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(_){return _.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(_){return _.type==="n"||_.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(_){return _.type==="e"||_.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(m,y,_){var v=m.__brush.emitter;return v&&(!_||!v.clean)?v:new h(m,y,_)}function h(m,y,_){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=_}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,_){var v=Z(this.that).datum();o.call(m,this.that,new HM(m,{sourceEvent:y,target:c,selection:t.output(this.state.selection),mode:_,dispatch:o}),v)}};function l(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,_=m.target.__data__.type,v=(i&&m.metaKey?_="overlay":_)==="selection"?Fg:i&&m.altKey?Dr:Pr,b=t===Ha?null:jM[_],x=t===Wa?null:ZM[_],A=cl(y),T=A.extent,D=A.selection,k=T[0][0],E,S,C=T[0][1],N,M,$=T[1][0],w,P,I=T[1][1],L,F,z=0,U=0,tt,K=b&&x&&i&&m.shiftKey,it,pt,q=Array.from(m.touches||[m],Q=>{const St=Q.identifier;return Q=ae(Q,y),Q.point0=Q.slice(),Q.identifier=St,Q});Gn(y);var dt=f(y,arguments,!0).beforestart();if(_==="overlay"){D&&(tt=!0);const Q=[q[0],q[1]||q[0]];A.selection=D=[[E=t===Ha?k:zt(Q[0][0],Q[1][0]),N=t===Wa?C:zt(Q[0][1],Q[1][1])],[w=t===Ha?$:Ft(Q[0][0],Q[1][0]),L=t===Wa?I:Ft(Q[0][1],Q[1][1])]],q.length>1&&$t(m)}else E=D[0][0],N=D[0][1],w=D[1][0],L=D[1][1];S=E,M=N,P=w,F=L;var B=Z(y).attr("pointer-events","none"),et=B.selectAll(".overlay").attr("cursor",Xe[_]);if(m.touches)dt.moved=O,dt.ended=gt;else{var ut=Z(m.view).on("mousemove.brush",O,!0).on("mouseup.brush",gt,!0);i&&ut.on("keydown.brush",Jt,!0).on("keyup.brush",te,!0),xa(m.view)}u.call(y),dt.start(m,v.name);function O(Q){for(const St of Q.changedTouches||[Q])for(const To of q)To.identifier===St.identifier&&(To.cur=ae(St,y));if(K&&!it&&!pt&&q.length===1){const St=q[0];zg(St.cur[0]-St[0])>zg(St.cur[1]-St[1])?pt=!0:it=!0}for(const St of q)St.cur&&(St[0]=St.cur[0],St[1]=St.cur[1]);tt=!0,al(Q),$t(Q)}function $t(Q){const St=q[0],To=St.point0;var _n;switch(z=St[0]-To[0],U=St[1]-To[1],v){case sl:case Fg:{b&&(z=Ft(k-E,zt($-w,z)),S=E+z,P=w+z),x&&(U=Ft(C-N,zt(I-L,U)),M=N+U,F=L+U);break}case Pr:{q[1]?(b&&(S=Ft(k,zt($,q[0][0])),P=Ft(k,zt($,q[1][0])),b=1),x&&(M=Ft(C,zt(I,q[0][1])),F=Ft(C,zt(I,q[1][1])),x=1)):(b<0?(z=Ft(k-E,zt($-E,z)),S=E+z,P=w):b>0&&(z=Ft(k-w,zt($-w,z)),S=E,P=w+z),x<0?(U=Ft(C-N,zt(I-N,U)),M=N+U,F=L):x>0&&(U=Ft(C-L,zt(I-L,U)),M=N,F=L+U));break}case Dr:{b&&(S=Ft(k,zt($,E-z*b)),P=Ft(k,zt($,w+z*b))),x&&(M=Ft(C,zt(I,N-U*x)),F=Ft(C,zt(I,L+U*x)));break}}P<S&&(b*=-1,_n=E,E=w,w=_n,_n=S,S=P,P=_n,_ in Gg&&et.attr("cursor",Xe[_=Gg[_]])),F<M&&(x*=-1,_n=N,N=L,L=_n,_n=M,M=F,F=_n,_ in Ug&&et.attr("cursor",Xe[_=Ug[_]])),A.selection&&(D=A.selection),it&&(S=D[0][0],P=D[1][0]),pt&&(M=D[0][1],F=D[1][1]),(D[0][0]!==S||D[0][1]!==M||D[1][0]!==P||D[1][1]!==F)&&(A.selection=[[S,M],[P,F]],u.call(y),dt.brush(Q,v.name))}function gt(Q){if(XM(Q),Q.touches){if(Q.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else _a(Q.view,tt),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);B.attr("pointer-events","all"),et.attr("cursor",Xe.overlay),A.selection&&(D=A.selection),t$(D)&&(A.selection=null,u.call(y)),dt.end(Q,v.name)}function Jt(Q){switch(Q.keyCode){case 16:{K=b&&x;break}case 18:{v===Pr&&(b&&(w=P-z*b,E=S+z*b),x&&(L=F-U*x,N=M+U*x),v=Dr,$t(Q));break}case 32:{(v===Pr||v===Dr)&&(b<0?w=P-z:b>0&&(E=S-z),x<0?L=F-U:x>0&&(N=M-U),v=sl,et.attr("cursor",Xe.selection),$t(Q));break}default:return}al(Q)}function te(Q){switch(Q.keyCode){case 16:{K&&(it=pt=K=!1,$t(Q));break}case 18:{v===Dr&&(b<0?w=P:b>0&&(E=S),x<0?L=F:x>0&&(N=M),v=Pr,$t(Q));break}case 32:{v===sl&&(Q.altKey?(b&&(w=P-z*b,E=S+z*b),x&&(L=F-U*x,N=M+U*x),v=Dr):(b<0?w=P:b>0&&(E=S),x<0?L=F:x>0&&(N=M),v=Pr),et.attr("cursor",Xe[_]),$t(Q));break}default:return}al(Q)}}function p(m){f(this,arguments).moved(m)}function d(m){f(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=ul(e.apply(this,arguments)),m.dim=t,m}return c.extent=function(m){return arguments.length?(e=typeof m=="function"?m:ol(ul(m)),c):e},c.filter=function(m){return arguments.length?(n=typeof m=="function"?m:ol(!!m),c):n},c.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:ol(!!m),c):r},c.handleSize=function(m){return arguments.length?(a=+m,c):a},c.keyModifiers=function(m){return arguments.length?(i=!!m,c):i},c.on=function(){var m=o.on.apply(o,arguments);return m===o?c:m},c}var Bg=Math.abs,kr=Math.cos,Er=Math.sin,Yg=Math.PI,Xa=Yg/2,qg=Yg*2,Wg=Math.max,fl=1e-12;function hl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function o$(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function a$(){return pl(!1,!1)}function s$(){return pl(!1,!0)}function u$(){return pl(!0,!1)}function pl(t,e){var n=0,r=null,i=null,o=null;function a(s){var c=s.length,u=new Array(c),f=hl(0,c),h=new Array(c*c),l=new Array(c),p=0,d;s=Float64Array.from({length:c*c},e?(g,m)=>s[m%c][m/c|0]:(g,m)=>s[m/c|0][m%c]);for(let g=0;g<c;++g){let m=0;for(let y=0;y<c;++y)m+=s[g*c+y]+t*s[y*c+g];p+=u[g]=m}p=Wg(0,qg-n*c)/p,d=p?n:qg/c;{let g=0;r&&f.sort((m,y)=>r(u[m],u[y]));for(const m of f){const y=g;if(t){const _=hl(~c+1,c).filter(v=>v<0?s[~v*c+m]:s[m*c+v]);i&&_.sort((v,b)=>i(v<0?-s[~v*c+m]:s[m*c+v],b<0?-s[~b*c+m]:s[m*c+b]));for(const v of _)if(v<0){const b=h[~v*c+m]||(h[~v*c+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*c+m]*p,value:s[~v*c+m]}}else{const b=h[m*c+v]||(h[m*c+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]}}l[m]={index:m,startAngle:y,endAngle:g,value:u[m]}}else{const _=hl(0,c).filter(v=>s[m*c+v]||s[v*c+m]);i&&_.sort((v,b)=>i(s[m*c+v],s[m*c+b]));for(const v of _){let b;if(m<v?(b=h[m*c+v]||(h[m*c+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]}):(b=h[v*c+m]||(h[v*c+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*c+v]*p,value:s[m*c+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const x=b.source;b.source=b.target,b.target=x}}l[m]={index:m,startAngle:y,endAngle:g,value:u[m]}}g+=d}}return h=Object.values(h),h.groups=l,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=Wg(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=o$(s))._=s,a):o&&o._},a}const dl=Math.PI,gl=2*dl,Un=1e-6,c$=gl-Un;function Hg(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function l$(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Hg;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Ui=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Hg:l$(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,c=r-e,u=i-n,f=a-e,h=s-n,l=f*f+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>Un)if(!(Math.abs(h*c-u*f)>Un)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=c*c+u*u,m=p*p+d*d,y=Math.sqrt(g),_=Math.sqrt(l),v=o*Math.tan((dl-Math.acos((g+l-m)/(2*y*_)))/2),b=v/_,x=v/y;Math.abs(b-1)>Un&&this._append`L${e+b*f},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*p>f*d)},${this._x1=e+x*c},${this._y1=n+x*u}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),u=e+s,f=n+c,h=1^a,l=a?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Un||Math.abs(this._y1-f)>Un)&&this._append`L${u},${f}`,r&&(l<0&&(l=l%gl+gl),l>c$?this._append`A${r},${r},0,1,${h},${e-s},${n-c}A${r},${r},0,1,${h},${this._x1=u},${this._y1=f}`:l>Un&&this._append`A${r},${r},0,${+(l>=dl)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function ml(){return new Ui}ml.prototype=Ui.prototype;function f$(t=3){return new Ui(+t)}var h$=Array.prototype.slice;function Bn(t){return function(){return t}}function p$(t){return t.source}function d$(t){return t.target}function Xg(t){return t.radius}function g$(t){return t.startAngle}function m$(t){return t.endAngle}function y$(){return 0}function b$(){return 10}function Vg(t){var e=p$,n=d$,r=Xg,i=Xg,o=g$,a=m$,s=y$,c=null;function u(){var f,h=e.apply(this,arguments),l=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=h$.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-Xa,y=a.apply(this,d)-Xa,_=+i.apply(this,(d[0]=l,d)),v=o.apply(this,d)-Xa,b=a.apply(this,d)-Xa;if(c||(c=f=ml()),p>fl&&(Bg(y-m)>p*2+fl?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,Bg(b-v)>p*2+fl?b>v?(v+=p,b-=p):(v-=p,b+=p):v=b=(v+b)/2),c.moveTo(g*kr(m),g*Er(m)),c.arc(0,0,g,m,y),m!==v||y!==b)if(t){var x=+t.apply(this,arguments),A=_-x,T=(v+b)/2;c.quadraticCurveTo(0,0,A*kr(v),A*Er(v)),c.lineTo(_*kr(T),_*Er(T)),c.lineTo(A*kr(b),A*Er(b))}else c.quadraticCurveTo(0,0,_*kr(v),_*Er(v)),c.arc(0,0,_,v,b);if(c.quadraticCurveTo(0,0,g*kr(m),g*Er(m)),c.closePath(),f)return c=null,f+""||null}return t&&(u.headRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Bn(+f),u):t}),u.radius=function(f){return arguments.length?(r=i=typeof f=="function"?f:Bn(+f),u):r},u.sourceRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Bn(+f),u):r},u.targetRadius=function(f){return arguments.length?(i=typeof f=="function"?f:Bn(+f),u):i},u.startAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Bn(+f),u):o},u.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Bn(+f),u):a},u.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Bn(+f),u):s},u.source=function(f){return arguments.length?(e=f,u):e},u.target=function(f){return arguments.length?(n=f,u):n},u.context=function(f){return arguments.length?(c=f??null,u):c},u}function v$(){return Vg()}function x$(){return Vg(b$)}var _$=Array.prototype,jg=_$.slice;function w$(t,e){return t-e}function A$(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const pn=t=>()=>t;function M$(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=$$(t,e[n]))return i;return 0}function $$(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var c=t[o],u=c[0],f=c[1],h=t[s],l=h[0],p=h[1];if(S$(c,h,e))return 0;f>r!=p>r&&n<(l-u)*(r-f)/(p-f)+u&&(i=-i)}return i}function S$(t,e,n){var r;return T$(t,e,n)&&P$(t[r=+(t[0]===e[0])],n[r],e[r])}function T$(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function P$(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function D$(){}var Ve=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function yl(){var t=1,e=1,n=bc,r=c;function i(u){var f=n(u);if(Array.isArray(f))f=f.slice().sort(w$);else{const h=xi(u,k$);for(f=kn(...yc(h[0],h[1],f),f);f[f.length-1]>=h[1];)f.pop();for(;f[1]<h[0];)f.shift()}return f.map(h=>o(u,h))}function o(u,f){const h=f==null?NaN:+f;if(isNaN(h))throw new Error(`invalid value: ${f}`);var l=[],p=[];return a(u,h,function(d){r(d,u,h),A$(d)>0?l.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=l.length,y;g<m;++g)if(M$((y=l[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:f,coordinates:l}}function a(u,f,h){var l=new Array,p=new Array,d,g,m,y,_,v;for(d=g=-1,y=Yn(u[0],f),Ve[y<<1].forEach(b);++d<t-1;)m=y,y=Yn(u[d+1],f),Ve[m|y<<1].forEach(b);for(Ve[y<<0].forEach(b);++g<e-1;){for(d=-1,y=Yn(u[g*t+t],f),_=Yn(u[g*t],f),Ve[y<<1|_<<2].forEach(b);++d<t-1;)m=y,y=Yn(u[g*t+t+d+1],f),v=_,_=Yn(u[g*t+d+1],f),Ve[m|y<<1|_<<2|v<<3].forEach(b);Ve[y|_<<3].forEach(b)}for(d=-1,_=u[g*t]>=f,Ve[_<<2].forEach(b);++d<t-1;)v=_,_=Yn(u[g*t+d+1],f),Ve[_<<2|v<<3].forEach(b);Ve[_<<3].forEach(b);function b(x){var A=[x[0][0]+d,x[0][1]+g],T=[x[1][0]+d,x[1][1]+g],D=s(A),k=s(T),E,S;(E=p[D])?(S=l[k])?(delete p[E.end],delete l[S.start],E===S?(E.ring.push(T),h(E.ring)):l[E.start]=p[S.end]={start:E.start,end:S.end,ring:E.ring.concat(S.ring)}):(delete p[E.end],E.ring.push(T),p[E.end=k]=E):(E=l[k])?(S=p[D])?(delete l[E.start],delete p[S.end],E===S?(E.ring.push(T),h(E.ring)):l[S.start]=p[E.end]={start:S.start,end:E.end,ring:S.ring.concat(E.ring)}):(delete l[E.start],E.ring.unshift(A),l[E.start=D]=E):l[D]=p[k]={start:D,end:k,ring:[A,T]}}}function s(u){return u[0]*2+u[1]*(t+1)*4}function c(u,f,h){u.forEach(function(l){var p=l[0],d=l[1],g=p|0,m=d|0,y=bl(f[m*t+g]);p>0&&p<t&&g===p&&(l[0]=Zg(p,bl(f[m*t+g-1]),y,h)),d>0&&d<e&&m===d&&(l[1]=Zg(d,bl(f[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(u){if(!arguments.length)return[t,e];var f=Math.floor(u[0]),h=Math.floor(u[1]);if(!(f>=0&&h>=0))throw new Error("invalid size");return t=f,e=h,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?pn(jg.call(u)):pn(u),i):n},i.smooth=function(u){return arguments.length?(r=u?c:D$,i):r===c},i}function k$(t){return isFinite(t)?t:NaN}function Yn(t,e){return t==null?!1:+t>=e}function bl(t){return t==null||isNaN(t=+t)?-1/0:t}function Zg(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function E$(t){return t[0]}function N$(t){return t[1]}function L$(){return 1}function I$(){var t=E$,e=N$,n=L$,r=960,i=500,o=20,a=2,s=o*3,c=r+s*2>>a,u=i+s*2>>a,f=pn(20);function h(_){var v=new Float32Array(c*u),b=Math.pow(2,-a),x=-1;for(const N of _){var A=(t(N,++x,_)+s)*b,T=(e(N,x,_)+s)*b,D=+n(N,x,_);if(D&&A>=0&&A<c&&T>=0&&T<u){var k=Math.floor(A),E=Math.floor(T),S=A-k-.5,C=T-E-.5;v[k+E*c]+=(1-S)*(1-C)*D,v[k+1+E*c]+=S*(1-C)*D,v[k+1+(E+1)*c]+=S*C*D,v[k+(E+1)*c]+=(1-S)*C*D}}return Hp({data:v,width:c,height:u},o*b),v}function l(_){var v=h(_),b=f(v),x=Math.pow(2,2*a);return Array.isArray(b)||(b=kn(Number.MIN_VALUE,wi(v)/x,b)),yl().size([c,u]).thresholds(b.map(A=>A*x))(v).map((A,T)=>(A.value=+b[T],p(A)))}l.contours=function(_){var v=h(_),b=yl().size([c,u]),x=Math.pow(2,2*a),A=T=>{T=+T;var D=p(b.contour(v,T*x));return D.value=T,D};return Object.defineProperty(A,"max",{get:()=>wi(v)/x}),A};function p(_){return _.coordinates.forEach(d),_}function d(_){_.forEach(g)}function g(_){_.forEach(m)}function m(_){_[0]=_[0]*Math.pow(2,a)-s,_[1]=_[1]*Math.pow(2,a)-s}function y(){return s=o*3,c=r+s*2>>a,u=i+s*2>>a,l}return l.x=function(_){return arguments.length?(t=typeof _=="function"?_:pn(+_),l):t},l.y=function(_){return arguments.length?(e=typeof _=="function"?_:pn(+_),l):e},l.weight=function(_){return arguments.length?(n=typeof _=="function"?_:pn(+_),l):n},l.size=function(_){if(!arguments.length)return[r,i];var v=+_[0],b=+_[1];if(!(v>=0&&b>=0))throw new Error("invalid size");return r=v,i=b,y()},l.cellSize=function(_){if(!arguments.length)return 1<<a;if(!((_=+_)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(_)/Math.LN2),y()},l.thresholds=function(_){return arguments.length?(f=typeof _=="function"?_:Array.isArray(_)?pn(jg.call(_)):pn(_),l):f},l.bandwidth=function(_){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((_=+_)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*_*_+1)-1)/2,y()},l}const je=11102230246251565e-32,Ot=134217729,C$=(3+8*je)*je;function vl(t,e,n,r,i){let o,a,s,c,u=e[0],f=r[0],h=0,l=0;f>u==f>-u?(o=u,u=e[++h]):(o=f,f=r[++l]);let p=0;if(h<t&&l<n)for(f>u==f>-u?(a=u+o,s=o-(a-u),u=e[++h]):(a=f+o,s=o-(a-f),f=r[++l]),o=a,s!==0&&(i[p++]=s);h<t&&l<n;)f>u==f>-u?(a=o+u,c=a-o,s=o-(a-c)+(u-c),u=e[++h]):(a=o+f,c=a-o,s=o-(a-c)+(f-c),f=r[++l]),o=a,s!==0&&(i[p++]=s);for(;h<t;)a=o+u,c=a-o,s=o-(a-c)+(u-c),u=e[++h],o=a,s!==0&&(i[p++]=s);for(;l<n;)a=o+f,c=a-o,s=o-(a-c)+(f-c),f=r[++l],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function R$(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Bi(t){return new Float64Array(t)}const F$=(3+16*je)*je,z$=(2+12*je)*je,O$=(9+64*je)*je*je,Nr=Bi(4),Kg=Bi(8),Qg=Bi(12),Jg=Bi(16),Yt=Bi(4);function G$(t,e,n,r,i,o,a){let s,c,u,f,h,l,p,d,g,m,y,_,v,b,x,A,T,D;const k=t-i,E=n-i,S=e-o,C=r-o;b=k*C,l=Ot*k,p=l-(l-k),d=k-p,l=Ot*C,g=l-(l-C),m=C-g,x=d*m-(b-p*g-d*g-p*m),A=S*E,l=Ot*S,p=l-(l-S),d=S-p,l=Ot*E,g=l-(l-E),m=E-g,T=d*m-(A-p*g-d*g-p*m),y=x-T,h=x-y,Nr[0]=x-(y+h)+(h-T),_=b+y,h=_-b,v=b-(_-h)+(y-h),y=v-A,h=v-y,Nr[1]=v-(y+h)+(h-A),D=_+y,h=D-_,Nr[2]=_-(D-h)+(y-h),Nr[3]=D;let N=R$(4,Nr),M=z$*a;if(N>=M||-N>=M||(h=t-k,s=t-(k+h)+(h-i),h=n-E,u=n-(E+h)+(h-i),h=e-S,c=e-(S+h)+(h-o),h=r-C,f=r-(C+h)+(h-o),s===0&&c===0&&u===0&&f===0)||(M=O$*a+C$*Math.abs(N),N+=k*f+C*s-(S*u+E*c),N>=M||-N>=M))return N;b=s*C,l=Ot*s,p=l-(l-s),d=s-p,l=Ot*C,g=l-(l-C),m=C-g,x=d*m-(b-p*g-d*g-p*m),A=c*E,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*E,g=l-(l-E),m=E-g,T=d*m-(A-p*g-d*g-p*m),y=x-T,h=x-y,Yt[0]=x-(y+h)+(h-T),_=b+y,h=_-b,v=b-(_-h)+(y-h),y=v-A,h=v-y,Yt[1]=v-(y+h)+(h-A),D=_+y,h=D-_,Yt[2]=_-(D-h)+(y-h),Yt[3]=D;const $=vl(4,Nr,4,Yt,Kg);b=k*f,l=Ot*k,p=l-(l-k),d=k-p,l=Ot*f,g=l-(l-f),m=f-g,x=d*m-(b-p*g-d*g-p*m),A=S*u,l=Ot*S,p=l-(l-S),d=S-p,l=Ot*u,g=l-(l-u),m=u-g,T=d*m-(A-p*g-d*g-p*m),y=x-T,h=x-y,Yt[0]=x-(y+h)+(h-T),_=b+y,h=_-b,v=b-(_-h)+(y-h),y=v-A,h=v-y,Yt[1]=v-(y+h)+(h-A),D=_+y,h=D-_,Yt[2]=_-(D-h)+(y-h),Yt[3]=D;const w=vl($,Kg,4,Yt,Qg);b=s*f,l=Ot*s,p=l-(l-s),d=s-p,l=Ot*f,g=l-(l-f),m=f-g,x=d*m-(b-p*g-d*g-p*m),A=c*u,l=Ot*c,p=l-(l-c),d=c-p,l=Ot*u,g=l-(l-u),m=u-g,T=d*m-(A-p*g-d*g-p*m),y=x-T,h=x-y,Yt[0]=x-(y+h)+(h-T),_=b+y,h=_-b,v=b-(_-h)+(y-h),y=v-A,h=v-y,Yt[1]=v-(y+h)+(h-A),D=_+y,h=D-_,Yt[2]=_-(D-h)+(y-h),Yt[3]=D;const P=vl(w,Qg,4,Yt,Jg);return Jg[P-1]}function Va(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),c=a-s,u=Math.abs(a+s);return Math.abs(c)>=F$*u?c:-G$(t,e,n,r,i,o,u)}const t1=Math.pow(2,-52),ja=new Uint32Array(512);class Za{static from(e,n=W$,r=H$){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new Za(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,c=1/0,u=-1/0,f=-1/0;for(let k=0;k<a;k++){const E=e[2*k],S=e[2*k+1];E<s&&(s=E),S<c&&(c=S),E>u&&(u=E),S>f&&(f=S),this._ids[k]=k}const h=(s+u)/2,l=(c+f)/2;let p,d,g;for(let k=0,E=1/0;k<a;k++){const S=xl(h,l,e[2*k],e[2*k+1]);S<E&&(p=k,E=S)}const m=e[2*p],y=e[2*p+1];for(let k=0,E=1/0;k<a;k++){if(k===p)continue;const S=xl(m,y,e[2*k],e[2*k+1]);S<E&&S>0&&(d=k,E=S)}let _=e[2*d],v=e[2*d+1],b=1/0;for(let k=0;k<a;k++){if(k===p||k===d)continue;const E=Y$(m,y,_,v,e[2*k],e[2*k+1]);E<b&&(g=k,b=E)}let x=e[2*g],A=e[2*g+1];if(b===1/0){for(let S=0;S<a;S++)this._dists[S]=e[2*S]-e[0]||e[2*S+1]-e[1];Lr(this._ids,this._dists,0,a-1);const k=new Uint32Array(a);let E=0;for(let S=0,C=-1/0;S<a;S++){const N=this._ids[S],M=this._dists[N];M>C&&(k[E++]=N,C=M)}this.hull=k.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Va(m,y,_,v,x,A)<0){const k=d,E=_,S=v;d=g,_=x,v=A,g=k,x=E,A=S}const T=q$(m,y,_,v,x,A);this._cx=T.x,this._cy=T.y;for(let k=0;k<a;k++)this._dists[k]=xl(e[2*k],e[2*k+1],T.x,T.y);Lr(this._ids,this._dists,0,a-1),this._hullStart=p;let D=3;r[p]=n[g]=d,r[d]=n[p]=g,r[g]=n[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=p,o[this._hashKey(_,v)]=d,o[this._hashKey(x,A)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let k=0,E,S;k<this._ids.length;k++){const C=this._ids[k],N=e[2*C],M=e[2*C+1];if(k>0&&Math.abs(N-E)<=t1&&Math.abs(M-S)<=t1||(E=N,S=M,C===p||C===d||C===g))continue;let $=0;for(let F=0,z=this._hashKey(N,M);F<this._hashSize&&($=o[(z+F)%this._hashSize],!($!==-1&&$!==r[$]));F++);$=n[$];let w=$,P;for(;P=r[w],Va(N,M,e[2*w],e[2*w+1],e[2*P],e[2*P+1])>=0;)if(w=P,w===$){w=-1;break}if(w===-1)continue;let I=this._addTriangle(w,C,r[w],-1,-1,i[w]);i[C]=this._legalize(I+2),i[w]=I,D++;let L=r[w];for(;P=r[L],Va(N,M,e[2*L],e[2*L+1],e[2*P],e[2*P+1])<0;)I=this._addTriangle(L,C,P,i[C],-1,i[L]),i[C]=this._legalize(I+2),r[L]=L,D--,L=P;if(w===$)for(;P=n[w],Va(N,M,e[2*P],e[2*P+1],e[2*w],e[2*w+1])<0;)I=this._addTriangle(P,C,w,-1,i[w],i[P]),this._legalize(I+2),i[P]=I,r[w]=w,D--,w=P;this._hullStart=n[C]=w,r[w]=n[L]=C,r[C]=L,o[this._hashKey(N,M)]=C,o[this._hashKey(e[2*w],e[2*w+1])]=w}this.hull=new Uint32Array(D);for(let k=0,E=this._hullStart;k<D;k++)this.hull[k]=E,E=r[E];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(U$(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],c=e-e%3;if(a=c+(e+2)%3,s===-1){if(o===0)break;e=ja[--o];continue}const u=s-s%3,f=c+(e+1)%3,h=u+(s+2)%3,l=n[a],p=n[e],d=n[f],g=n[h];if(B$(i[2*l],i[2*l+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=l;const y=r[h];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===h){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const _=u+(s+1)%3;o<ja.length&&(ja[o++]=_)}else{if(o===0)break;e=ja[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function U$(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function xl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function B$(t,e,n,r,i,o,a,s){const c=t-a,u=e-s,f=n-a,h=r-s,l=i-a,p=o-s,d=c*c+u*u,g=f*f+h*h,m=l*l+p*p;return c*(h*m-g*p)-u*(f*m-g*l)+d*(f*p-h*l)<0}function Y$(t,e,n,r,i,o){const a=n-t,s=r-e,c=i-t,u=o-e,f=a*a+s*s,h=c*c+u*u,l=.5/(a*u-s*c),p=(u*f-s*h)*l,d=(a*h-c*f)*l;return p*p+d*d}function q$(t,e,n,r,i,o){const a=n-t,s=r-e,c=i-t,u=o-e,f=a*a+s*s,h=c*c+u*u,l=.5/(a*u-s*c),p=t+(u*f-s*h)*l,d=e+(a*h-c*f)*l;return{x:p,y:d}}function Lr(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Yi(t,i,o),e[t[n]]>e[t[r]]&&Yi(t,n,r),e[t[o]]>e[t[r]]&&Yi(t,o,r),e[t[n]]>e[t[o]]&&Yi(t,n,o);const s=t[o],c=e[s];for(;;){do o++;while(e[t[o]]<c);do a--;while(e[t[a]]>c);if(a<o)break;Yi(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Lr(t,e,o,r),Lr(t,e,n,a-1)):(Lr(t,e,n,a-1),Lr(t,e,o,r))}}function Yi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function W$(t){return t[0]}function H$(t){return t[1]}const e1=1e-6;class qn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>e1||Math.abs(this._y1-o)>e1)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class _l{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class n1{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,_,v;g<y;g+=3,m+=2){const b=r[g]*2,x=r[g+1]*2,A=r[g+2]*2,T=e[b],D=e[b+1],k=e[x],E=e[x+1],S=e[A],C=e[A+1],N=k-T,M=E-D,$=S-T,w=C-D,P=(N*w-M*$)*2;if(Math.abs(P)<1e-9){if(o===void 0){o=a=0;for(const L of n)o+=e[L*2],a+=e[L*2+1];o/=n.length,a/=n.length}const I=1e9*Math.sign((o-T)*w-(a-D)*$);_=(T+S)/2-I*w,v=(D+C)/2+I*$}else{const I=1/P,L=N*N+M*M,F=$*$+w*w;_=T+(w*L-M*F)*I,v=D+(N*F-$*L)*I}s[m]=_,s[m+1]=v}let c=n[n.length-1],u,f=c*4,h,l=e[2*c],p,d=e[2*c+1];i.fill(0);for(let g=0;g<n.length;++g)c=n[g],u=f,h=l,p=d,f=c*4,l=e[2*c],d=e[2*c+1],i[u+2]=i[f]=p-d,i[u+3]=i[f+1]=l-h}render(e){const n=e==null?e=new qn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let f=0,h=r.length;f<h;++f){const l=r[f];if(l<f)continue;const p=Math.floor(f/3)*2,d=Math.floor(l/3)*2,g=a[p],m=a[p+1],y=a[d],_=a[d+1];this._renderSegment(g,m,y,_,e)}let c,u=o[o.length-1];for(let f=0;f<o.length;++f){c=u,u=o[f];const h=Math.floor(i[u]/3)*2,l=a[h],p=a[h+1],d=c*4,g=this._project(l,p,s[d+2],s[d+3]);g&&this._renderSegment(l,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new qn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new qn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new _l;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),c=this._regioncode(r,i);s===0&&c===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,c))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,c=i.length;s<c;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+c-2)%c]&&n[(o+3)%a]===i[(s+c-1)%c]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let c=a;do{const u=Math.floor(c/3);if(s.push(n[u*2],n[u*2+1]),c=c%3===2?c-2:c+1,o[c]!==e)break;c=i[c]}while(c!==a&&c!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],c=n[r-1],u,f=this._regioncode(s,c),h,l=0;for(let p=0;p<r;p+=2)if(o=s,a=c,s=n[p],c=n[p+1],u=f,f=this._regioncode(s,c),u===0&&f===0)h=l,l=0,i?i.push(s,c):i=[s,c];else{let d,g,m,y,_;if(u===0){if((d=this._clipSegment(o,a,s,c,u,f))===null)continue;[g,m,y,_]=d}else{if((d=this._clipSegment(s,c,o,a,f,u))===null)continue;[y,_,g,m]=d,h=l,l=this._edgecode(g,m),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(g,m):i=[g,m]}h=l,l=this._edgecode(y,_),h&&l&&this._edge(e,h,l,i,i.length),i?i.push(y,_):i=[y,_]}if(i)h=l,l=this._edgecode(i[0],i[1]),h&&l&&this._edge(e,h,l,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let c,u,f=o||a;f&8?(c=e+(r-e)*(this.ymax-n)/(i-n),u=this.ymax):f&4?(c=e+(r-e)*(this.ymin-n)/(i-n),u=this.ymin):f&2?(u=n+(i-n)*(this.xmax-e)/(r-e),c=this.xmax):(u=n+(i-n)*(this.xmin-e)/(r-e),c=this.xmin),o?(e=c,n=u,o=this._regioncode(e,n)):(r=c,i=u,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),c;if((c=this._project(s[0],s[1],r,i))&&s.unshift(c[0],c[1]),(c=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(c[0],c[1]),s=this._clipFinite(e,s))for(let u=0,f=s.length,h,l=this._edgecode(s[f-2],s[f-1]);u<f;u+=2)h=l,l=this._edgecode(s[u],s[u+1]),h&&l&&(u=this._edge(e,h,l,s,u),f=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,c;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(c=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(c=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,c=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,c=n+(o=a)*i)}return[s,c]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const X$=2*Math.PI,Ir=Math.pow;function V$(t){return t[0]}function j$(t){return t[1]}function Z$(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function K$(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class wl{static from(e,n=V$,r=j$,i){return new wl("length"in e?Q$(e,n,r,i):Float64Array.from(J$(e,n,r,i)))}constructor(e){this._delaunator=new Za(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&Z$(e)){this.collinear=Int32Array.from({length:n.length/2},(l,p)=>p).sort((l,p)=>n[2*l]-n[2*p]||n[2*l+1]-n[2*p+1]);const c=this.collinear[0],u=this.collinear[this.collinear.length-1],f=[n[2*c],n[2*c+1],n[2*u],n[2*u+1]],h=1e-8*Math.hypot(f[3]-f[1],f[2]-f[0]);for(let l=0,p=n.length/2;l<p;++l){const d=K$(n[2*l],n[2*l+1],h);n[2*l]=d[0],n[2*l+1]=d[1]}this._delaunator=new Za(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let c=0,u=r.length;c<u;++c){const f=o[c%3===2?c-2:c+1];(r[c]===-1||a[f]===-1)&&(a[f]=c)}for(let c=0,u=i.length;c<u;++c)s[i[c]]=c;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new n1(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const c=n[e];if(c===-1)return;let u=c,f=-1;do{if(yield f=a[u],u=u%3===2?u-2:u+1,a[u]!==e)return;if(u=o[u],u===-1){const h=r[(i[e]+1)%r.length];h!==f&&(yield h);return}}while(u!==c)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:c,points:u}=this;if(i[e]===-1||!u.length)return(e+1)%(u.length>>1);let f=e,h=Ir(n-u[e*2],2)+Ir(r-u[e*2+1],2);const l=i[e];let p=l;do{let d=c[p];const g=Ir(n-u[d*2],2)+Ir(r-u[d*2+1],2);if(g<h&&(h=g,f=d),p=p%3===2?p-2:p+1,c[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&Ir(n-u[p*2],2)+Ir(r-u[p*2+1],2)<h)return p;break}}while(p!==l);return f}render(e){const n=e==null?e=new qn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const c=i[a];if(c<a)continue;const u=o[a]*2,f=o[c]*2;e.moveTo(r[u],r[u+1]),e.lineTo(r[f],r[f+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new qn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],c=i[o+1];e.moveTo(s+n,c),e.arc(s,c,n,0,X$)}return r&&r.value()}renderHull(e){const n=e==null?e=new qn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const c=2*r[s];e.lineTo(i[c],i[c+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new _l;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new qn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,c=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[c],i[c+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new _l;return this.renderTriangle(e,n),n.value()}}function Q$(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*J$(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var r1={},Al={},Ml=34,qi=10,$l=13;function i1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function tS(t,e){var n=i1(t);return function(r,i){return e(n(r),i,t)}}function o1(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function eS(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function nS(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":eS(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function Ka(t){var e=new RegExp('["'+t+`
6
+ \r]`),n=t.charCodeAt(0);function r(h,l){var p,d,g=i(h,function(m,y){if(p)return p(m,y-1);d=m,p=l?tS(m,l):i1(m)});return g.columns=d||[],g}function i(h,l){var p=[],d=h.length,g=0,m=0,y,_=d<=0,v=!1;h.charCodeAt(d-1)===qi&&--d,h.charCodeAt(d-1)===$l&&--d;function b(){if(_)return Al;if(v)return v=!1,r1;var A,T=g,D;if(h.charCodeAt(T)===Ml){for(;g++<d&&h.charCodeAt(g)!==Ml||h.charCodeAt(++g)===Ml;);return(A=g)>=d?_=!0:(D=h.charCodeAt(g++))===qi?v=!0:D===$l&&(v=!0,h.charCodeAt(g)===qi&&++g),h.slice(T+1,A-1).replace(/""/g,'"')}for(;g<d;){if((D=h.charCodeAt(A=g++))===qi)v=!0;else if(D===$l)v=!0,h.charCodeAt(g)===qi&&++g;else if(D!==n)continue;return h.slice(T,A)}return _=!0,h.slice(T,d)}for(;(y=b())!==Al;){for(var x=[];y!==r1&&y!==Al;)x.push(y),y=b();l&&(x=l(x,m++))==null||p.push(x)}return p}function o(h,l){return h.map(function(p){return l.map(function(d){return f(p[d])}).join(t)})}function a(h,l){return l==null&&(l=o1(h)),[l.map(f).join(t)].concat(o(h,l)).join(`
7
+ `)}function s(h,l){return l==null&&(l=o1(h)),o(h,l).join(`
8
+ `)}function c(h){return h.map(u).join(`
9
+ `)}function u(h){return h.map(f).join(t)}function f(h){return h==null?"":h instanceof Date?nS(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:c,formatRow:u,formatValue:f}}var Wn=Ka(","),a1=Wn.parse,rS=Wn.parseRows,iS=Wn.format,oS=Wn.formatBody,aS=Wn.formatRows,sS=Wn.formatRow,uS=Wn.formatValue,Hn=Ka(" "),s1=Hn.parse,cS=Hn.parseRows,lS=Hn.format,fS=Hn.formatBody,hS=Hn.formatRows,pS=Hn.formatRow,dS=Hn.formatValue;function gS(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))mS&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const mS=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function yS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function bS(t,e){return fetch(t,e).then(yS)}function vS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function xS(t,e){return fetch(t,e).then(vS)}function _S(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Qa(t,e){return fetch(t,e).then(_S)}function u1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Qa(e,n).then(function(i){return t(i,r)})}}function wS(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Ka(t);return Qa(e,n).then(function(o){return i.parse(o,r)})}var AS=u1(a1),MS=u1(s1);function $S(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function SS(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function TS(t,e){return fetch(t,e).then(SS)}function Sl(t){return(e,n)=>Qa(e,n).then(r=>new DOMParser().parseFromString(r,t))}const PS=Sl("application/xml");var DS=Sl("text/html"),kS=Sl("image/svg+xml");function ES(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,c=0,u=0;for(o=0;o<a;++o)s=n[o],c+=s.x,u+=s.y;for(c=(c/a-t)*r,u=(u/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=c,s.y-=u}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function NS(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return c1(this.cover(e,n),e,n,t)}function c1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,c=t._y0,u=t._x1,f=t._y1,h,l,p,d,g,m,y,_;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+u)/2))?s=h:u=h,(m=n>=(l=(c+f)/2))?c=l:f=l,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+u)/2))?s=h:u=h,(m=n>=(l=(c+f)/2))?c=l:f=l;while((y=m<<1|g)===(_=(d>=l)<<1|p>=h));return i[_]=o,i[y]=a,t}function LS(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<c&&(c=i),i>f&&(f=i),o<u&&(u=o),o>h&&(h=o));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;n<r;++n)c1(this,a[n],s[n],t[n]);return this}function IS(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,c,u;n>t||t>=i||r>e||e>=o;)switch(u=(e<r)<<1|t<n,c=new Array(4),c[u]=s,s=c,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 CS(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function RS(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function FS(t,e,n){var r,i=this._x0,o=this._y0,a,s,c,u,f=this._x1,h=this._y1,l=[],p=this._root,d,g;for(p&&l.push(new qt(p,i,o,f,h)),n==null?n=1/0:(i=t-n,o=e-n,f=t+n,h=e+n,n*=n);d=l.pop();)if(!(!(p=d.node)||(a=d.x0)>f||(s=d.y0)>h||(c=d.x1)<i||(u=d.y1)<o))if(p.length){var m=(a+c)/2,y=(s+u)/2;l.push(new qt(p[3],m,y,c,u),new qt(p[2],a,y,m,u),new qt(p[1],m,s,c,y),new qt(p[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(d=l[l.length-1],l[l.length-1]=l[l.length-1-g],l[l.length-1-g]=d)}else{var _=t-+this._x.call(null,p.data),v=e-+this._y.call(null,p.data),b=_*_+v*v;if(b<n){var x=Math.sqrt(n=b);i=t-x,o=e-x,f=t+x,h=e+x,r=p.data}}return r}function zS(t){if(isNaN(f=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,c=this._x1,u=this._y1,f,h,l,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=f>=(l=(a+c)/2))?a=l:c=l,(g=h>=(p=(s+u)/2))?s=p:u=p,e=n,!(n=n[m=g<<1|d]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function OS(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function GS(){return this._root}function US(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function BS(t){var e=[],n,r=this._root,i,o,a,s,c;for(r&&e.push(new qt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,c=n.y1)&&r.length){var u=(o+s)/2,f=(a+c)/2;(i=r[3])&&e.push(new qt(i,u,f,s,c)),(i=r[2])&&e.push(new qt(i,o,f,u,c)),(i=r[1])&&e.push(new qt(i,u,a,s,f)),(i=r[0])&&e.push(new qt(i,o,a,u,f))}return this}function YS(t){var e=[],n=[],r;for(this._root&&e.push(new qt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,c=r.x1,u=r.y1,f=(a+c)/2,h=(s+u)/2;(o=i[0])&&e.push(new qt(o,a,s,f,h)),(o=i[1])&&e.push(new qt(o,f,s,c,h)),(o=i[2])&&e.push(new qt(o,a,h,f,u)),(o=i[3])&&e.push(new qt(o,f,h,c,u))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function qS(t){return t[0]}function WS(t){return arguments.length?(this._x=t,this):this._x}function HS(t){return t[1]}function XS(t){return arguments.length?(this._y=t,this):this._y}function Ja(t,e,n){var r=new Tl(e??qS,n??HS,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Tl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function l1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Wt=Ja.prototype=Tl.prototype;Wt.copy=function(){var t=new Tl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=l1(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=l1(r));return t},Wt.add=NS,Wt.addAll=LS,Wt.cover=IS,Wt.data=CS,Wt.extent=RS,Wt.find=FS,Wt.remove=zS,Wt.removeAll=OS,Wt.root=GS,Wt.size=US,Wt.visit=BS,Wt.visitAfter=YS,Wt.x=WS,Wt.y=XS;function Et(t){return function(){return t}}function dn(t){return(t()-.5)*1e-6}function VS(t){return t.x+t.vx}function jS(t){return t.y+t.vy}function f1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Et(t==null?1:+t));function a(){for(var u,f=e.length,h,l,p,d,g,m,y=0;y<o;++y)for(h=Ja(e,VS,jS).visitAfter(s),u=0;u<f;++u)l=e[u],g=n[l.index],m=g*g,p=l.x+l.vx,d=l.y+l.vy,h.visit(_);function _(v,b,x,A,T){var D=v.data,k=v.r,E=g+k;if(D){if(D.index>l.index){var S=p-D.x-D.vx,C=d-D.y-D.vy,N=S*S+C*C;N<E*E&&(S===0&&(S=dn(r),N+=S*S),C===0&&(C=dn(r),N+=C*C),N=(E-(N=Math.sqrt(N)))/N*i,l.vx+=(S*=N)*(E=(k*=k)/(m+k)),l.vy+=(C*=N)*E,D.vx-=S*(E=1-E),D.vy-=C*E)}return}return b>p+E||A<p-E||x>d+E||T<d-E}}function s(u){if(u.data)return u.r=n[u.data.index];for(var f=u.r=0;f<4;++f)u[f]&&u[f].r>u.r&&(u.r=u[f].r)}function c(){if(e){var u,f=e.length,h;for(n=new Array(f),u=0;u<f;++u)h=e[u],n[h.index]=+t(h,u,e)}}return a.initialize=function(u,f){e=u,r=f,c()},a.iterations=function(u){return arguments.length?(o=+u,a):o},a.strength=function(u){return arguments.length?(i=+u,a):i},a.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Et(+u),c(),a):t},a}function ZS(t){return t.index}function h1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function KS(t){var e=ZS,n=h,r,i=Et(30),o,a,s,c,u,f=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function l(m){for(var y=0,_=t.length;y<f;++y)for(var v=0,b,x,A,T,D,k,E;v<_;++v)b=t[v],x=b.source,A=b.target,T=A.x+A.vx-x.x-x.vx||dn(u),D=A.y+A.vy-x.y-x.vy||dn(u),k=Math.sqrt(T*T+D*D),k=(k-o[v])/k*m*r[v],T*=k,D*=k,A.vx-=T*(E=c[v]),A.vy-=D*E,x.vx+=T*(E=1-E),x.vy+=D*E}function p(){if(a){var m,y=a.length,_=t.length,v=new Map(a.map((x,A)=>[e(x,A,a),x])),b;for(m=0,s=new Array(y);m<_;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=h1(v,b.source)),typeof b.target!="object"&&(b.target=h1(v,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,c=new Array(_);m<_;++m)b=t[m],c[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(_),d(),o=new Array(_),g()}}function d(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return l.initialize=function(m,y){a=m,u=y,p()},l.links=function(m){return arguments.length?(t=m,p(),l):t},l.id=function(m){return arguments.length?(e=m,l):e},l.iterations=function(m){return arguments.length?(f=+m,l):f},l.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Et(+m),d(),l):n},l.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Et(+m),g(),l):i},l}const QS=1664525,JS=1013904223,p1=4294967296;function t9(){let t=1;return()=>(t=(QS*t+JS)%p1)/p1}function e9(t){return t.x}function n9(t){return t.y}var r9=10,i9=Math.PI*(3-Math.sqrt(5));function d1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,c=Oa(h),u=Nn("tick","end"),f=t9();t==null&&(t=[]);function h(){l(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function l(g){var m,y=t.length,_;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)_=t[m],_.fx==null?_.x+=_.vx*=a:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=a:(_.y=_.fy,_.vy=0);return e}function p(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var _=r9*Math.sqrt(.5+g),v=g*i9;y.x=_*Math.cos(v),y.y=_*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(g){return g.initialize&&g.initialize(t,f),g}return p(),e={tick:l,restart:function(){return c.restart(h),e},stop:function(){return c.stop(),e},nodes:function(g){return arguments.length?(t=g,p(),s.forEach(d),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(f=g,s.forEach(d),e):f},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,d(m)),e):s.get(g)},find:function(g,m,y){var _=0,v=t.length,b,x,A,T,D;for(y==null?y=1/0:y*=y,_=0;_<v;++_)T=t[_],b=g-T.x,x=m-T.y,A=b*b+x*x,A<y&&(D=T,y=A);return D},on:function(g,m){return arguments.length>1?(u.on(g,m),e):u.on(g)}}}function g1(){var t,e,n,r,i=Et(-30),o,a=1,s=1/0,c=.81;function u(p){var d,g=t.length,m=Ja(t,e9,n9).visitAfter(h);for(r=p,d=0;d<g;++d)e=t[d],m.visit(l)}function f(){if(t){var p,d=t.length,g;for(o=new Array(d),p=0;p<d;++p)g=t[p],o[g.index]=+i(g,p,t)}}function h(p){var d=0,g,m,y=0,_,v,b;if(p.length){for(_=v=b=0;b<4;++b)(g=p[b])&&(m=Math.abs(g.value))&&(d+=g.value,y+=m,_+=m*g.x,v+=m*g.y);p.x=_/y,p.y=v/y}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function l(p,d,g,m){if(!p.value)return!0;var y=p.x-e.x,_=p.y-e.y,v=m-d,b=y*y+_*_;if(v*v/c<b)return b<s&&(y===0&&(y=dn(n),b+=y*y),_===0&&(_=dn(n),b+=_*_),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*p.value*r/b,e.vy+=_*p.value*r/b),!0;if(p.length||b>=s)return;(p.data!==e||p.next)&&(y===0&&(y=dn(n),b+=y*y),_===0&&(_=dn(n),b+=_*_),b<a&&(b=Math.sqrt(a*b)));do p.data!==e&&(v=o[p.data.index]*r/b,e.vx+=y*v,e.vy+=_*v);while(p=p.next)}return u.initialize=function(p,d){t=p,n=d,f()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Et(+p),f(),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?(c=p*p,u):Math.sqrt(c)},u}function o9(t,e,n){var r,i=Et(.1),o,a;typeof t!="function"&&(t=Et(+t)),e==null&&(e=0),n==null&&(n=0);function s(u){for(var f=0,h=r.length;f<h;++f){var l=r[f],p=l.x-e||1e-6,d=l.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[f]-g)*o[f]*u/g;l.vx+=p*m,l.vy+=d*m}}function c(){if(r){var u,f=r.length;for(o=new Array(f),a=new Array(f),u=0;u<f;++u)a[u]=+t(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,c()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Et(+u),c(),s):i},s.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Et(+u),c(),s):t},s.x=function(u){return arguments.length?(e=+u,s):e},s.y=function(u){return arguments.length?(n=+u,s):n},s}function m1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var c=0,u=n.length,f;c<u;++c)f=n[c],f.vx+=(i[c]-f.x)*r[c]*s}function a(){if(n){var s,c=n.length;for(r=new Array(c),i=new Array(c),s=0;s<c;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Et(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function y1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var c=0,u=n.length,f;c<u;++c)f=n[c],f.vy+=(i[c]-f.y)*r[c]*s}function a(){if(n){var s,c=n.length;for(r=new Array(c),i=new Array(c),s=0;s<c;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Et(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function a9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ts(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Cr(t){return t=ts(Math.abs(t)),t?t[1]:NaN}function s9(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function u9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var c9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rr(t){if(!(e=c9.exec(t)))throw new Error("invalid format: "+t);var e;return new es({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Rr.prototype=es.prototype;function es(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}es.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 l9(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var b1;function f9(t,e){var n=ts(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(b1=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")+ts(t,Math.max(0,e+o-1))[0]}function v1(t,e){var n=ts(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const x1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:a9,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>v1(t*100,e),r:v1,s:f9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _1(t){return t}var w1=Array.prototype.map,A1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function M1(t){var e=t.grouping===void 0||t.thousands===void 0?_1:s9(w1.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?_1:u9(w1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(h){h=Rr(h);var l=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,y=h.width,_=h.comma,v=h.precision,b=h.trim,x=h.type;x==="n"?(_=!0,x="g"):x1[x]||(v===void 0&&(v=12),b=!0,x="g"),(m||l==="0"&&p==="=")&&(m=!0,l="0",p="=");var A=g==="$"?n:g==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",T=g==="$"?r:/[%p]/.test(x)?a:"",D=x1[x],k=/[defgprs%]/.test(x);v=v===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function E(S){var C=A,N=T,M,$,w;if(x==="c")N=D(S)+N,S="";else{S=+S;var P=S<0||1/S<0;if(S=isNaN(S)?c:D(Math.abs(S),v),b&&(S=l9(S)),P&&+S==0&&d!=="+"&&(P=!1),C=(P?d==="("?d:s:d==="-"||d==="("?"":d)+C,N=(x==="s"?A1[8+b1/3]:"")+N+(P&&d==="("?")":""),k){for(M=-1,$=S.length;++M<$;)if(w=S.charCodeAt(M),48>w||w>57){N=(w===46?i+S.slice(M+1):S.slice(M))+N,S=S.slice(0,M);break}}}_&&!m&&(S=e(S,1/0));var I=C.length+S.length+N.length,L=I<y?new Array(y-I+1).join(l):"";switch(_&&m&&(S=e(L+S,L.length?y-N.length:1/0),L=""),p){case"<":S=C+S+N+L;break;case"=":S=C+L+S+N;break;case"^":S=L.slice(0,I=L.length>>1)+C+S+N+L.slice(I);break;default:S=L+C+S+N;break}return o(S)}return E.toString=function(){return h+""},E}function f(h,l){var p=u((h=Rr(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Cr(l)/3)))*3,g=Math.pow(10,-d),m=A1[8+d/3];return function(y){return p(g*y)+m}}return{format:u,formatPrefix:f}}var ns,Wi,Pl;$1({thousands:",",grouping:[3],currency:["$",""]});function $1(t){return ns=M1(t),Wi=ns.format,Pl=ns.formatPrefix,ns}function S1(t){return Math.max(0,-Cr(Math.abs(t)))}function T1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cr(e)/3)))*3-Cr(Math.abs(t)))}function P1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Cr(e)-Cr(t))+1}var V=1e-6,Hi=1e-12,st=Math.PI,At=st/2,rs=st/4,Ht=st*2,yt=180/st,j=st/180,ct=Math.abs,Fr=Math.atan,Xt=Math.atan2,X=Math.cos,is=Math.ceil,D1=Math.exp,Dl=Math.hypot,os=Math.log,kl=Math.pow,W=Math.sin,le=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,El=Math.tan;function k1(t){return t>1?0:t<-1?st:Math.acos(t)}function Vt(t){return t>1?At:t<-1?-At:Math.asin(t)}function E1(t){return(t=W(t/2))*t}function _t(){}function as(t,e){t&&L1.hasOwnProperty(t.type)&&L1[t.type](t,e)}var N1={Feature:function(t,e){as(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)as(n[r].geometry,e)}},L1={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Nl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Nl(n[r],e,0)},Polygon:function(t,e){I1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)I1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)as(n[r],e)}};function Nl(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function I1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Nl(t[n],e,1);e.polygonEnd()}function Te(t,e){t&&N1.hasOwnProperty(t.type)?N1[t.type](t,e):as(t,e)}var ss=new kt,us=new kt,C1,R1,Ll,Il,Cl,Ce={point:_t,lineStart:_t,lineEnd:_t,polygonStart:function(){ss=new kt,Ce.lineStart=h9,Ce.lineEnd=p9},polygonEnd:function(){var t=+ss;us.add(t<0?Ht+t:t),this.lineStart=this.lineEnd=this.point=_t},sphere:function(){us.add(Ht)}};function h9(){Ce.point=d9}function p9(){F1(C1,R1)}function d9(t,e){Ce.point=F1,C1=t,R1=e,t*=j,e*=j,Ll=t,Il=X(e=e/2+rs),Cl=W(e)}function F1(t,e){t*=j,e*=j,e=e/2+rs;var n=t-Ll,r=n>=0?1:-1,i=r*n,o=X(e),a=W(e),s=Cl*a,c=Il*o+s*X(i),u=s*r*W(i);ss.add(Xt(u,c)),Ll=t,Il=o,Cl=a}function g9(t){return us=new kt,Te(t,Ce),us*2}function cs(t){return[Xt(t[1],t[0]),Vt(t[2])]}function Xn(t){var e=t[0],n=t[1],r=X(n);return[r*X(e),r*W(e),W(n)]}function ls(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function zr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Rl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function fs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function hs(t){var e=It(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var wt,re,Mt,se,Vn,z1,O1,Or,Xi,gn,Ze,Ke={point:Fl,lineStart:U1,lineEnd:B1,polygonStart:function(){Ke.point=Y1,Ke.lineStart=m9,Ke.lineEnd=y9,Xi=new kt,Ce.polygonStart()},polygonEnd:function(){Ce.polygonEnd(),Ke.point=Fl,Ke.lineStart=U1,Ke.lineEnd=B1,ss<0?(wt=-(Mt=180),re=-(se=90)):Xi>V?se=90:Xi<-V&&(re=-90),Ze[0]=wt,Ze[1]=Mt},sphere:function(){wt=-(Mt=180),re=-(se=90)}};function Fl(t,e){gn.push(Ze=[wt=t,Mt=t]),e<re&&(re=e),e>se&&(se=e)}function G1(t,e){var n=Xn([t*j,e*j]);if(Or){var r=zr(Or,n),i=[r[1],-r[0],0],o=zr(i,r);hs(o),o=cs(o);var a=t-Vn,s=a>0?1:-1,c=o[0]*yt*s,u,f=ct(a)>180;f^(s*Vn<c&&c<s*t)?(u=o[1]*yt,u>se&&(se=u)):(c=(c+360)%360-180,f^(s*Vn<c&&c<s*t)?(u=-o[1]*yt,u<re&&(re=u)):(e<re&&(re=e),e>se&&(se=e))),f?t<Vn?ue(wt,t)>ue(wt,Mt)&&(Mt=t):ue(t,Mt)>ue(wt,Mt)&&(wt=t):Mt>=wt?(t<wt&&(wt=t),t>Mt&&(Mt=t)):t>Vn?ue(wt,t)>ue(wt,Mt)&&(Mt=t):ue(t,Mt)>ue(wt,Mt)&&(wt=t)}else gn.push(Ze=[wt=t,Mt=t]);e<re&&(re=e),e>se&&(se=e),Or=n,Vn=t}function U1(){Ke.point=G1}function B1(){Ze[0]=wt,Ze[1]=Mt,Ke.point=Fl,Or=null}function Y1(t,e){if(Or){var n=t-Vn;Xi.add(ct(n)>180?n+(n>0?360:-360):n)}else z1=t,O1=e;Ce.point(t,e),G1(t,e)}function m9(){Ce.lineStart()}function y9(){Y1(z1,O1),Ce.lineEnd(),ct(Xi)>V&&(wt=-(Mt=180)),Ze[0]=wt,Ze[1]=Mt,Or=null}function ue(t,e){return(e-=t)<0?e+360:e}function b9(t,e){return t[0]-e[0]}function q1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function v9(t){var e,n,r,i,o,a,s;if(se=Mt=-(wt=re=1/0),gn=[],Te(t,Ke),n=gn.length){for(gn.sort(b9),e=1,r=gn[0],o=[r];e<n;++e)i=gn[e],q1(r,i[0])||q1(r,i[1])?(ue(r[0],i[1])>ue(r[0],r[1])&&(r[1]=i[1]),ue(i[0],r[1])>ue(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ue(r[1],i[0]))>a&&(a=s,wt=i[0],Mt=r[1])}return gn=Ze=null,wt===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[wt,re],[Mt,se]]}var Vi,ps,ds,gs,ms,ys,bs,vs,zl,Ol,Gl,W1,H1,jt,Zt,Kt,Pe={sphere:_t,point:Ul,lineStart:X1,lineEnd:V1,polygonStart:function(){Pe.lineStart=w9,Pe.lineEnd=A9},polygonEnd:function(){Pe.lineStart=X1,Pe.lineEnd=V1}};function Ul(t,e){t*=j,e*=j;var n=X(e);ji(n*X(t),n*W(t),W(e))}function ji(t,e,n){++Vi,ds+=(t-ds)/Vi,gs+=(e-gs)/Vi,ms+=(n-ms)/Vi}function X1(){Pe.point=x9}function x9(t,e){t*=j,e*=j;var n=X(e);jt=n*X(t),Zt=n*W(t),Kt=W(e),Pe.point=_9,ji(jt,Zt,Kt)}function _9(t,e){t*=j,e*=j;var n=X(e),r=n*X(t),i=n*W(t),o=W(e),a=Xt(It((a=Zt*o-Kt*i)*a+(a=Kt*r-jt*o)*a+(a=jt*i-Zt*r)*a),jt*r+Zt*i+Kt*o);ps+=a,ys+=a*(jt+(jt=r)),bs+=a*(Zt+(Zt=i)),vs+=a*(Kt+(Kt=o)),ji(jt,Zt,Kt)}function V1(){Pe.point=Ul}function w9(){Pe.point=M9}function A9(){j1(W1,H1),Pe.point=Ul}function M9(t,e){W1=t,H1=e,t*=j,e*=j,Pe.point=j1;var n=X(e);jt=n*X(t),Zt=n*W(t),Kt=W(e),ji(jt,Zt,Kt)}function j1(t,e){t*=j,e*=j;var n=X(e),r=n*X(t),i=n*W(t),o=W(e),a=Zt*o-Kt*i,s=Kt*r-jt*o,c=jt*i-Zt*r,u=Dl(a,s,c),f=Vt(u),h=u&&-f/u;zl.add(h*a),Ol.add(h*s),Gl.add(h*c),ps+=f,ys+=f*(jt+(jt=r)),bs+=f*(Zt+(Zt=i)),vs+=f*(Kt+(Kt=o)),ji(jt,Zt,Kt)}function $9(t){Vi=ps=ds=gs=ms=ys=bs=vs=0,zl=new kt,Ol=new kt,Gl=new kt,Te(t,Pe);var e=+zl,n=+Ol,r=+Gl,i=Dl(e,n,r);return i<Hi&&(e=ys,n=bs,r=vs,ps<V&&(e=ds,n=gs,r=ms),i=Dl(e,n,r),i<Hi)?[NaN,NaN]:[Xt(n,e)*yt,Vt(r/i)*yt]}function Gr(t){return function(){return t}}function Bl(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Yl(t,e){return ct(t)>st&&(t-=Math.round(t/Ht)*Ht),[t,e]}Yl.invert=Yl;function ql(t,e,n){return(t%=Ht)?e||n?Bl(K1(t),Q1(e,n)):K1(t):e||n?Q1(e,n):Yl}function Z1(t){return function(e,n){return e+=t,ct(e)>st&&(e-=Math.round(e/Ht)*Ht),[e,n]}}function K1(t){var e=Z1(t);return e.invert=Z1(-t),e}function Q1(t,e){var n=X(t),r=W(t),i=X(e),o=W(e);function a(s,c){var u=X(c),f=X(s)*u,h=W(s)*u,l=W(c),p=l*n+f*r;return[Xt(h*i-p*o,f*n-l*r),Vt(p*i+h*o)]}return a.invert=function(s,c){var u=X(c),f=X(s)*u,h=W(s)*u,l=W(c),p=l*i-h*o;return[Xt(h*i+l*o,f*n+p*r),Vt(p*n-f*r)]},a}function J1(t){t=ql(t[0]*j,t[1]*j,t.length>2?t[2]*j:0);function e(n){return n=t(n[0]*j,n[1]*j),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*j,n[1]*j),n[0]*=yt,n[1]*=yt,n},e}function tm(t,e,n,r,i,o){if(n){var a=X(e),s=W(e),c=r*n;i==null?(i=e+r*Ht,o=e-c/2):(i=em(a,i),o=em(a,o),(r>0?i<o:i>o)&&(i+=r*Ht));for(var u,f=i;r>0?f>o:f<o;f-=c)u=cs([a,-s*X(f),-s*W(f)]),t.point(u[0],u[1])}}function em(t,e){e=Xn(e),e[0]-=t,hs(e);var n=k1(-e[1]);return((-e[2]<0?-n:n)+Ht-V)%Ht}function S9(){var t=Gr([0,0]),e=Gr(90),n=Gr(2),r,i,o={point:a};function a(c,u){r.push(c=i(c,u)),c[0]*=yt,c[1]*=yt}function s(){var c=t.apply(this,arguments),u=e.apply(this,arguments)*j,f=n.apply(this,arguments)*j;return r=[],i=ql(-c[0]*j,-c[1]*j,0).invert,tm(o,u,f,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return s.center=function(c){return arguments.length?(t=typeof c=="function"?c:Gr([+c[0],+c[1]]),s):t},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Gr(+c),s):e},s.precision=function(c){return arguments.length?(n=typeof c=="function"?c:Gr(+c),s):n},s}function nm(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:_t,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function xs(t,e){return ct(t[0]-e[0])<V&&ct(t[1]-e[1])<V}function _s(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function rm(t,e,n,r,i){var o=[],a=[],s,c;if(t.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],y=d[g],_;if(xs(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=d[s])[0],m[1]);i.lineEnd();return}y[0]+=2*V}o.push(_=new _s(m,d,null,!0)),a.push(_.o=new _s(m,null,_,!1)),o.push(_=new _s(y,d,null,!1)),a.push(_.o=new _s(y,null,_,!0))}}),!!o.length){for(a.sort(e),im(o),im(a),s=0,c=a.length;s<c;++s)a[s].e=n=!n;for(var u=o[0],f,h;;){for(var l=u,p=!0;l.v;)if((l=l.n)===u)return;f=l.z,i.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(s=0,c=f.length;s<c;++s)i.point((h=f[s])[0],h[1]);else r(l.x,l.n.x,1,i);l=l.n}else{if(p)for(f=l.p.z,s=f.length-1;s>=0;--s)i.point((h=f[s])[0],h[1]);else r(l.x,l.p.x,-1,i);l=l.p}l=l.o,f=l.z,p=!p}while(!l.v);i.lineEnd()}}}function im(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function Wl(t){return ct(t[0])<=st?t[0]:le(t[0])*((ct(t[0])+st)%Ht-st)}function om(t,e){var n=Wl(e),r=e[1],i=W(r),o=[W(n),-X(n),0],a=0,s=0,c=new kt;i===1?r=At+V:i===-1&&(r=-At-V);for(var u=0,f=t.length;u<f;++u)if(l=(h=t[u]).length)for(var h,l,p=h[l-1],d=Wl(p),g=p[1]/2+rs,m=W(g),y=X(g),_=0;_<l;++_,d=b,m=A,y=T,p=v){var v=h[_],b=Wl(v),x=v[1]/2+rs,A=W(x),T=X(x),D=b-d,k=D>=0?1:-1,E=k*D,S=E>st,C=m*A;if(c.add(Xt(C*k*W(E),y*T+C*X(E))),a+=S?D+k*Ht:D,S^d>=n^b>=n){var N=zr(Xn(p),Xn(v));hs(N);var M=zr(o,N);hs(M);var $=(S^D>=0?-1:1)*Vt(M[2]);(r>$||r===$&&(N[0]||N[1]))&&(s+=S^D>=0?1:-1)}}return(a<-V||a<V&&c<-Hi)^s&1}function am(t,e,n,r){return function(i){var o=e(i),a=nm(),s=e(a),c=!1,u,f,h,l={point:p,lineStart:g,lineEnd:m,polygonStart:function(){l.point=y,l.lineStart=_,l.lineEnd=v,f=[],u=[]},polygonEnd:function(){l.point=p,l.lineStart=g,l.lineEnd=m,f=_c(f);var b=om(u,r);f.length?(c||(i.polygonStart(),c=!0),rm(f,P9,b,n,i)):b&&(c||(i.polygonStart(),c=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),f=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(b,x){t(b,x)&&i.point(b,x)}function d(b,x){o.point(b,x)}function g(){l.point=d,o.lineStart()}function m(){l.point=p,o.lineEnd()}function y(b,x){h.push([b,x]),s.point(b,x)}function _(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),x=a.result(),A,T=x.length,D,k,E;if(h.pop(),u.push(h),h=null,!!T){if(b&1){if(k=x[0],(D=k.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),A=0;A<D;++A)i.point((E=k[A])[0],E[1]);i.lineEnd()}return}T>1&&b&2&&x.push(x.pop().concat(x.shift())),f.push(x.filter(T9))}}return l}}function T9(t){return t.length>1}function P9(t,e){return((t=t.x)[0]<0?t[1]-At-V:At-t[1])-((e=e.x)[0]<0?e[1]-At-V:At-e[1])}const Hl=am(function(){return!0},D9,E9,[-st,-At]);function D9(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?st:-st,c=ct(o-e);ct(c-st)<V?(t.point(e,n=(n+a)/2>0?At:-At),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&c>=st&&(ct(e-r)<V&&(e-=r*V),ct(o-s)<V&&(o-=s*V),n=k9(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function k9(t,e,n,r){var i,o,a=W(t-n);return ct(a)>V?Fr((W(e)*(o=X(r))*W(n)-W(r)*(i=X(e))*W(t))/(i*o*a)):(e+r)/2}function E9(t,e,n,r){var i;if(t==null)i=n*At,r.point(-st,i),r.point(0,i),r.point(st,i),r.point(st,0),r.point(st,-i),r.point(0,-i),r.point(-st,-i),r.point(-st,0),r.point(-st,i);else if(ct(t[0]-e[0])>V){var o=t[0]<e[0]?st:-st;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function sm(t){var e=X(t),n=2*j,r=e>0,i=ct(e)>V;function o(f,h,l,p){tm(p,t,n,l,f,h)}function a(f,h){return X(f)*X(h)>e}function s(f){var h,l,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var _=[m,y],v,b=a(m,y),x=r?b?0:u(m,y):b?u(m+(m<0?st:-st),y):0;if(!h&&(d=p=b)&&f.lineStart(),b!==p&&(v=c(h,_),(!v||xs(h,v)||xs(_,v))&&(_[2]=1)),b!==p)g=0,b?(f.lineStart(),v=c(_,h),f.point(v[0],v[1])):(v=c(h,_),f.point(v[0],v[1],2),f.lineEnd()),h=v;else if(i&&h&&r^b){var A;!(x&l)&&(A=c(_,h,!0))&&(g=0,r?(f.lineStart(),f.point(A[0][0],A[0][1]),f.point(A[1][0],A[1][1]),f.lineEnd()):(f.point(A[1][0],A[1][1]),f.lineEnd(),f.lineStart(),f.point(A[0][0],A[0][1],3)))}b&&(!h||!xs(h,_))&&f.point(_[0],_[1]),h=_,p=b,l=x},lineEnd:function(){p&&f.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function c(f,h,l){var p=Xn(f),d=Xn(h),g=[1,0,0],m=zr(p,d),y=ls(m,m),_=m[0],v=y-_*_;if(!v)return!l&&f;var b=e*y/v,x=-e*_/v,A=zr(g,m),T=fs(g,b),D=fs(m,x);Rl(T,D);var k=A,E=ls(T,k),S=ls(k,k),C=E*E-S*(ls(T,T)-1);if(!(C<0)){var N=It(C),M=fs(k,(-E-N)/S);if(Rl(M,T),M=cs(M),!l)return M;var $=f[0],w=h[0],P=f[1],I=h[1],L;w<$&&(L=$,$=w,w=L);var F=w-$,z=ct(F-st)<V,U=z||F<V;if(!z&&I<P&&(L=P,P=I,I=L),U?z?P+I>0^M[1]<(ct(M[0]-$)<V?P:I):P<=M[1]&&M[1]<=I:F>st^($<=M[0]&&M[0]<=w)){var tt=fs(k,(-E+N)/S);return Rl(tt,T),[M,cs(tt)]}}}function u(f,h){var l=r?t:st-t,p=0;return f<-l?p|=1:f>l&&(p|=2),h<-l?p|=4:h>l&&(p|=8),p}return am(a,s,o,r?[0,-t]:[-st,t-st])}function N9(t,e,n,r,i,o){var a=t[0],s=t[1],c=e[0],u=e[1],f=0,h=1,l=c-a,p=u-s,d;if(d=n-a,!(!l&&d>0)){if(d/=l,l<0){if(d<f)return;d<h&&(h=d)}else if(l>0){if(d>h)return;d>f&&(f=d)}if(d=i-a,!(!l&&d<0)){if(d/=l,l<0){if(d>h)return;d>f&&(f=d)}else if(l>0){if(d<f)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<f)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>f&&(f=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>f&&(f=d)}else if(p>0){if(d<f)return;d<h&&(h=d)}return f>0&&(t[0]=a+f*l,t[1]=s+f*p),h<1&&(e[0]=a+h*l,e[1]=s+h*p),!0}}}}}var Zi=1e9,ws=-Zi;function As(t,e,n,r){function i(u,f){return t<=u&&u<=n&&e<=f&&f<=r}function o(u,f,h,l){var p=0,d=0;if(u==null||(p=a(u,h))!==(d=a(f,h))||c(u,f)<0^h>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+h+4)%4)!==d);else l.point(f[0],f[1])}function a(u,f){return ct(u[0]-t)<V?f>0?0:3:ct(u[0]-n)<V?f>0?2:1:ct(u[1]-e)<V?f>0?1:0:f>0?3:2}function s(u,f){return c(u.x,f.x)}function c(u,f){var h=a(u,1),l=a(f,1);return h!==l?h-l:h===0?f[1]-u[1]:h===1?u[0]-f[0]:h===2?u[1]-f[1]:f[0]-u[0]}return function(u){var f=u,h=nm(),l,p,d,g,m,y,_,v,b,x,A,T={point:D,lineStart:C,lineEnd:N,polygonStart:E,polygonEnd:S};function D($,w){i($,w)&&f.point($,w)}function k(){for(var $=0,w=0,P=p.length;w<P;++w)for(var I=p[w],L=1,F=I.length,z=I[0],U,tt,K=z[0],it=z[1];L<F;++L)U=K,tt=it,z=I[L],K=z[0],it=z[1],tt<=r?it>r&&(K-U)*(r-tt)>(it-tt)*(t-U)&&++$:it<=r&&(K-U)*(r-tt)<(it-tt)*(t-U)&&--$;return $}function E(){f=h,l=[],p=[],A=!0}function S(){var $=k(),w=A&&$,P=(l=_c(l)).length;(w||P)&&(u.polygonStart(),w&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),P&&rm(l,s,$,o,u),u.polygonEnd()),f=u,l=p=d=null}function C(){T.point=M,p&&p.push(d=[]),x=!0,b=!1,_=v=NaN}function N(){l&&(M(g,m),y&&b&&h.rejoin(),l.push(h.result())),T.point=D,b&&f.lineEnd()}function M($,w){var P=i($,w);if(p&&d.push([$,w]),x)g=$,m=w,y=P,x=!1,P&&(f.lineStart(),f.point($,w));else if(P&&b)f.point($,w);else{var I=[_=Math.max(ws,Math.min(Zi,_)),v=Math.max(ws,Math.min(Zi,v))],L=[$=Math.max(ws,Math.min(Zi,$)),w=Math.max(ws,Math.min(Zi,w))];N9(I,L,t,e,n,r)?(b||(f.lineStart(),f.point(I[0],I[1])),f.point(L[0],L[1]),P||f.lineEnd(),A=!1):P&&(f.lineStart(),f.point($,w),A=!1)}_=$,v=w,b=P}return T}}function L9(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=As(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var Xl,Vl,Ms,$s,Ur={sphere:_t,point:_t,lineStart:I9,lineEnd:_t,polygonStart:_t,polygonEnd:_t};function I9(){Ur.point=R9,Ur.lineEnd=C9}function C9(){Ur.point=Ur.lineEnd=_t}function R9(t,e){t*=j,e*=j,Vl=t,Ms=W(e),$s=X(e),Ur.point=F9}function F9(t,e){t*=j,e*=j;var n=W(e),r=X(e),i=ct(t-Vl),o=X(i),a=W(i),s=r*a,c=$s*n-Ms*r*o,u=Ms*n+$s*r*o;Xl.add(Xt(It(s*s+c*c),u)),Vl=t,Ms=n,$s=r}function um(t){return Xl=new kt,Te(t,Ur),+Xl}var jl=[null,null],z9={type:"LineString",coordinates:jl};function Ss(t,e){return jl[0]=t,jl[1]=e,um(z9)}var cm={Feature:function(t,e){return Ts(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ts(n[r].geometry,e))return!0;return!1}},lm={Sphere:function(){return!0},Point:function(t,e){return fm(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(fm(n[r],e))return!0;return!1},LineString:function(t,e){return hm(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(hm(n[r],e))return!0;return!1},Polygon:function(t,e){return pm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(pm(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ts(n[r],e))return!0;return!1}};function Ts(t,e){return t&&lm.hasOwnProperty(t.type)?lm[t.type](t,e):!1}function fm(t,e){return Ss(t,e)===0}function hm(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Ss(t[o],e),r===0||o>0&&(i=Ss(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Hi*i))return!0;n=r}return!1}function pm(t,e){return!!om(t.map(O9),dm(e))}function O9(t){return t=t.map(dm),t.pop(),t}function dm(t){return[t[0]*j,t[1]*j]}function G9(t,e){return(t&&cm.hasOwnProperty(t.type)?cm[t.type]:Ts)(t,e)}function gm(t,e,n){var r=un(t,e-V,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function mm(t,e,n){var r=un(t,e-V,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function ym(){var t,e,n,r,i,o,a,s,c=10,u=c,f=90,h=360,l,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:_()}}function _(){return un(is(r/f)*f,n,f).map(d).concat(un(is(s/h)*h,a,h).map(g)).concat(un(is(e/c)*c,t,c).filter(function(v){return ct(v%f)>V}).map(l)).concat(un(is(o/u)*u,i,u).filter(function(v){return ct(v%h)>V}).map(p))}return y.lines=function(){return _().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(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(m)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(m)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(f=+v[0],h=+v[1],y):[f,h]},y.stepMinor=function(v){return arguments.length?(c=+v[0],u=+v[1],y):[c,u]},y.precision=function(v){return arguments.length?(m=+v,l=gm(o,i,90),p=mm(e,t,m),d=gm(s,a,90),g=mm(r,n,m),y):m},y.extentMajor([[-180,-90+V],[180,90-V]]).extentMinor([[-180,-80-V],[180,80+V]])}function U9(){return ym()()}function B9(t,e){var n=t[0]*j,r=t[1]*j,i=e[0]*j,o=e[1]*j,a=X(r),s=W(r),c=X(o),u=W(o),f=a*X(n),h=a*W(n),l=c*X(i),p=c*W(i),d=2*Vt(It(E1(o-r)+a*c*E1(i-n))),g=W(d),m=d?function(y){var _=W(y*=d)/g,v=W(d-y)/g,b=v*f+_*l,x=v*h+_*p,A=v*s+_*u;return[Xt(x,b)*yt,Xt(A,It(b*b+x*x))*yt]}:function(){return[n*yt,r*yt]};return m.distance=d,m}const Ki=t=>t;var Zl=new kt,Kl=new kt,bm,vm,Ql,Jl,Qe={point:_t,lineStart:_t,lineEnd:_t,polygonStart:function(){Qe.lineStart=Y9,Qe.lineEnd=W9},polygonEnd:function(){Qe.lineStart=Qe.lineEnd=Qe.point=_t,Zl.add(ct(Kl)),Kl=new kt},result:function(){var t=Zl/2;return Zl=new kt,t}};function Y9(){Qe.point=q9}function q9(t,e){Qe.point=xm,bm=Ql=t,vm=Jl=e}function xm(t,e){Kl.add(Jl*t-Ql*e),Ql=t,Jl=e}function W9(){xm(bm,vm)}var Br=1/0,Ps=Br,Qi=-Br,Ds=Qi,ks={point:H9,lineStart:_t,lineEnd:_t,polygonStart:_t,polygonEnd:_t,result:function(){var t=[[Br,Ps],[Qi,Ds]];return Qi=Ds=-(Ps=Br=1/0),t}};function H9(t,e){t<Br&&(Br=t),t>Qi&&(Qi=t),e<Ps&&(Ps=e),e>Ds&&(Ds=e)}var tf=0,ef=0,Ji=0,Es=0,Ns=0,Yr=0,nf=0,rf=0,to=0,_m,wm,Re,Fe,fe={point:jn,lineStart:Am,lineEnd:Mm,polygonStart:function(){fe.lineStart=j9,fe.lineEnd=Z9},polygonEnd:function(){fe.point=jn,fe.lineStart=Am,fe.lineEnd=Mm},result:function(){var t=to?[nf/to,rf/to]:Yr?[Es/Yr,Ns/Yr]:Ji?[tf/Ji,ef/Ji]:[NaN,NaN];return tf=ef=Ji=Es=Ns=Yr=nf=rf=to=0,t}};function jn(t,e){tf+=t,ef+=e,++Ji}function Am(){fe.point=X9}function X9(t,e){fe.point=V9,jn(Re=t,Fe=e)}function V9(t,e){var n=t-Re,r=e-Fe,i=It(n*n+r*r);Es+=i*(Re+t)/2,Ns+=i*(Fe+e)/2,Yr+=i,jn(Re=t,Fe=e)}function Mm(){fe.point=jn}function j9(){fe.point=K9}function Z9(){$m(_m,wm)}function K9(t,e){fe.point=$m,jn(_m=Re=t,wm=Fe=e)}function $m(t,e){var n=t-Re,r=e-Fe,i=It(n*n+r*r);Es+=i*(Re+t)/2,Ns+=i*(Fe+e)/2,Yr+=i,i=Fe*t-Re*e,nf+=i*(Re+t),rf+=i*(Fe+e),to+=i*3,jn(Re=t,Fe=e)}function Sm(t){this._context=t}Sm.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Ht);break}}},result:_t};var of=new kt,af,Tm,Pm,eo,no,ro={point:_t,lineStart:function(){ro.point=Q9},lineEnd:function(){af&&Dm(Tm,Pm),ro.point=_t},polygonStart:function(){af=!0},polygonEnd:function(){af=null},result:function(){var t=+of;return of=new kt,t}};function Q9(t,e){ro.point=Dm,Tm=eo=t,Pm=no=e}function Dm(t,e){eo-=t,no-=e,of.add(It(eo*eo+no*no)),eo=t,no=e}let km,Ls,Em,Nm;class Lm{constructor(e){this._append=e==null?Im:J9(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Em||this._append!==Ls){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`,Em=r,Ls=this._append,Nm=this._,this._=i}this._+=Nm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Im(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function J9(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Im;if(e!==km){const n=10**e;km=e,Ls=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 Ls}function tT(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Te(s,i(o))),o.result()}return a.area=function(s){return Te(s,i(Qe)),Qe.result()},a.measure=function(s){return Te(s,i(ro)),ro.result()},a.bounds=function(s){return Te(s,i(ks)),ks.result()},a.centroid=function(s){return Te(s,i(fe)),fe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,Ki):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new Lm(n)):new Sm(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const c=Math.floor(s);if(!(c>=0))throw new RangeError(`invalid digits: ${s}`);n=c}return e===null&&(o=new Lm(n)),a},a.projection(t).digits(n).context(e)}function eT(t){return{stream:io(t)}}function io(t){return function(e){var n=new sf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function sf(){}sf.prototype={constructor:sf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function uf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Te(n,t.stream(ks)),e(ks.result()),r!=null&&t.clipExtent(r),t}function Is(t,e,n){return uf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,c=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,c])},n)}function cf(t,e,n){return Is(t,[[0,0],e],n)}function lf(t,e,n){return uf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function ff(t,e,n){return uf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var Cm=16,nT=X(30*j);function Rm(t,e){return+e?iT(t,e):rT(t)}function rT(t){return io({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function iT(t,e){function n(r,i,o,a,s,c,u,f,h,l,p,d,g,m){var y=u-r,_=f-i,v=y*y+_*_;if(v>4*e&&g--){var b=a+l,x=s+p,A=c+d,T=It(b*b+x*x+A*A),D=Vt(A/=T),k=ct(ct(A)-1)<V||ct(o-h)<V?(o+h)/2:Xt(x,b),E=t(k,D),S=E[0],C=E[1],N=S-r,M=C-i,$=_*N-y*M;($*$/v>e||ct((y*N+_*M)/v-.5)>.3||a*l+s*p+c*d<nT)&&(n(r,i,o,a,s,c,S,C,k,b/=T,x/=T,A,g,m),m.point(S,C),n(S,C,k,b,x,A,u,f,h,l,p,d,g,m))}}return function(r){var i,o,a,s,c,u,f,h,l,p,d,g,m={point:y,lineStart:_,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=x},polygonEnd:function(){r.polygonEnd(),m.lineStart=_}};function y(D,k){D=t(D,k),r.point(D[0],D[1])}function _(){h=NaN,m.point=v,r.lineStart()}function v(D,k){var E=Xn([D,k]),S=t(D,k);n(h,l,f,p,d,g,h=S[0],l=S[1],f=D,p=E[0],d=E[1],g=E[2],Cm,r),r.point(h,l)}function b(){m.point=y,r.lineEnd()}function x(){_(),m.point=A,m.lineEnd=T}function A(D,k){v(i=D,k),o=h,a=l,s=p,c=d,u=g,m.point=v}function T(){n(h,l,f,p,d,g,o,a,i,s,c,u,Cm,r),m.lineEnd=b,b()}return m}}var oT=io({point:function(t,e){this.stream.point(t*j,e*j)}});function aT(t){return io({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function sT(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function Fm(t,e,n,r,i,o){if(!o)return sT(t,e,n,r,i);var a=X(o),s=W(o),c=a*t,u=s*t,f=a/t,h=s/t,l=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[c*g-u*m+e,n-u*g-c*m]}return d.invert=function(g,m){return[r*(f*g-h*m+l),i*(p-h*g-f*m)]},d}function ze(t){return hf(function(){return t})()}function hf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,c=0,u=0,f,h=0,l=1,p=1,d=null,g=Hl,m=null,y,_,v,b=Ki,x=.5,A,T,D,k,E;function S($){return D($[0]*j,$[1]*j)}function C($){return $=D.invert($[0],$[1]),$&&[$[0]*yt,$[1]*yt]}S.stream=function($){return k&&E===$?k:k=oT(aT(f)(g(A(b(E=$)))))},S.preclip=function($){return arguments.length?(g=$,d=void 0,M()):g},S.postclip=function($){return arguments.length?(b=$,m=y=_=v=null,M()):b},S.clipAngle=function($){return arguments.length?(g=+$?sm(d=$*j):(d=null,Hl),M()):d*yt},S.clipExtent=function($){return arguments.length?(b=$==null?(m=y=_=v=null,Ki):As(m=+$[0][0],y=+$[0][1],_=+$[1][0],v=+$[1][1]),M()):m==null?null:[[m,y],[_,v]]},S.scale=function($){return arguments.length?(n=+$,N()):n},S.translate=function($){return arguments.length?(r=+$[0],i=+$[1],N()):[r,i]},S.center=function($){return arguments.length?(o=$[0]%360*j,a=$[1]%360*j,N()):[o*yt,a*yt]},S.rotate=function($){return arguments.length?(s=$[0]%360*j,c=$[1]%360*j,u=$.length>2?$[2]%360*j:0,N()):[s*yt,c*yt,u*yt]},S.angle=function($){return arguments.length?(h=$%360*j,N()):h*yt},S.reflectX=function($){return arguments.length?(l=$?-1:1,N()):l<0},S.reflectY=function($){return arguments.length?(p=$?-1:1,N()):p<0},S.precision=function($){return arguments.length?(A=Rm(T,x=$*$),M()):It(x)},S.fitExtent=function($,w){return Is(S,$,w)},S.fitSize=function($,w){return cf(S,$,w)},S.fitWidth=function($,w){return lf(S,$,w)},S.fitHeight=function($,w){return ff(S,$,w)};function N(){var $=Fm(n,0,0,l,p,h).apply(null,e(o,a)),w=Fm(n,r-$[0],i-$[1],l,p,h);return f=ql(s,c,u),T=Bl(e,w),D=Bl(f,T),A=Rm(T,x),M()}function M(){return k=E=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&C,N()}}function pf(t){var e=0,n=st/3,r=hf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*j,n=o[1]*j):[e*yt,n*yt]},i}function uT(t){var e=X(t);function n(r,i){return[r*e,W(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function zm(t,e){var n=W(t),r=(n+W(e))/2;if(ct(r)<V)return uT(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,c){var u=It(i-2*r*W(c))/r;return[u*W(s*=r),o-u*X(s)]}return a.invert=function(s,c){var u=o-c,f=Xt(s,ct(u))*le(u);return u*r<0&&(f-=st*le(s)*le(u)),[f/r,Vt((i-(s*s+u*u)*r*r)/(2*r))]},a}function Cs(){return pf(zm).scale(155.424).center([0,33.6442])}function Om(){return Cs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function cT(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function lT(){var t,e,n=Om(),r,i=Cs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Cs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,c,u={point:function(l,p){c=[l,p]}};function f(l){var p=l[0],d=l[1];return c=null,r.point(p,d),c||(o.point(p,d),c)||(s.point(p,d),c)}f.invert=function(l){var p=n.scale(),d=n.translate(),g=(l[0]-d[0])/p,m=(l[1]-d[1])/p;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(l)},f.stream=function(l){return t&&e===l?t:t=cT([n.stream(e=l),i.stream(l),a.stream(l)])},f.precision=function(l){return arguments.length?(n.precision(l),i.precision(l),a.precision(l),h()):n.precision()},f.scale=function(l){return arguments.length?(n.scale(l),i.scale(l*.35),a.scale(l),f.translate(n.translate())):n.scale()},f.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),d=+l[0],g=+l[1];return r=n.translate(l).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(u),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+V,g+.12*p+V],[d-.214*p-V,g+.234*p-V]]).stream(u),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+V,g+.166*p+V],[d-.115*p-V,g+.234*p-V]]).stream(u),h()},f.fitExtent=function(l,p){return Is(f,l,p)},f.fitSize=function(l,p){return cf(f,l,p)},f.fitWidth=function(l,p){return lf(f,l,p)},f.fitHeight=function(l,p){return ff(f,l,p)};function h(){return t=e=null,f}return f.scale(1070)}function Gm(t){return function(e,n){var r=X(e),i=X(n),o=t(r*i);return o===1/0?[2,0]:[o*i*W(e),o*W(n)]}}function oo(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=W(i),a=X(i);return[Xt(e*o,r*a),Vt(r&&n*o/r)]}}var df=Gm(function(t){return It(2/(1+t))});df.invert=oo(function(t){return 2*Vt(t/2)});function fT(){return ze(df).scale(124.75).clipAngle(180-.001)}var gf=Gm(function(t){return(t=k1(t))&&t/W(t)});gf.invert=oo(function(t){return t});function hT(){return ze(gf).scale(79.4188).clipAngle(180-.001)}function ao(t,e){return[t,os(El((At+e)/2))]}ao.invert=function(t,e){return[t,2*Fr(D1(e))-At]};function pT(){return Um(ao).scale(961/Ht)}function Um(t){var e=ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,c,u;e.scale=function(h){return arguments.length?(r(h),f()):r()},e.translate=function(h){return arguments.length?(i(h),f()):i()},e.center=function(h){return arguments.length?(n(h),f()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=c=u=null:(a=+h[0][0],s=+h[0][1],c=+h[1][0],u=+h[1][1]),f()):a==null?null:[[a,s],[c,u]]};function f(){var h=st*r(),l=e(J1(e.rotate()).invert([0,0]));return o(a==null?[[l[0]-h,l[1]-h],[l[0]+h,l[1]+h]]:t===ao?[[Math.max(l[0]-h,a),s],[Math.min(l[0]+h,c),u]]:[[a,Math.max(l[1]-h,s)],[c,Math.min(l[1]+h,u)]])}return f()}function Rs(t){return El((At+t)/2)}function Bm(t,e){var n=X(t),r=t===e?W(t):os(n/X(e))/os(Rs(e)/Rs(t)),i=n*kl(Rs(t),r)/r;if(!r)return ao;function o(a,s){i>0?s<-At+V&&(s=-At+V):s>At-V&&(s=At-V);var c=i/kl(Rs(s),r);return[c*W(r*a),i-c*X(r*a)]}return o.invert=function(a,s){var c=i-s,u=le(r)*It(a*a+c*c),f=Xt(a,ct(c))*le(c);return c*r<0&&(f-=st*le(a)*le(c)),[f/r,2*Fr(kl(i/u,1/r))-At]},o}function dT(){return pf(Bm).scale(109.5).parallels([30,30])}function so(t,e){return[t,e]}so.invert=so;function gT(){return ze(so).scale(152.63)}function Ym(t,e){var n=X(t),r=t===e?W(t):(n-X(e))/(e-t),i=n/r+t;if(ct(r)<V)return so;function o(a,s){var c=i-s,u=r*a;return[c*W(u),i-c*X(u)]}return o.invert=function(a,s){var c=i-s,u=Xt(a,ct(c))*le(c);return c*r<0&&(u-=st*le(a)*le(c)),[u/r,i-le(r)*It(a*a+c*c)]},o}function mT(){return pf(Ym).scale(131.154).center([0,13.9389])}var uo=1.340264,co=-.081106,lo=893e-6,fo=.003796,Fs=It(3)/2,yT=12;function mf(t,e){var n=Vt(Fs*W(e)),r=n*n,i=r*r*r;return[t*X(n)/(Fs*(uo+3*co*r+i*(7*lo+9*fo*r))),n*(uo+co*r+i*(lo+fo*r))]}mf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,c;o<yT&&(s=n*(uo+co*r+i*(lo+fo*r))-e,c=uo+3*co*r+i*(7*lo+9*fo*r),n-=a=s/c,r=n*n,i=r*r*r,!(ct(a)<Hi));++o);return[Fs*t*(uo+3*co*r+i*(7*lo+9*fo*r))/X(n),Vt(W(n)/Fs)]};function bT(){return ze(mf).scale(177.158)}function yf(t,e){var n=X(e),r=X(t)*n;return[n*W(t)/r,W(e)/r]}yf.invert=oo(Fr);function vT(){return ze(yf).scale(144.049).clipAngle(60)}function xT(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,c=null,u,f,h,l=1,p=1,d=io({point:function(b,x){var A=v([b,x]);this.stream.point(A[0],A[1])}}),g=Ki,m,y;function _(){return l=t*r,p=t*i,m=y=null,v}function v(b){var x=b[0]*l,A=b[1]*p;if(o){var T=A*a-x*s;x=x*a+A*s,A=T}return[x+e,A+n]}return v.invert=function(b){var x=b[0]-e,A=b[1]-n;if(o){var T=A*a+x*s;x=x*a-A*s,A=T}return[x/l,A/p]},v.stream=function(b){return m&&y===b?m:m=d(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,c=u=f=h=null,_()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(c=u=f=h=null,Ki):As(c=+b[0][0],u=+b[0][1],f=+b[1][0],h=+b[1][1]),_()):c==null?null:[[c,u],[f,h]]},v.scale=function(b){return arguments.length?(t=+b,_()):t},v.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],_()):[e,n]},v.angle=function(b){return arguments.length?(o=b%360*j,s=W(o),a=X(o),_()):o*yt},v.reflectX=function(b){return arguments.length?(r=b?-1:1,_()):r<0},v.reflectY=function(b){return arguments.length?(i=b?-1:1,_()):i<0},v.fitExtent=function(b,x){return Is(v,b,x)},v.fitSize=function(b,x){return cf(v,b,x)},v.fitWidth=function(b,x){return lf(v,b,x)},v.fitHeight=function(b,x){return ff(v,b,x)},v}function bf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}bf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ct(i)>V&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function _T(){return ze(bf).scale(175.295)}function vf(t,e){return[X(e)*W(t),W(e)]}vf.invert=oo(Vt);function wT(){return ze(vf).scale(249.5).clipAngle(90+V)}function xf(t,e){var n=X(e),r=1+X(t)*n;return[n*W(t)/r,W(e)/r]}xf.invert=oo(function(t){return 2*Fr(t)});function AT(){return ze(xf).scale(250).clipAngle(142)}function _f(t,e){return[os(El((At+e)/2)),-t]}_f.invert=function(t,e){return[-e,2*Fr(D1(t))-At]};function MT(){var t=Um(_f),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function $T(t,e){return t.parent===e.parent?1:2}function ST(t){return t.reduce(TT,0)/t.length}function TT(t,e){return t+e.x}function PT(t){return 1+t.reduce(DT,0)}function DT(t,e){return Math.max(t,e.y)}function kT(t){for(var e;e=t.children;)t=e[0];return t}function ET(t){for(var e;e=t.children;)t=e[e.length-1];return t}function NT(){var t=$T,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(l){var p=l.children;p?(l.x=ST(p),l.y=PT(p)):(l.x=a?s+=t(l,a):0,l.y=0,a=l)});var c=kT(o),u=ET(o),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return o.eachAfter(r?function(l){l.x=(l.x-o.x)*e,l.y=(o.y-l.y)*n}:function(l){l.x=(l.x-f)/(h-f)*e,l.y=(1-(o.y?l.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function LT(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function IT(){return this.eachAfter(LT)}function CT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function RT(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function FT(t,e){for(var n=this,r=[n],i=[],o,a,s,c=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function zT(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function OT(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function GT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function UT(t){for(var e=this,n=BT(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function BT(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function YT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function qT(){return Array.from(this)}function WT(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function HT(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*XT(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function wf(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=ZT)):e===void 0&&(e=jT);for(var n=new Zn(t),r,i=[n],o,a,s,c;r=i.pop();)if((a=e(r.data))&&(c=(a=Array.from(a)).length))for(r.children=a,s=c-1;s>=0;--s)i.push(o=a[s]=new Zn(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(qm)}function VT(){return wf(this).eachBefore(KT)}function jT(t){return t.children}function ZT(t){return Array.isArray(t)?t[1]:null}function KT(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qm(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Zn(t){this.data=t,this.depth=this.height=0,this.parent=null}Zn.prototype=wf.prototype={constructor:Zn,count:IT,each:CT,eachAfter:FT,eachBefore:RT,find:zT,sum:OT,sort:GT,path:UT,ancestors:YT,descendants:qT,leaves:WT,links:HT,copy:VT,[Symbol.iterator]:XT};function zs(t){return t==null?null:Wm(t)}function Wm(t){if(typeof t!="function")throw new Error;return t}function Kn(){return 0}function qr(t){return function(){return t}}const QT=1664525,JT=1013904223,Hm=4294967296;function Af(){let t=1;return()=>(t=(QT*t+JT)%Hm)/Hm}function tP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function eP(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function nP(t){return Xm(t,Af())}function Xm(t,e){for(var n=0,r=(t=eP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&Vm(a,o)?++n:(a=iP(i=rP(i,o)),n=0);return a}function rP(t,e){var n,r;if(Mf(e,t))return[e];for(n=0;n<t.length;++n)if(Os(e,t[n])&&Mf(ho(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Os(ho(t[n],t[r]),e)&&Os(ho(t[n],e),t[r])&&Os(ho(t[r],e),t[n])&&Mf(jm(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Os(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Vm(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Mf(t,e){for(var n=0;n<e.length;++n)if(!Vm(t,e[n]))return!1;return!0}function iP(t){switch(t.length){case 1:return oP(t[0]);case 2:return ho(t[0],t[1]);case 3:return jm(t[0],t[1],t[2])}}function oP(t){return{x:t.x,y:t.y,r:t.r}}function ho(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,c=o-n,u=a-r,f=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+o+c/h*f)/2,y:(r+a+u/h*f)/2,r:(h+i+s)/2}}function jm(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,c=e.r,u=n.x,f=n.y,h=n.r,l=r-a,p=r-u,d=i-s,g=i-f,m=c-o,y=h-o,_=r*r+i*i-o*o,v=_-a*a-s*s+c*c,b=_-u*u-f*f+h*h,x=p*d-l*g,A=(d*b-g*v)/(x*2)-r,T=(g*m-d*y)/x,D=(p*v-l*b)/(x*2)-i,k=(l*y-p*m)/x,E=T*T+k*k-1,S=2*(o+A*T+D*k),C=A*A+D*D-o*o,N=-(Math.abs(E)>1e-6?(S+Math.sqrt(S*S-4*E*C))/(2*E):C/S);return{x:r+A+T*N,y:i+D+k*N,r:N}}function Zm(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,c,u=r*r+a*a;u?(o=e.r+n.r,o*=o,c=t.r+n.r,c*=c,o>c?(i=(u+c-o)/(2*u),s=Math.sqrt(Math.max(0,c/u-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(u+o-c)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function Km(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Qm(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Gs(t){this._=t,this.next=null,this.previous=null}function Jm(t,e){if(!(o=(t=tP(t)).length))return 0;var n,r,i,o,a,s,c,u,f,h,l;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Zm(r,n,i=t[2]),n=new Gs(n),r=new Gs(r),i=new Gs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<o;++c){Zm(n._,r._,i=t[c]),i=new Gs(i),u=r.next,f=n.previous,h=r._.r,l=n._.r;do if(h<=l){if(Km(u._,i._)){r=u,n.next=r,r.previous=n,--c;continue t}h+=u._.r,u=u.next}else{if(Km(f._,i._)){n=f,n.next=r,r.previous=n,--c;continue t}l+=f._.r,f=f.previous}while(u!==f.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=Qm(n);(i=i.next)!==r;)(s=Qm(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Xm(n,e),c=0;c<o;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function aP(t){return Jm(t,Af()),t}function sP(t){return Math.sqrt(t.value)}function uP(){var t=null,e=1,n=1,r=Kn;function i(o){const a=Af();return o.x=e/2,o.y=n/2,t?o.eachBefore(ty(t)).eachAfter($f(r,.5,a)).eachBefore(ey(1)):o.eachBefore(ty(sP)).eachAfter($f(Kn,1,a)).eachAfter($f(r,o.r/Math.min(e,n),a)).eachBefore(ey(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=zs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:qr(+o),i):r},i}function ty(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function $f(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,c;if(s)for(o=0;o<a;++o)i[o].r+=s;if(c=Jm(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=c+s}}}function ey(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function ny(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function po(t,e,n,r,i){for(var o=t.children,a,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function cP(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(ny),a}function o(a,s){return function(c){c.children&&po(c,c.x0,a*(c.depth+1)/s,c.x1,a*(c.depth+2)/s);var u=c.x0,f=c.y0,h=c.x1-n,l=c.y1-n;h<u&&(u=h=(u+h)/2),l<f&&(f=l=(f+l)/2),c.x0=u,c.y0=f,c.x1=h,c.y1=l}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var lP={depth:-1},ry={},Sf={};function fP(t){return t.id}function hP(t){return t.parentId}function pP(){var t=fP,e=hP,n;function r(i){var o=Array.from(i),a=t,s=e,c,u,f,h,l,p,d,g,m=new Map;if(n!=null){const y=o.map((b,x)=>dP(n(b,x,i))),_=y.map(iy),v=new Set(y).add("");for(const b of _)v.has(b)||(v.add(b),y.push(b),_.push(iy(b)),o.push(Sf));a=(b,x)=>y[x],s=(b,x)=>_[x]}for(f=0,c=o.length;f<c;++f)u=o[f],p=o[f]=new Zn(u),(d=a(u,f,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?ry:p)),(d=s(u,f,i))!=null&&(d+="")&&(p.parent=d);for(f=0;f<c;++f)if(p=o[f],d=p.parent){if(l=m.get(d),!l)throw new Error("missing: "+d);if(l===ry)throw new Error("ambiguous: "+d);l.children?l.children.push(p):l.children=[p],p.parent=l}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Sf&&h.children.length===1;)h=h.children[0],--c;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Sf);--y)p.data=null}if(h.parent=lP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--c}).eachBefore(qm),h.parent=null,c>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=zs(i),r):t},r.parentId=function(i){return arguments.length?(e=zs(i),r):e},r.path=function(i){return arguments.length?(n=zs(i),r):n},r}function dP(t){t=`${t}`;let e=t.length;return Tf(t,e-1)&&!Tf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function iy(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Tf(t,e););return t.slice(0,e)}function Tf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function gP(t,e){return t.parent===e.parent?1:2}function Pf(t){var e=t.children;return e?e[0]:t.t}function Df(t){var e=t.children;return e?e[e.length-1]:t.t}function mP(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function yP(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function bP(t,e,n){return t.a.parent===e.parent?t.a:n}function Us(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Us.prototype=Object.create(Zn.prototype);function vP(t){for(var e=new Us(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Us(o[a],a)),i.parent=n;return(e.parent=new Us(null,0)).children=[e],e}function xP(){var t=gP,e=1,n=1,r=null;function i(u){var f=vP(u);if(f.eachAfter(o),f.parent.m=-f.z,f.eachBefore(a),r)u.eachBefore(c);else{var h=u,l=u,p=u;u.eachBefore(function(_){_.x<h.x&&(h=_),_.x>l.x&&(l=_),_.depth>p.depth&&(p=_)});var d=h===l?1:t(h,l)/2,g=d-h.x,m=e/(l.x+d+g),y=n/(p.depth||1);u.eachBefore(function(_){_.x=(_.x+g)*m,_.y=_.depth*y})}return u}function o(u){var f=u.children,h=u.parent.children,l=u.i?h[u.i-1]:null;if(f){yP(u);var p=(f[0].z+f[f.length-1].z)/2;l?(u.z=l.z+t(u._,l._),u.m=u.z-p):u.z=p}else l&&(u.z=l.z+t(u._,l._));u.parent.A=s(u,l,u.parent.A||h[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,f,h){if(f){for(var l=u,p=u,d=f,g=l.parent.children[0],m=l.m,y=p.m,_=d.m,v=g.m,b;d=Df(d),l=Pf(l),d&&l;)g=Pf(g),p=Df(p),p.a=u,b=d.z+_-l.z-m+t(d._,l._),b>0&&(mP(bP(d,u,h),u,b),m+=b,y+=b),_+=d.m,m+=l.m,v+=g.m,y+=p.m;d&&!Df(p)&&(p.t=d,p.m+=_-y),l&&!Pf(g)&&(g.t=l,g.m+=m-v,h=u)}return h}function c(u){u.x*=e,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(t=u,i):t},i.size=function(u){return arguments.length?(r=!1,e=+u[0],n=+u[1],i):r?null:[e,n]},i.nodeSize=function(u){return arguments.length?(r=!0,e=+u[0],n=+u[1],i):r?[e,n]:null},i}function Bs(t,e,n,r,i){for(var o=t.children,a,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var oy=(1+Math.sqrt(5))/2;function ay(t,e,n,r,i,o){for(var a=[],s=e.children,c,u,f=0,h=0,l=s.length,p,d,g=e.value,m,y,_,v,b,x,A;f<l;){p=i-n,d=o-r;do m=s[h++].value;while(!m&&h<l);for(y=_=m,x=Math.max(d/p,p/d)/(g*t),A=m*m*x,b=Math.max(_/A,A/y);h<l;++h){if(m+=u=s[h].value,u<y&&(y=u),u>_&&(_=u),A=m*m*x,v=Math.max(_/A,A/y),v>b){m-=u;break}b=v}a.push(c={value:m,dice:p<d,children:s.slice(f,h)}),c.dice?po(c,n,r,i,g?r+=d*m/g:o):Bs(c,n,r,g?n+=p*m/g:i,o),g-=m,f=h}return a}const sy=function t(e){function n(r,i,o,a,s){ay(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(oy);function _P(){var t=sy,e=!1,n=1,r=1,i=[0],o=Kn,a=Kn,s=Kn,c=Kn,u=Kn;function f(l){return l.x0=l.y0=0,l.x1=n,l.y1=r,l.eachBefore(h),i=[0],e&&l.eachBefore(ny),l}function h(l){var p=i[l.depth],d=l.x0+p,g=l.y0+p,m=l.x1-p,y=l.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),l.x0=d,l.y0=g,l.x1=m,l.y1=y,l.children&&(p=i[l.depth+1]=o(l)/2,d+=u(l)-p,g+=a(l)-p,m-=s(l)-p,y-=c(l)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(l,d,g,m,y))}return f.round=function(l){return arguments.length?(e=!!l,f):e},f.size=function(l){return arguments.length?(n=+l[0],r=+l[1],f):[n,r]},f.tile=function(l){return arguments.length?(t=Wm(l),f):t},f.padding=function(l){return arguments.length?f.paddingInner(l).paddingOuter(l):f.paddingInner()},f.paddingInner=function(l){return arguments.length?(o=typeof l=="function"?l:qr(+l),f):o},f.paddingOuter=function(l){return arguments.length?f.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l):f.paddingTop()},f.paddingTop=function(l){return arguments.length?(a=typeof l=="function"?l:qr(+l),f):a},f.paddingRight=function(l){return arguments.length?(s=typeof l=="function"?l:qr(+l),f):s},f.paddingBottom=function(l){return arguments.length?(c=typeof l=="function"?l:qr(+l),f):c},f.paddingLeft=function(l){return arguments.length?(u=typeof l=="function"?l:qr(+l),f):u},f}function wP(t,e,n,r,i){var o=t.children,a,s=o.length,c,u=new Array(s+1);for(u[0]=c=a=0;a<s;++a)u[a+1]=c+=o[a].value;f(0,s,t.value,e,n,r,i);function f(h,l,p,d,g,m,y){if(h>=l-1){var _=o[h];_.x0=d,_.y0=g,_.x1=m,_.y1=y;return}for(var v=u[h],b=p/2+v,x=h+1,A=l-1;x<A;){var T=x+A>>>1;u[T]<b?x=T+1:A=T}b-u[x-1]<u[x]-b&&h+1<x&&--x;var D=u[x]-v,k=p-D;if(m-d>y-g){var E=p?(d*k+m*D)/p:m;f(h,x,D,d,g,E,y),f(x,l,k,E,g,m,y)}else{var S=p?(g*k+y*D)/p:y;f(h,x,D,d,g,m,S),f(x,l,k,d,S,m,y)}}}function AP(t,e,n,r,i){(t.depth&1?Bs:po)(t,e,n,r,i)}const MP=function t(e){function n(r,i,o,a,s){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,h,l=-1,p,d=c.length,g=r.value;++l<d;){for(u=c[l],f=u.children,h=u.value=0,p=f.length;h<p;++h)u.value+=f[h].value;u.dice?po(u,i,o,a,g?o+=(s-o)*u.value/g:s):Bs(u,i,o,g?i+=(a-i)*u.value/g:a,s),g-=u.value}else r._squarify=c=ay(e,r,i,o,a,s),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(oy);function $P(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function SP(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,c=0;++e<n;)o=a,a=t[e],c+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return c*=3,[r/c,i/c]}function TP(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function PP(t,e){return t[0]-e[0]||t[1]-e[1]}function uy(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&TP(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function DP(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(PP),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=uy(r),a=uy(i),s=a[0]===o[0],c=a[a.length-1]===o[o.length-1],u=[];for(e=o.length-1;e>=0;--e)u.push(t[r[o[e]][2]]);for(e=+s;e<a.length-c;++e)u.push(t[r[a[e]][2]]);return u}function kP(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],c,u,f=!1,h=0;h<n;++h)r=t[h],c=r[0],u=r[1],u>o!=s>o&&i<(a-c)*(o-u)/(s-u)+c&&(f=!f),a=c,s=u;return f}function EP(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],c=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,c+=Math.hypot(i,o);return c}const Rt=Math.random,NP=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Rt),LP=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Rt),kf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Rt),IP=function t(e){var n=kf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Rt),cy=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Rt),CP=function t(e){var n=cy.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Rt),RP=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Rt),FP=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Rt),zP=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Rt),ly=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Rt),Ef=function t(e){var n=kf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),c=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var u=n(),f=1+s*u;while(f<=0);f*=f*f;var h=1-e()}while(h>=1-.0331*u*u*u*u&&Math.log(h)>=.5*u*u+a*(1-f+Math.log(f)));return a*f*c()*o}}return r.source=t,r}(Rt),fy=function t(e){var n=Ef.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var c=a();return c===0?0:c/(c+s())}}return r.source=t,r}(Rt),hy=function t(e){var n=ly.source(e),r=fy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,c=o,u=a;c*u>16&&c*(1-u)>16;){var f=Math.floor((c+1)*u),h=r(f,c-f+1)();h<=u?(s+=f,c-=f,u=(u-h)/(1-h)):(c=f-1,u/=h)}for(var l=u<.5,p=l?u:1-u,d=n(p),g=d(),m=0;g<=c;++m)g+=d();return s+(l?m:c-m)}}return i.source=t,i}(Rt),OP=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Rt),GP=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Rt),UP=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Rt),BP=function t(e){var n=Ef.source(e),r=hy.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var c=Math.floor(.875*s),u=n(c)();if(u>s)return a+r(c-1,s/u)();a+=c,s-=u}for(var f=-Math.log1p(-e()),h=0;f<=s;++h)f-=Math.log1p(-e());return a+h}}return i.source=t,i}(Rt),YP=1664525,qP=1013904223,py=1/4294967296;function WP(t=Math.random()){let e=(0<=t&&t<1?t/py:Math.abs(t))|0;return()=>(e=YP*e+qP|0,py*(e>>>0))}function he(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Je(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Nf=Symbol("implicit");function Lf(){var t=new _i,e=[],n=[],r=Nf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Nf)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new _i;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Lf(e,n).unknown(r)},he.apply(i,arguments),i}function If(){var t=Lf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,c=0,u=0,f=.5;delete t.unknown;function h(){var l=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,l-c+u*2),s&&(o=Math.floor(o)),d+=(g-d-o*(l-c))*f,a=o*(1-c),s&&(d=Math.round(d),a=Math.round(a));var m=un(l).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(l){return arguments.length?(e(l),h()):e()},t.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(l){return arguments.length?(s=!!l,h()):s},t.padding=function(l){return arguments.length?(c=Math.min(1,u=+l),h()):c},t.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},t.paddingOuter=function(l){return arguments.length?(u=+l,h()):u},t.align=function(l){return arguments.length?(f=Math.max(0,Math.min(1,l)),h()):f},t.copy=function(){return If(e(),[r,i]).round(s).paddingInner(c).paddingOuter(u).align(f)},he.apply(h(),arguments)}function dy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return dy(e())},t}function Cf(){return dy(If.apply(null,arguments).paddingInner(1))}function HP(t){return function(){return t}}function Ys(t){return+t}var gy=[0,1];function Qt(t){return t}function Rf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:HP(isNaN(e)?NaN:.5)}function XP(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function VP(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Rf(i,r),o=n(a,o)):(r=Rf(r,i),o=n(o,a)),function(s){return o(r(s))}}function jP(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Rf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var c=Pn(t,s,1,r)-1;return o[c](i[c](s))}}function go(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function qs(){var t=gy,e=gy,n=fn,r,i,o,a=Qt,s,c,u;function f(){var l=Math.min(t.length,e.length);return a!==Qt&&(a=XP(t[0],t[l-1])),s=l>2?jP:VP,c=u=null,h}function h(l){return l==null||isNaN(l=+l)?o:(c||(c=s(t.map(r),e,n)))(r(a(l)))}return h.invert=function(l){return a(i((u||(u=s(e,t.map(r),ce)))(l)))},h.domain=function(l){return arguments.length?(t=Array.from(l,Ys),f()):t.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),f()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),n=La,f()},h.clamp=function(l){return arguments.length?(a=l?!0:Qt,f()):a!==Qt},h.interpolate=function(l){return arguments.length?(n=l,f()):n},h.unknown=function(l){return arguments.length?(o=l,h):o},function(l,p){return r=l,i=p,f()}}function Ff(){return qs()(Qt,Qt)}function my(t,e,n,r){var i=la(t,e,n),o;switch(r=Rr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=T1(i,a))&&(r.precision=o),Pl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=P1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=S1(i))&&(r.precision=o-(r.type==="%")*2);break}}return Wi(r)}function mn(t){var e=t.domain;return t.ticks=function(n){var r=e();return kn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return my(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],c,u,f=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);f-- >0;){if(u=En(a,s,n),u===c)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;c=u}return t},t}function zf(){var t=Ff();return t.copy=function(){return go(t,zf())},he.apply(t,arguments),mn(t)}function yy(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Ys),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return yy(t).unknown(e)},t=arguments.length?Array.from(t,Ys):[0,1],mn(n)}function by(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function vy(t){return Math.log(t)}function xy(t){return Math.exp(t)}function ZP(t){return-Math.log(-t)}function KP(t){return-Math.exp(-t)}function QP(t){return isFinite(t)?+("1e"+t):t<0?0:t}function JP(t){return t===10?QP:t===Math.E?Math.exp:e=>Math.pow(t,e)}function tD(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function _y(t){return(e,n)=>-t(-e,n)}function Of(t){const e=t(vy,xy),n=e.domain;let r=10,i,o;function a(){return i=tD(r),o=JP(r),n()[0]<0?(i=_y(i),o=_y(o),t(ZP,KP)):t(vy,xy),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const c=n();let u=c[0],f=c[c.length-1];const h=f<u;h&&([u,f]=[f,u]);let l=i(u),p=i(f),d,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&p-l<m){if(l=Math.floor(l),p=Math.ceil(p),u>0){for(;l<=p;++l)for(d=1;d<r;++d)if(g=l<0?d/o(-l):d*o(l),!(g<u)){if(g>f)break;y.push(g)}}else for(;l<=p;++l)for(d=r-1;d>=1;--d)if(g=l>0?d/o(-l):d*o(l),!(g<u)){if(g>f)break;y.push(g)}y.length*2<m&&(y=kn(u,f,m))}else y=kn(l,p,Math.min(p-l,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Rr(c)).precision==null&&(c.trim=!0),c=Wi(c)),s===1/0)return c;const u=Math.max(1,r*s/e.ticks().length);return f=>{let h=f/o(Math.round(i(f)));return h*r<r-.5&&(h*=r),h<=u?c(f):""}},e.nice=()=>n(by(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function wy(){const t=Of(qs()).domain([1,10]);return t.copy=()=>go(t,wy()).base(t.base()),he.apply(t,arguments),t}function Ay(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function My(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Gf(t){var e=1,n=t(Ay(e),My(e));return n.constant=function(r){return arguments.length?t(Ay(e=+r),My(e)):e},mn(n)}function $y(){var t=Gf(qs());return t.copy=function(){return go(t,$y()).constant(t.constant())},he.apply(t,arguments)}function Sy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function eD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function nD(t){return t<0?-t*t:t*t}function Uf(t){var e=t(Qt,Qt),n=1;function r(){return n===1?t(Qt,Qt):n===.5?t(eD,nD):t(Sy(n),Sy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},mn(e)}function Ws(){var t=Uf(qs());return t.copy=function(){return go(t,Ws()).exponent(t.exponent())},he.apply(t,arguments),t}function rD(){return Ws.apply(null,arguments).exponent(.5)}function Ty(t){return Math.sign(t)*t*t}function iD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Py(){var t=Ff(),e=[0,1],n=!1,r;function i(o){var a=iD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Ty(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Ys)).map(Ty)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Py(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},he.apply(i,arguments),mn(i)}function Dy(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=ud(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[Pn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(xt),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Dy().domain(t).range(e).unknown(r)},he.apply(o,arguments)}function ky(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[Pn(r,c,0,n)]:o}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return a}return a.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,s()):[t,e]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,s()):i.slice()},a.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return ky().domain([t,e]).range(i).unknown(o)},he.apply(mn(a),arguments)}function Ey(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[Pn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Ey().domain(t).range(e).unknown(n)},he.apply(i,arguments)}const Bf=new Date,Yf=new Date;function Tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const c=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return c;let u;do c.push(u=new Date(+o)),e(o,s),t(o);while(u<o&&o<a);return c},i.filter=o=>Tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Bf.setTime(+o),Yf.setTime(+a),t(Bf),t(Yf),Math.floor(n(Bf,Yf))),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 Wr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Wr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Wr);const Ny=Wr.range,tn=1e3,pe=tn*60,en=pe*60,nn=en*24,qf=nn*7,Ly=nn*30,Wf=nn*365,rn=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*tn)},(t,e)=>(e-t)/tn,t=>t.getUTCSeconds()),Iy=rn.range,Hs=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*tn)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getMinutes()),oD=Hs.range,Xs=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*pe)},(t,e)=>(e-t)/pe,t=>t.getUTCMinutes()),aD=Xs.range,Vs=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*tn-t.getMinutes()*pe)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getHours()),sD=Vs.range,js=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getUTCHours()),uD=js.range,Hr=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pe)/nn,t=>t.getDate()-1),cD=Hr.range,mo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/nn,t=>t.getUTCDate()-1),lD=mo.range,Hf=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/nn,t=>Math.floor(t/nn)),fD=Hf.range;function Qn(t){return Tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*pe)/qf)}const Xr=Qn(0),yo=Qn(1),Cy=Qn(2),Ry=Qn(3),Jn=Qn(4),Fy=Qn(5),zy=Qn(6),Oy=Xr.range,hD=yo.range,pD=Cy.range,dD=Ry.range,gD=Jn.range,mD=Fy.range,yD=zy.range;function tr(t){return Tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/qf)}const Vr=tr(0),bo=tr(1),Gy=tr(2),Uy=tr(3),er=tr(4),By=tr(5),Yy=tr(6),qy=Vr.range,bD=bo.range,vD=Gy.range,xD=Uy.range,_D=er.range,wD=By.range,AD=Yy.range,Zs=Tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),MD=Zs.range,Ks=Tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),$D=Ks.range,Oe=Tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Oe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const SD=Oe.range,Ge=Tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ge.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const TD=Ge.range;function Wy(t,e,n,r,i,o){const a=[[rn,1,tn],[rn,5,5*tn],[rn,15,15*tn],[rn,30,30*tn],[o,1,pe],[o,5,5*pe],[o,15,15*pe],[o,30,30*pe],[i,1,en],[i,3,3*en],[i,6,6*en],[i,12,12*en],[r,1,nn],[r,2,2*nn],[n,1,qf],[e,1,Ly],[e,3,3*Ly],[t,1,Wf]];function s(u,f,h){const l=f<u;l&&([u,f]=[f,u]);const p=h&&typeof h.range=="function"?h:c(u,f,h),d=p?p.range(u,+f+1):[];return l?d.reverse():d}function c(u,f,h){const l=Math.abs(f-u)/h,p=aa(([,,m])=>m).right(a,l);if(p===a.length)return t.every(la(u/Wf,f/Wf,h));if(p===0)return Wr.every(Math.max(la(u,f,h),1));const[d,g]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return d.every(g)}return[s,c]}const[Hy,Xy]=Wy(Ge,Ks,Vr,Hf,js,Xs),[Vy,jy]=Wy(Oe,Zs,Xr,Hr,Vs,Hs);function Xf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Vf(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function vo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Zy(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,c=t.shortMonths,u=xo(i),f=_o(i),h=xo(o),l=_o(o),p=xo(a),d=_o(a),g=xo(s),m=_o(s),y=xo(c),_=_o(c),v={a:P,A:I,b:L,B:F,c:null,d:nb,e:nb,f:ZD,g:ak,G:uk,H:XD,I:VD,j:jD,L:rb,m:KD,M:QD,p:z,q:U,Q:cb,s:lb,S:JD,u:tk,U:ek,V:nk,w:rk,W:ik,x:null,X:null,y:ok,Y:sk,Z:ck,"%":ub},b={a:tt,A:K,b:it,B:pt,c:null,d:ob,e:ob,f:pk,g:Ak,G:$k,H:lk,I:fk,j:hk,L:ab,m:dk,M:gk,p:q,q:dt,Q:cb,s:lb,S:mk,u:yk,U:bk,V:vk,w:xk,W:_k,x:null,X:null,y:wk,Y:Mk,Z:Sk,"%":ub},x={a:E,A:S,b:C,B:N,c:M,d:tb,e:tb,f:YD,g:Jy,G:Qy,H:eb,I:eb,j:OD,L:BD,m:zD,M:GD,p:k,q:FD,Q:WD,s:HD,S:UD,u:ND,U:LD,V:ID,w:ED,W:CD,x:$,X:w,y:Jy,Y:Qy,Z:RD,"%":qD};v.x=A(n,v),v.X=A(r,v),v.c=A(e,v),b.x=A(n,b),b.X=A(r,b),b.c=A(e,b);function A(B,et){return function(ut){var O=[],$t=-1,gt=0,Jt=B.length,te,Q,St;for(ut instanceof Date||(ut=new Date(+ut));++$t<Jt;)B.charCodeAt($t)===37&&(O.push(B.slice(gt,$t)),(Q=Ky[te=B.charAt(++$t)])!=null?te=B.charAt(++$t):Q=te==="e"?" ":"0",(St=et[te])&&(te=St(ut,Q)),O.push(te),gt=$t+1);return O.push(B.slice(gt,$t)),O.join("")}}function T(B,et){return function(ut){var O=vo(1900,void 0,1),$t=D(O,B,ut+="",0),gt,Jt;if($t!=ut.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(et&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(gt=Vf(vo(O.y,0,1)),Jt=gt.getUTCDay(),gt=Jt>4||Jt===0?bo.ceil(gt):bo(gt),gt=mo.offset(gt,(O.V-1)*7),O.y=gt.getUTCFullYear(),O.m=gt.getUTCMonth(),O.d=gt.getUTCDate()+(O.w+6)%7):(gt=Xf(vo(O.y,0,1)),Jt=gt.getDay(),gt=Jt>4||Jt===0?yo.ceil(gt):yo(gt),gt=Hr.offset(gt,(O.V-1)*7),O.y=gt.getFullYear(),O.m=gt.getMonth(),O.d=gt.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),Jt="Z"in O?Vf(vo(O.y,0,1)).getUTCDay():Xf(vo(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(Jt+5)%7:O.w+O.U*7-(Jt+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Vf(O)):Xf(O)}}function D(B,et,ut,O){for(var $t=0,gt=et.length,Jt=ut.length,te,Q;$t<gt;){if(O>=Jt)return-1;if(te=et.charCodeAt($t++),te===37){if(te=et.charAt($t++),Q=x[te in Ky?et.charAt($t++):te],!Q||(O=Q(B,ut,O))<0)return-1}else if(te!=ut.charCodeAt(O++))return-1}return O}function k(B,et,ut){var O=u.exec(et.slice(ut));return O?(B.p=f.get(O[0].toLowerCase()),ut+O[0].length):-1}function E(B,et,ut){var O=p.exec(et.slice(ut));return O?(B.w=d.get(O[0].toLowerCase()),ut+O[0].length):-1}function S(B,et,ut){var O=h.exec(et.slice(ut));return O?(B.w=l.get(O[0].toLowerCase()),ut+O[0].length):-1}function C(B,et,ut){var O=y.exec(et.slice(ut));return O?(B.m=_.get(O[0].toLowerCase()),ut+O[0].length):-1}function N(B,et,ut){var O=g.exec(et.slice(ut));return O?(B.m=m.get(O[0].toLowerCase()),ut+O[0].length):-1}function M(B,et,ut){return D(B,e,et,ut)}function $(B,et,ut){return D(B,n,et,ut)}function w(B,et,ut){return D(B,r,et,ut)}function P(B){return a[B.getDay()]}function I(B){return o[B.getDay()]}function L(B){return c[B.getMonth()]}function F(B){return s[B.getMonth()]}function z(B){return i[+(B.getHours()>=12)]}function U(B){return 1+~~(B.getMonth()/3)}function tt(B){return a[B.getUTCDay()]}function K(B){return o[B.getUTCDay()]}function it(B){return c[B.getUTCMonth()]}function pt(B){return s[B.getUTCMonth()]}function q(B){return i[+(B.getUTCHours()>=12)]}function dt(B){return 1+~~(B.getUTCMonth()/3)}return{format:function(B){var et=A(B+="",v);return et.toString=function(){return B},et},parse:function(B){var et=T(B+="",!1);return et.toString=function(){return B},et},utcFormat:function(B){var et=A(B+="",b);return et.toString=function(){return B},et},utcParse:function(B){var et=T(B+="",!0);return et.toString=function(){return B},et}}}var Ky={"-":"",_:" ",0:"0"},Ct=/^\s*\d+/,PD=/^%/,DD=/[\\^$*+?|[\]().{}]/g;function ht(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function kD(t){return t.replace(DD,"\\$&")}function xo(t){return new RegExp("^(?:"+t.map(kD).join("|")+")","i")}function _o(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function ED(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ND(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function LD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function ID(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function CD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Qy(t,e,n){var r=Ct.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Jy(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function RD(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function FD(t,e,n){var r=Ct.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function zD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function tb(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function OD(t,e,n){var r=Ct.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function eb(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function GD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function UD(t,e,n){var r=Ct.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function BD(t,e,n){var r=Ct.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function YD(t,e,n){var r=Ct.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function qD(t,e,n){var r=PD.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function WD(t,e,n){var r=Ct.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function HD(t,e,n){var r=Ct.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function nb(t,e){return ht(t.getDate(),e,2)}function XD(t,e){return ht(t.getHours(),e,2)}function VD(t,e){return ht(t.getHours()%12||12,e,2)}function jD(t,e){return ht(1+Hr.count(Oe(t),t),e,3)}function rb(t,e){return ht(t.getMilliseconds(),e,3)}function ZD(t,e){return rb(t,e)+"000"}function KD(t,e){return ht(t.getMonth()+1,e,2)}function QD(t,e){return ht(t.getMinutes(),e,2)}function JD(t,e){return ht(t.getSeconds(),e,2)}function tk(t){var e=t.getDay();return e===0?7:e}function ek(t,e){return ht(Xr.count(Oe(t)-1,t),e,2)}function ib(t){var e=t.getDay();return e>=4||e===0?Jn(t):Jn.ceil(t)}function nk(t,e){return t=ib(t),ht(Jn.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function rk(t){return t.getDay()}function ik(t,e){return ht(yo.count(Oe(t)-1,t),e,2)}function ok(t,e){return ht(t.getFullYear()%100,e,2)}function ak(t,e){return t=ib(t),ht(t.getFullYear()%100,e,2)}function sk(t,e){return ht(t.getFullYear()%1e4,e,4)}function uk(t,e){var n=t.getDay();return t=n>=4||n===0?Jn(t):Jn.ceil(t),ht(t.getFullYear()%1e4,e,4)}function ck(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ht(e/60|0,"0",2)+ht(e%60,"0",2)}function ob(t,e){return ht(t.getUTCDate(),e,2)}function lk(t,e){return ht(t.getUTCHours(),e,2)}function fk(t,e){return ht(t.getUTCHours()%12||12,e,2)}function hk(t,e){return ht(1+mo.count(Ge(t),t),e,3)}function ab(t,e){return ht(t.getUTCMilliseconds(),e,3)}function pk(t,e){return ab(t,e)+"000"}function dk(t,e){return ht(t.getUTCMonth()+1,e,2)}function gk(t,e){return ht(t.getUTCMinutes(),e,2)}function mk(t,e){return ht(t.getUTCSeconds(),e,2)}function yk(t){var e=t.getUTCDay();return e===0?7:e}function bk(t,e){return ht(Vr.count(Ge(t)-1,t),e,2)}function sb(t){var e=t.getUTCDay();return e>=4||e===0?er(t):er.ceil(t)}function vk(t,e){return t=sb(t),ht(er.count(Ge(t),t)+(Ge(t).getUTCDay()===4),e,2)}function xk(t){return t.getUTCDay()}function _k(t,e){return ht(bo.count(Ge(t)-1,t),e,2)}function wk(t,e){return ht(t.getUTCFullYear()%100,e,2)}function Ak(t,e){return t=sb(t),ht(t.getUTCFullYear()%100,e,2)}function Mk(t,e){return ht(t.getUTCFullYear()%1e4,e,4)}function $k(t,e){var n=t.getUTCDay();return t=n>=4||n===0?er(t):er.ceil(t),ht(t.getUTCFullYear()%1e4,e,4)}function Sk(){return"+0000"}function ub(){return"%"}function cb(t){return+t}function lb(t){return Math.floor(+t/1e3)}var jr,jf,fb,Qs,Zf;hb({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 hb(t){return jr=Zy(t),jf=jr.format,fb=jr.parse,Qs=jr.utcFormat,Zf=jr.utcParse,jr}var pb="%Y-%m-%dT%H:%M:%S.%LZ";function Tk(t){return t.toISOString()}var Pk=Date.prototype.toISOString?Tk:Qs(pb);const Dk=Pk;function kk(t){var e=new Date(t);return isNaN(e)?null:e}var Ek=+new Date("2000-01-01T00:00:00.000Z")?kk:Zf(pb);const Nk=Ek;function Lk(t){return new Date(t)}function Ik(t){return t instanceof Date?+t:+new Date(+t)}function Kf(t,e,n,r,i,o,a,s,c,u){var f=Ff(),h=f.invert,l=f.domain,p=u(".%L"),d=u(":%S"),g=u("%I:%M"),m=u("%I %p"),y=u("%a %d"),_=u("%b %d"),v=u("%B"),b=u("%Y");function x(A){return(c(A)<A?p:s(A)<A?d:a(A)<A?g:o(A)<A?m:r(A)<A?i(A)<A?y:_:n(A)<A?v:b)(A)}return f.invert=function(A){return new Date(h(A))},f.domain=function(A){return arguments.length?l(Array.from(A,Ik)):l().map(Lk)},f.ticks=function(A){var T=l();return t(T[0],T[T.length-1],A??10)},f.tickFormat=function(A,T){return T==null?x:u(T)},f.nice=function(A){var T=l();return(!A||typeof A.range!="function")&&(A=e(T[0],T[T.length-1],A??10)),A?l(by(T,A)):f},f.copy=function(){return go(f,Kf(t,e,n,r,i,o,a,s,c,u))},f}function Ck(){return he.apply(Kf(Vy,jy,Oe,Zs,Xr,Hr,Vs,Hs,rn,jf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Rk(){return he.apply(Kf(Hy,Xy,Ge,Ks,Vr,mo,js,Xs,rn,Qs).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Js(){var t=0,e=1,n,r,i,o,a=Qt,s=!1,c;function u(h){return h==null||isNaN(h=+h)?c:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}u.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),u):[t,e]},u.clamp=function(h){return arguments.length?(s=!!h,u):s},u.interpolator=function(h){return arguments.length?(a=h,u):a};function f(h){return function(l){var p,d;return arguments.length?([p,d]=l,a=h(p,d),u):[a(0),a(1)]}}return u.range=f(fn),u.rangeRound=f(La),u.unknown=function(h){return arguments.length?(c=h,u):c},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),u}}function yn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function db(){var t=mn(Js()(Qt));return t.copy=function(){return yn(t,db())},Je.apply(t,arguments)}function gb(){var t=Of(Js()).domain([1,10]);return t.copy=function(){return yn(t,gb()).base(t.base())},Je.apply(t,arguments)}function mb(){var t=Gf(Js());return t.copy=function(){return yn(t,mb()).constant(t.constant())},Je.apply(t,arguments)}function Qf(){var t=Uf(Js());return t.copy=function(){return yn(t,Qf()).exponent(t.exponent())},Je.apply(t,arguments)}function Fk(){return Qf.apply(null,arguments).exponent(.5)}function yb(){var t=[],e=Qt;function n(r){if(r!=null&&!isNaN(r=+r))return e((Pn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(xt),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Mi(t,o/r))},n.copy=function(){return yb(e).domain(t)},Je.apply(n,arguments)}function tu(){var t=0,e=.5,n=1,r=1,i,o,a,s,c,u=Qt,f,h=!1,l;function p(g){return isNaN(g=+g)?l:(g=.5+((g=+f(g))-o)*(r*g<r*o?s:c),u(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=f(t=+t),o=f(e=+e),a=f(n=+n),s=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(g){return arguments.length?(h=!!g,p):h},p.interpolator=function(g){return arguments.length?(u=g,p):u};function d(g){return function(m){var y,_,v;return arguments.length?([y,_,v]=m,u=bg(g,[y,_,v]),p):[u(0),u(.5),u(1)]}}return p.range=d(fn),p.rangeRound=d(La),p.unknown=function(g){return arguments.length?(l=g,p):l},function(g){return f=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function bb(){var t=mn(tu()(Qt));return t.copy=function(){return yn(t,bb())},Je.apply(t,arguments)}function vb(){var t=Of(tu()).domain([.1,1,10]);return t.copy=function(){return yn(t,vb()).base(t.base())},Je.apply(t,arguments)}function xb(){var t=Gf(tu());return t.copy=function(){return yn(t,xb()).constant(t.constant())},Je.apply(t,arguments)}function Jf(){var t=Uf(tu());return t.copy=function(){return yn(t,Jf()).exponent(t.exponent())},Je.apply(t,arguments)}function zk(){return Jf.apply(null,arguments).exponent(.5)}function ot(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const Ok=ot("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Gk=ot("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Uk=ot("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Bk=ot("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),Yk=ot("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),qk=ot("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Wk=ot("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Hk=ot("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Xk=ot("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Vk=ot("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),jk=ot("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>rg(t[t.length-1]);var _b=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ot);const Zk=bt(_b);var wb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ot);const Kk=bt(wb);var Ab=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ot);const Qk=bt(Ab);var Mb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ot);const Jk=bt(Mb);var $b=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ot);const tE=bt($b);var Sb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ot);const eE=bt(Sb);var Tb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ot);const nE=bt(Tb);var Pb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ot);const rE=bt(Pb);var Db=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ot);const iE=bt(Db);var kb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ot);const oE=bt(kb);var Eb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ot);const aE=bt(Eb);var Nb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ot);const sE=bt(Nb);var Lb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ot);const uE=bt(Lb);var Ib=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ot);const cE=bt(Ib);var Cb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ot);const lE=bt(Cb);var Rb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ot);const fE=bt(Rb);var Fb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ot);const hE=bt(Fb);var zb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ot);const pE=bt(zb);var Ob=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ot);const dE=bt(Ob);var Gb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ot);const gE=bt(Gb);var Ub=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ot);const mE=bt(Ub);var Bb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ot);const yE=bt(Bb);var Yb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ot);const bE=bt(Yb);var qb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ot);const vE=bt(qb);var Wb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ot);const xE=bt(Wb);var Hb=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ot);const _E=bt(Hb);var Xb=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ot);const wE=bt(Xb);function AE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const ME=Ca($e(300,.5,0),$e(-240,.5,1));var $E=Ca($e(-100,.75,.35),$e(80,1.5,.8)),SE=Ca($e(260,.75,.35),$e(80,1.5,.8)),eu=$e();function TE(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return eu.h=360*t-100,eu.s=1.5-1.5*e,eu.l=.8-.9*e,eu+""}var nu=Mr(),PE=Math.PI/3,DE=Math.PI*2/3;function kE(t){var e;return t=(.5-t)*Math.PI,nu.r=255*(e=Math.sin(t))*e,nu.g=255*(e=Math.sin(t+PE))*e,nu.b=255*(e=Math.sin(t+DE))*e,nu+""}function EE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function ru(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const NE=ru(ot("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var LE=ru(ot("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),IE=ru(ot("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),CE=ru(ot("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function rt(t){return function(){return t}}const Vb=Math.abs,Gt=Math.atan2,on=Math.cos,RE=Math.max,Zr=Math.min,ie=Math.sin,vt=Math.sqrt,Ut=1e-12,bn=Math.PI,iu=bn/2,vn=2*bn;function FE(t){return t>1?0:t<-1?bn:Math.acos(t)}function jb(t){return t>=1?iu:t<=-1?-iu:Math.asin(t)}function wo(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Ui(e)}function zE(t){return t.innerRadius}function OE(t){return t.outerRadius}function GE(t){return t.startAngle}function UE(t){return t.endAngle}function BE(t){return t&&t.padAngle}function YE(t,e,n,r,i,o,a,s){var c=n-t,u=r-e,f=a-i,h=s-o,l=h*c-f*u;if(!(l*l<Ut))return l=(f*(e-o)-h*(t-i))/l,[t+l*c,e+l*u]}function ou(t,e,n,r,i,o,a){var s=t-n,c=e-r,u=(a?o:-o)/vt(s*s+c*c),f=u*c,h=-u*s,l=t+f,p=e+h,d=n+f,g=r+h,m=(l+d)/2,y=(p+g)/2,_=d-l,v=g-p,b=_*_+v*v,x=i-o,A=l*g-d*p,T=(v<0?-1:1)*vt(RE(0,x*x*b-A*A)),D=(A*v-_*T)/b,k=(-A*_-v*T)/b,E=(A*v+_*T)/b,S=(-A*_+v*T)/b,C=D-m,N=k-y,M=E-m,$=S-y;return C*C+N*N>M*M+$*$&&(D=E,k=S),{cx:D,cy:k,x01:-f,y01:-h,x11:D*(i/x-1),y11:k*(i/x-1)}}function Zb(){var t=zE,e=OE,n=rt(0),r=null,i=GE,o=UE,a=BE,s=null,c=wo(u);function u(){var f,h,l=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-iu,g=o.apply(this,arguments)-iu,m=Vb(g-d),y=g>d;if(s||(s=f=c()),p<l&&(h=p,p=l,l=h),!(p>Ut))s.moveTo(0,0);else if(m>vn-Ut)s.moveTo(p*on(d),p*ie(d)),s.arc(0,0,p,d,g,!y),l>Ut&&(s.moveTo(l*on(g),l*ie(g)),s.arc(0,0,l,g,d,y));else{var _=d,v=g,b=d,x=g,A=m,T=m,D=a.apply(this,arguments)/2,k=D>Ut&&(r?+r.apply(this,arguments):vt(l*l+p*p)),E=Zr(Vb(p-l)/2,+n.apply(this,arguments)),S=E,C=E,N,M;if(k>Ut){var $=jb(k/l*ie(D)),w=jb(k/p*ie(D));(A-=$*2)>Ut?($*=y?1:-1,b+=$,x-=$):(A=0,b=x=(d+g)/2),(T-=w*2)>Ut?(w*=y?1:-1,_+=w,v-=w):(T=0,_=v=(d+g)/2)}var P=p*on(_),I=p*ie(_),L=l*on(x),F=l*ie(x);if(E>Ut){var z=p*on(v),U=p*ie(v),tt=l*on(b),K=l*ie(b),it;if(m<bn)if(it=YE(P,I,tt,K,z,U,L,F)){var pt=P-it[0],q=I-it[1],dt=z-it[0],B=U-it[1],et=1/ie(FE((pt*dt+q*B)/(vt(pt*pt+q*q)*vt(dt*dt+B*B)))/2),ut=vt(it[0]*it[0]+it[1]*it[1]);S=Zr(E,(l-ut)/(et-1)),C=Zr(E,(p-ut)/(et+1))}else S=C=0}T>Ut?C>Ut?(N=ou(tt,K,P,I,p,C,y),M=ou(z,U,L,F,p,C,y),s.moveTo(N.cx+N.x01,N.cy+N.y01),C<E?s.arc(N.cx,N.cy,C,Gt(N.y01,N.x01),Gt(M.y01,M.x01),!y):(s.arc(N.cx,N.cy,C,Gt(N.y01,N.x01),Gt(N.y11,N.x11),!y),s.arc(0,0,p,Gt(N.cy+N.y11,N.cx+N.x11),Gt(M.cy+M.y11,M.cx+M.x11),!y),s.arc(M.cx,M.cy,C,Gt(M.y11,M.x11),Gt(M.y01,M.x01),!y))):(s.moveTo(P,I),s.arc(0,0,p,_,v,!y)):s.moveTo(P,I),!(l>Ut)||!(A>Ut)?s.lineTo(L,F):S>Ut?(N=ou(L,F,z,U,l,-S,y),M=ou(P,I,tt,K,l,-S,y),s.lineTo(N.cx+N.x01,N.cy+N.y01),S<E?s.arc(N.cx,N.cy,S,Gt(N.y01,N.x01),Gt(M.y01,M.x01),!y):(s.arc(N.cx,N.cy,S,Gt(N.y01,N.x01),Gt(N.y11,N.x11),!y),s.arc(0,0,l,Gt(N.cy+N.y11,N.cx+N.x11),Gt(M.cy+M.y11,M.cx+M.x11),y),s.arc(M.cx,M.cy,S,Gt(M.y11,M.x11),Gt(M.y01,M.x01),!y))):s.arc(0,0,l,x,b,y)}if(s.closePath(),f)return s=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-bn/2;return[on(h)*f,ie(h)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:rt(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:rt(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:rt(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:rt(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:rt(+f),u):i},u.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:rt(+f),u):o},u.padAngle=function(f){return arguments.length?(a=typeof f=="function"?f:rt(+f),u):a},u.context=function(f){return arguments.length?(s=f??null,u):s},u}var qE=Array.prototype.slice;function au(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Kb(t){this._context=t}Kb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function su(t){return new Kb(t)}function th(t){return t[0]}function eh(t){return t[1]}function uu(t,e){var n=rt(!0),r=null,i=su,o=null,a=wo(s);t=typeof t=="function"?t:t===void 0?th:rt(t),e=typeof e=="function"?e:e===void 0?eh:rt(e);function s(c){var u,f=(c=au(c)).length,h,l=!1,p;for(r==null&&(o=i(p=a())),u=0;u<=f;++u)!(u<f&&n(h=c[u],u,c))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(h,u,c),+e(h,u,c));if(p)return o=null,p+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:rt(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:rt(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:rt(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),s):r},s}function Qb(t,e,n){var r=null,i=rt(!0),o=null,a=su,s=null,c=wo(u);t=typeof t=="function"?t:t===void 0?th:rt(+t),e=typeof e=="function"?e:rt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?eh:rt(+n);function u(h){var l,p,d,g=(h=au(h)).length,m,y=!1,_,v=new Array(g),b=new Array(g);for(o==null&&(s=a(_=c())),l=0;l<=g;++l){if(!(l<g&&i(m=h[l],l,h))===y)if(y=!y)p=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=l-1;d>=p;--d)s.point(v[d],b[d]);s.lineEnd(),s.areaEnd()}y&&(v[l]=+t(m,l,h),b[l]=+e(m,l,h),s.point(r?+r(m,l,h):v[l],n?+n(m,l,h):b[l]))}if(_)return s=null,_+""||null}function f(){return uu().defined(i).curve(a).context(o)}return u.x=function(h){return arguments.length?(t=typeof h=="function"?h:rt(+h),r=null,u):t},u.x0=function(h){return arguments.length?(t=typeof h=="function"?h:rt(+h),u):t},u.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:rt(+h),u):r},u.y=function(h){return arguments.length?(e=typeof h=="function"?h:rt(+h),n=null,u):e},u.y0=function(h){return arguments.length?(e=typeof h=="function"?h:rt(+h),u):e},u.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:rt(+h),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(h){return arguments.length?(i=typeof h=="function"?h:rt(!!h),u):i},u.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),u):a},u.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),u):o},u}function WE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function HE(t){return t}function Jb(){var t=HE,e=WE,n=null,r=rt(0),i=rt(vn),o=rt(0);function a(s){var c,u=(s=au(s)).length,f,h,l=0,p=new Array(u),d=new Array(u),g=+r.apply(this,arguments),m=Math.min(vn,Math.max(-vn,i.apply(this,arguments)-g)),y,_=Math.min(Math.abs(m)/u,o.apply(this,arguments)),v=_*(m<0?-1:1),b;for(c=0;c<u;++c)(b=d[p[c]=c]=+t(s[c],c,s))>0&&(l+=b);for(e!=null?p.sort(function(x,A){return e(d[x],d[A])}):n!=null&&p.sort(function(x,A){return n(s[x],s[A])}),c=0,h=l?(m-u*v)/l:0;c<u;++c,g=y)f=p[c],b=d[f],y=g+(b>0?b*h:0)+v,d[f]={data:s[f],index:c,value:b,startAngle:g,endAngle:y,padAngle:_};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:rt(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:rt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:rt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:rt(+s),a):o},a}var tv=nh(su);function ev(t){this._curve=t}ev.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function nh(t){function e(n){return new ev(t(n))}return e._curve=t,e}function Ao(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(nh(n)):e()._curve},t}function nv(){return Ao(uu().curve(tv))}function rv(){var t=Qb().curve(tv),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Ao(n())},delete t.lineX0,t.lineEndAngle=function(){return Ao(r())},delete t.lineX1,t.lineInnerRadius=function(){return Ao(i())},delete t.lineY0,t.lineOuterRadius=function(){return Ao(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(nh(a)):e()._curve},t}function Mo(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class iv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class XE{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=Mo(this._x0,this._y0),i=Mo(this._x0,this._y0=(this._y0+n)/2),o=Mo(e,this._y0),a=Mo(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function ov(t){return new iv(t,!0)}function av(t){return new iv(t,!1)}function VE(t){return new XE(t)}function jE(t){return t.source}function ZE(t){return t.target}function cu(t){let e=jE,n=ZE,r=th,i=eh,o=null,a=null,s=wo(c);function c(){let u;const f=qE.call(arguments),h=e.apply(this,f),l=n.apply(this,f);if(o==null&&(a=t(u=s())),a.lineStart(),f[0]=h,a.point(+r.apply(this,f),+i.apply(this,f)),f[0]=l,a.point(+r.apply(this,f),+i.apply(this,f)),a.lineEnd(),u)return a=null,u+""||null}return c.source=function(u){return arguments.length?(e=u,c):e},c.target=function(u){return arguments.length?(n=u,c):n},c.x=function(u){return arguments.length?(r=typeof u=="function"?u:rt(+u),c):r},c.y=function(u){return arguments.length?(i=typeof u=="function"?u:rt(+u),c):i},c.context=function(u){return arguments.length?(u==null?o=a=null:a=t(o=u),c):o},c}function KE(){return cu(ov)}function QE(){return cu(av)}function JE(){const t=cu(VE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const tN=vt(3),sv={draw(t,e){const n=vt(e+Zr(e/28,.75))*.59436,r=n/2,i=r*tN;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},lu={draw(t,e){const n=vt(e/bn);t.moveTo(n,0),t.arc(0,0,n,0,vn)}},uv={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},cv=vt(1/3),eN=cv*2,lv={draw(t,e){const n=vt(e/eN),r=n*cv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},fv={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},hv={draw(t,e){const n=vt(e-Zr(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},pv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},dv={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},nN=.8908130915292852,gv=ie(bn/10)/ie(7*bn/10),rN=ie(vn/10)*gv,iN=-on(vn/10)*gv,mv={draw(t,e){const n=vt(e*nN),r=rN*n,i=iN*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=vn*o/5,s=on(a),c=ie(a);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},rh=vt(3),yv={draw(t,e){const n=-vt(e/(rh*3));t.moveTo(0,n*2),t.lineTo(-rh*n,-n),t.lineTo(rh*n,-n),t.closePath()}},oN=vt(3),bv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*oN/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},de=-.5,ge=vt(3)/2,ih=1/vt(12),aN=(ih/2+1)*3,vv={draw(t,e){const n=vt(e/aN),r=n/2,i=n*ih,o=r,a=n*ih+n,s=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,c),t.lineTo(de*r-ge*i,ge*r+de*i),t.lineTo(de*o-ge*a,ge*o+de*a),t.lineTo(de*s-ge*c,ge*s+de*c),t.lineTo(de*r+ge*i,de*i-ge*r),t.lineTo(de*o+ge*a,de*a-ge*o),t.lineTo(de*s+ge*c,de*c-ge*s),t.closePath()}},oh={draw(t,e){const n=vt(e-Zr(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},xv=[lu,uv,lv,pv,mv,yv,vv],sN=[lu,hv,oh,bv,sv,dv,fv];function uN(t,e){let n=null,r=wo(i);t=typeof t=="function"?t:rt(t||lu),e=typeof e=="function"?e:rt(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:rt(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:rt(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function xn(){}function fu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function hu(t){this._context=t}hu.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:fu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function cN(t){return new hu(t)}function _v(t){this._context=t}_v.prototype={areaStart:xn,areaEnd:xn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function lN(t){return new _v(t)}function wv(t){this._context=t}wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:fu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function fN(t){return new wv(t)}function Av(t,e){this._basis=new hu(t),this._beta=e}Av.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+c*o),this._beta*e[s]+(1-this._beta)*(i+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const hN=function t(e){function n(r){return e===1?new hu(r):new Av(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function pu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ah(t,e){this._context=t,this._k=(1-e)/6}ah.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:pu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:pu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const pN=function t(e){function n(r){return new ah(r,e)}return n.tension=function(r){return t(+r)},n}(0);function sh(t,e){this._context=t,this._k=(1-e)/6}sh.prototype={areaStart:xn,areaEnd:xn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:pu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dN=function t(e){function n(r){return new sh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function uh(t,e){this._context=t,this._k=(1-e)/6}uh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const gN=function t(e){function n(r){return new uh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function ch(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ut){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ut){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/f,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Mv(t,e){this._context=t,this._alpha=e}Mv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ch(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const mN=function t(e){function n(r){return e?new Mv(r,e):new ah(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function $v(t,e){this._context=t,this._alpha=e}$v.prototype={areaStart:xn,areaEnd:xn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ch(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const yN=function t(e){function n(r){return e?new $v(r,e):new sh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Sv(t,e){this._context=t,this._alpha=e}Sv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ch(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const bN=function t(e){function n(r){return e?new Sv(r,e):new uh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Tv(t){this._context=t}Tv.prototype={areaStart:xn,areaEnd:xn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function vN(t){return new Tv(t)}function Pv(t){return t<0?-1:1}function Dv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Pv(o)+Pv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function kv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function lh(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function du(t){this._context=t}du.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:lh(this,this._t0,kv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,lh(this,kv(this,n=Dv(this,t,e)),n);break;default:lh(this,this._t0,n=Dv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Ev(t){this._context=new Nv(t)}(Ev.prototype=Object.create(du.prototype)).point=function(t,e){du.prototype.point.call(this,e,t)};function Nv(t){this._context=t}Nv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function xN(t){return new du(t)}function _N(t){return new Ev(t)}function Lv(t){this._context=t}Lv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Iv(t),i=Iv(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Iv(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function wN(t){return new Lv(t)}function gu(t,e){this._context=t,this._t=e}gu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function AN(t){return new gu(t,.5)}function MN(t){return new gu(t,0)}function $N(t){return new gu(t,1)}function Kr(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Qr(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function SN(t,e){return t[e]}function TN(t){const e=[];return e.key=t,e}function PN(){var t=rt([]),e=Qr,n=Kr,r=SN;function i(o){var a=Array.from(t.apply(this,arguments),TN),s,c=a.length,u=-1,f;for(const h of o)for(s=0,++u;s<c;++s)(a[s][u]=[0,+r(h,a[s].key,u,o)]).data=h;for(s=0,f=au(e(a));s<c;++s)a[f[s]].index=s;return n(a,f),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:rt(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:rt(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?Qr:typeof o=="function"?o:rt(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??Kr,i):n},i}function DN(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}Kr(t,e)}}function kN(t,e){if((c=t.length)>0)for(var n,r=0,i,o,a,s,c,u=t[e[0]].length;r<u;++r)for(a=s=0,n=0;n<c;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function EN(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Kr(t,e)}}function NN(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,c=0,u=0;s<a;++s){for(var f=t[e[s]],h=f[r][1]||0,l=f[r-1][1]||0,p=(h-l)/2,d=0;d<s;++d){var g=t[e[d]],m=g[r][1]||0,y=g[r-1][1]||0;p+=m-y}c+=h,u+=p*h}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,Kr(t,e)}}function Cv(t){var e=t.map(LN);return Qr(t).sort(function(n,r){return e[n]-e[r]})}function LN(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function Rv(t){var e=t.map(Fv);return Qr(t).sort(function(n,r){return e[n]-e[r]})}function Fv(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function IN(t){return Rv(t).reverse()}function CN(t){var e=t.length,n,r,i=t.map(Fv),o=Cv(t),a=0,s=0,c=[],u=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],c.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(c)}function RN(t){return Qr(t).reverse()}const mu=t=>()=>t;function FN(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ue(t,e,n){this.k=t,this.x=e,this.y=n}Ue.prototype={constructor:Ue,scale:function(t){return t===1?this:new Ue(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ue(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var yu=new Ue(1,0,0);zv.prototype=Ue.prototype;function zv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return yu;return t.__zoom}function fh(t){t.stopImmediatePropagation()}function $o(t){t.preventDefault(),t.stopImmediatePropagation()}function zN(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function ON(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Ov(){return this.__zoom||yu}function GN(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function UN(){return navigator.maxTouchPoints||"ontouchstart"in this}function BN(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Gv(){var t=zN,e=ON,n=BN,r=GN,i=UN,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=dg,u=Nn("start","zoom","end"),f,h,l,p=500,d=150,g=0,m=10;function y(M){M.property("__zoom",Ov).on("wheel.zoom",D,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(M,$,w,P){var I=M.selection?M.selection():M;I.property("__zoom",Ov),M!==I?x(M,$,w,P):I.interrupt().each(function(){A(this,arguments).event(P).start().zoom(null,typeof $=="function"?$.apply(this,arguments):$).end()})},y.scaleBy=function(M,$,w,P){y.scaleTo(M,function(){var I=this.__zoom.k,L=typeof $=="function"?$.apply(this,arguments):$;return I*L},w,P)},y.scaleTo=function(M,$,w,P){y.transform(M,function(){var I=e.apply(this,arguments),L=this.__zoom,F=w==null?b(I):typeof w=="function"?w.apply(this,arguments):w,z=L.invert(F),U=typeof $=="function"?$.apply(this,arguments):$;return n(v(_(L,U),F,z),I,a)},w,P)},y.translateBy=function(M,$,w,P){y.transform(M,function(){return n(this.__zoom.translate(typeof $=="function"?$.apply(this,arguments):$,typeof w=="function"?w.apply(this,arguments):w),e.apply(this,arguments),a)},null,P)},y.translateTo=function(M,$,w,P,I){y.transform(M,function(){var L=e.apply(this,arguments),F=this.__zoom,z=P==null?b(L):typeof P=="function"?P.apply(this,arguments):P;return n(yu.translate(z[0],z[1]).scale(F.k).translate(typeof $=="function"?-$.apply(this,arguments):-$,typeof w=="function"?-w.apply(this,arguments):-w),L,a)},P,I)};function _(M,$){return $=Math.max(o[0],Math.min(o[1],$)),$===M.k?M:new Ue($,M.x,M.y)}function v(M,$,w){var P=$[0]-w[0]*M.k,I=$[1]-w[1]*M.k;return P===M.x&&I===M.y?M:new Ue(M.k,P,I)}function b(M){return[(+M[0][0]+ +M[1][0])/2,(+M[0][1]+ +M[1][1])/2]}function x(M,$,w,P){M.on("start.zoom",function(){A(this,arguments).event(P).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(P).end()}).tween("zoom",function(){var I=this,L=arguments,F=A(I,L).event(P),z=e.apply(I,L),U=w==null?b(z):typeof w=="function"?w.apply(I,L):w,tt=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),K=I.__zoom,it=typeof $=="function"?$.apply(I,L):$,pt=c(K.invert(U).concat(tt/K.k),it.invert(U).concat(tt/it.k));return function(q){if(q===1)q=it;else{var dt=pt(q),B=tt/dt[2];q=new Ue(B,U[0]-dt[0]*B,U[1]-dt[1]*B)}F.zoom(null,q)}})}function A(M,$,w){return!w&&M.__zooming||new T(M,$)}function T(M,$){this.that=M,this.args=$,this.active=0,this.sourceEvent=null,this.extent=e.apply(M,$),this.taps=0}T.prototype={event:function(M){return M&&(this.sourceEvent=M),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(M,$){return this.mouse&&M!=="mouse"&&(this.mouse[1]=$.invert(this.mouse[0])),this.touch0&&M!=="touch"&&(this.touch0[1]=$.invert(this.touch0[0])),this.touch1&&M!=="touch"&&(this.touch1[1]=$.invert(this.touch1[0])),this.that.__zoom=$,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(M){var $=Z(this.that).datum();u.call(M,this.that,new FN(M,{sourceEvent:this.sourceEvent,target:y,type:M,transform:this.that.__zoom,dispatch:u}),$)}};function D(M,...$){if(!t.apply(this,arguments))return;var w=A(this,$).event(M),P=this.__zoom,I=Math.max(o[0],Math.min(o[1],P.k*Math.pow(2,r.apply(this,arguments)))),L=ae(M);if(w.wheel)(w.mouse[0][0]!==L[0]||w.mouse[0][1]!==L[1])&&(w.mouse[1]=P.invert(w.mouse[0]=L)),clearTimeout(w.wheel);else{if(P.k===I)return;w.mouse=[L,P.invert(L)],Gn(this),w.start()}$o(M),w.wheel=setTimeout(F,d),w.zoom("mouse",n(v(_(P,I),w.mouse[0],w.mouse[1]),w.extent,a));function F(){w.wheel=null,w.end()}}function k(M,...$){if(l||!t.apply(this,arguments))return;var w=M.currentTarget,P=A(this,$,!0).event(M),I=Z(M.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",tt,!0),L=ae(M,w),F=M.clientX,z=M.clientY;xa(M.view),fh(M),P.mouse=[L,this.__zoom.invert(L)],Gn(this),P.start();function U(K){if($o(K),!P.moved){var it=K.clientX-F,pt=K.clientY-z;P.moved=it*it+pt*pt>g}P.event(K).zoom("mouse",n(v(P.that.__zoom,P.mouse[0]=ae(K,w),P.mouse[1]),P.extent,a))}function tt(K){I.on("mousemove.zoom mouseup.zoom",null),_a(K.view,P.moved),$o(K),P.event(K).end()}}function E(M,...$){if(t.apply(this,arguments)){var w=this.__zoom,P=ae(M.changedTouches?M.changedTouches[0]:M,this),I=w.invert(P),L=w.k*(M.shiftKey?.5:2),F=n(v(_(w,L),P,I),e.apply(this,$),a);$o(M),s>0?Z(this).transition().duration(s).call(x,F,P,M):Z(this).call(y.transform,F,P,M)}}function S(M,...$){if(t.apply(this,arguments)){var w=M.touches,P=w.length,I=A(this,$,M.changedTouches.length===P).event(M),L,F,z,U;for(fh(M),F=0;F<P;++F)z=w[F],U=ae(z,this),U=[U,this.__zoom.invert(U),z.identifier],I.touch0?!I.touch1&&I.touch0[2]!==U[2]&&(I.touch1=U,I.taps=0):(I.touch0=U,L=!0,I.taps=1+!!f);f&&(f=clearTimeout(f)),L&&(I.taps<2&&(h=U[0],f=setTimeout(function(){f=null},p)),Gn(this),I.start())}}function C(M,...$){if(this.__zooming){var w=A(this,$).event(M),P=M.changedTouches,I=P.length,L,F,z,U;for($o(M),L=0;L<I;++L)F=P[L],z=ae(F,this),w.touch0&&w.touch0[2]===F.identifier?w.touch0[0]=z:w.touch1&&w.touch1[2]===F.identifier&&(w.touch1[0]=z);if(F=w.that.__zoom,w.touch1){var tt=w.touch0[0],K=w.touch0[1],it=w.touch1[0],pt=w.touch1[1],q=(q=it[0]-tt[0])*q+(q=it[1]-tt[1])*q,dt=(dt=pt[0]-K[0])*dt+(dt=pt[1]-K[1])*dt;F=_(F,Math.sqrt(q/dt)),z=[(tt[0]+it[0])/2,(tt[1]+it[1])/2],U=[(K[0]+pt[0])/2,(K[1]+pt[1])/2]}else if(w.touch0)z=w.touch0[0],U=w.touch0[1];else return;w.zoom("touch",n(v(F,z,U),w.extent,a))}}function N(M,...$){if(this.__zooming){var w=A(this,$).event(M),P=M.changedTouches,I=P.length,L,F;for(fh(M),l&&clearTimeout(l),l=setTimeout(function(){l=null},p),L=0;L<I;++L)F=P[L],w.touch0&&w.touch0[2]===F.identifier?delete w.touch0:w.touch1&&w.touch1[2]===F.identifier&&delete w.touch1;if(w.touch1&&!w.touch0&&(w.touch0=w.touch1,delete w.touch1),w.touch0)w.touch0[1]=this.__zoom.invert(w.touch0[0]);else if(w.end(),w.taps===2&&(F=ae(F,this),Math.hypot(h[0]-F[0],h[1]-F[1])<m)){var z=Z(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(M){return arguments.length?(r=typeof M=="function"?M:mu(+M),y):r},y.filter=function(M){return arguments.length?(t=typeof M=="function"?M:mu(!!M),y):t},y.touchable=function(M){return arguments.length?(i=typeof M=="function"?M:mu(!!M),y):i},y.extent=function(M){return arguments.length?(e=typeof M=="function"?M:mu([[+M[0][0],+M[0][1]],[+M[1][0],+M[1][1]]]),y):e},y.scaleExtent=function(M){return arguments.length?(o[0]=+M[0],o[1]=+M[1],y):[o[0],o[1]]},y.translateExtent=function(M){return arguments.length?(a[0][0]=+M[0][0],a[1][0]=+M[1][0],a[0][1]=+M[0][1],a[1][1]=+M[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(M){return arguments.length?(n=M,y):n},y.duration=function(M){return arguments.length?(s=+M,y):s},y.interpolate=function(M){return arguments.length?(c=M,y):c},y.on=function(){var M=u.on.apply(u,arguments);return M===u?y:M},y.clickDistance=function(M){return arguments.length?(g=(M=+M)*M,y):Math.sqrt(g)},y.tapDistance=function(M){return arguments.length?(m=+M,y):m},y}const Uv=Object.freeze(Object.defineProperty({__proto__:null,Adder:kt,Delaunay:wl,FormatSpecifier:es,InternMap:_i,InternSet:Dn,Node:Zn,Path:Ui,Voronoi:n1,ZoomTransform:Ue,active:WM,arc:Zb,area:Qb,areaRadial:rv,ascending:xt,autoType:gS,axisBottom:F8,axisLeft:Ac,axisRight:R8,axisTop:md,bin:ad,bisect:Pn,bisectCenter:N6,bisectLeft:E6,bisectRight:Wp,bisector:aa,blob:bS,blur:L6,blur2:Hp,blurImage:I6,brush:i$,brushSelection:e$,brushX:n$,brushY:r$,buffer:xS,chord:a$,chordDirected:u$,chordTranspose:s$,cluster:NT,color:ln,contourDensity:I$,contours:yl,count:ua,create:b7,creator:ya,cross:U6,csv:AS,csvFormat:iS,csvFormatBody:oS,csvFormatRow:sS,csvFormatRows:aS,csvFormatValue:uS,csvParse:a1,csvParseRows:rS,cubehelix:$e,cumsum:B6,curveBasis:cN,curveBasisClosed:lN,curveBasisOpen:fN,curveBumpX:ov,curveBumpY:av,curveBundle:hN,curveCardinal:pN,curveCardinalClosed:dN,curveCardinalOpen:gN,curveCatmullRom:mN,curveCatmullRomClosed:yN,curveCatmullRomOpen:bN,curveLinear:su,curveLinearClosed:vN,curveMonotoneX:xN,curveMonotoneY:_N,curveNatural:wN,curveStep:AN,curveStepAfter:$N,curveStepBefore:MN,descending:Yp,deviation:jp,difference:M8,disjoint:$8,dispatch:Nn,drag:Pd,dragDisable:xa,dragEnable:_a,dsv:wS,dsvFormat:Ka,easeBack:Rg,easeBackIn:FM,easeBackInOut:Rg,easeBackOut:zM,easeBounce:Oi,easeBounceIn:CM,easeBounceInOut:RM,easeBounceOut:Oi,easeCircle:Cg,easeCircleIn:$M,easeCircleInOut:Cg,easeCircleOut:SM,easeCubic:zi,easeCubicIn:yM,easeCubicInOut:zi,easeCubicOut:bM,easeElastic:qa,easeElasticIn:OM,easeElasticInOut:GM,easeElasticOut:qa,easeExp:Ig,easeExpIn:AM,easeExpInOut:Ig,easeExpOut:MM,easeLinear:dM,easePoly:kg,easePolyIn:vM,easePolyInOut:kg,easePolyOut:xM,easeQuad:Dg,easeQuadIn:gM,easeQuadInOut:Dg,easeQuadOut:mM,easeSin:Lg,easeSinIn:_M,easeSinInOut:Lg,easeSinOut:wM,every:b8,extent:xi,fcumsum:q6,filter:x8,flatGroup:W6,flatRollup:H6,forceCenter:ES,forceCollide:f1,forceLink:KS,forceManyBody:g1,forceRadial:o9,forceSimulation:d1,forceX:m1,forceY:y1,get format(){return Wi},formatDefaultLocale:$1,formatLocale:M1,get formatPrefix(){return Pl},formatSpecifier:Rr,fsum:Y6,geoAlbers:Om,geoAlbersUsa:lT,geoArea:g9,geoAzimuthalEqualArea:fT,geoAzimuthalEqualAreaRaw:df,geoAzimuthalEquidistant:hT,geoAzimuthalEquidistantRaw:gf,geoBounds:v9,geoCentroid:$9,geoCircle:S9,geoClipAntimeridian:Hl,geoClipCircle:sm,geoClipExtent:L9,geoClipRectangle:As,geoConicConformal:dT,geoConicConformalRaw:Bm,geoConicEqualArea:Cs,geoConicEqualAreaRaw:zm,geoConicEquidistant:mT,geoConicEquidistantRaw:Ym,geoContains:G9,geoDistance:Ss,geoEqualEarth:bT,geoEqualEarthRaw:mf,geoEquirectangular:gT,geoEquirectangularRaw:so,geoGnomonic:vT,geoGnomonicRaw:yf,geoGraticule:ym,geoGraticule10:U9,geoIdentity:xT,geoInterpolate:B9,geoLength:um,geoMercator:pT,geoMercatorRaw:ao,geoNaturalEarth1:_T,geoNaturalEarth1Raw:bf,geoOrthographic:wT,geoOrthographicRaw:vf,geoPath:tT,geoProjection:ze,geoProjectionMutator:hf,geoRotation:J1,geoStereographic:AT,geoStereographicRaw:xf,geoStream:Te,geoTransform:eT,geoTransverseMercator:MT,geoTransverseMercatorRaw:_f,gray:z7,greatest:sd,greatestIndex:h8,group:Jp,groupSort:j6,groups:td,hcl:Da,hierarchy:wf,histogram:ad,hsl:$a,html:DS,image:$S,index:X6,indexes:V6,interpolate:fn,interpolateArray:q7,interpolateBasis:Jd,interpolateBasisClosed:tg,interpolateBlues:yE,interpolateBrBG:Zk,interpolateBuGn:oE,interpolateBuPu:aE,interpolateCividis:AE,interpolateCool:SE,interpolateCubehelix:oA,interpolateCubehelixDefault:ME,interpolateCubehelixLong:Ca,interpolateDate:ag,interpolateDiscrete:X7,interpolateGnBu:sE,interpolateGreens:bE,interpolateGreys:vE,interpolateHcl:rA,interpolateHclLong:iA,interpolateHsl:tA,interpolateHslLong:eA,interpolateHue:V7,interpolateInferno:IE,interpolateLab:nA,interpolateMagma:LE,interpolateNumber:ce,interpolateNumberArray:Bc,interpolateObject:sg,interpolateOrRd:uE,interpolateOranges:wE,interpolatePRGn:Kk,interpolatePiYG:Qk,interpolatePlasma:CE,interpolatePuBu:lE,interpolatePuBuGn:cE,interpolatePuOr:Jk,interpolatePuRd:fE,interpolatePurples:xE,interpolateRainbow:TE,interpolateRdBu:tE,interpolateRdGy:eE,interpolateRdPu:hE,interpolateRdYlBu:nE,interpolateRdYlGn:rE,interpolateReds:_E,interpolateRgb:Ei,interpolateRgbBasis:rg,interpolateRgbBasisClosed:Y7,interpolateRound:La,interpolateSinebow:kE,interpolateSpectral:iE,interpolateString:Wc,interpolateTransformCss:fg,interpolateTransformSvg:hg,interpolateTurbo:EE,interpolateViridis:NE,interpolateWarm:$E,interpolateYlGn:dE,interpolateYlGnBu:pE,interpolateYlOrBr:gE,interpolateYlOrRd:mE,interpolateZoom:dg,interrupt:Gn,intersection:S8,interval:lA,isoFormat:Dk,isoParse:Nk,json:TS,lab:Pa,lch:O7,least:f8,leastIndex:ld,line:uu,lineRadial:nv,link:cu,linkHorizontal:KE,linkRadial:JE,linkVertical:QE,local:Sd,map:_8,matcher:Tc,max:wi,maxIndex:vc,mean:r8,median:i8,medianIndex:o8,merge:_c,min:fa,minIndex:xc,mode:s8,namespace:Si,namespaces:$c,nice:yc,now:Ri,pack:uP,packEnclose:nP,packSiblings:aP,pairs:u8,partition:cP,path:ml,pathRound:f$,permute:od,pie:Jb,piecewise:bg,pointRadial:Mo,pointer:ae,pointers:x7,polygonArea:$P,polygonCentroid:SP,polygonContains:kP,polygonHull:DP,polygonLength:EP,precisionFixed:S1,precisionPrefix:T1,precisionRound:P1,quadtree:Ja,quantile:Mi,quantileIndex:cd,quantileSorted:ud,quantize:aA,quickselect:ha,radialArea:rv,radialLine:nv,randomBates:CP,randomBernoulli:zP,randomBeta:fy,randomBinomial:hy,randomCauchy:GP,randomExponential:RP,randomGamma:Ef,randomGeometric:ly,randomInt:LP,randomIrwinHall:cy,randomLcg:WP,randomLogNormal:IP,randomLogistic:UP,randomNormal:kf,randomPareto:FP,randomPoisson:BP,randomUniform:NP,randomWeibull:OP,range:un,rank:l8,reduce:w8,reverse:A8,rgb:Mr,ribbon:v$,ribbonArrow:x$,rollup:nd,rollups:rd,scaleBand:If,scaleDiverging:bb,scaleDivergingLog:vb,scaleDivergingPow:Jf,scaleDivergingSqrt:zk,scaleDivergingSymlog:xb,scaleIdentity:yy,scaleImplicit:Nf,scaleLinear:zf,scaleLog:wy,scaleOrdinal:Lf,scalePoint:Cf,scalePow:Ws,scaleQuantile:Dy,scaleQuantize:ky,scaleRadial:Py,scaleSequential:db,scaleSequentialLog:gb,scaleSequentialPow:Qf,scaleSequentialQuantile:yb,scaleSequentialSqrt:Fk,scaleSequentialSymlog:mb,scaleSqrt:rD,scaleSymlog:$y,scaleThreshold:Ey,scaleTime:Ck,scaleUtc:Rk,scan:p8,schemeAccent:Gk,schemeBlues:Bb,schemeBrBG:_b,schemeBuGn:kb,schemeBuPu:Eb,schemeCategory10:Ok,schemeDark2:Uk,schemeGnBu:Nb,schemeGreens:Yb,schemeGreys:qb,schemeObservable10:Bk,schemeOrRd:Lb,schemeOranges:Xb,schemePRGn:wb,schemePaired:Yk,schemePastel1:qk,schemePastel2:Wk,schemePiYG:Ab,schemePuBu:Cb,schemePuBuGn:Ib,schemePuOr:Mb,schemePuRd:Rb,schemePurples:Wb,schemeRdBu:$b,schemeRdGy:Sb,schemeRdPu:Fb,schemeRdYlBu:Tb,schemeRdYlGn:Pb,schemeReds:Hb,schemeSet1:Hk,schemeSet2:Xk,schemeSet3:Vk,schemeSpectral:Db,schemeTableau10:jk,schemeYlGn:Ob,schemeYlGnBu:zb,schemeYlOrBr:Gb,schemeYlOrRd:Ub,select:Z,selectAll:_7,selection:In,selector:ba,selectorAll:Sc,shuffle:d8,shuffler:fd,some:v8,sort:dc,stack:PN,stackOffsetDiverging:kN,stackOffsetExpand:DN,stackOffsetNone:Kr,stackOffsetSilhouette:EN,stackOffsetWiggle:NN,stackOrderAppearance:Cv,stackOrderAscending:Rv,stackOrderDescending:IN,stackOrderInsideOut:CN,stackOrderNone:Qr,stackOrderReverse:RN,stratify:pP,style:Ln,subset:P8,sum:g8,superset:pd,svg:kS,symbol:uN,symbolAsterisk:sv,symbolCircle:lu,symbolCross:uv,symbolDiamond:lv,symbolDiamond2:fv,symbolPlus:hv,symbolSquare:pv,symbolSquare2:dv,symbolStar:mv,symbolTimes:oh,symbolTriangle:yv,symbolTriangle2:bv,symbolWye:vv,symbolX:oh,symbols:xv,symbolsFill:xv,symbolsStroke:sN,text:Qa,thresholdFreedmanDiaconis:e8,thresholdScott:n8,thresholdSturges:bc,tickFormat:my,tickIncrement:En,tickStep:la,ticks:kn,timeDay:Hr,timeDays:cD,get timeFormat(){return jf},timeFormatDefaultLocale:hb,timeFormatLocale:Zy,timeFriday:Fy,timeFridays:mD,timeHour:Vs,timeHours:sD,timeInterval:Tt,timeMillisecond:Wr,timeMilliseconds:Ny,timeMinute:Hs,timeMinutes:oD,timeMonday:yo,timeMondays:hD,timeMonth:Zs,timeMonths:MD,get timeParse(){return fb},timeSaturday:zy,timeSaturdays:yD,timeSecond:rn,timeSeconds:Iy,timeSunday:Xr,timeSundays:Oy,timeThursday:Jn,timeThursdays:gD,timeTickInterval:jy,timeTicks:Vy,timeTuesday:Cy,timeTuesdays:pD,timeWednesday:Ry,timeWednesdays:dD,timeWeek:Xr,timeWeeks:Oy,timeYear:Oe,timeYears:SD,timeout:Vc,timer:Oa,timerFlush:_g,transition:Tg,transpose:hd,tree:xP,treemap:_P,treemapBinary:wP,treemapDice:po,treemapResquarify:MP,treemapSlice:Bs,treemapSliceDice:AP,treemapSquarify:sy,tsv:MS,tsvFormat:lS,tsvFormatBody:fS,tsvFormatRow:pS,tsvFormatRows:hS,tsvFormatValue:dS,tsvParse:s1,tsvParseRows:cS,union:D8,unixDay:Hf,unixDays:fD,utcDay:mo,utcDays:lD,get utcFormat(){return Qs},utcFriday:By,utcFridays:wD,utcHour:js,utcHours:uD,utcMillisecond:Wr,utcMilliseconds:Ny,utcMinute:Xs,utcMinutes:aD,utcMonday:bo,utcMondays:bD,utcMonth:Ks,utcMonths:$D,get utcParse(){return Zf},utcSaturday:Yy,utcSaturdays:AD,utcSecond:rn,utcSeconds:Iy,utcSunday:Vr,utcSundays:qy,utcThursday:er,utcThursdays:_D,utcTickInterval:Xy,utcTicks:Hy,utcTuesday:Gy,utcTuesdays:vD,utcWednesday:Uy,utcWednesdays:xD,utcWeek:Vr,utcWeeks:qy,utcYear:Ge,utcYears:TD,variance:Vp,window:Pc,xml:PS,zip:y8,zoom:Gv,zoomIdentity:yu,zoomTransform:zv},Symbol.toStringTag,{value:"Module"}));function Bv(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function YN(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function Jr(t){return t.substring(0,4)!=="ease"?zi:Uv[t]??zi}function bu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=zf().domain([0,1]).range([0,t/2]),a=o(n);return Zb().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const vu=(t,e)=>e instanceof Function?e(t):Wi(e)(t);function Yv(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function qv(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function qN(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return qv(e)}function Pt(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function WN(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}function hh({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function lt(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function ti(t,e){const r=Math.random().toString(36).substr(2,5);return lt(t,e,r)}function Wv({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r}){const i=new ft,o=new at(a=>{H({dataFormatter:t,computedData:n}).pipe(R(i),Y(async s=>s)).subscribe(s=>{const u=s.computedData[0]?s.computedData[0].length-1:0,f=s.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.groupAxis.scalePadding:s.dataFormatter.groupAxis.scaleDomain[0]-s.dataFormatter.groupAxis.scalePadding,h=s.dataFormatter.groupAxis.scaleDomain[1]==="auto"?u+s.dataFormatter.groupAxis.scalePadding:s.dataFormatter.groupAxis.scaleDomain[1]+s.dataFormatter.groupAxis.scalePadding,p=(s.dataFormatter.grid.seriesType==="row"?(s.computedData[0]??[]).map(d=>d.groupLabel):s.computedData.map(d=>d[0].groupLabel)).filter((d,g)=>g>=f&&g<=h);a.next(p)})});return new at(a=>{H({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(R(i),Y(async s=>s)).subscribe(s=>{const c=s.dataFormatter.valueAxis.position==="right"||s.dataFormatter.valueAxis.position==="bottom",u=S6({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:c}),f=l=>s.dataFormatter.groupAxis.position==="bottom"||s.dataFormatter.groupAxis.position==="top"?l.offsetX-s.fullChartParams.padding.left:l.offsetY-s.fullChartParams.padding.top,h=l=>{const p=f(l),d=u(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(h),function(){i.next(void 0)}})})}const Hv="Lines",HN=lt(Hv,"g"),XN=lt(Hv,"path");function VN(t="curveLinear"){return uu().x(e=>e.axisX).y(e=>e.axisY).curve(Uv[t])}function jN(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function ZN({selection:t,segmentData:e,linePath:n,params:r}){return t.selectAll("path").data(e,(o,a)=>o.length?`${o[0].id}_${o[o.length-1].id}`:a).join(o=>o.append("path").classed(XN,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),o=>o,o=>o.remove()).attr("stroke-width",r.lineWidth).attr("stroke",(o,a)=>o[0]&&o[0].color).attr("d",o=>n(o))}function KN({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function QN({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const c=s.append("rect");return c.transition().duration(n).ease(Jr(r)).tween("tween",(u,f,h)=>l=>{const p=u.width*l;c.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),c},s=>s.attr("x",0).attr("y",0).attr("width",c=>c.width).attr("height",c=>c.height),s=>s.remove())})}const Xv=(t,{selection:e,computedData$:n,SeriesDataMap$:r,GroupDataMap$:i,fullParams$:o,fullDataFormatter$:a,fullChartParams$:s,gridAxesTransform$:c,gridGraphicTransform$:u,gridAxesSize$:f,gridHighlight$:h,event$:l})=>{const p=new ft,d=ti(t,"clipPath-box"),g=e.append("g").attr("clip-path",`url(#${d})`),m=g.append("defs"),y=g.append("g"),_=new ft;c.pipe(R(p),G(S=>S.value),J()).subscribe(S=>{g.style("transform",S)}),u.pipe(R(p),G(S=>S.value),J()).subscribe(S=>{y.transition().duration(50).style("transform",S)});const v=new at(S=>{const C=o.pipe(R(p)).subscribe(N=>{if(!N)return;const M=VN(N.lineCurve);S.next(M)});return()=>{C.unsubscribe()}}),b=new at(S=>{n.pipe(R(p),Y(async C=>C)).subscribe(C=>{const N=C[0]&&C[0][0]?C.map(M=>M[0].seriesLabel):[];S.next(N)})}),x=s.pipe(G(S=>S.transitionDuration),J()),A=s.pipe(G(S=>S.transitionEase),J());H({seriesLabels:b,axisSize:f,transitionDuration:x,transitionEase:A}).pipe(R(p),Y(async S=>S)).subscribe(S=>{const N=[{id:d,width:S.axisSize.width,height:S.axisSize.height}].concat(S.seriesLabels.map(M=>({id:`orbcharts__clipPath_${M}`,width:S.axisSize.width,height:S.axisSize.height})));QN({defsSelection:m,clipPathData:N,transitionDuration:S.transitionDuration,transitionEase:S.transitionEase})});const T=n.pipe(G(S=>{const C=new Map;return S.flat().forEach(N=>C.set(N.id,N)),C})),D=Wv({fullDataFormatter$:a,gridAxesSize$:f,computedData$:n,fullChartParams$:s}),k=s.pipe(R(p),G(S=>S.highlightTarget),J());H({seriesLabels:b,computedData:n,SeriesDataMap:r,GroupDataMap:i,linePath:v,params:o,highlightTarget:k,gridGroupPositionFn:D}).pipe(R(p),Y(async S=>S)).subscribe(S=>{const C=y.selectAll("g").data(S.seriesLabels,($,w)=>$),N=C.enter().append("g").classed(HN,!0);C.exit().remove();const M=C.merge(N).attr("clip-path",($,w)=>`url(#orbcharts__clipPath_${$})`);M.each(($,w,P)=>{const I=jN(S.computedData[w]??[]);ZN({selection:Z(P[w]),linePath:S.linePath,segmentData:I,params:S.params}).on("mouseover",(F,z)=>{F.stopPropagation();const U=z[0]?z[0].seriesLabel:"",{groupIndex:tt,groupLabel:K}=S.gridGroupPositionFn(F),q=S.GroupDataMap.get(K).find(dt=>dt.seriesLabel===U)??z[0];l.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:S.highlightTarget,datum:q,series:S.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:S.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:F,data:S.computedData})}).on("mousemove",(F,z)=>{F.stopPropagation();const U=z[0]?z[0].seriesLabel:"",{groupIndex:tt,groupLabel:K}=S.gridGroupPositionFn(F),q=S.GroupDataMap.get(K).find(dt=>dt.seriesLabel===U)??z[0];l.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:S.highlightTarget,datum:q,series:S.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:S.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:F,data:S.computedData})}).on("mouseout",(F,z)=>{F.stopPropagation();const U=z[0]?z[0].seriesLabel:"",{groupIndex:tt,groupLabel:K}=S.gridGroupPositionFn(F),q=S.GroupDataMap.get(K).find(dt=>dt.seriesLabel===U)??z[0];l.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:S.highlightTarget,datum:q,series:S.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:S.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:F,data:S.computedData})}).on("click",(F,z)=>{F.stopPropagation();const U=z[0]?z[0].seriesLabel:"",{groupIndex:tt,groupLabel:K}=S.gridGroupPositionFn(F),q=S.GroupDataMap.get(K).find(dt=>dt.seriesLabel===U)??z[0];l.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:S.highlightTarget,datum:q,series:S.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:S.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:F,data:S.computedData})})}),_.next(M)});const E=h.subscribe();return s.pipe(R(p),No(S=>S.highlightTarget==="series"),Y(S=>H({graphicSelection:_,highlight:h,DataMap:T,fullChartParams:s}).pipe(R(p),Y(async C=>C)))).subscribe(S=>{const C=S.DataMap.get(S.highlight[0]);KN({selection:S.graphicSelection,seriesLabel:C&&C.seriesLabel?C.seriesLabel:null,fullChartParams:S.fullChartParams})}),()=>{p.next(void 0),E.unsubscribe()}},Vv="Lines",JN=we(Vv,rr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ft,o=Xv(Vv,{selection:t,computedData$:n.computedData$,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$,event$:r.event$});return()=>{i.next(void 0),o()}}),jv="Bars",Zv=lt(jv,"g"),Kv=lt(jv,"rect"),Qv=.3;function tL({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function eL(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Cf().domain(e).range([-i/2+r,i/2-r])}function nL(t,e){return t<=1?0:e/(t-1)*Qv}function rL(t,e){return t<=1?e:e*(1-Qv)}function iL({selection:t,data:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:c,delayGroup:u,transitionItem:f}){const h=s/2;return t.selectAll(`g.${Zv}`).data(e,(d,g)=>r[g]).join(d=>d.append("g").classed(Zv,!0).attr("cursor","pointer"),d=>d,d=>d.remove()).attr("transform",(d,g)=>`translate(${d[0]?d[0].axisX:0}, 0)`).each((d,g,m)=>{Z(m[g]).selectAll("rect").data(d,y=>y.id).join(y=>y.append("rect").classed(Kv,!0).attr("height",_=>0),y=>y,y=>y.remove()).attr("fill",y=>y.color).attr("y",y=>y.axisY<n?y.axisY:n).attr("x",y=>i(y.seriesLabel)).attr("width",s).attr("transform",`translate(${-h}, 0)`).attr("rx",c[0]).attr("ry",c[1]).transition().duration(f).ease(Jr(a.transitionEase)).delay((y,_)=>y.groupIndex*u).attr("height",y=>Math.abs(y.axisYFromZero))}).selectAll(`rect.${Kv}`)}function oL({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(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 aL({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Jv=(t,{selection:e,computedData$:n,visibleComputedData$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullChartParams$:s,gridAxesTransform$:c,gridGraphicTransform$:u,gridAxesSize$:f,gridHighlight$:h,event$:l})=>{const p=new ft,d=ti(t,"clipPath-box"),g=e.append("g").attr("clip-path",`url(#${d})`),m=g.append("defs"),y=g.append("g"),_=new ft;c.pipe(R(p),G($=>$.value),J()).subscribe($=>{g.style("transform",$)}),u.pipe(R(p),G($=>$.value),J()).subscribe($=>{y.transition().duration(50).style("transform",$)});const v=r.pipe(G($=>$[0]&&$[0][0]?$[0][0].axisY-$[0][0].axisYFromZero:0),J()),b=new at($=>{H({computedData:n,visibleComputedData:r,params:a,gridAxesSize:f}).pipe(Y(async w=>w)).subscribe(w=>{const P=w.params.barWidth?w.params.barWidth:tL({axisWidth:w.gridAxesSize.width,groupAmount:w.computedData[0]?w.computedData[0].length:0,barAmountOfGroup:w.visibleComputedData.length,barPadding:w.params.barPadding,barGroupPadding:w.params.barGroupPadding});$.next(P)})}).pipe(R(p),J()),x=H({gridGraphicTransform:u,barWidth:b,params:a}).pipe(R(p),Y(async $=>$),G($=>{const w=$.barWidth/2,P=$.params.barRadius===!0?w:$.params.barRadius===!1?0:typeof $.params.barRadius=="number"?$.params.barRadius:0,I=P==0?0:P/$.gridGraphicTransform.scale[0],L=P==0?0:P/$.gridGraphicTransform.scale[1];return[I,L]})),A=r.pipe(R(p),G($=>{const w=new Set;return $.forEach(P=>{P.forEach(I=>{w.add(I.seriesLabel)})}),Array.from(w)})),T=r.pipe(R(p),G($=>{const w=new Set;return $.forEach(P=>{P.forEach(I=>{w.add(I.groupLabel)})}),Array.from(w)})),D=new at($=>{H({seriesLabels:A,barWidth:b,params:a}).pipe(R(p),Y(async w=>w)).subscribe(w=>{const P=eL(w.barWidth,w.seriesLabels,w.params);$.next(P)})}),k=s.pipe(R(p),G($=>$.transitionDuration),J()),E=new at($=>{H({groupLabels:T,transitionDuration:k}).pipe(Y(async w=>w)).subscribe(w=>{const P=nL(w.groupLabels.length,w.transitionDuration);$.next(P)})}).pipe(R(p),J()),S=new at($=>{H({groupLabels:T,transitionDuration:k}).pipe(Y(async w=>w)).subscribe(w=>{const P=rL(w.groupLabels.length,w.transitionDuration);$.next(P)})}).pipe(R(p),J()),C=r.pipe(R(p),G($=>{const w=$.length,P=$.reduce((L,F)=>Math.max(L,F.length),0),I=new Array(P).fill(null).map(()=>new Array(w).fill(null));for(let L=0;L<w;L++)for(let F=0;F<P;F++)I[F][L]=$[L][F];return I}));f.pipe(R(p)).subscribe($=>{const w=[{id:d,width:$.width,height:$.height}];oL({defsSelection:m,clipPathData:w})});const N=s.pipe(R(p),G($=>$.highlightTarget),J());H({computedData:n,barData$:C,zeroY:v,groupLabels:T,barScale:D,params:a,chartParams:s,highlightTarget:N,barWidth:b,transformedBarRadius:x,delayGroup:E,transitionItem:S,SeriesDataMap:i,GroupDataMap:o}).pipe(R(p),Y(async $=>$)).subscribe($=>{const w=iL({selection:y,data:$.barData$,zeroY:$.zeroY,groupLabels:$.groupLabels,barScale:$.barScale,params:$.params,chartParams:$.chartParams,barWidth:$.barWidth,transformedBarRadius:$.transformedBarRadius,delayGroup:$.delayGroup,transitionItem:$.transitionItem});w.on("mouseover",(P,I)=>{P.stopPropagation(),l.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:$.highlightTarget,datum:I,series:$.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:$.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:P,data:$.computedData})}).on("mousemove",(P,I)=>{P.stopPropagation(),l.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:$.highlightTarget,datum:I,series:$.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:$.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:P,data:$.computedData})}).on("mouseout",(P,I)=>{P.stopPropagation(),l.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:$.highlightTarget,datum:I,series:$.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:$.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:P,data:$.computedData})}).on("click",(P,I)=>{P.stopPropagation(),l.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:$.highlightTarget,datum:I,series:$.SeriesDataMap.get(I.seriesLabel),seriesIndex:I.seriesIndex,seriesLabel:I.seriesLabel,groups:$.GroupDataMap.get(I.groupLabel),groupIndex:I.groupIndex,groupLabel:I.groupLabel,event:P,data:$.computedData})}),_.next(w)});const M=h.subscribe();return H({barSelection:_,highlight:h,fullChartParams:s}).pipe(R(p),Y(async $=>$)).subscribe($=>{aL({selection:$.barSelection,ids:$.highlight,fullChartParams:$.fullChartParams})}),()=>{p.next(void 0),M.unsubscribe()}},t2="Bars",sL=we(t2,$h)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ft,o=Jv(t2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),e2="BarStack",n2=lt(e2,"g"),r2=lt(e2,"g-content"),i2=.3;function uL({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function cL(t,e){return t<=1?0:e/(t-1)*i2}function lL(t,e){return t<=1?e:e*(1-i2)}function fL({selection:t,data:e,zeroY:n,groupLabels:r,params:i,chartParams:o,barWidth:a,transformedBarRadius:s,delayGroup:c,transitionItem:u}){const f=a/2;return t.selectAll(`g.${n2}`).data(e,(p,d)=>r[d]).join(p=>p.append("g").classed(n2,!0).attr("cursor","pointer"),p=>p,p=>p.remove()).attr("transform",(p,d)=>`translate(${p[0]?p[0].axisX:0}, 0)`).each((p,d,g)=>{Z(g[d]).selectAll("g").data(p,m=>m.id).join(m=>m.append("g").classed(r2,!0),m=>m,m=>m.remove()).each((m,y,_)=>{Z(_[y]).selectAll("rect").data([m],v=>v.id).join(v=>v.append("rect").attr("y",b=>n).attr("height",b=>0),v=>v,v=>v.remove()).attr("rx",s[0]).attr("ry",s[1]).attr("fill",v=>v.color).attr("transform",`translate(${-f}, 0)`).attr("x",v=>0).attr("width",a).transition().duration(u).ease(Jr(o.transitionEase)).delay((v,b)=>v.groupIndex*c).attr("y",v=>v._barStartY).attr("height",v=>Math.abs(v._barHeight))})}).selectAll(`g.${r2}`)}function hL({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(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 pL({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const dL=(t,{selection:e,computedData$:n,visibleComputedData$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:c,gridAxesTransform$:u,gridGraphicTransform$:f,gridAxesSize$:h,gridHighlight$:l,event$:p})=>{const d=new ft,g=ti(t,"clipPath-box"),m=e.append("g").attr("clip-path",`url(#${g})`),y=m.append("defs"),_=m.append("g"),v=new ft;u.pipe(R(d),G(w=>w.value),J()).subscribe(w=>{m.style("transform",w)}),f.pipe(R(d),Y(async w=>w.value),J()).subscribe(w=>{_.transition().duration(50).style("transform",w)});const b=r.pipe(G(w=>w[0]&&w[0][0]?w[0][0].axisY-w[0][0].axisYFromZero:0),J()),x=new at(w=>{H({computedData:n,params:a,axisSize:h}).pipe(Y(async P=>P)).subscribe(P=>{const I=P.params.barWidth?P.params.barWidth:uL({axisWidth:P.axisSize.width,groupAmount:P.computedData[0]?P.computedData[0].length:0,barGroupPadding:P.params.barGroupPadding});w.next(I)})}).pipe(R(d),J()),A=H({gridGraphicTransform:f,barWidth:x,params:a}).pipe(R(d),Y(async w=>w),G(w=>{const P=w.barWidth/2,I=w.params.barRadius===!0?P:w.params.barRadius===!1?0:typeof w.params.barRadius=="number"?w.params.barRadius:0,L=I==0?0:I/w.gridGraphicTransform.scale[0],F=I==0?0:I/w.gridGraphicTransform.scale[1];return[L,F]})),T=r.pipe(R(d),G(w=>{const P=new Set;return w.forEach(I=>{I.forEach(L=>{P.add(L.groupLabel)})}),Array.from(P)})),D=c.pipe(R(d),G(w=>w.transitionDuration),J()),k=new at(w=>{H({groupLabels:T,transitionDuration:D}).pipe(Y(async P=>P)).subscribe(P=>{const I=cL(P.groupLabels.length,P.transitionDuration);w.next(I)})}).pipe(R(d),J()),E=new at(w=>{H({groupLabels:T,transitionDuration:D}).pipe(Y(async P=>P)).subscribe(P=>{const I=lL(P.groupLabels.length,P.transitionDuration);w.next(I)})}).pipe(R(d),J()),S=r.pipe(R(d),G(w=>{console.log("visibleComputedData",w);const P=w.length,I=w.reduce((F,z)=>Math.max(F,z.length),0),L=new Array(I).fill(null).map(()=>new Array(P).fill(null));for(let F=0;F<P;F++)for(let z=0;z<I;z++)L[z][F]=w[F][z];return L})),C=H({transposedVisibleData:S,dataFormatter:s}).pipe(R(d),Y(async w=>w),G(w=>{const I=w.transposedVisibleData.length-1,L=w.dataFormatter.groupAxis.scaleDomain[0]==="auto"?0-w.dataFormatter.groupAxis.scalePadding:w.dataFormatter.groupAxis.scaleDomain[0]-w.dataFormatter.groupAxis.scalePadding,F=w.dataFormatter.groupAxis.scaleDomain[1]==="auto"?I+w.dataFormatter.groupAxis.scalePadding:w.dataFormatter.groupAxis.scaleDomain[1]+w.dataFormatter.groupAxis.scalePadding,z=w.transposedVisibleData.map(U=>U.filter((tt,K)=>tt.groupIndex>=L&&tt.groupIndex<=F));if(z.flat().length){const U=z.flat().map(pt=>pt.axisYFromZero),tt=Math.max(...U),K=z.map(pt=>pt.reduce((q,dt)=>q+dt.axisYFromZero,0)),it=Math.max(...K);return tt/it}else return 1})),N=H({transposedVisibleData:S,yRatio:C,zeroY:b}).pipe(R(d),G(w=>(console.log(w.transposedVisibleData),w.transposedVisibleData.map(P=>{let I=w.zeroY;return P.map(L=>{const F=I,z=L.axisYFromZero*w.yRatio;return I=I+z,{...L,_barStartY:F,_barHeight:z}})}))));h.pipe(R(d)).subscribe(w=>{const P=[{id:g,width:w.width,height:w.height}];hL({defsSelection:y,clipPathData:P})});const M=c.pipe(R(d),G(w=>w.highlightTarget),J());H({graphicData:N,zeroY:b,groupLabels:T,params:a,chartParams:c,highlightTarget:M,barWidth:x,transformedBarRadius:A,delayGroup:k,transitionItem:E,SeriesDataMap:i,GroupDataMap:o}).pipe(R(d),Y(async w=>w)).subscribe(w=>{const P=fL({selection:_,data: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});P.on("mouseover",(I,L)=>{I.stopPropagation(),p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:w.highlightTarget,datum:L,series:w.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:w.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:I,data:w.graphicData})}).on("mousemove",(I,L)=>{I.stopPropagation(),p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:w.highlightTarget,datum:L,series:w.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:w.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:I,data:w.graphicData})}).on("mouseout",(I,L)=>{I.stopPropagation(),p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:w.highlightTarget,datum:L,series:w.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:w.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:I,data:w.graphicData})}).on("click",(I,L)=>{I.stopPropagation(),p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:w.highlightTarget,datum:L,series:w.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:w.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:I,data:w.graphicData})}),v.next(P)});const $=l.subscribe();return H({barSelection:v,highlight:l,fullChartParams:c}).pipe(R(d),Y(async w=>w)).subscribe(w=>{pL({selection:w.barSelection,ids:w.highlight,fullChartParams:w.fullChartParams})}),()=>{d.next(void 0),$.unsubscribe()}},o2="BarStack",gL=we(o2,Sh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ft,o=dL(o2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,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$,event$:n.event$});return()=>{i.next(void 0),o()}}),a2="BaseBarsTriangle",s2=lt(a2,"g"),u2=lt(a2,"g-content"),c2=.3;function mL({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const o=(t/e-i)/n-r;return o>1?o:1}function yL(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Cf().domain(e).range([-i/2+r,i/2-r])}function bL(t,e){return t<=1?0:e/(t-1)*c2}function vL(t,e){return t<=1?e:e*(1-c2)}function xL({selection:t,barData:e,zeroY:n,groupLabels:r,barScale:i,params:o,chartParams:a,barWidth:s,delayGroup:c,transitionItem:u}){const f=t.selectAll(`g.${s2}`).data(e,(g,m)=>r[m]),h=f.enter().append("g").classed(s2,!0).attr("cursor","pointer");f.exit().remove();const l=f.merge(h);h.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`),f.attr("transform",(g,m)=>`translate(${g[0]?g[0].axisX:0}, 0)`);const p=s/2;return l.each((g,m,y)=>{const _=Z(y[m]).selectAll("g").data(g,b=>b.id),v=_.enter().append("g").classed(u2,!0);v.append("path").style("vector-effect","non-scaling-stroke").attr("height",b=>0).attr("d",b=>{const x=i(b.seriesLabel),A=n,T=A;return`M${x-s/2},${A} L${x},${T} ${x+s/2},${A}`}),_.merge(v).select("path").style("fill",b=>`url(#${b.linearGradientId})`).attr("stroke",b=>b.color).attr("transform",`translate(${-p}, 0)`).transition().duration(u).ease(Jr(a.transitionEase)).delay((b,x)=>b.groupIndex*c).attr("transform",`translate(${-p}, 0)`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("d",b=>{const x=i(b.seriesLabel),A=n,T=b.axisY;return`M${x},${A} L${x+s/2},${T} ${x+s},${A}`}),_.exit().remove()}),l.selectAll(`g.${u2}`)}function _L({defsSelection:t,barData:e,params:n}){const r=t.selectAll("linearGradient").data(e[0]??[],o=>o.seriesLabel),i=r.enter().append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad");r.merge(i).attr("id",(o,a)=>o.linearGradientId).html((o,a)=>`
10
10
  <stop offset="0%" stop-color="${o.color}" stop-opacity="${n.linearGradientOpacity[0]}"/>
11
11
  <stop offset="100%" stop-color="${o.color}" stop-opacity="${n.linearGradientOpacity[1]}"/>
12
- `),r.exit().remove()}function hL({defsSelection:t,clipPathData:e}){const n=t.selectAll("clipPath").data(e),r=n.enter().append("clipPath");n.merge(r).attr("id",i=>i.id),n.exit().remove(),n.merge(r).each((i,o,a)=>{const u=j(a[o]).selectAll("rect").data([i]),c=u.enter().append("rect");u.merge(c).attr("x",0).attr("y",0).attr("width",s=>s.width).attr("height",s=>s.height),u.exit().remove()})}function pL({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?j(a[o]).style("opacity",1):j(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const dL=Pe(_s,kh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new pt,o=ti(_s,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new pt;r.gridAxesTransform$.pipe(R(i),O(y=>y.value),K()).subscribe(y=>{a.style("transform",y)}),r.gridGraphicTransform$.pipe(R(i),U(async y=>y.value),K()).subscribe(y=>{c.transition().duration(50).style("transform",y)});const f=r.computedData$.pipe(O(y=>y[0]&&y[0][0]?y[0][0].axisY-y[0][0].axisYFromZero:0),K()),h=new nt(y=>{q({computedData:r.computedData$,params:r.fullParams$,axisSize:r.gridAxesSize$}).pipe(U(async A=>A)).subscribe(A=>{const M=aL({axisWidth:A.axisSize.width,groupAmount:A.computedData[0]?A.computedData[0].length:0,barAmountOfGroup:A.computedData.length,barPadding:A.params.barPadding,barGroupPadding:A.params.barGroupPadding});y.next(M)})}).pipe(R(i),K()),l=r.computedData$.pipe(R(i),O(y=>y.map((A,M)=>A[0]?A[0].seriesLabel:String(M)))),p=r.computedData$.pipe(R(i),O(y=>y[0]?y[0].map(A=>A.groupLabel):[])),d=new nt(y=>{q({seriesLabels:l,barWidth:h,params:r.fullParams$}).pipe(R(i),U(async A=>A)).subscribe(A=>{const M=uL(A.barWidth,A.seriesLabels,A.params);y.next(M)})}),g=r.fullChartParams$.pipe(R(i),O(y=>y.transitionDuration),K()),m=new nt(y=>{q({groupLabels:p,transitionDuration:g}).pipe(U(async A=>A)).subscribe(A=>{const M=sL(A.groupLabels.length,A.transitionDuration);y.next(M)})}).pipe(R(i),K()),b=new nt(y=>{q({groupLabels:p,transitionDuration:g}).pipe(U(async A=>A)).subscribe(A=>{const M=cL(A.groupLabels.length,A.transitionDuration);y.next(M)})}).pipe(R(i),K()),_=r.computedData$.pipe(R(i),O(y=>{const A=y.length,M=y.reduce((P,S)=>Math.max(P,S.length),0),$=new Array(M).fill(null).map(()=>new Array(A).fill(null));for(let P=0;P<A;P++)for(let S=0;S<M;S++)$[S][P]=y[P][S];return $})).pipe(R(i),O(y=>{const A=y.length?y[0].map(M=>ti(e,`lineargradient-${M.seriesLabel}`)):[];return y.map(M=>M.map(($,P)=>({linearGradientId:A[P],...$})))}));r.gridAxesSize$.pipe(R(i)).subscribe(y=>{const A=[{id:o,width:y.width,height:y.height}];hL({defsSelection:u,clipPathData:A})});const v=r.fullChartParams$.pipe(R(i),O(y=>y.highlightTarget),K());q({barData:_,computedData:r.computedData$,zeroY:f,groupLabels:p,barScale:d,params:r.fullParams$,chartParams:r.fullChartParams$,highlightTarget:v,barWidth:h,delayGroup:m,transitionItem:b,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$}).pipe(R(i),U(async y=>y)).subscribe(y=>{const A=lL({selection:c,barData:y.barData,zeroY:y.zeroY,groupLabels:y.groupLabels,barScale:y.barScale,params:y.params,chartParams:y.chartParams,barWidth:y.barWidth,delayGroup:y.delayGroup,transitionItem:y.transitionItem});fL({defsSelection:u,barData:y.barData,params:y.params}),A.on("mouseover",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.computedData})}).on("mousemove",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.computedData})}).on("mouseout",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.computedData})}).on("click",(M,$)=>{M.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:y.highlightTarget,datum:$,series:y.SeriesDataMap.get($.seriesLabel),seriesIndex:$.seriesIndex,seriesLabel:$.seriesLabel,groups:y.GroupDataMap.get($.groupLabel),groupIndex:$.groupIndex,groupLabel:$.groupLabel,event:M,data:y.computedData})}),s.next(A)});const w=r.gridHighlight$.subscribe();return q({pathSelection:s,highlight:r.gridHighlight$,fullChartParams:r.fullChartParams$}).pipe(R(i),U(async y=>y)).subscribe(y=>{pL({selection:y.pathSelection,ids:y.highlight,fullChartParams:y.fullChartParams})}),()=>{i.next(void 0),w.unsubscribe()}}),ws="Dots",gL=ft(ws,"g"),mL=ft(ws,"circle");function yL({selection:t,data:e,fullParams:n,fullChartParams:r,graphicOppositeScale:i}){const o=c=>{const s=c.size();return r.transitionDuration/s};let a=0;return t.selectAll("g").data(e,c=>c.id).join(c=>(a=o(c),c.append("g").classed(gL,!0)),c=>c,c=>c.remove()).attr("transform",c=>`translate(${c.axisX}, ${c.axisY})`).each((c,s,f)=>{j(f[s]).selectAll("circle").data([c]).join(h=>h.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(mL,!0).attr("opacity",0).transition().delay((l,p)=>s*a).attr("opacity",1),h=>h.transition().duration(50).attr("opacity",1),h=>h.remove()).attr("r",n.radius).attr("fill",(h,l)=>gh({datum:h,colorType:n.fillColorType,fullChartParams:r})).attr("stroke",(h,l)=>gh({datum:h,colorType:n.strokeColorType,fullChartParams:r})).attr("stroke-width",n.strokeWidth).attr("transform",`scale(${i[0]}, ${i[1]})`)})}function bL({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?j(a[o]).style("opacity",1).transition("highlight").duration(200):j(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function vL({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(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 xL=Pe(ws,Sh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new pt,o=ti(ws,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),u=a.append("defs"),c=a.append("g"),s=new pt;r.gridAxesTransform$.pipe(R(i),O(d=>d.value),K()).subscribe(d=>{a.style("transform",d)}),r.gridGraphicTransform$.pipe(R(i),U(async d=>d.value),K()).subscribe(d=>{c.transition().duration(50).style("transform",d)});const f=r.gridGraphicTransform$.pipe(R(i),O(d=>[1/d.scale[0],1/d.scale[1]]));r.gridAxesSize$.pipe(R(i),U(async d=>d)).subscribe(d=>{const g=[{id:o,width:d.width,height:d.height}];vL({defsSelection:u,clipPathData:g})});const h=r.fullChartParams$.pipe(R(i),O(d=>d.highlightTarget),K());q({computedData:r.computedData$,visibleComputedData:r.visibleComputedData$,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$,graphicOppositeScale:f,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$,highlightTarget:h}).pipe(R(i),U(async d=>d)).subscribe(d=>{const g=yL({selection:c,data:d.visibleComputedData.flat(),fullParams:d.fullParams,fullChartParams:d.fullChartParams,graphicOppositeScale:d.graphicOppositeScale});g.on("mouseover",(m,b)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:b,series:d.SeriesDataMap.get(b.seriesLabel),seriesIndex:b.seriesIndex,seriesLabel:b.seriesLabel,groups:d.GroupDataMap.get(b.groupLabel),groupIndex:b.groupIndex,groupLabel:b.groupLabel,event:m,data:d.computedData})}).on("mousemove",(m,b)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,data:d.computedData,datum:b,series:d.SeriesDataMap.get(b.seriesLabel),seriesIndex:b.seriesIndex,seriesLabel:b.seriesLabel,groups:d.GroupDataMap.get(b.groupLabel),groupIndex:b.groupIndex,groupLabel:b.groupLabel,event:m})}).on("mouseout",(m,b)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:b,series:d.SeriesDataMap.get(b.seriesLabel),seriesIndex:b.seriesIndex,seriesLabel:b.seriesLabel,groups:d.GroupDataMap.get(b.groupLabel),groupIndex:b.groupIndex,groupLabel:b.groupLabel,event:m,data:d.computedData})}).on("click",(m,b)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:b,series:d.SeriesDataMap.get(b.seriesLabel),seriesIndex:b.seriesIndex,seriesLabel:b.seriesLabel,groups:d.GroupDataMap.get(b.groupLabel),groupIndex:b.groupIndex,groupLabel:b.groupLabel,event:m,data:d.computedData})}),s.next(g)});const l=r.gridHighlight$.subscribe(),p=r.fullParams$.pipe(R(i),O(d=>d.onlyShowHighlighted),K());return r.fullChartParams$.pipe(R(i),U(d=>q({graphicSelection:s,highlight:r.gridHighlight$,onlyShowHighlighted:p,fullChartParams:r.fullChartParams$}).pipe(R(i),U(async g=>g)))).subscribe(d=>{bL({selection:d.graphicSelection,ids:d.highlight,onlyShowHighlighted:d.onlyShowHighlighted,fullChartParams:d.fullChartParams})}),()=>{l.unsubscribe(),i.next(void 0)}}),iv=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ft(t,"root-position"),u=ft(t,"legend-card"),c=ft(t,"legend-list"),s=ft(t,"legend-item"),f=new pt,h=r.pipe(R(f),O(w=>w.position==="bottom"||w.position==="top"?"row":"column")),l=q({fullParams:r,layout:i}).pipe(R(f),U(async w=>w),O(w=>{const y=w.fullParams.padding*2+w.fullParams.gap*2;return w.fullParams.position==="bottom"||w.fullParams.position==="top"?w.layout.rootWidth-y:w.layout.rootHeight-y})),d=q({layout:i,fullParams:r}).pipe(R(f),U(async w=>w),O(w=>{let y=0,A=0;return w.fullParams.position==="bottom"?(A=w.layout.rootHeight,w.fullParams.justify==="start"?y=0:w.fullParams.justify==="center"?y=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(y=w.layout.rootWidth)):w.fullParams.position==="right"?(y=w.layout.rootWidth,w.fullParams.justify==="start"?A=0:w.fullParams.justify==="center"?A=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(A=w.layout.rootHeight)):w.fullParams.position==="top"?(A=0,w.fullParams.justify==="start"?y=0:w.fullParams.justify==="center"?y=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(y=w.layout.rootWidth)):w.fullParams.position==="left"&&(y=0,w.fullParams.justify==="start"?A=0:w.fullParams.justify==="center"?A=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(A=w.layout.rootHeight)),{x:y,y:A}})).pipe(R(f),O(w=>e.selectAll(`g.${a}`).data([w]).join(y=>y.append("g").classed(a,!0).attr("transform",A=>`translate(${A.x}, ${A.y})`),y=>y.transition().attr("transform",A=>`translate(${A.x}, ${A.y})`),y=>y.remove()))),g=q({fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:h,lineMaxSize:l}).pipe(R(f),U(async w=>w),O(w=>w.seriesLabels.reduce((y,A,M)=>{const $=H2(A,w.fullChartParams.styles.textSize),P=w.fullChartParams.styles.textSize*1.5+$,S=RN(M,w.fullChartParams),L=y[0]&&y[0][0]?y[y.length-1][y[y.length-1].length-1]:null,{translateX:E,translateY:T,lineIndex:k,itemIndex:D}=((N,I,C)=>{let z=0,Y=0,W=0,st=0;if(N.lineDirection==="column"){let rt=C?C.translateY+N.fullChartParams.styles.textSize+N.fullParams.gap:0;if(rt+N.fullChartParams.styles.textSize>N.lineMaxSize){W=C.lineIndex+1,st=0,Y=0;const at=I[I.length-1].reduce((_t,ct)=>ct.itemWidth>_t?ct.itemWidth:_t,0);z=C.translateX+at+N.fullParams.gap}else W=C?C.lineIndex:0,st=C?C.itemIndex+1:0,Y=rt,z=C?C.translateX:0}else{let rt=C?C.translateX+C.itemWidth+N.fullParams.gap:0;rt+P>N.lineMaxSize?(W=C.lineIndex+1,st=0,z=0):(W=C?C.lineIndex:0,st=C?C.itemIndex+1:0,z=rt),Y=(N.fullChartParams.styles.textSize+N.fullParams.gap)*W}return{translateX:z,translateY:Y,lineIndex:W,itemIndex:st}})(w,y,L);return y[k]||(y[k]=[]),y[k].push({id:A,seriesLabel:A,seriesIndex:M,lineIndex:k,itemIndex:D,text:A,itemWidth:P,translateX:E,translateY:T,color:S}),console.log("items",y),y},[]))),m=q({fullParams:r,fullChartParams:o,lineDirection:h,lengendItems:g}).pipe(R(f),U(async w=>w),O(w=>{const{width:y,height:A}=((M,$)=>{let P=0,S=0;if(!$.length||!$[0].length)return{width:P,height:S};const L=$[0][$[0].length-1];return M.lineDirection==="column"?(P=$.reduce((E,T)=>{const k=T.reduce((D,N)=>N.itemWidth>D?N.itemWidth:D,0);return E+k},0),P+=M.fullParams.gap*($.length-1),S=L.translateY+M.fullChartParams.styles.textSize):(P=L.translateX+L.itemWidth,S=M.fullChartParams.styles.textSize*$.length+M.fullParams.gap*($.length-1)),{width:P,height:S}})(w,w.lengendItems);return{direction:w.lineDirection,width:y,height:A,translateX:w.fullParams.gap,translateY:w.fullParams.gap}})),b=q({fullParams:r,lengendList:m}).pipe(R(f),U(async w=>w),O(w=>{const y=w.lengendList.width+w.fullParams.gap*2,A=w.lengendList.height+w.fullParams.gap*2;let M=0,$=0;return w.fullParams.position==="left"?w.fullParams.justify==="start"?(M=w.fullParams.padding,$=w.fullParams.padding):w.fullParams.justify==="center"?(M=w.fullParams.padding,$=-A/2):w.fullParams.justify==="end"&&(M=w.fullParams.padding,$=-A-w.fullParams.padding):w.fullParams.position==="right"?w.fullParams.justify==="start"?(M=-y-w.fullParams.padding,$=w.fullParams.padding):w.fullParams.justify==="center"?(M=-y-w.fullParams.padding,$=-A/2):w.fullParams.justify==="end"&&(M=-y-w.fullParams.padding,$=-A-w.fullParams.padding):w.fullParams.position==="top"?w.fullParams.justify==="start"?(M=w.fullParams.padding,$=w.fullParams.padding):w.fullParams.justify==="center"?(M=-y/2,$=w.fullParams.padding):w.fullParams.justify==="end"&&(M=-y-w.fullParams.padding,$=w.fullParams.padding):w.fullParams.justify==="start"?(M=w.fullParams.padding,$=-A-w.fullParams.padding):w.fullParams.justify==="center"?(M=-y/2,$=-A-w.fullParams.padding):w.fullParams.justify==="end"&&(M=-y-w.fullParams.padding,$=-A-w.fullParams.padding),{width:y,height:A,translateX:M,translateY:$}})),x=q({rootPositionSelection:d,fullParams:r,fullChartParams:o,legendCard:b}).pipe(R(f),U(async w=>w),O(w=>w.rootPositionSelection.selectAll("g").data([w.legendCard]).join(y=>y.append("g").classed(u,!0).attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),y=>y.transition().attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),y=>y.remove()).each((y,A,M)=>{j(M[A]).selectAll("rect").data([y]).join("rect").attr("width",$=>$.width).attr("height",$=>$.height).attr("fill",Pt(w.fullParams.backgroundFill,w.fullChartParams)).attr("stroke",Pt(w.fullParams.backgroundStroke,w.fullChartParams))}))),_=q({lengendCardSelection:x,fullParams:r,lengendList:m}).pipe(R(f),U(async w=>w),O(w=>w.lengendCardSelection.selectAll("g").data([w.lengendList]).join(y=>y.append("g").classed(c,!0).attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),y=>y.transition().attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),y=>y.remove())));return q({lengendListSelection:_,fullParams:r,fullChartParams:o,lengendItems:g}).pipe(R(f),U(async w=>w),O(w=>{const y=w.lengendItems[0]?w.lengendItems.flat():[];return w.lengendListSelection.selectAll(`g.${s}`).data(y).join(A=>A.append("g").classed(s,!0).attr("cursor","default"),A=>A,A=>A.remove()).attr("transform",(A,M)=>`translate(${A.translateX}, ${A.translateY})`).each((A,M,$)=>{const P=w.fullChartParams.styles.textSize/2,S=w.fullParams.listRectWidth,L=w.fullParams.listRectHeight;j($[M]).selectAll("rect").data([A]).join("rect").attr("x",P).attr("y",P).attr("width",S).attr("height",L).attr("transform",`translate(${-S/2}, ${-L/2})`).attr("fill",E=>E.color).attr("rx",w.fullParams.listRectRadius),j($[M]).selectAll("text").data([A]).join(E=>E.append("text").attr("dominant-baseline","hanging"),E=>E,E=>E.remove()).attr("x",w.fullChartParams.styles.textSize*1.5).attr("font-size",w.fullChartParams.styles.textSize).text(E=>E.text)})})).subscribe(),()=>{f.next(void 0)}},ov="GridLegend",_L=Pe(ov,Ch)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new pt,o=n.SeriesDataMap$.pipe(R(i),O(u=>Array.from(u.keys()))),a=iv(ov,{rootSelection:e,seriesLabels$:o,fullParams$:n.fullParams$,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),a()}}),mh="GroupAxis",av=ft(mh,"xAxis"),uv=ft(mh,"groupingLabel"),yh=6;function wL({selection:t,params:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:u,contentTransform:c}){const s=t.selectAll(`g.${av}`).data([e]).join("g").classed(av,!0);t.selectAll(`g.${uv}`).data([e]).join("g").classed(uv,!0).each((l,p,d)=>{j(d[p]).selectAll("text").data([l]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(g=>o.groupAxis.label)}).attr("transform",l=>`translate(${i.width+l.tickPadding+e.labelOffset[0]}, ${-l.tickPadding-yh-e.labelOffset[1]})`);const f=s0(u).scale(u).tickSize(e.tickFullLine==!0?-i.height:yh).tickSizeOuter(0).tickFormat(l=>ys(l,e.tickFormat)).tickPadding(e.tickPadding),h=s.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),s.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`0 -${e.tickPadding+yh}`).style("transform",c),s}const AL=Pe(mh,Eh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new pt,o=t.append("g");n.gridAxesTransform$.pipe(R(i),O(f=>f.value),K()).subscribe(f=>{o.style("transform",f).attr("opacity",0).transition().attr("opacity",1)});const a=q({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(R(i),U(async f=>{const h=f.gridAxesOppositeTransform.rotate+f.fullParams.tickTextRotate;return`translate(${f.gridAxesOppositeTransform.translate[0]}px, ${f.gridAxesOppositeTransform.translate[1]}px) rotate(${h}deg) rotateX(${f.gridAxesOppositeTransform.rotateX}deg) rotateY(${f.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new nt(f=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(R(i),U(async h=>h)).subscribe(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[0]-h.fullDataFormatter.groupAxis.scalePadding,g=h.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?p+h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[1]+h.fullDataFormatter.groupAxis.scalePadding,m=h.computedData[0]?h.computedData[0].length:0;let b=h.fullDataFormatter.grid.seriesType==="row"?(h.computedData[0]??[]).map(w=>w.groupLabel):h.computedData.map(w=>w[0].groupLabel);const x=new Array(m).fill(0).map((w,y)=>b[y]!=null?b[y]:String(y)).filter((w,y)=>y>=d&&y<=g),_=h.fullDataFormatter.groupAxis.scalePadding,v=B2({axisLabels:x,axisWidth:h.gridAxesSize.width,padding:_});f.next(v)})}),c=n.fullDataFormatter$.pipe(R(i),O(f=>{let h="middle",l="hanging";return f.groupAxis.position==="bottom"?(h="middle",l="hanging"):f.groupAxis.position==="top"?(h="middle",l="auto"):f.groupAxis.position==="left"?(h="end",l="middle"):f.groupAxis.position==="right"&&(h="start",l="middle"),{textAnchor:h,dominantBaseline:l}})),s=n.fullDataFormatter$.pipe(R(i),O(f=>{let h="start",l="hanging";return f.groupAxis.position==="bottom"?l="hanging":f.groupAxis.position==="top"?l="auto":f.groupAxis.position==="left"?h="end":f.groupAxis.position==="right"&&(h="start"),f.valueAxis.position==="left"?h="start":f.valueAxis.position==="right"?h="end":f.valueAxis.position==="bottom"?l="auto":f.valueAxis.position==="top"&&(l="hanging"),{textAnchor:h,dominantBaseline:l}}));return q({params:n.fullParams$,tickTextAlign:c,axisLabelAlign:s,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,chartParams:n.fullChartParams$,groupScale:u,contentTransform:a}).pipe(R(i),U(async f=>f)).subscribe(f=>{wL({selection:o,params:f.params,tickTextAlign:f.tickTextAlign,axisLabelAlign:f.axisLabelAlign,gridAxesSize:f.gridAxesSize,fullDataFormatter:f.fullDataFormatter,chartParams:f.chartParams,groupScale:f.groupScale,contentTransform:f.contentTransform})}),()=>{i.next(void 0)}}),bh="ValueAxis",sv=ft(bh,"g"),cv=ft(bh,"text"),lv=6;function $L({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:u,contentTransform:c,minAndMax:s}){const f=t.selectAll(`g.${sv}`).data([e]).join("g").classed(sv,!0);t.selectAll(`g.${cv}`).data([e]).join("g").classed(cv,!0).each((g,m,b)=>{j(b[m]).selectAll("text").data([g]).join(x=>x.append("text").style("font-weight","bold"),x=>x,x=>x.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(x=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=s[1]-s[0],l=Is(u).scale(u).ticks(h>e.ticks?e.ticks:s[0]===0&&s[1]===0?1:Math.ceil(h)).tickFormat(g=>ys(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:lv).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+lv} 0`).style("transform",c),f}const ML=Pe(bh,As)(({selection:t,name:e,observer:n,subject:r})=>{const i=new pt,o=t.append("g");n.gridAxesTransform$.pipe(R(i),O(h=>h.value),K()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=q({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(R(i),U(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new nt(h=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(R(i),U(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,b=l.computedData.map((_,v)=>_.filter((w,y)=>y>=g&&y<=m)),x=IN(b.flat());h.next(x)})}),c=new nt(h=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:u}).pipe(R(i),U(async l=>l)).subscribe(l=>{const p=ph({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),s=n.fullDataFormatter$.pipe(R(i),O(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(R(i),O(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return q({fullParams:n.fullParams$,tickTextAlign:s,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:u}).pipe(R(i),U(async h=>h)).subscribe(h=>{$L({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),vh="ValueStackAxis",fv=ft(vh,"g"),hv=ft(vh,"text"),pv=6;function SL({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:u,contentTransform:c,minAndMax:s}){const f=t.selectAll(`g.${fv}`).data([e]).join("g").classed(fv,!0);t.selectAll(`g.${hv}`).data([e]).join("g").classed(hv,!0).each((g,m,b)=>{j(b[m]).selectAll("text").data([g]).join(x=>x.append("text").style("font-weight","bold"),x=>x,x=>x.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(x=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=s[1]-s[0],l=Is(u).scale(u).ticks(h>e.ticks?e.ticks:s[0]===0&&s[1]===0?1:Math.ceil(h)).tickFormat(g=>ys(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:pv).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+pv} 0`).style("transform",c),f}const TL=Pe(vh,Nh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new pt,o=t.append("g");n.gridAxesTransform$.pipe(R(i),O(h=>h.value),K()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=q({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(R(i),U(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),K()),u=new nt(h=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(R(i),U(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,b=l.computedData.map((v,w)=>v.filter((y,A)=>A>=g&&A<=m)),x=new Array(b[0]?b[0].length:0).fill(null).map((v,w)=>b.reduce((y,A)=>{if(A&&A[w]){const M=A[w].value==null||A[w].visible==!1?0:A[w].value;return y+M}return y},0)),_=X2(x);h.next(_)})}),c=new nt(h=>{q({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:u}).pipe(R(i),U(async l=>l)).subscribe(l=>{const p=ph({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),s=n.fullDataFormatter$.pipe(R(i),O(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(R(i),O(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return q({fullParams:n.fullParams$,tickTextAlign:s,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:u}).pipe(R(i),U(async h=>h)).subscribe(h=>{SL({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),dv="ScalingArea",PL=ft(dv,"rect"),DL=Pe(dv,Lh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new pt,a=e.insert("rect","g").classed(PL,!0).attr("opacity",0);let u={k:1,x:0,y:0};r.layout$.pipe(R(o)).subscribe(s=>{a.attr("width",s.width).attr("height",s.height).attr("x",s.left).attr("y",s.top)});const c=r.computedData$.pipe(O(s=>s[0]?s[0].length-1:0),K());return q({initGroupAxis:r.fullDataFormatter$.pipe(O(s=>s.groupAxis),so()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:c,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(R(o),U(async s=>s)).subscribe(s=>{const h=s.groupMaxIndex,l=s.initGroupAxis.scaleDomain[0]==="auto"?0-s.initGroupAxis.scalePadding:s.initGroupAxis.scaleDomain[0]-s.initGroupAxis.scalePadding,p=s.initGroupAxis.scaleDomain[1]==="auto"?h+s.initGroupAxis.scalePadding:s.initGroupAxis.scaleDomain[1]+s.initGroupAxis.scalePadding,d=s.fullDataFormatter.valueAxis.position==="left"||s.fullDataFormatter.valueAxis.position==="top"?[0,1]:[1,0],m=ph({maxValue:s.groupMaxIndex,minValue:0,axisWidth:s.axisSize.width,scaleDomain:[l,p],scaleRange:d}).copy(),b=Ny().on("zoom",function(_){const v=_.transform,w=A=>{const M=Math.round(A);return Math.min(h,Math.max(0,M))},y=s.fullDataFormatter.groupAxis.position==="bottom"||s.fullDataFormatter.groupAxis.position==="top"?v.rescaleX(m).domain().map(w):v.rescaleY(m).domain().map(w);y[0]<=0&&y[1]>=h?v.k<u.k&&(v.k=u.k,v.x=u.x,v.y=u.y):y[1]-y[0]<=1&&v.k>u.k&&(v.k=u.k,v.x=u.x,v.y=u.y),u.k=v.k,u.x=v.x,u.y=v.y,i.dataFormatter$.next({...s.fullDataFormatter,groupAxis:{...s.fullDataFormatter.groupAxis,scaleDomain:y}})});e.call(b)}),()=>{o.next(void 0),a.remove()}});function kL(t,e){let n=new nt(()=>{});return t.each(function(){const r=Ff(this,e);n=zf(n,r)}),n}const xh="GroupArea",_h=ft(xh,"label-box");function EL({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function NL({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ft(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),u=a.enter().append("line").classed(o,!0).style("stroke",s=>Pt(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),c=a.merge(u);return a.exit().remove(),u.attr("x1",s=>s.x1).attr("y1",s=>s.y1).attr("x2",s=>s.x2).attr("y2",s=>s.y2),a.transition().duration(50).attr("x1",s=>s.x1).attr("y1",s=>s.y1).attr("x2",s=>s.x2).attr("y2",s=>s.y2),c}function LL(t){t.selectAll("line").data([]).exit().remove()}function CL({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:ys(t,n.labelTextFormat)}]:[]}function IL({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesOppositeTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${_h}`).data(e),u=a.enter().append("g").classed(_h,!0).style("cursor","pointer"),c=u.merge(a);return u.attr("transform",(s,f)=>`translate(${s.x}, ${s.y})`),a.transition().duration(50).attr("transform",(s,f)=>`translate(${s.x}, ${s.y})`),a.exit().remove(),c.each((s,f,h)=>{const l=H2(s.text,r.styles.textSize)+12,p=-l/2,d=j(h[f]).selectAll("rect").data([s]),g=d.enter().append("rect").attr("height",`${o}px`).attr("fill",x=>Pt(n.labelColorType,r)).attr("x",p).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");d.merge(g).attr("width",x=>`${l}px`).style("transform",i),d.exit().remove();const m=j(h[f]).selectAll("text").data([s]),b=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(b).text(x=>x.text).style("transform",i).attr("fill",x=>Pt(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",p+6),m.exit().remove()}),c}function RL(t){t.selectAll(`g.${_h}`).data([]).exit().remove()}const FL=Pe(xh,Th)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new pt,a=e.insert("rect","g").classed(ft(xh,"rect"),!0).attr("opacity",0),u=t.append("g");i.layout$.pipe(R(o)).subscribe(l=>{a.attr("width",l.rootWidth).attr("height",l.rootHeight)}),i.gridAxesTransform$.pipe(R(o),O(l=>l.value),K()).subscribe(l=>{u.style("transform",l)});const c=new nt(l=>{q({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(R(o),U(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[0]-p.fullDataFormatter.groupAxis.scalePadding,b=p.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[1]+p.fullDataFormatter.groupAxis.scalePadding,x=p.computedData[0]?p.computedData[0].length:0;let _=p.fullDataFormatter.grid.seriesType==="row"?(p.computedData[0]??[]).map(A=>A.groupLabel):p.computedData.map(A=>A[0].groupLabel);const v=new Array(x).fill(0).map((A,M)=>_[M]!=null?_[M]:String(M)).filter((A,M)=>M>=m&&M<=b),w=p.fullDataFormatter.groupAxis.scalePadding,y=B2({axisLabels:v,axisWidth:p.gridAxesSize.width,padding:w});l.next(y)})}),s=V2({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),f=i.fullChartParams$.pipe(R(o),O(l=>l.highlightTarget),K());return q({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:s,groupScale:c}).pipe(R(o),U(async l=>l)).subscribe(l=>{e.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})})}),q({event:r.event$.pipe(Bu(l=>l.eventName==="mouseover"||l.eventName==="mousemove")),computedData:i.computedData$,groupScale:c,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,gridAxesOppositeTransform:i.gridAxesOppositeTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:s}).pipe(R(o),U(async l=>l)).subscribe(l=>{const p=l.groupScale(l.event.groupLabel)??0,d=EL({groupLabel:l.event.groupLabel,axisX:p,axisHeight:l.gridAxesSize.height,fullParams:l.fullParams});NL({selection:u,pluginName:n,lineData:d,fullParams:l.fullParams,fullChartParams:l.fullChartParams});const g=CL({groupLabel:l.event.groupLabel,axisX:p,fullParams:l.fullParams});IL({selection:u,labelData:g,fullParams:l.fullParams,fullChartParams:l.fullChartParams,gridAxesOppositeTransformValue:l.gridAxesOppositeTransform.value}).on("mouseover",(b,x)=>{const{groupIndex:_,groupLabel:v}=l.gridGroupPositionFn(b);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:_,groupLabel:v,event:b,data:l.computedData})}).on("mousemove",(b,x)=>{const{groupIndex:_,groupLabel:v}=l.gridGroupPositionFn(b);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:_,groupLabel:v,event:b,data:l.computedData})}).on("mouseout",(b,x)=>{const{groupIndex:_,groupLabel:v}=l.gridGroupPositionFn(b);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:_,groupLabel:v,event:b,data:l.computedData})}).on("click",(b,x)=>{const{groupIndex:_,groupLabel:v}=l.gridGroupPositionFn(b);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:_,groupLabel:v,event:b,data:l.computedData})})}),kL(a,"mouseout").pipe(R(o)).subscribe(l=>{console.log("rootMouseout"),LL(u),RL(u)}),()=>{o.next(void 0),a.remove()}}),gv={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},mv={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(r=>r.value).join(",");return[e,n]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.groups.map(r=>r.value).join(",");return[e,n]}return[]},svgRenderFn:null},zL=q2("Container",gv)(({selection:t})=>function(){}),wh="Tooltip",yv=ft(wh,"g"),OL=ft(wh,"box");function GL(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function UL({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const u=5,c=i?[i]:[],s=i?[o]:[],h=t.selectAll(`g.${yv}`).data(c).join(v=>v.append("g").classed(yv,!0).attr("pointer-events","none"),v=>v,v=>v.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${OL}`).data(s).join(v=>v.append("g").classed(ft(e,"box"),!0)),l=h.selectAll("rect").data(s).join(v=>v.append("rect").attr("rx",u).attr("ry",u)).attr("fill",v=>v.backgroundColor).attr("stroke",v=>v.strokeColor).attr("opacity",v=>v.backgroundOpacity),p=h.selectAll("g").data(c).join(v=>v.append("g").classed(ft(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));c.length&&CN(p,c[0]);const d=p!=null&&p.node()?W2(p):{width:0,height:0};l.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?W2(h):{width:0,height:0},m=n-g.width,b=r-g.height,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],_=a.offsetY+o.offset[1]>b?b-a.offsetY:o.offset[1];h.attr("transform",v=>`translate(${x}, ${_})`),h.attr("transform",v=>`translate(${x}, ${_})`)}const YL=q2(wh,mv)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new pt,u=o.event$.pipe(R(a),Bu(d=>d.eventName==="mouseover"||d.eventName==="mousemove")),c=o.event$.pipe(R(a),Bu(d=>d.eventName==="mouseout")),s=q({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(R(a),U(async d=>d),O(d=>({backgroundColor:Pt(d.fullParams.backgroundColorType,d.fullChartParams),backgroundOpacity:d.fullParams.backgroundOpacity,strokeColor:Pt(d.fullParams.strokeColorType,d.fullChartParams),offset:d.fullParams.offset,padding:d.fullParams.padding,textSize:d.fullChartParams.styles.textSize,textColor:Pt(d.fullParams.textColorType,d.fullChartParams)}))),f=q({fullParams:i.fullParams$,tooltipStyle:s}).pipe(R(a),U(async d=>d),O(d=>d.fullParams.svgRenderFn?d.fullParams.svgRenderFn:g=>{const m=d.fullParams.textRenderFn(g);return GL(m,d.tooltipStyle)})),h=q({event:u,contentRenderFn:f}).pipe(R(a),U(async d=>d),O(d=>d.contentRenderFn(d.event))),l=c.pipe(R(a),O(d=>"")),p=zf(u,c).pipe(R(a),O(d=>d.event));return q({svgString:zf(h,l),event:p,layout:i.layout$,tooltipStyle:s}).pipe(R(a),U(async d=>d)).subscribe(d=>{UL({rootSelection:e,pluginName:n,rootWidth:d.layout.rootWidth,rootHeight:d.layout.rootHeight,svgString:d.svgString,tooltipStyle:d.tooltipStyle,event:d.event})}),function(){a.next(void 0)}}),bv={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},vv={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},xv={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},_v={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},wv={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function BL(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function u(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function c(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function s(p){const d=c(p.trim());return Math.sqrt(d*r)}function f(p,d){let g={width:0,text:""},m=1/0;const b=[];let x=" ";i&&(x="");for(let _=0,v=p.length;_<v;++_){const w=(g.text?g.text+x:"")+p[_],y=c(w);(m+y)/2<d?(g.width=m=y,g.text=w):(m=c(p[_]),g={width:m,text:p[_]},b.push(g))}return b}function h(p){let d=0;for(let g=0,m=p.length;g<m;++g){const b=(Math.abs(g-m/2+.5)+.5)*r,x=p[g].width/2;d=Math.max(d,Math.sqrt(x**2+b**2))}return d}function l(p,d){o>0&&(d=u(d,o));const g=a(d),m=s(d),b=f(g,m),x=h(b);let _=p.select("text");_.size()||(_=p.append("text")),_.attr("transform",`translate(0,0) scale(${n/x})`);const v=_.selectAll("tspan").data(b),w=v.enter().append("tspan").attr("x",0).merge(v).attr("y",(y,A)=>(A-b.length/2+.8)*r).text(y=>y.text);return v.exit().remove(),v.merge(w)}return l(t,e)}let nr;function qL(t,e){return ad().velocityDecay(e.force.velocityDecay).force("collision",rd().radius(n=>n.r+e.force.collisionSpacing)).force("charge",ud().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function WL({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,u=n*a;return Math.pow(u/Math.PI,.5)*.75}function HL({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(p=>p.value!=null&&p.visible!=!1),u=Math.max(...a.map(p=>p.value)),c=a.reduce((p,d)=>p+(d.value??0),0)/a.length,s=WL({data:a,bubbleGroupR:o,maxValue:u,avgValue:c}),f=i==="area"?.5:1,h=hu().domain([0,u]).range([0,s]).exponent(f);return a.map(p=>{const d=p,g=e.get(p.id);g?(d.x=g.x,d.y=g.y):(d.x=Math.random()*n,d.y=Math.random()*r);const m=h(d.value??0);return d.r=m,d._originR=m,d})}function Av({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,u,c)=>{const s=j(c[u]);let f=!0;a.label.length<=n.bubbleText.lineLengthMin&&(f=!1),s.call(BL,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:f})}),o}function XL({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function VL(){return x0().on("start",(t,e)=>{t.active||nr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||nr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function $v({fullParams:t,graphicWidth:e,graphicHeight:n}){nr.force("x",sd().strength(t.force.strength).x(0)).force("y",cd().strength(t.force.strength).y(0)),nr.alpha(1).restart()}function jL({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=j(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(fa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const ZL=Mo("Bubbles",bv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new pt,o=t.append("g"),a=new pt;let u=new Map;n.layout$.pipe(so()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(R(i)).subscribe(l=>{t.transition().attr("transform",`translate(${l.width/2}, ${l.height/2})`)})});const c=n.fullParams$.pipe(R(i),O(h=>h.bubbleScaleType),K()),s=new nt(h=>{q({layout:n.layout$,computedData:n.computedData$,scaleType:c}).pipe(R(i),U(async l=>l)).subscribe(l=>{const p=HL({data:l.computedData,LastBubbleDataMap:u,graphicWidth:l.layout.width,graphicHeight:l.layout.height,scaleType:l.scaleType});h.next(p)})});s.subscribe(h=>{u=new Map(h.map(l=>[l.id,l]))});const f=n.fullChartParams$.pipe(R(i),O(h=>h.highlightTarget),K());return q({layout:n.layout$,computedData:n.computedData$,bubblesData:s,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:f}).pipe(R(i),U(async h=>h)).subscribe(h=>{const l=Av({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});nr=qL(l,h.fullParams),l.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).call(VL()),nr.nodes(h.bubblesData),$v({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(l)}),q({bubblesSelection:a,bubblesData:s,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(R(i),U(async h=>h)).subscribe(h=>{jL({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(XL({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),Av({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),$v({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),nr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function Mv({computedDataSeries:t,startAngle:e,endAngle:n}){return Wm().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let u=o;return u.id=o.data.id,u})}const Sv="Pie",KL=ft(Sv,"path");function QL({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((u,c)=>{const s=r[c]??{startAngle:0,endAngle:0,value:0};return{...u,startAngle:u.startAngle*o+s.startAngle*(1-o),endAngle:u.endAngle*o+s.endAngle*(1-o),value:u.value*o+s.value*(1-o)}});return Ah(a,i.startAngle,i.endAngle,1)}:o=>Ah(n,i.startAngle,i.endAngle,o)}function Ah(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,u=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:u}})}function Tv({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,u=>u.id),i=r.enter().append("path").classed(KL,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(u,c)=>u.data.color).attr("d",(u,c)=>n(u)),o.remove(),a}function JL({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,u)=>{const c=j(u[a]);e.includes(o.data.id)?c.style("opacity",1).transition("highlight").ease(fa).duration(500).attr("d",s=>i(s)):c.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",s=>r(s))})}const tC=Mo(Sv,vv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new pt,o=t.append("g"),a=new pt;let u=[],c=[];n.layout$.pipe(so()).subscribe(d=>{t.attr("transform",`translate(${d.width/2}, ${d.height/2})`),n.layout$.pipe(R(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const s=n.layout$.pipe(R(i),O(d=>d.width<d.height?d.width:d.height)),f=new nt(d=>{q({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(R(i),U(async g=>g)).subscribe(g=>{const m=Mv({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});d.next(m)})}),h=new nt(d=>{q({shorterSideWith:s,fullParams:n.fullParams$}).pipe(R(i),U(async g=>g)).subscribe(g=>{const m=ms({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),l=new nt(d=>{q({shorterSideWith:s,fullParams:n.fullParams$}).pipe(R(i),U(async g=>g)).subscribe(g=>{const m=ms({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),p=n.fullChartParams$.pipe(R(i),O(d=>d.highlightTarget),K());return q({pieData:f,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:l,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:p}).pipe(R(i),U(async d=>d)).subscribe(d=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(d.pieData,_=>_.data.id),m=g.enter(),b=g.exit();const x=QL({enter:m,exit:b,data:d.pieData,lastData:u,fullParams:d.fullParams});o.transition("graphicMove").duration(d.fullChartParams.transitionDuration).ease(Jr(d.fullChartParams.transitionEase)).tween("move",(_,v)=>w=>{c=x(w),Tv({selection:o,renderData:c,arc:d.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData})}).on("end",(_,v)=>{c=Ah(d.pieData,d.fullParams.startAngle,d.fullParams.endAngle,1);const w=Tv({selection:o,renderData:c,arc:d.arc});a.next(w),u=Object.assign([],d.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData}),w.on("mouseover",(y,A)=>{y.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:A.data,series:d.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:y,data:d.computedData})}).on("mousemove",(y,A)=>{y.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,datum:A.data,series:d.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:y,data:d.computedData})}).on("mouseout",(y,A)=>{y.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:A.data,series:d.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:y,data:d.computedData})}).on("click",(y,A)=>{y.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:A.data,series:d.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:y,data:d.computedData})})})}),q({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:l}).pipe(R(i),U(async d=>d)).subscribe(d=>{JL({pathSelection:d.pathSelection,ids:d.highlight,fullChartParams:d.fullChartParams,arc:d.arc,arcMouseover:d.arcMouseover})}),()=>{i.next(void 0)}}),Pv="PieEventTexts",Dv=ft(Pv,"text");function $h(t,e){const n=t.selectAll(`text.${Dv}`).data(e),r=n.enter().append("text").classed(Dv,!0),i=n.merge(r);return i.each((o,a,u)=>{const c=j(u[a]).text(o.text);Object.keys(o.attr).forEach(s=>{c.attr(s,o.attr[s])}),Object.keys(o.style).forEach(s=>{c.style(s,o.style[s])})}),n.exit().remove(),i}function Mh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((u,c)=>({text:u,attr:i[c],style:o[c]}))}const eC=Mo(Pv,xv)(({selection:t,name:e,observer:n,subject:r})=>{const i=new pt,o=t.append("g");let a;n.layout$.pipe(so()).subscribe(c=>{t.attr("transform",`translate(${c.width/2}, ${c.height/2})`),n.layout$.pipe(R(i)).subscribe(s=>{t.transition().attr("transform",`translate(${s.width/2}, ${s.height/2})`)})});const u=n.fullChartParams$.pipe(R(i),O(c=>c.highlightTarget),K());return q({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:u}).pipe(R(i),U(async c=>c)).subscribe(c=>{o.transition().duration(c.fullChartParams.transitionDuration).ease(Jr(c.fullChartParams.transitionEase)).tween("move",(s,f)=>h=>{const l=Mh({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:s,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});$h(o,l)}).on("end",(s,f)=>{const h=Mh({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:s,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});$h(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(l=>{const p=Mh({eventData:l,eventName:l.eventName,t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});$h(o,p)})})}),()=>{i.next(void 0)}}),kv="PieLabels",nC=ft(kv,"text");function rC(t,e,n,r){return t.map((i,o)=>{const[a,u]=e.centroid(i),[c,s]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:u*r,mouseoverX:c*r,mouseoverY:s*r}}).filter(i=>i.pieDatum.data.visible)}function iC(t,e,n,r){let i=t.selectAll("text").data(e,c=>c.pieDatum.id),o=i.enter().append("text").classed(nC,!0),a=i.exit();o.append("text");const u=i.merge(o);return u.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",c=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(c=>n.labelFn(c.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(c,s)=>gh({datum:c.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",c=>"translate("+c.x+","+c.y+")"),a.remove(),u}function oC({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=j(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",u=>"translate("+u.mouseoverX+","+u.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",u=>"translate("+u.x+","+u.y+")")})}const aC=Mo(kv,_v)(({selection:t,observer:e,subject:n})=>{const r=new pt,i=t.append("g");let o=new pt,a=[];return e.layout$.pipe(so()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),e.layout$.pipe(R(r)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})}),q({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(R(r),U(async u=>u)).subscribe(u=>{const c=u.layout.width<u.layout.height?u.layout.width:u.layout.height,s=ms({axisWidth:c,innerRadius:0,outerRadius:u.fullParams.outerRadius,padAngle:0,cornerRadius:0}),f=ms({axisWidth:c,innerRadius:0,outerRadius:u.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=Mv({computedDataSeries:u.computedData,startAngle:u.fullParams.startAngle,endAngle:u.fullParams.endAngle});a=rC(h,s,f,u.fullParams.labelCentroid);const l=iC(i,a,u.fullParams,u.fullChartParams);o.next(l)}),q({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(R(r),U(async u=>u)).subscribe(u=>{oC({labelSelection:u.labelSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{r.next(void 0)}}),Ev="SeriesLegend",uC=Mo(Ev,wv)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new pt,o=n.SeriesDataMap$.pipe(R(i),O(u=>Array.from(u.keys()))),a=iv(Ev,{rootSelection:e,seriesLabels$:o,fullParams$:n.fullParams$,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),a()}});et.BarStack=oL,et.Bars=QN,et.BarsTriangle=dL,et.Bubbles=ZL,et.CONTAINER_PLUGIN_PARAMS=gv,et.Container=zL,et.DEFAULT_BARS_PLUGIN_PARAMS=Ph,et.DEFAULT_BARS_TRIANGLE_PLUGIN_PARAMS=kh,et.DEFAULT_BAR_STACK_PLUGIN_PARAMS=Dh,et.DEFAULT_BUBBLES_PLUGIN_PARAMS=bv,et.DEFAULT_DOTS_PLUGIN_PARAMS=Sh,et.DEFAULT_GRID_LEGEND_PARAMS=Ch,et.DEFAULT_GROUPING_AXIS_PLUGIN_PARAMS=Eh,et.DEFAULT_GROUP_AREA_PLUGIN_PARAMS=Th,et.DEFAULT_LINES_PLUGIN_PARAMS=rr,et.DEFAULT_PIE_EVENT_TEXTS_PARAMS=xv,et.DEFAULT_PIE_LABELS_PARAMS=_v,et.DEFAULT_PIE_PLUGIN_PARAMS=vv,et.DEFAULT_SCALING_AREA_PLUGIN_PARAMS=Lh,et.DEFAULT_SERIES_LEGEND_PARAMS=wv,et.DEFAULT_VALUE_AXIS_PLUGIN_PARAMS=As,et.DEFAULT_VALUE_STACK_AXIS_PLUGIN_PARAMS=Nh,et.Dots=xL,et.GridLegend=_L,et.GroupArea=FL,et.GroupAxis=AL,et.Lines=qN,et.Pie=tC,et.PieEventTexts=eC,et.PieLabels=aC,et.ScalingArea=DL,et.SeriesLegend=uC,et.TOOLTIP_PARAMS=mv,et.Tooltip=YL,et.ValueAxis=ML,et.ValueStackAxis=TL,Object.defineProperty(et,Symbol.toStringTag,{value:"Module"})});
12
+ `),r.exit().remove()}function wL({defsSelection:t,clipPathData:e}){const n=t.selectAll("clipPath").data(e),r=n.enter().append("clipPath");n.merge(r).attr("id",i=>i.id),n.exit().remove(),n.merge(r).each((i,o,a)=>{const s=Z(a[o]).selectAll("rect").data([i]),c=s.enter().append("rect");s.merge(c).attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s.exit().remove()})}function AL({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const ML=(t,{selection:e,computedData$:n,SeriesDataMap$:r,GroupDataMap$:i,fullParams$:o,fullChartParams$:a,gridAxesTransform$:s,gridGraphicTransform$:c,gridAxesSize$:u,gridHighlight$:f,event$:h})=>{const l=new ft,p=ti(t,"clipPath-box"),d=e.append("g").attr("clip-path",`url(#${p})`),g=d.append("defs"),m=d.append("g"),y=new ft;s.pipe(R(l),G(M=>M.value),J()).subscribe(M=>{d.style("transform",M)}),c.pipe(R(l),Y(async M=>M.value),J()).subscribe(M=>{m.transition().duration(50).style("transform",M)});const _=n.pipe(G(M=>M[0]&&M[0][0]?M[0][0].axisY-M[0][0].axisYFromZero:0),J()),v=new at(M=>{H({computedData:n,params:o,axisSize:u}).pipe(Y(async $=>$)).subscribe($=>{const w=mL({axisWidth:$.axisSize.width,groupAmount:$.computedData[0]?$.computedData[0].length:0,barAmountOfGroup:$.computedData.length,barPadding:$.params.barPadding,barGroupPadding:$.params.barGroupPadding});M.next(w)})}).pipe(R(l),J()),b=n.pipe(R(l),G(M=>M.map(($,w)=>$[0]?$[0].seriesLabel:String(w)))),x=n.pipe(R(l),G(M=>M[0]?M[0].map($=>$.groupLabel):[])),A=new at(M=>{H({seriesLabels:b,barWidth:v,params:o}).pipe(R(l),Y(async $=>$)).subscribe($=>{const w=yL($.barWidth,$.seriesLabels,$.params);M.next(w)})}),T=a.pipe(R(l),G(M=>M.transitionDuration),J()),D=new at(M=>{H({groupLabels:x,transitionDuration:T}).pipe(Y(async $=>$)).subscribe($=>{const w=bL($.groupLabels.length,$.transitionDuration);M.next(w)})}).pipe(R(l),J()),k=new at(M=>{H({groupLabels:x,transitionDuration:T}).pipe(Y(async $=>$)).subscribe($=>{const w=vL($.groupLabels.length,$.transitionDuration);M.next(w)})}).pipe(R(l),J()),S=n.pipe(R(l),G(M=>{const $=M.length,w=M.reduce((I,L)=>Math.max(I,L.length),0),P=new Array(w).fill(null).map(()=>new Array($).fill(null));for(let I=0;I<$;I++)for(let L=0;L<w;L++)P[L][I]=M[I][L];return P})).pipe(R(l),G(M=>{const $=M.length?M[0].map(w=>ti(t,`lineargradient-${w.seriesLabel}`)):[];return M.map(w=>w.map((P,I)=>({linearGradientId:$[I],...P})))}));u.pipe(R(l)).subscribe(M=>{const $=[{id:p,width:M.width,height:M.height}];wL({defsSelection:g,clipPathData:$})});const C=a.pipe(R(l),G(M=>M.highlightTarget),J());H({barData:S,computedData:n,zeroY:_,groupLabels:x,barScale:A,params:o,chartParams:a,highlightTarget:C,barWidth:v,delayGroup:D,transitionItem:k,SeriesDataMap:r,GroupDataMap:i}).pipe(R(l),Y(async M=>M)).subscribe(M=>{const $=xL({selection:m,barData:M.barData,zeroY:M.zeroY,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,delayGroup:M.delayGroup,transitionItem:M.transitionItem});_L({defsSelection:g,barData:M.barData,params:M.params}),$.on("mouseover",(w,P)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:P,series:M.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:M.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:w,data:M.computedData})}).on("mousemove",(w,P)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:P,series:M.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:M.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:w,data:M.computedData})}).on("mouseout",(w,P)=>{w.stopPropagation(),h.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:P,series:M.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:M.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:w,data:M.computedData})}).on("click",(w,P)=>{w.stopPropagation(),h.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:P,series:M.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:M.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:w,data:M.computedData})}),y.next($)});const N=f.subscribe();return H({pathSelection:y,highlight:f,fullChartParams:a}).pipe(R(l),Y(async M=>M)).subscribe(M=>{AL({selection:M.pathSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{l.next(void 0),N.unsubscribe()}},l2="BarsTriangle",$L=we(l2,Th)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ft,o=ML(l2,{selection:t,computedData$:r.computedData$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,event$:n.event$});return()=>{i.next(void 0),o()}}),xu="Dots",SL=lt(xu,"g"),TL=lt(xu,"circle");function PL({selection:t,data:e,fullParams:n,fullChartParams:r,graphicOppositeScale:i}){const o=c=>{const u=c.size();return r.transitionDuration/u};let a=0;return t.selectAll("g").data(e,c=>c.id).join(c=>(a=o(c),c.append("g").classed(SL,!0)),c=>c,c=>c.remove()).attr("transform",c=>`translate(${c.axisX}, ${c.axisY})`).each((c,u,f)=>{Z(f[u]).selectAll("circle").data([c]).join(h=>h.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(TL,!0).attr("opacity",0).transition().delay((l,p)=>u*a).attr("opacity",1),h=>h.transition().duration(50).attr("opacity",1),h=>h.remove()).attr("r",n.radius).attr("fill",(h,l)=>hh({datum:h,colorType:n.fillColorType,fullChartParams:r})).attr("stroke",(h,l)=>hh({datum:h,colorType:n.strokeColorType,fullChartParams:r})).attr("stroke-width",n.strokeWidth).attr("transform",`scale(${i[0]}, ${i[1]})`)})}function DL({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function kL({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(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 EL=we(xu,Ah)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ft,o=ti(xu,"clipPath-box"),a=t.append("g").attr("clip-path",`url(#${o})`),s=a.append("defs"),c=a.append("g"),u=new ft;r.gridAxesTransform$.pipe(R(i),G(d=>d.value),J()).subscribe(d=>{a.style("transform",d)}),r.gridGraphicTransform$.pipe(R(i),Y(async d=>d.value),J()).subscribe(d=>{c.transition().duration(50).style("transform",d)});const f=r.gridGraphicTransform$.pipe(R(i),G(d=>[1/d.scale[0],1/d.scale[1]]));r.gridAxesSize$.pipe(R(i),Y(async d=>d)).subscribe(d=>{const g=[{id:o,width:d.width,height:d.height}];kL({defsSelection:s,clipPathData:g})});const h=r.fullChartParams$.pipe(R(i),G(d=>d.highlightTarget),J());H({computedData:r.computedData$,visibleComputedData:r.visibleComputedData$,SeriesDataMap:r.SeriesDataMap$,GroupDataMap:r.GroupDataMap$,graphicOppositeScale:f,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$,highlightTarget:h}).pipe(R(i),Y(async d=>d)).subscribe(d=>{const g=PL({selection:c,data:d.visibleComputedData.flat(),fullParams:d.fullParams,fullChartParams:d.fullChartParams,graphicOppositeScale:d.graphicOppositeScale});g.on("mouseover",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}).on("mousemove",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,data:d.computedData,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m})}).on("mouseout",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}).on("click",(m,y)=>{m.stopPropagation(),n.event$.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:y,series:d.SeriesDataMap.get(y.seriesLabel),seriesIndex:y.seriesIndex,seriesLabel:y.seriesLabel,groups:d.GroupDataMap.get(y.groupLabel),groupIndex:y.groupIndex,groupLabel:y.groupLabel,event:m,data:d.computedData})}),u.next(g)});const l=r.gridHighlight$.subscribe(),p=r.fullParams$.pipe(R(i),G(d=>d.onlyShowHighlighted),J());return r.fullChartParams$.pipe(R(i),Y(d=>H({graphicSelection:u,highlight:r.gridHighlight$,onlyShowHighlighted:p,fullChartParams:r.fullChartParams$}).pipe(R(i),Y(async g=>g)))).subscribe(d=>{DL({selection:d.graphicSelection,ids:d.highlight,onlyShowHighlighted:d.onlyShowHighlighted,fullChartParams:d.fullChartParams})}),()=>{l.unsubscribe(),i.next(void 0)}}),f2=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=lt(t,"root-position"),s=lt(t,"legend-card"),c=lt(t,"legend-list"),u=lt(t,"legend-item"),f=new ft,h=r.pipe(R(f),G(x=>x.position==="bottom"||x.position==="top"?"row":"column")),l=H({fullParams:r,layout:i}).pipe(R(f),Y(async x=>x),G(x=>{const A=x.fullParams.padding*2+x.fullParams.gap*2;return x.fullParams.position==="bottom"||x.fullParams.position==="top"?x.layout.rootWidth-A:x.layout.rootHeight-A})),d=H({layout:i,fullParams:r}).pipe(R(f),Y(async x=>x),G(x=>{let A=0,T=0;return x.fullParams.position==="bottom"?(T=x.layout.rootHeight,x.fullParams.justify==="start"?A=0:x.fullParams.justify==="center"?A=x.layout.rootWidth/2:x.fullParams.justify==="end"&&(A=x.layout.rootWidth)):x.fullParams.position==="right"?(A=x.layout.rootWidth,x.fullParams.justify==="start"?T=0:x.fullParams.justify==="center"?T=x.layout.rootHeight/2:x.fullParams.justify==="end"&&(T=x.layout.rootHeight)):x.fullParams.position==="top"?(T=0,x.fullParams.justify==="start"?A=0:x.fullParams.justify==="center"?A=x.layout.rootWidth/2:x.fullParams.justify==="end"&&(A=x.layout.rootWidth)):x.fullParams.position==="left"&&(A=0,x.fullParams.justify==="start"?T=0:x.fullParams.justify==="center"?T=x.layout.rootHeight/2:x.fullParams.justify==="end"&&(T=x.layout.rootHeight)),{x:A,y:T}})).pipe(R(f),G(x=>e.selectAll(`g.${a}`).data([x]).join(A=>A.append("g").classed(a,!0).attr("transform",T=>`translate(${T.x}, ${T.y})`),A=>A.transition().attr("transform",T=>`translate(${T.x}, ${T.y})`),A=>A.remove()))),g=H({fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:h,lineMaxSize:l}).pipe(R(f),Y(async x=>x),G(x=>x.seriesLabels.reduce((A,T,D)=>{const k=Yv(T,x.fullChartParams.styles.textSize),E=x.fullChartParams.styles.textSize*1.5+k,S=WN(D,x.fullChartParams),C=A[0]&&A[0][0]?A[A.length-1][A[A.length-1].length-1]:null,{translateX:N,translateY:M,lineIndex:$,itemIndex:w}=((P,I,L)=>{let F=0,z=0,U=0,tt=0;if(P.lineDirection==="column"){let K=L?L.translateY+P.fullChartParams.styles.textSize+P.fullParams.gap:0;if(K+P.fullChartParams.styles.textSize>P.lineMaxSize){U=L.lineIndex+1,tt=0,z=0;const it=I[I.length-1].reduce((pt,q)=>q.itemWidth>pt?q.itemWidth:pt,0);F=L.translateX+it+P.fullParams.gap}else U=L?L.lineIndex:0,tt=L?L.itemIndex+1:0,z=K,F=L?L.translateX:0}else{let K=L?L.translateX+L.itemWidth+P.fullParams.gap:0;K+E>P.lineMaxSize?(U=L.lineIndex+1,tt=0,F=0):(U=L?L.lineIndex:0,tt=L?L.itemIndex+1:0,F=K),z=(P.fullChartParams.styles.textSize+P.fullParams.gap)*U}return{translateX:F,translateY:z,lineIndex:U,itemIndex:tt}})(x,A,C);return A[$]||(A[$]=[]),A[$].push({id:T,seriesLabel:T,seriesIndex:D,lineIndex:$,itemIndex:w,text:T,itemWidth:E,translateX:N,translateY:M,color:S}),console.log("items",A),A},[]))),m=H({fullParams:r,fullChartParams:o,lineDirection:h,lengendItems:g}).pipe(R(f),Y(async x=>x),G(x=>{const{width:A,height:T}=((D,k)=>{let E=0,S=0;if(!k.length||!k[0].length)return{width:E,height:S};const C=k[0][k[0].length-1];return D.lineDirection==="column"?(E=k.reduce((N,M)=>{const $=M.reduce((w,P)=>P.itemWidth>w?P.itemWidth:w,0);return N+$},0),E+=D.fullParams.gap*(k.length-1),S=C.translateY+D.fullChartParams.styles.textSize):(E=C.translateX+C.itemWidth,S=D.fullChartParams.styles.textSize*k.length+D.fullParams.gap*(k.length-1)),{width:E,height:S}})(x,x.lengendItems);return{direction:x.lineDirection,width:A,height:T,translateX:x.fullParams.gap,translateY:x.fullParams.gap}})),y=H({fullParams:r,lengendList:m}).pipe(R(f),Y(async x=>x),G(x=>{const A=x.lengendList.width+x.fullParams.gap*2,T=x.lengendList.height+x.fullParams.gap*2;let D=0,k=0;return x.fullParams.position==="left"?x.fullParams.justify==="start"?(D=x.fullParams.padding,k=x.fullParams.padding):x.fullParams.justify==="center"?(D=x.fullParams.padding,k=-T/2):x.fullParams.justify==="end"&&(D=x.fullParams.padding,k=-T-x.fullParams.padding):x.fullParams.position==="right"?x.fullParams.justify==="start"?(D=-A-x.fullParams.padding,k=x.fullParams.padding):x.fullParams.justify==="center"?(D=-A-x.fullParams.padding,k=-T/2):x.fullParams.justify==="end"&&(D=-A-x.fullParams.padding,k=-T-x.fullParams.padding):x.fullParams.position==="top"?x.fullParams.justify==="start"?(D=x.fullParams.padding,k=x.fullParams.padding):x.fullParams.justify==="center"?(D=-A/2,k=x.fullParams.padding):x.fullParams.justify==="end"&&(D=-A-x.fullParams.padding,k=x.fullParams.padding):x.fullParams.justify==="start"?(D=x.fullParams.padding,k=-T-x.fullParams.padding):x.fullParams.justify==="center"?(D=-A/2,k=-T-x.fullParams.padding):x.fullParams.justify==="end"&&(D=-A-x.fullParams.padding,k=-T-x.fullParams.padding),{width:A,height:T,translateX:D,translateY:k}})),_=H({rootPositionSelection:d,fullParams:r,fullChartParams:o,legendCard:y}).pipe(R(f),Y(async x=>x),G(x=>x.rootPositionSelection.selectAll("g").data([x.legendCard]).join(A=>A.append("g").classed(s,!0).attr("transform",T=>`translate(${T.translateX}, ${T.translateY})`),A=>A.transition().attr("transform",T=>`translate(${T.translateX}, ${T.translateY})`),A=>A.remove()).each((A,T,D)=>{Z(D[T]).selectAll("rect").data([A]).join("rect").attr("width",k=>k.width).attr("height",k=>k.height).attr("fill",Pt(x.fullParams.backgroundFill,x.fullChartParams)).attr("stroke",Pt(x.fullParams.backgroundStroke,x.fullChartParams))}))),v=H({lengendCardSelection:_,fullParams:r,lengendList:m}).pipe(R(f),Y(async x=>x),G(x=>x.lengendCardSelection.selectAll("g").data([x.lengendList]).join(A=>A.append("g").classed(c,!0).attr("transform",T=>`translate(${T.translateX}, ${T.translateY})`),A=>A.transition().attr("transform",T=>`translate(${T.translateX}, ${T.translateY})`),A=>A.remove())));return H({lengendListSelection:v,fullParams:r,fullChartParams:o,lengendItems:g}).pipe(R(f),Y(async x=>x),G(x=>{const A=x.lengendItems[0]?x.lengendItems.flat():[];return x.lengendListSelection.selectAll(`g.${u}`).data(A).join(T=>T.append("g").classed(u,!0).attr("cursor","default"),T=>T,T=>T.remove()).attr("transform",(T,D)=>`translate(${T.translateX}, ${T.translateY})`).each((T,D,k)=>{const E=x.fullChartParams.styles.textSize/2,S=x.fullParams.listRectWidth,C=x.fullParams.listRectHeight;Z(k[D]).selectAll("rect").data([T]).join("rect").attr("x",E).attr("y",E).attr("width",S).attr("height",C).attr("transform",`translate(${-S/2}, ${-C/2})`).attr("fill",N=>N.color).attr("rx",x.fullParams.listRectRadius),Z(k[D]).selectAll("text").data([T]).join(N=>N.append("text").attr("dominant-baseline","hanging"),N=>N,N=>N.remove()).attr("x",x.fullChartParams.styles.textSize*1.5).attr("font-size",x.fullChartParams.styles.textSize).text(N=>N.text)})})).subscribe(),()=>{f.next(void 0)}},h2="GridLegend",NL=we(h2,Eh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ft,o=n.SeriesDataMap$.pipe(R(i),G(s=>Array.from(s.keys()))),a=f2(h2,{rootSelection:e,seriesLabels$:o,fullParams$:n.fullParams$,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),a()}}),ph="GroupAxis",p2=lt(ph,"xAxis"),d2=lt(ph,"groupingLabel"),dh=6;function LL({selection:t,params:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:s,contentTransform:c}){const u=t.selectAll(`g.${p2}`).data([e]).join("g").classed(p2,!0);t.selectAll(`g.${d2}`).data([e]).join("g").classed(d2,!0).each((l,p,d)=>{Z(d[p]).selectAll("text").data([l]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(g=>o.groupAxis.label)}).attr("transform",l=>`translate(${i.width+l.tickPadding+e.labelOffset[0]}, ${-l.tickPadding-dh-e.labelOffset[1]})`);const f=md(s).scale(s).tickSize(e.tickFullLine==!0?-i.height:dh).tickSizeOuter(0).tickFormat(l=>vu(l,e.tickFormat)).tickPadding(e.tickPadding),h=u.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),u.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`0 -${e.tickPadding+dh}`).style("transform",c),u}const IL=we(ph,Ph)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ft,o=t.append("g");n.gridAxesTransform$.pipe(R(i),G(f=>f.value),J()).subscribe(f=>{o.style("transform",f).attr("opacity",0).transition().attr("opacity",1)});const a=H({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(R(i),Y(async f=>{const h=f.gridAxesOppositeTransform.rotate+f.fullParams.tickTextRotate;return`translate(${f.gridAxesOppositeTransform.translate[0]}px, ${f.gridAxesOppositeTransform.translate[1]}px) rotate(${h}deg) rotateX(${f.gridAxesOppositeTransform.rotateX}deg) rotateY(${f.gridAxesOppositeTransform.rotateY}deg)`}),J()),s=new at(f=>{H({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(R(i),Y(async h=>h)).subscribe(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[0]-h.fullDataFormatter.groupAxis.scalePadding,g=h.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?p+h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[1]+h.fullDataFormatter.groupAxis.scalePadding,m=h.computedData[0]?h.computedData[0].length:0;let y=h.fullDataFormatter.grid.seriesType==="row"?(h.computedData[0]??[]).map(x=>x.groupLabel):h.computedData.map(x=>x[0].groupLabel);const _=new Array(m).fill(0).map((x,A)=>y[A]!=null?y[A]:String(A)).filter((x,A)=>A>=d&&A<=g),v=h.fullDataFormatter.groupAxis.scalePadding,b=Up({axisLabels:_,axisWidth:h.gridAxesSize.width,padding:v});f.next(b)})}),c=n.fullDataFormatter$.pipe(R(i),G(f=>{let h="middle",l="hanging";return f.groupAxis.position==="bottom"?(h="middle",l="hanging"):f.groupAxis.position==="top"?(h="middle",l="auto"):f.groupAxis.position==="left"?(h="end",l="middle"):f.groupAxis.position==="right"&&(h="start",l="middle"),{textAnchor:h,dominantBaseline:l}})),u=n.fullDataFormatter$.pipe(R(i),G(f=>{let h="start",l="hanging";return f.groupAxis.position==="bottom"?l="hanging":f.groupAxis.position==="top"?l="auto":f.groupAxis.position==="left"?h="end":f.groupAxis.position==="right"&&(h="start"),f.valueAxis.position==="left"?h="start":f.valueAxis.position==="right"?h="end":f.valueAxis.position==="bottom"?l="auto":f.valueAxis.position==="top"&&(l="hanging"),{textAnchor:h,dominantBaseline:l}}));return H({params:n.fullParams$,tickTextAlign:c,axisLabelAlign:u,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,chartParams:n.fullChartParams$,groupScale:s,contentTransform:a}).pipe(R(i),Y(async f=>f)).subscribe(f=>{LL({selection:o,params:f.params,tickTextAlign:f.tickTextAlign,axisLabelAlign:f.axisLabelAlign,gridAxesSize:f.gridAxesSize,fullDataFormatter:f.fullDataFormatter,chartParams:f.chartParams,groupScale:f.groupScale,contentTransform:f.contentTransform})}),()=>{i.next(void 0)}}),gh="ValueAxis",g2=lt(gh,"g"),m2=lt(gh,"text"),y2=6;function CL({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,contentTransform:c,minAndMax:u}){const f=t.selectAll(`g.${g2}`).data([e]).join("g").classed(g2,!0);t.selectAll(`g.${m2}`).data([e]).join("g").classed(m2,!0).each((g,m,y)=>{Z(y[m]).selectAll("text").data([g]).join(_=>_.append("text").style("font-weight","bold"),_=>_,_=>_.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(_=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=u[1]-u[0],l=Ac(s).scale(s).ticks(h>e.ticks?e.ticks:u[0]===0&&u[1]===0?1:Math.ceil(h)).tickFormat(g=>vu(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:y2).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+y2} 0`).style("transform",c),f}const RL=we(gh,_u)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ft,o=t.append("g");n.gridAxesTransform$.pipe(R(i),G(h=>h.value),J()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=H({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(R(i),Y(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),J()),s=new at(h=>{H({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(R(i),Y(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((v,b)=>v.filter((x,A)=>A>=g&&A<=m)),_=qN(y.flat());h.next(_)})}),c=new at(h=>{H({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:s}).pipe(R(i),Y(async l=>l)).subscribe(l=>{const p=fc({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),u=n.fullDataFormatter$.pipe(R(i),G(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(R(i),G(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return H({fullParams:n.fullParams$,tickTextAlign:u,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:s}).pipe(R(i),Y(async h=>h)).subscribe(h=>{CL({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),mh="ValueStackAxis",b2=lt(mh,"g"),v2=lt(mh,"text"),x2=6;function FL({selection:t,fullParams:e,tickTextAlign:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,contentTransform:c,minAndMax:u}){const f=t.selectAll(`g.${b2}`).data([e]).join("g").classed(b2,!0);t.selectAll(`g.${v2}`).data([e]).join("g").classed(v2,!0).each((g,m,y)=>{Z(y[m]).selectAll("text").data([g]).join(_=>_.append("text").style("font-weight","bold"),_=>_,_=>_.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).style("font-size",`${a.styles.textSize}px`).style("fill",Pt(e.labelColorType,a)).style("transform",c).text(_=>o.valueAxis.label)}).attr("transform",g=>`translate(${-g.tickPadding+e.labelOffset[0]}, ${i.height+g.tickPadding+e.labelOffset[1]})`);const h=u[1]-u[0],l=Ac(s).scale(s).ticks(h>e.ticks?e.ticks:u[0]===0&&u[1]===0?1:Math.ceil(h)).tickFormat(g=>vu(g,e.tickFormat)).tickSize(e.tickFullLine==!0?-i.width:x2).tickPadding(e.tickPadding),p=f.transition().duration(100).call(l);return p.selectAll("line").style("fill","none").style("stroke",e.tickLineVisible==!0?Pt(e.tickColorType,a):"none").style("stroke-dasharray",e.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",e.axisLineVisible==!0?Pt(e.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${a.styles.textSize}px`).style("color",Pt(e.tickTextColorType,a)).attr("text-anchor",n.textAnchor).attr("dominant-baseline",n.dominantBaseline).attr("transform-origin",`-${e.tickPadding+x2} 0`).style("transform",c),f}const zL=we(mh,Dh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ft,o=t.append("g");n.gridAxesTransform$.pipe(R(i),G(h=>h.value),J()).subscribe(h=>{o.style("transform",h).attr("opacity",0).transition().attr("opacity",1)});const a=H({fullParams:n.fullParams$,gridAxesOppositeTransform:n.gridAxesOppositeTransform$}).pipe(R(i),Y(async h=>{const l=h.gridAxesOppositeTransform.rotate+h.fullParams.tickTextRotate;return`translate(${h.gridAxesOppositeTransform.translate[0]}px, ${h.gridAxesOppositeTransform.translate[1]}px) rotate(${l}deg) rotateX(${h.gridAxesOppositeTransform.rotateX}deg) rotateY(${h.gridAxesOppositeTransform.rotateY}deg)`}),J()),s=new at(h=>{H({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,computedData:n.computedData$}).pipe(R(i),Y(async l=>l)).subscribe(l=>{const d=l.computedData[0]?l.computedData[0].length-1:0,g=l.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[0]-l.fullDataFormatter.groupAxis.scalePadding,m=l.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?d+l.fullDataFormatter.groupAxis.scalePadding:l.fullDataFormatter.groupAxis.scaleDomain[1]+l.fullDataFormatter.groupAxis.scalePadding,y=l.computedData.map((b,x)=>b.filter((A,T)=>T>=g&&T<=m)),_=new Array(y[0]?y[0].length:0).fill(null).map((b,x)=>y.reduce((A,T)=>{if(T&&T[x]){const D=T[x].value==null||T[x].visible==!1?0:T[x].value;return A+D}return A},0)),v=qv(_);h.next(v)})}),c=new at(h=>{H({fullDataFormatter:n.fullDataFormatter$,gridAxesSize:n.gridAxesSize$,minAndMax:s}).pipe(R(i),Y(async l=>l)).subscribe(l=>{const p=fc({maxValue:l.minAndMax[1],minValue:l.minAndMax[0],axisWidth:l.gridAxesSize.height,scaleDomain:l.fullDataFormatter.valueAxis.scaleDomain,scaleRange:l.fullDataFormatter.valueAxis.scaleRange});h.next(p)})}),u=n.fullDataFormatter$.pipe(R(i),G(h=>{let l="start",p="hanging";return h.valueAxis.position==="left"?(l="end",p="middle"):h.valueAxis.position==="right"?(l="start",p="middle"):h.valueAxis.position==="bottom"?(l="middle",p="hanging"):h.valueAxis.position==="top"&&(l="middle",p="auto"),{textAnchor:l,dominantBaseline:p}})),f=n.fullDataFormatter$.pipe(R(i),G(h=>{let l="start",p="hanging";return h.groupAxis.position==="bottom"?p="auto":h.groupAxis.position==="top"?p="hanging":h.groupAxis.position==="left"?l="start":h.groupAxis.position==="right"&&(l="end"),h.valueAxis.position==="left"?l="end":h.valueAxis.position==="right"?l="start":h.valueAxis.position==="bottom"?p="hanging":h.valueAxis.position==="top"&&(p="auto"),{textAnchor:l,dominantBaseline:p}}));return H({fullParams:n.fullParams$,tickTextAlign:u,axisLabelAlign:f,computedData:n.computedData$,gridAxesSize:n.gridAxesSize$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,valueScale:c,contentTransform:a,minAndMax:s}).pipe(R(i),Y(async h=>h)).subscribe(h=>{FL({selection:o,fullParams:h.fullParams,tickTextAlign:h.tickTextAlign,axisLabelAlign:h.axisLabelAlign,gridAxesSize:h.gridAxesSize,fullDataFormatter:h.fullDataFormatter,fullChartParams:h.fullChartParams,valueScale:h.valueScale,contentTransform:h.contentTransform,minAndMax:h.minAndMax})}),()=>{i.next(void 0)}}),_2="ScalingArea",OL=lt(_2,"rect"),GL=we(_2,kh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new ft,a=e.insert("rect","g").classed(OL,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(R(o)).subscribe(u=>{a.attr("width",u.width).attr("height",u.height).attr("x",u.left).attr("y",u.top)});const c=r.computedData$.pipe(G(u=>u[0]?u[0].length-1:0),J());return H({initGroupAxis:r.fullDataFormatter$.pipe(G(u=>u.groupAxis),ri()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:c,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(R(o),Y(async u=>u)).subscribe(u=>{const h=u.groupMaxIndex,l=u.initGroupAxis.scaleDomain[0]==="auto"?0-u.initGroupAxis.scalePadding:u.initGroupAxis.scaleDomain[0]-u.initGroupAxis.scalePadding,p=u.initGroupAxis.scaleDomain[1]==="auto"?h+u.initGroupAxis.scalePadding:u.initGroupAxis.scaleDomain[1]+u.initGroupAxis.scalePadding,d=u.fullDataFormatter.valueAxis.position==="left"||u.fullDataFormatter.valueAxis.position==="top"?[0,1]:[1,0],m=fc({maxValue:u.groupMaxIndex,minValue:0,axisWidth:u.axisSize.width,scaleDomain:[l,p],scaleRange:d}).copy(),y=Gv().on("zoom",function(v){const b=v.transform,x=T=>{const D=Math.round(T);return Math.min(h,Math.max(0,D))},A=u.fullDataFormatter.groupAxis.position==="bottom"||u.fullDataFormatter.groupAxis.position==="top"?b.rescaleX(m).domain().map(x):b.rescaleY(m).domain().map(x);A[0]<=0&&A[1]>=h?b.k<s.k&&(b.k=s.k,b.x=s.x,b.y=s.y):A[1]-A[0]<=1&&b.k>s.k&&(b.k=s.k,b.x=s.x,b.y=s.y),s.k=b.k,s.x=b.x,s.y=b.y,i.dataFormatter$.next({...u.fullDataFormatter,groupAxis:{...u.fullDataFormatter.groupAxis,scaleDomain:A}})});e.call(y)}),()=>{o.next(void 0),a.remove()}});function UL(t,e){let n=new at(()=>{});return t.each(function(){const r=Cu(this,e);n=Ru(n,r)}),n}const yh="GroupArea",bh=lt(yh,"label-box");function BL({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function YL({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=lt(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",u=>Pt(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),c=a.merge(s);return a.exit().remove(),s.attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),a.transition().duration(50).attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),c}function qL(t){t.selectAll("line").data([]).exit().remove()}function WL({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:vu(t,n.labelTextFormat)}]:[]}function HL({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesOppositeTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${bh}`).data(e),s=a.enter().append("g").classed(bh,!0).style("cursor","pointer"),c=s.merge(a);return s.attr("transform",(u,f)=>`translate(${u.x}, ${u.y})`),a.transition().duration(50).attr("transform",(u,f)=>`translate(${u.x}, ${u.y})`),a.exit().remove(),c.each((u,f,h)=>{const l=Yv(u.text,r.styles.textSize)+12,p=-l/2,d=Z(h[f]).selectAll("rect").data([u]),g=d.enter().append("rect").attr("height",`${o}px`).attr("fill",_=>Pt(n.labelColorType,r)).attr("x",p).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");d.merge(g).attr("width",_=>`${l}px`).style("transform",i),d.exit().remove();const m=Z(h[f]).selectAll("text").data([u]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(_=>_.text).style("transform",i).attr("fill",_=>Pt(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",p+6),m.exit().remove()}),c}function XL(t){t.selectAll(`g.${bh}`).data([]).exit().remove()}const VL=we(yh,Mh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new ft,a=e.insert("rect","g").classed(lt(yh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(R(o)).subscribe(l=>{a.attr("width",l.rootWidth).attr("height",l.rootHeight)}),i.gridAxesTransform$.pipe(R(o),G(l=>l.value),J()).subscribe(l=>{s.style("transform",l)});const c=new at(l=>{H({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(R(o),Y(async p=>p)).subscribe(p=>{const g=p.computedData[0]?p.computedData[0].length-1:0,m=p.fullDataFormatter.groupAxis.scaleDomain[0]==="auto"?0-p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[0]-p.fullDataFormatter.groupAxis.scalePadding,y=p.fullDataFormatter.groupAxis.scaleDomain[1]==="auto"?g+p.fullDataFormatter.groupAxis.scalePadding:p.fullDataFormatter.groupAxis.scaleDomain[1]+p.fullDataFormatter.groupAxis.scalePadding,_=p.computedData[0]?p.computedData[0].length:0;let v=p.fullDataFormatter.grid.seriesType==="row"?(p.computedData[0]??[]).map(T=>T.groupLabel):p.computedData.map(T=>T[0].groupLabel);const b=new Array(_).fill(0).map((T,D)=>v[D]!=null?v[D]:String(D)).filter((T,D)=>D>=m&&D<=y),x=p.fullDataFormatter.groupAxis.scalePadding,A=Up({axisLabels:b,axisWidth:p.gridAxesSize.width,padding:x});l.next(A)})}),u=Wv({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),f=i.fullChartParams$.pipe(R(o),G(l=>l.highlightTarget),J());return H({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:u,groupScale:c}).pipe(R(o),Y(async l=>l)).subscribe(l=>{e.on("mouseover",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mousemove",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("mouseout",(p,d)=>{const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})}).on("click",(p,d)=>{p.stopPropagation();const{groupIndex:g,groupLabel:m}=l.gridGroupPositionFn(p);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:p,data:l.computedData})})}),H({event:r.event$.pipe(No(l=>l.eventName==="mouseover"||l.eventName==="mousemove")),computedData:i.computedData$,groupScale:c,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:f,gridAxesOppositeTransform:i.gridAxesOppositeTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:u}).pipe(R(o),Y(async l=>l)).subscribe(l=>{const p=l.groupScale(l.event.groupLabel)??0,d=BL({groupLabel:l.event.groupLabel,axisX:p,axisHeight:l.gridAxesSize.height,fullParams:l.fullParams});YL({selection:s,pluginName:n,lineData:d,fullParams:l.fullParams,fullChartParams:l.fullChartParams});const g=WL({groupLabel:l.event.groupLabel,axisX:p,fullParams:l.fullParams});HL({selection:s,labelData:g,fullParams:l.fullParams,fullChartParams:l.fullChartParams,gridAxesOppositeTransformValue:l.gridAxesOppositeTransform.value}).on("mouseover",(y,_)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("mousemove",(y,_)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("mouseout",(y,_)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})}).on("click",(y,_)=>{const{groupIndex:v,groupLabel:b}=l.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:l.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:l.event.groups,groupIndex:v,groupLabel:b,event:y,data:l.computedData})})}),UL(a,"mouseout").pipe(R(o)).subscribe(l=>{console.log("rootMouseout"),qL(s),XL(s)}),()=>{o.next(void 0),a.remove()}}),w2={bars:{barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},lines:{lineCurve:"curveLinear",lineWidth:2}},So="BarsAndLines",jL=lt(So,"bars"),ZL=lt(So,"lines"),KL=P6(So,w2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new ft,o=t.append("g").attr("class",jL),a=t.append("g").attr("class",ZL);let s=()=>{},c=()=>{};const u=r.computedData$.pipe(G(d=>d[0]||[])),f=r.computedData$.pipe(G(d=>d[1]||[])),h=r.fullParams$.pipe(G(d=>d.bars)),l=r.fullParams$.pipe(G(d=>d.lines)),p=r.fullDataFormatter$.pipe(G(d=>d.multiGrid[1]));return r.multiGrid$.subscribe(d=>{d[0]?s=Jv(So,{selection:o,computedData$:u,visibleComputedData$:d[0].visibleComputedData$,SeriesDataMap$:d[0].SeriesDataMap$,GroupDataMap$:d[0].GroupDataMap$,fullParams$:h,fullChartParams$:r.fullChartParams$,gridAxesTransform$:d[0].gridAxesTransform$,gridGraphicTransform$:d[0].gridGraphicTransform$,gridAxesSize$:d[0].gridAxesSize$,gridHighlight$:d[0].gridHighlight$,event$:n.event$}):s(),d[1]?c=Xv(So,{selection:a,computedData$:f,SeriesDataMap$:d[1].SeriesDataMap$,GroupDataMap$:d[1].GroupDataMap$,fullParams$:l,fullDataFormatter$:p,fullChartParams$:r.fullChartParams$,gridAxesTransform$:d[1].gridAxesTransform$,gridGraphicTransform$:d[1].gridGraphicTransform$,gridAxesSize$:d[1].gridAxesSize$,gridHighlight$:d[1].gridHighlight$,event$:n.event$}):c()}),()=>{i.next(void 0),s(),c()}}),A2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},M2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(r=>r.value).join(",");return[e,n]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.groups.map(r=>r.value).join(",");return[e,n]}return[]},svgRenderFn:null},QL=Bp("Container",A2)(({selection:t})=>function(){}),vh="Tooltip",$2=lt(vh,"g"),JL=lt(vh,"box");function tI(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function eI({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,c=i?[i]:[],u=i?[o]:[],h=t.selectAll(`g.${$2}`).data(c).join(b=>b.append("g").classed($2,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${JL}`).data(u).join(b=>b.append("g").classed(lt(e,"box"),!0)),l=h.selectAll("rect").data(u).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),p=h.selectAll("g").data(c).join(b=>b.append("g").classed(lt(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));c.length&&YN(p,c[0]);const d=p!=null&&p.node()?Bv(p):{width:0,height:0};l.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=h!=null&&h.node()?Bv(h):{width:0,height:0},m=n-g.width,y=r-g.height,_=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${_}, ${v})`),h.attr("transform",b=>`translate(${_}, ${v})`)}const nI=Bp(vh,M2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new ft,s=o.event$.pipe(R(a),No(d=>d.eventName==="mouseover"||d.eventName==="mousemove")),c=o.event$.pipe(R(a),No(d=>d.eventName==="mouseout")),u=H({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(R(a),Y(async d=>d),G(d=>({backgroundColor:Pt(d.fullParams.backgroundColorType,d.fullChartParams),backgroundOpacity:d.fullParams.backgroundOpacity,strokeColor:Pt(d.fullParams.strokeColorType,d.fullChartParams),offset:d.fullParams.offset,padding:d.fullParams.padding,textSize:d.fullChartParams.styles.textSize,textColor:Pt(d.fullParams.textColorType,d.fullChartParams)}))),f=H({fullParams:i.fullParams$,tooltipStyle:u}).pipe(R(a),Y(async d=>d),G(d=>d.fullParams.svgRenderFn?d.fullParams.svgRenderFn:g=>{const m=d.fullParams.textRenderFn(g);return tI(m,d.tooltipStyle)})),h=H({event:s,contentRenderFn:f}).pipe(R(a),Y(async d=>d),G(d=>d.contentRenderFn(d.event))),l=c.pipe(R(a),G(d=>"")),p=Ru(s,c).pipe(R(a),G(d=>d.event));return H({svgString:Ru(h,l),event:p,layout:i.layout$,tooltipStyle:u}).pipe(R(a),Y(async d=>d)).subscribe(d=>{eI({rootSelection:e,pluginName:n,rootWidth:d.layout.rootWidth,rootHeight:d.layout.rootHeight,svgString:d.svgString,tooltipStyle:d.tooltipStyle,event:d.event})}),function(){a.next(void 0)}}),S2={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},T2={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},P2={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},D2={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},k2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function rI(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function s(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function c(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function u(p){const d=c(p.trim());return Math.sqrt(d*r)}function f(p,d){let g={width:0,text:""},m=1/0;const y=[];let _=" ";i&&(_="");for(let v=0,b=p.length;v<b;++v){const x=(g.text?g.text+_:"")+p[v],A=c(x);(m+A)/2<d?(g.width=m=A,g.text=x):(m=c(p[v]),g={width:m,text:p[v]},y.push(g))}return y}function h(p){let d=0;for(let g=0,m=p.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,_=p[g].width/2;d=Math.max(d,Math.sqrt(_**2+y**2))}return d}function l(p,d){o>0&&(d=s(d,o));const g=a(d),m=u(d),y=f(g,m),_=h(y);let v=p.select("text");v.size()||(v=p.append("text")),v.attr("transform",`translate(0,0) scale(${n/_})`);const b=v.selectAll("tspan").data(y),x=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(A,T)=>(T-y.length/2+.8)*r).text(A=>A.text);return b.exit().remove(),b.merge(x)}return l(t,e)}let nr;function iI(t,e){return d1().velocityDecay(e.force.velocityDecay).force("collision",f1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",g1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function oI({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function aI({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(p=>p.value!=null&&p.visible!=!1),s=Math.max(...a.map(p=>p.value)),c=a.reduce((p,d)=>p+(d.value??0),0)/a.length,u=oI({data:a,bubbleGroupR:o,maxValue:s,avgValue:c}),f=i==="area"?.5:1,h=Ws().domain([0,s]).range([0,u]).exponent(f);return a.map(p=>{const d=p,g=e.get(p.id);g?(d.x=g.x,d.y=g.y):(d.x=Math.random()*n,d.y=Math.random()*r);const m=h(d.value??0);return d.r=m,d._originR=m,d})}function E2({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,c)=>{const u=Z(c[s]);let f=!0;a.label.length<=n.bubbleText.lineLengthMin&&(f=!1),u.call(rI,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:f})}),o}function sI({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function uI(){return Pd().on("start",(t,e)=>{t.active||nr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||nr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function N2({fullParams:t,graphicWidth:e,graphicHeight:n}){nr.force("x",m1().strength(t.force.strength).x(0)).force("y",y1().strength(t.force.strength).y(0)),nr.alpha(1).restart()}function cI({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(qa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const lI=vi("Bubbles",S2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ft,o=t.append("g"),a=new ft;let s=new Map;n.layout$.pipe(ri()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(R(i)).subscribe(l=>{t.transition().attr("transform",`translate(${l.width/2}, ${l.height/2})`)})});const c=n.fullParams$.pipe(R(i),G(h=>h.bubbleScaleType),J()),u=new at(h=>{H({layout:n.layout$,computedData:n.computedData$,scaleType:c}).pipe(R(i),Y(async l=>l)).subscribe(l=>{const p=aI({data:l.computedData,LastBubbleDataMap:s,graphicWidth:l.layout.width,graphicHeight:l.layout.height,scaleType:l.scaleType});h.next(p)})});u.subscribe(h=>{s=new Map(h.map(l=>[l.id,l]))});const f=n.fullChartParams$.pipe(R(i),G(h=>h.highlightTarget),J());return H({layout:n.layout$,computedData:n.computedData$,bubblesData:u,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:f}).pipe(R(i),Y(async h=>h)).subscribe(h=>{const l=E2({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});nr=iI(l,h.fullParams),l.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:d,series:h.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:h.computedData})}).call(uI()),nr.nodes(h.bubblesData),N2({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(l)}),H({bubblesSelection:a,bubblesData:u,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(R(i),Y(async h=>h)).subscribe(h=>{cI({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(sI({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),E2({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),N2({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),nr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function L2({computedDataSeries:t,startAngle:e,endAngle:n}){return Jb().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const I2="Pie",fI=lt(I2,"path");function hI({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,c)=>{const u=r[c]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+u.startAngle*(1-o),endAngle:s.endAngle*o+u.endAngle*(1-o),value:s.value*o+u.value*(1-o)}});return xh(a,i.startAngle,i.endAngle,1)}:o=>xh(n,i.startAngle,i.endAngle,o)}function xh(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function C2({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(fI,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,c)=>s.data.color).attr("d",(s,c)=>n(s)),o.remove(),a}function pI({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const c=Z(s[a]);e.includes(o.data.id)?c.style("opacity",1).transition("highlight").ease(qa).duration(500).attr("d",u=>i(u)):c.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>r(u))})}const dI=vi(I2,T2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ft,o=t.append("g"),a=new ft;let s=[],c=[];n.layout$.pipe(ri()).subscribe(d=>{t.attr("transform",`translate(${d.width/2}, ${d.height/2})`),n.layout$.pipe(R(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const u=n.layout$.pipe(R(i),G(d=>d.width<d.height?d.width:d.height)),f=new at(d=>{H({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(R(i),Y(async g=>g)).subscribe(g=>{const m=L2({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});d.next(m)})}),h=new at(d=>{H({shorterSideWith:u,fullParams:n.fullParams$}).pipe(R(i),Y(async g=>g)).subscribe(g=>{const m=bu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),l=new at(d=>{H({shorterSideWith:u,fullParams:n.fullParams$}).pipe(R(i),Y(async g=>g)).subscribe(g=>{const m=bu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});d.next(m)})}),p=n.fullChartParams$.pipe(R(i),G(d=>d.highlightTarget),J());return H({pieData:f,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:l,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:p}).pipe(R(i),Y(async d=>d)).subscribe(d=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(d.pieData,v=>v.data.id),m=g.enter(),y=g.exit();const _=hI({enter:m,exit:y,data:d.pieData,lastData:s,fullParams:d.fullParams});o.transition("graphicMove").duration(d.fullChartParams.transitionDuration).ease(Jr(d.fullChartParams.transitionEase)).tween("move",(v,b)=>x=>{c=_(x),C2({selection:o,renderData:c,arc:d.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData})}).on("end",(v,b)=>{c=xh(d.pieData,d.fullParams.startAngle,d.fullParams.endAngle,1);const x=C2({selection:o,renderData:c,arc:d.arc});a.next(x),s=Object.assign([],d.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:d.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:d.computedData}),x.on("mouseover",(A,T)=>{A.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:d.highlightTarget,datum:T.data,series:d.SeriesDataMap.get(T.data.seriesLabel),seriesIndex:T.data.seriesIndex,seriesLabel:T.data.seriesLabel,event:A,data:d.computedData})}).on("mousemove",(A,T)=>{A.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:d.highlightTarget,datum:T.data,series:d.SeriesDataMap.get(T.data.seriesLabel),seriesIndex:T.data.seriesIndex,seriesLabel:T.data.seriesLabel,event:A,data:d.computedData})}).on("mouseout",(A,T)=>{A.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:d.highlightTarget,datum:T.data,series:d.SeriesDataMap.get(T.data.seriesLabel),seriesIndex:T.data.seriesIndex,seriesLabel:T.data.seriesLabel,event:A,data:d.computedData})}).on("click",(A,T)=>{A.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:d.highlightTarget,datum:T.data,series:d.SeriesDataMap.get(T.data.seriesLabel),seriesIndex:T.data.seriesIndex,seriesLabel:T.data.seriesLabel,event:A,data:d.computedData})})})}),H({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:l}).pipe(R(i),Y(async d=>d)).subscribe(d=>{pI({pathSelection:d.pathSelection,ids:d.highlight,fullChartParams:d.fullChartParams,arc:d.arc,arcMouseover:d.arcMouseover})}),()=>{i.next(void 0)}}),R2="PieEventTexts",F2=lt(R2,"text");function _h(t,e){const n=t.selectAll(`text.${F2}`).data(e),r=n.enter().append("text").classed(F2,!0),i=n.merge(r);return i.each((o,a,s)=>{const c=Z(s[a]).text(o.text);Object.keys(o.attr).forEach(u=>{c.attr(u,o.attr[u])}),Object.keys(o.style).forEach(u=>{c.style(u,o.style[u])})}),n.exit().remove(),i}function wh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,c)=>({text:s,attr:i[c],style:o[c]}))}const gI=vi(R2,P2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new ft,o=t.append("g");let a;n.layout$.pipe(ri()).subscribe(c=>{t.attr("transform",`translate(${c.width/2}, ${c.height/2})`),n.layout$.pipe(R(i)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})});const s=n.fullChartParams$.pipe(R(i),G(c=>c.highlightTarget),J());return H({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(R(i),Y(async c=>c)).subscribe(c=>{o.transition().duration(c.fullChartParams.transitionDuration).ease(Jr(c.fullChartParams.transitionEase)).tween("move",(u,f)=>h=>{const l=wh({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:u,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});_h(o,l)}).on("end",(u,f)=>{const h=wh({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:u,highlightTarget:c.highlightTarget,data:c.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});_h(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(l=>{const p=wh({eventData:l,eventName:l.eventName,t:1,eventFn:c.fullParams.eventFn,textAttrs:c.fullParams.textAttrs,textStyles:c.fullParams.textStyles});_h(o,p)})})}),()=>{i.next(void 0)}}),z2="PieLabels",mI=lt(z2,"text");function yI(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[c,u]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:c*r,mouseoverY:u*r}}).filter(i=>i.pieDatum.data.visible)}function bI(t,e,n,r){let i=t.selectAll("text").data(e,c=>c.pieDatum.id),o=i.enter().append("text").classed(mI,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",c=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(c=>n.labelFn(c.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(c,u)=>hh({datum:c.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",c=>"translate("+c.x+","+c.y+")"),a.remove(),s}function vI({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}const xI=vi(z2,D2)(({selection:t,observer:e,subject:n})=>{const r=new ft,i=t.append("g");let o=new ft,a=[];return e.layout$.pipe(ri()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(R(r)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})}),H({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(R(r),Y(async s=>s)).subscribe(s=>{const c=s.layout.width<s.layout.height?s.layout.width:s.layout.height,u=bu({axisWidth:c,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),f=bu({axisWidth:c,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=L2({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=yI(h,u,f,s.fullParams.labelCentroid);const l=bI(i,a,s.fullParams,s.fullChartParams);o.next(l)}),H({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(R(r),Y(async s=>s)).subscribe(s=>{vI({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),O2="SeriesLegend",_I=vi(O2,k2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new ft,o=n.SeriesDataMap$.pipe(R(i),G(s=>Array.from(s.keys()))),a=f2(O2,{rootSelection:e,seriesLabels$:o,fullParams$:n.fullParams$,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),a()}});nt.BarStack=gL,nt.Bars=sL,nt.BarsAndLines=KL,nt.BarsTriangle=$L,nt.Bubbles=lI,nt.CONTAINER_PLUGIN_PARAMS=A2,nt.Container=QL,nt.DEFAULT_BARS_AND_LINES_PARAMS=w2,nt.DEFAULT_BARS_PLUGIN_PARAMS=$h,nt.DEFAULT_BARS_TRIANGLE_PLUGIN_PARAMS=Th,nt.DEFAULT_BAR_STACK_PLUGIN_PARAMS=Sh,nt.DEFAULT_BUBBLES_PLUGIN_PARAMS=S2,nt.DEFAULT_DOTS_PLUGIN_PARAMS=Ah,nt.DEFAULT_GRID_LEGEND_PARAMS=Eh,nt.DEFAULT_GROUPING_AXIS_PLUGIN_PARAMS=Ph,nt.DEFAULT_GROUP_AREA_PLUGIN_PARAMS=Mh,nt.DEFAULT_LINES_PLUGIN_PARAMS=rr,nt.DEFAULT_PIE_EVENT_TEXTS_PARAMS=P2,nt.DEFAULT_PIE_LABELS_PARAMS=D2,nt.DEFAULT_PIE_PLUGIN_PARAMS=T2,nt.DEFAULT_SCALING_AREA_PLUGIN_PARAMS=kh,nt.DEFAULT_SERIES_LEGEND_PARAMS=k2,nt.DEFAULT_VALUE_AXIS_PLUGIN_PARAMS=_u,nt.DEFAULT_VALUE_STACK_AXIS_PLUGIN_PARAMS=Dh,nt.Dots=EL,nt.GridLegend=NL,nt.GroupArea=VL,nt.GroupAxis=IL,nt.Lines=JN,nt.Pie=dI,nt.PieEventTexts=gI,nt.PieLabels=xI,nt.ScalingArea=GL,nt.SeriesLegend=_I,nt.TOOLTIP_PARAMS=M2,nt.Tooltip=nI,nt.ValueAxis=RL,nt.ValueStackAxis=zL,Object.defineProperty(nt,Symbol.toStringTag,{value:"Module"})});