@carbon/charts 1.13.25 → 1.13.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/{_baseEach-hCF4b-EZ.mjs → _baseEach-70Y6bksF.mjs} +2 -2
- package/dist/{_baseEach-hCF4b-EZ.mjs.map → _baseEach-70Y6bksF.mjs.map} +1 -1
- package/dist/{angle-utils-to7NH0_1.mjs → angle-utils-dwZwPD9W.mjs} +2 -2
- package/dist/{angle-utils-to7NH0_1.mjs.map → angle-utils-dwZwPD9W.mjs.map} +1 -1
- package/dist/{choropleth-a9b8bAaz.mjs → choropleth-GJJ8-QuT.mjs} +4 -4
- package/dist/{choropleth-a9b8bAaz.mjs.map → choropleth-GJJ8-QuT.mjs.map} +1 -1
- package/dist/{color-scale-utils-W9pcGG6t.mjs → color-scale-utils-05Wy3zGY.mjs} +395 -395
- package/dist/{color-scale-utils-W9pcGG6t.mjs.map → color-scale-utils-05Wy3zGY.mjs.map} +1 -1
- package/dist/components/index.mjs +4 -4
- package/dist/demo/index.mjs +26 -26
- package/dist/demo/styles.css +148 -73
- package/dist/demo/styles.css.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/model/index.mjs +3 -3
- package/dist/services/index.mjs +3 -3
- package/dist/styles.css +30 -14
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +1 -1
- package/dist/styles.min.css.map +1 -1
- package/dist/umd/bundle.umd.js +1 -1
- package/dist/umd/bundle.umd.js.map +1 -1
- package/dist/{wordcloud-y7csbPwp.mjs → wordcloud-7JPbYYMG.mjs} +3 -3
- package/dist/{wordcloud-y7csbPwp.mjs.map → wordcloud-7JPbYYMG.mjs.map} +1 -1
- package/dist/{zoom-z1-4lR5l.mjs → zoom-wI-Jcyj4.mjs} +3 -3
- package/dist/{zoom-z1-4lR5l.mjs.map → zoom-wI-Jcyj4.mjs.map} +1 -1
- package/package.json +9 -9
- package/styles.css +30 -14
- package/styles.min.css +1 -1
package/dist/umd/bundle.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(W,Re){typeof exports=="object"&&typeof module<"u"?Re(exports):typeof define=="function"&&define.amd?define(["exports"],Re):(W=typeof globalThis<"u"?globalThis:W||self,Re(W.Charts={}))})(this,function(W){"use strict";function Re(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function y0(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wo(e){let t,n,r;e.length!==2?(t=Re,n=(o,l)=>Re(e(o),l),r=(o,l)=>e(o)-l):(t=e===Re||e===y0?e:E0,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:a,right:s}}function E0(){return 0}function x0(e){return e===null?NaN:+e}function*b0(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const _0=wo(Re).right;wo(x0).center;const Oo=_0;function S0(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function Ie(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let s of e)(s=t(s,++i,e))!=null&&(n===void 0?s>=s&&(n=r=s):(n>s&&(n=s),r<s&&(r=s)))}return[n,r]}class Nn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const s=n[i],a=t+s,o=Math.abs(t)<Math.abs(s)?t-(a-s):s-(a-t);o&&(n[r++]=o),t=a}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,s,a=0;if(n>0){for(a=t[--n];n>0&&(r=a,i=t[--n],a=r+i,s=i-(a-r),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(i=s*2,r=a+i,i==r-a&&(a=r))}return a}}class Ju extends Map{constructor(t,n=O0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(th(this,t))}has(t){return super.has(th(this,t))}set(t,n){return super.set(T0(this,t),n)}delete(t){return super.delete(w0(this,t))}}function th({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function T0({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function w0({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function O0(e){return e!==null&&typeof e=="object"?e.valueOf():e}function M0(e){return e}function A0(e=Re){if(e===Re)return eh;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function eh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var C0=Array.prototype,D0=C0.slice;function Mo(e){return()=>e}const L0=Math.sqrt(50),R0=Math.sqrt(10),I0=Math.sqrt(2);function _s(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=L0?10:s>=R0?5:s>=I0?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?_s(e,t,n*2):[o,l,c]}function Ss(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,a]=r?_s(t,e,n):_s(e,t,n);if(!(s>=i))return[];const o=s-i+1,l=new Array(o);if(r)if(a<0)for(let c=0;c<o;++c)l[c]=(s-c)/-a;else for(let c=0;c<o;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<o;++c)l[c]=(i+c)/-a;else for(let c=0;c<o;++c)l[c]=(i+c)*a;return l}function pr(e,t,n){return t=+t,e=+e,n=+n,_s(e,t,n)[2]}function Ao(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?pr(t,e,n):pr(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function k0(e,t,n){let r;for(;;){const i=pr(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function P0(e){return Math.max(1,Math.ceil(Math.log(S0(e))/Math.LN2)+1)}function $0(){var e=M0,t=Ie,n=P0;function r(i){Array.isArray(i)||(i=Array.from(i));var s,a=i.length,o,l,c=new Array(a);for(s=0;s<a;++s)c[s]=e(i[s],s,i);var u=t(c),d=u[0],h=u[1],f=n(c,d,h);if(!Array.isArray(f)){const E=h,_=+f;if(t===Ie&&([d,h]=k0(d,h,_)),f=Ss(d,h,_),f[0]<=d&&(l=pr(d,h,_)),f[f.length-1]>=h)if(E>=h&&t===Ie){const S=pr(d,h,_);isFinite(S)&&(S>0?h=(Math.floor(h/S)+1)*S:S<0&&(h=(Math.ceil(h*-S)+1)/-S))}else f.pop()}for(var p=f.length,g=0,v=p;f[g]<=d;)++g;for(;f[v-1]>h;)--v;(g||v<p)&&(f=f.slice(g,v),p=v-g);var m=new Array(p+1),y;for(s=0;s<=p;++s)y=m[s]=[],y.x0=s>0?f[s-1]:d,y.x1=s<p?f[s]:h;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&m[Math.min(p,Math.floor((o-d)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&d<=o&&o<=h){const E=Math.floor((d-o)*l);m[Math.min(p,E+(f[E]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&m[Oo(f,o,0,p)].push(i[s]);return m}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Mo(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Mo([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Mo(Array.isArray(i)?D0.call(i):i),r):n},r}function Un(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Mn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function nh(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?eh:A0(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(t-c*d/l+h)),p=Math.min(r,Math.floor(t+(l-c)*d/l+h));nh(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(oi(e,n,t),i(e[r],s)>0&&oi(e,n,r);a<o;){for(oi(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?oi(e,n,o):(++o,oi(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function oi(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Co(e,t,n){if(e=Float64Array.from(b0(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Mn(e);if(t>=1)return Un(e);var r,i=(r-1)*t,s=Math.floor(i),a=Un(nh(e,s).subarray(0,s+1)),o=Mn(e.subarray(s+1));return a+(o-a)*(i-s)}}function*N0(e){for(const t of e)yield*t}function rh(e){return Array.from(N0(e))}function U0(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function B0(e){return e}var Ts=1,ws=2,Do=3,li=4,ih=1e-6;function F0(e){return"translate("+e+",0)"}function H0(e){return"translate(0,"+e+")"}function G0(e){return t=>+e(t)}function V0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function z0(){return!this.__axis}function Os(e,t){var n=[],r=null,i=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Ts||e===li?-1:1,u=e===li||e===ws?"x":"y",d=e===Ts||e===Do?F0:H0;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):B0),v=Math.max(s,0)+o,m=t.range(),y=+m[0]+l,E=+m[m.length-1]+l,_=(t.bandwidth?V0:G0)(t.copy(),l),S=f.selection?f.selection():f,b=S.selectAll(".domain").data([null]),M=S.selectAll(".tick").data(p,t).order(),D=M.exit(),G=M.enter().append("g").attr("class","tick"),I=M.select("line"),w=M.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(G),I=I.merge(G.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),w=w.merge(G.append("text").attr("fill","currentColor").attr(u,c*v).attr("dy",e===Ts?"0em":e===Do?"0.71em":"0.32em")),f!==S&&(b=b.transition(f),M=M.transition(f),I=I.transition(f),w=w.transition(f),D=D.transition(f).attr("opacity",ih).attr("transform",function(C){return isFinite(C=_(C))?d(C+l):this.getAttribute("transform")}),G.attr("opacity",ih).attr("transform",function(C){var R=this.parentNode.__axis;return d((R&&isFinite(R=R(C))?R:_(C))+l)})),D.remove(),b.attr("d",e===li||e===ws?a?"M"+c*a+","+y+"H"+l+"V"+E+"H"+c*a:"M"+l+","+y+"V"+E:a?"M"+y+","+c*a+"V"+l+"H"+E+"V"+c*a:"M"+y+","+l+"H"+E),M.attr("opacity",1).attr("transform",function(C){return d(_(C)+l)}),I.attr(u+"2",c*s),w.attr(u,c*v).text(g),S.filter(z0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===ws?"start":e===li?"end":"middle"),S.each(function(){this.__axis=_})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(f){return arguments.length?(n=f==null?[]:Array.from(f),h):n.slice()},h.tickValues=function(f){return arguments.length?(r=f==null?null:Array.from(f),h):r&&r.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(s=a=+f,h):s},h.tickSizeInner=function(f){return arguments.length?(s=+f,h):s},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(o=+f,h):o},h.offset=function(f){return arguments.length?(l=+f,h):l},h}function W0(e){return Os(Ts,e)}function Y0(e){return Os(ws,e)}function Lo(e){return Os(Do,e)}function sh(e){return Os(li,e)}var q0={value:()=>{}};function Ro(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ms(n)}function Ms(e){this._=e}function X0(e,t){return e.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&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ms.prototype=Ro.prototype={constructor:Ms,on:function(e,t){var n=this._,r=X0(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=j0(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=ah(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ah(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ms(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function j0(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ah(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=q0,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Io="http://www.w3.org/1999/xhtml";const oh={svg:"http://www.w3.org/2000/svg",xhtml:Io,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function As(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),oh.hasOwnProperty(t)?{space:oh[t],local:e}:e}function Z0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Io&&t.documentElement.namespaceURI===Io?t.createElement(e):t.createElementNS(n,e)}}function K0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function lh(e){var t=As(e);return(t.local?K0:Z0)(t)}function Q0(){}function ko(e){return e==null?Q0:function(){return this.querySelector(e)}}function J0(e){typeof e!="function"&&(e=ko(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=new Array(a),l,c,u=0;u<a;++u)(l=s[u])&&(c=e.call(l,l.__data__,u,s))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new me(r,this._parents)}function ty(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ey(){return[]}function ch(e){return e==null?ey:function(){return this.querySelectorAll(e)}}function ny(e){return function(){return ty(e.apply(this,arguments))}}function ry(e){typeof e=="function"?e=ny(e):e=ch(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&(r.push(e.call(l,l.__data__,c,a)),i.push(l));return new me(r,i)}function uh(e){return function(){return this.matches(e)}}function hh(e){return function(t){return t.matches(e)}}var iy=Array.prototype.find;function sy(e){return function(){return iy.call(this.children,e)}}function ay(){return this.firstElementChild}function oy(e){return this.select(e==null?ay:sy(typeof e=="function"?e:hh(e)))}var ly=Array.prototype.filter;function cy(){return Array.from(this.children)}function uy(e){return function(){return ly.call(this.children,e)}}function hy(e){return this.selectAll(e==null?cy:uy(typeof e=="function"?e:hh(e)))}function dy(e){typeof e!="function"&&(e=uh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new me(r,this._parents)}function dh(e){return new Array(e.length)}function fy(){return new me(this._enter||this._groups.map(dh),this._parents)}function Cs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Cs.prototype={constructor:Cs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function py(e){return function(){return e}}function gy(e,t,n,r,i,s){for(var a=0,o,l=t.length,c=s.length;a<c;++a)(o=t[a])?(o.__data__=s[a],r[a]=o):n[a]=new Cs(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function my(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(h[o]=f=a.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(l=c.get(f))?(r[o]=l,l.__data__=s[o],c.delete(f)):n[o]=new Cs(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function vy(e){return e.__data__}function yy(e,t){if(!arguments.length)return Array.from(this,vy);var n=t?my:gy,r=this._parents,i=this._groups;typeof e!="function"&&(e=py(e));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=r[c],d=i[c],h=d.length,f=Ey(e.call(u,u&&u.__data__,c,r)),p=f.length,g=o[c]=new Array(p),v=a[c]=new Array(p),m=l[c]=new Array(h);n(u,d,g,v,m,f,t);for(var y=0,E=0,_,S;y<p;++y)if(_=g[y]){for(y>=E&&(E=y+1);!(S=v[E])&&++E<p;);_._next=S||null}}return a=new me(a,r),a._enter=o,a._exit=l,a}function Ey(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xy(){return new me(this._exit||this._groups.map(dh),this._parents)}function by(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function _y(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),f,p=0;p<d;++p)(f=c[p]||u[p])&&(h[p]=f);for(;l<i;++l)o[l]=n[l];return new me(o,this._parents)}function Sy(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function Ty(e){e||(e=wy);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new me(i,this._parents).order()}function wy(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Oy(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function My(){return Array.from(this)}function Ay(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}function Cy(){let e=0;for(const t of this)++e;return e}function Dy(){return!this.node()}function Ly(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,o;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this}function Ry(e){return function(){this.removeAttribute(e)}}function Iy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ky(e,t){return function(){this.setAttribute(e,t)}}function Py(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $y(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ny(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Uy(e,t){var n=As(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Iy:Ry:typeof t=="function"?n.local?Ny:$y:n.local?Py:ky)(n,t))}function fh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function By(e){return function(){this.style.removeProperty(e)}}function Fy(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Hy(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Gy(e,t,n){return arguments.length>1?this.each((t==null?By:typeof t=="function"?Hy:Fy)(e,t,n??"")):gr(this.node(),e)}function gr(e,t){return e.style.getPropertyValue(t)||fh(e).getComputedStyle(e,null).getPropertyValue(t)}function Vy(e){return function(){delete this[e]}}function zy(e,t){return function(){this[e]=t}}function Wy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Yy(e,t){return arguments.length>1?this.each((t==null?Vy:typeof t=="function"?Wy:zy)(e,t)):this.node()[e]}function ph(e){return e.trim().split(/^|\s+/)}function Po(e){return e.classList||new gh(e)}function gh(e){this._node=e,this._names=ph(e.getAttribute("class")||"")}gh.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function mh(e,t){for(var n=Po(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function vh(e,t){for(var n=Po(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function qy(e){return function(){mh(this,e)}}function Xy(e){return function(){vh(this,e)}}function jy(e,t){return function(){(t.apply(this,arguments)?mh:vh)(this,e)}}function Zy(e,t){var n=ph(e+"");if(arguments.length<2){for(var r=Po(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?jy:t?qy:Xy)(n,t))}function Ky(){this.textContent=""}function Qy(e){return function(){this.textContent=e}}function Jy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function t1(e){return arguments.length?this.each(e==null?Ky:(typeof e=="function"?Jy:Qy)(e)):this.node().textContent}function e1(){this.innerHTML=""}function n1(e){return function(){this.innerHTML=e}}function r1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function i1(e){return arguments.length?this.each(e==null?e1:(typeof e=="function"?r1:n1)(e)):this.node().innerHTML}function s1(){this.nextSibling&&this.parentNode.appendChild(this)}function a1(){return this.each(s1)}function o1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function l1(){return this.each(o1)}function c1(e){var t=typeof e=="function"?e:lh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function u1(){return null}function h1(e,t){var n=typeof e=="function"?e:lh(e),r=t==null?u1:typeof t=="function"?t:ko(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function d1(){var e=this.parentNode;e&&e.removeChild(this)}function f1(){return this.each(d1)}function p1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function g1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function m1(e){return this.select(e?g1:p1)}function v1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function y1(e){return function(t){e.call(this,t,this.__data__)}}function E1(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function x1(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function b1(e,t,n){return function(){var r=this.__on,i,s=y1(t);if(r){for(var a=0,o=r.length;a<o;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function _1(e,t,n){var r=E1(e+""),i,s=r.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<s;++i)if((a=r[i]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?b1:x1,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function yh(e,t,n){var r=fh(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function S1(e,t){return function(){return yh(this,e,t)}}function T1(e,t){return function(){return yh(this,e,t.apply(this,arguments))}}function w1(e,t){return this.each((typeof t=="function"?T1:S1)(e,t))}function*O1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}var Eh=[null];function me(e,t){this._groups=e,this._parents=t}function ci(){return new me([[document.documentElement]],Eh)}function M1(){return this}me.prototype=ci.prototype={constructor:me,select:J0,selectAll:ry,selectChild:oy,selectChildren:hy,filter:dy,data:yy,enter:fy,exit:xy,join:by,merge:_y,selection:M1,order:Sy,sort:Ty,call:Oy,nodes:My,node:Ay,size:Cy,empty:Dy,each:Ly,attr:Uy,style:Gy,property:Yy,classed:Zy,text:t1,html:i1,raise:a1,lower:l1,append:c1,insert:h1,remove:f1,clone:m1,datum:v1,on:_1,dispatch:w1,[Symbol.iterator]:O1};function L(e){return typeof e=="string"?new me([[document.querySelector(e)]],[document.documentElement]):new me([[e]],Eh)}function A1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Bn(e,t){if(e=A1(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const $o={capture:!0,passive:!1};function No(e){e.preventDefault(),e.stopImmediatePropagation()}function C1(e){var t=e.document.documentElement,n=L(e).on("dragstart.drag",No,$o);"onselectstart"in t?n.on("selectstart.drag",No,$o):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function D1(e,t){var n=e.document.documentElement,r=L(e).on("dragstart.drag",null);t&&(r.on("click.drag",No,$o),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Uo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ui(){}var hi=.7,Ds=1/hi,mr="\\s*([+-]?\\d+)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",L1=/^#([0-9a-f]{3,8})$/,R1=new RegExp(`^rgb\\(${mr},${mr},${mr}\\)$`),I1=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),k1=new RegExp(`^rgba\\(${mr},${mr},${mr},${di}\\)$`),P1=new RegExp(`^rgba\\(${qe},${qe},${qe},${di}\\)$`),$1=new RegExp(`^hsl\\(${di},${qe},${qe}\\)$`),N1=new RegExp(`^hsla\\(${di},${qe},${qe},${di}\\)$`),bh={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};Uo(ui,an,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_h,formatHex:_h,formatHex8:U1,formatHsl:B1,formatRgb:Sh,toString:Sh});function _h(){return this.rgb().formatHex()}function U1(){return this.rgb().formatHex8()}function B1(){return Ah(this).formatHsl()}function Sh(){return this.rgb().formatRgb()}function an(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=L1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Th(t):n===3?new le(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ls(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ls(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=R1.exec(e))?new le(t[1],t[2],t[3],1):(t=I1.exec(e))?new le(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=k1.exec(e))?Ls(t[1],t[2],t[3],t[4]):(t=P1.exec(e))?Ls(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$1.exec(e))?Mh(t[1],t[2]/100,t[3]/100,1):(t=N1.exec(e))?Mh(t[1],t[2]/100,t[3]/100,t[4]):bh.hasOwnProperty(e)?Th(bh[e]):e==="transparent"?new le(NaN,NaN,NaN,0):null}function Th(e){return new le(e>>16&255,e>>8&255,e&255,1)}function Ls(e,t,n,r){return r<=0&&(e=t=n=NaN),new le(e,t,n,r)}function F1(e){return e instanceof ui||(e=an(e)),e?(e=e.rgb(),new le(e.r,e.g,e.b,e.opacity)):new le}function Bo(e,t,n,r){return arguments.length===1?F1(e):new le(e,t,n,r??1)}function le(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Uo(le,Bo,xh(ui,{brighter(e){return e=e==null?Ds:Math.pow(Ds,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hi:Math.pow(hi,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new le(Fn(this.r),Fn(this.g),Fn(this.b),Rs(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:wh,formatHex:wh,formatHex8:H1,formatRgb:Oh,toString:Oh}));function wh(){return`#${Hn(this.r)}${Hn(this.g)}${Hn(this.b)}`}function H1(){return`#${Hn(this.r)}${Hn(this.g)}${Hn(this.b)}${Hn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Oh(){const e=Rs(this.opacity);return`${e===1?"rgb(":"rgba("}${Fn(this.r)}, ${Fn(this.g)}, ${Fn(this.b)}${e===1?")":`, ${e})`}`}function Rs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hn(e){return e=Fn(e),(e<16?"0":"")+e.toString(16)}function Mh(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,n,r)}function Ah(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof ui||(e=an(e)),!e)return new ke;if(e instanceof ke)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(t===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-t)/o+2:a=(t-n)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new ke(a,o,l,e.opacity)}function Fo(e,t,n,r){return arguments.length===1?Ah(e):new ke(e,t,n,r??1)}function ke(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Uo(ke,Fo,xh(ui,{brighter(e){return e=e==null?Ds:Math.pow(Ds,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hi:Math.pow(hi,e),new ke(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new le(Ho(e>=240?e-240:e+120,i,r),Ho(e,i,r),Ho(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ke(Ch(this.h),Is(this.s),Is(this.l),Rs(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 e=Rs(this.opacity);return`${e===1?"hsl(":"hsla("}${Ch(this.h)}, ${Is(this.s)*100}%, ${Is(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ch(e){return e=(e||0)%360,e<0?e+360:e}function Is(e){return Math.max(0,Math.min(1,e||0))}function Ho(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Go=e=>()=>e;function G1(e,t){return function(n){return e+n*t}}function V1(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function z1(e){return(e=+e)==1?Dh:function(t,n){return n-t?V1(t,n,e):Go(isNaN(t)?n:t)}}function Dh(e,t){var n=t-e;return n?G1(e,n):Go(isNaN(e)?t:e)}const ks=function e(t){var n=z1(t);function r(i,s){var a=n((i=Bo(i)).r,(s=Bo(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=Dh(i.opacity,s.opacity);return function(u){return i.r=a(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function W1(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function Y1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function q1(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),a;for(a=0;a<r;++a)i[a]=fi(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<r;++a)s[a]=i[a](o);return s}}function X1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ve(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function j1(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=fi(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var Vo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zo=new RegExp(Vo.source,"g");function Z1(e){return function(){return e}}function K1(e){return function(t){return e(t)+""}}function Lh(e,t){var n=Vo.lastIndex=zo.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=Vo.exec(e))&&(i=zo.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:ve(r,i)})),n=zo.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?K1(l[0].x):Z1(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function fi(e,t){var n=typeof t,r;return t==null||n==="boolean"?Go(t):(n==="number"?ve:n==="string"?(r=an(t))?(t=r,ks):Lh:t instanceof an?ks:t instanceof Date?X1:Y1(t)?W1:Array.isArray(t)?q1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?j1:ve)(e,t)}function Rh(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ih=180/Math.PI,Wo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kh(e,t,n,r,i,s){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*Ih,skewX:Math.atan(l)*Ih,scaleX:a,scaleY:o}}var Ps;function Q1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wo:kh(t.a,t.b,t.c,t.d,t.e,t.f)}function J1(e){return e==null||(Ps||(Ps=document.createElementNS("http://www.w3.org/2000/svg","g")),Ps.setAttribute("transform",e),!(e=Ps.transform.baseVal.consolidate()))?Wo:(e=e.matrix,kh(e.a,e.b,e.c,e.d,e.e,e.f))}function Ph(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push("translate(",null,t,null,n);p.push({i:g-4,x:ve(c,d)},{i:g-2,x:ve(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ve(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ve(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push(i(f)+"scale(",null,",",null,")");p.push({i:g-4,x:ve(c,d)},{i:g-2,x:ve(u,h)})}else(d!==1||h!==1)&&f.push(i(f)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,d,h),a(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var p=-1,g=h.length,v;++p<g;)d[(v=h[p]).i]=v.x(f);return d.join("")}}}var tE=Ph(Q1,"px, ","px)","deg)"),eE=Ph(J1,", ",")",")");function nE(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var vr=0,pi=0,gi=0,$h=1e3,$s,mi,Ns=0,Gn=0,Us=0,vi=typeof performance=="object"&&performance.now?performance:Date,Nh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yo(){return Gn||(Nh(rE),Gn=vi.now()+Us)}function rE(){Gn=0}function Bs(){this._call=this._time=this._next=null}Bs.prototype=Uh.prototype={constructor:Bs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yo():+n)+(t==null?0:+t),!this._next&&mi!==this&&(mi?mi._next=this:$s=this,mi=this),this._call=e,this._time=n,qo()},stop:function(){this._call&&(this._call=null,this._time=1/0,qo())}};function Uh(e,t,n){var r=new Bs;return r.restart(e,t,n),r}function iE(){Yo(),++vr;for(var e=$s,t;e;)(t=Gn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vr}function Bh(){Gn=(Ns=vi.now())+Us,vr=pi=0;try{iE()}finally{vr=0,aE(),Gn=0}}function sE(){var e=vi.now(),t=e-Ns;t>$h&&(Us-=t,Ns=e)}function aE(){for(var e,t=$s,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:$s=n);mi=e,qo(r)}function qo(e){if(!vr){pi&&(pi=clearTimeout(pi));var t=e-Gn;t>24?(e<1/0&&(pi=setTimeout(Bh,e-vi.now()-Us)),gi&&(gi=clearInterval(gi))):(gi||(Ns=vi.now(),gi=setInterval(sE,$h)),vr=1,Nh(Bh))}}function Fh(e,t,n){var r=new Bs;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var oE=Ro("start","end","cancel","interrupt"),lE=[],Hh=0,Gh=1,Xo=2,Fs=3,Vh=4,jo=5,Hs=6;function Gs(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;cE(e,n,{name:t,index:r,group:i,on:oE,tween:lE,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Hh})}function Zo(e,t){var n=Pe(e,t);if(n.state>Hh)throw new Error("too late; already scheduled");return n}function Xe(e,t){var n=Pe(e,t);if(n.state>Fs)throw new Error("too late; already running");return n}function Pe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function cE(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Uh(s,0,n.time);function s(c){n.state=Gh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,d,h,f;if(n.state!==Gh)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===Fs)return Fh(a);f.state===Vh?(f.state=Hs,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=Hs,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Fh(function(){n.state===Fs&&(n.state=Vh,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Xo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Xo){for(n.state=Fs,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=f);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=jo,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===jo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Hs,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Ko(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>Xo&&r.state<jo,r.state=Hs,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function uE(e){return this.each(function(){Ko(this,e)})}function hE(e,t){var n,r;return function(){var i=Xe(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,o=r.length;a<o;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function dE(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Xe(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var o={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}s.tween=i}}function fE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Pe(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?hE:dE)(n,e,t))}function Qo(e,t,n){var r=e._id;return e.each(function(){var i=Xe(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Pe(i,r).value[t]}}function zh(e,t){var n;return(typeof t=="number"?ve:t instanceof an?ks:(n=an(t))?(t=n,ks):Lh)(e,t)}function pE(e){return function(){this.removeAttribute(e)}}function gE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mE(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}function vE(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}function yE(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function EE(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function xE(e,t){var n=As(e),r=n==="transform"?eE:zh;return this.attrTween(e,typeof t=="function"?(n.local?EE:yE)(n,r,Qo(this,"attr."+e,t)):t==null?(n.local?gE:pE)(n):(n.local?vE:mE)(n,r,t))}function bE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function _E(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function SE(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&_E(e,s)),n}return i._value=t,i}function TE(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&bE(e,s)),n}return i._value=t,i}function wE(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=As(e);return this.tween(n,(r.local?SE:TE)(r,t))}function OE(e,t){return function(){Zo(this,e).delay=+t.apply(this,arguments)}}function ME(e,t){return t=+t,function(){Zo(this,e).delay=t}}function AE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?OE:ME)(t,e)):Pe(this.node(),t).delay}function CE(e,t){return function(){Xe(this,e).duration=+t.apply(this,arguments)}}function DE(e,t){return t=+t,function(){Xe(this,e).duration=t}}function LE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?CE:DE)(t,e)):Pe(this.node(),t).duration}function RE(e,t){if(typeof t!="function")throw new Error;return function(){Xe(this,e).ease=t}}function IE(e){var t=this._id;return arguments.length?this.each(RE(t,e)):Pe(this.node(),t).ease}function kE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xe(this,e).ease=n}}function PE(e){if(typeof e!="function")throw new Error;return this.each(kE(this._id,e))}function $E(e){typeof e!="function"&&(e=uh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new on(r,this._parents,this._name,this._id)}function NE(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=t[o],c=n[o],u=l.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=l[f]||c[f])&&(d[f]=h);for(;o<r;++o)a[o]=t[o];return new on(a,this._parents,this._name,this._id)}function UE(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function BE(e,t,n){var r,i,s=UE(t)?Zo:Xe;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function FE(e,t){var n=this._id;return arguments.length<2?Pe(this.node(),n).on.on(e):this.each(BE(n,e,t))}function HE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function GE(){return this.on("end.remove",HE(this._id))}function VE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ko(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,c=s[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,Gs(c[h],t,n,h,c,Pe(u,n)));return new on(s,this._parents,t,n)}function zE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ch(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),f,p=Pe(u,n),g=0,v=h.length;g<v;++g)(f=h[g])&&Gs(f,t,n,g,h,p);s.push(h),a.push(u)}return new on(s,a,t,n)}var WE=ci.prototype.constructor;function YE(){return new WE(this._groups,this._parents)}function qE(e,t){var n,r,i;return function(){var s=gr(this,e),a=(this.style.removeProperty(e),gr(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Wh(e){return function(){this.style.removeProperty(e)}}function XE(e,t,n){var r,i=n+"",s;return function(){var a=gr(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function jE(e,t,n){var r,i,s;return function(){var a=gr(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),gr(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function ZE(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=Xe(this,e),c=l.on,u=l.value[s]==null?o||(o=Wh(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function KE(e,t,n){var r=(e+="")=="transform"?tE:zh;return t==null?this.styleTween(e,qE(e,r)).on("end.style."+e,Wh(e)):typeof t=="function"?this.styleTween(e,jE(e,r,Qo(this,"style."+e,t))).each(ZE(this._id,e)):this.styleTween(e,XE(e,r,t),n).on("end.style."+e,null)}function QE(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function JE(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&QE(e,a,n)),r}return s._value=t,s}function tx(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,JE(e,t,n??""))}function ex(e){return function(){this.textContent=e}}function nx(e){return function(){var t=e(this);this.textContent=t??""}}function rx(e){return this.tween("text",typeof e=="function"?nx(Qo(this,"text",e)):ex(e==null?"":e+""))}function ix(e){return function(t){this.textContent=e.call(this,t)}}function sx(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&ix(i)),t}return r._value=e,r}function ax(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,sx(e))}function ox(){for(var e=this._name,t=this._id,n=Yh(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)if(l=a[c]){var u=Pe(l,t);Gs(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new on(r,this._parents,e,n)}function lx(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--i===0&&s()}};n.each(function(){var c=Xe(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&s()})}var cx=0;function on(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Yh(){return++cx}var ln=ci.prototype;on.prototype={constructor:on,select:VE,selectAll:zE,selectChild:ln.selectChild,selectChildren:ln.selectChildren,filter:$E,merge:NE,selection:YE,transition:ox,call:ln.call,nodes:ln.nodes,node:ln.node,size:ln.size,empty:ln.empty,each:ln.each,on:FE,attr:xE,attrTween:wE,style:KE,styleTween:tx,text:rx,textTween:ax,remove:GE,tween:fE,delay:AE,duration:LE,ease:IE,easeVarying:PE,end:lx,[Symbol.iterator]:ln[Symbol.iterator]};const ux=e=>+e;function qh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hx={time:null,delay:0,duration:250,ease:qh};function dx(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function fx(e){var t,n;e instanceof on?(t=e._id,e=e._name):(t=Yh(),(n=hx).time=Yo(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&Gs(l,e,t,c,a,n||dx(l,t));return new on(r,this._parents,e,t)}ci.prototype.interrupt=uE,ci.prototype.transition=fx;const Jo=e=>()=>e;function px(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,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:s}})}function gx(e){e.stopImmediatePropagation()}function tl(e){e.preventDefault(),e.stopImmediatePropagation()}var Xh={name:"drag"},el={name:"space"},yr={name:"handle"},Er={name:"center"};const{abs:jh,max:Zt,min:Kt}=Math;function Zh(e){return[+e[0],+e[1]]}function Kh(e){return[Zh(e[0]),Zh(e[1])]}var Vs={name:"x",handles:["w","e"].map(zs),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},nl={name:"y",handles:["n","s"].map(zs),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},cn={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"},Qh={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Jh={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mx={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},vx={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function zs(e){return{type:e}}function yx(e){return!e.ctrlKey&&!e.button}function Ex(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function xx(){return navigator.maxTouchPoints||"ontouchstart"in this}function rl(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function bx(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function td(){return _x(Vs)}function _x(e){var t=Ex,n=yx,r=xx,i=!0,s=Ro("start","brush","end"),a=6,o;function l(v){var m=v.property("__brush",g).selectAll(".overlay").data([zs("overlay")]);m.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",cn.overlay).merge(m).each(function(){var E=rl(this).extent;L(this).attr("x",E[0][0]).attr("y",E[0][1]).attr("width",E[1][0]-E[0][0]).attr("height",E[1][1]-E[0][1])}),v.selectAll(".selection").data([zs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",cn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=v.selectAll(".handle").data(e.handles,function(E){return E.type});y.exit().remove(),y.enter().append("rect").attr("class",function(E){return"handle handle--"+E.type}).attr("cursor",function(E){return cn[E.type]}),v.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(v,m,y){v.tween?v.on("start.brush",function(E){u(this,arguments).beforestart().start(E)}).on("interrupt.brush end.brush",function(E){u(this,arguments).end(E)}).tween("brush",function(){var E=this,_=E.__brush,S=u(E,arguments),b=_.selection,M=e.input(typeof m=="function"?m.apply(this,arguments):m,_.extent),D=fi(b,M);function G(I){_.selection=I===1&&M===null?null:D(I),c.call(E),S.brush()}return b!==null&&M!==null?G:G(1)}):v.each(function(){var E=this,_=arguments,S=E.__brush,b=e.input(typeof m=="function"?m.apply(E,_):m,S.extent),M=u(E,_).beforestart();Ko(E),S.selection=b===null?null:b,c.call(E),M.start(y).brush(y).end(y)})},l.clear=function(v,m){l.move(v,null,m)};function c(){var v=L(this),m=rl(this).selection;m?(v.selectAll(".selection").style("display",null).attr("x",m[0][0]).attr("y",m[0][1]).attr("width",m[1][0]-m[0][0]).attr("height",m[1][1]-m[0][1]),v.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?m[1][0]-a/2:m[0][0]-a/2}).attr("y",function(y){return y.type[0]==="s"?m[1][1]-a/2:m[0][1]-a/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?m[1][0]-m[0][0]+a:a}).attr("height",function(y){return y.type==="e"||y.type==="w"?m[1][1]-m[0][1]+a:a})):v.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(v,m,y){var E=v.__brush.emitter;return E&&(!y||!E.clean)?E:new d(v,m,y)}function d(v,m,y){this.that=v,this.args=m,this.state=v.__brush,this.active=0,this.clean=y}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(v,m){return this.starting?(this.starting=!1,this.emit("start",v,m)):this.emit("brush",v),this},brush:function(v,m){return this.emit("brush",v,m),this},end:function(v,m){return--this.active===0&&(delete this.state.emitter,this.emit("end",v,m)),this},emit:function(v,m,y){var E=L(this.that).datum();s.call(v,this.that,new px(v,{sourceEvent:m,target:l,selection:e.output(this.state.selection),mode:y,dispatch:s}),E)}};function h(v){if(o&&!v.touches||!n.apply(this,arguments))return;var m=this,y=v.target.__data__.type,E=(i&&v.metaKey?y="overlay":y)==="selection"?Xh:i&&v.altKey?Er:yr,_=e===nl?null:mx[y],S=e===Vs?null:vx[y],b=rl(m),M=b.extent,D=b.selection,G=M[0][0],I,w,C=M[0][1],R,P,O=M[1][0],H,B,U=M[1][1],N,j,Y=0,it=0,et,q=_&&S&&i&&v.shiftKey,Q,pt,ot=Array.from(v.touches||[v],st=>{const Rt=st.identifier;return st=Bn(st,m),st.point0=st.slice(),st.identifier=Rt,st});Ko(m);var Tt=u(m,arguments,!0).beforestart();if(y==="overlay"){D&&(et=!0);const st=[ot[0],ot[1]||ot[0]];b.selection=D=[[I=e===nl?G:Kt(st[0][0],st[1][0]),R=e===Vs?C:Kt(st[0][1],st[1][1])],[H=e===nl?O:Zt(st[0][0],st[1][0]),N=e===Vs?U:Zt(st[0][1],st[1][1])]],ot.length>1&&mt(v)}else I=D[0][0],R=D[0][1],H=D[1][0],N=D[1][1];w=I,P=R,B=H,j=N;var Z=L(m).attr("pointer-events","none"),F=Z.selectAll(".overlay").attr("cursor",cn[y]);if(v.touches)Tt.moved=$,Tt.ended=gt;else{var V=L(v.view).on("mousemove.brush",$,!0).on("mouseup.brush",gt,!0);i&&V.on("keydown.brush",Ht,!0).on("keyup.brush",Gt,!0),C1(v.view)}c.call(m),Tt.start(v,E.name);function $(st){for(const Rt of st.changedTouches||[st])for(const hr of ot)hr.identifier===Rt.identifier&&(hr.cur=Bn(Rt,m));if(q&&!Q&&!pt&&ot.length===1){const Rt=ot[0];jh(Rt.cur[0]-Rt[0])>jh(Rt.cur[1]-Rt[1])?pt=!0:Q=!0}for(const Rt of ot)Rt.cur&&(Rt[0]=Rt.cur[0],Rt[1]=Rt.cur[1]);et=!0,tl(st),mt(st)}function mt(st){const Rt=ot[0],hr=Rt.point0;var Le;switch(Y=Rt[0]-hr[0],it=Rt[1]-hr[1],E){case el:case Xh:{_&&(Y=Zt(G-I,Kt(O-H,Y)),w=I+Y,B=H+Y),S&&(it=Zt(C-R,Kt(U-N,it)),P=R+it,j=N+it);break}case yr:{ot[1]?(_&&(w=Zt(G,Kt(O,ot[0][0])),B=Zt(G,Kt(O,ot[1][0])),_=1),S&&(P=Zt(C,Kt(U,ot[0][1])),j=Zt(C,Kt(U,ot[1][1])),S=1)):(_<0?(Y=Zt(G-I,Kt(O-I,Y)),w=I+Y,B=H):_>0&&(Y=Zt(G-H,Kt(O-H,Y)),w=I,B=H+Y),S<0?(it=Zt(C-R,Kt(U-R,it)),P=R+it,j=N):S>0&&(it=Zt(C-N,Kt(U-N,it)),P=R,j=N+it));break}case Er:{_&&(w=Zt(G,Kt(O,I-Y*_)),B=Zt(G,Kt(O,H+Y*_))),S&&(P=Zt(C,Kt(U,R-it*S)),j=Zt(C,Kt(U,N+it*S)));break}}B<w&&(_*=-1,Le=I,I=H,H=Le,Le=w,w=B,B=Le,y in Qh&&F.attr("cursor",cn[y=Qh[y]])),j<P&&(S*=-1,Le=R,R=N,N=Le,Le=P,P=j,j=Le,y in Jh&&F.attr("cursor",cn[y=Jh[y]])),b.selection&&(D=b.selection),Q&&(w=D[0][0],B=D[1][0]),pt&&(P=D[0][1],j=D[1][1]),(D[0][0]!==w||D[0][1]!==P||D[1][0]!==B||D[1][1]!==j)&&(b.selection=[[w,P],[B,j]],c.call(m),Tt.brush(st,E.name))}function gt(st){if(gx(st),st.touches){if(st.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else D1(st.view,et),V.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Z.attr("pointer-events","all"),F.attr("cursor",cn.overlay),b.selection&&(D=b.selection),bx(D)&&(b.selection=null,c.call(m)),Tt.end(st,E.name)}function Ht(st){switch(st.keyCode){case 16:{q=_&&S;break}case 18:{E===yr&&(_&&(H=B-Y*_,I=w+Y*_),S&&(N=j-it*S,R=P+it*S),E=Er,mt(st));break}case 32:{(E===yr||E===Er)&&(_<0?H=B-Y:_>0&&(I=w-Y),S<0?N=j-it:S>0&&(R=P-it),E=el,F.attr("cursor",cn.selection),mt(st));break}default:return}tl(st)}function Gt(st){switch(st.keyCode){case 16:{q&&(Q=pt=q=!1,mt(st));break}case 18:{E===Er&&(_<0?H=B:_>0&&(I=w),S<0?N=j:S>0&&(R=P),E=yr,mt(st));break}case 32:{E===el&&(st.altKey?(_&&(H=B-Y*_,I=w+Y*_),S&&(N=j-it*S,R=P+it*S),E=Er):(_<0?H=B:_>0&&(I=w),S<0?N=j:S>0&&(R=P),E=yr),F.attr("cursor",cn[y]),mt(st));break}default:return}tl(st)}}function f(v){u(this,arguments).moved(v)}function p(v){u(this,arguments).ended(v)}function g(){var v=this.__brush||{selection:null};return v.extent=Kh(t.apply(this,arguments)),v.dim=e,v}return l.extent=function(v){return arguments.length?(t=typeof v=="function"?v:Jo(Kh(v)),l):t},l.filter=function(v){return arguments.length?(n=typeof v=="function"?v:Jo(!!v),l):n},l.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:Jo(!!v),l):r},l.handleSize=function(v){return arguments.length?(a=+v,l):a},l.keyModifiers=function(v){return arguments.length?(i=!!v,l):i},l.on=function(){var v=s.on.apply(s,arguments);return v===s?l:v},l}const il=Math.PI,sl=2*il,Vn=1e-6,Sx=sl-Vn;function ed(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Tx(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ed;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let wx=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ed:Tx(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,c=i-n,u=a-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Vn)if(!(Math.abs(d*l-c*u)>Vn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,g=l*l+c*c,v=f*f+p*p,m=Math.sqrt(g),y=Math.sqrt(h),E=s*Math.tan((il-Math.acos((g+h-v)/(2*m*y)))/2),_=E/y,S=E/m;Math.abs(_-1)>Vn&&this._append`L${t+_*u},${n+_*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Vn||Math.abs(this._y1-u)>Vn)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%sl+sl),h>Sx?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>Vn&&this._append`A${r},${r},0,${+(h>=il)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Ox(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ws(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xr(e){return e=Ws(Math.abs(e)),e?e[1]:NaN}function Mx(e,t){return function(n,r){for(var i=n.length,s=[],a=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),s.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function Ax(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Cx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yi(e){if(!(t=Cx.exec(e)))throw new Error("invalid format: "+e);var t;return new al({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}yi.prototype=al.prototype;function al(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}al.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 Dx(e){t:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var nd;function Lx(e,t){var n=Ws(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(nd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ws(e,Math.max(0,t+s-1))[0]}function rd(e,t){var n=Ws(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const id={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Ox,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>rd(e*100,t),r:rd,s:Lx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sd(e){return e}var ad=Array.prototype.map,od=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Rx(e){var t=e.grouping===void 0||e.thousands===void 0?sd:Mx(ad.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?sd:Ax(ad.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=yi(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,v=d.zero,m=d.width,y=d.comma,E=d.precision,_=d.trim,S=d.type;S==="n"?(y=!0,S="g"):id[S]||(E===void 0&&(E=12),_=!0,S="g"),(v||h==="0"&&f==="=")&&(v=!0,h="0",f="=");var b=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",M=g==="$"?r:/[%p]/.test(S)?a:"",D=id[S],G=/[defgprs%]/.test(S);E=E===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function I(w){var C=b,R=M,P,O,H;if(S==="c")R=D(w)+R,w="";else{w=+w;var B=w<0||1/w<0;if(w=isNaN(w)?l:D(Math.abs(w),E),_&&(w=Dx(w)),B&&+w==0&&p!=="+"&&(B=!1),C=(B?p==="("?p:o:p==="-"||p==="("?"":p)+C,R=(S==="s"?od[8+nd/3]:"")+R+(B&&p==="("?")":""),G){for(P=-1,O=w.length;++P<O;)if(H=w.charCodeAt(P),48>H||H>57){R=(H===46?i+w.slice(P+1):w.slice(P))+R,w=w.slice(0,P);break}}}y&&!v&&(w=t(w,1/0));var U=C.length+w.length+R.length,N=U<m?new Array(m-U+1).join(h):"";switch(y&&v&&(w=t(N+w,N.length?m-R.length:1/0),N=""),f){case"<":w=C+w+R+N;break;case"=":w=C+N+w+R;break;case"^":w=N.slice(0,U=N.length>>1)+C+w+R+N.slice(U);break;default:w=N+C+w+R;break}return s(w)}return I.toString=function(){return d+""},I}function u(d,h){var f=c((d=yi(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(xr(h)/3)))*3,g=Math.pow(10,-p),v=od[8+p/3];return function(m){return f(g*m)+v}}return{format:c,formatPrefix:u}}var Ys,ol,ld;Ix({thousands:",",grouping:[3],currency:["$",""]});function Ix(e){return Ys=Rx(e),ol=Ys.format,ld=Ys.formatPrefix,Ys}function kx(e){return Math.max(0,-xr(Math.abs(e)))}function Px(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xr(t)/3)))*3-xr(Math.abs(e)))}function $x(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xr(t)-xr(e))+1}var xt=1e-6,cd=1e-12,ht=Math.PI,ce=ht/2,ud=ht/4,ye=ht*2,re=180/ht,$t=ht/180,bt=Math.abs,hd=Math.atan,zn=Math.atan2,St=Math.cos,Nx=Math.exp,Ux=Math.log,Et=Math.sin,An=Math.sign||function(e){return e>0?1:e<0?-1:0},$e=Math.sqrt,Bx=Math.tan;function Fx(e){return e>1?0:e<-1?ht:Math.acos(e)}function un(e){return e>1?ce:e<-1?-ce:Math.asin(e)}function Te(){}function qs(e,t){e&&fd.hasOwnProperty(e.type)&&fd[e.type](e,t)}var dd={Feature:function(e,t){qs(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)qs(n[r].geometry,t)}},fd={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){ll(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)ll(n[r],t,0)},Polygon:function(e,t){pd(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)pd(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)qs(n[r],t)}};function ll(e,t,n){var r=-1,i=e.length-n,s;for(t.lineStart();++r<i;)s=e[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function pd(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)ll(e[n],t,1);t.polygonEnd()}function br(e,t){e&&dd.hasOwnProperty(e.type)?dd[e.type](e,t):qs(e,t)}function cl(e){return[zn(e[1],e[0]),un(e[2])]}function _r(e){var t=e[0],n=e[1],r=St(n);return[r*St(t),r*Et(t),Et(n)]}function Xs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function js(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function ul(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Zs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function hl(e){var t=$e(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function dl(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function fl(e,t){return bt(e)>ht&&(e-=Math.round(e/ye)*ye),[e,t]}fl.invert=fl;function gd(e,t,n){return(e%=ye)?t||n?dl(vd(e),yd(t,n)):vd(e):t||n?yd(t,n):fl}function md(e){return function(t,n){return t+=e,bt(t)>ht&&(t-=Math.round(t/ye)*ye),[t,n]}}function vd(e){var t=md(e);return t.invert=md(-e),t}function yd(e,t){var n=St(e),r=Et(e),i=St(t),s=Et(t);function a(o,l){var c=St(l),u=St(o)*c,d=Et(o)*c,h=Et(l),f=h*n+u*r;return[zn(d*i-f*s,u*n-h*r),un(f*i+d*s)]}return a.invert=function(o,l){var c=St(l),u=St(o)*c,d=Et(o)*c,h=Et(l),f=h*i-d*s;return[zn(d*i+h*s,u*n+f*r),un(f*n-u*r)]},a}function Hx(e){e=gd(e[0]*$t,e[1]*$t,e.length>2?e[2]*$t:0);function t(n){return n=e(n[0]*$t,n[1]*$t),n[0]*=re,n[1]*=re,n}return t.invert=function(n){return n=e.invert(n[0]*$t,n[1]*$t),n[0]*=re,n[1]*=re,n},t}function Gx(e,t,n,r,i,s){if(n){var a=St(t),o=Et(t),l=r*n;i==null?(i=t+r*ye,s=t-l/2):(i=Ed(a,i),s=Ed(a,s),(r>0?i<s:i>s)&&(i+=r*ye));for(var c,u=i;r>0?u>s:u<s;u-=l)c=cl([a,-o*St(u),-o*Et(u)]),e.point(c[0],c[1])}}function Ed(e,t){t=_r(t),t[0]-=e,hl(t);var n=Fx(-t[1]);return((-t[2]<0?-n:n)+ye-xt)%ye}function xd(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Te,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ks(e,t){return bt(e[0]-t[0])<xt&&bt(e[1]-t[1])<xt}function Qs(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function bd(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,v=p[0],m=p[g],y;if(Ks(v,m)){if(!v[2]&&!m[2]){for(i.lineStart(),o=0;o<g;++o)i.point((v=p[o])[0],v[1]);i.lineEnd();return}m[0]+=2*xt}s.push(y=new Qs(v,p,null,!0)),a.push(y.o=new Qs(v,null,y,!1)),s.push(y=new Qs(m,p,null,!1)),a.push(y.o=new Qs(m,null,y,!0))}}),!!s.length){for(a.sort(t),_d(s),_d(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,d;;){for(var h=c,f=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);i.lineEnd()}}}function _d(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function pl(e){return bt(e[0])<=ht?e[0]:An(e[0])*((bt(e[0])+ht)%ye-ht)}function Vx(e,t){var n=pl(t),r=t[1],i=Et(r),s=[Et(n),-St(n),0],a=0,o=0,l=new Nn;i===1?r=ce+xt:i===-1&&(r=-ce-xt);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,f=d[h-1],p=pl(f),g=f[1]/2+ud,v=Et(g),m=St(g),y=0;y<h;++y,p=_,v=b,m=M,f=E){var E=d[y],_=pl(E),S=E[1]/2+ud,b=Et(S),M=St(S),D=_-p,G=D>=0?1:-1,I=G*D,w=I>ht,C=v*b;if(l.add(zn(C*G*Et(I),m*M+C*St(I))),a+=w?D+G*ye:D,w^p>=n^_>=n){var R=js(_r(f),_r(E));hl(R);var P=js(s,R);hl(P);var O=(w^D>=0?-1:1)*un(P[2]);(r>O||r===O&&(R[0]||R[1]))&&(o+=w^D>=0?1:-1)}}return(a<-xt||a<xt&&l<-cd)^o&1}function Sd(e,t,n,r){return function(i){var s=t(i),a=xd(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:g,lineEnd:v,polygonStart:function(){h.point=m,h.lineStart=y,h.lineEnd=E,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=v,u=rh(u);var _=Vx(c,r);u.length?(l||(i.polygonStart(),l=!0),bd(u,Wx,_,n,i)):_&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(_,S){e(_,S)&&i.point(_,S)}function p(_,S){s.point(_,S)}function g(){h.point=p,s.lineStart()}function v(){h.point=f,s.lineEnd()}function m(_,S){d.push([_,S]),o.point(_,S)}function y(){o.lineStart(),d=[]}function E(){m(d[0][0],d[0][1]),o.lineEnd();var _=o.clean(),S=a.result(),b,M=S.length,D,G,I;if(d.pop(),c.push(d),d=null,!!M){if(_&1){if(G=S[0],(D=G.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),b=0;b<D;++b)i.point((I=G[b])[0],I[1]);i.lineEnd()}return}M>1&&_&2&&S.push(S.pop().concat(S.shift())),u.push(S.filter(zx))}}return h}}function zx(e){return e.length>1}function Wx(e,t){return((e=e.x)[0]<0?e[1]-ce-xt:ce-e[1])-((t=t.x)[0]<0?t[1]-ce-xt:ce-t[1])}const Td=Sd(function(){return!0},Yx,Xx,[-ht,-ce]);function Yx(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?ht:-ht,l=bt(s-t);bt(l-ht)<xt?(e.point(t,n=(n+a)/2>0?ce:-ce),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=ht&&(bt(t-r)<xt&&(t-=r*xt),bt(s-o)<xt&&(s-=o*xt),n=qx(t,n,s,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),i=0),e.point(t=s,n=a),r=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function qx(e,t,n,r){var i,s,a=Et(e-n);return bt(a)>xt?hd((Et(t)*(s=St(r))*Et(n)-Et(r)*(i=St(t))*Et(e))/(i*s*a)):(t+r)/2}function Xx(e,t,n,r){var i;if(e==null)i=n*ce,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(bt(e[0]-t[0])>xt){var s=e[0]<t[0]?ht:-ht;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function jx(e){var t=St(e),n=6*$t,r=t>0,i=bt(t)>xt;function s(u,d,h,f){Gx(f,e,n,h,u,d)}function a(u,d){return St(u)*St(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(v,m){var y=[v,m],E,_=a(v,m),S=r?_?0:c(v,m):_?c(v+(v<0?ht:-ht),m):0;if(!d&&(p=f=_)&&u.lineStart(),_!==f&&(E=l(d,y),(!E||Ks(d,E)||Ks(y,E))&&(y[2]=1)),_!==f)g=0,_?(u.lineStart(),E=l(y,d),u.point(E[0],E[1])):(E=l(d,y),u.point(E[0],E[1],2),u.lineEnd()),d=E;else if(i&&d&&r^_){var b;!(S&h)&&(b=l(y,d,!0))&&(g=0,r?(u.lineStart(),u.point(b[0][0],b[0][1]),u.point(b[1][0],b[1][1]),u.lineEnd()):(u.point(b[1][0],b[1][1]),u.lineEnd(),u.lineStart(),u.point(b[0][0],b[0][1],3)))}_&&(!d||!Ks(d,y))&&u.point(y[0],y[1]),d=y,f=_,h=S},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function l(u,d,h){var f=_r(u),p=_r(d),g=[1,0,0],v=js(f,p),m=Xs(v,v),y=v[0],E=m-y*y;if(!E)return!h&&u;var _=t*m/E,S=-t*y/E,b=js(g,v),M=Zs(g,_),D=Zs(v,S);ul(M,D);var G=b,I=Xs(M,G),w=Xs(G,G),C=I*I-w*(Xs(M,M)-1);if(!(C<0)){var R=$e(C),P=Zs(G,(-I-R)/w);if(ul(P,M),P=cl(P),!h)return P;var O=u[0],H=d[0],B=u[1],U=d[1],N;H<O&&(N=O,O=H,H=N);var j=H-O,Y=bt(j-ht)<xt,it=Y||j<xt;if(!Y&&U<B&&(N=B,B=U,U=N),it?Y?B+U>0^P[1]<(bt(P[0]-O)<xt?B:U):B<=P[1]&&P[1]<=U:j>ht^(O<=P[0]&&P[0]<=H)){var et=Zs(G,(-I+R)/w);return ul(et,M),[P,cl(et)]}}}function c(u,d){var h=r?e:ht-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return Sd(a,o,s,r?[0,-e]:[-ht,e-ht])}function Zx(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-a,f=c-o,p;if(p=n-a,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>u&&(u=p)}if(p=i-a,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<d&&(d=p)}if(p=r-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>u&&(u=p)}if(p=s-o,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<d&&(d=p)}return u>0&&(e[0]=a+u*h,e[1]=o+u*f),d<1&&(t[0]=a+d*h,t[1]=o+d*f),!0}}}}}var Ei=1e9,Js=-Ei;function Kx(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,h){var f=0,p=0;if(c==null||(f=a(c,d))!==(p=a(u,d))||l(c,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?r:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(c,u){return bt(c[0]-e)<xt?u>0?0:3:bt(c[0]-n)<xt?u>0?2:1:bt(c[1]-t)<xt?u>0?1:0:u>0?3:2}function o(c,u){return l(c.x,u.x)}function l(c,u){var d=a(c,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=xd(),h,f,p,g,v,m,y,E,_,S,b,M={point:D,lineStart:C,lineEnd:R,polygonStart:I,polygonEnd:w};function D(O,H){i(O,H)&&u.point(O,H)}function G(){for(var O=0,H=0,B=f.length;H<B;++H)for(var U=f[H],N=1,j=U.length,Y=U[0],it,et,q=Y[0],Q=Y[1];N<j;++N)it=q,et=Q,Y=U[N],q=Y[0],Q=Y[1],et<=r?Q>r&&(q-it)*(r-et)>(Q-et)*(e-it)&&++O:Q<=r&&(q-it)*(r-et)<(Q-et)*(e-it)&&--O;return O}function I(){u=d,h=[],f=[],b=!0}function w(){var O=G(),H=b&&O,B=(h=rh(h)).length;(H||B)&&(c.polygonStart(),H&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),B&&bd(h,o,O,s,c),c.polygonEnd()),u=c,h=f=p=null}function C(){M.point=P,f&&f.push(p=[]),S=!0,_=!1,y=E=NaN}function R(){h&&(P(g,v),m&&_&&d.rejoin(),h.push(d.result())),M.point=D,_&&u.lineEnd()}function P(O,H){var B=i(O,H);if(f&&p.push([O,H]),S)g=O,v=H,m=B,S=!1,B&&(u.lineStart(),u.point(O,H));else if(B&&_)u.point(O,H);else{var U=[y=Math.max(Js,Math.min(Ei,y)),E=Math.max(Js,Math.min(Ei,E))],N=[O=Math.max(Js,Math.min(Ei,O)),H=Math.max(Js,Math.min(Ei,H))];Zx(U,N,e,t,n,r)?(_||(u.lineStart(),u.point(U[0],U[1])),u.point(N[0],N[1]),B||u.lineEnd(),b=!1):B&&(u.lineStart(),u.point(O,H),b=!1)}y=O,E=H,_=B}return M}}const gl=e=>e;var ml=new Nn,vl=new Nn,wd,Od,yl,El,Cn={point:Te,lineStart:Te,lineEnd:Te,polygonStart:function(){Cn.lineStart=Qx,Cn.lineEnd=tb},polygonEnd:function(){Cn.lineStart=Cn.lineEnd=Cn.point=Te,ml.add(bt(vl)),vl=new Nn},result:function(){var e=ml/2;return ml=new Nn,e}};function Qx(){Cn.point=Jx}function Jx(e,t){Cn.point=Md,wd=yl=e,Od=El=t}function Md(e,t){vl.add(El*e-yl*t),yl=e,El=t}function tb(){Md(wd,Od)}const Ad=Cn;var Sr=1/0,ta=Sr,xi=-Sr,ea=xi,eb={point:nb,lineStart:Te,lineEnd:Te,polygonStart:Te,polygonEnd:Te,result:function(){var e=[[Sr,ta],[xi,ea]];return xi=ea=-(ta=Sr=1/0),e}};function nb(e,t){e<Sr&&(Sr=e),e>xi&&(xi=e),t<ta&&(ta=t),t>ea&&(ea=t)}const na=eb;var xl=0,bl=0,bi=0,ra=0,ia=0,Tr=0,_l=0,Sl=0,_i=0,Cd,Dd,je,Ze,Ne={point:Wn,lineStart:Ld,lineEnd:Rd,polygonStart:function(){Ne.lineStart=sb,Ne.lineEnd=ab},polygonEnd:function(){Ne.point=Wn,Ne.lineStart=Ld,Ne.lineEnd=Rd},result:function(){var e=_i?[_l/_i,Sl/_i]:Tr?[ra/Tr,ia/Tr]:bi?[xl/bi,bl/bi]:[NaN,NaN];return xl=bl=bi=ra=ia=Tr=_l=Sl=_i=0,e}};function Wn(e,t){xl+=e,bl+=t,++bi}function Ld(){Ne.point=rb}function rb(e,t){Ne.point=ib,Wn(je=e,Ze=t)}function ib(e,t){var n=e-je,r=t-Ze,i=$e(n*n+r*r);ra+=i*(je+e)/2,ia+=i*(Ze+t)/2,Tr+=i,Wn(je=e,Ze=t)}function Rd(){Ne.point=Wn}function sb(){Ne.point=ob}function ab(){Id(Cd,Dd)}function ob(e,t){Ne.point=Id,Wn(Cd=je=e,Dd=Ze=t)}function Id(e,t){var n=e-je,r=t-Ze,i=$e(n*n+r*r);ra+=i*(je+e)/2,ia+=i*(Ze+t)/2,Tr+=i,i=Ze*e-je*t,_l+=i*(je+e),Sl+=i*(Ze+t),_i+=i*3,Wn(je=e,Ze=t)}const kd=Ne;function Pd(e){this._context=e}Pd.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,ye);break}}},result:Te};var Tl=new Nn,wl,$d,Nd,Si,Ti,sa={point:Te,lineStart:function(){sa.point=lb},lineEnd:function(){wl&&Ud($d,Nd),sa.point=Te},polygonStart:function(){wl=!0},polygonEnd:function(){wl=null},result:function(){var e=+Tl;return Tl=new Nn,e}};function lb(e,t){sa.point=Ud,$d=Si=e,Nd=Ti=t}function Ud(e,t){Si-=e,Ti-=t,Tl.add($e(Si*Si+Ti*Ti)),Si=e,Ti=t}const Bd=sa;let Fd,aa,Hd,Gd;class Vd{constructor(t){this._append=t==null?zd:cb(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==Hd||this._append!==aa){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`,Hd=r,aa=this._append,Gd=this._,this._=i}this._+=Gd;break}}}result(){const t=this._;return this._="",t.length?t:null}}function zd(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function cb(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return zd;if(t!==Fd){const n=10**t;Fd=t,aa=function(i){let s=1;this._+=i[0];for(const a=i.length;s<a;++s)this._+=Math.round(arguments[s]*n)/n+i[s]}}return aa}function ub(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),br(o,i(s))),s.result()}return a.area=function(o){return br(o,i(Ad)),Ad.result()},a.measure=function(o){return br(o,i(Bd)),Bd.result()},a.bounds=function(o){return br(o,i(na)),na.result()},a.centroid=function(o){return br(o,i(kd)),kd.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,gl):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new Vd(n)):new Pd(t=o),typeof r!="function"&&s.pointRadius(r),a):t},a.pointRadius=function(o){return arguments.length?(r=typeof o=="function"?o:(s.pointRadius(+o),+o),a):r},a.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const l=Math.floor(o);if(!(l>=0))throw new RangeError(`invalid digits: ${o}`);n=l}return t===null&&(s=new Vd(n)),a},a.projection(e).digits(n).context(t)}function Ol(e){return function(t){var n=new Ml;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ml(){}Ml.prototype={constructor:Ml,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Al(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),br(n,e.stream(na)),t(na.result()),r!=null&&e.clipExtent(r),e}function Wd(e,t,n){return Al(e,function(r){var i=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),s/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(s-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,l])},n)}function hb(e,t,n){return Wd(e,[[0,0],t],n)}function db(e,t,n){return Al(e,function(r){var i=+t,s=i/(r[1][0]-r[0][0]),a=(i-s*(r[1][0]+r[0][0]))/2,o=-s*r[0][1];e.scale(150*s).translate([a,o])},n)}function fb(e,t,n){return Al(e,function(r){var i=+t,s=i/(r[1][1]-r[0][1]),a=-s*r[0][0],o=(i-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,o])},n)}var Yd=16,pb=St(30*$t);function qd(e,t){return+t?mb(e,t):gb(e)}function gb(e){return Ol({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function mb(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,g,v){var m=c-r,y=u-i,E=m*m+y*y;if(E>4*t&&g--){var _=a+h,S=o+f,b=l+p,M=$e(_*_+S*S+b*b),D=un(b/=M),G=bt(bt(b)-1)<xt||bt(s-d)<xt?(s+d)/2:zn(S,_),I=e(G,D),w=I[0],C=I[1],R=w-r,P=C-i,O=y*R-m*P;(O*O/E>t||bt((m*R+y*P)/E-.5)>.3||a*h+o*f+l*p<pb)&&(n(r,i,s,a,o,l,w,C,G,_/=M,S/=M,b,g,v),v.point(w,C),n(w,C,G,_,S,b,c,u,d,h,f,p,g,v))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,g,v={point:m,lineStart:y,lineEnd:_,polygonStart:function(){r.polygonStart(),v.lineStart=S},polygonEnd:function(){r.polygonEnd(),v.lineStart=y}};function m(D,G){D=e(D,G),r.point(D[0],D[1])}function y(){d=NaN,v.point=E,r.lineStart()}function E(D,G){var I=_r([D,G]),w=e(D,G);n(d,h,u,f,p,g,d=w[0],h=w[1],u=D,f=I[0],p=I[1],g=I[2],Yd,r),r.point(d,h)}function _(){v.point=m,r.lineEnd()}function S(){y(),v.point=b,v.lineEnd=M}function b(D,G){E(i=D,G),s=d,a=h,o=f,l=p,c=g,v.point=E}function M(){n(d,h,u,f,p,g,s,a,i,o,l,c,Yd,r),v.lineEnd=_,_()}return v}}var vb=Ol({point:function(e,t){this.stream.point(e*$t,t*$t)}});function yb(e){return Ol({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Eb(e,t,n,r,i){function s(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return s.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},s}function Xd(e,t,n,r,i,s){if(!s)return Eb(e,t,n,r,i);var a=St(s),o=Et(s),l=a*e,c=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(g,v){return g*=r,v*=i,[l*g-c*v+t,n-c*g-l*v]}return p.invert=function(g,v){return[r*(u*g-d*v+h),i*(f-d*g-u*v)]},p}function oa(e){return jd(function(){return e})()}function jd(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,d=0,h=1,f=1,p=null,g=Td,v=null,m,y,E,_=gl,S=.5,b,M,D,G,I;function w(O){return D(O[0]*$t,O[1]*$t)}function C(O){return O=D.invert(O[0],O[1]),O&&[O[0]*re,O[1]*re]}w.stream=function(O){return G&&I===O?G:G=vb(yb(u)(g(b(_(I=O)))))},w.preclip=function(O){return arguments.length?(g=O,p=void 0,P()):g},w.postclip=function(O){return arguments.length?(_=O,v=m=y=E=null,P()):_},w.clipAngle=function(O){return arguments.length?(g=+O?jx(p=O*$t):(p=null,Td),P()):p*re},w.clipExtent=function(O){return arguments.length?(_=O==null?(v=m=y=E=null,gl):Kx(v=+O[0][0],m=+O[0][1],y=+O[1][0],E=+O[1][1]),P()):v==null?null:[[v,m],[y,E]]},w.scale=function(O){return arguments.length?(n=+O,R()):n},w.translate=function(O){return arguments.length?(r=+O[0],i=+O[1],R()):[r,i]},w.center=function(O){return arguments.length?(s=O[0]%360*$t,a=O[1]%360*$t,R()):[s*re,a*re]},w.rotate=function(O){return arguments.length?(o=O[0]%360*$t,l=O[1]%360*$t,c=O.length>2?O[2]%360*$t:0,R()):[o*re,l*re,c*re]},w.angle=function(O){return arguments.length?(d=O%360*$t,R()):d*re},w.reflectX=function(O){return arguments.length?(h=O?-1:1,R()):h<0},w.reflectY=function(O){return arguments.length?(f=O?-1:1,R()):f<0},w.precision=function(O){return arguments.length?(b=qd(M,S=O*O),P()):$e(S)},w.fitExtent=function(O,H){return Wd(w,O,H)},w.fitSize=function(O,H){return hb(w,O,H)},w.fitWidth=function(O,H){return db(w,O,H)},w.fitHeight=function(O,H){return fb(w,O,H)};function R(){var O=Xd(n,0,0,h,f,d).apply(null,t(s,a)),H=Xd(n,r-O[0],i-O[1],h,f,d);return u=gd(o,l,c),M=dl(t,H),D=dl(u,M),b=qd(M,S),P()}function P(){return G=I=null,w}return function(){return t=e.apply(this,arguments),w.invert=t.invert&&C,R()}}function Zd(e){var t=0,n=ht/3,r=jd(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*$t,n=s[1]*$t):[t*re,n*re]},i}function xb(e){var t=St(e);function n(r,i){return[r*t,Et(i)/t]}return n.invert=function(r,i){return[r/t,un(i*t)]},n}function bb(e,t){var n=Et(e),r=(n+Et(t))/2;if(bt(r)<xt)return xb(e);var i=1+n*(2*r-n),s=$e(i)/r;function a(o,l){var c=$e(i-2*r*Et(l))/r;return[c*Et(o*=r),s-c*St(o)]}return a.invert=function(o,l){var c=s-l,u=zn(o,bt(c))*An(c);return c*r<0&&(u-=ht*An(o)*An(c)),[u/r,un((i-(o*o+c*c)*r*r)/(2*r))]},a}function Kd(){return Zd(bb).scale(155.424).center([0,33.6442])}function _b(){return Kd().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Cl(e,t){return[e,Ux(Bx((ce+t)/2))]}Cl.invert=function(e,t){return[e,2*hd(Nx(t))-ce]};function Sb(){return Tb(Cl).scale(961/ye)}function Tb(e){var t=oa(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=l=c=null:(a=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var d=ht*r(),h=t(Hx(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Cl?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,l),c]]:[[a,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function la(e,t){return[e,t]}la.invert=la;function wb(){return oa(la).scale(152.63)}function Ob(e,t){var n=St(e),r=e===t?Et(e):(n-St(t))/(t-e),i=n/r+e;if(bt(r)<xt)return la;function s(a,o){var l=i-o,c=r*a;return[l*Et(c),i-l*St(c)]}return s.invert=function(a,o){var l=i-o,c=zn(a,bt(l))*An(l);return l*r<0&&(c-=ht*An(a)*An(l)),[c/r,i-An(r)*$e(a*a+l*l)]},s}function Mb(){return Zd(Ob).scale(131.154).center([0,13.9389])}var wi=1.340264,Oi=-.081106,Mi=893e-6,Ai=.003796,ca=$e(3)/2,Ab=12;function Qd(e,t){var n=un(ca*Et(t)),r=n*n,i=r*r*r;return[e*St(n)/(ca*(wi+3*Oi*r+i*(7*Mi+9*Ai*r))),n*(wi+Oi*r+i*(Mi+Ai*r))]}Qd.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<Ab&&(o=n*(wi+Oi*r+i*(Mi+Ai*r))-t,l=wi+3*Oi*r+i*(7*Mi+9*Ai*r),n-=a=o/l,r=n*n,i=r*r*r,!(bt(a)<cd));++s);return[ca*e*(wi+3*Oi*r+i*(7*Mi+9*Ai*r))/St(n),un(Et(n)/ca)]};function Cb(){return oa(Qd).scale(177.158)}function Jd(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Jd.invert=function(e,t){var n=t,r=25,i;do{var s=n*n,a=s*s;n-=i=(n*(1.007226+s*(.015085+a*(-.044475+.028874*s-.005916*a)))-t)/(1.007226+s*(.015085*3+a*(-.044475*7+.028874*9*s-.005916*11*a)))}while(bt(i)>xt&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function Db(){return oa(Jd).scale(175.295)}function Lb(e,t){return e.parent===t.parent?1:2}function Rb(e){return e.reduce(Ib,0)/e.length}function Ib(e,t){return e+t.x}function kb(e){return 1+e.reduce(Pb,0)}function Pb(e,t){return Math.max(e,t.y)}function $b(e){for(var t;t=e.children;)e=t[0];return e}function Nb(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Ub(){var e=Lb,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=Rb(f),h.y=kb(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=$b(s),c=Nb(s),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(s.y?h.y/s.y:1))*n})}return i.separation=function(s){return arguments.length?(e=s,i):e},i.size=function(s){return arguments.length?(r=!1,t=+s[0],n=+s[1],i):r?null:[t,n]},i.nodeSize=function(s){return arguments.length?(r=!0,t=+s[0],n=+s[1],i):r?[t,n]:null},i}function Bb(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Fb(){return this.eachAfter(Bb)}function Hb(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function Gb(e,t){for(var n=this,r=[n],i,s,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function Vb(e,t){for(var n=this,r=[n],i=[],s,a,o,l=-1;n=r.pop();)if(i.push(n),s=n.children)for(a=0,o=s.length;a<o;++a)r.push(s[a]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function zb(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function Wb(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function Yb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function qb(e){for(var t=this,n=Xb(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Xb(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function jb(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Zb(){return Array.from(this)}function Kb(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Qb(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Jb(){var e=this,t,n=[e],r,i,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function Ci(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=n_)):t===void 0&&(t=e_);for(var n=new Di(e),r,i=[n],s,a,o,l;r=i.pop();)if((a=t(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,o=l-1;o>=0;--o)i.push(s=a[o]=new Di(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(i_)}function t_(){return Ci(this).eachBefore(r_)}function e_(e){return e.children}function n_(e){return Array.isArray(e)?e[1]:null}function r_(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function i_(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Di(e){this.data=e,this.depth=this.height=0,this.parent=null}Di.prototype=Ci.prototype={constructor:Di,count:Fb,each:Hb,eachAfter:Vb,eachBefore:Gb,find:zb,sum:Wb,sort:Yb,path:qb,ancestors:jb,descendants:Zb,leaves:Kb,links:Qb,copy:t_,[Symbol.iterator]:Jb};function s_(e){return e==null?null:tf(e)}function tf(e){if(typeof e!="function")throw new Error;return e}function Yn(){return 0}function wr(e){return function(){return e}}const a_=1664525,o_=1013904223,ef=4294967296;function l_(){let e=1;return()=>(e=(a_*e+o_)%ef)/ef}function c_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function u_(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function h_(e,t){for(var n=0,r=(e=u_(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&nf(a,s)?++n:(a=f_(i=d_(i,s)),n=0);return a}function d_(e,t){var n,r;if(Dl(t,e))return[t];for(n=0;n<e.length;++n)if(ua(t,e[n])&&Dl(Li(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(ua(Li(e[n],e[r]),t)&&ua(Li(e[n],t),e[r])&&ua(Li(e[r],t),e[n])&&Dl(rf(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function ua(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function nf(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Dl(e,t){for(var n=0;n<t.length;++n)if(!nf(e,t[n]))return!1;return!0}function f_(e){switch(e.length){case 1:return p_(e[0]);case 2:return Li(e[0],e[1]);case 3:return rf(e[0],e[1],e[2])}}function p_(e){return{x:e.x,y:e.y,r:e.r}}function Li(e,t){var n=e.x,r=e.y,i=e.r,s=t.x,a=t.y,o=t.r,l=s-n,c=a-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+s+l/d*u)/2,y:(r+a+c/d*u)/2,r:(d+i+o)/2}}function rf(e,t,n){var r=e.x,i=e.y,s=e.r,a=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-a,f=r-c,p=i-o,g=i-u,v=l-s,m=d-s,y=r*r+i*i-s*s,E=y-a*a-o*o+l*l,_=y-c*c-u*u+d*d,S=f*p-h*g,b=(p*_-g*E)/(S*2)-r,M=(g*v-p*m)/S,D=(f*E-h*_)/(S*2)-i,G=(h*m-f*v)/S,I=M*M+G*G-1,w=2*(s+b*M+D*G),C=b*b+D*D-s*s,R=-(Math.abs(I)>1e-6?(w+Math.sqrt(w*w-4*I*C))/(2*I):C/w);return{x:r+b+M*R,y:i+D+G*R,r:R}}function sf(e,t,n){var r=e.x-t.x,i,s,a=e.y-t.y,o,l,c=r*r+a*a;c?(s=t.r+n.r,s*=s,l=e.r+n.r,l*=l,s>l?(i=(c+l-s)/(2*c),o=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-o*a,n.y=e.y-i*a+o*r):(i=(c+s-l)/(2*c),o=Math.sqrt(Math.max(0,s/c-i*i)),n.x=t.x+i*r-o*a,n.y=t.y+i*a+o*r)):(n.x=t.x+n.r,n.y=t.y)}function af(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function of(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,s=(t.y*n.r+n.y*t.r)/r;return i*i+s*s}function ha(e){this._=e,this.next=null,this.previous=null}function g_(e,t){if(!(s=(e=c_(e)).length))return 0;var n,r,i,s,a,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;sf(r,n,i=e[2]),n=new ha(n),r=new ha(r),i=new ha(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){sf(n._,r._,i=e[l]),i=new ha(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(af(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(af(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=of(n);(i=i.next)!==r;)(o=of(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=h_(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function m_(e){return Math.sqrt(e.value)}function v_(){var e=null,t=1,n=1,r=Yn;function i(s){const a=l_();return s.x=t/2,s.y=n/2,e?s.eachBefore(lf(e)).eachAfter(Ll(r,.5,a)).eachBefore(cf(1)):s.eachBefore(lf(m_)).eachAfter(Ll(Yn,1,a)).eachAfter(Ll(r,s.r/Math.min(t,n),a)).eachBefore(cf(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=s_(s),i):e},i.size=function(s){return arguments.length?(t=+s[0],n=+s[1],i):[t,n]},i.padding=function(s){return arguments.length?(r=typeof s=="function"?s:wr(+s),i):r},i}function lf(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Ll(e,t,n){return function(r){if(i=r.children){var i,s,a=i.length,o=e(r)*t||0,l;if(o)for(s=0;s<a;++s)i[s].r+=o;if(l=g_(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function cf(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function y_(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function E_(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(r-t)/e.value;++o<l;)a=s[o],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function x_(e,t){return e.parent===t.parent?1:2}function Rl(e){var t=e.children;return t?t[0]:e.t}function Il(e){var t=e.children;return t?t[t.length-1]:e.t}function b_(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function __(e){for(var t=0,n=0,r=e.children,i=r.length,s;--i>=0;)s=r[i],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function S_(e,t,n){return e.a.parent===t.parent?e.a:n}function da(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}da.prototype=Object.create(Di.prototype);function T_(e){for(var t=new da(e,0),n,r=[t],i,s,a,o;n=r.pop();)if(s=n._.children)for(n.children=new Array(o=s.length),a=o-1;a>=0;--a)r.push(i=n.children[a]=new da(s[a],a)),i.parent=n;return(t.parent=new da(null,0)).children=[t],t}function w_(){var e=x_,t=1,n=1,r=null;function i(c){var u=T_(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var d=c,h=c,f=c;c.eachBefore(function(y){y.x<d.x&&(d=y),y.x>h.x&&(h=y),y.depth>f.depth&&(f=y)});var p=d===h?1:e(d,h)/2,g=p-d.x,v=t/(h.x+p+g),m=n/(f.depth||1);c.eachBefore(function(y){y.x=(y.x+g)*v,y.y=y.depth*m})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){__(c);var f=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-f):c.z=f}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,f=c,p=u,g=h.parent.children[0],v=h.m,m=f.m,y=p.m,E=g.m,_;p=Il(p),h=Rl(h),p&&h;)g=Rl(g),f=Il(f),f.a=c,_=p.z+y-h.z-v+e(p._,h._),_>0&&(b_(S_(p,c,d),c,_),v+=_,m+=_),y+=p.m,v+=h.m,E+=g.m,m+=f.m;p&&!Il(f)&&(f.t=p,f.m+=y-m),h&&!Rl(g)&&(g.t=h,g.m+=v-E,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function O_(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(i-n)/e.value;++o<l;)a=s[o],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var M_=(1+Math.sqrt(5))/2;function A_(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,d=0,h=o.length,f,p,g=t.value,v,m,y,E,_,S,b;u<h;){f=i-n,p=s-r;do v=o[d++].value;while(!v&&d<h);for(m=y=v,S=Math.max(p/f,f/p)/(g*e),b=v*v*S,_=Math.max(y/b,b/m);d<h;++d){if(v+=c=o[d].value,c<m&&(m=c),c>y&&(y=c),b=v*v*S,E=Math.max(y/b,b/m),E>_){v-=c;break}_=E}a.push(l={value:v,dice:f<p,children:o.slice(u,d)}),l.dice?E_(l,n,r,i,g?r+=p*v/g:s):O_(l,n,r,g?n+=f*v/g:i,s),g-=v,u=d}return a}const C_=function e(t){function n(r,i,s,a,o){A_(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(M_);function D_(){var e=C_,t=!1,n=1,r=1,i=[0],s=Yn,a=Yn,o=Yn,l=Yn,c=Yn;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(y_),h}function d(h){var f=i[h.depth],p=h.x0+f,g=h.y0+f,v=h.x1-f,m=h.y1-f;v<p&&(p=v=(p+v)/2),m<g&&(g=m=(g+m)/2),h.x0=p,h.y0=g,h.x1=v,h.y1=m,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,g+=a(h)-f,v-=o(h)-f,m-=l(h)-f,v<p&&(p=v=(p+v)/2),m<g&&(g=m=(g+m)/2),e(h,p,g,v,m))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=tf(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:wr(+h),u):s},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:wr(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:wr(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:wr(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:wr(+h),u):c},u}function Or(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const uf=Symbol("implicit");function fa(){var e=new Ju,t=[],n=[],r=uf;function i(s){let a=e.get(s);if(a===void 0){if(r!==uf)return r;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Ju;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return fa(t,n).unknown(r)},Or.apply(i,arguments),i}function Ri(){var e=fa().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,f=i<r,p=f?i:r,g=f?r:i;s=(g-p)/Math.max(1,h-l+c*2),o&&(s=Math.floor(s)),p+=(g-p-s*(h-l))*u,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var v=U0(h).map(function(m){return p+s*m});return n(f?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Ri(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Or.apply(d(),arguments)}function L_(e){return function(){return e}}function R_(e){return+e}var hf=[0,1];function Mr(e){return e}function kl(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:L_(isNaN(t)?NaN:.5)}function I_(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function k_(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=kl(i,r),s=n(a,s)):(r=kl(r,i),s=n(s,a)),function(o){return s(r(o))}}function P_(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=kl(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=Oo(e,o,1,r)-1;return s[l](i[l](o))}}function Pl(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function df(){var e=hf,t=hf,n=fi,r,i,s,a=Mr,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==Mr&&(a=I_(e[0],e[h-1])),o=h>2?P_:k_,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=o(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((c||(c=o(t,e.map(r),ve)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,R_),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Rh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:Mr,u()):a!==Mr},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,f){return r=h,i=f,u()}}function ff(){return df()(Mr,Mr)}function $_(e,t,n,r){var i=Ao(e,t,n),s;switch(r=yi(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Px(i,a))&&(r.precision=s),ld(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=$x(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=kx(i))&&(r.precision=s-(r.type==="%")*2);break}}return ol(r)}function pf(e){var t=e.domain;return e.ticks=function(n){var r=t();return Ss(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return $_(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,a=r[i],o=r[s],l,c,u=10;for(o<a&&(c=a,a=o,o=c,c=i,i=s,s=c);u-- >0;){if(c=pr(a,o,n),c===l)return r[i]=a,r[s]=o,t(r);if(c>0)a=Math.floor(a/c)*c,o=Math.ceil(o/c)*c;else if(c<0)a=Math.ceil(a*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function Ue(){var e=ff();return e.copy=function(){return Pl(e,Ue())},Or.apply(e,arguments),pf(e)}function gf(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),e[n]=t.floor(i),e[r]=t.ceil(s),e}function mf(e){return Math.log(e)}function vf(e){return Math.exp(e)}function N_(e){return-Math.log(-e)}function U_(e){return-Math.exp(-e)}function B_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function F_(e){return e===10?B_:e===Math.E?Math.exp:t=>Math.pow(e,t)}function H_(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function yf(e){return(t,n)=>-e(-t,n)}function G_(e){const t=e(mf,vf),n=t.domain;let r=10,i,s;function a(){return i=H_(r),s=F_(r),n()[0]<0?(i=yf(i),s=yf(s),e(N_,U_)):e(mf,vf),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),f=i(u),p,g;const v=o==null?10:+o;let m=[];if(!(r%1)&&f-h<v){if(h=Math.floor(h),f=Math.ceil(f),c>0){for(;h<=f;++h)for(p=1;p<r;++p)if(g=h<0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;m.push(g)}}else for(;h<=f;++h)for(p=r-1;p>=1;--p)if(g=h>0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;m.push(g)}m.length*2<v&&(m=Ss(c,u,v))}else m=Ss(h,f,Math.min(f-h,v)).map(s);return d?m.reverse():m},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=yi(l)).precision==null&&(l.trim=!0),l=ol(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/s(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(gf(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function Ef(){const e=G_(df()).domain([1,10]);return e.copy=()=>Pl(e,Ef()).base(e.base()),Or.apply(e,arguments),e}function $l(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[Oo(r,l,0,n)]:s}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(s=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return $l().domain([e,t]).range(i).unknown(s)},Or.apply(pf(a),arguments)}const Nl=new Date,Ul=new Date;function Vt(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,o)=>{const l=[];if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let c;do l.push(c=new Date(+s)),t(s,o),e(s);while(c<s&&s<a);return l},i.filter=s=>Vt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;t(a,-1),!s(a););else for(;--o>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(Nl.setTime(+s),Ul.setTime(+a),e(Nl),e(Ul),Math.floor(n(Nl,Ul))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const pa=Vt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);pa.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Vt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):pa),pa.range;const hn=1e3,we=hn*60,dn=we*60,fn=dn*24,Bl=fn*7,xf=fn*30,Fl=fn*365,Ar=Vt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*hn)},(e,t)=>(t-e)/hn,e=>e.getUTCSeconds());Ar.range;const Hl=Vt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hn)},(e,t)=>{e.setTime(+e+t*we)},(e,t)=>(t-e)/we,e=>e.getMinutes());Hl.range,Vt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*we)},(e,t)=>(t-e)/we,e=>e.getUTCMinutes()).range;const Gl=Vt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hn-e.getMinutes()*we)},(e,t)=>{e.setTime(+e+t*dn)},(e,t)=>(t-e)/dn,e=>e.getHours());Gl.range,Vt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*dn)},(e,t)=>(t-e)/dn,e=>e.getUTCHours()).range;const Ii=Vt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*we)/fn,e=>e.getDate()-1);Ii.range;const Vl=Vt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fn,e=>e.getUTCDate()-1);Vl.range,Vt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fn,e=>Math.floor(e/fn)).range;function qn(e){return Vt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*we)/Bl)}const ga=qn(0),ma=qn(1),V_=qn(2),z_=qn(3),Cr=qn(4),W_=qn(5),Y_=qn(6);ga.range,ma.range,V_.range,z_.range,Cr.range,W_.range,Y_.range;function Xn(e){return Vt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Bl)}const bf=Xn(0),va=Xn(1),q_=Xn(2),X_=Xn(3),Dr=Xn(4),j_=Xn(5),Z_=Xn(6);bf.range,va.range,q_.range,X_.range,Dr.range,j_.range,Z_.range;const zl=Vt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());zl.range,Vt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()).range;const pn=Vt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());pn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),pn.range;const jn=Vt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());jn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),jn.range;function K_(e,t,n,r,i,s){const a=[[Ar,1,hn],[Ar,5,5*hn],[Ar,15,15*hn],[Ar,30,30*hn],[s,1,we],[s,5,5*we],[s,15,15*we],[s,30,30*we],[i,1,dn],[i,3,3*dn],[i,6,6*dn],[i,12,12*dn],[r,1,fn],[r,2,2*fn],[n,1,Bl],[t,1,xf],[t,3,3*xf],[e,1,Fl]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const f=d&&typeof d.range=="function"?d:l(c,u,d),p=f?f.range(c,+u+1):[];return h?p.reverse():p}function l(c,u,d){const h=Math.abs(u-c)/d,f=wo(([,,v])=>v).right(a,h);if(f===a.length)return e.every(Ao(c/Fl,u/Fl,d));if(f===0)return pa.every(Math.max(Ao(c,u,d),1));const[p,g]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(g)}return[o,l]}const[Q_,J_]=K_(pn,zl,ga,Ii,Gl,Hl);function Wl(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Yl(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ki(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tS(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,l=e.shortMonths,c=Pi(i),u=$i(i),d=Pi(s),h=$i(s),f=Pi(a),p=$i(a),g=Pi(o),v=$i(o),m=Pi(l),y=$i(l),E={a:B,A:U,b:N,B:j,c:null,d:Mf,e:Mf,f:SS,g:IS,G:PS,H:xS,I:bS,j:_S,L:Af,m:TS,M:wS,p:Y,q:it,Q:kf,s:Pf,S:OS,u:MS,U:AS,V:CS,w:DS,W:LS,x:null,X:null,y:RS,Y:kS,Z:$S,"%":If},_={a:et,A:q,b:Q,B:pt,c:null,d:Df,e:Df,f:FS,g:ZS,G:QS,H:NS,I:US,j:BS,L:Lf,m:HS,M:GS,p:ot,q:Tt,Q:kf,s:Pf,S:VS,u:zS,U:WS,V:YS,w:qS,W:XS,x:null,X:null,y:jS,Y:KS,Z:JS,"%":If},S={a:I,A:w,b:C,B:R,c:P,d:wf,e:wf,f:mS,g:Tf,G:Sf,H:Of,I:Of,j:dS,L:gS,m:hS,M:fS,p:G,q:uS,Q:yS,s:ES,S:pS,u:sS,U:aS,V:oS,w:iS,W:lS,x:O,X:H,y:Tf,Y:Sf,Z:cS,"%":vS};E.x=b(n,E),E.X=b(r,E),E.c=b(t,E),_.x=b(n,_),_.X=b(r,_),_.c=b(t,_);function b(Z,F){return function(V){var $=[],mt=-1,gt=0,Ht=Z.length,Gt,st,Rt;for(V instanceof Date||(V=new Date(+V));++mt<Ht;)Z.charCodeAt(mt)===37&&($.push(Z.slice(gt,mt)),(st=_f[Gt=Z.charAt(++mt)])!=null?Gt=Z.charAt(++mt):st=Gt==="e"?" ":"0",(Rt=F[Gt])&&(Gt=Rt(V,st)),$.push(Gt),gt=mt+1);return $.push(Z.slice(gt,mt)),$.join("")}}function M(Z,F){return function(V){var $=ki(1900,void 0,1),mt=D($,Z,V+="",0),gt,Ht;if(mt!=V.length)return null;if("Q"in $)return new Date($.Q);if("s"in $)return new Date($.s*1e3+("L"in $?$.L:0));if(F&&!("Z"in $)&&($.Z=0),"p"in $&&($.H=$.H%12+$.p*12),$.m===void 0&&($.m="q"in $?$.q:0),"V"in $){if($.V<1||$.V>53)return null;"w"in $||($.w=1),"Z"in $?(gt=Yl(ki($.y,0,1)),Ht=gt.getUTCDay(),gt=Ht>4||Ht===0?va.ceil(gt):va(gt),gt=Vl.offset(gt,($.V-1)*7),$.y=gt.getUTCFullYear(),$.m=gt.getUTCMonth(),$.d=gt.getUTCDate()+($.w+6)%7):(gt=Wl(ki($.y,0,1)),Ht=gt.getDay(),gt=Ht>4||Ht===0?ma.ceil(gt):ma(gt),gt=Ii.offset(gt,($.V-1)*7),$.y=gt.getFullYear(),$.m=gt.getMonth(),$.d=gt.getDate()+($.w+6)%7)}else("W"in $||"U"in $)&&("w"in $||($.w="u"in $?$.u%7:"W"in $?1:0),Ht="Z"in $?Yl(ki($.y,0,1)).getUTCDay():Wl(ki($.y,0,1)).getDay(),$.m=0,$.d="W"in $?($.w+6)%7+$.W*7-(Ht+5)%7:$.w+$.U*7-(Ht+6)%7);return"Z"in $?($.H+=$.Z/100|0,$.M+=$.Z%100,Yl($)):Wl($)}}function D(Z,F,V,$){for(var mt=0,gt=F.length,Ht=V.length,Gt,st;mt<gt;){if($>=Ht)return-1;if(Gt=F.charCodeAt(mt++),Gt===37){if(Gt=F.charAt(mt++),st=S[Gt in _f?F.charAt(mt++):Gt],!st||($=st(Z,V,$))<0)return-1}else if(Gt!=V.charCodeAt($++))return-1}return $}function G(Z,F,V){var $=c.exec(F.slice(V));return $?(Z.p=u.get($[0].toLowerCase()),V+$[0].length):-1}function I(Z,F,V){var $=f.exec(F.slice(V));return $?(Z.w=p.get($[0].toLowerCase()),V+$[0].length):-1}function w(Z,F,V){var $=d.exec(F.slice(V));return $?(Z.w=h.get($[0].toLowerCase()),V+$[0].length):-1}function C(Z,F,V){var $=m.exec(F.slice(V));return $?(Z.m=y.get($[0].toLowerCase()),V+$[0].length):-1}function R(Z,F,V){var $=g.exec(F.slice(V));return $?(Z.m=v.get($[0].toLowerCase()),V+$[0].length):-1}function P(Z,F,V){return D(Z,t,F,V)}function O(Z,F,V){return D(Z,n,F,V)}function H(Z,F,V){return D(Z,r,F,V)}function B(Z){return a[Z.getDay()]}function U(Z){return s[Z.getDay()]}function N(Z){return l[Z.getMonth()]}function j(Z){return o[Z.getMonth()]}function Y(Z){return i[+(Z.getHours()>=12)]}function it(Z){return 1+~~(Z.getMonth()/3)}function et(Z){return a[Z.getUTCDay()]}function q(Z){return s[Z.getUTCDay()]}function Q(Z){return l[Z.getUTCMonth()]}function pt(Z){return o[Z.getUTCMonth()]}function ot(Z){return i[+(Z.getUTCHours()>=12)]}function Tt(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var F=b(Z+="",E);return F.toString=function(){return Z},F},parse:function(Z){var F=M(Z+="",!1);return F.toString=function(){return Z},F},utcFormat:function(Z){var F=b(Z+="",_);return F.toString=function(){return Z},F},utcParse:function(Z){var F=M(Z+="",!0);return F.toString=function(){return Z},F}}}var _f={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,eS=/^%/,nS=/[\\^$*+?|[\]().{}]/g;function vt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function rS(e){return e.replace(nS,"\\$&")}function Pi(e){return new RegExp("^(?:"+e.map(rS).join("|")+")","i")}function $i(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function iS(e,t,n){var r=Wt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sS(e,t,n){var r=Wt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function aS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function oS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function lS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Sf(e,t,n){var r=Wt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Tf(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cS(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function uS(e,t,n){var r=Wt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function hS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function wf(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function dS(e,t,n){var r=Wt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Of(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function fS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function pS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function gS(e,t,n){var r=Wt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function mS(e,t,n){var r=Wt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vS(e,t,n){var r=eS.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function yS(e,t,n){var r=Wt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ES(e,t,n){var r=Wt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Mf(e,t){return vt(e.getDate(),t,2)}function xS(e,t){return vt(e.getHours(),t,2)}function bS(e,t){return vt(e.getHours()%12||12,t,2)}function _S(e,t){return vt(1+Ii.count(pn(e),e),t,3)}function Af(e,t){return vt(e.getMilliseconds(),t,3)}function SS(e,t){return Af(e,t)+"000"}function TS(e,t){return vt(e.getMonth()+1,t,2)}function wS(e,t){return vt(e.getMinutes(),t,2)}function OS(e,t){return vt(e.getSeconds(),t,2)}function MS(e){var t=e.getDay();return t===0?7:t}function AS(e,t){return vt(ga.count(pn(e)-1,e),t,2)}function Cf(e){var t=e.getDay();return t>=4||t===0?Cr(e):Cr.ceil(e)}function CS(e,t){return e=Cf(e),vt(Cr.count(pn(e),e)+(pn(e).getDay()===4),t,2)}function DS(e){return e.getDay()}function LS(e,t){return vt(ma.count(pn(e)-1,e),t,2)}function RS(e,t){return vt(e.getFullYear()%100,t,2)}function IS(e,t){return e=Cf(e),vt(e.getFullYear()%100,t,2)}function kS(e,t){return vt(e.getFullYear()%1e4,t,4)}function PS(e,t){var n=e.getDay();return e=n>=4||n===0?Cr(e):Cr.ceil(e),vt(e.getFullYear()%1e4,t,4)}function $S(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+vt(t/60|0,"0",2)+vt(t%60,"0",2)}function Df(e,t){return vt(e.getUTCDate(),t,2)}function NS(e,t){return vt(e.getUTCHours(),t,2)}function US(e,t){return vt(e.getUTCHours()%12||12,t,2)}function BS(e,t){return vt(1+Vl.count(jn(e),e),t,3)}function Lf(e,t){return vt(e.getUTCMilliseconds(),t,3)}function FS(e,t){return Lf(e,t)+"000"}function HS(e,t){return vt(e.getUTCMonth()+1,t,2)}function GS(e,t){return vt(e.getUTCMinutes(),t,2)}function VS(e,t){return vt(e.getUTCSeconds(),t,2)}function zS(e){var t=e.getUTCDay();return t===0?7:t}function WS(e,t){return vt(bf.count(jn(e)-1,e),t,2)}function Rf(e){var t=e.getUTCDay();return t>=4||t===0?Dr(e):Dr.ceil(e)}function YS(e,t){return e=Rf(e),vt(Dr.count(jn(e),e)+(jn(e).getUTCDay()===4),t,2)}function qS(e){return e.getUTCDay()}function XS(e,t){return vt(va.count(jn(e)-1,e),t,2)}function jS(e,t){return vt(e.getUTCFullYear()%100,t,2)}function ZS(e,t){return e=Rf(e),vt(e.getUTCFullYear()%100,t,2)}function KS(e,t){return vt(e.getUTCFullYear()%1e4,t,4)}function QS(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Dr(e):Dr.ceil(e),vt(e.getUTCFullYear()%1e4,t,4)}function JS(){return"+0000"}function If(){return"%"}function kf(e){return+e}function Pf(e){return Math.floor(+e/1e3)}var Lr,$f;tT({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 tT(e){return Lr=tS(e),$f=Lr.format,Lr.parse,Lr.utcFormat,Lr.utcParse,Lr}function eT(e){return new Date(e)}function nT(e){return e instanceof Date?+e:+new Date(+e)}function Nf(e,t,n,r,i,s,a,o,l,c){var u=ff(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),v=c("%I %p"),m=c("%a %d"),y=c("%b %d"),E=c("%B"),_=c("%Y");function S(b){return(l(b)<b?f:o(b)<b?p:a(b)<b?g:s(b)<b?v:r(b)<b?i(b)<b?m:y:n(b)<b?E:_)(b)}return u.invert=function(b){return new Date(d(b))},u.domain=function(b){return arguments.length?h(Array.from(b,nT)):h().map(eT)},u.ticks=function(b){var M=h();return e(M[0],M[M.length-1],b??10)},u.tickFormat=function(b,M){return M==null?S:c(M)},u.nice=function(b){var M=h();return(!b||typeof b.range!="function")&&(b=t(M[0],M[M.length-1],b??10)),b?h(gf(M,b)):u},u.copy=function(){return Pl(u,Nf(e,t,n,r,i,s,a,o,l,c))},u}function Uf(){return Or.apply(Nf(Q_,J_,pn,zl,ga,Ii,Gl,Hl,Ar,$f).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ut(e){return function(){return e}}const Bf=Math.abs,Qt=Math.atan2,Zn=Math.cos,rT=Math.max,ql=Math.min,Ke=Math.sin,Rr=Math.sqrt,Jt=1e-12,Ni=Math.PI,ya=Ni/2,Ea=2*Ni;function iT(e){return e>1?0:e<-1?Ni:Math.acos(e)}function Ff(e){return e>=1?ya:e<=-1?-ya:Math.asin(e)}function xa(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new wx(t)}function sT(e){return e.innerRadius}function aT(e){return e.outerRadius}function oT(e){return e.startAngle}function lT(e){return e.endAngle}function cT(e){return e&&e.padAngle}function uT(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,d=o-s,h=d*l-u*c;if(!(h*h<Jt))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function ba(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/Rr(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,g=r+d,v=(h+p)/2,m=(f+g)/2,y=p-h,E=g-f,_=y*y+E*E,S=i-s,b=h*g-p*f,M=(E<0?-1:1)*Rr(rT(0,S*S*_-b*b)),D=(b*E-y*M)/_,G=(-b*y-E*M)/_,I=(b*E+y*M)/_,w=(-b*y+E*M)/_,C=D-v,R=G-m,P=I-v,O=w-m;return C*C+R*R>P*P+O*O&&(D=I,G=w),{cx:D,cy:G,x01:-u,y01:-d,x11:D*(i/S-1),y11:G*(i/S-1)}}function Ui(){var e=sT,t=aT,n=ut(0),r=null,i=oT,s=lT,a=cT,o=null,l=xa(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-ya,g=s.apply(this,arguments)-ya,v=Bf(g-p),m=g>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>Jt))o.moveTo(0,0);else if(v>Ea-Jt)o.moveTo(f*Zn(p),f*Ke(p)),o.arc(0,0,f,p,g,!m),h>Jt&&(o.moveTo(h*Zn(g),h*Ke(g)),o.arc(0,0,h,g,p,m));else{var y=p,E=g,_=p,S=g,b=v,M=v,D=a.apply(this,arguments)/2,G=D>Jt&&(r?+r.apply(this,arguments):Rr(h*h+f*f)),I=ql(Bf(f-h)/2,+n.apply(this,arguments)),w=I,C=I,R,P;if(G>Jt){var O=Ff(G/h*Ke(D)),H=Ff(G/f*Ke(D));(b-=O*2)>Jt?(O*=m?1:-1,_+=O,S-=O):(b=0,_=S=(p+g)/2),(M-=H*2)>Jt?(H*=m?1:-1,y+=H,E-=H):(M=0,y=E=(p+g)/2)}var B=f*Zn(y),U=f*Ke(y),N=h*Zn(S),j=h*Ke(S);if(I>Jt){var Y=f*Zn(E),it=f*Ke(E),et=h*Zn(_),q=h*Ke(_),Q;if(v<Ni)if(Q=uT(B,U,et,q,Y,it,N,j)){var pt=B-Q[0],ot=U-Q[1],Tt=Y-Q[0],Z=it-Q[1],F=1/Ke(iT((pt*Tt+ot*Z)/(Rr(pt*pt+ot*ot)*Rr(Tt*Tt+Z*Z)))/2),V=Rr(Q[0]*Q[0]+Q[1]*Q[1]);w=ql(I,(h-V)/(F-1)),C=ql(I,(f-V)/(F+1))}else w=C=0}M>Jt?C>Jt?(R=ba(et,q,B,U,f,C,m),P=ba(Y,it,N,j,f,C,m),o.moveTo(R.cx+R.x01,R.cy+R.y01),C<I?o.arc(R.cx,R.cy,C,Qt(R.y01,R.x01),Qt(P.y01,P.x01),!m):(o.arc(R.cx,R.cy,C,Qt(R.y01,R.x01),Qt(R.y11,R.x11),!m),o.arc(0,0,f,Qt(R.cy+R.y11,R.cx+R.x11),Qt(P.cy+P.y11,P.cx+P.x11),!m),o.arc(P.cx,P.cy,C,Qt(P.y11,P.x11),Qt(P.y01,P.x01),!m))):(o.moveTo(B,U),o.arc(0,0,f,y,E,!m)):o.moveTo(B,U),!(h>Jt)||!(b>Jt)?o.lineTo(N,j):w>Jt?(R=ba(N,j,Y,it,h,-w,m),P=ba(B,U,et,q,h,-w,m),o.lineTo(R.cx+R.x01,R.cy+R.y01),w<I?o.arc(R.cx,R.cy,w,Qt(R.y01,R.x01),Qt(P.y01,P.x01),!m):(o.arc(R.cx,R.cy,w,Qt(R.y01,R.x01),Qt(R.y11,R.x11),!m),o.arc(0,0,h,Qt(R.cy+R.y11,R.cx+R.x11),Qt(P.cy+P.y11,P.cx+P.x11),m),o.arc(P.cx,P.cy,w,Qt(P.y11,P.x11),Qt(P.y01,P.x01),!m))):o.arc(0,0,h,S,_,m)}if(o.closePath(),u)return o=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-Ni/2;return[Zn(d)*u,Ke(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ut(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ut(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ut(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ut(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:ut(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:ut(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ut(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var hT=Array.prototype.slice;function _a(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Hf(e){this._context=e}Hf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sa(e){return new Hf(e)}function Xl(e){return e[0]}function jl(e){return e[1]}function Bi(e,t){var n=ut(!0),r=null,i=Sa,s=null,a=xa(o);e=typeof e=="function"?e:e===void 0?Xl:ut(e),t=typeof t=="function"?t:t===void 0?jl:ut(t);function o(l){var c,u=(l=_a(l)).length,d,h=!1,f;for(r==null&&(s=i(f=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,c,l),+t(d,c,l));if(f)return s=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:ut(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:ut(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ut(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(s=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=s=null:s=i(r=l),o):r},o}function Zl(e,t,n){var r=null,i=ut(!0),s=null,a=Sa,o=null,l=xa(c);e=typeof e=="function"?e:e===void 0?Xl:ut(+e),t=typeof t=="function"?t:ut(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?jl:ut(+n);function c(d){var h,f,p,g=(d=_a(d)).length,v,m=!1,y,E=new Array(g),_=new Array(g);for(s==null&&(o=a(y=l())),h=0;h<=g;++h){if(!(h<g&&i(v=d[h],h,d))===m)if(m=!m)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(E[p],_[p]);o.lineEnd(),o.areaEnd()}m&&(E[h]=+e(v,h,d),_[h]=+t(v,h,d),o.point(r?+r(v,h,d):E[h],n?+n(v,h,d):_[h]))}if(y)return o=null,y+""||null}function u(){return Bi().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:ut(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ut(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ut(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:ut(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ut(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ut(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ut(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),c):a},c.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),c):s},c}function dT(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function fT(e){return e}function pT(){var e=fT,t=dT,n=null,r=ut(0),i=ut(Ea),s=ut(0);function a(o){var l,c=(o=_a(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),g=+r.apply(this,arguments),v=Math.min(Ea,Math.max(-Ea,i.apply(this,arguments)-g)),m,y=Math.min(Math.abs(v)/c,s.apply(this,arguments)),E=y*(v<0?-1:1),_;for(l=0;l<c;++l)(_=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=_);for(t!=null?f.sort(function(S,b){return t(p[S],p[b])}):n!=null&&f.sort(function(S,b){return n(o[S],o[b])}),l=0,d=h?(v-c*E)/h:0;l<c;++l,g=m)u=f[l],_=p[u],m=g+(_>0?_*d:0)+E,p[u]={data:o[u],index:l,value:_,startAngle:g,endAngle:m,padAngle:y};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:ut(+o),a):e},a.sortValues=function(o){return arguments.length?(t=o,n=null,a):t},a.sort=function(o){return arguments.length?(n=o,t=null,a):n},a.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:ut(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:ut(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:ut(+o),a):s},a}var gT=Vf(Sa);function Gf(e){this._curve=e}Gf.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Vf(e){function t(n){return new Gf(e(n))}return t._curve=e,t}function mT(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Vf(n)):t()._curve},e}function vT(){return mT(Bi().curve(gT))}class yT{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function ET(e){return new yT(e,!0)}function xT(e){return e.source}function bT(e){return e.target}function _T(e){let t=xT,n=bT,r=Xl,i=jl,s=null,a=null,o=xa(l);function l(){let c;const u=hT.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=d,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),c)return a=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:ut(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:ut(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function ST(){return _T(ET)}function Dn(){}function Ta(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wa(e){this._context=e}wa.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:Ta(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ta(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TT(e){return new wa(e)}function zf(e){this._context=e}zf.prototype={areaStart:Dn,areaEnd:Dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ta(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wT(e){return new zf(e)}function Wf(e){this._context=e}Wf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ta(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function OT(e){return new Wf(e)}function Yf(e,t){this._basis=new wa(e),this._beta=t}Yf.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],s=e[n]-r,a=t[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*s),this._beta*t[o]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const MT=function e(t){function n(r){return t===1?new wa(r):new Yf(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Oa(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Kl(e,t){this._context=e,this._k=(1-t)/6}Kl.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:Oa(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Oa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const AT=function e(t){function n(r){return new Kl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ql(e,t){this._context=e,this._k=(1-t)/6}Ql.prototype={areaStart:Dn,areaEnd:Dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Oa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CT=function e(t){function n(r){return new Ql(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Jl(e,t){this._context=e,this._k=(1-t)/6}Jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Oa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const DT=function e(t){function n(r){return new Jl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function tc(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Jt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Jt){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,s,a,e._x2,e._y2)}function qf(e,t){this._context=e,this._alpha=t}qf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:tc(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const LT=function e(t){function n(r){return t?new qf(r,t):new Kl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Xf(e,t){this._context=e,this._alpha=t}Xf.prototype={areaStart:Dn,areaEnd:Dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:tc(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const RT=function e(t){function n(r){return t?new Xf(r,t):new Ql(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function jf(e,t){this._context=e,this._alpha=t}jf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:tc(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const IT=function e(t){function n(r){return t?new jf(r,t):new Jl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Zf(e){this._context=e}Zf.prototype={areaStart:Dn,areaEnd:Dn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Kf(e){return new Zf(e)}function Qf(e){return e<0?-1:1}function Jf(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(Qf(s)+Qf(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function tp(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ec(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function Ma(e){this._context=e}Ma.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:ec(this,this._t0,tp(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ec(this,tp(this,n=Jf(this,e,t)),n);break;default:ec(this,this._t0,n=Jf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ep(e){this._context=new np(e)}(ep.prototype=Object.create(Ma.prototype)).point=function(e,t){Ma.prototype.point.call(this,t,e)};function np(e){this._context=e}np.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function kT(e){return new Ma(e)}function PT(e){return new ep(e)}function rp(e){this._context=e}rp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=ip(e),i=ip(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ip(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function $T(e){return new rp(e)}function Aa(e,t){this._context=e,this._t=t}Aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function NT(e){return new Aa(e,.5)}function UT(e){return new Aa(e,0)}function BT(e){return new Aa(e,1)}function sp(e,t){if((a=e.length)>1)for(var n=1,r,i,s=e[t[0]],a,o=s.length;n<a;++n)for(i=s,s=e[t[n]],r=0;r<o;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ap(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function FT(e,t){return e[t]}function HT(e){const t=[];return t.key=e,t}function nc(){var e=ut([]),t=ap,n=sp,r=FT;function i(s){var a=Array.from(e.apply(this,arguments),HT),o,l=a.length,c=-1,u;for(const d of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(d,a[o].key,c,s)]).data=d;for(o=0,u=_a(t(a));o<l;++o)a[u[o]].index=o;return n(a,u),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:ut(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:ut(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?ap:typeof s=="function"?s:ut(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??sp,i):n},i}function GT(e,t){if((l=e.length)>0)for(var n,r=0,i,s,a,o,l,c=e[t[0]].length;r<c;++r)for(a=o=0,n=0;n<l;++n)(s=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=s):s<0?(i[1]=o,i[0]=o+=s):(i[0]=0,i[1]=s)}function Fi(e,t,n){this.k=e,this.x=t,this.y=n}Fi.prototype={constructor:Fi,scale:function(e){return e===1?this:new Fi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Fi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Fi.prototype;var VT=typeof global=="object"&&global&&global.Object===Object&&global;const op=VT;var zT=typeof self=="object"&&self&&self.Object===Object&&self,WT=op||zT||Function("return this")();const Be=WT;var YT=Be.Symbol;const Oe=YT;var lp=Object.prototype,qT=lp.hasOwnProperty,XT=lp.toString,Hi=Oe?Oe.toStringTag:void 0;function jT(e){var t=qT.call(e,Hi),n=e[Hi];try{e[Hi]=void 0;var r=!0}catch{}var i=XT.call(e);return r&&(t?e[Hi]=n:delete e[Hi]),i}var ZT=Object.prototype,KT=ZT.toString;function QT(e){return KT.call(e)}var JT="[object Null]",tw="[object Undefined]",cp=Oe?Oe.toStringTag:void 0;function Kn(e){return e==null?e===void 0?tw:JT:cp&&cp in Object(e)?jT(e):QT(e)}function Qe(e){return e!=null&&typeof e=="object"}var ew="[object Symbol]";function Ca(e){return typeof e=="symbol"||Qe(e)&&Kn(e)==ew}function up(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var nw=Array.isArray;const qt=nw;var rw=1/0,hp=Oe?Oe.prototype:void 0,dp=hp?hp.toString:void 0;function fp(e){if(typeof e=="string")return e;if(qt(e))return up(e,fp)+"";if(Ca(e))return dp?dp.call(e):"";var t=e+"";return t=="0"&&1/e==-rw?"-0":t}var iw=/\s/;function sw(e){for(var t=e.length;t--&&iw.test(e.charAt(t)););return t}var aw=/^\s+/;function ow(e){return e&&e.slice(0,sw(e)+1).replace(aw,"")}function Me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pp=NaN,lw=/^[-+]0x[0-9a-f]+$/i,cw=/^0b[01]+$/i,uw=/^0o[0-7]+$/i,hw=parseInt;function Gi(e){if(typeof e=="number")return e;if(Ca(e))return pp;if(Me(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Me(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ow(e);var n=cw.test(e);return n||uw.test(e)?hw(e.slice(2),n?2:8):lw.test(e)?pp:+e}function rc(e){return e}var dw="[object AsyncFunction]",fw="[object Function]",pw="[object GeneratorFunction]",gw="[object Proxy]";function ic(e){if(!Me(e))return!1;var t=Kn(e);return t==fw||t==pw||t==dw||t==gw}var mw=Be["__core-js_shared__"];const sc=mw;var gp=function(){var e=/[^.]+$/.exec(sc&&sc.keys&&sc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function vw(e){return!!gp&&gp in e}var yw=Function.prototype,Ew=yw.toString;function Qn(e){if(e!=null){try{return Ew.call(e)}catch{}try{return e+""}catch{}}return""}var xw=/[\\^$.*+?()[\]{}|]/g,bw=/^\[object .+?Constructor\]$/,_w=Function.prototype,Sw=Object.prototype,Tw=_w.toString,ww=Sw.hasOwnProperty,Ow=RegExp("^"+Tw.call(ww).replace(xw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mw(e){if(!Me(e)||vw(e))return!1;var t=ic(e)?Ow:bw;return t.test(Qn(e))}function Aw(e,t){return e==null?void 0:e[t]}function Jn(e,t){var n=Aw(e,t);return Mw(n)?n:void 0}var Cw=Jn(Be,"WeakMap");const ac=Cw;var mp=Object.create,Dw=function(){function e(){}return function(t){if(!Me(t))return{};if(mp)return mp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Lw=Dw;function Rw(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Iw(){}function vp(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var kw=800,Pw=16,$w=Date.now;function Nw(e){var t=0,n=0;return function(){var r=$w(),i=Pw-(r-n);if(n=r,i>0){if(++t>=kw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Uw(e){return function(){return e}}var Bw=function(){try{var e=Jn(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Da=Bw;var Fw=Da?function(e,t){return Da(e,"toString",{configurable:!0,enumerable:!1,value:Uw(t),writable:!0})}:rc,Hw=Nw(Fw);const Gw=Hw;function Vw(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function zw(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Ww(e){return e!==e}function Yw(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function qw(e,t,n){return t===t?Yw(e,t,n):zw(e,Ww,n)}function Xw(e,t){var n=e==null?0:e.length;return!!n&&qw(e,t,0)>-1}var jw=9007199254740991,Zw=/^(?:0|[1-9]\d*)$/;function oc(e,t){var n=typeof e;return t=t??jw,!!t&&(n=="number"||n!="symbol"&&Zw.test(e))&&e>-1&&e%1==0&&e<t}function La(e,t,n){t=="__proto__"&&Da?Da(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Vi(e,t){return e===t||e!==e&&t!==t}var Kw=Object.prototype,Qw=Kw.hasOwnProperty;function yp(e,t,n){var r=e[t];(!(Qw.call(e,t)&&Vi(r,n))||n===void 0&&!(t in e))&&La(e,t,n)}function zi(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=r?r(n[o],e[o],o,n,e):void 0;l===void 0&&(l=e[o]),i?La(n,o,l):yp(n,o,l)}return n}var Ep=Math.max;function Jw(e,t,n){return t=Ep(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Ep(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),Rw(e,this,o)}}function xp(e,t){return Gw(Jw(e,t,rc),e+"")}var tO=9007199254740991;function lc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tO}function tr(e){return e!=null&&lc(e.length)&&!ic(e)}function bp(e,t,n){if(!Me(n))return!1;var r=typeof t;return(r=="number"?tr(n)&&oc(t,n.length):r=="string"&&t in n)?Vi(n[t],e):!1}function eO(e){return xp(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&bp(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,s)}return t})}var nO=Object.prototype;function Ra(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||nO;return e===n}function rO(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var iO="[object Arguments]";function _p(e){return Qe(e)&&Kn(e)==iO}var Sp=Object.prototype,sO=Sp.hasOwnProperty,aO=Sp.propertyIsEnumerable,oO=_p(function(){return arguments}())?_p:function(e){return Qe(e)&&sO.call(e,"callee")&&!aO.call(e,"callee")};const Ir=oO;function lO(){return!1}var Tp=typeof W=="object"&&W&&!W.nodeType&&W,wp=Tp&&typeof module=="object"&&module&&!module.nodeType&&module,cO=wp&&wp.exports===Tp,Op=cO?Be.Buffer:void 0,uO=Op?Op.isBuffer:void 0,hO=uO||lO;const kr=hO;var dO="[object Arguments]",fO="[object Array]",pO="[object Boolean]",gO="[object Date]",mO="[object Error]",vO="[object Function]",yO="[object Map]",EO="[object Number]",xO="[object Object]",bO="[object RegExp]",_O="[object Set]",SO="[object String]",TO="[object WeakMap]",wO="[object ArrayBuffer]",OO="[object DataView]",MO="[object Float32Array]",AO="[object Float64Array]",CO="[object Int8Array]",DO="[object Int16Array]",LO="[object Int32Array]",RO="[object Uint8Array]",IO="[object Uint8ClampedArray]",kO="[object Uint16Array]",PO="[object Uint32Array]",Lt={};Lt[MO]=Lt[AO]=Lt[CO]=Lt[DO]=Lt[LO]=Lt[RO]=Lt[IO]=Lt[kO]=Lt[PO]=!0,Lt[dO]=Lt[fO]=Lt[wO]=Lt[pO]=Lt[OO]=Lt[gO]=Lt[mO]=Lt[vO]=Lt[yO]=Lt[EO]=Lt[xO]=Lt[bO]=Lt[_O]=Lt[SO]=Lt[TO]=!1;function $O(e){return Qe(e)&&lc(e.length)&&!!Lt[Kn(e)]}function cc(e){return function(t){return e(t)}}var Mp=typeof W=="object"&&W&&!W.nodeType&&W,Wi=Mp&&typeof module=="object"&&module&&!module.nodeType&&module,NO=Wi&&Wi.exports===Mp,uc=NO&&op.process,UO=function(){try{var e=Wi&&Wi.require&&Wi.require("util").types;return e||uc&&uc.binding&&uc.binding("util")}catch{}}();const Pr=UO;var Ap=Pr&&Pr.isTypedArray,BO=Ap?cc(Ap):$O;const Ia=BO;var FO=Object.prototype,HO=FO.hasOwnProperty;function Cp(e,t){var n=qt(e),r=!n&&Ir(e),i=!n&&!r&&kr(e),s=!n&&!r&&!i&&Ia(e),a=n||r||i||s,o=a?rO(e.length,String):[],l=o.length;for(var c in e)(t||HO.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||oc(c,l)))&&o.push(c);return o}function Dp(e,t){return function(n){return e(t(n))}}var GO=Dp(Object.keys,Object);const VO=GO;var zO=Object.prototype,WO=zO.hasOwnProperty;function Lp(e){if(!Ra(e))return VO(e);var t=[];for(var n in Object(e))WO.call(e,n)&&n!="constructor"&&t.push(n);return t}function Yi(e){return tr(e)?Cp(e):Lp(e)}function YO(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var qO=Object.prototype,XO=qO.hasOwnProperty;function jO(e){if(!Me(e))return YO(e);var t=Ra(e),n=[];for(var r in e)r=="constructor"&&(t||!XO.call(e,r))||n.push(r);return n}function qi(e){return tr(e)?Cp(e,!0):jO(e)}var ZO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,KO=/^\w*$/;function hc(e,t){if(qt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ca(e)?!0:KO.test(e)||!ZO.test(e)||t!=null&&e in Object(t)}var QO=Jn(Object,"create");const Xi=QO;function JO(){this.__data__=Xi?Xi(null):{},this.size=0}function tM(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var eM="__lodash_hash_undefined__",nM=Object.prototype,rM=nM.hasOwnProperty;function iM(e){var t=this.__data__;if(Xi){var n=t[e];return n===eM?void 0:n}return rM.call(t,e)?t[e]:void 0}var sM=Object.prototype,aM=sM.hasOwnProperty;function oM(e){var t=this.__data__;return Xi?t[e]!==void 0:aM.call(t,e)}var lM="__lodash_hash_undefined__";function cM(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xi&&t===void 0?lM:t,this}function er(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}er.prototype.clear=JO,er.prototype.delete=tM,er.prototype.get=iM,er.prototype.has=oM,er.prototype.set=cM;function uM(){this.__data__=[],this.size=0}function ka(e,t){for(var n=e.length;n--;)if(Vi(e[n][0],t))return n;return-1}var hM=Array.prototype,dM=hM.splice;function fM(e){var t=this.__data__,n=ka(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():dM.call(t,n,1),--this.size,!0}function pM(e){var t=this.__data__,n=ka(t,e);return n<0?void 0:t[n][1]}function gM(e){return ka(this.__data__,e)>-1}function mM(e,t){var n=this.__data__,r=ka(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function gn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}gn.prototype.clear=uM,gn.prototype.delete=fM,gn.prototype.get=pM,gn.prototype.has=gM,gn.prototype.set=mM;var vM=Jn(Be,"Map");const ji=vM;function yM(){this.size=0,this.__data__={hash:new er,map:new(ji||gn),string:new er}}function EM(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pa(e,t){var n=e.__data__;return EM(t)?n[typeof t=="string"?"string":"hash"]:n.map}function xM(e){var t=Pa(this,e).delete(e);return this.size-=t?1:0,t}function bM(e){return Pa(this,e).get(e)}function _M(e){return Pa(this,e).has(e)}function SM(e,t){var n=Pa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function mn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mn.prototype.clear=yM,mn.prototype.delete=xM,mn.prototype.get=bM,mn.prototype.has=_M,mn.prototype.set=SM;var TM="Expected a function";function dc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(TM);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(dc.Cache||mn),n}dc.Cache=mn;var wM=500;function OM(e){var t=dc(e,function(r){return n.size===wM&&n.clear(),r}),n=t.cache;return t}var MM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AM=/\\(\\)?/g,CM=OM(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(MM,function(n,r,i,s){t.push(i?s.replace(AM,"$1"):r||n)}),t});const DM=CM;function Zi(e){return e==null?"":fp(e)}function Rp(e,t){return qt(e)?e:hc(e,t)?[e]:DM(Zi(e))}var LM=1/0;function $a(e){if(typeof e=="string"||Ca(e))return e;var t=e+"";return t=="0"&&1/e==-LM?"-0":t}function Ip(e,t){t=Rp(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[$a(t[n++])];return n&&n==r?e:void 0}function Mt(e,t,n){var r=e==null?void 0:Ip(e,t);return r===void 0?n:r}function fc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var kp=Oe?Oe.isConcatSpreadable:void 0;function RM(e){return qt(e)||Ir(e)||!!(kp&&e&&e[kp])}function Na(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=RM),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Na(o,t-1,n,r,i):fc(i,o):r||(i[i.length]=o)}return i}function Pp(e){var t=e==null?0:e.length;return t?Na(e,1):[]}var IM=Dp(Object.getPrototypeOf,Object);const pc=IM;var kM="[object Object]",PM=Function.prototype,$M=Object.prototype,$p=PM.toString,NM=$M.hasOwnProperty,UM=$p.call(Object);function BM(e){if(!Qe(e)||Kn(e)!=kM)return!1;var t=pc(e);if(t===null)return!0;var n=NM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$p.call(n)==UM}function FM(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function HM(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:FM(e,t,n)}var GM="\\ud800-\\udfff",VM="\\u0300-\\u036f",zM="\\ufe20-\\ufe2f",WM="\\u20d0-\\u20ff",YM=VM+zM+WM,qM="\\ufe0e\\ufe0f",XM="\\u200d",jM=RegExp("["+XM+GM+YM+qM+"]");function Np(e){return jM.test(e)}function ZM(e){return e.split("")}var Up="\\ud800-\\udfff",KM="\\u0300-\\u036f",QM="\\ufe20-\\ufe2f",JM="\\u20d0-\\u20ff",tA=KM+QM+JM,eA="\\ufe0e\\ufe0f",nA="["+Up+"]",gc="["+tA+"]",mc="\\ud83c[\\udffb-\\udfff]",rA="(?:"+gc+"|"+mc+")",Bp="[^"+Up+"]",Fp="(?:\\ud83c[\\udde6-\\uddff]){2}",Hp="[\\ud800-\\udbff][\\udc00-\\udfff]",iA="\\u200d",Gp=rA+"?",Vp="["+eA+"]?",sA="(?:"+iA+"(?:"+[Bp,Fp,Hp].join("|")+")"+Vp+Gp+")*",aA=Vp+Gp+sA,oA="(?:"+[Bp+gc+"?",gc,Fp,Hp,nA].join("|")+")",lA=RegExp(mc+"(?="+mc+")|"+oA+aA,"g");function cA(e){return e.match(lA)||[]}function uA(e){return Np(e)?cA(e):ZM(e)}function hA(e){return function(t){t=Zi(t);var n=Np(t)?uA(t):void 0,r=n?n[0]:t.charAt(0),i=n?HM(n,1).join(""):t.slice(1);return r[e]()+i}}var dA=hA("toUpperCase");const fA=dA;function pA(e){return fA(Zi(e).toLowerCase())}function gA(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function mA(e){return function(t){return e==null?void 0:e[t]}}var vA={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},yA=mA(vA);const EA=yA;var xA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bA="\\u0300-\\u036f",_A="\\ufe20-\\ufe2f",SA="\\u20d0-\\u20ff",TA=bA+_A+SA,wA="["+TA+"]",OA=RegExp(wA,"g");function MA(e){return e=Zi(e),e&&e.replace(xA,EA).replace(OA,"")}var AA=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function CA(e){return e.match(AA)||[]}var DA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function LA(e){return DA.test(e)}var zp="\\ud800-\\udfff",RA="\\u0300-\\u036f",IA="\\ufe20-\\ufe2f",kA="\\u20d0-\\u20ff",PA=RA+IA+kA,Wp="\\u2700-\\u27bf",Yp="a-z\\xdf-\\xf6\\xf8-\\xff",$A="\\xac\\xb1\\xd7\\xf7",NA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",UA="\\u2000-\\u206f",BA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qp="A-Z\\xc0-\\xd6\\xd8-\\xde",FA="\\ufe0e\\ufe0f",Xp=$A+NA+UA+BA,jp="['’]",Zp="["+Xp+"]",HA="["+PA+"]",Kp="\\d+",GA="["+Wp+"]",Qp="["+Yp+"]",Jp="[^"+zp+Xp+Kp+Wp+Yp+qp+"]",VA="\\ud83c[\\udffb-\\udfff]",zA="(?:"+HA+"|"+VA+")",WA="[^"+zp+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",eg="[\\ud800-\\udbff][\\udc00-\\udfff]",$r="["+qp+"]",YA="\\u200d",ng="(?:"+Qp+"|"+Jp+")",qA="(?:"+$r+"|"+Jp+")",rg="(?:"+jp+"(?:d|ll|m|re|s|t|ve))?",ig="(?:"+jp+"(?:D|LL|M|RE|S|T|VE))?",sg=zA+"?",ag="["+FA+"]?",XA="(?:"+YA+"(?:"+[WA,tg,eg].join("|")+")"+ag+sg+")*",jA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ZA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",KA=ag+sg+XA,QA="(?:"+[GA,tg,eg].join("|")+")"+KA,JA=RegExp([$r+"?"+Qp+"+"+rg+"(?="+[Zp,$r,"$"].join("|")+")",qA+"+"+ig+"(?="+[Zp,$r+ng,"$"].join("|")+")",$r+"?"+ng+"+"+rg,$r+"+"+ig,ZA,jA,Kp,QA].join("|"),"g");function tC(e){return e.match(JA)||[]}function eC(e,t,n){return e=Zi(e),t=n?void 0:t,t===void 0?LA(e)?tC(e):CA(e):e.match(t)||[]}var nC="['’]",rC=RegExp(nC,"g");function og(e){return function(t){return gA(eC(MA(t).replace(rC,"")),e,"")}}var iC=og(function(e,t,n){return t=t.toLowerCase(),e+(n?pA(t):t)});const sC=iC;function aC(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function lg(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Gi(n),n=n===n?n:0),t!==void 0&&(t=Gi(t),t=t===t?t:0),aC(Gi(e),t,n)}function oC(){this.__data__=new gn,this.size=0}function lC(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cC(e){return this.__data__.get(e)}function uC(e){return this.__data__.has(e)}var hC=200;function dC(e,t){var n=this.__data__;if(n instanceof gn){var r=n.__data__;if(!ji||r.length<hC-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mn(r)}return n.set(e,t),this.size=n.size,this}function Fe(e){var t=this.__data__=new gn(e);this.size=t.size}Fe.prototype.clear=oC,Fe.prototype.delete=lC,Fe.prototype.get=cC,Fe.prototype.has=uC,Fe.prototype.set=dC;function fC(e,t){return e&&zi(t,Yi(t),e)}function pC(e,t){return e&&zi(t,qi(t),e)}var cg=typeof W=="object"&&W&&!W.nodeType&&W,ug=cg&&typeof module=="object"&&module&&!module.nodeType&&module,gC=ug&&ug.exports===cg,hg=gC?Be.Buffer:void 0,dg=hg?hg.allocUnsafe:void 0;function fg(e,t){if(t)return e.slice();var n=e.length,r=dg?dg(n):new e.constructor(n);return e.copy(r),r}function mC(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function pg(){return[]}var vC=Object.prototype,yC=vC.propertyIsEnumerable,gg=Object.getOwnPropertySymbols,EC=gg?function(e){return e==null?[]:(e=Object(e),mC(gg(e),function(t){return yC.call(e,t)}))}:pg;const vc=EC;function xC(e,t){return zi(e,vc(e),t)}var bC=Object.getOwnPropertySymbols,_C=bC?function(e){for(var t=[];e;)fc(t,vc(e)),e=pc(e);return t}:pg;const mg=_C;function SC(e,t){return zi(e,mg(e),t)}function vg(e,t,n){var r=t(e);return qt(e)?r:fc(r,n(e))}function yc(e){return vg(e,Yi,vc)}function TC(e){return vg(e,qi,mg)}var wC=Jn(Be,"DataView");const Ec=wC;var OC=Jn(Be,"Promise");const xc=OC;var MC=Jn(Be,"Set");const Nr=MC;var yg="[object Map]",AC="[object Object]",Eg="[object Promise]",xg="[object Set]",bg="[object WeakMap]",_g="[object DataView]",CC=Qn(Ec),DC=Qn(ji),LC=Qn(xc),RC=Qn(Nr),IC=Qn(ac),nr=Kn;(Ec&&nr(new Ec(new ArrayBuffer(1)))!=_g||ji&&nr(new ji)!=yg||xc&&nr(xc.resolve())!=Eg||Nr&&nr(new Nr)!=xg||ac&&nr(new ac)!=bg)&&(nr=function(e){var t=Kn(e),n=t==AC?e.constructor:void 0,r=n?Qn(n):"";if(r)switch(r){case CC:return _g;case DC:return yg;case LC:return Eg;case RC:return xg;case IC:return bg}return t});const Ur=nr;var kC=Object.prototype,PC=kC.hasOwnProperty;function $C(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&PC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var NC=Be.Uint8Array;const Ua=NC;function bc(e){var t=new e.constructor(e.byteLength);return new Ua(t).set(new Ua(e)),t}function UC(e,t){var n=t?bc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var BC=/\w*$/;function FC(e){var t=new e.constructor(e.source,BC.exec(e));return t.lastIndex=e.lastIndex,t}var Sg=Oe?Oe.prototype:void 0,Tg=Sg?Sg.valueOf:void 0;function HC(e){return Tg?Object(Tg.call(e)):{}}function wg(e,t){var n=t?bc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var GC="[object Boolean]",VC="[object Date]",zC="[object Map]",WC="[object Number]",YC="[object RegExp]",qC="[object Set]",XC="[object String]",jC="[object Symbol]",ZC="[object ArrayBuffer]",KC="[object DataView]",QC="[object Float32Array]",JC="[object Float64Array]",tD="[object Int8Array]",eD="[object Int16Array]",nD="[object Int32Array]",rD="[object Uint8Array]",iD="[object Uint8ClampedArray]",sD="[object Uint16Array]",aD="[object Uint32Array]";function oD(e,t,n){var r=e.constructor;switch(t){case ZC:return bc(e);case GC:case VC:return new r(+e);case KC:return UC(e,n);case QC:case JC:case tD:case eD:case nD:case rD:case iD:case sD:case aD:return wg(e,n);case zC:return new r;case WC:case XC:return new r(e);case YC:return FC(e);case qC:return new r;case jC:return HC(e)}}function Og(e){return typeof e.constructor=="function"&&!Ra(e)?Lw(pc(e)):{}}var lD="[object Map]";function cD(e){return Qe(e)&&Ur(e)==lD}var Mg=Pr&&Pr.isMap,uD=Mg?cc(Mg):cD;const hD=uD;var dD="[object Set]";function fD(e){return Qe(e)&&Ur(e)==dD}var Ag=Pr&&Pr.isSet,pD=Ag?cc(Ag):fD;const gD=pD;var mD=1,vD=2,yD=4,Cg="[object Arguments]",ED="[object Array]",xD="[object Boolean]",bD="[object Date]",_D="[object Error]",Dg="[object Function]",SD="[object GeneratorFunction]",TD="[object Map]",wD="[object Number]",Lg="[object Object]",OD="[object RegExp]",MD="[object Set]",AD="[object String]",CD="[object Symbol]",DD="[object WeakMap]",LD="[object ArrayBuffer]",RD="[object DataView]",ID="[object Float32Array]",kD="[object Float64Array]",PD="[object Int8Array]",$D="[object Int16Array]",ND="[object Int32Array]",UD="[object Uint8Array]",BD="[object Uint8ClampedArray]",FD="[object Uint16Array]",HD="[object Uint32Array]",At={};At[Cg]=At[ED]=At[LD]=At[RD]=At[xD]=At[bD]=At[ID]=At[kD]=At[PD]=At[$D]=At[ND]=At[TD]=At[wD]=At[Lg]=At[OD]=At[MD]=At[AD]=At[CD]=At[UD]=At[BD]=At[FD]=At[HD]=!0,At[_D]=At[Dg]=At[DD]=!1;function Ba(e,t,n,r,i,s){var a,o=t&mD,l=t&vD,c=t&yD;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!Me(e))return e;var u=qt(e);if(u){if(a=$C(e),!o)return vp(e,a)}else{var d=Ur(e),h=d==Dg||d==SD;if(kr(e))return fg(e,o);if(d==Lg||d==Cg||h&&!i){if(a=l||h?{}:Og(e),!o)return l?SC(e,pC(a,e)):xC(e,fC(a,e))}else{if(!At[d])return i?e:{};a=oD(e,d,o)}}s||(s=new Fe);var f=s.get(e);if(f)return f;s.set(e,a),gD(e)?e.forEach(function(v){a.add(Ba(v,t,n,v,e,s))}):hD(e)&&e.forEach(function(v,m){a.set(m,Ba(v,t,n,m,e,s))});var p=c?l?TC:yc:l?qi:Yi,g=u?void 0:p(e);return Vw(g||e,function(v,m){g&&(m=v,v=e[m]),yp(a,m,Ba(v,t,n,m,e,s))}),a}var GD=1,VD=4;function vn(e){return Ba(e,GD|VD)}var zD="__lodash_hash_undefined__";function WD(e){return this.__data__.set(e,zD),this}function YD(e){return this.__data__.has(e)}function Ki(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mn;++t<n;)this.add(e[t])}Ki.prototype.add=Ki.prototype.push=WD,Ki.prototype.has=YD;function Rg(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Ig(e,t){return e.has(t)}var qD=1,XD=2;function kg(e,t,n,r,i,s){var a=n&qD,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&XD?new Ki:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var v=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(v!==void 0){if(v)continue;h=!1;break}if(f){if(!Rg(t,function(m,y){if(!Ig(f,y)&&(p===m||i(p,m,n,r,s)))return f.push(y)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function jD(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function _c(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var ZD=1,KD=2,QD="[object Boolean]",JD="[object Date]",tL="[object Error]",eL="[object Map]",nL="[object Number]",rL="[object RegExp]",iL="[object Set]",sL="[object String]",aL="[object Symbol]",oL="[object ArrayBuffer]",lL="[object DataView]",Pg=Oe?Oe.prototype:void 0,Sc=Pg?Pg.valueOf:void 0;function cL(e,t,n,r,i,s,a){switch(n){case lL:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oL:return!(e.byteLength!=t.byteLength||!s(new Ua(e),new Ua(t)));case QD:case JD:case nL:return Vi(+e,+t);case tL:return e.name==t.name&&e.message==t.message;case rL:case sL:return e==t+"";case eL:var o=jD;case iL:var l=r&ZD;if(o||(o=_c),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=KD,a.set(e,t);var u=kg(o(e),o(t),r,i,s,a);return a.delete(e),u;case aL:if(Sc)return Sc.call(e)==Sc.call(t)}return!1}var uL=1,hL=Object.prototype,dL=hL.hasOwnProperty;function fL(e,t,n,r,i,s){var a=n&uL,o=yc(e),l=o.length,c=yc(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:dL.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=a;++d<l;){h=o[d];var m=e[h],y=t[h];if(r)var E=a?r(y,m,h,t,e,s):r(m,y,h,e,t,s);if(!(E===void 0?m===y||i(m,y,n,r,s):E)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(g=!1)}return s.delete(e),s.delete(t),g}var pL=1,$g="[object Arguments]",Ng="[object Array]",Fa="[object Object]",gL=Object.prototype,Ug=gL.hasOwnProperty;function mL(e,t,n,r,i,s){var a=qt(e),o=qt(t),l=a?Ng:Ur(e),c=o?Ng:Ur(t);l=l==$g?Fa:l,c=c==$g?Fa:c;var u=l==Fa,d=c==Fa,h=l==c;if(h&&kr(e)){if(!kr(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Fe),a||Ia(e)?kg(e,t,n,r,i,s):cL(e,t,l,n,r,i,s);if(!(n&pL)){var f=u&&Ug.call(e,"__wrapped__"),p=d&&Ug.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,v=p?t.value():t;return s||(s=new Fe),i(g,v,n,r,s)}}return h?(s||(s=new Fe),fL(e,t,n,r,i,s)):!1}function Ha(e,t,n,r,i){return e===t?!0:e==null||t==null||!Qe(e)&&!Qe(t)?e!==e&&t!==t:mL(e,t,n,r,Ha,i)}var vL=1,yL=2;function EL(e,t,n,r){var i=n.length,s=i,a=!r;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var l=o[0],c=e[l],u=o[1];if(a&&o[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Fe;if(r)var h=r(c,u,l,e,t,d);if(!(h===void 0?Ha(u,c,vL|yL,r,d):h))return!1}}return!0}function Bg(e){return e===e&&!Me(e)}function xL(e){for(var t=Yi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Bg(i)]}return t}function Fg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function bL(e){var t=xL(e);return t.length==1&&t[0][2]?Fg(t[0][0],t[0][1]):function(n){return n===e||EL(n,e,t)}}function _L(e,t){return e!=null&&t in Object(e)}function SL(e,t,n){t=Rp(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=$a(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&lc(i)&&oc(a,i)&&(qt(e)||Ir(e)))}function TL(e,t){return e!=null&&SL(e,t,_L)}var wL=1,OL=2;function ML(e,t){return hc(e)&&Bg(t)?Fg($a(e),t):function(n){var r=Mt(n,e);return r===void 0&&r===t?TL(n,e):Ha(t,r,wL|OL)}}function AL(e){return function(t){return t==null?void 0:t[e]}}function CL(e){return function(t){return Ip(t,e)}}function DL(e){return hc(e)?AL($a(e)):CL(e)}function Ga(e){return typeof e=="function"?e:e==null?rc:typeof e=="object"?qt(e)?ML(e[0],e[1]):bL(e):DL(e)}function LL(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function RL(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[e?o:++i];if(n(s[l],l,s)===!1)break}return t}}var IL=RL();const Hg=IL;function kL(e,t){return e&&Hg(e,t,Yi)}function PL(e,t){return function(n,r){if(n==null)return n;if(!tr(n))return e(n,r);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s<i)&&r(a[s],s,a)!==!1;);return n}}var $L=PL(kL);const Tc=$L;function NL(e,t,n,r){return Tc(e,function(i,s,a){t(r,i,n(i),a)}),r}function UL(e,t){return function(n,r){var i=qt(n)?LL:NL,s=t?t():{};return i(n,e,Ga(r),s)}}var BL=function(){return Be.Date.now()};const wc=BL;var FL="Expected a function",HL=Math.max,GL=Math.min;function Va(e,t,n){var r,i,s,a,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(FL);t=Gi(t)||0,Me(n)&&(u=!!n.leading,d="maxWait"in n,s=d?HL(Gi(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(b){var M=r,D=i;return r=i=void 0,c=b,a=e.apply(D,M),a}function p(b){return c=b,o=setTimeout(m,t),u?f(b):a}function g(b){var M=b-l,D=b-c,G=t-M;return d?GL(G,s-D):G}function v(b){var M=b-l,D=b-c;return l===void 0||M>=t||M<0||d&&D>=s}function m(){var b=wc();if(v(b))return y(b);o=setTimeout(m,g(b))}function y(b){return o=void 0,h&&r?f(b):(r=i=void 0,a)}function E(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function _(){return o===void 0?a:y(wc())}function S(){var b=wc(),M=v(b);if(r=arguments,i=this,l=b,M){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(m,t),f(l)}return o===void 0&&(o=setTimeout(m,t)),a}return S.cancel=E,S.flush=_,S}function Oc(e,t,n){(n!==void 0&&!Vi(e[t],n)||n===void 0&&!(t in e))&&La(e,t,n)}function Mc(e){return Qe(e)&&tr(e)}function Ac(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function VL(e){return zi(e,qi(e))}function zL(e,t,n,r,i,s,a){var o=Ac(e,n),l=Ac(t,n),c=a.get(l);if(c){Oc(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=qt(l),f=!h&&kr(l),p=!h&&!f&&Ia(l);u=l,h||f||p?qt(o)?u=o:Mc(o)?u=vp(o):f?(d=!1,u=fg(l,!0)):p?(d=!1,u=wg(l,!0)):u=[]:BM(l)||Ir(l)?(u=o,Ir(o)?u=VL(o):(!Me(o)||ic(o))&&(u=Og(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),Oc(e,n,u)}function Gg(e,t,n,r,i){e!==t&&Hg(t,function(s,a){if(i||(i=new Fe),Me(s))zL(e,t,a,n,Gg,r,i);else{var o=r?r(Ac(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),Oc(e,a,o)}},qi)}function WL(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function YL(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function qL(e,t){var n=-1,r=tr(e)?Array(e.length):[];return Tc(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function XL(e,t){var n=qt(e)?up:qL;return n(e,Ga(t))}var jL=1/0;function ZL(e,t){return Na(XL(e,t),jL)}function KL(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}var QL=Object.prototype,JL=QL.hasOwnProperty,tR=UL(function(e,t,n){JL.call(e,n)?e[n].push(t):La(e,n,[t])});const eR=tR;var nR="[object Map]",rR="[object Set]",iR=Object.prototype,sR=iR.hasOwnProperty;function He(e){if(e==null)return!0;if(tr(e)&&(qt(e)||typeof e=="string"||typeof e.splice=="function"||kr(e)||Ia(e)||Ir(e)))return!e.length;var t=Ur(e);if(t==nR||t==rR)return!e.size;if(Ra(e))return!Lp(e).length;for(var n in e)if(sR.call(e,n))return!1;return!0}function Vg(e,t){return Ha(e,t)}var aR=og(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const Br=aR;var oR=eO(function(e,t,n){Gg(e,t,n)});const at=oR;function lR(e,t){var n;return Tc(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function cR(e,t,n){var r=qt(e)?Rg:lR;return n&&bp(e,t,n)&&(t=void 0),r(e,Ga(t))}var uR=1/0,hR=Nr&&1/_c(new Nr([,-0]))[1]==uR?function(e){return new Nr(e)}:Iw;const dR=hR;var fR=200;function zg(e,t,n){var r=-1,i=Xw,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=WL;else if(s>=fR){var c=t?null:dR(e);if(c)return _c(c);a=!1,i=Ig,l=new Ki}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var pR=xp(function(e){var t=YL(e);return Mc(t)&&(t=void 0),zg(Na(e,1,Mc,!0),Ga(t))});const gR=pR;function Qi(e){return e&&e.length?zg(e):[]}var Cc=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Cc||{}),Dc=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(Dc||{}),Lc=(e=>(e.UPDATE="model-update",e))(Lc||{}),Wg=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(Wg||{}),Rc=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(Rc||{}),Ic=(e=>(e.CHANGE="zoom-domain-change",e))(Ic||{}),kc=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(kc||{}),Pc=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(Pc||{}),$c=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))($c||{}),Nc=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(Nc||{}),Uc=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(Uc||{}),Bc=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(Bc||{}),Fc=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Fc||{}),Hc=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(Hc||{}),Gc=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Gc||{}),Vc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Vc||{}),zc=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(zc||{}),Wc=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Wc||{}),Yc=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Yc||{}),Fr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(Fr||{}),qc=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(qc||{}),Yg=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(Yg||{}),qg=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(qg||{}),Xg=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(Xg||{}),jg=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(jg||{}),Zg=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Zg||{}),Hr=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(Hr||{});const T=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Xg,Area:$c,Axis:Pc,Bar:Fc,Boxplot:Hc,CanvasZoom:kc,Chart:Cc,Choropleth:Hr,CirclePack:qg,Gauge:Bc,Heatmap:Zg,Legend:Yg,Line:Vc,Meter:jg,Modal:Dc,Model:Lc,Pie:Uc,Radar:zc,Scatter:Gc,Threshold:qc,Toolbar:Wg,Tooltip:Fr,Tree:Wc,Treemap:Yc,WordCloud:Nc,ZoomBar:Rc,ZoomDomain:Ic},Symbol.toStringTag,{value:"Module"}));var tt=(e=>(e.HTML="html",e.SVG="svg",e))(tt||{}),Xc=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Xc||{}),rt=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(rt||{}),z=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(z||{}),Ge=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Ge||{}),Ae=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Ae||{}),zt=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(zt||{}),K=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(K||{}),Gr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Gr||{}),Ut=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Ut||{}),Vr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Vr||{}),za=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(za||{}),wt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(wt||{}),lt=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(lt||{}),rr=(e=>(e.CENTER="center",e))(rr||{}),Ji=(e=>(e.LEFT="left",e.RIGHT="right",e))(Ji||{}),Bt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Bt||{}),Je=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(Je||{}),tn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(tn||{}),ir=(e=>(e.SEMI="semi",e.FULL="full",e))(ir||{}),Wa=(e=>(e.UP="up",e.DOWN="down",e))(Wa||{}),ts=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(ts||{}),es=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(es||{}),Ee=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(Ee||{}),It=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(It||{}),Ya=(e=>(e.LEFT="left",e.RIGHT="right",e))(Ya||{}),Ft=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Ft||{}),ns=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(ns||{}),zr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(zr||{}),rs=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(rs||{}),en=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(en||{});const ue="cds",yn={opacity:{unselected:.05,selected:.4}},Ln={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Wr={duration:1e3,ease:qh,zoomLevel:3},Yr={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},Kg={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Ce={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},mR={defaultBins:10},Pt={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},En={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Xt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Ct={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},sr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Ve={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Qg={minCellDividerDimension:16,chartPadding:.5},Jg={default:{size:24}},vR={horizontalOffset:10},tm={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},xe={height:{[Ge.GRAPH_VIEW]:32,[Ge.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},yR=[{type:Ft.RADIUS,name:"Radius"},{type:Ft.AREA,name:"Poor area"},{type:Ft.AREA,name:"Satisfactory area"},{type:Ft.AREA,name:"Great area"},{type:Ft.QUARTILE,name:"Quartiles"}];function ER(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=Bn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function kt(e,t){var i;const n=vn(e),r=Object.keys(t.axes||{});(i=t==null?void 0:t.toolbar)!=null&&i.controls&&delete n.toolbar.controls,r.length===0&&delete n.axes;for(const s in n.axes)if(r.includes(s)){const a=t.axes[s];(a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format");const o=a.mapsTo;if(o==null){const l=a.scaleType;l==null?a.mapsTo="value":l===K.TIME?a.mapsTo="date":l===K.LABELS&&(a.mapsTo="key")}}else delete n.axes[s];return Zc(n,t),at(n,t)}function xn(e){if(!e)return;const t=/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/,n=e.getAttribute("transform").match(t);if(!n)return null;if(n[0]){const r=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:r[0],ty:r[1]}}return null}function is(e){const n=/\(([^)]+)\)/.exec(e);if(n&&n.length>1){const r=n[1].split(",");if(r.length>1)return{x:parseFloat(r[0]),y:parseFloat(r[1])}}return{x:0,y:0}}function jc(e,t,n="value",r=!1){const i=e/t.reduce((s,a)=>s+a[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function ss(e,t,n){if(n>e.length)return e;if(t===Ae.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Ae.FRONT_LINE)return"..."+e.substr(-n);if(t===Ae.END_LINE)return e.substr(0,n)+"..."}function Zc(e,t){const n=x(e,"legend","additionalItems"),r=x(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=yR.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=gR(a,r,"name")}}const x=(e,...t)=>{let n=e;if(n){for(const r of t)if(n[r]!==null&&n[r]!==void 0)n=n[r];else return null;return n}return null},em=(e,t)=>t===zt.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ie=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=em(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function bn(e,t,n){return n===zt.VERTICAL?[e,t]:[t,e]}function yt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ze(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function nm(e,t){const n=yt(e);return isNaN(t)?ze(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Kc(e,t){const n=yt(e);if(isNaN(t))return ze(e,NaN);if(!t)return n;const r=n.getDate(),i=ze(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const s=i.getDate();return r>=s?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function Qc(e,t){const n=+yt(e);return ze(e,n+t)}const rm=6048e5,xR=864e5,im=6e4,sm=36e5;function am(e,t){return Qc(e,t*sm)}let bR={};function qa(){return bR}function as(e,t){var o,l,c,u;const n=qa(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=yt(e),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function Xa(e){return as(e,{weekStartsOn:1})}function om(e){const t=yt(e),n=t.getFullYear(),r=ze(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Xa(r),s=ze(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const a=Xa(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function lm(e){const t=yt(e);return t.setHours(0,0,0,0),t}function cm(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function um(e,t){const n=lm(e),r=lm(t),i=+n-cm(n),s=+r-cm(r);return Math.trunc((i-s)/xR)}function _R(e){const t=om(e),n=ze(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Xa(n)}function Jc(e,t){return Qc(e,t*im)}function tu(e,t){return Qc(e,t*1e3)}function hm(e,t){return Kc(e,t*12)}function os(e,t){const n=yt(e),r=yt(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function SR(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function TR(e){if(!SR(e)&&typeof e!="number")return!1;const t=yt(e);return!isNaN(Number(t))}function wR(e,t){const n=yt(e),r=yt(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function OR(e,t){const n=yt(e),r=yt(t);return n.getFullYear()-r.getFullYear()}function MR(e,t){const n=yt(e),r=yt(t),i=dm(n,r),s=Math.abs(um(n,r));n.setDate(n.getDate()-i*s);const a=+(dm(n,r)===-i),o=i*(s-a);return o===0?0:o}function dm(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function eu(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function nu(e,t){return+yt(e)-+yt(t)}function AR(e,t,n){const r=nu(e,t)/sm;return eu(n==null?void 0:n.roundingMethod)(r)}function fm(e,t,n){const r=nu(e,t)/im;return eu(n==null?void 0:n.roundingMethod)(r)}function CR(e){const t=yt(e);return t.setHours(23,59,59,999),t}function DR(e){const t=yt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function LR(e){const t=yt(e);return+CR(t)==+DR(t)}function RR(e,t){const n=yt(e),r=yt(t),i=os(n,r),s=Math.abs(wR(n,r));let a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);let o=os(n,r)===-i;LR(yt(e))&&s===1&&os(e,r)===1&&(o=!1),a=i*(s-Number(o))}return a===0?0:a}function pm(e,t,n){const r=nu(e,t)/1e3;return eu(n==null?void 0:n.roundingMethod)(r)}function IR(e,t){const n=yt(e),r=yt(t),i=os(n,r),s=Math.abs(OR(n,r));n.setFullYear(1584),r.setFullYear(1584);const a=os(n,r)===-i,o=i*(s-+a);return o===0?0:o}function kR(e){const t=yt(e),n=ze(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const PR={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$R=(e,t,n)=>{let r;const i=PR[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ru(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const NR={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},UR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BR={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},FR={date:ru({formats:NR,defaultWidth:"full"}),time:ru({formats:UR,defaultWidth:"full"}),dateTime:ru({formats:BR,defaultWidth:"full"})},HR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GR=(e,t,n,r)=>HR[e];function ls(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const VR={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WR={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},YR={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},qR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},XR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jR={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ls({values:VR,defaultWidth:"wide"}),quarter:ls({values:zR,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ls({values:WR,defaultWidth:"wide"}),day:ls({values:YR,defaultWidth:"wide"}),dayPeriod:ls({values:qR,defaultWidth:"wide",formattingValues:XR,defaultFormattingWidth:"wide"})};function cs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?KR(o,d=>d.test(a)):ZR(o,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function ZR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function KR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function QR(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const JR=/^(\d+)(th|st|nd|rd)?/i,tI=/\d+/i,eI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nI={any:[/^b/i,/^(a|c)/i]},rI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},iI={any:[/1/i,/2/i,/3/i,/4/i]},sI={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},aI={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oI={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cI={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uI={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hI={ordinalNumber:QR({matchPattern:JR,parsePattern:tI,valueCallback:e=>parseInt(e,10)}),era:cs({matchPatterns:eI,defaultMatchWidth:"wide",parsePatterns:nI,defaultParseWidth:"any"}),quarter:cs({matchPatterns:rI,defaultMatchWidth:"wide",parsePatterns:iI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:cs({matchPatterns:sI,defaultMatchWidth:"wide",parsePatterns:aI,defaultParseWidth:"any"}),day:cs({matchPatterns:oI,defaultMatchWidth:"wide",parsePatterns:lI,defaultParseWidth:"any"}),dayPeriod:cs({matchPatterns:cI,defaultMatchWidth:"any",parsePatterns:uI,defaultParseWidth:"any"})},gm={code:"en-US",formatDistance:$R,formatLong:FR,formatRelative:GR,localize:jR,match:hI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dI(e){const t=yt(e);return um(t,kR(t))+1}function fI(e){const t=yt(e),n=+Xa(t)-+_R(t);return Math.trunc(n/rm)+1}function mm(e,t){var u,d,h,f;const n=yt(e),r=n.getFullYear(),i=qa(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=ze(e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=as(a,t),l=ze(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=as(l,t);return n.getTime()>=o.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function pI(e,t){var o,l,c,u;const n=qa(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=mm(e,t),s=ze(e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),as(s,t)}function gI(e,t){const n=yt(e),r=+as(n,t)-+pI(n,t);return Math.trunc(r/rm)+1}function _t(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Rn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return _t(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_t(n+1,2)},d(e,t){return _t(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _t(e.getHours()%12||12,t.length)},H(e,t){return _t(e.getHours(),t.length)},m(e,t){return _t(e.getMinutes(),t.length)},s(e,t){return _t(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return _t(i,t.length)}},qr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Rn.y(e,t)},Y:function(e,t,n,r){const i=mm(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return _t(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):_t(s,t.length)},R:function(e,t){const n=om(e);return _t(n,t.length)},u:function(e,t){const n=e.getFullYear();return _t(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return _t(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return _t(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Rn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return _t(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=gI(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):_t(i,t.length)},I:function(e,t,n){const r=fI(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):_t(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Rn.d(e,t)},D:function(e,t,n){const r=dI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):_t(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return _t(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return _t(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return _t(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=qr.noon:r===0?i=qr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=qr.evening:r>=12?i=qr.afternoon:r>=4?i=qr.morning:i=qr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Rn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Rn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):_t(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):_t(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Rn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Rn.s(e,t)},S:function(e,t){return Rn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Em(r);case"XXXX":case"XX":return ar(r);case"XXXXX":case"XXX":default:return ar(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Em(r);case"xxxx":case"xx":return ar(r);case"xxxxx":case"xxx":default:return ar(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ym(r,":");case"OOOO":default:return"GMT"+ar(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ym(r,":");case"zzzz":default:return"GMT"+ar(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return _t(r,t.length)},T:function(e,t,n){const r=e.getTime();return _t(r,t.length)}};function ym(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+_t(s,2)}function Em(e,t){return e%60===0?(e>0?"-":"+")+_t(Math.abs(e)/60,2):ar(e,t)}function ar(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=_t(Math.trunc(r/60),2),s=_t(r%60,2);return n+i+t+s}const xm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},bm=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},mI={p:bm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return xm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",xm(r,t)).replace("{{time}}",bm(i,t))}},vI=/^D+$/,yI=/^Y+$/,EI=["D","DD","YY","YYYY"];function xI(e){return vI.test(e)}function bI(e){return yI.test(e)}function _I(e,t,n){const r=SI(e,t,n);if(console.warn(r),EI.includes(e))throw new RangeError(r)}function SI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const TI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OI=/^'([^]*?)'?$/,MI=/''/g,AI=/[a-zA-Z]/;function Xr(e,t,n){var u,d,h,f,p,g,v,m;const r=qa(),i=(n==null?void 0:n.locale)??r.locale??gm,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((g=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((m=(v=r.locale)==null?void 0:v.options)==null?void 0:m.weekStartsOn)??0,o=yt(e);if(!TR(o))throw new RangeError("Invalid time value");let l=t.match(wI).map(y=>{const E=y[0];if(E==="p"||E==="P"){const _=mI[E];return _(y,i.formatLong)}return y}).join("").match(TI).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const E=y[0];if(E==="'")return{isToken:!1,value:CI(y)};if(vm[E])return{isToken:!0,value:y};if(E.match(AI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:y}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return l.map(y=>{if(!y.isToken)return y.value;const E=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&bI(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&xI(E))&&_I(E,t,String(e));const _=vm[E[0]];return _(o,E,i.localize,c)}).join("")}function CI(e){const t=e.match(OI);return t?t[1].replace(MI,"'"):e}function DI(e,t){return nm(e,-t)}function LI(e,t){return Kc(e,-t)}function RI(e,t){return am(e,-t)}function _m(e,t){return Jc(e,-t)}function Sm(e,t){return tu(e,-t)}function II(e,t){return hm(e,-t)}const jr={type:Ae.END_LINE,threshold:16,numCharacter:14},kI={enabled:!0,position:Gr.BOTTOM,clickable:!0,truncation:jr,alignment:Ut.LEFT,order:null,additionalItems:[]},PI={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},$I={enabled:!0},Tm={enabled:!0,showTotal:!0,truncation:jr,groupLabel:"Group"},wm={top:{visible:!0,includeZero:!0,truncation:jr},bottom:{visible:!0,includeZero:!0,truncation:jr},left:{visible:!0,includeZero:!0,truncation:jr},right:{visible:!0,includeZero:!0,truncation:jr}},ja={addSpaceOnEdges:1,showDayName:!1,localeObject:gm,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},NI=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),te={width:null,height:null,resizable:!0,theme:Xc.WHITE,tooltip:Tm,legend:kI,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:It.SHOW_AS_DATATABLE},...NI?[{type:It.MAKE_FULLSCREEN}]:[],{type:It.EXPORT_CSV},{type:It.EXPORT_PNG},{type:It.EXPORT_JPG}]}},Om=at({},te,{thematic:{projection:en.geoNaturalEarth1}}),us=at({},te,{axes:wm,timeScale:ja,grid:PI,ruler:$I,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Ge.GRAPH_VIEW}}}),or=at({},us,{bars:{maxWidth:16,spacingFactor:.25},timeScale:at(ja,{addSpaceOnEdges:1})}),UI=at({},or,{}),BI=at({},or,{}),FI=at({},or,{bars:at({},or.bars,{dividerSize:1.5})}),HI=at({},or,{}),iu=at({},us,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),GI=iu,Mm=at({},iu,{points:{radius:3,filled:!1,enabled:!0}}),Am=at({},Mm,{timeScale:at(ja,{addSpaceOnEdges:0})}),VI=Am,zI=at({},us,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[t*3/400,t*25/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:Ft.RADIUS,name:"Radius"}]}}),WI=at({},us,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Ft.AREA,name:"Poor area"},{type:Ft.AREA,name:"Satisfactory area"},{type:Ft.AREA,name:"Great area"},{type:Ft.QUARTILE,name:"Quartiles"}]}}),YI=at({},or,{bars:{dividerSize:1.5},timeScale:at(ja,{addSpaceOnEdges:0})}),qI=at({},te,{tooltip:at({},Tm,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[t*20/400,t*75/400]},wordMapsTo:"word"}}),Cm=at({},te,{pie:{labels:{formatter:null,enabled:!0},alignment:Ut.LEFT,sortFunction:null,valueMapsTo:"value"}}),XI=at({},te,{legend:{enabled:!1},gauge:{type:ir.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!==0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:Ut.LEFT}}),jI=at({},Cm,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:Ut.LEFT}}),Dm=at({},te,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),ZI=at({},Dm,{legend:{enabled:!0}}),KI=at({},te,{radar:{axes:{angle:"key",value:"value"},alignment:Ut.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),QI=at({},or,{comboChartTypes:[]}),JI=at({tree:{type:za.TREE}},te,{}),tk=at({},te,{data:at(te.data,{groupMapsTo:"name"})}),ek=at({},te,Yr,{data:at(te.data,{groupMapsTo:"name"})}),nk=at({},te,{alluvial:{data:at(te.data,{groupMapsTo:"source"}),nodeAlignment:Ut.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),rk=at({},te,{axes:wm,heatmap:{divider:{state:zr.AUTO},colorLegend:{type:"linear"}}}),ik=at({},Om,{choropleth:{colorLegend:{type:"linear"}}}),Ot={alluvialChart:nk,areaChart:Am,axisChart:us,boxplotChart:HI,bubbleChart:zI,bulletChart:WI,chart:te,circlePackChart:ek,choroplethChart:ik,comboChart:QI,donutChart:jI,gaugeChart:XI,groupedBarChart:BI,heatmapChart:rk,histogramChart:YI,lineChart:Mm,lollipopChart:GI,meterChart:Dm,pieChart:Cm,proportionalMeterChart:ZI,radarChart:KI,scatterChart:iu,simpleBarChart:UI,stackedAreaChart:VI,stackedBarChart:FI,thematicChart:Om,treeChart:JI,treemapChart:tk,wordCloudChart:qI};var Lm=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(Lm||{});const su=[["15seconds",15*1e3],["minute",60*1e3],["30minutes",30*60*1e3],["hourly",60*60*1e3],["daily",24*60*60*1e3],["monthly",30*24*60*60*1e3],["quarterly",3*30*24*60*60*1e3],["yearly",12*30*24*60*60*1e3]];function Rm(e,t,n,r,i){const s=t===0,a=Number(Xr(new Date(e),"c"))===2,o=Number(Xr(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||Ka(e)||hs(e,l)||In(e);case"minute":return s||Ka(e)||hs(e,l)||In(e);case"30minutes":return s||Ka(e)||hs(e,l)||In(e);case"hourly":return s||Ka(e)||hs(e,l)||In(e);case"daily":return i?s||a||In(e):s||hs(e,l)||In(e);case"weekly":return s||a||In(e);case"monthly":return s||In(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function au(e,t,n,r,i){const s=i.showDayName,a=r==="daily"&&s?"weekly":r,o=new Date(e),l=x(i,"timeIntervalFormats")[a],c=x(l,"primary"),u=x(l,"secondary");let d=Rm(e,t,n,r,s)?c:u;r==="15seconds"&&o.getMilliseconds()!==0&&(d=d.replace("pp","h:mm:ss.SSS a"));const h=i.localeObject;return Xr(o,d,{locale:h})}function Za(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function sk(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function ak(e){const t=su.reduce((n,[,r],i)=>{const s=su[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return su[t][0]}function ou(e,t){if(Lm[t])return t;if(e.length===1)return"15seconds";const n=sk(e),r=Mn(n);return ak(r)}function Ka(e){const{s:t,m:n,H:r}=Za(e);return r===0&&n===0&&t===0}function hs(e,t){const n=Za(e).M,r=Za(t).M;return n!==r}function In(e){const{M:t,d:n,s:r,m:i,H:s}=Za(e);return t===1&&n===1&&s===0&&i===0&&r===0}function Im(e){return e===void 0?"":e.toISOString()}function ok(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}class nn{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),i=x(r,"tabularRepModal","tableHeadingFormatter"),s=x(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:a}=this.services,o=a==null?void 0:a.getDomainAxisScaleType();let l;return o===K.TIME&&(l=u=>Xr(u,"MMM d, yyyy")),[typeof i=="function"?i(t):t,...typeof s=="function"?s(n):n.map(u=>(l&&(u[1]=l(u[1])),u))]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=x(n,"data"),a=x(n,"axes");return t&&(r=r.filter(o=>t.includes(o[s]))),a&&Object.keys(a).forEach(o=>{const l=a[o].mapsTo,c=a[o].scaleType;if((c===K.LINEAR||c===K.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===K.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,d]=a[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=Pt.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(a=>r.find(o=>o.name===a[i]&&o.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(vn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return x(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(r=>t.includes(r.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=Pt.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(r=>r.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(r=>r.name)}aggregateBinDataByGroup(t){return eR(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),s=n.axes[r],{groupMapsTo:a}=n.data,{bins:o=mR.defaultBins}=s,l=Array.isArray(o),c=$0().value(f=>f[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const f=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+f}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return c.forEach(f=>{const p=`${f.x0}-${f.x1}`,g=this.aggregateBinDataByGroup(f);d.forEach(v=>{h.push({group:v,key:p,value:g[v]||0,bin:f.x0})})}),{bins:c,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),s=this.getDataValuesGroupedByKeys({bins:i});return nc().keys(r)(s).map((a,o)=>Object.keys(a).filter(l=>!isNaN(l)).map(l=>{const c=a[l];return c[n]=r[o],c}))}getGroupedData(t){const n=this.getDisplayData(t),r={},{groupMapsTo:i}=this.getOptions().data;return n.map(s=>{const a=s[i];r[a]!==null&&r[a]!==void 0?r[a].push(s):r[a]=[s]}),Object.keys(r).map(s=>({name:s,data:r[s]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const r=this.getOptions(),i=this.getDisplayData(n);let s;t?s=t.map(l=>`${l.x0}:${l.x1}`):s=Qi(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Im(l[c]):l[c]&&typeof l[c].toString=="function"?l[c].toString():l[c]}));const a=this.services.cartesianScales.domainAxisPosition,o=r.axes[a].scaleType;return o===K.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===K.LOG||o===K.LINEAR)&&s.sort((l,c)=>l-c),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split(":"),d={x0:c,x1:u},h=t.find(f=>f.x0.toString()===c.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[i]===f).length}),d}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[i]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?Im(f[p])===l:f[p].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:s}=i.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const c=KL(o.map(u=>[u.sharedStackKey,0]));o.forEach(u=>{a.forEach(d=>{c[u.sharedStackKey]+=u[d]})}),o.forEach(u=>{a.forEach(d=>{const h=c[u.sharedStackKey];c[u.sharedStackKey]?u[d]=u[d]/h*100:u[d]=0})})}return(r?nc().offset(GT):nc()).keys(a)(o).map((c,u)=>Object.keys(c).filter(d=>!isNaN(d)).map(d=>{const h=c[d];return h[s]=a[u],h}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();Zc(n,t),this.set({options:at(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(T.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=Pt.items.status,i=this.getDataGroups(),s=i.some(u=>u.status===r),a=i.filter(u=>u.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((u,d)=>{i[d].status=n});else{const u=i.findIndex(d=>d.name===t);i[u].status=i[u].status===r?n:r}else i.forEach((u,d)=>{i[d].status=u.name===t?n:r});const o=i.filter(u=>u.status===n),l=this.getOptions();i.some(u=>u.status===r)?l.data.selectedGroups=o.map(u=>u.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(T.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=x(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=x(s,"label");if(c===null){const d=x(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(a)?(u.value=a.value,u.date=a.date):u.value=a,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const n=this.getTabularDataArray().map(a=>a.map(o=>`"${(o==="–"?"–":o).split(/[,;'"`]/).map(u=>ok(u)).join("")}"`)).map(a=>a.join(",")).join(`
|
|
1
|
+
(function(W,Re){typeof exports=="object"&&typeof module<"u"?Re(exports):typeof define=="function"&&define.amd?define(["exports"],Re):(W=typeof globalThis<"u"?globalThis:W||self,Re(W.Charts={}))})(this,function(W){"use strict";function Re(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function y0(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wo(e){let t,n,r;e.length!==2?(t=Re,n=(o,l)=>Re(e(o),l),r=(o,l)=>e(o)-l):(t=e===Re||e===y0?e:E0,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:a,right:s}}function E0(){return 0}function x0(e){return e===null?NaN:+e}function*b0(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const _0=wo(Re).right;wo(x0).center;const Oo=_0;function S0(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function Ie(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let s of e)(s=t(s,++i,e))!=null&&(n===void 0?s>=s&&(n=r=s):(n>s&&(n=s),r<s&&(r=s)))}return[n,r]}class Nn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const s=n[i],a=t+s,o=Math.abs(t)<Math.abs(s)?t-(a-s):s-(a-t);o&&(n[r++]=o),t=a}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,s,a=0;if(n>0){for(a=t[--n];n>0&&(r=a,i=t[--n],a=r+i,s=i-(a-r),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(i=s*2,r=a+i,i==r-a&&(a=r))}return a}}class Ju extends Map{constructor(t,n=O0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(th(this,t))}has(t){return super.has(th(this,t))}set(t,n){return super.set(T0(this,t),n)}delete(t){return super.delete(w0(this,t))}}function th({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function T0({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function w0({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function O0(e){return e!==null&&typeof e=="object"?e.valueOf():e}function M0(e){return e}function A0(e=Re){if(e===Re)return eh;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function eh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var C0=Array.prototype,D0=C0.slice;function Mo(e){return()=>e}const L0=Math.sqrt(50),R0=Math.sqrt(10),I0=Math.sqrt(2);function _s(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=L0?10:s>=R0?5:s>=I0?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?_s(e,t,n*2):[o,l,c]}function Ss(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,a]=r?_s(t,e,n):_s(e,t,n);if(!(s>=i))return[];const o=s-i+1,l=new Array(o);if(r)if(a<0)for(let c=0;c<o;++c)l[c]=(s-c)/-a;else for(let c=0;c<o;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<o;++c)l[c]=(i+c)/-a;else for(let c=0;c<o;++c)l[c]=(i+c)*a;return l}function pr(e,t,n){return t=+t,e=+e,n=+n,_s(e,t,n)[2]}function Ao(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?pr(t,e,n):pr(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function k0(e,t,n){let r;for(;;){const i=pr(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function P0(e){return Math.max(1,Math.ceil(Math.log(S0(e))/Math.LN2)+1)}function $0(){var e=M0,t=Ie,n=P0;function r(i){Array.isArray(i)||(i=Array.from(i));var s,a=i.length,o,l,c=new Array(a);for(s=0;s<a;++s)c[s]=e(i[s],s,i);var u=t(c),d=u[0],h=u[1],f=n(c,d,h);if(!Array.isArray(f)){const E=h,_=+f;if(t===Ie&&([d,h]=k0(d,h,_)),f=Ss(d,h,_),f[0]<=d&&(l=pr(d,h,_)),f[f.length-1]>=h)if(E>=h&&t===Ie){const S=pr(d,h,_);isFinite(S)&&(S>0?h=(Math.floor(h/S)+1)*S:S<0&&(h=(Math.ceil(h*-S)+1)/-S))}else f.pop()}for(var p=f.length,g=0,v=p;f[g]<=d;)++g;for(;f[v-1]>h;)--v;(g||v<p)&&(f=f.slice(g,v),p=v-g);var m=new Array(p+1),y;for(s=0;s<=p;++s)y=m[s]=[],y.x0=s>0?f[s-1]:d,y.x1=s<p?f[s]:h;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&m[Math.min(p,Math.floor((o-d)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&d<=o&&o<=h){const E=Math.floor((d-o)*l);m[Math.min(p,E+(f[E]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&m[Oo(f,o,0,p)].push(i[s]);return m}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Mo(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Mo([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Mo(Array.isArray(i)?D0.call(i):i),r):n},r}function Un(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Mn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function nh(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?eh:A0(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(t-c*d/l+h)),p=Math.min(r,Math.floor(t+(l-c)*d/l+h));nh(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(oi(e,n,t),i(e[r],s)>0&&oi(e,n,r);a<o;){for(oi(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?oi(e,n,o):(++o,oi(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function oi(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Co(e,t,n){if(e=Float64Array.from(b0(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Mn(e);if(t>=1)return Un(e);var r,i=(r-1)*t,s=Math.floor(i),a=Un(nh(e,s).subarray(0,s+1)),o=Mn(e.subarray(s+1));return a+(o-a)*(i-s)}}function*N0(e){for(const t of e)yield*t}function rh(e){return Array.from(N0(e))}function U0(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function B0(e){return e}var Ts=1,ws=2,Do=3,li=4,ih=1e-6;function F0(e){return"translate("+e+",0)"}function H0(e){return"translate(0,"+e+")"}function G0(e){return t=>+e(t)}function V0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function z0(){return!this.__axis}function Os(e,t){var n=[],r=null,i=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Ts||e===li?-1:1,u=e===li||e===ws?"x":"y",d=e===Ts||e===Do?F0:H0;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):B0),v=Math.max(s,0)+o,m=t.range(),y=+m[0]+l,E=+m[m.length-1]+l,_=(t.bandwidth?V0:G0)(t.copy(),l),S=f.selection?f.selection():f,b=S.selectAll(".domain").data([null]),M=S.selectAll(".tick").data(p,t).order(),D=M.exit(),G=M.enter().append("g").attr("class","tick"),I=M.select("line"),w=M.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(G),I=I.merge(G.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),w=w.merge(G.append("text").attr("fill","currentColor").attr(u,c*v).attr("dy",e===Ts?"0em":e===Do?"0.71em":"0.32em")),f!==S&&(b=b.transition(f),M=M.transition(f),I=I.transition(f),w=w.transition(f),D=D.transition(f).attr("opacity",ih).attr("transform",function(C){return isFinite(C=_(C))?d(C+l):this.getAttribute("transform")}),G.attr("opacity",ih).attr("transform",function(C){var R=this.parentNode.__axis;return d((R&&isFinite(R=R(C))?R:_(C))+l)})),D.remove(),b.attr("d",e===li||e===ws?a?"M"+c*a+","+y+"H"+l+"V"+E+"H"+c*a:"M"+l+","+y+"V"+E:a?"M"+y+","+c*a+"V"+l+"H"+E+"V"+c*a:"M"+y+","+l+"H"+E),M.attr("opacity",1).attr("transform",function(C){return d(_(C)+l)}),I.attr(u+"2",c*s),w.attr(u,c*v).text(g),S.filter(z0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===ws?"start":e===li?"end":"middle"),S.each(function(){this.__axis=_})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(f){return arguments.length?(n=f==null?[]:Array.from(f),h):n.slice()},h.tickValues=function(f){return arguments.length?(r=f==null?null:Array.from(f),h):r&&r.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(s=a=+f,h):s},h.tickSizeInner=function(f){return arguments.length?(s=+f,h):s},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(o=+f,h):o},h.offset=function(f){return arguments.length?(l=+f,h):l},h}function W0(e){return Os(Ts,e)}function Y0(e){return Os(ws,e)}function Lo(e){return Os(Do,e)}function sh(e){return Os(li,e)}var q0={value:()=>{}};function Ro(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ms(n)}function Ms(e){this._=e}function X0(e,t){return e.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&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ms.prototype=Ro.prototype={constructor:Ms,on:function(e,t){var n=this._,r=X0(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=j0(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=ah(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ah(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ms(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function j0(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ah(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=q0,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Io="http://www.w3.org/1999/xhtml";const oh={svg:"http://www.w3.org/2000/svg",xhtml:Io,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function As(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),oh.hasOwnProperty(t)?{space:oh[t],local:e}:e}function Z0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Io&&t.documentElement.namespaceURI===Io?t.createElement(e):t.createElementNS(n,e)}}function K0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function lh(e){var t=As(e);return(t.local?K0:Z0)(t)}function Q0(){}function ko(e){return e==null?Q0:function(){return this.querySelector(e)}}function J0(e){typeof e!="function"&&(e=ko(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=new Array(a),l,c,u=0;u<a;++u)(l=s[u])&&(c=e.call(l,l.__data__,u,s))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new me(r,this._parents)}function ty(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ey(){return[]}function ch(e){return e==null?ey:function(){return this.querySelectorAll(e)}}function ny(e){return function(){return ty(e.apply(this,arguments))}}function ry(e){typeof e=="function"?e=ny(e):e=ch(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&(r.push(e.call(l,l.__data__,c,a)),i.push(l));return new me(r,i)}function uh(e){return function(){return this.matches(e)}}function hh(e){return function(t){return t.matches(e)}}var iy=Array.prototype.find;function sy(e){return function(){return iy.call(this.children,e)}}function ay(){return this.firstElementChild}function oy(e){return this.select(e==null?ay:sy(typeof e=="function"?e:hh(e)))}var ly=Array.prototype.filter;function cy(){return Array.from(this.children)}function uy(e){return function(){return ly.call(this.children,e)}}function hy(e){return this.selectAll(e==null?cy:uy(typeof e=="function"?e:hh(e)))}function dy(e){typeof e!="function"&&(e=uh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new me(r,this._parents)}function dh(e){return new Array(e.length)}function fy(){return new me(this._enter||this._groups.map(dh),this._parents)}function Cs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Cs.prototype={constructor:Cs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function py(e){return function(){return e}}function gy(e,t,n,r,i,s){for(var a=0,o,l=t.length,c=s.length;a<c;++a)(o=t[a])?(o.__data__=s[a],r[a]=o):n[a]=new Cs(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function my(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(h[o]=f=a.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(l=c.get(f))?(r[o]=l,l.__data__=s[o],c.delete(f)):n[o]=new Cs(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function vy(e){return e.__data__}function yy(e,t){if(!arguments.length)return Array.from(this,vy);var n=t?my:gy,r=this._parents,i=this._groups;typeof e!="function"&&(e=py(e));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=r[c],d=i[c],h=d.length,f=Ey(e.call(u,u&&u.__data__,c,r)),p=f.length,g=o[c]=new Array(p),v=a[c]=new Array(p),m=l[c]=new Array(h);n(u,d,g,v,m,f,t);for(var y=0,E=0,_,S;y<p;++y)if(_=g[y]){for(y>=E&&(E=y+1);!(S=v[E])&&++E<p;);_._next=S||null}}return a=new me(a,r),a._enter=o,a._exit=l,a}function Ey(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xy(){return new me(this._exit||this._groups.map(dh),this._parents)}function by(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function _y(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),f,p=0;p<d;++p)(f=c[p]||u[p])&&(h[p]=f);for(;l<i;++l)o[l]=n[l];return new me(o,this._parents)}function Sy(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function Ty(e){e||(e=wy);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new me(i,this._parents).order()}function wy(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Oy(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function My(){return Array.from(this)}function Ay(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}function Cy(){let e=0;for(const t of this)++e;return e}function Dy(){return!this.node()}function Ly(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,o;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this}function Ry(e){return function(){this.removeAttribute(e)}}function Iy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ky(e,t){return function(){this.setAttribute(e,t)}}function Py(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $y(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ny(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Uy(e,t){var n=As(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Iy:Ry:typeof t=="function"?n.local?Ny:$y:n.local?Py:ky)(n,t))}function fh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function By(e){return function(){this.style.removeProperty(e)}}function Fy(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Hy(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Gy(e,t,n){return arguments.length>1?this.each((t==null?By:typeof t=="function"?Hy:Fy)(e,t,n??"")):gr(this.node(),e)}function gr(e,t){return e.style.getPropertyValue(t)||fh(e).getComputedStyle(e,null).getPropertyValue(t)}function Vy(e){return function(){delete this[e]}}function zy(e,t){return function(){this[e]=t}}function Wy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Yy(e,t){return arguments.length>1?this.each((t==null?Vy:typeof t=="function"?Wy:zy)(e,t)):this.node()[e]}function ph(e){return e.trim().split(/^|\s+/)}function Po(e){return e.classList||new gh(e)}function gh(e){this._node=e,this._names=ph(e.getAttribute("class")||"")}gh.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function mh(e,t){for(var n=Po(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function vh(e,t){for(var n=Po(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function qy(e){return function(){mh(this,e)}}function Xy(e){return function(){vh(this,e)}}function jy(e,t){return function(){(t.apply(this,arguments)?mh:vh)(this,e)}}function Zy(e,t){var n=ph(e+"");if(arguments.length<2){for(var r=Po(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?jy:t?qy:Xy)(n,t))}function Ky(){this.textContent=""}function Qy(e){return function(){this.textContent=e}}function Jy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function t1(e){return arguments.length?this.each(e==null?Ky:(typeof e=="function"?Jy:Qy)(e)):this.node().textContent}function e1(){this.innerHTML=""}function n1(e){return function(){this.innerHTML=e}}function r1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function i1(e){return arguments.length?this.each(e==null?e1:(typeof e=="function"?r1:n1)(e)):this.node().innerHTML}function s1(){this.nextSibling&&this.parentNode.appendChild(this)}function a1(){return this.each(s1)}function o1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function l1(){return this.each(o1)}function c1(e){var t=typeof e=="function"?e:lh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function u1(){return null}function h1(e,t){var n=typeof e=="function"?e:lh(e),r=t==null?u1:typeof t=="function"?t:ko(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function d1(){var e=this.parentNode;e&&e.removeChild(this)}function f1(){return this.each(d1)}function p1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function g1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function m1(e){return this.select(e?g1:p1)}function v1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function y1(e){return function(t){e.call(this,t,this.__data__)}}function E1(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function x1(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function b1(e,t,n){return function(){var r=this.__on,i,s=y1(t);if(r){for(var a=0,o=r.length;a<o;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function _1(e,t,n){var r=E1(e+""),i,s=r.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<s;++i)if((a=r[i]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?b1:x1,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function yh(e,t,n){var r=fh(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function S1(e,t){return function(){return yh(this,e,t)}}function T1(e,t){return function(){return yh(this,e,t.apply(this,arguments))}}function w1(e,t){return this.each((typeof t=="function"?T1:S1)(e,t))}function*O1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}var Eh=[null];function me(e,t){this._groups=e,this._parents=t}function ci(){return new me([[document.documentElement]],Eh)}function M1(){return this}me.prototype=ci.prototype={constructor:me,select:J0,selectAll:ry,selectChild:oy,selectChildren:hy,filter:dy,data:yy,enter:fy,exit:xy,join:by,merge:_y,selection:M1,order:Sy,sort:Ty,call:Oy,nodes:My,node:Ay,size:Cy,empty:Dy,each:Ly,attr:Uy,style:Gy,property:Yy,classed:Zy,text:t1,html:i1,raise:a1,lower:l1,append:c1,insert:h1,remove:f1,clone:m1,datum:v1,on:_1,dispatch:w1,[Symbol.iterator]:O1};function L(e){return typeof e=="string"?new me([[document.querySelector(e)]],[document.documentElement]):new me([[e]],Eh)}function A1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Bn(e,t){if(e=A1(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const $o={capture:!0,passive:!1};function No(e){e.preventDefault(),e.stopImmediatePropagation()}function C1(e){var t=e.document.documentElement,n=L(e).on("dragstart.drag",No,$o);"onselectstart"in t?n.on("selectstart.drag",No,$o):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function D1(e,t){var n=e.document.documentElement,r=L(e).on("dragstart.drag",null);t&&(r.on("click.drag",No,$o),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Uo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ui(){}var hi=.7,Ds=1/hi,mr="\\s*([+-]?\\d+)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",L1=/^#([0-9a-f]{3,8})$/,R1=new RegExp(`^rgb\\(${mr},${mr},${mr}\\)$`),I1=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),k1=new RegExp(`^rgba\\(${mr},${mr},${mr},${di}\\)$`),P1=new RegExp(`^rgba\\(${qe},${qe},${qe},${di}\\)$`),$1=new RegExp(`^hsl\\(${di},${qe},${qe}\\)$`),N1=new RegExp(`^hsla\\(${di},${qe},${qe},${di}\\)$`),bh={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};Uo(ui,an,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_h,formatHex:_h,formatHex8:U1,formatHsl:B1,formatRgb:Sh,toString:Sh});function _h(){return this.rgb().formatHex()}function U1(){return this.rgb().formatHex8()}function B1(){return Ah(this).formatHsl()}function Sh(){return this.rgb().formatRgb()}function an(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=L1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Th(t):n===3?new le(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ls(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ls(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=R1.exec(e))?new le(t[1],t[2],t[3],1):(t=I1.exec(e))?new le(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=k1.exec(e))?Ls(t[1],t[2],t[3],t[4]):(t=P1.exec(e))?Ls(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$1.exec(e))?Mh(t[1],t[2]/100,t[3]/100,1):(t=N1.exec(e))?Mh(t[1],t[2]/100,t[3]/100,t[4]):bh.hasOwnProperty(e)?Th(bh[e]):e==="transparent"?new le(NaN,NaN,NaN,0):null}function Th(e){return new le(e>>16&255,e>>8&255,e&255,1)}function Ls(e,t,n,r){return r<=0&&(e=t=n=NaN),new le(e,t,n,r)}function F1(e){return e instanceof ui||(e=an(e)),e?(e=e.rgb(),new le(e.r,e.g,e.b,e.opacity)):new le}function Bo(e,t,n,r){return arguments.length===1?F1(e):new le(e,t,n,r??1)}function le(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Uo(le,Bo,xh(ui,{brighter(e){return e=e==null?Ds:Math.pow(Ds,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hi:Math.pow(hi,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new le(Fn(this.r),Fn(this.g),Fn(this.b),Rs(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:wh,formatHex:wh,formatHex8:H1,formatRgb:Oh,toString:Oh}));function wh(){return`#${Hn(this.r)}${Hn(this.g)}${Hn(this.b)}`}function H1(){return`#${Hn(this.r)}${Hn(this.g)}${Hn(this.b)}${Hn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Oh(){const e=Rs(this.opacity);return`${e===1?"rgb(":"rgba("}${Fn(this.r)}, ${Fn(this.g)}, ${Fn(this.b)}${e===1?")":`, ${e})`}`}function Rs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hn(e){return e=Fn(e),(e<16?"0":"")+e.toString(16)}function Mh(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,n,r)}function Ah(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof ui||(e=an(e)),!e)return new ke;if(e instanceof ke)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(t===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-t)/o+2:a=(t-n)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new ke(a,o,l,e.opacity)}function Fo(e,t,n,r){return arguments.length===1?Ah(e):new ke(e,t,n,r??1)}function ke(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Uo(ke,Fo,xh(ui,{brighter(e){return e=e==null?Ds:Math.pow(Ds,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hi:Math.pow(hi,e),new ke(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new le(Ho(e>=240?e-240:e+120,i,r),Ho(e,i,r),Ho(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ke(Ch(this.h),Is(this.s),Is(this.l),Rs(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 e=Rs(this.opacity);return`${e===1?"hsl(":"hsla("}${Ch(this.h)}, ${Is(this.s)*100}%, ${Is(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ch(e){return e=(e||0)%360,e<0?e+360:e}function Is(e){return Math.max(0,Math.min(1,e||0))}function Ho(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Go=e=>()=>e;function G1(e,t){return function(n){return e+n*t}}function V1(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function z1(e){return(e=+e)==1?Dh:function(t,n){return n-t?V1(t,n,e):Go(isNaN(t)?n:t)}}function Dh(e,t){var n=t-e;return n?G1(e,n):Go(isNaN(e)?t:e)}const ks=function e(t){var n=z1(t);function r(i,s){var a=n((i=Bo(i)).r,(s=Bo(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=Dh(i.opacity,s.opacity);return function(u){return i.r=a(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function W1(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function Y1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function q1(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),a;for(a=0;a<r;++a)i[a]=fi(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<r;++a)s[a]=i[a](o);return s}}function X1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ve(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function j1(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=fi(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var Vo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zo=new RegExp(Vo.source,"g");function Z1(e){return function(){return e}}function K1(e){return function(t){return e(t)+""}}function Lh(e,t){var n=Vo.lastIndex=zo.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=Vo.exec(e))&&(i=zo.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:ve(r,i)})),n=zo.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?K1(l[0].x):Z1(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function fi(e,t){var n=typeof t,r;return t==null||n==="boolean"?Go(t):(n==="number"?ve:n==="string"?(r=an(t))?(t=r,ks):Lh:t instanceof an?ks:t instanceof Date?X1:Y1(t)?W1:Array.isArray(t)?q1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?j1:ve)(e,t)}function Rh(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ih=180/Math.PI,Wo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kh(e,t,n,r,i,s){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*Ih,skewX:Math.atan(l)*Ih,scaleX:a,scaleY:o}}var Ps;function Q1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wo:kh(t.a,t.b,t.c,t.d,t.e,t.f)}function J1(e){return e==null||(Ps||(Ps=document.createElementNS("http://www.w3.org/2000/svg","g")),Ps.setAttribute("transform",e),!(e=Ps.transform.baseVal.consolidate()))?Wo:(e=e.matrix,kh(e.a,e.b,e.c,e.d,e.e,e.f))}function Ph(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push("translate(",null,t,null,n);p.push({i:g-4,x:ve(c,d)},{i:g-2,x:ve(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ve(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ve(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push(i(f)+"scale(",null,",",null,")");p.push({i:g-4,x:ve(c,d)},{i:g-2,x:ve(u,h)})}else(d!==1||h!==1)&&f.push(i(f)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,d,h),a(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var p=-1,g=h.length,v;++p<g;)d[(v=h[p]).i]=v.x(f);return d.join("")}}}var tE=Ph(Q1,"px, ","px)","deg)"),eE=Ph(J1,", ",")",")");function nE(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var vr=0,pi=0,gi=0,$h=1e3,$s,mi,Ns=0,Gn=0,Us=0,vi=typeof performance=="object"&&performance.now?performance:Date,Nh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yo(){return Gn||(Nh(rE),Gn=vi.now()+Us)}function rE(){Gn=0}function Bs(){this._call=this._time=this._next=null}Bs.prototype=Uh.prototype={constructor:Bs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yo():+n)+(t==null?0:+t),!this._next&&mi!==this&&(mi?mi._next=this:$s=this,mi=this),this._call=e,this._time=n,qo()},stop:function(){this._call&&(this._call=null,this._time=1/0,qo())}};function Uh(e,t,n){var r=new Bs;return r.restart(e,t,n),r}function iE(){Yo(),++vr;for(var e=$s,t;e;)(t=Gn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vr}function Bh(){Gn=(Ns=vi.now())+Us,vr=pi=0;try{iE()}finally{vr=0,aE(),Gn=0}}function sE(){var e=vi.now(),t=e-Ns;t>$h&&(Us-=t,Ns=e)}function aE(){for(var e,t=$s,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:$s=n);mi=e,qo(r)}function qo(e){if(!vr){pi&&(pi=clearTimeout(pi));var t=e-Gn;t>24?(e<1/0&&(pi=setTimeout(Bh,e-vi.now()-Us)),gi&&(gi=clearInterval(gi))):(gi||(Ns=vi.now(),gi=setInterval(sE,$h)),vr=1,Nh(Bh))}}function Fh(e,t,n){var r=new Bs;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var oE=Ro("start","end","cancel","interrupt"),lE=[],Hh=0,Gh=1,Xo=2,Fs=3,Vh=4,jo=5,Hs=6;function Gs(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;cE(e,n,{name:t,index:r,group:i,on:oE,tween:lE,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Hh})}function Zo(e,t){var n=Pe(e,t);if(n.state>Hh)throw new Error("too late; already scheduled");return n}function Xe(e,t){var n=Pe(e,t);if(n.state>Fs)throw new Error("too late; already running");return n}function Pe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function cE(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Uh(s,0,n.time);function s(c){n.state=Gh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,d,h,f;if(n.state!==Gh)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===Fs)return Fh(a);f.state===Vh?(f.state=Hs,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=Hs,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Fh(function(){n.state===Fs&&(n.state=Vh,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Xo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Xo){for(n.state=Fs,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=f);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=jo,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===jo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Hs,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Ko(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>Xo&&r.state<jo,r.state=Hs,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function uE(e){return this.each(function(){Ko(this,e)})}function hE(e,t){var n,r;return function(){var i=Xe(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,o=r.length;a<o;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function dE(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Xe(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var o={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}s.tween=i}}function fE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Pe(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?hE:dE)(n,e,t))}function Qo(e,t,n){var r=e._id;return e.each(function(){var i=Xe(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Pe(i,r).value[t]}}function zh(e,t){var n;return(typeof t=="number"?ve:t instanceof an?ks:(n=an(t))?(t=n,ks):Lh)(e,t)}function pE(e){return function(){this.removeAttribute(e)}}function gE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mE(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}function vE(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}function yE(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function EE(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function xE(e,t){var n=As(e),r=n==="transform"?eE:zh;return this.attrTween(e,typeof t=="function"?(n.local?EE:yE)(n,r,Qo(this,"attr."+e,t)):t==null?(n.local?gE:pE)(n):(n.local?vE:mE)(n,r,t))}function bE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function _E(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function SE(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&_E(e,s)),n}return i._value=t,i}function TE(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&bE(e,s)),n}return i._value=t,i}function wE(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=As(e);return this.tween(n,(r.local?SE:TE)(r,t))}function OE(e,t){return function(){Zo(this,e).delay=+t.apply(this,arguments)}}function ME(e,t){return t=+t,function(){Zo(this,e).delay=t}}function AE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?OE:ME)(t,e)):Pe(this.node(),t).delay}function CE(e,t){return function(){Xe(this,e).duration=+t.apply(this,arguments)}}function DE(e,t){return t=+t,function(){Xe(this,e).duration=t}}function LE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?CE:DE)(t,e)):Pe(this.node(),t).duration}function RE(e,t){if(typeof t!="function")throw new Error;return function(){Xe(this,e).ease=t}}function IE(e){var t=this._id;return arguments.length?this.each(RE(t,e)):Pe(this.node(),t).ease}function kE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xe(this,e).ease=n}}function PE(e){if(typeof e!="function")throw new Error;return this.each(kE(this._id,e))}function $E(e){typeof e!="function"&&(e=uh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new on(r,this._parents,this._name,this._id)}function NE(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=t[o],c=n[o],u=l.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=l[f]||c[f])&&(d[f]=h);for(;o<r;++o)a[o]=t[o];return new on(a,this._parents,this._name,this._id)}function UE(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function BE(e,t,n){var r,i,s=UE(t)?Zo:Xe;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function FE(e,t){var n=this._id;return arguments.length<2?Pe(this.node(),n).on.on(e):this.each(BE(n,e,t))}function HE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function GE(){return this.on("end.remove",HE(this._id))}function VE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ko(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,c=s[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,Gs(c[h],t,n,h,c,Pe(u,n)));return new on(s,this._parents,t,n)}function zE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ch(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),f,p=Pe(u,n),g=0,v=h.length;g<v;++g)(f=h[g])&&Gs(f,t,n,g,h,p);s.push(h),a.push(u)}return new on(s,a,t,n)}var WE=ci.prototype.constructor;function YE(){return new WE(this._groups,this._parents)}function qE(e,t){var n,r,i;return function(){var s=gr(this,e),a=(this.style.removeProperty(e),gr(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Wh(e){return function(){this.style.removeProperty(e)}}function XE(e,t,n){var r,i=n+"",s;return function(){var a=gr(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function jE(e,t,n){var r,i,s;return function(){var a=gr(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),gr(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function ZE(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=Xe(this,e),c=l.on,u=l.value[s]==null?o||(o=Wh(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function KE(e,t,n){var r=(e+="")=="transform"?tE:zh;return t==null?this.styleTween(e,qE(e,r)).on("end.style."+e,Wh(e)):typeof t=="function"?this.styleTween(e,jE(e,r,Qo(this,"style."+e,t))).each(ZE(this._id,e)):this.styleTween(e,XE(e,r,t),n).on("end.style."+e,null)}function QE(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function JE(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&QE(e,a,n)),r}return s._value=t,s}function tx(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,JE(e,t,n??""))}function ex(e){return function(){this.textContent=e}}function nx(e){return function(){var t=e(this);this.textContent=t??""}}function rx(e){return this.tween("text",typeof e=="function"?nx(Qo(this,"text",e)):ex(e==null?"":e+""))}function ix(e){return function(t){this.textContent=e.call(this,t)}}function sx(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&ix(i)),t}return r._value=e,r}function ax(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,sx(e))}function ox(){for(var e=this._name,t=this._id,n=Yh(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)if(l=a[c]){var u=Pe(l,t);Gs(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new on(r,this._parents,e,n)}function lx(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--i===0&&s()}};n.each(function(){var c=Xe(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&s()})}var cx=0;function on(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Yh(){return++cx}var ln=ci.prototype;on.prototype={constructor:on,select:VE,selectAll:zE,selectChild:ln.selectChild,selectChildren:ln.selectChildren,filter:$E,merge:NE,selection:YE,transition:ox,call:ln.call,nodes:ln.nodes,node:ln.node,size:ln.size,empty:ln.empty,each:ln.each,on:FE,attr:xE,attrTween:wE,style:KE,styleTween:tx,text:rx,textTween:ax,remove:GE,tween:fE,delay:AE,duration:LE,ease:IE,easeVarying:PE,end:lx,[Symbol.iterator]:ln[Symbol.iterator]};const ux=e=>+e;function qh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hx={time:null,delay:0,duration:250,ease:qh};function dx(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function fx(e){var t,n;e instanceof on?(t=e._id,e=e._name):(t=Yh(),(n=hx).time=Yo(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&Gs(l,e,t,c,a,n||dx(l,t));return new on(r,this._parents,e,t)}ci.prototype.interrupt=uE,ci.prototype.transition=fx;const Jo=e=>()=>e;function px(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,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:s}})}function gx(e){e.stopImmediatePropagation()}function tl(e){e.preventDefault(),e.stopImmediatePropagation()}var Xh={name:"drag"},el={name:"space"},yr={name:"handle"},Er={name:"center"};const{abs:jh,max:Zt,min:Kt}=Math;function Zh(e){return[+e[0],+e[1]]}function Kh(e){return[Zh(e[0]),Zh(e[1])]}var Vs={name:"x",handles:["w","e"].map(zs),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},nl={name:"y",handles:["n","s"].map(zs),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},cn={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"},Qh={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Jh={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mx={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},vx={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function zs(e){return{type:e}}function yx(e){return!e.ctrlKey&&!e.button}function Ex(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function xx(){return navigator.maxTouchPoints||"ontouchstart"in this}function rl(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function bx(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function td(){return _x(Vs)}function _x(e){var t=Ex,n=yx,r=xx,i=!0,s=Ro("start","brush","end"),a=6,o;function l(v){var m=v.property("__brush",g).selectAll(".overlay").data([zs("overlay")]);m.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",cn.overlay).merge(m).each(function(){var E=rl(this).extent;L(this).attr("x",E[0][0]).attr("y",E[0][1]).attr("width",E[1][0]-E[0][0]).attr("height",E[1][1]-E[0][1])}),v.selectAll(".selection").data([zs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",cn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=v.selectAll(".handle").data(e.handles,function(E){return E.type});y.exit().remove(),y.enter().append("rect").attr("class",function(E){return"handle handle--"+E.type}).attr("cursor",function(E){return cn[E.type]}),v.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(v,m,y){v.tween?v.on("start.brush",function(E){u(this,arguments).beforestart().start(E)}).on("interrupt.brush end.brush",function(E){u(this,arguments).end(E)}).tween("brush",function(){var E=this,_=E.__brush,S=u(E,arguments),b=_.selection,M=e.input(typeof m=="function"?m.apply(this,arguments):m,_.extent),D=fi(b,M);function G(I){_.selection=I===1&&M===null?null:D(I),c.call(E),S.brush()}return b!==null&&M!==null?G:G(1)}):v.each(function(){var E=this,_=arguments,S=E.__brush,b=e.input(typeof m=="function"?m.apply(E,_):m,S.extent),M=u(E,_).beforestart();Ko(E),S.selection=b===null?null:b,c.call(E),M.start(y).brush(y).end(y)})},l.clear=function(v,m){l.move(v,null,m)};function c(){var v=L(this),m=rl(this).selection;m?(v.selectAll(".selection").style("display",null).attr("x",m[0][0]).attr("y",m[0][1]).attr("width",m[1][0]-m[0][0]).attr("height",m[1][1]-m[0][1]),v.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?m[1][0]-a/2:m[0][0]-a/2}).attr("y",function(y){return y.type[0]==="s"?m[1][1]-a/2:m[0][1]-a/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?m[1][0]-m[0][0]+a:a}).attr("height",function(y){return y.type==="e"||y.type==="w"?m[1][1]-m[0][1]+a:a})):v.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(v,m,y){var E=v.__brush.emitter;return E&&(!y||!E.clean)?E:new d(v,m,y)}function d(v,m,y){this.that=v,this.args=m,this.state=v.__brush,this.active=0,this.clean=y}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(v,m){return this.starting?(this.starting=!1,this.emit("start",v,m)):this.emit("brush",v),this},brush:function(v,m){return this.emit("brush",v,m),this},end:function(v,m){return--this.active===0&&(delete this.state.emitter,this.emit("end",v,m)),this},emit:function(v,m,y){var E=L(this.that).datum();s.call(v,this.that,new px(v,{sourceEvent:m,target:l,selection:e.output(this.state.selection),mode:y,dispatch:s}),E)}};function h(v){if(o&&!v.touches||!n.apply(this,arguments))return;var m=this,y=v.target.__data__.type,E=(i&&v.metaKey?y="overlay":y)==="selection"?Xh:i&&v.altKey?Er:yr,_=e===nl?null:mx[y],S=e===Vs?null:vx[y],b=rl(m),M=b.extent,D=b.selection,G=M[0][0],I,w,C=M[0][1],R,P,O=M[1][0],H,B,U=M[1][1],N,j,Y=0,it=0,et,q=_&&S&&i&&v.shiftKey,Q,pt,ot=Array.from(v.touches||[v],st=>{const Rt=st.identifier;return st=Bn(st,m),st.point0=st.slice(),st.identifier=Rt,st});Ko(m);var Tt=u(m,arguments,!0).beforestart();if(y==="overlay"){D&&(et=!0);const st=[ot[0],ot[1]||ot[0]];b.selection=D=[[I=e===nl?G:Kt(st[0][0],st[1][0]),R=e===Vs?C:Kt(st[0][1],st[1][1])],[H=e===nl?O:Zt(st[0][0],st[1][0]),N=e===Vs?U:Zt(st[0][1],st[1][1])]],ot.length>1&&mt(v)}else I=D[0][0],R=D[0][1],H=D[1][0],N=D[1][1];w=I,P=R,B=H,j=N;var Z=L(m).attr("pointer-events","none"),F=Z.selectAll(".overlay").attr("cursor",cn[y]);if(v.touches)Tt.moved=$,Tt.ended=gt;else{var V=L(v.view).on("mousemove.brush",$,!0).on("mouseup.brush",gt,!0);i&&V.on("keydown.brush",Ht,!0).on("keyup.brush",Gt,!0),C1(v.view)}c.call(m),Tt.start(v,E.name);function $(st){for(const Rt of st.changedTouches||[st])for(const hr of ot)hr.identifier===Rt.identifier&&(hr.cur=Bn(Rt,m));if(q&&!Q&&!pt&&ot.length===1){const Rt=ot[0];jh(Rt.cur[0]-Rt[0])>jh(Rt.cur[1]-Rt[1])?pt=!0:Q=!0}for(const Rt of ot)Rt.cur&&(Rt[0]=Rt.cur[0],Rt[1]=Rt.cur[1]);et=!0,tl(st),mt(st)}function mt(st){const Rt=ot[0],hr=Rt.point0;var Le;switch(Y=Rt[0]-hr[0],it=Rt[1]-hr[1],E){case el:case Xh:{_&&(Y=Zt(G-I,Kt(O-H,Y)),w=I+Y,B=H+Y),S&&(it=Zt(C-R,Kt(U-N,it)),P=R+it,j=N+it);break}case yr:{ot[1]?(_&&(w=Zt(G,Kt(O,ot[0][0])),B=Zt(G,Kt(O,ot[1][0])),_=1),S&&(P=Zt(C,Kt(U,ot[0][1])),j=Zt(C,Kt(U,ot[1][1])),S=1)):(_<0?(Y=Zt(G-I,Kt(O-I,Y)),w=I+Y,B=H):_>0&&(Y=Zt(G-H,Kt(O-H,Y)),w=I,B=H+Y),S<0?(it=Zt(C-R,Kt(U-R,it)),P=R+it,j=N):S>0&&(it=Zt(C-N,Kt(U-N,it)),P=R,j=N+it));break}case Er:{_&&(w=Zt(G,Kt(O,I-Y*_)),B=Zt(G,Kt(O,H+Y*_))),S&&(P=Zt(C,Kt(U,R-it*S)),j=Zt(C,Kt(U,N+it*S)));break}}B<w&&(_*=-1,Le=I,I=H,H=Le,Le=w,w=B,B=Le,y in Qh&&F.attr("cursor",cn[y=Qh[y]])),j<P&&(S*=-1,Le=R,R=N,N=Le,Le=P,P=j,j=Le,y in Jh&&F.attr("cursor",cn[y=Jh[y]])),b.selection&&(D=b.selection),Q&&(w=D[0][0],B=D[1][0]),pt&&(P=D[0][1],j=D[1][1]),(D[0][0]!==w||D[0][1]!==P||D[1][0]!==B||D[1][1]!==j)&&(b.selection=[[w,P],[B,j]],c.call(m),Tt.brush(st,E.name))}function gt(st){if(gx(st),st.touches){if(st.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else D1(st.view,et),V.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Z.attr("pointer-events","all"),F.attr("cursor",cn.overlay),b.selection&&(D=b.selection),bx(D)&&(b.selection=null,c.call(m)),Tt.end(st,E.name)}function Ht(st){switch(st.keyCode){case 16:{q=_&&S;break}case 18:{E===yr&&(_&&(H=B-Y*_,I=w+Y*_),S&&(N=j-it*S,R=P+it*S),E=Er,mt(st));break}case 32:{(E===yr||E===Er)&&(_<0?H=B-Y:_>0&&(I=w-Y),S<0?N=j-it:S>0&&(R=P-it),E=el,F.attr("cursor",cn.selection),mt(st));break}default:return}tl(st)}function Gt(st){switch(st.keyCode){case 16:{q&&(Q=pt=q=!1,mt(st));break}case 18:{E===Er&&(_<0?H=B:_>0&&(I=w),S<0?N=j:S>0&&(R=P),E=yr,mt(st));break}case 32:{E===el&&(st.altKey?(_&&(H=B-Y*_,I=w+Y*_),S&&(N=j-it*S,R=P+it*S),E=Er):(_<0?H=B:_>0&&(I=w),S<0?N=j:S>0&&(R=P),E=yr),F.attr("cursor",cn[y]),mt(st));break}default:return}tl(st)}}function f(v){u(this,arguments).moved(v)}function p(v){u(this,arguments).ended(v)}function g(){var v=this.__brush||{selection:null};return v.extent=Kh(t.apply(this,arguments)),v.dim=e,v}return l.extent=function(v){return arguments.length?(t=typeof v=="function"?v:Jo(Kh(v)),l):t},l.filter=function(v){return arguments.length?(n=typeof v=="function"?v:Jo(!!v),l):n},l.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:Jo(!!v),l):r},l.handleSize=function(v){return arguments.length?(a=+v,l):a},l.keyModifiers=function(v){return arguments.length?(i=!!v,l):i},l.on=function(){var v=s.on.apply(s,arguments);return v===s?l:v},l}const il=Math.PI,sl=2*il,Vn=1e-6,Sx=sl-Vn;function ed(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Tx(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ed;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let wx=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ed:Tx(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,c=i-n,u=a-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Vn)if(!(Math.abs(d*l-c*u)>Vn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,g=l*l+c*c,v=f*f+p*p,m=Math.sqrt(g),y=Math.sqrt(h),E=s*Math.tan((il-Math.acos((g+h-v)/(2*m*y)))/2),_=E/y,S=E/m;Math.abs(_-1)>Vn&&this._append`L${t+_*u},${n+_*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Vn||Math.abs(this._y1-u)>Vn)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%sl+sl),h>Sx?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>Vn&&this._append`A${r},${r},0,${+(h>=il)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Ox(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ws(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xr(e){return e=Ws(Math.abs(e)),e?e[1]:NaN}function Mx(e,t){return function(n,r){for(var i=n.length,s=[],a=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),s.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function Ax(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Cx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yi(e){if(!(t=Cx.exec(e)))throw new Error("invalid format: "+e);var t;return new al({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}yi.prototype=al.prototype;function al(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}al.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 Dx(e){t:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var nd;function Lx(e,t){var n=Ws(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(nd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ws(e,Math.max(0,t+s-1))[0]}function rd(e,t){var n=Ws(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const id={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Ox,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>rd(e*100,t),r:rd,s:Lx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sd(e){return e}var ad=Array.prototype.map,od=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Rx(e){var t=e.grouping===void 0||e.thousands===void 0?sd:Mx(ad.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?sd:Ax(ad.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=yi(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,v=d.zero,m=d.width,y=d.comma,E=d.precision,_=d.trim,S=d.type;S==="n"?(y=!0,S="g"):id[S]||(E===void 0&&(E=12),_=!0,S="g"),(v||h==="0"&&f==="=")&&(v=!0,h="0",f="=");var b=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",M=g==="$"?r:/[%p]/.test(S)?a:"",D=id[S],G=/[defgprs%]/.test(S);E=E===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function I(w){var C=b,R=M,P,O,H;if(S==="c")R=D(w)+R,w="";else{w=+w;var B=w<0||1/w<0;if(w=isNaN(w)?l:D(Math.abs(w),E),_&&(w=Dx(w)),B&&+w==0&&p!=="+"&&(B=!1),C=(B?p==="("?p:o:p==="-"||p==="("?"":p)+C,R=(S==="s"?od[8+nd/3]:"")+R+(B&&p==="("?")":""),G){for(P=-1,O=w.length;++P<O;)if(H=w.charCodeAt(P),48>H||H>57){R=(H===46?i+w.slice(P+1):w.slice(P))+R,w=w.slice(0,P);break}}}y&&!v&&(w=t(w,1/0));var U=C.length+w.length+R.length,N=U<m?new Array(m-U+1).join(h):"";switch(y&&v&&(w=t(N+w,N.length?m-R.length:1/0),N=""),f){case"<":w=C+w+R+N;break;case"=":w=C+N+w+R;break;case"^":w=N.slice(0,U=N.length>>1)+C+w+R+N.slice(U);break;default:w=N+C+w+R;break}return s(w)}return I.toString=function(){return d+""},I}function u(d,h){var f=c((d=yi(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(xr(h)/3)))*3,g=Math.pow(10,-p),v=od[8+p/3];return function(m){return f(g*m)+v}}return{format:c,formatPrefix:u}}var Ys,ol,ld;Ix({thousands:",",grouping:[3],currency:["$",""]});function Ix(e){return Ys=Rx(e),ol=Ys.format,ld=Ys.formatPrefix,Ys}function kx(e){return Math.max(0,-xr(Math.abs(e)))}function Px(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xr(t)/3)))*3-xr(Math.abs(e)))}function $x(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xr(t)-xr(e))+1}var xt=1e-6,cd=1e-12,ht=Math.PI,ce=ht/2,ud=ht/4,ye=ht*2,re=180/ht,$t=ht/180,bt=Math.abs,hd=Math.atan,zn=Math.atan2,St=Math.cos,Nx=Math.exp,Ux=Math.log,Et=Math.sin,An=Math.sign||function(e){return e>0?1:e<0?-1:0},$e=Math.sqrt,Bx=Math.tan;function Fx(e){return e>1?0:e<-1?ht:Math.acos(e)}function un(e){return e>1?ce:e<-1?-ce:Math.asin(e)}function Te(){}function qs(e,t){e&&fd.hasOwnProperty(e.type)&&fd[e.type](e,t)}var dd={Feature:function(e,t){qs(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)qs(n[r].geometry,t)}},fd={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){ll(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)ll(n[r],t,0)},Polygon:function(e,t){pd(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)pd(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)qs(n[r],t)}};function ll(e,t,n){var r=-1,i=e.length-n,s;for(t.lineStart();++r<i;)s=e[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function pd(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)ll(e[n],t,1);t.polygonEnd()}function br(e,t){e&&dd.hasOwnProperty(e.type)?dd[e.type](e,t):qs(e,t)}function cl(e){return[zn(e[1],e[0]),un(e[2])]}function _r(e){var t=e[0],n=e[1],r=St(n);return[r*St(t),r*Et(t),Et(n)]}function Xs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function js(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function ul(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Zs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function hl(e){var t=$e(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function dl(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function fl(e,t){return bt(e)>ht&&(e-=Math.round(e/ye)*ye),[e,t]}fl.invert=fl;function gd(e,t,n){return(e%=ye)?t||n?dl(vd(e),yd(t,n)):vd(e):t||n?yd(t,n):fl}function md(e){return function(t,n){return t+=e,bt(t)>ht&&(t-=Math.round(t/ye)*ye),[t,n]}}function vd(e){var t=md(e);return t.invert=md(-e),t}function yd(e,t){var n=St(e),r=Et(e),i=St(t),s=Et(t);function a(o,l){var c=St(l),u=St(o)*c,d=Et(o)*c,h=Et(l),f=h*n+u*r;return[zn(d*i-f*s,u*n-h*r),un(f*i+d*s)]}return a.invert=function(o,l){var c=St(l),u=St(o)*c,d=Et(o)*c,h=Et(l),f=h*i-d*s;return[zn(d*i+h*s,u*n+f*r),un(f*n-u*r)]},a}function Hx(e){e=gd(e[0]*$t,e[1]*$t,e.length>2?e[2]*$t:0);function t(n){return n=e(n[0]*$t,n[1]*$t),n[0]*=re,n[1]*=re,n}return t.invert=function(n){return n=e.invert(n[0]*$t,n[1]*$t),n[0]*=re,n[1]*=re,n},t}function Gx(e,t,n,r,i,s){if(n){var a=St(t),o=Et(t),l=r*n;i==null?(i=t+r*ye,s=t-l/2):(i=Ed(a,i),s=Ed(a,s),(r>0?i<s:i>s)&&(i+=r*ye));for(var c,u=i;r>0?u>s:u<s;u-=l)c=cl([a,-o*St(u),-o*Et(u)]),e.point(c[0],c[1])}}function Ed(e,t){t=_r(t),t[0]-=e,hl(t);var n=Fx(-t[1]);return((-t[2]<0?-n:n)+ye-xt)%ye}function xd(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Te,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ks(e,t){return bt(e[0]-t[0])<xt&&bt(e[1]-t[1])<xt}function Qs(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function bd(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,v=p[0],m=p[g],y;if(Ks(v,m)){if(!v[2]&&!m[2]){for(i.lineStart(),o=0;o<g;++o)i.point((v=p[o])[0],v[1]);i.lineEnd();return}m[0]+=2*xt}s.push(y=new Qs(v,p,null,!0)),a.push(y.o=new Qs(v,null,y,!1)),s.push(y=new Qs(m,p,null,!1)),a.push(y.o=new Qs(m,null,y,!0))}}),!!s.length){for(a.sort(t),_d(s),_d(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,d;;){for(var h=c,f=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);i.lineEnd()}}}function _d(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function pl(e){return bt(e[0])<=ht?e[0]:An(e[0])*((bt(e[0])+ht)%ye-ht)}function Vx(e,t){var n=pl(t),r=t[1],i=Et(r),s=[Et(n),-St(n),0],a=0,o=0,l=new Nn;i===1?r=ce+xt:i===-1&&(r=-ce-xt);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,f=d[h-1],p=pl(f),g=f[1]/2+ud,v=Et(g),m=St(g),y=0;y<h;++y,p=_,v=b,m=M,f=E){var E=d[y],_=pl(E),S=E[1]/2+ud,b=Et(S),M=St(S),D=_-p,G=D>=0?1:-1,I=G*D,w=I>ht,C=v*b;if(l.add(zn(C*G*Et(I),m*M+C*St(I))),a+=w?D+G*ye:D,w^p>=n^_>=n){var R=js(_r(f),_r(E));hl(R);var P=js(s,R);hl(P);var O=(w^D>=0?-1:1)*un(P[2]);(r>O||r===O&&(R[0]||R[1]))&&(o+=w^D>=0?1:-1)}}return(a<-xt||a<xt&&l<-cd)^o&1}function Sd(e,t,n,r){return function(i){var s=t(i),a=xd(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:g,lineEnd:v,polygonStart:function(){h.point=m,h.lineStart=y,h.lineEnd=E,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=v,u=rh(u);var _=Vx(c,r);u.length?(l||(i.polygonStart(),l=!0),bd(u,Wx,_,n,i)):_&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(_,S){e(_,S)&&i.point(_,S)}function p(_,S){s.point(_,S)}function g(){h.point=p,s.lineStart()}function v(){h.point=f,s.lineEnd()}function m(_,S){d.push([_,S]),o.point(_,S)}function y(){o.lineStart(),d=[]}function E(){m(d[0][0],d[0][1]),o.lineEnd();var _=o.clean(),S=a.result(),b,M=S.length,D,G,I;if(d.pop(),c.push(d),d=null,!!M){if(_&1){if(G=S[0],(D=G.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),b=0;b<D;++b)i.point((I=G[b])[0],I[1]);i.lineEnd()}return}M>1&&_&2&&S.push(S.pop().concat(S.shift())),u.push(S.filter(zx))}}return h}}function zx(e){return e.length>1}function Wx(e,t){return((e=e.x)[0]<0?e[1]-ce-xt:ce-e[1])-((t=t.x)[0]<0?t[1]-ce-xt:ce-t[1])}const Td=Sd(function(){return!0},Yx,Xx,[-ht,-ce]);function Yx(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?ht:-ht,l=bt(s-t);bt(l-ht)<xt?(e.point(t,n=(n+a)/2>0?ce:-ce),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=ht&&(bt(t-r)<xt&&(t-=r*xt),bt(s-o)<xt&&(s-=o*xt),n=qx(t,n,s,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),i=0),e.point(t=s,n=a),r=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function qx(e,t,n,r){var i,s,a=Et(e-n);return bt(a)>xt?hd((Et(t)*(s=St(r))*Et(n)-Et(r)*(i=St(t))*Et(e))/(i*s*a)):(t+r)/2}function Xx(e,t,n,r){var i;if(e==null)i=n*ce,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(bt(e[0]-t[0])>xt){var s=e[0]<t[0]?ht:-ht;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function jx(e){var t=St(e),n=6*$t,r=t>0,i=bt(t)>xt;function s(u,d,h,f){Gx(f,e,n,h,u,d)}function a(u,d){return St(u)*St(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(v,m){var y=[v,m],E,_=a(v,m),S=r?_?0:c(v,m):_?c(v+(v<0?ht:-ht),m):0;if(!d&&(p=f=_)&&u.lineStart(),_!==f&&(E=l(d,y),(!E||Ks(d,E)||Ks(y,E))&&(y[2]=1)),_!==f)g=0,_?(u.lineStart(),E=l(y,d),u.point(E[0],E[1])):(E=l(d,y),u.point(E[0],E[1],2),u.lineEnd()),d=E;else if(i&&d&&r^_){var b;!(S&h)&&(b=l(y,d,!0))&&(g=0,r?(u.lineStart(),u.point(b[0][0],b[0][1]),u.point(b[1][0],b[1][1]),u.lineEnd()):(u.point(b[1][0],b[1][1]),u.lineEnd(),u.lineStart(),u.point(b[0][0],b[0][1],3)))}_&&(!d||!Ks(d,y))&&u.point(y[0],y[1]),d=y,f=_,h=S},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function l(u,d,h){var f=_r(u),p=_r(d),g=[1,0,0],v=js(f,p),m=Xs(v,v),y=v[0],E=m-y*y;if(!E)return!h&&u;var _=t*m/E,S=-t*y/E,b=js(g,v),M=Zs(g,_),D=Zs(v,S);ul(M,D);var G=b,I=Xs(M,G),w=Xs(G,G),C=I*I-w*(Xs(M,M)-1);if(!(C<0)){var R=$e(C),P=Zs(G,(-I-R)/w);if(ul(P,M),P=cl(P),!h)return P;var O=u[0],H=d[0],B=u[1],U=d[1],N;H<O&&(N=O,O=H,H=N);var j=H-O,Y=bt(j-ht)<xt,it=Y||j<xt;if(!Y&&U<B&&(N=B,B=U,U=N),it?Y?B+U>0^P[1]<(bt(P[0]-O)<xt?B:U):B<=P[1]&&P[1]<=U:j>ht^(O<=P[0]&&P[0]<=H)){var et=Zs(G,(-I+R)/w);return ul(et,M),[P,cl(et)]}}}function c(u,d){var h=r?e:ht-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return Sd(a,o,s,r?[0,-e]:[-ht,e-ht])}function Zx(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-a,f=c-o,p;if(p=n-a,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>u&&(u=p)}if(p=i-a,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<d&&(d=p)}if(p=r-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>u&&(u=p)}if(p=s-o,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<d&&(d=p)}return u>0&&(e[0]=a+u*h,e[1]=o+u*f),d<1&&(t[0]=a+d*h,t[1]=o+d*f),!0}}}}}var Ei=1e9,Js=-Ei;function Kx(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,h){var f=0,p=0;if(c==null||(f=a(c,d))!==(p=a(u,d))||l(c,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?r:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(c,u){return bt(c[0]-e)<xt?u>0?0:3:bt(c[0]-n)<xt?u>0?2:1:bt(c[1]-t)<xt?u>0?1:0:u>0?3:2}function o(c,u){return l(c.x,u.x)}function l(c,u){var d=a(c,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=xd(),h,f,p,g,v,m,y,E,_,S,b,M={point:D,lineStart:C,lineEnd:R,polygonStart:I,polygonEnd:w};function D(O,H){i(O,H)&&u.point(O,H)}function G(){for(var O=0,H=0,B=f.length;H<B;++H)for(var U=f[H],N=1,j=U.length,Y=U[0],it,et,q=Y[0],Q=Y[1];N<j;++N)it=q,et=Q,Y=U[N],q=Y[0],Q=Y[1],et<=r?Q>r&&(q-it)*(r-et)>(Q-et)*(e-it)&&++O:Q<=r&&(q-it)*(r-et)<(Q-et)*(e-it)&&--O;return O}function I(){u=d,h=[],f=[],b=!0}function w(){var O=G(),H=b&&O,B=(h=rh(h)).length;(H||B)&&(c.polygonStart(),H&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),B&&bd(h,o,O,s,c),c.polygonEnd()),u=c,h=f=p=null}function C(){M.point=P,f&&f.push(p=[]),S=!0,_=!1,y=E=NaN}function R(){h&&(P(g,v),m&&_&&d.rejoin(),h.push(d.result())),M.point=D,_&&u.lineEnd()}function P(O,H){var B=i(O,H);if(f&&p.push([O,H]),S)g=O,v=H,m=B,S=!1,B&&(u.lineStart(),u.point(O,H));else if(B&&_)u.point(O,H);else{var U=[y=Math.max(Js,Math.min(Ei,y)),E=Math.max(Js,Math.min(Ei,E))],N=[O=Math.max(Js,Math.min(Ei,O)),H=Math.max(Js,Math.min(Ei,H))];Zx(U,N,e,t,n,r)?(_||(u.lineStart(),u.point(U[0],U[1])),u.point(N[0],N[1]),B||u.lineEnd(),b=!1):B&&(u.lineStart(),u.point(O,H),b=!1)}y=O,E=H,_=B}return M}}const gl=e=>e;var ml=new Nn,vl=new Nn,wd,Od,yl,El,Cn={point:Te,lineStart:Te,lineEnd:Te,polygonStart:function(){Cn.lineStart=Qx,Cn.lineEnd=tb},polygonEnd:function(){Cn.lineStart=Cn.lineEnd=Cn.point=Te,ml.add(bt(vl)),vl=new Nn},result:function(){var e=ml/2;return ml=new Nn,e}};function Qx(){Cn.point=Jx}function Jx(e,t){Cn.point=Md,wd=yl=e,Od=El=t}function Md(e,t){vl.add(El*e-yl*t),yl=e,El=t}function tb(){Md(wd,Od)}const Ad=Cn;var Sr=1/0,ta=Sr,xi=-Sr,ea=xi,eb={point:nb,lineStart:Te,lineEnd:Te,polygonStart:Te,polygonEnd:Te,result:function(){var e=[[Sr,ta],[xi,ea]];return xi=ea=-(ta=Sr=1/0),e}};function nb(e,t){e<Sr&&(Sr=e),e>xi&&(xi=e),t<ta&&(ta=t),t>ea&&(ea=t)}const na=eb;var xl=0,bl=0,bi=0,ra=0,ia=0,Tr=0,_l=0,Sl=0,_i=0,Cd,Dd,je,Ze,Ne={point:Wn,lineStart:Ld,lineEnd:Rd,polygonStart:function(){Ne.lineStart=sb,Ne.lineEnd=ab},polygonEnd:function(){Ne.point=Wn,Ne.lineStart=Ld,Ne.lineEnd=Rd},result:function(){var e=_i?[_l/_i,Sl/_i]:Tr?[ra/Tr,ia/Tr]:bi?[xl/bi,bl/bi]:[NaN,NaN];return xl=bl=bi=ra=ia=Tr=_l=Sl=_i=0,e}};function Wn(e,t){xl+=e,bl+=t,++bi}function Ld(){Ne.point=rb}function rb(e,t){Ne.point=ib,Wn(je=e,Ze=t)}function ib(e,t){var n=e-je,r=t-Ze,i=$e(n*n+r*r);ra+=i*(je+e)/2,ia+=i*(Ze+t)/2,Tr+=i,Wn(je=e,Ze=t)}function Rd(){Ne.point=Wn}function sb(){Ne.point=ob}function ab(){Id(Cd,Dd)}function ob(e,t){Ne.point=Id,Wn(Cd=je=e,Dd=Ze=t)}function Id(e,t){var n=e-je,r=t-Ze,i=$e(n*n+r*r);ra+=i*(je+e)/2,ia+=i*(Ze+t)/2,Tr+=i,i=Ze*e-je*t,_l+=i*(je+e),Sl+=i*(Ze+t),_i+=i*3,Wn(je=e,Ze=t)}const kd=Ne;function Pd(e){this._context=e}Pd.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,ye);break}}},result:Te};var Tl=new Nn,wl,$d,Nd,Si,Ti,sa={point:Te,lineStart:function(){sa.point=lb},lineEnd:function(){wl&&Ud($d,Nd),sa.point=Te},polygonStart:function(){wl=!0},polygonEnd:function(){wl=null},result:function(){var e=+Tl;return Tl=new Nn,e}};function lb(e,t){sa.point=Ud,$d=Si=e,Nd=Ti=t}function Ud(e,t){Si-=e,Ti-=t,Tl.add($e(Si*Si+Ti*Ti)),Si=e,Ti=t}const Bd=sa;let Fd,aa,Hd,Gd;class Vd{constructor(t){this._append=t==null?zd:cb(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==Hd||this._append!==aa){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`,Hd=r,aa=this._append,Gd=this._,this._=i}this._+=Gd;break}}}result(){const t=this._;return this._="",t.length?t:null}}function zd(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function cb(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return zd;if(t!==Fd){const n=10**t;Fd=t,aa=function(i){let s=1;this._+=i[0];for(const a=i.length;s<a;++s)this._+=Math.round(arguments[s]*n)/n+i[s]}}return aa}function ub(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),br(o,i(s))),s.result()}return a.area=function(o){return br(o,i(Ad)),Ad.result()},a.measure=function(o){return br(o,i(Bd)),Bd.result()},a.bounds=function(o){return br(o,i(na)),na.result()},a.centroid=function(o){return br(o,i(kd)),kd.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,gl):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new Vd(n)):new Pd(t=o),typeof r!="function"&&s.pointRadius(r),a):t},a.pointRadius=function(o){return arguments.length?(r=typeof o=="function"?o:(s.pointRadius(+o),+o),a):r},a.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const l=Math.floor(o);if(!(l>=0))throw new RangeError(`invalid digits: ${o}`);n=l}return t===null&&(s=new Vd(n)),a},a.projection(e).digits(n).context(t)}function Ol(e){return function(t){var n=new Ml;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ml(){}Ml.prototype={constructor:Ml,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Al(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),br(n,e.stream(na)),t(na.result()),r!=null&&e.clipExtent(r),e}function Wd(e,t,n){return Al(e,function(r){var i=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),s/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(s-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,l])},n)}function hb(e,t,n){return Wd(e,[[0,0],t],n)}function db(e,t,n){return Al(e,function(r){var i=+t,s=i/(r[1][0]-r[0][0]),a=(i-s*(r[1][0]+r[0][0]))/2,o=-s*r[0][1];e.scale(150*s).translate([a,o])},n)}function fb(e,t,n){return Al(e,function(r){var i=+t,s=i/(r[1][1]-r[0][1]),a=-s*r[0][0],o=(i-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,o])},n)}var Yd=16,pb=St(30*$t);function qd(e,t){return+t?mb(e,t):gb(e)}function gb(e){return Ol({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function mb(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,g,v){var m=c-r,y=u-i,E=m*m+y*y;if(E>4*t&&g--){var _=a+h,S=o+f,b=l+p,M=$e(_*_+S*S+b*b),D=un(b/=M),G=bt(bt(b)-1)<xt||bt(s-d)<xt?(s+d)/2:zn(S,_),I=e(G,D),w=I[0],C=I[1],R=w-r,P=C-i,O=y*R-m*P;(O*O/E>t||bt((m*R+y*P)/E-.5)>.3||a*h+o*f+l*p<pb)&&(n(r,i,s,a,o,l,w,C,G,_/=M,S/=M,b,g,v),v.point(w,C),n(w,C,G,_,S,b,c,u,d,h,f,p,g,v))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,g,v={point:m,lineStart:y,lineEnd:_,polygonStart:function(){r.polygonStart(),v.lineStart=S},polygonEnd:function(){r.polygonEnd(),v.lineStart=y}};function m(D,G){D=e(D,G),r.point(D[0],D[1])}function y(){d=NaN,v.point=E,r.lineStart()}function E(D,G){var I=_r([D,G]),w=e(D,G);n(d,h,u,f,p,g,d=w[0],h=w[1],u=D,f=I[0],p=I[1],g=I[2],Yd,r),r.point(d,h)}function _(){v.point=m,r.lineEnd()}function S(){y(),v.point=b,v.lineEnd=M}function b(D,G){E(i=D,G),s=d,a=h,o=f,l=p,c=g,v.point=E}function M(){n(d,h,u,f,p,g,s,a,i,o,l,c,Yd,r),v.lineEnd=_,_()}return v}}var vb=Ol({point:function(e,t){this.stream.point(e*$t,t*$t)}});function yb(e){return Ol({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Eb(e,t,n,r,i){function s(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return s.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},s}function Xd(e,t,n,r,i,s){if(!s)return Eb(e,t,n,r,i);var a=St(s),o=Et(s),l=a*e,c=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(g,v){return g*=r,v*=i,[l*g-c*v+t,n-c*g-l*v]}return p.invert=function(g,v){return[r*(u*g-d*v+h),i*(f-d*g-u*v)]},p}function oa(e){return jd(function(){return e})()}function jd(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,d=0,h=1,f=1,p=null,g=Td,v=null,m,y,E,_=gl,S=.5,b,M,D,G,I;function w(O){return D(O[0]*$t,O[1]*$t)}function C(O){return O=D.invert(O[0],O[1]),O&&[O[0]*re,O[1]*re]}w.stream=function(O){return G&&I===O?G:G=vb(yb(u)(g(b(_(I=O)))))},w.preclip=function(O){return arguments.length?(g=O,p=void 0,P()):g},w.postclip=function(O){return arguments.length?(_=O,v=m=y=E=null,P()):_},w.clipAngle=function(O){return arguments.length?(g=+O?jx(p=O*$t):(p=null,Td),P()):p*re},w.clipExtent=function(O){return arguments.length?(_=O==null?(v=m=y=E=null,gl):Kx(v=+O[0][0],m=+O[0][1],y=+O[1][0],E=+O[1][1]),P()):v==null?null:[[v,m],[y,E]]},w.scale=function(O){return arguments.length?(n=+O,R()):n},w.translate=function(O){return arguments.length?(r=+O[0],i=+O[1],R()):[r,i]},w.center=function(O){return arguments.length?(s=O[0]%360*$t,a=O[1]%360*$t,R()):[s*re,a*re]},w.rotate=function(O){return arguments.length?(o=O[0]%360*$t,l=O[1]%360*$t,c=O.length>2?O[2]%360*$t:0,R()):[o*re,l*re,c*re]},w.angle=function(O){return arguments.length?(d=O%360*$t,R()):d*re},w.reflectX=function(O){return arguments.length?(h=O?-1:1,R()):h<0},w.reflectY=function(O){return arguments.length?(f=O?-1:1,R()):f<0},w.precision=function(O){return arguments.length?(b=qd(M,S=O*O),P()):$e(S)},w.fitExtent=function(O,H){return Wd(w,O,H)},w.fitSize=function(O,H){return hb(w,O,H)},w.fitWidth=function(O,H){return db(w,O,H)},w.fitHeight=function(O,H){return fb(w,O,H)};function R(){var O=Xd(n,0,0,h,f,d).apply(null,t(s,a)),H=Xd(n,r-O[0],i-O[1],h,f,d);return u=gd(o,l,c),M=dl(t,H),D=dl(u,M),b=qd(M,S),P()}function P(){return G=I=null,w}return function(){return t=e.apply(this,arguments),w.invert=t.invert&&C,R()}}function Zd(e){var t=0,n=ht/3,r=jd(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*$t,n=s[1]*$t):[t*re,n*re]},i}function xb(e){var t=St(e);function n(r,i){return[r*t,Et(i)/t]}return n.invert=function(r,i){return[r/t,un(i*t)]},n}function bb(e,t){var n=Et(e),r=(n+Et(t))/2;if(bt(r)<xt)return xb(e);var i=1+n*(2*r-n),s=$e(i)/r;function a(o,l){var c=$e(i-2*r*Et(l))/r;return[c*Et(o*=r),s-c*St(o)]}return a.invert=function(o,l){var c=s-l,u=zn(o,bt(c))*An(c);return c*r<0&&(u-=ht*An(o)*An(c)),[u/r,un((i-(o*o+c*c)*r*r)/(2*r))]},a}function Kd(){return Zd(bb).scale(155.424).center([0,33.6442])}function _b(){return Kd().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Cl(e,t){return[e,Ux(Bx((ce+t)/2))]}Cl.invert=function(e,t){return[e,2*hd(Nx(t))-ce]};function Sb(){return Tb(Cl).scale(961/ye)}function Tb(e){var t=oa(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=l=c=null:(a=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var d=ht*r(),h=t(Hx(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Cl?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,l),c]]:[[a,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function la(e,t){return[e,t]}la.invert=la;function wb(){return oa(la).scale(152.63)}function Ob(e,t){var n=St(e),r=e===t?Et(e):(n-St(t))/(t-e),i=n/r+e;if(bt(r)<xt)return la;function s(a,o){var l=i-o,c=r*a;return[l*Et(c),i-l*St(c)]}return s.invert=function(a,o){var l=i-o,c=zn(a,bt(l))*An(l);return l*r<0&&(c-=ht*An(a)*An(l)),[c/r,i-An(r)*$e(a*a+l*l)]},s}function Mb(){return Zd(Ob).scale(131.154).center([0,13.9389])}var wi=1.340264,Oi=-.081106,Mi=893e-6,Ai=.003796,ca=$e(3)/2,Ab=12;function Qd(e,t){var n=un(ca*Et(t)),r=n*n,i=r*r*r;return[e*St(n)/(ca*(wi+3*Oi*r+i*(7*Mi+9*Ai*r))),n*(wi+Oi*r+i*(Mi+Ai*r))]}Qd.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<Ab&&(o=n*(wi+Oi*r+i*(Mi+Ai*r))-t,l=wi+3*Oi*r+i*(7*Mi+9*Ai*r),n-=a=o/l,r=n*n,i=r*r*r,!(bt(a)<cd));++s);return[ca*e*(wi+3*Oi*r+i*(7*Mi+9*Ai*r))/St(n),un(Et(n)/ca)]};function Cb(){return oa(Qd).scale(177.158)}function Jd(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Jd.invert=function(e,t){var n=t,r=25,i;do{var s=n*n,a=s*s;n-=i=(n*(1.007226+s*(.015085+a*(-.044475+.028874*s-.005916*a)))-t)/(1.007226+s*(.015085*3+a*(-.044475*7+.028874*9*s-.005916*11*a)))}while(bt(i)>xt&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function Db(){return oa(Jd).scale(175.295)}function Lb(e,t){return e.parent===t.parent?1:2}function Rb(e){return e.reduce(Ib,0)/e.length}function Ib(e,t){return e+t.x}function kb(e){return 1+e.reduce(Pb,0)}function Pb(e,t){return Math.max(e,t.y)}function $b(e){for(var t;t=e.children;)e=t[0];return e}function Nb(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Ub(){var e=Lb,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=Rb(f),h.y=kb(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=$b(s),c=Nb(s),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(s.y?h.y/s.y:1))*n})}return i.separation=function(s){return arguments.length?(e=s,i):e},i.size=function(s){return arguments.length?(r=!1,t=+s[0],n=+s[1],i):r?null:[t,n]},i.nodeSize=function(s){return arguments.length?(r=!0,t=+s[0],n=+s[1],i):r?[t,n]:null},i}function Bb(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Fb(){return this.eachAfter(Bb)}function Hb(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function Gb(e,t){for(var n=this,r=[n],i,s,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function Vb(e,t){for(var n=this,r=[n],i=[],s,a,o,l=-1;n=r.pop();)if(i.push(n),s=n.children)for(a=0,o=s.length;a<o;++a)r.push(s[a]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function zb(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function Wb(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function Yb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function qb(e){for(var t=this,n=Xb(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Xb(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function jb(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Zb(){return Array.from(this)}function Kb(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Qb(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Jb(){var e=this,t,n=[e],r,i,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function Ci(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=n_)):t===void 0&&(t=e_);for(var n=new Di(e),r,i=[n],s,a,o,l;r=i.pop();)if((a=t(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,o=l-1;o>=0;--o)i.push(s=a[o]=new Di(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(i_)}function t_(){return Ci(this).eachBefore(r_)}function e_(e){return e.children}function n_(e){return Array.isArray(e)?e[1]:null}function r_(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function i_(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Di(e){this.data=e,this.depth=this.height=0,this.parent=null}Di.prototype=Ci.prototype={constructor:Di,count:Fb,each:Hb,eachAfter:Vb,eachBefore:Gb,find:zb,sum:Wb,sort:Yb,path:qb,ancestors:jb,descendants:Zb,leaves:Kb,links:Qb,copy:t_,[Symbol.iterator]:Jb};function s_(e){return e==null?null:tf(e)}function tf(e){if(typeof e!="function")throw new Error;return e}function Yn(){return 0}function wr(e){return function(){return e}}const a_=1664525,o_=1013904223,ef=4294967296;function l_(){let e=1;return()=>(e=(a_*e+o_)%ef)/ef}function c_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function u_(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function h_(e,t){for(var n=0,r=(e=u_(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&nf(a,s)?++n:(a=f_(i=d_(i,s)),n=0);return a}function d_(e,t){var n,r;if(Dl(t,e))return[t];for(n=0;n<e.length;++n)if(ua(t,e[n])&&Dl(Li(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(ua(Li(e[n],e[r]),t)&&ua(Li(e[n],t),e[r])&&ua(Li(e[r],t),e[n])&&Dl(rf(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function ua(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function nf(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Dl(e,t){for(var n=0;n<t.length;++n)if(!nf(e,t[n]))return!1;return!0}function f_(e){switch(e.length){case 1:return p_(e[0]);case 2:return Li(e[0],e[1]);case 3:return rf(e[0],e[1],e[2])}}function p_(e){return{x:e.x,y:e.y,r:e.r}}function Li(e,t){var n=e.x,r=e.y,i=e.r,s=t.x,a=t.y,o=t.r,l=s-n,c=a-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+s+l/d*u)/2,y:(r+a+c/d*u)/2,r:(d+i+o)/2}}function rf(e,t,n){var r=e.x,i=e.y,s=e.r,a=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-a,f=r-c,p=i-o,g=i-u,v=l-s,m=d-s,y=r*r+i*i-s*s,E=y-a*a-o*o+l*l,_=y-c*c-u*u+d*d,S=f*p-h*g,b=(p*_-g*E)/(S*2)-r,M=(g*v-p*m)/S,D=(f*E-h*_)/(S*2)-i,G=(h*m-f*v)/S,I=M*M+G*G-1,w=2*(s+b*M+D*G),C=b*b+D*D-s*s,R=-(Math.abs(I)>1e-6?(w+Math.sqrt(w*w-4*I*C))/(2*I):C/w);return{x:r+b+M*R,y:i+D+G*R,r:R}}function sf(e,t,n){var r=e.x-t.x,i,s,a=e.y-t.y,o,l,c=r*r+a*a;c?(s=t.r+n.r,s*=s,l=e.r+n.r,l*=l,s>l?(i=(c+l-s)/(2*c),o=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-o*a,n.y=e.y-i*a+o*r):(i=(c+s-l)/(2*c),o=Math.sqrt(Math.max(0,s/c-i*i)),n.x=t.x+i*r-o*a,n.y=t.y+i*a+o*r)):(n.x=t.x+n.r,n.y=t.y)}function af(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function of(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,s=(t.y*n.r+n.y*t.r)/r;return i*i+s*s}function ha(e){this._=e,this.next=null,this.previous=null}function g_(e,t){if(!(s=(e=c_(e)).length))return 0;var n,r,i,s,a,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;sf(r,n,i=e[2]),n=new ha(n),r=new ha(r),i=new ha(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){sf(n._,r._,i=e[l]),i=new ha(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(af(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(af(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=of(n);(i=i.next)!==r;)(o=of(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=h_(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function m_(e){return Math.sqrt(e.value)}function v_(){var e=null,t=1,n=1,r=Yn;function i(s){const a=l_();return s.x=t/2,s.y=n/2,e?s.eachBefore(lf(e)).eachAfter(Ll(r,.5,a)).eachBefore(cf(1)):s.eachBefore(lf(m_)).eachAfter(Ll(Yn,1,a)).eachAfter(Ll(r,s.r/Math.min(t,n),a)).eachBefore(cf(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=s_(s),i):e},i.size=function(s){return arguments.length?(t=+s[0],n=+s[1],i):[t,n]},i.padding=function(s){return arguments.length?(r=typeof s=="function"?s:wr(+s),i):r},i}function lf(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Ll(e,t,n){return function(r){if(i=r.children){var i,s,a=i.length,o=e(r)*t||0,l;if(o)for(s=0;s<a;++s)i[s].r+=o;if(l=g_(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function cf(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function y_(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function E_(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(r-t)/e.value;++o<l;)a=s[o],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function x_(e,t){return e.parent===t.parent?1:2}function Rl(e){var t=e.children;return t?t[0]:e.t}function Il(e){var t=e.children;return t?t[t.length-1]:e.t}function b_(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function __(e){for(var t=0,n=0,r=e.children,i=r.length,s;--i>=0;)s=r[i],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function S_(e,t,n){return e.a.parent===t.parent?e.a:n}function da(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}da.prototype=Object.create(Di.prototype);function T_(e){for(var t=new da(e,0),n,r=[t],i,s,a,o;n=r.pop();)if(s=n._.children)for(n.children=new Array(o=s.length),a=o-1;a>=0;--a)r.push(i=n.children[a]=new da(s[a],a)),i.parent=n;return(t.parent=new da(null,0)).children=[t],t}function w_(){var e=x_,t=1,n=1,r=null;function i(c){var u=T_(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var d=c,h=c,f=c;c.eachBefore(function(y){y.x<d.x&&(d=y),y.x>h.x&&(h=y),y.depth>f.depth&&(f=y)});var p=d===h?1:e(d,h)/2,g=p-d.x,v=t/(h.x+p+g),m=n/(f.depth||1);c.eachBefore(function(y){y.x=(y.x+g)*v,y.y=y.depth*m})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){__(c);var f=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-f):c.z=f}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,f=c,p=u,g=h.parent.children[0],v=h.m,m=f.m,y=p.m,E=g.m,_;p=Il(p),h=Rl(h),p&&h;)g=Rl(g),f=Il(f),f.a=c,_=p.z+y-h.z-v+e(p._,h._),_>0&&(b_(S_(p,c,d),c,_),v+=_,m+=_),y+=p.m,v+=h.m,E+=g.m,m+=f.m;p&&!Il(f)&&(f.t=p,f.m+=y-m),h&&!Rl(g)&&(g.t=h,g.m+=v-E,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function O_(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(i-n)/e.value;++o<l;)a=s[o],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var M_=(1+Math.sqrt(5))/2;function A_(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,d=0,h=o.length,f,p,g=t.value,v,m,y,E,_,S,b;u<h;){f=i-n,p=s-r;do v=o[d++].value;while(!v&&d<h);for(m=y=v,S=Math.max(p/f,f/p)/(g*e),b=v*v*S,_=Math.max(y/b,b/m);d<h;++d){if(v+=c=o[d].value,c<m&&(m=c),c>y&&(y=c),b=v*v*S,E=Math.max(y/b,b/m),E>_){v-=c;break}_=E}a.push(l={value:v,dice:f<p,children:o.slice(u,d)}),l.dice?E_(l,n,r,i,g?r+=p*v/g:s):O_(l,n,r,g?n+=f*v/g:i,s),g-=v,u=d}return a}const C_=function e(t){function n(r,i,s,a,o){A_(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(M_);function D_(){var e=C_,t=!1,n=1,r=1,i=[0],s=Yn,a=Yn,o=Yn,l=Yn,c=Yn;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(y_),h}function d(h){var f=i[h.depth],p=h.x0+f,g=h.y0+f,v=h.x1-f,m=h.y1-f;v<p&&(p=v=(p+v)/2),m<g&&(g=m=(g+m)/2),h.x0=p,h.y0=g,h.x1=v,h.y1=m,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,g+=a(h)-f,v-=o(h)-f,m-=l(h)-f,v<p&&(p=v=(p+v)/2),m<g&&(g=m=(g+m)/2),e(h,p,g,v,m))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=tf(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:wr(+h),u):s},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:wr(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:wr(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:wr(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:wr(+h),u):c},u}function Or(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const uf=Symbol("implicit");function fa(){var e=new Ju,t=[],n=[],r=uf;function i(s){let a=e.get(s);if(a===void 0){if(r!==uf)return r;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Ju;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return fa(t,n).unknown(r)},Or.apply(i,arguments),i}function Ri(){var e=fa().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,f=i<r,p=f?i:r,g=f?r:i;s=(g-p)/Math.max(1,h-l+c*2),o&&(s=Math.floor(s)),p+=(g-p-s*(h-l))*u,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var v=U0(h).map(function(m){return p+s*m});return n(f?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Ri(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Or.apply(d(),arguments)}function L_(e){return function(){return e}}function R_(e){return+e}var hf=[0,1];function Mr(e){return e}function kl(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:L_(isNaN(t)?NaN:.5)}function I_(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function k_(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=kl(i,r),s=n(a,s)):(r=kl(r,i),s=n(s,a)),function(o){return s(r(o))}}function P_(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=kl(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=Oo(e,o,1,r)-1;return s[l](i[l](o))}}function Pl(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function df(){var e=hf,t=hf,n=fi,r,i,s,a=Mr,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==Mr&&(a=I_(e[0],e[h-1])),o=h>2?P_:k_,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=o(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((c||(c=o(t,e.map(r),ve)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,R_),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Rh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:Mr,u()):a!==Mr},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,f){return r=h,i=f,u()}}function ff(){return df()(Mr,Mr)}function $_(e,t,n,r){var i=Ao(e,t,n),s;switch(r=yi(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Px(i,a))&&(r.precision=s),ld(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=$x(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=kx(i))&&(r.precision=s-(r.type==="%")*2);break}}return ol(r)}function pf(e){var t=e.domain;return e.ticks=function(n){var r=t();return Ss(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return $_(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,a=r[i],o=r[s],l,c,u=10;for(o<a&&(c=a,a=o,o=c,c=i,i=s,s=c);u-- >0;){if(c=pr(a,o,n),c===l)return r[i]=a,r[s]=o,t(r);if(c>0)a=Math.floor(a/c)*c,o=Math.ceil(o/c)*c;else if(c<0)a=Math.ceil(a*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function Ue(){var e=ff();return e.copy=function(){return Pl(e,Ue())},Or.apply(e,arguments),pf(e)}function gf(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),e[n]=t.floor(i),e[r]=t.ceil(s),e}function mf(e){return Math.log(e)}function vf(e){return Math.exp(e)}function N_(e){return-Math.log(-e)}function U_(e){return-Math.exp(-e)}function B_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function F_(e){return e===10?B_:e===Math.E?Math.exp:t=>Math.pow(e,t)}function H_(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function yf(e){return(t,n)=>-e(-t,n)}function G_(e){const t=e(mf,vf),n=t.domain;let r=10,i,s;function a(){return i=H_(r),s=F_(r),n()[0]<0?(i=yf(i),s=yf(s),e(N_,U_)):e(mf,vf),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),f=i(u),p,g;const v=o==null?10:+o;let m=[];if(!(r%1)&&f-h<v){if(h=Math.floor(h),f=Math.ceil(f),c>0){for(;h<=f;++h)for(p=1;p<r;++p)if(g=h<0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;m.push(g)}}else for(;h<=f;++h)for(p=r-1;p>=1;--p)if(g=h>0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;m.push(g)}m.length*2<v&&(m=Ss(c,u,v))}else m=Ss(h,f,Math.min(f-h,v)).map(s);return d?m.reverse():m},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=yi(l)).precision==null&&(l.trim=!0),l=ol(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/s(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(gf(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function Ef(){const e=G_(df()).domain([1,10]);return e.copy=()=>Pl(e,Ef()).base(e.base()),Or.apply(e,arguments),e}function $l(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[Oo(r,l,0,n)]:s}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(s=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return $l().domain([e,t]).range(i).unknown(s)},Or.apply(pf(a),arguments)}const Nl=new Date,Ul=new Date;function Vt(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,o)=>{const l=[];if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let c;do l.push(c=new Date(+s)),t(s,o),e(s);while(c<s&&s<a);return l},i.filter=s=>Vt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;t(a,-1),!s(a););else for(;--o>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(Nl.setTime(+s),Ul.setTime(+a),e(Nl),e(Ul),Math.floor(n(Nl,Ul))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const pa=Vt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);pa.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Vt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):pa),pa.range;const hn=1e3,we=hn*60,dn=we*60,fn=dn*24,Bl=fn*7,xf=fn*30,Fl=fn*365,Ar=Vt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*hn)},(e,t)=>(t-e)/hn,e=>e.getUTCSeconds());Ar.range;const Hl=Vt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hn)},(e,t)=>{e.setTime(+e+t*we)},(e,t)=>(t-e)/we,e=>e.getMinutes());Hl.range,Vt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*we)},(e,t)=>(t-e)/we,e=>e.getUTCMinutes()).range;const Gl=Vt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hn-e.getMinutes()*we)},(e,t)=>{e.setTime(+e+t*dn)},(e,t)=>(t-e)/dn,e=>e.getHours());Gl.range,Vt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*dn)},(e,t)=>(t-e)/dn,e=>e.getUTCHours()).range;const Ii=Vt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*we)/fn,e=>e.getDate()-1);Ii.range;const Vl=Vt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fn,e=>e.getUTCDate()-1);Vl.range,Vt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fn,e=>Math.floor(e/fn)).range;function qn(e){return Vt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*we)/Bl)}const ga=qn(0),ma=qn(1),V_=qn(2),z_=qn(3),Cr=qn(4),W_=qn(5),Y_=qn(6);ga.range,ma.range,V_.range,z_.range,Cr.range,W_.range,Y_.range;function Xn(e){return Vt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Bl)}const bf=Xn(0),va=Xn(1),q_=Xn(2),X_=Xn(3),Dr=Xn(4),j_=Xn(5),Z_=Xn(6);bf.range,va.range,q_.range,X_.range,Dr.range,j_.range,Z_.range;const zl=Vt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());zl.range,Vt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()).range;const pn=Vt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());pn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),pn.range;const jn=Vt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());jn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),jn.range;function K_(e,t,n,r,i,s){const a=[[Ar,1,hn],[Ar,5,5*hn],[Ar,15,15*hn],[Ar,30,30*hn],[s,1,we],[s,5,5*we],[s,15,15*we],[s,30,30*we],[i,1,dn],[i,3,3*dn],[i,6,6*dn],[i,12,12*dn],[r,1,fn],[r,2,2*fn],[n,1,Bl],[t,1,xf],[t,3,3*xf],[e,1,Fl]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const f=d&&typeof d.range=="function"?d:l(c,u,d),p=f?f.range(c,+u+1):[];return h?p.reverse():p}function l(c,u,d){const h=Math.abs(u-c)/d,f=wo(([,,v])=>v).right(a,h);if(f===a.length)return e.every(Ao(c/Fl,u/Fl,d));if(f===0)return pa.every(Math.max(Ao(c,u,d),1));const[p,g]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(g)}return[o,l]}const[Q_,J_]=K_(pn,zl,ga,Ii,Gl,Hl);function Wl(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Yl(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ki(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tS(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,l=e.shortMonths,c=Pi(i),u=$i(i),d=Pi(s),h=$i(s),f=Pi(a),p=$i(a),g=Pi(o),v=$i(o),m=Pi(l),y=$i(l),E={a:B,A:U,b:N,B:j,c:null,d:Mf,e:Mf,f:SS,g:IS,G:PS,H:xS,I:bS,j:_S,L:Af,m:TS,M:wS,p:Y,q:it,Q:kf,s:Pf,S:OS,u:MS,U:AS,V:CS,w:DS,W:LS,x:null,X:null,y:RS,Y:kS,Z:$S,"%":If},_={a:et,A:q,b:Q,B:pt,c:null,d:Df,e:Df,f:FS,g:ZS,G:QS,H:NS,I:US,j:BS,L:Lf,m:HS,M:GS,p:ot,q:Tt,Q:kf,s:Pf,S:VS,u:zS,U:WS,V:YS,w:qS,W:XS,x:null,X:null,y:jS,Y:KS,Z:JS,"%":If},S={a:I,A:w,b:C,B:R,c:P,d:wf,e:wf,f:mS,g:Tf,G:Sf,H:Of,I:Of,j:dS,L:gS,m:hS,M:fS,p:G,q:uS,Q:yS,s:ES,S:pS,u:sS,U:aS,V:oS,w:iS,W:lS,x:O,X:H,y:Tf,Y:Sf,Z:cS,"%":vS};E.x=b(n,E),E.X=b(r,E),E.c=b(t,E),_.x=b(n,_),_.X=b(r,_),_.c=b(t,_);function b(Z,F){return function(V){var $=[],mt=-1,gt=0,Ht=Z.length,Gt,st,Rt;for(V instanceof Date||(V=new Date(+V));++mt<Ht;)Z.charCodeAt(mt)===37&&($.push(Z.slice(gt,mt)),(st=_f[Gt=Z.charAt(++mt)])!=null?Gt=Z.charAt(++mt):st=Gt==="e"?" ":"0",(Rt=F[Gt])&&(Gt=Rt(V,st)),$.push(Gt),gt=mt+1);return $.push(Z.slice(gt,mt)),$.join("")}}function M(Z,F){return function(V){var $=ki(1900,void 0,1),mt=D($,Z,V+="",0),gt,Ht;if(mt!=V.length)return null;if("Q"in $)return new Date($.Q);if("s"in $)return new Date($.s*1e3+("L"in $?$.L:0));if(F&&!("Z"in $)&&($.Z=0),"p"in $&&($.H=$.H%12+$.p*12),$.m===void 0&&($.m="q"in $?$.q:0),"V"in $){if($.V<1||$.V>53)return null;"w"in $||($.w=1),"Z"in $?(gt=Yl(ki($.y,0,1)),Ht=gt.getUTCDay(),gt=Ht>4||Ht===0?va.ceil(gt):va(gt),gt=Vl.offset(gt,($.V-1)*7),$.y=gt.getUTCFullYear(),$.m=gt.getUTCMonth(),$.d=gt.getUTCDate()+($.w+6)%7):(gt=Wl(ki($.y,0,1)),Ht=gt.getDay(),gt=Ht>4||Ht===0?ma.ceil(gt):ma(gt),gt=Ii.offset(gt,($.V-1)*7),$.y=gt.getFullYear(),$.m=gt.getMonth(),$.d=gt.getDate()+($.w+6)%7)}else("W"in $||"U"in $)&&("w"in $||($.w="u"in $?$.u%7:"W"in $?1:0),Ht="Z"in $?Yl(ki($.y,0,1)).getUTCDay():Wl(ki($.y,0,1)).getDay(),$.m=0,$.d="W"in $?($.w+6)%7+$.W*7-(Ht+5)%7:$.w+$.U*7-(Ht+6)%7);return"Z"in $?($.H+=$.Z/100|0,$.M+=$.Z%100,Yl($)):Wl($)}}function D(Z,F,V,$){for(var mt=0,gt=F.length,Ht=V.length,Gt,st;mt<gt;){if($>=Ht)return-1;if(Gt=F.charCodeAt(mt++),Gt===37){if(Gt=F.charAt(mt++),st=S[Gt in _f?F.charAt(mt++):Gt],!st||($=st(Z,V,$))<0)return-1}else if(Gt!=V.charCodeAt($++))return-1}return $}function G(Z,F,V){var $=c.exec(F.slice(V));return $?(Z.p=u.get($[0].toLowerCase()),V+$[0].length):-1}function I(Z,F,V){var $=f.exec(F.slice(V));return $?(Z.w=p.get($[0].toLowerCase()),V+$[0].length):-1}function w(Z,F,V){var $=d.exec(F.slice(V));return $?(Z.w=h.get($[0].toLowerCase()),V+$[0].length):-1}function C(Z,F,V){var $=m.exec(F.slice(V));return $?(Z.m=y.get($[0].toLowerCase()),V+$[0].length):-1}function R(Z,F,V){var $=g.exec(F.slice(V));return $?(Z.m=v.get($[0].toLowerCase()),V+$[0].length):-1}function P(Z,F,V){return D(Z,t,F,V)}function O(Z,F,V){return D(Z,n,F,V)}function H(Z,F,V){return D(Z,r,F,V)}function B(Z){return a[Z.getDay()]}function U(Z){return s[Z.getDay()]}function N(Z){return l[Z.getMonth()]}function j(Z){return o[Z.getMonth()]}function Y(Z){return i[+(Z.getHours()>=12)]}function it(Z){return 1+~~(Z.getMonth()/3)}function et(Z){return a[Z.getUTCDay()]}function q(Z){return s[Z.getUTCDay()]}function Q(Z){return l[Z.getUTCMonth()]}function pt(Z){return o[Z.getUTCMonth()]}function ot(Z){return i[+(Z.getUTCHours()>=12)]}function Tt(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var F=b(Z+="",E);return F.toString=function(){return Z},F},parse:function(Z){var F=M(Z+="",!1);return F.toString=function(){return Z},F},utcFormat:function(Z){var F=b(Z+="",_);return F.toString=function(){return Z},F},utcParse:function(Z){var F=M(Z+="",!0);return F.toString=function(){return Z},F}}}var _f={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,eS=/^%/,nS=/[\\^$*+?|[\]().{}]/g;function vt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function rS(e){return e.replace(nS,"\\$&")}function Pi(e){return new RegExp("^(?:"+e.map(rS).join("|")+")","i")}function $i(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function iS(e,t,n){var r=Wt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sS(e,t,n){var r=Wt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function aS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function oS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function lS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Sf(e,t,n){var r=Wt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Tf(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cS(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function uS(e,t,n){var r=Wt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function hS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function wf(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function dS(e,t,n){var r=Wt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Of(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function fS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function pS(e,t,n){var r=Wt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function gS(e,t,n){var r=Wt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function mS(e,t,n){var r=Wt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vS(e,t,n){var r=eS.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function yS(e,t,n){var r=Wt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ES(e,t,n){var r=Wt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Mf(e,t){return vt(e.getDate(),t,2)}function xS(e,t){return vt(e.getHours(),t,2)}function bS(e,t){return vt(e.getHours()%12||12,t,2)}function _S(e,t){return vt(1+Ii.count(pn(e),e),t,3)}function Af(e,t){return vt(e.getMilliseconds(),t,3)}function SS(e,t){return Af(e,t)+"000"}function TS(e,t){return vt(e.getMonth()+1,t,2)}function wS(e,t){return vt(e.getMinutes(),t,2)}function OS(e,t){return vt(e.getSeconds(),t,2)}function MS(e){var t=e.getDay();return t===0?7:t}function AS(e,t){return vt(ga.count(pn(e)-1,e),t,2)}function Cf(e){var t=e.getDay();return t>=4||t===0?Cr(e):Cr.ceil(e)}function CS(e,t){return e=Cf(e),vt(Cr.count(pn(e),e)+(pn(e).getDay()===4),t,2)}function DS(e){return e.getDay()}function LS(e,t){return vt(ma.count(pn(e)-1,e),t,2)}function RS(e,t){return vt(e.getFullYear()%100,t,2)}function IS(e,t){return e=Cf(e),vt(e.getFullYear()%100,t,2)}function kS(e,t){return vt(e.getFullYear()%1e4,t,4)}function PS(e,t){var n=e.getDay();return e=n>=4||n===0?Cr(e):Cr.ceil(e),vt(e.getFullYear()%1e4,t,4)}function $S(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+vt(t/60|0,"0",2)+vt(t%60,"0",2)}function Df(e,t){return vt(e.getUTCDate(),t,2)}function NS(e,t){return vt(e.getUTCHours(),t,2)}function US(e,t){return vt(e.getUTCHours()%12||12,t,2)}function BS(e,t){return vt(1+Vl.count(jn(e),e),t,3)}function Lf(e,t){return vt(e.getUTCMilliseconds(),t,3)}function FS(e,t){return Lf(e,t)+"000"}function HS(e,t){return vt(e.getUTCMonth()+1,t,2)}function GS(e,t){return vt(e.getUTCMinutes(),t,2)}function VS(e,t){return vt(e.getUTCSeconds(),t,2)}function zS(e){var t=e.getUTCDay();return t===0?7:t}function WS(e,t){return vt(bf.count(jn(e)-1,e),t,2)}function Rf(e){var t=e.getUTCDay();return t>=4||t===0?Dr(e):Dr.ceil(e)}function YS(e,t){return e=Rf(e),vt(Dr.count(jn(e),e)+(jn(e).getUTCDay()===4),t,2)}function qS(e){return e.getUTCDay()}function XS(e,t){return vt(va.count(jn(e)-1,e),t,2)}function jS(e,t){return vt(e.getUTCFullYear()%100,t,2)}function ZS(e,t){return e=Rf(e),vt(e.getUTCFullYear()%100,t,2)}function KS(e,t){return vt(e.getUTCFullYear()%1e4,t,4)}function QS(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Dr(e):Dr.ceil(e),vt(e.getUTCFullYear()%1e4,t,4)}function JS(){return"+0000"}function If(){return"%"}function kf(e){return+e}function Pf(e){return Math.floor(+e/1e3)}var Lr,$f;tT({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 tT(e){return Lr=tS(e),$f=Lr.format,Lr.parse,Lr.utcFormat,Lr.utcParse,Lr}function eT(e){return new Date(e)}function nT(e){return e instanceof Date?+e:+new Date(+e)}function Nf(e,t,n,r,i,s,a,o,l,c){var u=ff(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),v=c("%I %p"),m=c("%a %d"),y=c("%b %d"),E=c("%B"),_=c("%Y");function S(b){return(l(b)<b?f:o(b)<b?p:a(b)<b?g:s(b)<b?v:r(b)<b?i(b)<b?m:y:n(b)<b?E:_)(b)}return u.invert=function(b){return new Date(d(b))},u.domain=function(b){return arguments.length?h(Array.from(b,nT)):h().map(eT)},u.ticks=function(b){var M=h();return e(M[0],M[M.length-1],b??10)},u.tickFormat=function(b,M){return M==null?S:c(M)},u.nice=function(b){var M=h();return(!b||typeof b.range!="function")&&(b=t(M[0],M[M.length-1],b??10)),b?h(gf(M,b)):u},u.copy=function(){return Pl(u,Nf(e,t,n,r,i,s,a,o,l,c))},u}function Uf(){return Or.apply(Nf(Q_,J_,pn,zl,ga,Ii,Gl,Hl,Ar,$f).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ut(e){return function(){return e}}const Bf=Math.abs,Qt=Math.atan2,Zn=Math.cos,rT=Math.max,ql=Math.min,Ke=Math.sin,Rr=Math.sqrt,Jt=1e-12,Ni=Math.PI,ya=Ni/2,Ea=2*Ni;function iT(e){return e>1?0:e<-1?Ni:Math.acos(e)}function Ff(e){return e>=1?ya:e<=-1?-ya:Math.asin(e)}function xa(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new wx(t)}function sT(e){return e.innerRadius}function aT(e){return e.outerRadius}function oT(e){return e.startAngle}function lT(e){return e.endAngle}function cT(e){return e&&e.padAngle}function uT(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,d=o-s,h=d*l-u*c;if(!(h*h<Jt))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function ba(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/Rr(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,g=r+d,v=(h+p)/2,m=(f+g)/2,y=p-h,E=g-f,_=y*y+E*E,S=i-s,b=h*g-p*f,M=(E<0?-1:1)*Rr(rT(0,S*S*_-b*b)),D=(b*E-y*M)/_,G=(-b*y-E*M)/_,I=(b*E+y*M)/_,w=(-b*y+E*M)/_,C=D-v,R=G-m,P=I-v,O=w-m;return C*C+R*R>P*P+O*O&&(D=I,G=w),{cx:D,cy:G,x01:-u,y01:-d,x11:D*(i/S-1),y11:G*(i/S-1)}}function Ui(){var e=sT,t=aT,n=ut(0),r=null,i=oT,s=lT,a=cT,o=null,l=xa(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-ya,g=s.apply(this,arguments)-ya,v=Bf(g-p),m=g>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>Jt))o.moveTo(0,0);else if(v>Ea-Jt)o.moveTo(f*Zn(p),f*Ke(p)),o.arc(0,0,f,p,g,!m),h>Jt&&(o.moveTo(h*Zn(g),h*Ke(g)),o.arc(0,0,h,g,p,m));else{var y=p,E=g,_=p,S=g,b=v,M=v,D=a.apply(this,arguments)/2,G=D>Jt&&(r?+r.apply(this,arguments):Rr(h*h+f*f)),I=ql(Bf(f-h)/2,+n.apply(this,arguments)),w=I,C=I,R,P;if(G>Jt){var O=Ff(G/h*Ke(D)),H=Ff(G/f*Ke(D));(b-=O*2)>Jt?(O*=m?1:-1,_+=O,S-=O):(b=0,_=S=(p+g)/2),(M-=H*2)>Jt?(H*=m?1:-1,y+=H,E-=H):(M=0,y=E=(p+g)/2)}var B=f*Zn(y),U=f*Ke(y),N=h*Zn(S),j=h*Ke(S);if(I>Jt){var Y=f*Zn(E),it=f*Ke(E),et=h*Zn(_),q=h*Ke(_),Q;if(v<Ni)if(Q=uT(B,U,et,q,Y,it,N,j)){var pt=B-Q[0],ot=U-Q[1],Tt=Y-Q[0],Z=it-Q[1],F=1/Ke(iT((pt*Tt+ot*Z)/(Rr(pt*pt+ot*ot)*Rr(Tt*Tt+Z*Z)))/2),V=Rr(Q[0]*Q[0]+Q[1]*Q[1]);w=ql(I,(h-V)/(F-1)),C=ql(I,(f-V)/(F+1))}else w=C=0}M>Jt?C>Jt?(R=ba(et,q,B,U,f,C,m),P=ba(Y,it,N,j,f,C,m),o.moveTo(R.cx+R.x01,R.cy+R.y01),C<I?o.arc(R.cx,R.cy,C,Qt(R.y01,R.x01),Qt(P.y01,P.x01),!m):(o.arc(R.cx,R.cy,C,Qt(R.y01,R.x01),Qt(R.y11,R.x11),!m),o.arc(0,0,f,Qt(R.cy+R.y11,R.cx+R.x11),Qt(P.cy+P.y11,P.cx+P.x11),!m),o.arc(P.cx,P.cy,C,Qt(P.y11,P.x11),Qt(P.y01,P.x01),!m))):(o.moveTo(B,U),o.arc(0,0,f,y,E,!m)):o.moveTo(B,U),!(h>Jt)||!(b>Jt)?o.lineTo(N,j):w>Jt?(R=ba(N,j,Y,it,h,-w,m),P=ba(B,U,et,q,h,-w,m),o.lineTo(R.cx+R.x01,R.cy+R.y01),w<I?o.arc(R.cx,R.cy,w,Qt(R.y01,R.x01),Qt(P.y01,P.x01),!m):(o.arc(R.cx,R.cy,w,Qt(R.y01,R.x01),Qt(R.y11,R.x11),!m),o.arc(0,0,h,Qt(R.cy+R.y11,R.cx+R.x11),Qt(P.cy+P.y11,P.cx+P.x11),m),o.arc(P.cx,P.cy,w,Qt(P.y11,P.x11),Qt(P.y01,P.x01),!m))):o.arc(0,0,h,S,_,m)}if(o.closePath(),u)return o=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-Ni/2;return[Zn(d)*u,Ke(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ut(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ut(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ut(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ut(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:ut(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:ut(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ut(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var hT=Array.prototype.slice;function _a(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Hf(e){this._context=e}Hf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sa(e){return new Hf(e)}function Xl(e){return e[0]}function jl(e){return e[1]}function Bi(e,t){var n=ut(!0),r=null,i=Sa,s=null,a=xa(o);e=typeof e=="function"?e:e===void 0?Xl:ut(e),t=typeof t=="function"?t:t===void 0?jl:ut(t);function o(l){var c,u=(l=_a(l)).length,d,h=!1,f;for(r==null&&(s=i(f=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,c,l),+t(d,c,l));if(f)return s=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:ut(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:ut(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ut(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(s=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=s=null:s=i(r=l),o):r},o}function Zl(e,t,n){var r=null,i=ut(!0),s=null,a=Sa,o=null,l=xa(c);e=typeof e=="function"?e:e===void 0?Xl:ut(+e),t=typeof t=="function"?t:ut(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?jl:ut(+n);function c(d){var h,f,p,g=(d=_a(d)).length,v,m=!1,y,E=new Array(g),_=new Array(g);for(s==null&&(o=a(y=l())),h=0;h<=g;++h){if(!(h<g&&i(v=d[h],h,d))===m)if(m=!m)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(E[p],_[p]);o.lineEnd(),o.areaEnd()}m&&(E[h]=+e(v,h,d),_[h]=+t(v,h,d),o.point(r?+r(v,h,d):E[h],n?+n(v,h,d):_[h]))}if(y)return o=null,y+""||null}function u(){return Bi().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:ut(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ut(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ut(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:ut(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ut(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ut(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ut(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),c):a},c.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),c):s},c}function dT(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function fT(e){return e}function pT(){var e=fT,t=dT,n=null,r=ut(0),i=ut(Ea),s=ut(0);function a(o){var l,c=(o=_a(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),g=+r.apply(this,arguments),v=Math.min(Ea,Math.max(-Ea,i.apply(this,arguments)-g)),m,y=Math.min(Math.abs(v)/c,s.apply(this,arguments)),E=y*(v<0?-1:1),_;for(l=0;l<c;++l)(_=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=_);for(t!=null?f.sort(function(S,b){return t(p[S],p[b])}):n!=null&&f.sort(function(S,b){return n(o[S],o[b])}),l=0,d=h?(v-c*E)/h:0;l<c;++l,g=m)u=f[l],_=p[u],m=g+(_>0?_*d:0)+E,p[u]={data:o[u],index:l,value:_,startAngle:g,endAngle:m,padAngle:y};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:ut(+o),a):e},a.sortValues=function(o){return arguments.length?(t=o,n=null,a):t},a.sort=function(o){return arguments.length?(n=o,t=null,a):n},a.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:ut(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:ut(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:ut(+o),a):s},a}var gT=Vf(Sa);function Gf(e){this._curve=e}Gf.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Vf(e){function t(n){return new Gf(e(n))}return t._curve=e,t}function mT(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Vf(n)):t()._curve},e}function vT(){return mT(Bi().curve(gT))}class yT{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function ET(e){return new yT(e,!0)}function xT(e){return e.source}function bT(e){return e.target}function _T(e){let t=xT,n=bT,r=Xl,i=jl,s=null,a=null,o=xa(l);function l(){let c;const u=hT.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=d,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),c)return a=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:ut(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:ut(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function ST(){return _T(ET)}function Dn(){}function Ta(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wa(e){this._context=e}wa.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:Ta(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ta(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TT(e){return new wa(e)}function zf(e){this._context=e}zf.prototype={areaStart:Dn,areaEnd:Dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ta(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wT(e){return new zf(e)}function Wf(e){this._context=e}Wf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ta(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function OT(e){return new Wf(e)}function Yf(e,t){this._basis=new wa(e),this._beta=t}Yf.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],s=e[n]-r,a=t[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*s),this._beta*t[o]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const MT=function e(t){function n(r){return t===1?new wa(r):new Yf(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Oa(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Kl(e,t){this._context=e,this._k=(1-t)/6}Kl.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:Oa(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Oa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const AT=function e(t){function n(r){return new Kl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ql(e,t){this._context=e,this._k=(1-t)/6}Ql.prototype={areaStart:Dn,areaEnd:Dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Oa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CT=function e(t){function n(r){return new Ql(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Jl(e,t){this._context=e,this._k=(1-t)/6}Jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Oa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const DT=function e(t){function n(r){return new Jl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function tc(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Jt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Jt){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,s,a,e._x2,e._y2)}function qf(e,t){this._context=e,this._alpha=t}qf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:tc(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const LT=function e(t){function n(r){return t?new qf(r,t):new Kl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Xf(e,t){this._context=e,this._alpha=t}Xf.prototype={areaStart:Dn,areaEnd:Dn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:tc(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const RT=function e(t){function n(r){return t?new Xf(r,t):new Ql(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function jf(e,t){this._context=e,this._alpha=t}jf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:tc(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const IT=function e(t){function n(r){return t?new jf(r,t):new Jl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Zf(e){this._context=e}Zf.prototype={areaStart:Dn,areaEnd:Dn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Kf(e){return new Zf(e)}function Qf(e){return e<0?-1:1}function Jf(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(Qf(s)+Qf(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function tp(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ec(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function Ma(e){this._context=e}Ma.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:ec(this,this._t0,tp(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ec(this,tp(this,n=Jf(this,e,t)),n);break;default:ec(this,this._t0,n=Jf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ep(e){this._context=new np(e)}(ep.prototype=Object.create(Ma.prototype)).point=function(e,t){Ma.prototype.point.call(this,t,e)};function np(e){this._context=e}np.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function kT(e){return new Ma(e)}function PT(e){return new ep(e)}function rp(e){this._context=e}rp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=ip(e),i=ip(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ip(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function $T(e){return new rp(e)}function Aa(e,t){this._context=e,this._t=t}Aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function NT(e){return new Aa(e,.5)}function UT(e){return new Aa(e,0)}function BT(e){return new Aa(e,1)}function sp(e,t){if((a=e.length)>1)for(var n=1,r,i,s=e[t[0]],a,o=s.length;n<a;++n)for(i=s,s=e[t[n]],r=0;r<o;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ap(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function FT(e,t){return e[t]}function HT(e){const t=[];return t.key=e,t}function nc(){var e=ut([]),t=ap,n=sp,r=FT;function i(s){var a=Array.from(e.apply(this,arguments),HT),o,l=a.length,c=-1,u;for(const d of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(d,a[o].key,c,s)]).data=d;for(o=0,u=_a(t(a));o<l;++o)a[u[o]].index=o;return n(a,u),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:ut(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:ut(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?ap:typeof s=="function"?s:ut(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??sp,i):n},i}function GT(e,t){if((l=e.length)>0)for(var n,r=0,i,s,a,o,l,c=e[t[0]].length;r<c;++r)for(a=o=0,n=0;n<l;++n)(s=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=s):s<0?(i[1]=o,i[0]=o+=s):(i[0]=0,i[1]=s)}function Fi(e,t,n){this.k=e,this.x=t,this.y=n}Fi.prototype={constructor:Fi,scale:function(e){return e===1?this:new Fi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Fi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Fi.prototype;var VT=typeof global=="object"&&global&&global.Object===Object&&global;const op=VT;var zT=typeof self=="object"&&self&&self.Object===Object&&self,WT=op||zT||Function("return this")();const Be=WT;var YT=Be.Symbol;const Oe=YT;var lp=Object.prototype,qT=lp.hasOwnProperty,XT=lp.toString,Hi=Oe?Oe.toStringTag:void 0;function jT(e){var t=qT.call(e,Hi),n=e[Hi];try{e[Hi]=void 0;var r=!0}catch{}var i=XT.call(e);return r&&(t?e[Hi]=n:delete e[Hi]),i}var ZT=Object.prototype,KT=ZT.toString;function QT(e){return KT.call(e)}var JT="[object Null]",tw="[object Undefined]",cp=Oe?Oe.toStringTag:void 0;function Kn(e){return e==null?e===void 0?tw:JT:cp&&cp in Object(e)?jT(e):QT(e)}function Qe(e){return e!=null&&typeof e=="object"}var ew="[object Symbol]";function Ca(e){return typeof e=="symbol"||Qe(e)&&Kn(e)==ew}function up(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var nw=Array.isArray;const qt=nw;var rw=1/0,hp=Oe?Oe.prototype:void 0,dp=hp?hp.toString:void 0;function fp(e){if(typeof e=="string")return e;if(qt(e))return up(e,fp)+"";if(Ca(e))return dp?dp.call(e):"";var t=e+"";return t=="0"&&1/e==-rw?"-0":t}var iw=/\s/;function sw(e){for(var t=e.length;t--&&iw.test(e.charAt(t)););return t}var aw=/^\s+/;function ow(e){return e&&e.slice(0,sw(e)+1).replace(aw,"")}function Me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pp=NaN,lw=/^[-+]0x[0-9a-f]+$/i,cw=/^0b[01]+$/i,uw=/^0o[0-7]+$/i,hw=parseInt;function Gi(e){if(typeof e=="number")return e;if(Ca(e))return pp;if(Me(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Me(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ow(e);var n=cw.test(e);return n||uw.test(e)?hw(e.slice(2),n?2:8):lw.test(e)?pp:+e}function rc(e){return e}var dw="[object AsyncFunction]",fw="[object Function]",pw="[object GeneratorFunction]",gw="[object Proxy]";function ic(e){if(!Me(e))return!1;var t=Kn(e);return t==fw||t==pw||t==dw||t==gw}var mw=Be["__core-js_shared__"];const sc=mw;var gp=function(){var e=/[^.]+$/.exec(sc&&sc.keys&&sc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function vw(e){return!!gp&&gp in e}var yw=Function.prototype,Ew=yw.toString;function Qn(e){if(e!=null){try{return Ew.call(e)}catch{}try{return e+""}catch{}}return""}var xw=/[\\^$.*+?()[\]{}|]/g,bw=/^\[object .+?Constructor\]$/,_w=Function.prototype,Sw=Object.prototype,Tw=_w.toString,ww=Sw.hasOwnProperty,Ow=RegExp("^"+Tw.call(ww).replace(xw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mw(e){if(!Me(e)||vw(e))return!1;var t=ic(e)?Ow:bw;return t.test(Qn(e))}function Aw(e,t){return e==null?void 0:e[t]}function Jn(e,t){var n=Aw(e,t);return Mw(n)?n:void 0}var Cw=Jn(Be,"WeakMap");const ac=Cw;var mp=Object.create,Dw=function(){function e(){}return function(t){if(!Me(t))return{};if(mp)return mp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Lw=Dw;function Rw(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Iw(){}function vp(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var kw=800,Pw=16,$w=Date.now;function Nw(e){var t=0,n=0;return function(){var r=$w(),i=Pw-(r-n);if(n=r,i>0){if(++t>=kw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Uw(e){return function(){return e}}var Bw=function(){try{var e=Jn(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Da=Bw;var Fw=Da?function(e,t){return Da(e,"toString",{configurable:!0,enumerable:!1,value:Uw(t),writable:!0})}:rc,Hw=Nw(Fw);const Gw=Hw;function Vw(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function zw(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Ww(e){return e!==e}function Yw(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function qw(e,t,n){return t===t?Yw(e,t,n):zw(e,Ww,n)}function Xw(e,t){var n=e==null?0:e.length;return!!n&&qw(e,t,0)>-1}var jw=9007199254740991,Zw=/^(?:0|[1-9]\d*)$/;function oc(e,t){var n=typeof e;return t=t??jw,!!t&&(n=="number"||n!="symbol"&&Zw.test(e))&&e>-1&&e%1==0&&e<t}function La(e,t,n){t=="__proto__"&&Da?Da(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Vi(e,t){return e===t||e!==e&&t!==t}var Kw=Object.prototype,Qw=Kw.hasOwnProperty;function yp(e,t,n){var r=e[t];(!(Qw.call(e,t)&&Vi(r,n))||n===void 0&&!(t in e))&&La(e,t,n)}function zi(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=r?r(n[o],e[o],o,n,e):void 0;l===void 0&&(l=e[o]),i?La(n,o,l):yp(n,o,l)}return n}var Ep=Math.max;function Jw(e,t,n){return t=Ep(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Ep(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),Rw(e,this,o)}}function xp(e,t){return Gw(Jw(e,t,rc),e+"")}var tO=9007199254740991;function lc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tO}function tr(e){return e!=null&&lc(e.length)&&!ic(e)}function bp(e,t,n){if(!Me(n))return!1;var r=typeof t;return(r=="number"?tr(n)&&oc(t,n.length):r=="string"&&t in n)?Vi(n[t],e):!1}function eO(e){return xp(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&bp(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,s)}return t})}var nO=Object.prototype;function Ra(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||nO;return e===n}function rO(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var iO="[object Arguments]";function _p(e){return Qe(e)&&Kn(e)==iO}var Sp=Object.prototype,sO=Sp.hasOwnProperty,aO=Sp.propertyIsEnumerable,oO=_p(function(){return arguments}())?_p:function(e){return Qe(e)&&sO.call(e,"callee")&&!aO.call(e,"callee")};const Ir=oO;function lO(){return!1}var Tp=typeof W=="object"&&W&&!W.nodeType&&W,wp=Tp&&typeof module=="object"&&module&&!module.nodeType&&module,cO=wp&&wp.exports===Tp,Op=cO?Be.Buffer:void 0,uO=Op?Op.isBuffer:void 0,hO=uO||lO;const kr=hO;var dO="[object Arguments]",fO="[object Array]",pO="[object Boolean]",gO="[object Date]",mO="[object Error]",vO="[object Function]",yO="[object Map]",EO="[object Number]",xO="[object Object]",bO="[object RegExp]",_O="[object Set]",SO="[object String]",TO="[object WeakMap]",wO="[object ArrayBuffer]",OO="[object DataView]",MO="[object Float32Array]",AO="[object Float64Array]",CO="[object Int8Array]",DO="[object Int16Array]",LO="[object Int32Array]",RO="[object Uint8Array]",IO="[object Uint8ClampedArray]",kO="[object Uint16Array]",PO="[object Uint32Array]",Lt={};Lt[MO]=Lt[AO]=Lt[CO]=Lt[DO]=Lt[LO]=Lt[RO]=Lt[IO]=Lt[kO]=Lt[PO]=!0,Lt[dO]=Lt[fO]=Lt[wO]=Lt[pO]=Lt[OO]=Lt[gO]=Lt[mO]=Lt[vO]=Lt[yO]=Lt[EO]=Lt[xO]=Lt[bO]=Lt[_O]=Lt[SO]=Lt[TO]=!1;function $O(e){return Qe(e)&&lc(e.length)&&!!Lt[Kn(e)]}function cc(e){return function(t){return e(t)}}var Mp=typeof W=="object"&&W&&!W.nodeType&&W,Wi=Mp&&typeof module=="object"&&module&&!module.nodeType&&module,NO=Wi&&Wi.exports===Mp,uc=NO&&op.process,UO=function(){try{var e=Wi&&Wi.require&&Wi.require("util").types;return e||uc&&uc.binding&&uc.binding("util")}catch{}}();const Pr=UO;var Ap=Pr&&Pr.isTypedArray,BO=Ap?cc(Ap):$O;const Ia=BO;var FO=Object.prototype,HO=FO.hasOwnProperty;function Cp(e,t){var n=qt(e),r=!n&&Ir(e),i=!n&&!r&&kr(e),s=!n&&!r&&!i&&Ia(e),a=n||r||i||s,o=a?rO(e.length,String):[],l=o.length;for(var c in e)(t||HO.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||oc(c,l)))&&o.push(c);return o}function Dp(e,t){return function(n){return e(t(n))}}var GO=Dp(Object.keys,Object);const VO=GO;var zO=Object.prototype,WO=zO.hasOwnProperty;function Lp(e){if(!Ra(e))return VO(e);var t=[];for(var n in Object(e))WO.call(e,n)&&n!="constructor"&&t.push(n);return t}function Yi(e){return tr(e)?Cp(e):Lp(e)}function YO(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var qO=Object.prototype,XO=qO.hasOwnProperty;function jO(e){if(!Me(e))return YO(e);var t=Ra(e),n=[];for(var r in e)r=="constructor"&&(t||!XO.call(e,r))||n.push(r);return n}function qi(e){return tr(e)?Cp(e,!0):jO(e)}var ZO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,KO=/^\w*$/;function hc(e,t){if(qt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ca(e)?!0:KO.test(e)||!ZO.test(e)||t!=null&&e in Object(t)}var QO=Jn(Object,"create");const Xi=QO;function JO(){this.__data__=Xi?Xi(null):{},this.size=0}function tM(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var eM="__lodash_hash_undefined__",nM=Object.prototype,rM=nM.hasOwnProperty;function iM(e){var t=this.__data__;if(Xi){var n=t[e];return n===eM?void 0:n}return rM.call(t,e)?t[e]:void 0}var sM=Object.prototype,aM=sM.hasOwnProperty;function oM(e){var t=this.__data__;return Xi?t[e]!==void 0:aM.call(t,e)}var lM="__lodash_hash_undefined__";function cM(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xi&&t===void 0?lM:t,this}function er(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}er.prototype.clear=JO,er.prototype.delete=tM,er.prototype.get=iM,er.prototype.has=oM,er.prototype.set=cM;function uM(){this.__data__=[],this.size=0}function ka(e,t){for(var n=e.length;n--;)if(Vi(e[n][0],t))return n;return-1}var hM=Array.prototype,dM=hM.splice;function fM(e){var t=this.__data__,n=ka(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():dM.call(t,n,1),--this.size,!0}function pM(e){var t=this.__data__,n=ka(t,e);return n<0?void 0:t[n][1]}function gM(e){return ka(this.__data__,e)>-1}function mM(e,t){var n=this.__data__,r=ka(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function gn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}gn.prototype.clear=uM,gn.prototype.delete=fM,gn.prototype.get=pM,gn.prototype.has=gM,gn.prototype.set=mM;var vM=Jn(Be,"Map");const ji=vM;function yM(){this.size=0,this.__data__={hash:new er,map:new(ji||gn),string:new er}}function EM(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pa(e,t){var n=e.__data__;return EM(t)?n[typeof t=="string"?"string":"hash"]:n.map}function xM(e){var t=Pa(this,e).delete(e);return this.size-=t?1:0,t}function bM(e){return Pa(this,e).get(e)}function _M(e){return Pa(this,e).has(e)}function SM(e,t){var n=Pa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function mn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mn.prototype.clear=yM,mn.prototype.delete=xM,mn.prototype.get=bM,mn.prototype.has=_M,mn.prototype.set=SM;var TM="Expected a function";function dc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(TM);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(dc.Cache||mn),n}dc.Cache=mn;var wM=500;function OM(e){var t=dc(e,function(r){return n.size===wM&&n.clear(),r}),n=t.cache;return t}var MM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AM=/\\(\\)?/g,CM=OM(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(MM,function(n,r,i,s){t.push(i?s.replace(AM,"$1"):r||n)}),t});const DM=CM;function Zi(e){return e==null?"":fp(e)}function Rp(e,t){return qt(e)?e:hc(e,t)?[e]:DM(Zi(e))}var LM=1/0;function $a(e){if(typeof e=="string"||Ca(e))return e;var t=e+"";return t=="0"&&1/e==-LM?"-0":t}function Ip(e,t){t=Rp(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[$a(t[n++])];return n&&n==r?e:void 0}function Mt(e,t,n){var r=e==null?void 0:Ip(e,t);return r===void 0?n:r}function fc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var kp=Oe?Oe.isConcatSpreadable:void 0;function RM(e){return qt(e)||Ir(e)||!!(kp&&e&&e[kp])}function Na(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=RM),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Na(o,t-1,n,r,i):fc(i,o):r||(i[i.length]=o)}return i}function Pp(e){var t=e==null?0:e.length;return t?Na(e,1):[]}var IM=Dp(Object.getPrototypeOf,Object);const pc=IM;var kM="[object Object]",PM=Function.prototype,$M=Object.prototype,$p=PM.toString,NM=$M.hasOwnProperty,UM=$p.call(Object);function BM(e){if(!Qe(e)||Kn(e)!=kM)return!1;var t=pc(e);if(t===null)return!0;var n=NM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$p.call(n)==UM}function FM(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function HM(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:FM(e,t,n)}var GM="\\ud800-\\udfff",VM="\\u0300-\\u036f",zM="\\ufe20-\\ufe2f",WM="\\u20d0-\\u20ff",YM=VM+zM+WM,qM="\\ufe0e\\ufe0f",XM="\\u200d",jM=RegExp("["+XM+GM+YM+qM+"]");function Np(e){return jM.test(e)}function ZM(e){return e.split("")}var Up="\\ud800-\\udfff",KM="\\u0300-\\u036f",QM="\\ufe20-\\ufe2f",JM="\\u20d0-\\u20ff",tA=KM+QM+JM,eA="\\ufe0e\\ufe0f",nA="["+Up+"]",gc="["+tA+"]",mc="\\ud83c[\\udffb-\\udfff]",rA="(?:"+gc+"|"+mc+")",Bp="[^"+Up+"]",Fp="(?:\\ud83c[\\udde6-\\uddff]){2}",Hp="[\\ud800-\\udbff][\\udc00-\\udfff]",iA="\\u200d",Gp=rA+"?",Vp="["+eA+"]?",sA="(?:"+iA+"(?:"+[Bp,Fp,Hp].join("|")+")"+Vp+Gp+")*",aA=Vp+Gp+sA,oA="(?:"+[Bp+gc+"?",gc,Fp,Hp,nA].join("|")+")",lA=RegExp(mc+"(?="+mc+")|"+oA+aA,"g");function cA(e){return e.match(lA)||[]}function uA(e){return Np(e)?cA(e):ZM(e)}function hA(e){return function(t){t=Zi(t);var n=Np(t)?uA(t):void 0,r=n?n[0]:t.charAt(0),i=n?HM(n,1).join(""):t.slice(1);return r[e]()+i}}var dA=hA("toUpperCase");const fA=dA;function pA(e){return fA(Zi(e).toLowerCase())}function gA(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function mA(e){return function(t){return e==null?void 0:e[t]}}var vA={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},yA=mA(vA);const EA=yA;var xA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bA="\\u0300-\\u036f",_A="\\ufe20-\\ufe2f",SA="\\u20d0-\\u20ff",TA=bA+_A+SA,wA="["+TA+"]",OA=RegExp(wA,"g");function MA(e){return e=Zi(e),e&&e.replace(xA,EA).replace(OA,"")}var AA=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function CA(e){return e.match(AA)||[]}var DA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function LA(e){return DA.test(e)}var zp="\\ud800-\\udfff",RA="\\u0300-\\u036f",IA="\\ufe20-\\ufe2f",kA="\\u20d0-\\u20ff",PA=RA+IA+kA,Wp="\\u2700-\\u27bf",Yp="a-z\\xdf-\\xf6\\xf8-\\xff",$A="\\xac\\xb1\\xd7\\xf7",NA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",UA="\\u2000-\\u206f",BA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qp="A-Z\\xc0-\\xd6\\xd8-\\xde",FA="\\ufe0e\\ufe0f",Xp=$A+NA+UA+BA,jp="['’]",Zp="["+Xp+"]",HA="["+PA+"]",Kp="\\d+",GA="["+Wp+"]",Qp="["+Yp+"]",Jp="[^"+zp+Xp+Kp+Wp+Yp+qp+"]",VA="\\ud83c[\\udffb-\\udfff]",zA="(?:"+HA+"|"+VA+")",WA="[^"+zp+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",eg="[\\ud800-\\udbff][\\udc00-\\udfff]",$r="["+qp+"]",YA="\\u200d",ng="(?:"+Qp+"|"+Jp+")",qA="(?:"+$r+"|"+Jp+")",rg="(?:"+jp+"(?:d|ll|m|re|s|t|ve))?",ig="(?:"+jp+"(?:D|LL|M|RE|S|T|VE))?",sg=zA+"?",ag="["+FA+"]?",XA="(?:"+YA+"(?:"+[WA,tg,eg].join("|")+")"+ag+sg+")*",jA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ZA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",KA=ag+sg+XA,QA="(?:"+[GA,tg,eg].join("|")+")"+KA,JA=RegExp([$r+"?"+Qp+"+"+rg+"(?="+[Zp,$r,"$"].join("|")+")",qA+"+"+ig+"(?="+[Zp,$r+ng,"$"].join("|")+")",$r+"?"+ng+"+"+rg,$r+"+"+ig,ZA,jA,Kp,QA].join("|"),"g");function tC(e){return e.match(JA)||[]}function eC(e,t,n){return e=Zi(e),t=n?void 0:t,t===void 0?LA(e)?tC(e):CA(e):e.match(t)||[]}var nC="['’]",rC=RegExp(nC,"g");function og(e){return function(t){return gA(eC(MA(t).replace(rC,"")),e,"")}}var iC=og(function(e,t,n){return t=t.toLowerCase(),e+(n?pA(t):t)});const sC=iC;function aC(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function lg(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Gi(n),n=n===n?n:0),t!==void 0&&(t=Gi(t),t=t===t?t:0),aC(Gi(e),t,n)}function oC(){this.__data__=new gn,this.size=0}function lC(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cC(e){return this.__data__.get(e)}function uC(e){return this.__data__.has(e)}var hC=200;function dC(e,t){var n=this.__data__;if(n instanceof gn){var r=n.__data__;if(!ji||r.length<hC-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mn(r)}return n.set(e,t),this.size=n.size,this}function Fe(e){var t=this.__data__=new gn(e);this.size=t.size}Fe.prototype.clear=oC,Fe.prototype.delete=lC,Fe.prototype.get=cC,Fe.prototype.has=uC,Fe.prototype.set=dC;function fC(e,t){return e&&zi(t,Yi(t),e)}function pC(e,t){return e&&zi(t,qi(t),e)}var cg=typeof W=="object"&&W&&!W.nodeType&&W,ug=cg&&typeof module=="object"&&module&&!module.nodeType&&module,gC=ug&&ug.exports===cg,hg=gC?Be.Buffer:void 0,dg=hg?hg.allocUnsafe:void 0;function fg(e,t){if(t)return e.slice();var n=e.length,r=dg?dg(n):new e.constructor(n);return e.copy(r),r}function mC(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function pg(){return[]}var vC=Object.prototype,yC=vC.propertyIsEnumerable,gg=Object.getOwnPropertySymbols,EC=gg?function(e){return e==null?[]:(e=Object(e),mC(gg(e),function(t){return yC.call(e,t)}))}:pg;const vc=EC;function xC(e,t){return zi(e,vc(e),t)}var bC=Object.getOwnPropertySymbols,_C=bC?function(e){for(var t=[];e;)fc(t,vc(e)),e=pc(e);return t}:pg;const mg=_C;function SC(e,t){return zi(e,mg(e),t)}function vg(e,t,n){var r=t(e);return qt(e)?r:fc(r,n(e))}function yc(e){return vg(e,Yi,vc)}function TC(e){return vg(e,qi,mg)}var wC=Jn(Be,"DataView");const Ec=wC;var OC=Jn(Be,"Promise");const xc=OC;var MC=Jn(Be,"Set");const Nr=MC;var yg="[object Map]",AC="[object Object]",Eg="[object Promise]",xg="[object Set]",bg="[object WeakMap]",_g="[object DataView]",CC=Qn(Ec),DC=Qn(ji),LC=Qn(xc),RC=Qn(Nr),IC=Qn(ac),nr=Kn;(Ec&&nr(new Ec(new ArrayBuffer(1)))!=_g||ji&&nr(new ji)!=yg||xc&&nr(xc.resolve())!=Eg||Nr&&nr(new Nr)!=xg||ac&&nr(new ac)!=bg)&&(nr=function(e){var t=Kn(e),n=t==AC?e.constructor:void 0,r=n?Qn(n):"";if(r)switch(r){case CC:return _g;case DC:return yg;case LC:return Eg;case RC:return xg;case IC:return bg}return t});const Ur=nr;var kC=Object.prototype,PC=kC.hasOwnProperty;function $C(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&PC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var NC=Be.Uint8Array;const Ua=NC;function bc(e){var t=new e.constructor(e.byteLength);return new Ua(t).set(new Ua(e)),t}function UC(e,t){var n=t?bc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var BC=/\w*$/;function FC(e){var t=new e.constructor(e.source,BC.exec(e));return t.lastIndex=e.lastIndex,t}var Sg=Oe?Oe.prototype:void 0,Tg=Sg?Sg.valueOf:void 0;function HC(e){return Tg?Object(Tg.call(e)):{}}function wg(e,t){var n=t?bc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var GC="[object Boolean]",VC="[object Date]",zC="[object Map]",WC="[object Number]",YC="[object RegExp]",qC="[object Set]",XC="[object String]",jC="[object Symbol]",ZC="[object ArrayBuffer]",KC="[object DataView]",QC="[object Float32Array]",JC="[object Float64Array]",tD="[object Int8Array]",eD="[object Int16Array]",nD="[object Int32Array]",rD="[object Uint8Array]",iD="[object Uint8ClampedArray]",sD="[object Uint16Array]",aD="[object Uint32Array]";function oD(e,t,n){var r=e.constructor;switch(t){case ZC:return bc(e);case GC:case VC:return new r(+e);case KC:return UC(e,n);case QC:case JC:case tD:case eD:case nD:case rD:case iD:case sD:case aD:return wg(e,n);case zC:return new r;case WC:case XC:return new r(e);case YC:return FC(e);case qC:return new r;case jC:return HC(e)}}function Og(e){return typeof e.constructor=="function"&&!Ra(e)?Lw(pc(e)):{}}var lD="[object Map]";function cD(e){return Qe(e)&&Ur(e)==lD}var Mg=Pr&&Pr.isMap,uD=Mg?cc(Mg):cD;const hD=uD;var dD="[object Set]";function fD(e){return Qe(e)&&Ur(e)==dD}var Ag=Pr&&Pr.isSet,pD=Ag?cc(Ag):fD;const gD=pD;var mD=1,vD=2,yD=4,Cg="[object Arguments]",ED="[object Array]",xD="[object Boolean]",bD="[object Date]",_D="[object Error]",Dg="[object Function]",SD="[object GeneratorFunction]",TD="[object Map]",wD="[object Number]",Lg="[object Object]",OD="[object RegExp]",MD="[object Set]",AD="[object String]",CD="[object Symbol]",DD="[object WeakMap]",LD="[object ArrayBuffer]",RD="[object DataView]",ID="[object Float32Array]",kD="[object Float64Array]",PD="[object Int8Array]",$D="[object Int16Array]",ND="[object Int32Array]",UD="[object Uint8Array]",BD="[object Uint8ClampedArray]",FD="[object Uint16Array]",HD="[object Uint32Array]",At={};At[Cg]=At[ED]=At[LD]=At[RD]=At[xD]=At[bD]=At[ID]=At[kD]=At[PD]=At[$D]=At[ND]=At[TD]=At[wD]=At[Lg]=At[OD]=At[MD]=At[AD]=At[CD]=At[UD]=At[BD]=At[FD]=At[HD]=!0,At[_D]=At[Dg]=At[DD]=!1;function Ba(e,t,n,r,i,s){var a,o=t&mD,l=t&vD,c=t&yD;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!Me(e))return e;var u=qt(e);if(u){if(a=$C(e),!o)return vp(e,a)}else{var d=Ur(e),h=d==Dg||d==SD;if(kr(e))return fg(e,o);if(d==Lg||d==Cg||h&&!i){if(a=l||h?{}:Og(e),!o)return l?SC(e,pC(a,e)):xC(e,fC(a,e))}else{if(!At[d])return i?e:{};a=oD(e,d,o)}}s||(s=new Fe);var f=s.get(e);if(f)return f;s.set(e,a),gD(e)?e.forEach(function(v){a.add(Ba(v,t,n,v,e,s))}):hD(e)&&e.forEach(function(v,m){a.set(m,Ba(v,t,n,m,e,s))});var p=c?l?TC:yc:l?qi:Yi,g=u?void 0:p(e);return Vw(g||e,function(v,m){g&&(m=v,v=e[m]),yp(a,m,Ba(v,t,n,m,e,s))}),a}var GD=1,VD=4;function vn(e){return Ba(e,GD|VD)}var zD="__lodash_hash_undefined__";function WD(e){return this.__data__.set(e,zD),this}function YD(e){return this.__data__.has(e)}function Ki(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mn;++t<n;)this.add(e[t])}Ki.prototype.add=Ki.prototype.push=WD,Ki.prototype.has=YD;function Rg(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Ig(e,t){return e.has(t)}var qD=1,XD=2;function kg(e,t,n,r,i,s){var a=n&qD,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&XD?new Ki:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var v=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(v!==void 0){if(v)continue;h=!1;break}if(f){if(!Rg(t,function(m,y){if(!Ig(f,y)&&(p===m||i(p,m,n,r,s)))return f.push(y)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function jD(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function _c(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var ZD=1,KD=2,QD="[object Boolean]",JD="[object Date]",tL="[object Error]",eL="[object Map]",nL="[object Number]",rL="[object RegExp]",iL="[object Set]",sL="[object String]",aL="[object Symbol]",oL="[object ArrayBuffer]",lL="[object DataView]",Pg=Oe?Oe.prototype:void 0,Sc=Pg?Pg.valueOf:void 0;function cL(e,t,n,r,i,s,a){switch(n){case lL:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oL:return!(e.byteLength!=t.byteLength||!s(new Ua(e),new Ua(t)));case QD:case JD:case nL:return Vi(+e,+t);case tL:return e.name==t.name&&e.message==t.message;case rL:case sL:return e==t+"";case eL:var o=jD;case iL:var l=r&ZD;if(o||(o=_c),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=KD,a.set(e,t);var u=kg(o(e),o(t),r,i,s,a);return a.delete(e),u;case aL:if(Sc)return Sc.call(e)==Sc.call(t)}return!1}var uL=1,hL=Object.prototype,dL=hL.hasOwnProperty;function fL(e,t,n,r,i,s){var a=n&uL,o=yc(e),l=o.length,c=yc(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:dL.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=a;++d<l;){h=o[d];var m=e[h],y=t[h];if(r)var E=a?r(y,m,h,t,e,s):r(m,y,h,e,t,s);if(!(E===void 0?m===y||i(m,y,n,r,s):E)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(g=!1)}return s.delete(e),s.delete(t),g}var pL=1,$g="[object Arguments]",Ng="[object Array]",Fa="[object Object]",gL=Object.prototype,Ug=gL.hasOwnProperty;function mL(e,t,n,r,i,s){var a=qt(e),o=qt(t),l=a?Ng:Ur(e),c=o?Ng:Ur(t);l=l==$g?Fa:l,c=c==$g?Fa:c;var u=l==Fa,d=c==Fa,h=l==c;if(h&&kr(e)){if(!kr(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Fe),a||Ia(e)?kg(e,t,n,r,i,s):cL(e,t,l,n,r,i,s);if(!(n&pL)){var f=u&&Ug.call(e,"__wrapped__"),p=d&&Ug.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,v=p?t.value():t;return s||(s=new Fe),i(g,v,n,r,s)}}return h?(s||(s=new Fe),fL(e,t,n,r,i,s)):!1}function Ha(e,t,n,r,i){return e===t?!0:e==null||t==null||!Qe(e)&&!Qe(t)?e!==e&&t!==t:mL(e,t,n,r,Ha,i)}var vL=1,yL=2;function EL(e,t,n,r){var i=n.length,s=i,a=!r;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var l=o[0],c=e[l],u=o[1];if(a&&o[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Fe;if(r)var h=r(c,u,l,e,t,d);if(!(h===void 0?Ha(u,c,vL|yL,r,d):h))return!1}}return!0}function Bg(e){return e===e&&!Me(e)}function xL(e){for(var t=Yi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Bg(i)]}return t}function Fg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function bL(e){var t=xL(e);return t.length==1&&t[0][2]?Fg(t[0][0],t[0][1]):function(n){return n===e||EL(n,e,t)}}function _L(e,t){return e!=null&&t in Object(e)}function SL(e,t,n){t=Rp(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=$a(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&lc(i)&&oc(a,i)&&(qt(e)||Ir(e)))}function TL(e,t){return e!=null&&SL(e,t,_L)}var wL=1,OL=2;function ML(e,t){return hc(e)&&Bg(t)?Fg($a(e),t):function(n){var r=Mt(n,e);return r===void 0&&r===t?TL(n,e):Ha(t,r,wL|OL)}}function AL(e){return function(t){return t==null?void 0:t[e]}}function CL(e){return function(t){return Ip(t,e)}}function DL(e){return hc(e)?AL($a(e)):CL(e)}function Ga(e){return typeof e=="function"?e:e==null?rc:typeof e=="object"?qt(e)?ML(e[0],e[1]):bL(e):DL(e)}function LL(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function RL(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[e?o:++i];if(n(s[l],l,s)===!1)break}return t}}var IL=RL();const Hg=IL;function kL(e,t){return e&&Hg(e,t,Yi)}function PL(e,t){return function(n,r){if(n==null)return n;if(!tr(n))return e(n,r);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s<i)&&r(a[s],s,a)!==!1;);return n}}var $L=PL(kL);const Tc=$L;function NL(e,t,n,r){return Tc(e,function(i,s,a){t(r,i,n(i),a)}),r}function UL(e,t){return function(n,r){var i=qt(n)?LL:NL,s=t?t():{};return i(n,e,Ga(r),s)}}var BL=function(){return Be.Date.now()};const wc=BL;var FL="Expected a function",HL=Math.max,GL=Math.min;function Va(e,t,n){var r,i,s,a,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(FL);t=Gi(t)||0,Me(n)&&(u=!!n.leading,d="maxWait"in n,s=d?HL(Gi(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(b){var M=r,D=i;return r=i=void 0,c=b,a=e.apply(D,M),a}function p(b){return c=b,o=setTimeout(m,t),u?f(b):a}function g(b){var M=b-l,D=b-c,G=t-M;return d?GL(G,s-D):G}function v(b){var M=b-l,D=b-c;return l===void 0||M>=t||M<0||d&&D>=s}function m(){var b=wc();if(v(b))return y(b);o=setTimeout(m,g(b))}function y(b){return o=void 0,h&&r?f(b):(r=i=void 0,a)}function E(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function _(){return o===void 0?a:y(wc())}function S(){var b=wc(),M=v(b);if(r=arguments,i=this,l=b,M){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(m,t),f(l)}return o===void 0&&(o=setTimeout(m,t)),a}return S.cancel=E,S.flush=_,S}function Oc(e,t,n){(n!==void 0&&!Vi(e[t],n)||n===void 0&&!(t in e))&&La(e,t,n)}function Mc(e){return Qe(e)&&tr(e)}function Ac(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function VL(e){return zi(e,qi(e))}function zL(e,t,n,r,i,s,a){var o=Ac(e,n),l=Ac(t,n),c=a.get(l);if(c){Oc(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=qt(l),f=!h&&kr(l),p=!h&&!f&&Ia(l);u=l,h||f||p?qt(o)?u=o:Mc(o)?u=vp(o):f?(d=!1,u=fg(l,!0)):p?(d=!1,u=wg(l,!0)):u=[]:BM(l)||Ir(l)?(u=o,Ir(o)?u=VL(o):(!Me(o)||ic(o))&&(u=Og(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),Oc(e,n,u)}function Gg(e,t,n,r,i){e!==t&&Hg(t,function(s,a){if(i||(i=new Fe),Me(s))zL(e,t,a,n,Gg,r,i);else{var o=r?r(Ac(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),Oc(e,a,o)}},qi)}function WL(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function YL(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function qL(e,t){var n=-1,r=tr(e)?Array(e.length):[];return Tc(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function XL(e,t){var n=qt(e)?up:qL;return n(e,Ga(t))}var jL=1/0;function ZL(e,t){return Na(XL(e,t),jL)}function KL(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}var QL=Object.prototype,JL=QL.hasOwnProperty,tR=UL(function(e,t,n){JL.call(e,n)?e[n].push(t):La(e,n,[t])});const eR=tR;var nR="[object Map]",rR="[object Set]",iR=Object.prototype,sR=iR.hasOwnProperty;function He(e){if(e==null)return!0;if(tr(e)&&(qt(e)||typeof e=="string"||typeof e.splice=="function"||kr(e)||Ia(e)||Ir(e)))return!e.length;var t=Ur(e);if(t==nR||t==rR)return!e.size;if(Ra(e))return!Lp(e).length;for(var n in e)if(sR.call(e,n))return!1;return!0}function Vg(e,t){return Ha(e,t)}var aR=og(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const Br=aR;var oR=eO(function(e,t,n){Gg(e,t,n)});const at=oR;function lR(e,t){var n;return Tc(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function cR(e,t,n){var r=qt(e)?Rg:lR;return n&&bp(e,t,n)&&(t=void 0),r(e,Ga(t))}var uR=1/0,hR=Nr&&1/_c(new Nr([,-0]))[1]==uR?function(e){return new Nr(e)}:Iw;const dR=hR;var fR=200;function zg(e,t,n){var r=-1,i=Xw,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=WL;else if(s>=fR){var c=t?null:dR(e);if(c)return _c(c);a=!1,i=Ig,l=new Ki}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var pR=xp(function(e){var t=YL(e);return Mc(t)&&(t=void 0),zg(Na(e,1,Mc,!0),Ga(t))});const gR=pR;function Qi(e){return e&&e.length?zg(e):[]}var Cc=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Cc||{}),Dc=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(Dc||{}),Lc=(e=>(e.UPDATE="model-update",e))(Lc||{}),Wg=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(Wg||{}),Rc=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(Rc||{}),Ic=(e=>(e.CHANGE="zoom-domain-change",e))(Ic||{}),kc=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(kc||{}),Pc=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(Pc||{}),$c=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))($c||{}),Nc=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(Nc||{}),Uc=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(Uc||{}),Bc=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(Bc||{}),Fc=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Fc||{}),Hc=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(Hc||{}),Gc=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Gc||{}),Vc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Vc||{}),zc=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(zc||{}),Wc=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Wc||{}),Yc=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Yc||{}),Fr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(Fr||{}),qc=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(qc||{}),Yg=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(Yg||{}),qg=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(qg||{}),Xg=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(Xg||{}),jg=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(jg||{}),Zg=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Zg||{}),Hr=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(Hr||{});const T=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Xg,Area:$c,Axis:Pc,Bar:Fc,Boxplot:Hc,CanvasZoom:kc,Chart:Cc,Choropleth:Hr,CirclePack:qg,Gauge:Bc,Heatmap:Zg,Legend:Yg,Line:Vc,Meter:jg,Modal:Dc,Model:Lc,Pie:Uc,Radar:zc,Scatter:Gc,Threshold:qc,Toolbar:Wg,Tooltip:Fr,Tree:Wc,Treemap:Yc,WordCloud:Nc,ZoomBar:Rc,ZoomDomain:Ic},Symbol.toStringTag,{value:"Module"}));var tt=(e=>(e.HTML="html",e.SVG="svg",e))(tt||{}),Xc=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Xc||{}),rt=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(rt||{}),z=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(z||{}),Ge=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Ge||{}),Ae=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Ae||{}),zt=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(zt||{}),K=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(K||{}),Gr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Gr||{}),Ut=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Ut||{}),Vr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Vr||{}),za=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(za||{}),wt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(wt||{}),lt=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(lt||{}),rr=(e=>(e.CENTER="center",e))(rr||{}),Ji=(e=>(e.LEFT="left",e.RIGHT="right",e))(Ji||{}),Bt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Bt||{}),Je=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(Je||{}),tn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(tn||{}),ir=(e=>(e.SEMI="semi",e.FULL="full",e))(ir||{}),Wa=(e=>(e.UP="up",e.DOWN="down",e))(Wa||{}),ts=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(ts||{}),es=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(es||{}),Ee=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(Ee||{}),It=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(It||{}),Ya=(e=>(e.LEFT="left",e.RIGHT="right",e))(Ya||{}),Ft=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Ft||{}),ns=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(ns||{}),zr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(zr||{}),rs=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(rs||{}),en=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(en||{});const ue="cds",yn={opacity:{unselected:.05,selected:.4}},Ln={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Wr={duration:1e3,ease:qh,zoomLevel:3},Yr={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},Kg={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Ce={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},mR={defaultBins:10},Pt={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},En={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Xt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Ct={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},sr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Ve={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Qg={minCellDividerDimension:16,chartPadding:.5},Jg={default:{size:24}},vR={horizontalOffset:10},tm={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},xe={height:{[Ge.GRAPH_VIEW]:32,[Ge.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},yR=[{type:Ft.RADIUS,name:"Radius"},{type:Ft.AREA,name:"Poor area"},{type:Ft.AREA,name:"Satisfactory area"},{type:Ft.AREA,name:"Great area"},{type:Ft.QUARTILE,name:"Quartiles"}];function ER(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=Bn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function kt(e,t){var i;const n=vn(e),r=Object.keys(t.axes||{});(i=t==null?void 0:t.toolbar)!=null&&i.controls&&delete n.toolbar.controls,r.length===0&&delete n.axes;for(const s in n.axes)if(r.includes(s)){const a=t.axes[s];(a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format");const o=a.mapsTo;if(o==null){const l=a.scaleType;l==null?a.mapsTo="value":l===K.TIME?a.mapsTo="date":l===K.LABELS&&(a.mapsTo="key")}}else delete n.axes[s];return Zc(n,t),at(n,t)}function xn(e){if(!e)return;const t=/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/,n=e.getAttribute("transform").match(t);if(!n)return null;if(n[0]){const r=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:r[0],ty:r[1]}}return null}function is(e){const n=/\(([^)]+)\)/.exec(e);if(n&&n.length>1){const r=n[1].split(",");if(r.length>1)return{x:parseFloat(r[0]),y:parseFloat(r[1])}}return{x:0,y:0}}function jc(e,t,n="value",r=!1){const i=e/t.reduce((s,a)=>s+a[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function ss(e,t,n){if(n>e.length)return e;if(t===Ae.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Ae.FRONT_LINE)return"..."+e.substr(-n);if(t===Ae.END_LINE)return e.substr(0,n)+"..."}function Zc(e,t){const n=x(e,"legend","additionalItems"),r=x(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=yR.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=gR(a,r,"name")}}const x=(e,...t)=>{let n=e;if(n){for(const r of t)if(n[r]!==null&&n[r]!==void 0)n=n[r];else return null;return n}return null},em=(e,t)=>t===zt.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ie=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=em(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function bn(e,t,n){return n===zt.VERTICAL?[e,t]:[t,e]}function yt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ze(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function nm(e,t){const n=yt(e);return isNaN(t)?ze(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Kc(e,t){const n=yt(e);if(isNaN(t))return ze(e,NaN);if(!t)return n;const r=n.getDate(),i=ze(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const s=i.getDate();return r>=s?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function Qc(e,t){const n=+yt(e);return ze(e,n+t)}const rm=6048e5,xR=864e5,im=6e4,sm=36e5;function am(e,t){return Qc(e,t*sm)}let bR={};function qa(){return bR}function as(e,t){var o,l,c,u;const n=qa(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=yt(e),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function Xa(e){return as(e,{weekStartsOn:1})}function om(e){const t=yt(e),n=t.getFullYear(),r=ze(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Xa(r),s=ze(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const a=Xa(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function lm(e){const t=yt(e);return t.setHours(0,0,0,0),t}function cm(e){const t=yt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function um(e,t){const n=lm(e),r=lm(t),i=+n-cm(n),s=+r-cm(r);return Math.round((i-s)/xR)}function _R(e){const t=om(e),n=ze(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Xa(n)}function Jc(e,t){return Qc(e,t*im)}function tu(e,t){return Qc(e,t*1e3)}function hm(e,t){return Kc(e,t*12)}function os(e,t){const n=yt(e),r=yt(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function SR(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function TR(e){if(!SR(e)&&typeof e!="number")return!1;const t=yt(e);return!isNaN(Number(t))}function wR(e,t){const n=yt(e),r=yt(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function OR(e,t){const n=yt(e),r=yt(t);return n.getFullYear()-r.getFullYear()}function MR(e,t){const n=yt(e),r=yt(t),i=dm(n,r),s=Math.abs(um(n,r));n.setDate(n.getDate()-i*s);const a=+(dm(n,r)===-i),o=i*(s-a);return o===0?0:o}function dm(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function eu(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function nu(e,t){return+yt(e)-+yt(t)}function AR(e,t,n){const r=nu(e,t)/sm;return eu(n==null?void 0:n.roundingMethod)(r)}function fm(e,t,n){const r=nu(e,t)/im;return eu(n==null?void 0:n.roundingMethod)(r)}function CR(e){const t=yt(e);return t.setHours(23,59,59,999),t}function DR(e){const t=yt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function LR(e){const t=yt(e);return+CR(t)==+DR(t)}function RR(e,t){const n=yt(e),r=yt(t),i=os(n,r),s=Math.abs(wR(n,r));let a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);let o=os(n,r)===-i;LR(yt(e))&&s===1&&os(e,r)===1&&(o=!1),a=i*(s-Number(o))}return a===0?0:a}function pm(e,t,n){const r=nu(e,t)/1e3;return eu(n==null?void 0:n.roundingMethod)(r)}function IR(e,t){const n=yt(e),r=yt(t),i=os(n,r),s=Math.abs(OR(n,r));n.setFullYear(1584),r.setFullYear(1584);const a=os(n,r)===-i,o=i*(s-+a);return o===0?0:o}function kR(e){const t=yt(e),n=ze(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const PR={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$R=(e,t,n)=>{let r;const i=PR[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ru(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const NR={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},UR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BR={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},FR={date:ru({formats:NR,defaultWidth:"full"}),time:ru({formats:UR,defaultWidth:"full"}),dateTime:ru({formats:BR,defaultWidth:"full"})},HR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GR=(e,t,n,r)=>HR[e];function ls(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const VR={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WR={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},YR={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},qR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},XR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jR={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ls({values:VR,defaultWidth:"wide"}),quarter:ls({values:zR,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ls({values:WR,defaultWidth:"wide"}),day:ls({values:YR,defaultWidth:"wide"}),dayPeriod:ls({values:qR,defaultWidth:"wide",formattingValues:XR,defaultFormattingWidth:"wide"})};function cs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?KR(o,d=>d.test(a)):ZR(o,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function ZR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function KR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function QR(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const JR=/^(\d+)(th|st|nd|rd)?/i,tI=/\d+/i,eI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nI={any:[/^b/i,/^(a|c)/i]},rI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},iI={any:[/1/i,/2/i,/3/i,/4/i]},sI={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},aI={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oI={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cI={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uI={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hI={ordinalNumber:QR({matchPattern:JR,parsePattern:tI,valueCallback:e=>parseInt(e,10)}),era:cs({matchPatterns:eI,defaultMatchWidth:"wide",parsePatterns:nI,defaultParseWidth:"any"}),quarter:cs({matchPatterns:rI,defaultMatchWidth:"wide",parsePatterns:iI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:cs({matchPatterns:sI,defaultMatchWidth:"wide",parsePatterns:aI,defaultParseWidth:"any"}),day:cs({matchPatterns:oI,defaultMatchWidth:"wide",parsePatterns:lI,defaultParseWidth:"any"}),dayPeriod:cs({matchPatterns:cI,defaultMatchWidth:"any",parsePatterns:uI,defaultParseWidth:"any"})},gm={code:"en-US",formatDistance:$R,formatLong:FR,formatRelative:GR,localize:jR,match:hI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dI(e){const t=yt(e);return um(t,kR(t))+1}function fI(e){const t=yt(e),n=+Xa(t)-+_R(t);return Math.round(n/rm)+1}function mm(e,t){var u,d,h,f;const n=yt(e),r=n.getFullYear(),i=qa(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=ze(e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=as(a,t),l=ze(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=as(l,t);return n.getTime()>=o.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function pI(e,t){var o,l,c,u;const n=qa(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=mm(e,t),s=ze(e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),as(s,t)}function gI(e,t){const n=yt(e),r=+as(n,t)-+pI(n,t);return Math.round(r/rm)+1}function _t(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Rn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return _t(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_t(n+1,2)},d(e,t){return _t(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _t(e.getHours()%12||12,t.length)},H(e,t){return _t(e.getHours(),t.length)},m(e,t){return _t(e.getMinutes(),t.length)},s(e,t){return _t(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return _t(i,t.length)}},qr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Rn.y(e,t)},Y:function(e,t,n,r){const i=mm(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return _t(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):_t(s,t.length)},R:function(e,t){const n=om(e);return _t(n,t.length)},u:function(e,t){const n=e.getFullYear();return _t(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return _t(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return _t(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Rn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return _t(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=gI(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):_t(i,t.length)},I:function(e,t,n){const r=fI(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):_t(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Rn.d(e,t)},D:function(e,t,n){const r=dI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):_t(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return _t(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return _t(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return _t(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=qr.noon:r===0?i=qr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=qr.evening:r>=12?i=qr.afternoon:r>=4?i=qr.morning:i=qr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Rn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Rn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):_t(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):_t(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Rn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Rn.s(e,t)},S:function(e,t){return Rn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Em(r);case"XXXX":case"XX":return ar(r);case"XXXXX":case"XXX":default:return ar(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Em(r);case"xxxx":case"xx":return ar(r);case"xxxxx":case"xxx":default:return ar(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ym(r,":");case"OOOO":default:return"GMT"+ar(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ym(r,":");case"zzzz":default:return"GMT"+ar(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return _t(r,t.length)},T:function(e,t,n){const r=e.getTime();return _t(r,t.length)}};function ym(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+_t(s,2)}function Em(e,t){return e%60===0?(e>0?"-":"+")+_t(Math.abs(e)/60,2):ar(e,t)}function ar(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=_t(Math.trunc(r/60),2),s=_t(r%60,2);return n+i+t+s}const xm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},bm=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},mI={p:bm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return xm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",xm(r,t)).replace("{{time}}",bm(i,t))}},vI=/^D+$/,yI=/^Y+$/,EI=["D","DD","YY","YYYY"];function xI(e){return vI.test(e)}function bI(e){return yI.test(e)}function _I(e,t,n){const r=SI(e,t,n);if(console.warn(r),EI.includes(e))throw new RangeError(r)}function SI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const TI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OI=/^'([^]*?)'?$/,MI=/''/g,AI=/[a-zA-Z]/;function Xr(e,t,n){var u,d,h,f,p,g,v,m;const r=qa(),i=(n==null?void 0:n.locale)??r.locale??gm,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((g=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((m=(v=r.locale)==null?void 0:v.options)==null?void 0:m.weekStartsOn)??0,o=yt(e);if(!TR(o))throw new RangeError("Invalid time value");let l=t.match(wI).map(y=>{const E=y[0];if(E==="p"||E==="P"){const _=mI[E];return _(y,i.formatLong)}return y}).join("").match(TI).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const E=y[0];if(E==="'")return{isToken:!1,value:CI(y)};if(vm[E])return{isToken:!0,value:y};if(E.match(AI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:y}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return l.map(y=>{if(!y.isToken)return y.value;const E=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&bI(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&xI(E))&&_I(E,t,String(e));const _=vm[E[0]];return _(o,E,i.localize,c)}).join("")}function CI(e){const t=e.match(OI);return t?t[1].replace(MI,"'"):e}function DI(e,t){return nm(e,-t)}function LI(e,t){return Kc(e,-t)}function RI(e,t){return am(e,-t)}function _m(e,t){return Jc(e,-t)}function Sm(e,t){return tu(e,-t)}function II(e,t){return hm(e,-t)}const jr={type:Ae.END_LINE,threshold:16,numCharacter:14},kI={enabled:!0,position:Gr.BOTTOM,clickable:!0,truncation:jr,alignment:Ut.LEFT,order:null,additionalItems:[]},PI={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},$I={enabled:!0},Tm={enabled:!0,showTotal:!0,truncation:jr,groupLabel:"Group"},wm={top:{visible:!0,includeZero:!0,truncation:jr},bottom:{visible:!0,includeZero:!0,truncation:jr},left:{visible:!0,includeZero:!0,truncation:jr},right:{visible:!0,includeZero:!0,truncation:jr}},ja={addSpaceOnEdges:1,showDayName:!1,localeObject:gm,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},NI=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),te={width:null,height:null,resizable:!0,theme:Xc.WHITE,tooltip:Tm,legend:kI,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:It.SHOW_AS_DATATABLE},...NI?[{type:It.MAKE_FULLSCREEN}]:[],{type:It.EXPORT_CSV},{type:It.EXPORT_PNG},{type:It.EXPORT_JPG}]}},Om=at({},te,{thematic:{projection:en.geoNaturalEarth1}}),us=at({},te,{axes:wm,timeScale:ja,grid:PI,ruler:$I,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Ge.GRAPH_VIEW}}}),or=at({},us,{bars:{maxWidth:16,spacingFactor:.25},timeScale:at(ja,{addSpaceOnEdges:1})}),UI=at({},or,{}),BI=at({},or,{}),FI=at({},or,{bars:at({},or.bars,{dividerSize:1.5})}),HI=at({},or,{}),iu=at({},us,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),GI=iu,Mm=at({},iu,{points:{radius:3,filled:!1,enabled:!0}}),Am=at({},Mm,{timeScale:at(ja,{addSpaceOnEdges:0})}),VI=Am,zI=at({},us,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[t*3/400,t*25/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:Ft.RADIUS,name:"Radius"}]}}),WI=at({},us,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Ft.AREA,name:"Poor area"},{type:Ft.AREA,name:"Satisfactory area"},{type:Ft.AREA,name:"Great area"},{type:Ft.QUARTILE,name:"Quartiles"}]}}),YI=at({},or,{bars:{dividerSize:1.5},timeScale:at(ja,{addSpaceOnEdges:0})}),qI=at({},te,{tooltip:at({},Tm,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[t*20/400,t*75/400]},wordMapsTo:"word"}}),Cm=at({},te,{pie:{labels:{formatter:null,enabled:!0},alignment:Ut.LEFT,sortFunction:null,valueMapsTo:"value"}}),XI=at({},te,{legend:{enabled:!1},gauge:{type:ir.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!==0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:Ut.LEFT}}),jI=at({},Cm,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:Ut.LEFT}}),Dm=at({},te,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),ZI=at({},Dm,{legend:{enabled:!0}}),KI=at({},te,{radar:{axes:{angle:"key",value:"value"},alignment:Ut.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),QI=at({},or,{comboChartTypes:[]}),JI=at({tree:{type:za.TREE}},te,{}),tk=at({},te,{data:at(te.data,{groupMapsTo:"name"})}),ek=at({},te,Yr,{data:at(te.data,{groupMapsTo:"name"})}),nk=at({},te,{alluvial:{data:at(te.data,{groupMapsTo:"source"}),nodeAlignment:Ut.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),rk=at({},te,{axes:wm,heatmap:{divider:{state:zr.AUTO},colorLegend:{type:"linear"}}}),ik=at({},Om,{choropleth:{colorLegend:{type:"linear"}}}),Ot={alluvialChart:nk,areaChart:Am,axisChart:us,boxplotChart:HI,bubbleChart:zI,bulletChart:WI,chart:te,circlePackChart:ek,choroplethChart:ik,comboChart:QI,donutChart:jI,gaugeChart:XI,groupedBarChart:BI,heatmapChart:rk,histogramChart:YI,lineChart:Mm,lollipopChart:GI,meterChart:Dm,pieChart:Cm,proportionalMeterChart:ZI,radarChart:KI,scatterChart:iu,simpleBarChart:UI,stackedAreaChart:VI,stackedBarChart:FI,thematicChart:Om,treeChart:JI,treemapChart:tk,wordCloudChart:qI};var Lm=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(Lm||{});const su=[["15seconds",15*1e3],["minute",60*1e3],["30minutes",30*60*1e3],["hourly",60*60*1e3],["daily",24*60*60*1e3],["monthly",30*24*60*60*1e3],["quarterly",3*30*24*60*60*1e3],["yearly",12*30*24*60*60*1e3]];function Rm(e,t,n,r,i){const s=t===0,a=Number(Xr(new Date(e),"c"))===2,o=Number(Xr(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||Ka(e)||hs(e,l)||In(e);case"minute":return s||Ka(e)||hs(e,l)||In(e);case"30minutes":return s||Ka(e)||hs(e,l)||In(e);case"hourly":return s||Ka(e)||hs(e,l)||In(e);case"daily":return i?s||a||In(e):s||hs(e,l)||In(e);case"weekly":return s||a||In(e);case"monthly":return s||In(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function au(e,t,n,r,i){const s=i.showDayName,a=r==="daily"&&s?"weekly":r,o=new Date(e),l=x(i,"timeIntervalFormats")[a],c=x(l,"primary"),u=x(l,"secondary");let d=Rm(e,t,n,r,s)?c:u;r==="15seconds"&&o.getMilliseconds()!==0&&(d=d.replace("pp","h:mm:ss.SSS a"));const h=i.localeObject;return Xr(o,d,{locale:h})}function Za(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function sk(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function ak(e){const t=su.reduce((n,[,r],i)=>{const s=su[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return su[t][0]}function ou(e,t){if(Lm[t])return t;if(e.length===1)return"15seconds";const n=sk(e),r=Mn(n);return ak(r)}function Ka(e){const{s:t,m:n,H:r}=Za(e);return r===0&&n===0&&t===0}function hs(e,t){const n=Za(e).M,r=Za(t).M;return n!==r}function In(e){const{M:t,d:n,s:r,m:i,H:s}=Za(e);return t===1&&n===1&&s===0&&i===0&&r===0}function Im(e){return e===void 0?"":e.toISOString()}function ok(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}class nn{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),i=x(r,"tabularRepModal","tableHeadingFormatter"),s=x(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:a}=this.services,o=a==null?void 0:a.getDomainAxisScaleType();let l;return o===K.TIME&&(l=u=>Xr(u,"MMM d, yyyy")),[typeof i=="function"?i(t):t,...typeof s=="function"?s(n):n.map(u=>(l&&(u[1]=l(u[1])),u))]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=x(n,"data"),a=x(n,"axes");return t&&(r=r.filter(o=>t.includes(o[s]))),a&&Object.keys(a).forEach(o=>{const l=a[o].mapsTo,c=a[o].scaleType;if((c===K.LINEAR||c===K.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===K.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,d]=a[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=Pt.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(a=>r.find(o=>o.name===a[i]&&o.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(vn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return x(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(r=>t.includes(r.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=Pt.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(r=>r.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(r=>r.name)}aggregateBinDataByGroup(t){return eR(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),s=n.axes[r],{groupMapsTo:a}=n.data,{bins:o=mR.defaultBins}=s,l=Array.isArray(o),c=$0().value(f=>f[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const f=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+f}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return c.forEach(f=>{const p=`${f.x0}-${f.x1}`,g=this.aggregateBinDataByGroup(f);d.forEach(v=>{h.push({group:v,key:p,value:g[v]||0,bin:f.x0})})}),{bins:c,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),s=this.getDataValuesGroupedByKeys({bins:i});return nc().keys(r)(s).map((a,o)=>Object.keys(a).filter(l=>!isNaN(l)).map(l=>{const c=a[l];return c[n]=r[o],c}))}getGroupedData(t){const n=this.getDisplayData(t),r={},{groupMapsTo:i}=this.getOptions().data;return n.map(s=>{const a=s[i];r[a]!==null&&r[a]!==void 0?r[a].push(s):r[a]=[s]}),Object.keys(r).map(s=>({name:s,data:r[s]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const r=this.getOptions(),i=this.getDisplayData(n);let s;t?s=t.map(l=>`${l.x0}:${l.x1}`):s=Qi(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Im(l[c]):l[c]&&typeof l[c].toString=="function"?l[c].toString():l[c]}));const a=this.services.cartesianScales.domainAxisPosition,o=r.axes[a].scaleType;return o===K.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===K.LOG||o===K.LINEAR)&&s.sort((l,c)=>l-c),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split(":"),d={x0:c,x1:u},h=t.find(f=>f.x0.toString()===c.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[i]===f).length}),d}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[i]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?Im(f[p])===l:f[p].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:s}=i.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const c=KL(o.map(u=>[u.sharedStackKey,0]));o.forEach(u=>{a.forEach(d=>{c[u.sharedStackKey]+=u[d]})}),o.forEach(u=>{a.forEach(d=>{const h=c[u.sharedStackKey];c[u.sharedStackKey]?u[d]=u[d]/h*100:u[d]=0})})}return(r?nc().offset(GT):nc()).keys(a)(o).map((c,u)=>Object.keys(c).filter(d=>!isNaN(d)).map(d=>{const h=c[d];return h[s]=a[u],h}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();Zc(n,t),this.set({options:at(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(T.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=Pt.items.status,i=this.getDataGroups(),s=i.some(u=>u.status===r),a=i.filter(u=>u.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((u,d)=>{i[d].status=n});else{const u=i.findIndex(d=>d.name===t);i[u].status=i[u].status===r?n:r}else i.forEach((u,d)=>{i[d].status=u.name===t?n:r});const o=i.filter(u=>u.status===n),l=this.getOptions();i.some(u=>u.status===r)?l.data.selectedGroups=o.map(u=>u.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(T.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=x(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=x(s,"label");if(c===null){const d=x(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(a)?(u.value=a.value,u.date=a.date):u.value=a,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const n=this.getTabularDataArray().map(a=>a.map(o=>`"${(o==="–"?"–":o).split(/[,;'"`]/).map(u=>ok(u)).join("")}"`)).map(a=>a.join(",")).join(`
|
|
2
2
|
`),r=this.getOptions();let i="myChart";const s=x(r,"fileDownload","fileName");typeof s=="function"?i=s("csv"):typeof s=="string"&&(i=s),this.services.files.downloadCSV(n,`${i}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return t=this.getTabularData(t),t}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach(t=>{this.allDataGroups.indexOf(t)===-1&&this.allDataGroups.push(t)}):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:n}=this.getOptions().data,{ACTIVE:r,DISABLED:i}=Pt.items.status,s=this.getOptions(),a=Qi(t.map(l=>l[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(c=>a.includes(c))||(s.data.selectedGroups=[]));const o=l=>!s.data.selectedGroups.length||s.data.selectedGroups.includes(l)?r:i;return a.map(l=>({name:l,status:o(l)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=x(t,"color","scale");Object.keys(n).forEach(i=>{this.allDataGroups.includes(i)||console.warn(`"${i}" does not exist in data groups.`)}),this.allDataGroups.filter(i=>n[i]).forEach(i=>this.colorScale[i]=n[i])}setColorClassNames(){const t=x(this.getOptions(),"color","pairing");let n=x(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let r=x(t,"option");const i=Kg.pairingOptions,s=n>5?14:n,a=`${s}-color`;r=r<=i[a]?r:1;const o=this.allDataGroups.map((l,c)=>`${s}-${r}-${c%14+1}`);this.colorClassNames=fa().range(o).domain(this.allDataGroups)}}function lk(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const ck=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function _n(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Qa(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function uk(e){const t=Qa(e,"border-left-width"),n=Qa(e,"border-right-width");return e.clientWidth+t+n}function hk(e){const t=Qa(e,"border-top-width"),n=Qa(e,"border-bottom-width");return e.clientHeight+t+n}function km(e,t={}){const n=t.width||uk(e),r=t.height||hk(e);return{width:n,height:r}}function dk(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const be=16384;function fk(e){(e.width>be||e.height>be)&&(e.width>be&&e.height>be?e.width>e.height?(e.height*=be/e.width,e.width=be):(e.width*=be/e.height,e.height=be):e.width>be?(e.height*=be/e.width,e.width=be):(e.width*=be/e.height,e.height=be))}function Ja(e){return new Promise((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function pk(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function gk(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(e),pk(i)}const he=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||he(n,t)};function mk(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function vk(e){return _n(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function yk(e,t,n){const r=`.${e}:${t}`,i=n.cssText?mk(n):vk(n);return document.createTextNode(`${r}{${i}}`)}function Pm(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=ck();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(yk(s,n,r)),t.appendChild(a)}function Ek(e,t){Pm(e,t,":before"),Pm(e,t,":after")}const $m="application/font-woff",Nm="image/jpeg",xk={woff:$m,woff2:$m,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Nm,jpeg:Nm,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function bk(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function lu(e){const t=bk(e).toLowerCase();return xk[t]||""}function _k(e){return e.split(/,/)[1]}function cu(e){return e.search(/^(data:)/)!==-1}function Um(e,t){return`data:${t};base64,${e}`}async function Bm(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((s,a)=>{const o=new FileReader;o.onerror=a,o.onloadend=()=>{try{s(n({res:r,result:o.result}))}catch(l){a(l)}},o.readAsDataURL(i)})}const uu={};function Sk(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function hu(e,t,n){const r=Sk(e,t,n.includeQueryParams);if(uu[r]!=null)return uu[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await Bm(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),_k(o)));i=Um(s,t)}catch(s){i=n.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;s&&(a=typeof s=="string"?s:s.message),a&&console.warn(a)}return uu[r]=i,i}async function Tk(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Ja(t)}async function wk(e,t){if(e.currentSrc){const s=document.createElement("canvas"),a=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,a==null||a.drawImage(e,0,0,s.width,s.height);const o=s.toDataURL();return Ja(o)}const n=e.poster,r=lu(n),i=await hu(n,r,t);return Ja(i)}async function Ok(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await to(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function Mk(e,t){return he(e,HTMLCanvasElement)?Tk(e):he(e,HTMLVideoElement)?wk(e,t):he(e,HTMLIFrameElement)?Ok(e):e.cloneNode(!1)}const Ak=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function Ck(e,t,n){var r,i;let s=[];return Ak(e)&&e.assignedNodes?s=_n(e.assignedNodes()):he(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=_n(e.contentDocument.body.childNodes):s=_n(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||he(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>to(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function Dk(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):_n(r).forEach(i=>{let s=r.getPropertyValue(i);i==="font-size"&&s.endsWith("px")&&(s=`${Math.floor(parseFloat(s.substring(0,s.length-2)))-.1}px`),he(e,HTMLIFrameElement)&&i==="display"&&s==="inline"&&(s="block"),i==="d"&&t.getAttribute("d")&&(s=`path(${t.getAttribute("d")})`),n.setProperty(i,s,r.getPropertyPriority(i))})}function Lk(e,t){he(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),he(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Rk(e,t){if(he(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function Ik(e,t){return he(t,Element)&&(Dk(e,t),Ek(e,t),Lk(e,t),Rk(e,t)),t}async function kk(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const o=n[s].getAttribute("xlink:href");if(o){const l=e.querySelector(o),c=document.querySelector(o);!l&&c&&!r[o]&&(r[o]=await to(c,t,!0))}}const i=Object.values(r);if(i.length){const s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const o=document.createElementNS(s,"defs");a.appendChild(o);for(let l=0;l<i.length;l++)o.appendChild(i[l]);e.appendChild(a)}return e}async function to(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>Mk(r,t)).then(r=>Ck(e,r,t)).then(r=>Ik(e,r)).then(r=>kk(r,t))}const Fm=/url\((['"]?)([^'"]+?)\1\)/g,Pk=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,$k=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Nk(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Uk(e){const t=[];return e.replace(Fm,(n,r,i)=>(t.push(i),n)),t.filter(n=>!cu(n))}async function Bk(e,t,n,r,i){try{const s=n?lk(t,n):t,a=lu(t);let o;if(i){const l=await i(s);o=Um(l,a)}else o=await hu(s,a,r);return e.replace(Nk(t),`$1${o}$3`)}catch{}return e}function Fk(e,{preferredFontFormat:t}){return t?e.replace($k,n=>{for(;;){const[r,,i]=Pk.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Hm(e){return e.search(Fm)!==-1}async function Gm(e,t,n){if(!Hm(e))return e;const r=Fk(e,n);return Uk(r).reduce((s,a)=>s.then(o=>Bk(o,a,t,n)),Promise.resolve(r))}async function eo(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await Gm(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function Hk(e,t){await eo("background",e,t)||await eo("background-image",e,t),await eo("mask",e,t)||await eo("mask-image",e,t)}async function Gk(e,t){const n=he(e,HTMLImageElement);if(!(n&&!cu(e.src))&&!(he(e,SVGImageElement)&&!cu(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await hu(r,lu(r),t);await new Promise((s,a)=>{e.onload=s,e.onerror=a;const o=e;o.decode&&(o.decode=s),o.loading==="lazy"&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function Vk(e,t){const r=_n(e.childNodes).map(i=>Vm(i,t));await Promise.all(r).then(()=>e)}async function Vm(e,t){he(e,Element)&&(await Hk(e,t),await Gk(e,t),await Vk(e,t))}function zk(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const zm={};async function Wm(e){let t=zm[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},zm[e]=t,t}async function Ym(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async a=>{let o=a.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Bm(o,t.fetchRequestInit,({result:l})=>(n=n.replace(a,`url(${l})`),[a,l]))});return Promise.all(s).then(()=>n)}function qm(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const l=i.exec(r);if(l===null)break;t.push(l[0])}r=r.replace(i,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(a,"gi");for(;;){let l=s.exec(r);if(l===null){if(l=o.exec(r),l===null)break;s.lastIndex=o.lastIndex}else o.lastIndex=s.lastIndex;t.push(l[0])}return t}async function Wk(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{_n(i.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1;const l=s.href,c=Wm(l).then(u=>Ym(u,t)).then(u=>qm(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?o+=1:i.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:d,error:h})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(c)}})}catch(s){const a=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&r.push(Wm(i.href).then(o=>Ym(o,t)).then(o=>qm(o).forEach(l=>{a.insertRule(l,i.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{_n(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function Yk(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Hm(t.style.getPropertyValue("src")))}async function qk(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=_n(e.ownerDocument.styleSheets),r=await Wk(n,t);return Yk(r)}async function Xk(e,t){const n=await qk(e,t);return(await Promise.all(n.map(i=>{const s=i.parentStyleSheet?i.parentStyleSheet.href:null;return Gm(i.cssText,s,t)}))).join(`
|
|
3
3
|
`)}async function jk(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Xk(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function Zk(e,t={}){const{width:n,height:r}=km(e,t),i=await to(e,t,!0);return await jk(i,t),await Vm(i,t),zk(i,t),await gk(i,n,r)}async function Xm(e,t={}){const{width:n,height:r}=km(e,t),i=await Zk(e,t),s=await Ja(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||dk(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||fk(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(s,0,0,a.width,a.height),a}async function Kk(e,t={}){return(await Xm(e,t)).toDataURL()}async function Qk(e,t={}){return(await Xm(e,t)).toDataURL("image/jpeg",t.quality||1)}class Sn{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}}const Jk="DONT_STYLE_ME_css_styles_verifier";class A extends Sn{constructor(t,n){super(t,n)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,n={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=L(t));const r={width:0,height:0},i=h=>{h&&Object.keys(r).forEach(f=>{if(h[f]){const p=h[f],g=parseFloat(p);p&&g>r[f]&&(""+p).indexOf("%")===-1&&(r[f]=g)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,l,c,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),l={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(c=a.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(i(s),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(d),r.width>0&&r.height>0))return d;if(n.useBBox&&(i(l),r.width>0&&r.height>0))return l;if(n.useBoundingRect&&(i(u),r.width>0&&r.height>0))return u}try{const h={width:x(t.node(),"width","baseVal","value"),height:x(t.node(),"height","baseVal","value")};i(h)}catch{i(d),i(l),i(s)}return r}static appendOrSelect(t,n){const r=t.select(`${n}`);if(r.empty()){let i=n.split("#"),s,a;return i.length===2?(s=i[0],i=i[1].split("."),a=i[0]):(i=n.split("."),s=i[0]),t.append(s).attr("id",a).attr("class",i.slice(1).join(" "))}return r}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor((1+Math.random())*281474976710656).toString(16)}addMainContainer(){const t=this.model.getOptions(),n=x(t,"style","prefix"),r=L(this.getHolder()).append("div").classed(`${ue}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",Jk),this.mainContainer=r.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:n,height:r,theme:i}=this.model.getOptions();n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),L(this.getHolder()).classed(`${ue}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=L(r);i.classed("filled",!0),Qk(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=x(n,"fileDownload","fileName");typeof o=="function"?a=o("jpg"):typeof o=="string"&&(a=o),(l=t.services.files)==null||l.downloadImage(s,`${a}.jpg`),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=L(r);i.classed("filled",!0),Kk(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=x(n,"fileDownload","fileName");typeof o=="function"?a=o("png"):typeof o=="string"&&(a=o),(l=t.services.files)==null||l.downloadImage(s,`${a}.png`),i.classed("filled",!1)}).catch(function(s){console.error("oops, something went wrong!",s)})}toggleFullscreen(){const t=this.getHolder();L(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",()=>{const t=L(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=A.getSVGElementSize(L(this.mainContainer),{useBBox:!0}),n=L(this.mainContainer).attr("class"),r=L(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach(function(s){i+=Number(A.getSVGElementSize(L(s),{useBBox:!0}).height)}),i<=t?L(this.mainContainer).attr("height",i):L(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&L(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(T.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(T.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=Va(()=>{var a;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(a=this.services.events)==null||a.dispatchEvent(T.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}}class dt{constructor(t,n,r){if(this.type="",this.renderType=tt.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=x(this.model.getOptions(),"style","prefix");this.id=`${i}--${this.configs.id}`}this.parent||this.setParent(L(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){var r;const n=this.parent;if(this.parent=t,!(n&&n.node()===t.node())&&this.type){const i=x(this.model.getOptions(),"style","prefix");(r=this.parent)==null||r.classed(`${ue}--${i}--${this.type}`,!0),n&&n.classed(`${ue}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={withinChartClip:!1}){if(this.type){const n=x(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=A.appendOrSelect(this.parent,`${this.renderType===tt.SVG?"svg":"div"}${r}.${ue}--${n}--${this.type}`);if(t.withinChartClip){const s=this.model.get("chartClipId");if(s){const o=L(`#${s}`).select("rect");o.size()!==0&&parseFloat(o.attr("height"))>0&&i.attr("clip-path",`url(#${s})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?at({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */const{entries:jm,setPrototypeOf:Zm,isFrozen:t2,getPrototypeOf:e2,getOwnPropertyDescriptor:du}=Object;let{freeze:se,seal:We,create:Km}=Object,{apply:fu,construct:pu}=typeof Reflect<"u"&&Reflect;se||(se=function(t){return t}),We||(We=function(t){return t}),fu||(fu=function(t,n,r){return t.apply(n,r)}),pu||(pu=function(t,n){return new t(...n)});const no=De(Array.prototype.forEach),Qm=De(Array.prototype.pop),ds=De(Array.prototype.push),ro=De(String.prototype.toLowerCase),gu=De(String.prototype.toString),n2=De(String.prototype.match),fs=De(String.prototype.replace),r2=De(String.prototype.indexOf),i2=De(String.prototype.trim),_e=De(RegExp.prototype.test),ps=s2(TypeError);function De(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return fu(e,t,r)}}function s2(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return pu(e,n)}}function ft(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ro;Zm&&Zm(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(t2(t)||(t[r]=s),i=s)}e[i]=!0}return e}function a2(e){for(let t=0;t<e.length;t++)du(e,t)===void 0&&(e[t]=null);return e}function lr(e){const t=Km(null);for(const[n,r]of jm(e))du(e,n)!==void 0&&(Array.isArray(r)?t[n]=a2(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=lr(r):t[n]=r);return t}function io(e,t){for(;e!==null;){const r=du(e,t);if(r){if(r.get)return De(r.get);if(typeof r.value=="function")return De(r.value)}e=e2(e)}function n(r){return console.warn("fallback value for",r),null}return n}const Jm=se(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mu=se(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vu=se(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),o2=se(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yu=se(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),l2=se(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),tv=se(["#text"]),ev=se(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Eu=se(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nv=se(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),so=se(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),c2=We(/\{\{[\w\W]*|[\w\W]*\}\}/gm),u2=We(/<%[\w\W]*|[\w\W]*%>/gm),h2=We(/\${[\w\W]*}/gm),d2=We(/^data-[\-\w.\u00B7-\uFFFF]/),f2=We(/^aria-[\-\w]+$/),rv=We(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),p2=We(/^(?:\w+script|data):/i),g2=We(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),iv=We(/^html$/i);var sv=Object.freeze({__proto__:null,MUSTACHE_EXPR:c2,ERB_EXPR:u2,TMPLIT_EXPR:h2,DATA_ATTR:d2,ARIA_ATTR:f2,IS_ALLOWED_URI:rv,IS_SCRIPT_OR_DATA:p2,ATTR_WHITESPACE:g2,DOCTYPE_NAME:iv});const m2=function(){return typeof window>"u"?null:window},v2=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function av(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m2();const t=nt=>av(nt);if(t.version="3.0.8",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:f}=e,p=l.prototype,g=io(p,"cloneNode"),v=io(p,"nextSibling"),m=io(p,"childNodes"),y=io(p,"parentNode");if(typeof a=="function"){const nt=n.createElement("template");nt.content&&nt.content.ownerDocument&&(n=nt.content.ownerDocument)}let E,_="";const{implementation:S,createNodeIterator:b,createDocumentFragment:M,getElementsByTagName:D}=n,{importNode:G}=r;let I={};t.isSupported=typeof jm=="function"&&typeof y=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:w,ERB_EXPR:C,TMPLIT_EXPR:R,DATA_ATTR:P,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:B}=sv;let{IS_ALLOWED_URI:U}=sv,N=null;const j=ft({},[...Jm,...mu,...vu,...yu,...tv]);let Y=null;const it=ft({},[...ev,...Eu,...nv,...so]);let et=Object.seal(Km(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,Q=null,pt=!0,ot=!0,Tt=!1,Z=!0,F=!1,V=!1,$=!1,mt=!1,gt=!1,Ht=!1,Gt=!1,st=!0,Rt=!1;const hr="user-content-";let Le=!0,Es=!1,ri={},ii=null;const t0=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let e0=null;const n0=ft({},["audio","video","img","source","image","track"]);let Xu=null;const r0=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),So="http://www.w3.org/1998/Math/MathML",To="http://www.w3.org/2000/svg",wn="http://www.w3.org/1999/xhtml";let si=wn,ju=!1,Zu=null;const xF=ft({},[So,To,wn],gu);let xs=null;const bF=["application/xhtml+xml","text/html"],_F="text/html";let Yt=null,ai=null;const SF=n.createElement("form"),i0=function(k){return k instanceof RegExp||k instanceof Function},Ku=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ai&&ai===k)){if((!k||typeof k!="object")&&(k={}),k=lr(k),xs=bF.indexOf(k.PARSER_MEDIA_TYPE)===-1?_F:k.PARSER_MEDIA_TYPE,Yt=xs==="application/xhtml+xml"?gu:ro,N="ALLOWED_TAGS"in k?ft({},k.ALLOWED_TAGS,Yt):j,Y="ALLOWED_ATTR"in k?ft({},k.ALLOWED_ATTR,Yt):it,Zu="ALLOWED_NAMESPACES"in k?ft({},k.ALLOWED_NAMESPACES,gu):xF,Xu="ADD_URI_SAFE_ATTR"in k?ft(lr(r0),k.ADD_URI_SAFE_ATTR,Yt):r0,e0="ADD_DATA_URI_TAGS"in k?ft(lr(n0),k.ADD_DATA_URI_TAGS,Yt):n0,ii="FORBID_CONTENTS"in k?ft({},k.FORBID_CONTENTS,Yt):t0,q="FORBID_TAGS"in k?ft({},k.FORBID_TAGS,Yt):{},Q="FORBID_ATTR"in k?ft({},k.FORBID_ATTR,Yt):{},ri="USE_PROFILES"in k?k.USE_PROFILES:!1,pt=k.ALLOW_ARIA_ATTR!==!1,ot=k.ALLOW_DATA_ATTR!==!1,Tt=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,F=k.SAFE_FOR_TEMPLATES||!1,V=k.WHOLE_DOCUMENT||!1,gt=k.RETURN_DOM||!1,Ht=k.RETURN_DOM_FRAGMENT||!1,Gt=k.RETURN_TRUSTED_TYPE||!1,mt=k.FORCE_BODY||!1,st=k.SANITIZE_DOM!==!1,Rt=k.SANITIZE_NAMED_PROPS||!1,Le=k.KEEP_CONTENT!==!1,Es=k.IN_PLACE||!1,U=k.ALLOWED_URI_REGEXP||rv,si=k.NAMESPACE||wn,et=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&i0(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(et.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&i0(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(et.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(et.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),F&&(ot=!1),Ht&&(gt=!0),ri&&(N=ft({},tv),Y=[],ri.html===!0&&(ft(N,Jm),ft(Y,ev)),ri.svg===!0&&(ft(N,mu),ft(Y,Eu),ft(Y,so)),ri.svgFilters===!0&&(ft(N,vu),ft(Y,Eu),ft(Y,so)),ri.mathMl===!0&&(ft(N,yu),ft(Y,nv),ft(Y,so))),k.ADD_TAGS&&(N===j&&(N=lr(N)),ft(N,k.ADD_TAGS,Yt)),k.ADD_ATTR&&(Y===it&&(Y=lr(Y)),ft(Y,k.ADD_ATTR,Yt)),k.ADD_URI_SAFE_ATTR&&ft(Xu,k.ADD_URI_SAFE_ATTR,Yt),k.FORBID_CONTENTS&&(ii===t0&&(ii=lr(ii)),ft(ii,k.FORBID_CONTENTS,Yt)),Le&&(N["#text"]=!0),V&&ft(N,["html","head","body"]),N.table&&(ft(N,["tbody"]),delete q.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw ps('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ps('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=k.TRUSTED_TYPES_POLICY,_=E.createHTML("")}else E===void 0&&(E=v2(f,i)),E!==null&&typeof _=="string"&&(_=E.createHTML(""));se&&se(k),ai=k}},s0=ft({},["mi","mo","mn","ms","mtext"]),a0=ft({},["foreignobject","desc","title","annotation-xml"]),TF=ft({},["title","style","font","a","script"]),o0=ft({},[...mu,...vu,...o2]),l0=ft({},[...yu,...l2]),wF=function(k){let X=y(k);(!X||!X.tagName)&&(X={namespaceURI:si,tagName:"template"});const J=ro(k.tagName),Dt=ro(X.tagName);return Zu[k.namespaceURI]?k.namespaceURI===To?X.namespaceURI===wn?J==="svg":X.namespaceURI===So?J==="svg"&&(Dt==="annotation-xml"||s0[Dt]):!!o0[J]:k.namespaceURI===So?X.namespaceURI===wn?J==="math":X.namespaceURI===To?J==="math"&&a0[Dt]:!!l0[J]:k.namespaceURI===wn?X.namespaceURI===To&&!a0[Dt]||X.namespaceURI===So&&!s0[Dt]?!1:!l0[J]&&(TF[J]||!o0[J]):!!(xs==="application/xhtml+xml"&&Zu[k.namespaceURI]):!1},dr=function(k){ds(t.removed,{element:k});try{k.parentNode.removeChild(k)}catch{k.remove()}},Qu=function(k,X){try{ds(t.removed,{attribute:X.getAttributeNode(k),from:X})}catch{ds(t.removed,{attribute:null,from:X})}if(X.removeAttribute(k),k==="is"&&!Y[k])if(gt||Ht)try{dr(X)}catch{}else try{X.setAttribute(k,"")}catch{}},c0=function(k){let X=null,J=null;if(mt)k="<remove></remove>"+k;else{const ne=n2(k,/^[\r\n\t ]+/);J=ne&&ne[0]}xs==="application/xhtml+xml"&&si===wn&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const Dt=E?E.createHTML(k):k;if(si===wn)try{X=new h().parseFromString(Dt,xs)}catch{}if(!X||!X.documentElement){X=S.createDocument(si,"template",null);try{X.documentElement.innerHTML=ju?_:Dt}catch{}}const ee=X.body||X.documentElement;return k&&J&&ee.insertBefore(n.createTextNode(J),ee.childNodes[0]||null),si===wn?D.call(X,V?"html":"body")[0]:V?X.documentElement:ee},u0=function(k){return b.call(k.ownerDocument||k,k,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null)},OF=function(k){return k instanceof d&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof u)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},h0=function(k){return typeof o=="function"&&k instanceof o},On=function(k,X,J){I[k]&&no(I[k],Dt=>{Dt.call(t,X,J,ai)})},d0=function(k){let X=null;if(On("beforeSanitizeElements",k,null),OF(k))return dr(k),!0;const J=Yt(k.nodeName);if(On("uponSanitizeElement",k,{tagName:J,allowedTags:N}),k.hasChildNodes()&&!h0(k.firstElementChild)&&_e(/<[/\w]/g,k.innerHTML)&&_e(/<[/\w]/g,k.textContent))return dr(k),!0;if(!N[J]||q[J]){if(!q[J]&&p0(J)&&(et.tagNameCheck instanceof RegExp&&_e(et.tagNameCheck,J)||et.tagNameCheck instanceof Function&&et.tagNameCheck(J)))return!1;if(Le&&!ii[J]){const Dt=y(k)||k.parentNode,ee=m(k)||k.childNodes;if(ee&&Dt){const ne=ee.length;for(let pe=ne-1;pe>=0;--pe)Dt.insertBefore(g(ee[pe],!0),v(k))}}return dr(k),!0}return k instanceof l&&!wF(k)||(J==="noscript"||J==="noembed"||J==="noframes")&&_e(/<\/no(script|embed|frames)/i,k.innerHTML)?(dr(k),!0):(F&&k.nodeType===3&&(X=k.textContent,no([w,C,R],Dt=>{X=fs(X,Dt," ")}),k.textContent!==X&&(ds(t.removed,{element:k.cloneNode()}),k.textContent=X)),On("afterSanitizeElements",k,null),!1)},f0=function(k,X,J){if(st&&(X==="id"||X==="name")&&(J in n||J in SF))return!1;if(!(ot&&!Q[X]&&_e(P,X))){if(!(pt&&_e(O,X))){if(!Y[X]||Q[X]){if(!(p0(k)&&(et.tagNameCheck instanceof RegExp&&_e(et.tagNameCheck,k)||et.tagNameCheck instanceof Function&&et.tagNameCheck(k))&&(et.attributeNameCheck instanceof RegExp&&_e(et.attributeNameCheck,X)||et.attributeNameCheck instanceof Function&&et.attributeNameCheck(X))||X==="is"&&et.allowCustomizedBuiltInElements&&(et.tagNameCheck instanceof RegExp&&_e(et.tagNameCheck,J)||et.tagNameCheck instanceof Function&&et.tagNameCheck(J))))return!1}else if(!Xu[X]){if(!_e(U,fs(J,B,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&k!=="script"&&r2(J,"data:")===0&&e0[k])){if(!(Tt&&!_e(H,fs(J,B,"")))){if(J)return!1}}}}}}return!0},p0=function(k){return k.indexOf("-")>0},g0=function(k){On("beforeSanitizeAttributes",k,null);const{attributes:X}=k;if(!X)return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y};let Dt=X.length;for(;Dt--;){const ee=X[Dt],{name:ne,namespaceURI:pe,value:fr}=ee,bs=Yt(ne);let ge=ne==="value"?fr:i2(fr);if(J.attrName=bs,J.attrValue=ge,J.keepAttr=!0,J.forceKeepAttr=void 0,On("uponSanitizeAttribute",k,J),ge=J.attrValue,J.forceKeepAttr||(Qu(ne,k),!J.keepAttr))continue;if(!Z&&_e(/\/>/i,ge)){Qu(ne,k);continue}F&&no([w,C,R],v0=>{ge=fs(ge,v0," ")});const m0=Yt(k.nodeName);if(f0(m0,bs,ge)){if(Rt&&(bs==="id"||bs==="name")&&(Qu(ne,k),ge=hr+ge),E&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!pe)switch(f.getAttributeType(m0,bs)){case"TrustedHTML":{ge=E.createHTML(ge);break}case"TrustedScriptURL":{ge=E.createScriptURL(ge);break}}try{pe?k.setAttributeNS(pe,ne,ge):k.setAttribute(ne,ge),Qm(t.removed)}catch{}}}On("afterSanitizeAttributes",k,null)},MF=function nt(k){let X=null;const J=u0(k);for(On("beforeSanitizeShadowDOM",k,null);X=J.nextNode();)On("uponSanitizeShadowNode",X,null),!d0(X)&&(X.content instanceof s&&nt(X.content),g0(X));On("afterSanitizeShadowDOM",k,null)};return t.sanitize=function(nt){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,J=null,Dt=null,ee=null;if(ju=!nt,ju&&(nt="<!-->"),typeof nt!="string"&&!h0(nt))if(typeof nt.toString=="function"){if(nt=nt.toString(),typeof nt!="string")throw ps("dirty is not a string, aborting")}else throw ps("toString is not a function");if(!t.isSupported)return nt;if($||Ku(k),t.removed=[],typeof nt=="string"&&(Es=!1),Es){if(nt.nodeName){const fr=Yt(nt.nodeName);if(!N[fr]||q[fr])throw ps("root node is forbidden and cannot be sanitized in-place")}}else if(nt instanceof o)X=c0("<!---->"),J=X.ownerDocument.importNode(nt,!0),J.nodeType===1&&J.nodeName==="BODY"||J.nodeName==="HTML"?X=J:X.appendChild(J);else{if(!gt&&!F&&!V&&nt.indexOf("<")===-1)return E&&Gt?E.createHTML(nt):nt;if(X=c0(nt),!X)return gt?null:Gt?_:""}X&&mt&&dr(X.firstChild);const ne=u0(Es?nt:X);for(;Dt=ne.nextNode();)d0(Dt)||(Dt.content instanceof s&&MF(Dt.content),g0(Dt));if(Es)return nt;if(gt){if(Ht)for(ee=M.call(X.ownerDocument);X.firstChild;)ee.appendChild(X.firstChild);else ee=X;return(Y.shadowroot||Y.shadowrootmode)&&(ee=G.call(r,ee,!0)),ee}let pe=V?X.outerHTML:X.innerHTML;return V&&N["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&_e(iv,X.ownerDocument.doctype.name)&&(pe="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
4
4
|
`+pe),F&&no([w,C,R],fr=>{pe=fs(pe,fr," ")}),E&&Gt?E.createHTML(pe):pe},t.setConfig=function(){let nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ku(nt),$=!0},t.clearConfig=function(){ai=null,$=!1},t.isValidAttribute=function(nt,k,X){ai||Ku({});const J=Yt(nt),Dt=Yt(k);return f0(J,Dt,X)},t.addHook=function(nt,k){typeof k=="function"&&(I[nt]=I[nt]||[],ds(I[nt],k))},t.removeHook=function(nt){if(I[nt])return Qm(I[nt])},t.removeHooks=function(nt){I[nt]&&(I[nt]=[])},t.removeAllHooks=function(){I={}},t}var xu=av();const ao=e=>xu.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),y2=e=>xu.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),rn=e=>xu.sanitize(e,{ALLOWED_TAGS:[]}),bo=class bo extends dt{constructor(){super(...arguments),this.type="toolbar",this.renderType=tt.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(T.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(T.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(x(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:i,overflowMenuItemList:s}=this.getControlConfigs();s&&i.push(this.getOverflowButtonConfig());const a=n.selectAll("div.toolbar-control").data(i,c=>c.id);a.exit().remove();const o=a.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),l=this;o.merge(a).classed("disabled",c=>c.shouldBeDisabled()).attr("aria-disabled",c=>c.shouldBeDisabled()).attr("aria-label",c=>c.title).html(c=>`
|