@carbon/charts-react 1.11.5 → 1.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(X,re){typeof exports=="object"&&typeof module<"u"?re(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],re):(X=typeof globalThis<"u"?globalThis:X||self,re(X.ChartsReact={},X.React))})(this,function(X,re){"use strict";var iV=Object.defineProperty;var sV=(X,re,be)=>re in X?iV(X,re,{enumerable:!0,configurable:!0,writable:!0,value:be}):X[re]=be;var hu=(X,re,be)=>(sV(X,typeof re!="symbol"?re+"":re,be),be);function be(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Hv(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function oo(e){let t,n,r;e.length!==2?(t=be,n=(o,l)=>be(e(o),l),r=(o,l)=>e(o)-l):(t=e===be||e===Hv?e:Fv,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 h=c+u>>>1;n(o[h],l)<0?c=h+1:u=h}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 h=c+u>>>1;n(o[h],l)<=0?c=h+1:u=h}while(c<u)}return c}function a(o,l,c=0,u=o.length){const h=i(o,l,c,u-1);return h>c&&r(o[h-1],l)>-r(o[h],l)?h-1:h}return{left:i,center:a,right:s}}function Fv(){return 0}function Gv(e){return e===null?NaN:+e}function*zv(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 jv=oo(be).right;oo(Gv).center;const lo=jv;function Wv(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 Re(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 Bn{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 du extends Map{constructor(t,n=Xv){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(fu(this,t))}has(t){return super.has(fu(this,t))}set(t,n){return super.set(qv(this,t),n)}delete(t){return super.delete(Yv(this,t))}}function fu({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function qv({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Yv({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Xv(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Zv(e){return e}function Kv(e=be){if(e===be)return pu;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 pu(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Qv=Array.prototype,Jv=Qv.slice;function co(e){return()=>e}const t0=Math.sqrt(50),e0=Math.sqrt(10),n0=Math.sqrt(2);function os(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>=t0?10:s>=e0?5:s>=n0?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?os(e,t,n*2):[o,l,c]}function ls(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?os(t,e,n):os(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 hr(e,t,n){return t=+t,e=+e,n=+n,os(e,t,n)[2]}function uo(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?hr(t,e,n):hr(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function r0(e,t,n){let r;for(;;){const i=hr(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 i0(e){return Math.max(1,Math.ceil(Math.log(Wv(e))/Math.LN2)+1)}function s0(){var e=Zv,t=Re,n=i0;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),h=u[0],d=u[1],f=n(c,h,d);if(!Array.isArray(f)){const b=d,S=+f;if(t===Re&&([h,d]=r0(h,d,S)),f=ls(h,d,S),f[0]<=h&&(l=hr(h,d,S)),f[f.length-1]>=d)if(b>=d&&t===Re){const _=hr(h,d,S);isFinite(_)&&(_>0?d=(Math.floor(d/_)+1)*_:_<0&&(d=(Math.ceil(d*-_)+1)/-_))}else f.pop()}for(var p=f.length,m=0,g=p;f[m]<=h;)++m;for(;f[g-1]>d;)--g;(m||g<p)&&(f=f.slice(m,g),p=g-m);var v=new Array(p+1),y;for(s=0;s<=p;++s)y=v[s]=[],y.x0=s>0?f[s-1]:h,y.x1=s<p?f[s]:d;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&h<=o&&o<=d&&v[Math.min(p,Math.floor((o-h)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&h<=o&&o<=d){const b=Math.floor((h-o)*l);v[Math.min(p,b+(f[b]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&h<=o&&o<=d&&v[lo(f,o,0,p)].push(i[s]);return v}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:co(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:co([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:co(Array.isArray(i)?Jv.call(i):i),r):n},r}function Vn(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 gu(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?pu:Kv(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),h=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*h*(l-h)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(t-c*h/l+d)),p=Math.min(r,Math.floor(t+(l-c)*h/l+d));gu(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(Qr(e,n,t),i(e[r],s)>0&&Qr(e,n,r);a<o;){for(Qr(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?Qr(e,n,o):(++o,Qr(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function Qr(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ho(e,t,n){if(e=Float64Array.from(zv(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Mn(e);if(t>=1)return Vn(e);var r,i=(r-1)*t,s=Math.floor(i),a=Vn(gu(e,s).subarray(0,s+1)),o=Mn(e.subarray(s+1));return a+(o-a)*(i-s)}}function*a0(e){for(const t of e)yield*t}function mu(e){return Array.from(a0(e))}function o0(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 l0(e){return e}var cs=1,us=2,fo=3,Jr=4,vu=1e-6;function c0(e){return"translate("+e+",0)"}function u0(e){return"translate(0,"+e+")"}function h0(e){return t=>+e(t)}function d0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function f0(){return!this.__axis}function hs(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===cs||e===Jr?-1:1,u=e===Jr||e===us?"x":"y",h=e===cs||e===fo?c0:u0;function d(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):l0),g=Math.max(s,0)+o,v=t.range(),y=+v[0]+l,b=+v[v.length-1]+l,S=(t.bandwidth?d0:h0)(t.copy(),l),_=f.selection?f.selection():f,E=_.selectAll(".domain").data([null]),T=_.selectAll(".tick").data(p,t).order(),D=T.exit(),N=T.enter().append("g").attr("class","tick"),A=T.select("line"),C=T.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(N),A=A.merge(N.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),C=C.merge(N.append("text").attr("fill","currentColor").attr(u,c*g).attr("dy",e===cs?"0em":e===fo?"0.71em":"0.32em")),f!==_&&(E=E.transition(f),T=T.transition(f),A=A.transition(f),C=C.transition(f),D=D.transition(f).attr("opacity",vu).attr("transform",function(V){return isFinite(V=S(V))?h(V+l):this.getAttribute("transform")}),N.attr("opacity",vu).attr("transform",function(V){var M=this.parentNode.__axis;return h((M&&isFinite(M=M(V))?M:S(V))+l)})),D.remove(),E.attr("d",e===Jr||e===us?a?"M"+c*a+","+y+"H"+l+"V"+b+"H"+c*a:"M"+l+","+y+"V"+b:a?"M"+y+","+c*a+"V"+l+"H"+b+"V"+c*a:"M"+y+","+l+"H"+b),T.attr("opacity",1).attr("transform",function(V){return h(S(V)+l)}),A.attr(u+"2",c*s),C.attr(u,c*g).text(m),_.filter(f0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===us?"start":e===Jr?"end":"middle"),_.each(function(){this.__axis=S})}return d.scale=function(f){return arguments.length?(t=f,d):t},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(f){return arguments.length?(n=f==null?[]:Array.from(f),d):n.slice()},d.tickValues=function(f){return arguments.length?(r=f==null?null:Array.from(f),d):r&&r.slice()},d.tickFormat=function(f){return arguments.length?(i=f,d):i},d.tickSize=function(f){return arguments.length?(s=a=+f,d):s},d.tickSizeInner=function(f){return arguments.length?(s=+f,d):s},d.tickSizeOuter=function(f){return arguments.length?(a=+f,d):a},d.tickPadding=function(f){return arguments.length?(o=+f,d):o},d.offset=function(f){return arguments.length?(l=+f,d):l},d}function p0(e){return hs(cs,e)}function g0(e){return hs(us,e)}function po(e){return hs(fo,e)}function yu(e){return hs(Jr,e)}var m0={value:()=>{}};function go(){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 ds(n)}function ds(e){this._=e}function v0(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}})}ds.prototype=go.prototype={constructor:ds,on:function(e,t){var n=this._,r=v0(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=y0(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]=bu(n[i],e.name,t);else if(t==null)for(i in n)n[i]=bu(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 ds(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 y0(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function bu(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=m0,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var mo="http://www.w3.org/1999/xhtml";const xu={svg:"http://www.w3.org/2000/svg",xhtml:mo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fs(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),xu.hasOwnProperty(t)?{space:xu[t],local:e}:e}function b0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===mo&&t.documentElement.namespaceURI===mo?t.createElement(e):t.createElementNS(n,e)}}function x0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function wu(e){var t=fs(e);return(t.local?x0:b0)(t)}function w0(){}function vo(e){return e==null?w0:function(){return this.querySelector(e)}}function _0(e){typeof e!="function"&&(e=vo(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 xe(r,this._parents)}function E0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function S0(){return[]}function _u(e){return e==null?S0:function(){return this.querySelectorAll(e)}}function O0(e){return function(){return E0(e.apply(this,arguments))}}function T0(e){typeof e=="function"?e=O0(e):e=_u(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 xe(r,i)}function Eu(e){return function(){return this.matches(e)}}function Su(e){return function(t){return t.matches(e)}}var M0=Array.prototype.find;function C0(e){return function(){return M0.call(this.children,e)}}function $0(){return this.firstElementChild}function A0(e){return this.select(e==null?$0:C0(typeof e=="function"?e:Su(e)))}var L0=Array.prototype.filter;function k0(){return Array.from(this.children)}function D0(e){return function(){return L0.call(this.children,e)}}function R0(e){return this.selectAll(e==null?k0:D0(typeof e=="function"?e:Su(e)))}function I0(e){typeof e!="function"&&(e=Eu(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 xe(r,this._parents)}function Ou(e){return new Array(e.length)}function N0(){return new xe(this._enter||this._groups.map(Ou),this._parents)}function ps(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ps.prototype={constructor:ps,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 P0(e){return function(){return e}}function U0(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 ps(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function B0(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,h=s.length,d=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(d[o]=f=a.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<h;++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 ps(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(d[o])===l&&(i[o]=l)}function V0(e){return e.__data__}function H0(e,t){if(!arguments.length)return Array.from(this,V0);var n=t?B0:U0,r=this._parents,i=this._groups;typeof e!="function"&&(e=P0(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],h=i[c],d=h.length,f=F0(e.call(u,u&&u.__data__,c,r)),p=f.length,m=o[c]=new Array(p),g=a[c]=new Array(p),v=l[c]=new Array(d);n(u,h,m,g,v,f,t);for(var y=0,b=0,S,_;y<p;++y)if(S=m[y]){for(y>=b&&(b=y+1);!(_=g[b])&&++b<p;);S._next=_||null}}return a=new xe(a,r),a._enter=o,a._exit=l,a}function F0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function G0(){return new xe(this._exit||this._groups.map(Ou),this._parents)}function z0(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 j0(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],h=c.length,d=o[l]=new Array(h),f,p=0;p<h;++p)(f=c[p]||u[p])&&(d[p]=f);for(;l<i;++l)o[l]=n[l];return new xe(o,this._parents)}function W0(){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 q0(e){e||(e=Y0);function t(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}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 xe(i,this._parents).order()}function Y0(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function X0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Z0(){return Array.from(this)}function K0(){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 Q0(){let e=0;for(const t of this)++e;return e}function J0(){return!this.node()}function ty(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 ey(e){return function(){this.removeAttribute(e)}}function ny(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ry(e,t){return function(){this.setAttribute(e,t)}}function iy(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function sy(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ay(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 oy(e,t){var n=fs(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?ny:ey:typeof t=="function"?n.local?ay:sy:n.local?iy:ry)(n,t))}function Tu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ly(e){return function(){this.style.removeProperty(e)}}function cy(e,t,n){return function(){this.style.setProperty(e,t,n)}}function uy(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function hy(e,t,n){return arguments.length>1?this.each((t==null?ly:typeof t=="function"?uy:cy)(e,t,n??"")):dr(this.node(),e)}function dr(e,t){return e.style.getPropertyValue(t)||Tu(e).getComputedStyle(e,null).getPropertyValue(t)}function dy(e){return function(){delete this[e]}}function fy(e,t){return function(){this[e]=t}}function py(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function gy(e,t){return arguments.length>1?this.each((t==null?dy:typeof t=="function"?py:fy)(e,t)):this.node()[e]}function Mu(e){return e.trim().split(/^|\s+/)}function yo(e){return e.classList||new Cu(e)}function Cu(e){this._node=e,this._names=Mu(e.getAttribute("class")||"")}Cu.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 $u(e,t){for(var n=yo(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Au(e,t){for(var n=yo(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function my(e){return function(){$u(this,e)}}function vy(e){return function(){Au(this,e)}}function yy(e,t){return function(){(t.apply(this,arguments)?$u:Au)(this,e)}}function by(e,t){var n=Mu(e+"");if(arguments.length<2){for(var r=yo(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?yy:t?my:vy)(n,t))}function xy(){this.textContent=""}function wy(e){return function(){this.textContent=e}}function _y(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ey(e){return arguments.length?this.each(e==null?xy:(typeof e=="function"?_y:wy)(e)):this.node().textContent}function Sy(){this.innerHTML=""}function Oy(e){return function(){this.innerHTML=e}}function Ty(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function My(e){return arguments.length?this.each(e==null?Sy:(typeof e=="function"?Ty:Oy)(e)):this.node().innerHTML}function Cy(){this.nextSibling&&this.parentNode.appendChild(this)}function $y(){return this.each(Cy)}function Ay(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ly(){return this.each(Ay)}function ky(e){var t=typeof e=="function"?e:wu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Dy(){return null}function Ry(e,t){var n=typeof e=="function"?e:wu(e),r=t==null?Dy:typeof t=="function"?t:vo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Iy(){var e=this.parentNode;e&&e.removeChild(this)}function Ny(){return this.each(Iy)}function Py(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Uy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function By(e){return this.select(e?Uy:Py)}function Vy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Hy(e){return function(t){e.call(this,t,this.__data__)}}function Fy(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 Gy(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 zy(e,t,n){return function(){var r=this.__on,i,s=Hy(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 jy(e,t,n){var r=Fy(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?zy:Gy,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function Lu(e,t,n){var r=Tu(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 Wy(e,t){return function(){return Lu(this,e,t)}}function qy(e,t){return function(){return Lu(this,e,t.apply(this,arguments))}}function Yy(e,t){return this.each((typeof t=="function"?qy:Wy)(e,t))}function*Xy(){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 ku=[null];function xe(e,t){this._groups=e,this._parents=t}function ti(){return new xe([[document.documentElement]],ku)}function Zy(){return this}xe.prototype=ti.prototype={constructor:xe,select:_0,selectAll:T0,selectChild:A0,selectChildren:R0,filter:I0,data:H0,enter:N0,exit:G0,join:z0,merge:j0,selection:Zy,order:W0,sort:q0,call:X0,nodes:Z0,node:K0,size:Q0,empty:J0,each:ty,attr:oy,style:hy,property:gy,classed:by,text:Ey,html:My,raise:$y,lower:Ly,append:ky,insert:Ry,remove:Ny,clone:By,datum:Vy,on:jy,dispatch:Yy,[Symbol.iterator]:Xy};function R(e){return typeof e=="string"?new xe([[document.querySelector(e)]],[document.documentElement]):new xe([[e]],ku)}function Ky(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Hn(e,t){if(e=Ky(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 bo={capture:!0,passive:!1};function xo(e){e.preventDefault(),e.stopImmediatePropagation()}function Qy(e){var t=e.document.documentElement,n=R(e).on("dragstart.drag",xo,bo);"onselectstart"in t?n.on("selectstart.drag",xo,bo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Jy(e,t){var n=e.document.documentElement,r=R(e).on("dragstart.drag",null);t&&(r.on("click.drag",xo,bo),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 wo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Du(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ei(){}var ni=.7,gs=1/ni,fr="\\s*([+-]?\\d+)\\s*",ri="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",We="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",t1=/^#([0-9a-f]{3,8})$/,e1=new RegExp(`^rgb\\(${fr},${fr},${fr}\\)$`),n1=new RegExp(`^rgb\\(${We},${We},${We}\\)$`),r1=new RegExp(`^rgba\\(${fr},${fr},${fr},${ri}\\)$`),i1=new RegExp(`^rgba\\(${We},${We},${We},${ri}\\)$`),s1=new RegExp(`^hsl\\(${ri},${We},${We}\\)$`),a1=new RegExp(`^hsla\\(${ri},${We},${We},${ri}\\)$`),Ru={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};wo(ei,rn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Iu,formatHex:Iu,formatHex8:o1,formatHsl:l1,formatRgb:Nu,toString:Nu});function Iu(){return this.rgb().formatHex()}function o1(){return this.rgb().formatHex8()}function l1(){return Hu(this).formatHsl()}function Nu(){return this.rgb().formatRgb()}function rn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=t1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Pu(t):n===3?new fe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ms(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=e1.exec(e))?new fe(t[1],t[2],t[3],1):(t=n1.exec(e))?new fe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=r1.exec(e))?ms(t[1],t[2],t[3],t[4]):(t=i1.exec(e))?ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=s1.exec(e))?Vu(t[1],t[2]/100,t[3]/100,1):(t=a1.exec(e))?Vu(t[1],t[2]/100,t[3]/100,t[4]):Ru.hasOwnProperty(e)?Pu(Ru[e]):e==="transparent"?new fe(NaN,NaN,NaN,0):null}function Pu(e){return new fe(e>>16&255,e>>8&255,e&255,1)}function ms(e,t,n,r){return r<=0&&(e=t=n=NaN),new fe(e,t,n,r)}function c1(e){return e instanceof ei||(e=rn(e)),e?(e=e.rgb(),new fe(e.r,e.g,e.b,e.opacity)):new fe}function _o(e,t,n,r){return arguments.length===1?c1(e):new fe(e,t,n,r??1)}function fe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}wo(fe,_o,Du(ei,{brighter(e){return e=e==null?gs:Math.pow(gs,e),new fe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ni:Math.pow(ni,e),new fe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fe(Fn(this.r),Fn(this.g),Fn(this.b),vs(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:Uu,formatHex:Uu,formatHex8:u1,formatRgb:Bu,toString:Bu}));function Uu(){return`#${Gn(this.r)}${Gn(this.g)}${Gn(this.b)}`}function u1(){return`#${Gn(this.r)}${Gn(this.g)}${Gn(this.b)}${Gn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Bu(){const e=vs(this.opacity);return`${e===1?"rgb(":"rgba("}${Fn(this.r)}, ${Fn(this.g)}, ${Fn(this.b)}${e===1?")":`, ${e})`}`}function vs(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 Gn(e){return e=Fn(e),(e<16?"0":"")+e.toString(16)}function Vu(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ie(e,t,n,r)}function Hu(e){if(e instanceof Ie)return new Ie(e.h,e.s,e.l,e.opacity);if(e instanceof ei||(e=rn(e)),!e)return new Ie;if(e instanceof Ie)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 Ie(a,o,l,e.opacity)}function Eo(e,t,n,r){return arguments.length===1?Hu(e):new Ie(e,t,n,r??1)}function Ie(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}wo(Ie,Eo,Du(ei,{brighter(e){return e=e==null?gs:Math.pow(gs,e),new Ie(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ni:Math.pow(ni,e),new Ie(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 fe(So(e>=240?e-240:e+120,i,r),So(e,i,r),So(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ie(Fu(this.h),ys(this.s),ys(this.l),vs(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=vs(this.opacity);return`${e===1?"hsl(":"hsla("}${Fu(this.h)}, ${ys(this.s)*100}%, ${ys(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Fu(e){return e=(e||0)%360,e<0?e+360:e}function ys(e){return Math.max(0,Math.min(1,e||0))}function So(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 Oo=e=>()=>e;function h1(e,t){return function(n){return e+n*t}}function d1(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 f1(e){return(e=+e)==1?Gu:function(t,n){return n-t?d1(t,n,e):Oo(isNaN(t)?n:t)}}function Gu(e,t){var n=t-e;return n?h1(e,n):Oo(isNaN(e)?t:e)}const bs=function e(t){var n=f1(t);function r(i,s){var a=n((i=_o(i)).r,(s=_o(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=Gu(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 p1(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 g1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function m1(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]=ii(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 v1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function we(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function y1(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]=ii(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var To=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mo=new RegExp(To.source,"g");function b1(e){return function(){return e}}function x1(e){return function(t){return e(t)+""}}function zu(e,t){var n=To.lastIndex=Mo.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=To.exec(e))&&(i=Mo.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:we(r,i)})),n=Mo.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?x1(l[0].x):b1(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)o[(h=l[u]).i]=h.x(c);return o.join("")})}function ii(e,t){var n=typeof t,r;return t==null||n==="boolean"?Oo(t):(n==="number"?we:n==="string"?(r=rn(t))?(t=r,bs):zu:t instanceof rn?bs:t instanceof Date?v1:g1(t)?p1:Array.isArray(t)?m1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?y1:we)(e,t)}function ju(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Wu=180/Math.PI,Co={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qu(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)*Wu,skewX:Math.atan(l)*Wu,scaleX:a,scaleY:o}}var xs;function w1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Co:qu(t.a,t.b,t.c,t.d,t.e,t.f)}function _1(e){return e==null||(xs||(xs=document.createElementNS("http://www.w3.org/2000/svg","g")),xs.setAttribute("transform",e),!(e=xs.transform.baseVal.consolidate()))?Co:(e=e.matrix,qu(e.a,e.b,e.c,e.d,e.e,e.f))}function Yu(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,h,d,f,p){if(c!==h||u!==d){var m=f.push("translate(",null,t,null,n);p.push({i:m-4,x:we(c,h)},{i:m-2,x:we(u,d)})}else(h||d)&&f.push("translate("+h+t+d+n)}function a(c,u,h,d){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),d.push({i:h.push(i(h)+"rotate(",null,r)-2,x:we(c,u)})):u&&h.push(i(h)+"rotate("+u+r)}function o(c,u,h,d){c!==u?d.push({i:h.push(i(h)+"skewX(",null,r)-2,x:we(c,u)}):u&&h.push(i(h)+"skewX("+u+r)}function l(c,u,h,d,f,p){if(c!==h||u!==d){var m=f.push(i(f)+"scale(",null,",",null,")");p.push({i:m-4,x:we(c,h)},{i:m-2,x:we(u,d)})}else(h!==1||d!==1)&&f.push(i(f)+"scale("+h+","+d+")")}return function(c,u){var h=[],d=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,h,d),a(c.rotate,u.rotate,h,d),o(c.skewX,u.skewX,h,d),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,d),c=u=null,function(f){for(var p=-1,m=d.length,g;++p<m;)h[(g=d[p]).i]=g.x(f);return h.join("")}}}var E1=Yu(w1,"px, ","px)","deg)"),S1=Yu(_1,", ",")",")");function O1(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var pr=0,si=0,ai=0,Xu=1e3,ws,oi,_s=0,zn=0,Es=0,li=typeof performance=="object"&&performance.now?performance:Date,Zu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function $o(){return zn||(Zu(T1),zn=li.now()+Es)}function T1(){zn=0}function Ss(){this._call=this._time=this._next=null}Ss.prototype=Ku.prototype={constructor:Ss,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?$o():+n)+(t==null?0:+t),!this._next&&oi!==this&&(oi?oi._next=this:ws=this,oi=this),this._call=e,this._time=n,Ao()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ao())}};function Ku(e,t,n){var r=new Ss;return r.restart(e,t,n),r}function M1(){$o(),++pr;for(var e=ws,t;e;)(t=zn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pr}function Qu(){zn=(_s=li.now())+Es,pr=si=0;try{M1()}finally{pr=0,$1(),zn=0}}function C1(){var e=li.now(),t=e-_s;t>Xu&&(Es-=t,_s=e)}function $1(){for(var e,t=ws,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:ws=n);oi=e,Ao(r)}function Ao(e){if(!pr){si&&(si=clearTimeout(si));var t=e-zn;t>24?(e<1/0&&(si=setTimeout(Qu,e-li.now()-Es)),ai&&(ai=clearInterval(ai))):(ai||(_s=li.now(),ai=setInterval(C1,Xu)),pr=1,Zu(Qu))}}function Ju(e,t,n){var r=new Ss;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var A1=go("start","end","cancel","interrupt"),L1=[],th=0,eh=1,Lo=2,Os=3,nh=4,ko=5,Ts=6;function Ms(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;k1(e,n,{name:t,index:r,group:i,on:A1,tween:L1,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:th})}function Do(e,t){var n=Ne(e,t);if(n.state>th)throw new Error("too late; already scheduled");return n}function qe(e,t){var n=Ne(e,t);if(n.state>Os)throw new Error("too late; already running");return n}function Ne(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function k1(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Ku(s,0,n.time);function s(c){n.state=eh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,h,d,f;if(n.state!==eh)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===Os)return Ju(a);f.state===nh?(f.state=Ts,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=Ts,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Ju(function(){n.state===Os&&(n.state=nh,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Lo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Lo){for(n.state=Os,i=new Array(d=n.tween.length),u=0,h=-1;u<d;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=f);i.length=h+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=ko,1),h=-1,d=i.length;++h<d;)i[h].call(e,u);n.state===ko&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Ts,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Ro(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>Lo&&r.state<ko,r.state=Ts,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function D1(e){return this.each(function(){Ro(this,e)})}function R1(e,t){var n,r;return function(){var i=qe(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 I1(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=qe(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 N1(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Ne(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?R1:I1)(n,e,t))}function Io(e,t,n){var r=e._id;return e.each(function(){var i=qe(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Ne(i,r).value[t]}}function rh(e,t){var n;return(typeof t=="number"?we:t instanceof rn?bs:(n=rn(t))?(t=n,bs):zu)(e,t)}function P1(e){return function(){this.removeAttribute(e)}}function U1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function B1(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 V1(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 H1(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 F1(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 G1(e,t){var n=fs(e),r=n==="transform"?S1:rh;return this.attrTween(e,typeof t=="function"?(n.local?F1:H1)(n,r,Io(this,"attr."+e,t)):t==null?(n.local?U1:P1)(n):(n.local?V1:B1)(n,r,t))}function z1(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function j1(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function W1(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&j1(e,s)),n}return i._value=t,i}function q1(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&z1(e,s)),n}return i._value=t,i}function Y1(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=fs(e);return this.tween(n,(r.local?W1:q1)(r,t))}function X1(e,t){return function(){Do(this,e).delay=+t.apply(this,arguments)}}function Z1(e,t){return t=+t,function(){Do(this,e).delay=t}}function K1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?X1:Z1)(t,e)):Ne(this.node(),t).delay}function Q1(e,t){return function(){qe(this,e).duration=+t.apply(this,arguments)}}function J1(e,t){return t=+t,function(){qe(this,e).duration=t}}function tb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Q1:J1)(t,e)):Ne(this.node(),t).duration}function eb(e,t){if(typeof t!="function")throw new Error;return function(){qe(this,e).ease=t}}function nb(e){var t=this._id;return arguments.length?this.each(eb(t,e)):Ne(this.node(),t).ease}function rb(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;qe(this,e).ease=n}}function ib(e){if(typeof e!="function")throw new Error;return this.each(rb(this._id,e))}function sb(e){typeof e!="function"&&(e=Eu(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 sn(r,this._parents,this._name,this._id)}function ab(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,h=a[o]=new Array(u),d,f=0;f<u;++f)(d=l[f]||c[f])&&(h[f]=d);for(;o<r;++o)a[o]=t[o];return new sn(a,this._parents,this._name,this._id)}function ob(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 lb(e,t,n){var r,i,s=ob(t)?Do:qe;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function cb(e,t){var n=this._id;return arguments.length<2?Ne(this.node(),n).on.on(e):this.each(lb(n,e,t))}function ub(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function hb(){return this.on("end.remove",ub(this._id))}function db(e){var t=this._name,n=this._id;typeof e!="function"&&(e=vo(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,h,d=0;d<l;++d)(u=o[d])&&(h=e.call(u,u.__data__,d,o))&&("__data__"in u&&(h.__data__=u.__data__),c[d]=h,Ms(c[d],t,n,d,c,Ne(u,n)));return new sn(s,this._parents,t,n)}function fb(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_u(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,h=0;h<c;++h)if(u=l[h]){for(var d=e.call(u,u.__data__,h,l),f,p=Ne(u,n),m=0,g=d.length;m<g;++m)(f=d[m])&&Ms(f,t,n,m,d,p);s.push(d),a.push(u)}return new sn(s,a,t,n)}var pb=ti.prototype.constructor;function gb(){return new pb(this._groups,this._parents)}function mb(e,t){var n,r,i;return function(){var s=dr(this,e),a=(this.style.removeProperty(e),dr(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function ih(e){return function(){this.style.removeProperty(e)}}function vb(e,t,n){var r,i=n+"",s;return function(){var a=dr(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function yb(e,t,n){var r,i,s;return function(){var a=dr(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),dr(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function bb(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=qe(this,e),c=l.on,u=l.value[s]==null?o||(o=ih(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function xb(e,t,n){var r=(e+="")=="transform"?E1:rh;return t==null?this.styleTween(e,mb(e,r)).on("end.style."+e,ih(e)):typeof t=="function"?this.styleTween(e,yb(e,r,Io(this,"style."+e,t))).each(bb(this._id,e)):this.styleTween(e,vb(e,r,t),n).on("end.style."+e,null)}function wb(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function _b(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&wb(e,a,n)),r}return s._value=t,s}function Eb(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,_b(e,t,n??""))}function Sb(e){return function(){this.textContent=e}}function Ob(e){return function(){var t=e(this);this.textContent=t??""}}function Tb(e){return this.tween("text",typeof e=="function"?Ob(Io(this,"text",e)):Sb(e==null?"":e+""))}function Mb(e){return function(t){this.textContent=e.call(this,t)}}function Cb(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Mb(i)),t}return r._value=e,r}function $b(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,Cb(e))}function Ab(){for(var e=this._name,t=this._id,n=sh(),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=Ne(l,t);Ms(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new sn(r,this._parents,e,n)}function Lb(){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=qe(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 kb=0;function sn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function sh(){return++kb}var an=ti.prototype;sn.prototype={constructor:sn,select:db,selectAll:fb,selectChild:an.selectChild,selectChildren:an.selectChildren,filter:sb,merge:ab,selection:gb,transition:Ab,call:an.call,nodes:an.nodes,node:an.node,size:an.size,empty:an.empty,each:an.each,on:cb,attr:G1,attrTween:Y1,style:xb,styleTween:Eb,text:Tb,textTween:$b,remove:hb,tween:N1,delay:K1,duration:tb,ease:nb,easeVarying:ib,end:Lb,[Symbol.iterator]:an[Symbol.iterator]};const Db=e=>+e;function ah(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Rb={time:null,delay:0,duration:250,ease:ah};function Ib(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 Nb(e){var t,n;e instanceof sn?(t=e._id,e=e._name):(t=sh(),(n=Rb).time=$o(),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])&&Ms(l,e,t,c,a,n||Ib(l,t));return new sn(r,this._parents,e,t)}ti.prototype.interrupt=D1,ti.prototype.transition=Nb;const No=e=>()=>e;function Pb(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 Ub(e){e.stopImmediatePropagation()}function Po(e){e.preventDefault(),e.stopImmediatePropagation()}var oh={name:"drag"},Uo={name:"space"},gr={name:"handle"},mr={name:"center"};const{abs:lh,max:ie,min:se}=Math;function ch(e){return[+e[0],+e[1]]}function uh(e){return[ch(e[0]),ch(e[1])]}var Cs={name:"x",handles:["w","e"].map($s),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]]}},Bo={name:"y",handles:["n","s"].map($s),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]]}},on={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},hh={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},dh={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Bb={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Vb={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function $s(e){return{type:e}}function Hb(e){return!e.ctrlKey&&!e.button}function Fb(){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 Gb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vo(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function zb(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function fh(){return jb(Cs)}function jb(e){var t=Fb,n=Hb,r=Gb,i=!0,s=go("start","brush","end"),a=6,o;function l(g){var v=g.property("__brush",m).selectAll(".overlay").data([$s("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",on.overlay).merge(v).each(function(){var b=Vo(this).extent;R(this).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1])}),g.selectAll(".selection").data([$s("selection")]).enter().append("rect").attr("class","selection").attr("cursor",on.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=g.selectAll(".handle").data(e.handles,function(b){return b.type});y.exit().remove(),y.enter().append("rect").attr("class",function(b){return"handle handle--"+b.type}).attr("cursor",function(b){return on[b.type]}),g.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(r).on("touchstart.brush",d).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(g,v,y){g.tween?g.on("start.brush",function(b){u(this,arguments).beforestart().start(b)}).on("interrupt.brush end.brush",function(b){u(this,arguments).end(b)}).tween("brush",function(){var b=this,S=b.__brush,_=u(b,arguments),E=S.selection,T=e.input(typeof v=="function"?v.apply(this,arguments):v,S.extent),D=ii(E,T);function N(A){S.selection=A===1&&T===null?null:D(A),c.call(b),_.brush()}return E!==null&&T!==null?N:N(1)}):g.each(function(){var b=this,S=arguments,_=b.__brush,E=e.input(typeof v=="function"?v.apply(b,S):v,_.extent),T=u(b,S).beforestart();Ro(b),_.selection=E===null?null:E,c.call(b),T.start(y).brush(y).end(y)})},l.clear=function(g,v){l.move(g,null,v)};function c(){var g=R(this),v=Vo(this).selection;v?(g.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),g.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(y){return y.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(y){return y.type==="e"||y.type==="w"?v[1][1]-v[0][1]+a:a})):g.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(g,v,y){var b=g.__brush.emitter;return b&&(!y||!b.clean)?b:new h(g,v,y)}function h(g,v,y){this.that=g,this.args=v,this.state=g.__brush,this.active=0,this.clean=y}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(g,v){return this.starting?(this.starting=!1,this.emit("start",g,v)):this.emit("brush",g),this},brush:function(g,v){return this.emit("brush",g,v),this},end:function(g,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",g,v)),this},emit:function(g,v,y){var b=R(this.that).datum();s.call(g,this.that,new Pb(g,{sourceEvent:v,target:l,selection:e.output(this.state.selection),mode:y,dispatch:s}),b)}};function d(g){if(o&&!g.touches||!n.apply(this,arguments))return;var v=this,y=g.target.__data__.type,b=(i&&g.metaKey?y="overlay":y)==="selection"?oh:i&&g.altKey?mr:gr,S=e===Bo?null:Bb[y],_=e===Cs?null:Vb[y],E=Vo(v),T=E.extent,D=E.selection,N=T[0][0],A,C,V=T[0][1],M,L,w=T[1][0],P,U,I=T[1][1],B,j,Y=0,et=0,pt,z=S&&_&&i&&g.shiftKey,K,ht,it=Array.from(g.touches||[g],nt=>{const It=nt.identifier;return nt=Hn(nt,v),nt.point0=nt.slice(),nt.identifier=It,nt});Ro(v);var Mt=u(v,arguments,!0).beforestart();if(y==="overlay"){D&&(pt=!0);const nt=[it[0],it[1]||it[0]];E.selection=D=[[A=e===Bo?N:se(nt[0][0],nt[1][0]),M=e===Cs?V:se(nt[0][1],nt[1][1])],[P=e===Bo?w:ie(nt[0][0],nt[1][0]),B=e===Cs?I:ie(nt[0][1],nt[1][1])]],it.length>1&&Ut(g)}else A=D[0][0],M=D[0][1],P=D[1][0],B=D[1][1];C=A,L=M,U=P,j=B;var W=R(v).attr("pointer-events","none"),J=W.selectAll(".overlay").attr("cursor",on[y]);if(g.touches)Mt.moved=F,Mt.ended=bt;else{var ct=R(g.view).on("mousemove.brush",F,!0).on("mouseup.brush",bt,!0);i&&ct.on("keydown.brush",zt,!0).on("keyup.brush",jt,!0),Qy(g.view)}c.call(v),Mt.start(g,b.name);function F(nt){for(const It of nt.changedTouches||[nt])for(const en of it)en.identifier===It.identifier&&(en.cur=Hn(It,v));if(z&&!K&&!ht&&it.length===1){const It=it[0];lh(It.cur[0]-It[0])>lh(It.cur[1]-It[1])?ht=!0:K=!0}for(const It of it)It.cur&&(It[0]=It.cur[0],It[1]=It.cur[1]);pt=!0,Po(nt),Ut(nt)}function Ut(nt){const It=it[0],en=It.point0;var nn;switch(Y=It[0]-en[0],et=It[1]-en[1],b){case Uo:case oh:{S&&(Y=ie(N-A,se(w-P,Y)),C=A+Y,U=P+Y),_&&(et=ie(V-M,se(I-B,et)),L=M+et,j=B+et);break}case gr:{it[1]?(S&&(C=ie(N,se(w,it[0][0])),U=ie(N,se(w,it[1][0])),S=1),_&&(L=ie(V,se(I,it[0][1])),j=ie(V,se(I,it[1][1])),_=1)):(S<0?(Y=ie(N-A,se(w-A,Y)),C=A+Y,U=P):S>0&&(Y=ie(N-P,se(w-P,Y)),C=A,U=P+Y),_<0?(et=ie(V-M,se(I-M,et)),L=M+et,j=B):_>0&&(et=ie(V-B,se(I-B,et)),L=M,j=B+et));break}case mr:{S&&(C=ie(N,se(w,A-Y*S)),U=ie(N,se(w,P+Y*S))),_&&(L=ie(V,se(I,M-et*_)),j=ie(V,se(I,B+et*_)));break}}U<C&&(S*=-1,nn=A,A=P,P=nn,nn=C,C=U,U=nn,y in hh&&J.attr("cursor",on[y=hh[y]])),j<L&&(_*=-1,nn=M,M=B,B=nn,nn=L,L=j,j=nn,y in dh&&J.attr("cursor",on[y=dh[y]])),E.selection&&(D=E.selection),K&&(C=D[0][0],U=D[1][0]),ht&&(L=D[0][1],j=D[1][1]),(D[0][0]!==C||D[0][1]!==L||D[1][0]!==U||D[1][1]!==j)&&(E.selection=[[C,L],[U,j]],c.call(v),Mt.brush(nt,b.name))}function bt(nt){if(Ub(nt),nt.touches){if(nt.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else Jy(nt.view,pt),ct.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),J.attr("cursor",on.overlay),E.selection&&(D=E.selection),zb(D)&&(E.selection=null,c.call(v)),Mt.end(nt,b.name)}function zt(nt){switch(nt.keyCode){case 16:{z=S&&_;break}case 18:{b===gr&&(S&&(P=U-Y*S,A=C+Y*S),_&&(B=j-et*_,M=L+et*_),b=mr,Ut(nt));break}case 32:{(b===gr||b===mr)&&(S<0?P=U-Y:S>0&&(A=C-Y),_<0?B=j-et:_>0&&(M=L-et),b=Uo,J.attr("cursor",on.selection),Ut(nt));break}default:return}Po(nt)}function jt(nt){switch(nt.keyCode){case 16:{z&&(K=ht=z=!1,Ut(nt));break}case 18:{b===mr&&(S<0?P=U:S>0&&(A=C),_<0?B=j:_>0&&(M=L),b=gr,Ut(nt));break}case 32:{b===Uo&&(nt.altKey?(S&&(P=U-Y*S,A=C+Y*S),_&&(B=j-et*_,M=L+et*_),b=mr):(S<0?P=U:S>0&&(A=C),_<0?B=j:_>0&&(M=L),b=gr),J.attr("cursor",on[y]),Ut(nt));break}default:return}Po(nt)}}function f(g){u(this,arguments).moved(g)}function p(g){u(this,arguments).ended(g)}function m(){var g=this.__brush||{selection:null};return g.extent=uh(t.apply(this,arguments)),g.dim=e,g}return l.extent=function(g){return arguments.length?(t=typeof g=="function"?g:No(uh(g)),l):t},l.filter=function(g){return arguments.length?(n=typeof g=="function"?g:No(!!g),l):n},l.touchable=function(g){return arguments.length?(r=typeof g=="function"?g:No(!!g),l):r},l.handleSize=function(g){return arguments.length?(a=+g,l):a},l.keyModifiers=function(g){return arguments.length?(i=!!g,l):i},l.on=function(){var g=s.on.apply(s,arguments);return g===s?l:g},l}const Ho=Math.PI,Fo=2*Ho,jn=1e-6,Wb=Fo-jn;function ph(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ph;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 Go=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ph:qb(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,h=o-n,d=u*u+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>jn)if(!(Math.abs(h*l-c*u)>jn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,m=l*l+c*c,g=f*f+p*p,v=Math.sqrt(m),y=Math.sqrt(d),b=s*Math.tan((Ho-Math.acos((m+d-g)/(2*v*y)))/2),S=b/y,_=b/v;Math.abs(S-1)>jn&&this._append`L${t+S*u},${n+S*h}`,this._append`A${s},${s},0,0,${+(h*f>u*p)},${this._x1=t+_*l},${this._y1=n+_*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,h=1^a,d=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>jn||Math.abs(this._y1-u)>jn)&&this._append`L${c},${u}`,r&&(d<0&&(d=d%Fo+Fo),d>Wb?this._append`A${r},${r},0,1,${h},${t-o},${n-l}A${r},${r},0,1,${h},${this._x1=c},${this._y1=u}`:d>jn&&this._append`A${r},${r},0,${+(d>=Ho)},${h},${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 gh(){return new Go}gh.prototype=Go.prototype;function Yb(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function As(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 vr(e){return e=As(Math.abs(e)),e?e[1]:NaN}function Xb(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 Zb(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Kb=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ci(e){if(!(t=Kb.exec(e)))throw new Error("invalid format: "+e);var t;return new zo({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]})}ci.prototype=zo.prototype;function zo(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+""}zo.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 Qb(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 mh;function Jb(e,t){var n=As(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(mh=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")+As(e,Math.max(0,t+s-1))[0]}function vh(e,t){var n=As(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 yh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Yb,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)=>vh(e*100,t),r:vh,s:Jb,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bh(e){return e}var xh=Array.prototype.map,wh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tx(e){var t=e.grouping===void 0||e.thousands===void 0?bh:Xb(xh.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?bh:Zb(xh.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(h){h=ci(h);var d=h.fill,f=h.align,p=h.sign,m=h.symbol,g=h.zero,v=h.width,y=h.comma,b=h.precision,S=h.trim,_=h.type;_==="n"?(y=!0,_="g"):yh[_]||(b===void 0&&(b=12),S=!0,_="g"),(g||d==="0"&&f==="=")&&(g=!0,d="0",f="=");var E=m==="$"?n:m==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",T=m==="$"?r:/[%p]/.test(_)?a:"",D=yh[_],N=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function A(C){var V=E,M=T,L,w,P;if(_==="c")M=D(C)+M,C="";else{C=+C;var U=C<0||1/C<0;if(C=isNaN(C)?l:D(Math.abs(C),b),S&&(C=Qb(C)),U&&+C==0&&p!=="+"&&(U=!1),V=(U?p==="("?p:o:p==="-"||p==="("?"":p)+V,M=(_==="s"?wh[8+mh/3]:"")+M+(U&&p==="("?")":""),N){for(L=-1,w=C.length;++L<w;)if(P=C.charCodeAt(L),48>P||P>57){M=(P===46?i+C.slice(L+1):C.slice(L))+M,C=C.slice(0,L);break}}}y&&!g&&(C=t(C,1/0));var I=V.length+C.length+M.length,B=I<v?new Array(v-I+1).join(d):"";switch(y&&g&&(C=t(B+C,B.length?v-M.length:1/0),B=""),f){case"<":C=V+C+M+B;break;case"=":C=V+B+C+M;break;case"^":C=B.slice(0,I=B.length>>1)+V+C+M+B.slice(I);break;default:C=B+V+C+M;break}return s(C)}return A.toString=function(){return h+""},A}function u(h,d){var f=c((h=ci(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(vr(d)/3)))*3,m=Math.pow(10,-p),g=wh[8+p/3];return function(v){return f(m*v)+g}}return{format:c,formatPrefix:u}}var Ls,jo,_h;ex({thousands:",",grouping:[3],currency:["$",""]});function ex(e){return Ls=tx(e),jo=Ls.format,_h=Ls.formatPrefix,Ls}function nx(e){return Math.max(0,-vr(Math.abs(e)))}function rx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vr(t)/3)))*3-vr(Math.abs(e)))}function ix(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vr(t)-vr(e))+1}var _t=1e-6,Eh=1e-12,dt=Math.PI,pe=dt/2,Sh=dt/4,_e=dt*2,ce=180/dt,Ht=dt/180,Et=Math.abs,Oh=Math.atan,Wn=Math.atan2,Ot=Math.cos,sx=Math.exp,ax=Math.log,wt=Math.sin,Cn=Math.sign||function(e){return e>0?1:e<0?-1:0},Pe=Math.sqrt,ox=Math.tan;function lx(e){return e>1?0:e<-1?dt:Math.acos(e)}function ln(e){return e>1?pe:e<-1?-pe:Math.asin(e)}function Me(){}function ks(e,t){e&&Mh.hasOwnProperty(e.type)&&Mh[e.type](e,t)}var Th={Feature:function(e,t){ks(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)ks(n[r].geometry,t)}},Mh={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){Wo(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Wo(n[r],t,0)},Polygon:function(e,t){Ch(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Ch(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)ks(n[r],t)}};function Wo(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 Ch(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Wo(e[n],t,1);t.polygonEnd()}function yr(e,t){e&&Th.hasOwnProperty(e.type)?Th[e.type](e,t):ks(e,t)}function qo(e){return[Wn(e[1],e[0]),ln(e[2])]}function br(e){var t=e[0],n=e[1],r=Ot(n);return[r*Ot(t),r*wt(t),wt(n)]}function Ds(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Rs(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 Yo(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Is(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Xo(e){var t=Pe(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Zo(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 Ko(e,t){return Et(e)>dt&&(e-=Math.round(e/_e)*_e),[e,t]}Ko.invert=Ko;function $h(e,t,n){return(e%=_e)?t||n?Zo(Lh(e),kh(t,n)):Lh(e):t||n?kh(t,n):Ko}function Ah(e){return function(t,n){return t+=e,Et(t)>dt&&(t-=Math.round(t/_e)*_e),[t,n]}}function Lh(e){var t=Ah(e);return t.invert=Ah(-e),t}function kh(e,t){var n=Ot(e),r=wt(e),i=Ot(t),s=wt(t);function a(o,l){var c=Ot(l),u=Ot(o)*c,h=wt(o)*c,d=wt(l),f=d*n+u*r;return[Wn(h*i-f*s,u*n-d*r),ln(f*i+h*s)]}return a.invert=function(o,l){var c=Ot(l),u=Ot(o)*c,h=wt(o)*c,d=wt(l),f=d*i-h*s;return[Wn(h*i+d*s,u*n+f*r),ln(f*n-u*r)]},a}function cx(e){e=$h(e[0]*Ht,e[1]*Ht,e.length>2?e[2]*Ht:0);function t(n){return n=e(n[0]*Ht,n[1]*Ht),n[0]*=ce,n[1]*=ce,n}return t.invert=function(n){return n=e.invert(n[0]*Ht,n[1]*Ht),n[0]*=ce,n[1]*=ce,n},t}function ux(e,t,n,r,i,s){if(n){var a=Ot(t),o=wt(t),l=r*n;i==null?(i=t+r*_e,s=t-l/2):(i=Dh(a,i),s=Dh(a,s),(r>0?i<s:i>s)&&(i+=r*_e));for(var c,u=i;r>0?u>s:u<s;u-=l)c=qo([a,-o*Ot(u),-o*wt(u)]),e.point(c[0],c[1])}}function Dh(e,t){t=br(t),t[0]-=e,Xo(t);var n=lx(-t[1]);return((-t[2]<0?-n:n)+_e-_t)%_e}function Rh(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Me,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ns(e,t){return Et(e[0]-t[0])<_t&&Et(e[1]-t[1])<_t}function Ps(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 Ih(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((m=p.length-1)<=0)){var m,g=p[0],v=p[m],y;if(Ns(g,v)){if(!g[2]&&!v[2]){for(i.lineStart(),o=0;o<m;++o)i.point((g=p[o])[0],g[1]);i.lineEnd();return}v[0]+=2*_t}s.push(y=new Ps(g,p,null,!0)),a.push(y.o=new Ps(g,null,y,!1)),s.push(y=new Ps(v,p,null,!1)),a.push(y.o=new Ps(v,null,y,!0))}}),!!s.length){for(a.sort(t),Nh(s),Nh(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,h;;){for(var d=c,f=!0;d.v;)if((d=d.n)===c)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(o=0,l=u.length;o<l;++o)i.point((h=u[o])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(f)for(u=d.p.z,o=u.length-1;o>=0;--o)i.point((h=u[o])[0],h[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,u=d.z,f=!f}while(!d.v);i.lineEnd()}}}function Nh(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 Qo(e){return Et(e[0])<=dt?e[0]:Cn(e[0])*((Et(e[0])+dt)%_e-dt)}function hx(e,t){var n=Qo(t),r=t[1],i=wt(r),s=[wt(n),-Ot(n),0],a=0,o=0,l=new Bn;i===1?r=pe+_t:i===-1&&(r=-pe-_t);for(var c=0,u=e.length;c<u;++c)if(d=(h=e[c]).length)for(var h,d,f=h[d-1],p=Qo(f),m=f[1]/2+Sh,g=wt(m),v=Ot(m),y=0;y<d;++y,p=S,g=E,v=T,f=b){var b=h[y],S=Qo(b),_=b[1]/2+Sh,E=wt(_),T=Ot(_),D=S-p,N=D>=0?1:-1,A=N*D,C=A>dt,V=g*E;if(l.add(Wn(V*N*wt(A),v*T+V*Ot(A))),a+=C?D+N*_e:D,C^p>=n^S>=n){var M=Rs(br(f),br(b));Xo(M);var L=Rs(s,M);Xo(L);var w=(C^D>=0?-1:1)*ln(L[2]);(r>w||r===w&&(M[0]||M[1]))&&(o+=C^D>=0?1:-1)}}return(a<-_t||a<_t&&l<-Eh)^o&1}function Ph(e,t,n,r){return function(i){var s=t(i),a=Rh(),o=t(a),l=!1,c,u,h,d={point:f,lineStart:m,lineEnd:g,polygonStart:function(){d.point=v,d.lineStart=y,d.lineEnd=b,u=[],c=[]},polygonEnd:function(){d.point=f,d.lineStart=m,d.lineEnd=g,u=mu(u);var S=hx(c,r);u.length?(l||(i.polygonStart(),l=!0),Ih(u,fx,S,n,i)):S&&(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 m(){d.point=p,s.lineStart()}function g(){d.point=f,s.lineEnd()}function v(S,_){h.push([S,_]),o.point(S,_)}function y(){o.lineStart(),h=[]}function b(){v(h[0][0],h[0][1]),o.lineEnd();var S=o.clean(),_=a.result(),E,T=_.length,D,N,A;if(h.pop(),c.push(h),h=null,!!T){if(S&1){if(N=_[0],(D=N.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),E=0;E<D;++E)i.point((A=N[E])[0],A[1]);i.lineEnd()}return}T>1&&S&2&&_.push(_.pop().concat(_.shift())),u.push(_.filter(dx))}}return d}}function dx(e){return e.length>1}function fx(e,t){return((e=e.x)[0]<0?e[1]-pe-_t:pe-e[1])-((t=t.x)[0]<0?t[1]-pe-_t:pe-t[1])}const Uh=Ph(function(){return!0},px,mx,[-dt,-pe]);function px(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?dt:-dt,l=Et(s-t);Et(l-dt)<_t?(e.point(t,n=(n+a)/2>0?pe:-pe),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=dt&&(Et(t-r)<_t&&(t-=r*_t),Et(s-o)<_t&&(s-=o*_t),n=gx(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 gx(e,t,n,r){var i,s,a=wt(e-n);return Et(a)>_t?Oh((wt(t)*(s=Ot(r))*wt(n)-wt(r)*(i=Ot(t))*wt(e))/(i*s*a)):(t+r)/2}function mx(e,t,n,r){var i;if(e==null)i=n*pe,r.point(-dt,i),r.point(0,i),r.point(dt,i),r.point(dt,0),r.point(dt,-i),r.point(0,-i),r.point(-dt,-i),r.point(-dt,0),r.point(-dt,i);else if(Et(e[0]-t[0])>_t){var s=e[0]<t[0]?dt:-dt;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function vx(e){var t=Ot(e),n=6*Ht,r=t>0,i=Et(t)>_t;function s(u,h,d,f){ux(f,e,n,d,u,h)}function a(u,h){return Ot(u)*Ot(h)>t}function o(u){var h,d,f,p,m;return{lineStart:function(){p=f=!1,m=1},point:function(g,v){var y=[g,v],b,S=a(g,v),_=r?S?0:c(g,v):S?c(g+(g<0?dt:-dt),v):0;if(!h&&(p=f=S)&&u.lineStart(),S!==f&&(b=l(h,y),(!b||Ns(h,b)||Ns(y,b))&&(y[2]=1)),S!==f)m=0,S?(u.lineStart(),b=l(y,h),u.point(b[0],b[1])):(b=l(h,y),u.point(b[0],b[1],2),u.lineEnd()),h=b;else if(i&&h&&r^S){var E;!(_&d)&&(E=l(y,h,!0))&&(m=0,r?(u.lineStart(),u.point(E[0][0],E[0][1]),u.point(E[1][0],E[1][1]),u.lineEnd()):(u.point(E[1][0],E[1][1]),u.lineEnd(),u.lineStart(),u.point(E[0][0],E[0][1],3)))}S&&(!h||!Ns(h,y))&&u.point(y[0],y[1]),h=y,f=S,d=_},lineEnd:function(){f&&u.lineEnd(),h=null},clean:function(){return m|(p&&f)<<1}}}function l(u,h,d){var f=br(u),p=br(h),m=[1,0,0],g=Rs(f,p),v=Ds(g,g),y=g[0],b=v-y*y;if(!b)return!d&&u;var S=t*v/b,_=-t*y/b,E=Rs(m,g),T=Is(m,S),D=Is(g,_);Yo(T,D);var N=E,A=Ds(T,N),C=Ds(N,N),V=A*A-C*(Ds(T,T)-1);if(!(V<0)){var M=Pe(V),L=Is(N,(-A-M)/C);if(Yo(L,T),L=qo(L),!d)return L;var w=u[0],P=h[0],U=u[1],I=h[1],B;P<w&&(B=w,w=P,P=B);var j=P-w,Y=Et(j-dt)<_t,et=Y||j<_t;if(!Y&&I<U&&(B=U,U=I,I=B),et?Y?U+I>0^L[1]<(Et(L[0]-w)<_t?U:I):U<=L[1]&&L[1]<=I:j>dt^(w<=L[0]&&L[0]<=P)){var pt=Is(N,(-A+M)/C);return Yo(pt,T),[L,qo(pt)]}}}function c(u,h){var d=r?e:dt-e,f=0;return u<-d?f|=1:u>d&&(f|=2),h<-d?f|=4:h>d&&(f|=8),f}return Ph(a,o,s,r?[0,-e]:[-dt,e-dt])}function yx(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,h=1,d=l-a,f=c-o,p;if(p=n-a,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<h&&(h=p)}else if(d>0){if(p>h)return;p>u&&(u=p)}if(p=i-a,!(!d&&p<0)){if(p/=d,d<0){if(p>h)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<h&&(h=p)}if(p=r-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<h&&(h=p)}else if(f>0){if(p>h)return;p>u&&(u=p)}if(p=s-o,!(!f&&p<0)){if(p/=f,f<0){if(p>h)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<h&&(h=p)}return u>0&&(e[0]=a+u*d,e[1]=o+u*f),h<1&&(t[0]=a+h*d,t[1]=o+h*f),!0}}}}}var ui=1e9,Us=-ui;function bx(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,h,d){var f=0,p=0;if(c==null||(f=a(c,h))!==(p=a(u,h))||l(c,u)<0^h>0)do d.point(f===0||f===3?e:n,f>1?r:t);while((f=(f+h+4)%4)!==p);else d.point(u[0],u[1])}function a(c,u){return Et(c[0]-e)<_t?u>0?0:3:Et(c[0]-n)<_t?u>0?2:1:Et(c[1]-t)<_t?u>0?1:0:u>0?3:2}function o(c,u){return l(c.x,u.x)}function l(c,u){var h=a(c,1),d=a(u,1);return h!==d?h-d:h===0?u[1]-c[1]:h===1?c[0]-u[0]:h===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,h=Rh(),d,f,p,m,g,v,y,b,S,_,E,T={point:D,lineStart:V,lineEnd:M,polygonStart:A,polygonEnd:C};function D(w,P){i(w,P)&&u.point(w,P)}function N(){for(var w=0,P=0,U=f.length;P<U;++P)for(var I=f[P],B=1,j=I.length,Y=I[0],et,pt,z=Y[0],K=Y[1];B<j;++B)et=z,pt=K,Y=I[B],z=Y[0],K=Y[1],pt<=r?K>r&&(z-et)*(r-pt)>(K-pt)*(e-et)&&++w:K<=r&&(z-et)*(r-pt)<(K-pt)*(e-et)&&--w;return w}function A(){u=h,d=[],f=[],E=!0}function C(){var w=N(),P=E&&w,U=(d=mu(d)).length;(P||U)&&(c.polygonStart(),P&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),U&&Ih(d,o,w,s,c),c.polygonEnd()),u=c,d=f=p=null}function V(){T.point=L,f&&f.push(p=[]),_=!0,S=!1,y=b=NaN}function M(){d&&(L(m,g),v&&S&&h.rejoin(),d.push(h.result())),T.point=D,S&&u.lineEnd()}function L(w,P){var U=i(w,P);if(f&&p.push([w,P]),_)m=w,g=P,v=U,_=!1,U&&(u.lineStart(),u.point(w,P));else if(U&&S)u.point(w,P);else{var I=[y=Math.max(Us,Math.min(ui,y)),b=Math.max(Us,Math.min(ui,b))],B=[w=Math.max(Us,Math.min(ui,w)),P=Math.max(Us,Math.min(ui,P))];yx(I,B,e,t,n,r)?(S||(u.lineStart(),u.point(I[0],I[1])),u.point(B[0],B[1]),U||u.lineEnd(),E=!1):U&&(u.lineStart(),u.point(w,P),E=!1)}y=w,b=P,S=U}return T}}const Jo=e=>e;var tl=new Bn,el=new Bn,Bh,Vh,nl,rl,$n={point:Me,lineStart:Me,lineEnd:Me,polygonStart:function(){$n.lineStart=xx,$n.lineEnd=_x},polygonEnd:function(){$n.lineStart=$n.lineEnd=$n.point=Me,tl.add(Et(el)),el=new Bn},result:function(){var e=tl/2;return tl=new Bn,e}};function xx(){$n.point=wx}function wx(e,t){$n.point=Hh,Bh=nl=e,Vh=rl=t}function Hh(e,t){el.add(rl*e-nl*t),nl=e,rl=t}function _x(){Hh(Bh,Vh)}const Fh=$n;var xr=1/0,Bs=xr,hi=-xr,Vs=hi,Ex={point:Sx,lineStart:Me,lineEnd:Me,polygonStart:Me,polygonEnd:Me,result:function(){var e=[[xr,Bs],[hi,Vs]];return hi=Vs=-(Bs=xr=1/0),e}};function Sx(e,t){e<xr&&(xr=e),e>hi&&(hi=e),t<Bs&&(Bs=t),t>Vs&&(Vs=t)}const Hs=Ex;var il=0,sl=0,di=0,Fs=0,Gs=0,wr=0,al=0,ol=0,fi=0,Gh,zh,Ye,Xe,Ue={point:qn,lineStart:jh,lineEnd:Wh,polygonStart:function(){Ue.lineStart=Mx,Ue.lineEnd=Cx},polygonEnd:function(){Ue.point=qn,Ue.lineStart=jh,Ue.lineEnd=Wh},result:function(){var e=fi?[al/fi,ol/fi]:wr?[Fs/wr,Gs/wr]:di?[il/di,sl/di]:[NaN,NaN];return il=sl=di=Fs=Gs=wr=al=ol=fi=0,e}};function qn(e,t){il+=e,sl+=t,++di}function jh(){Ue.point=Ox}function Ox(e,t){Ue.point=Tx,qn(Ye=e,Xe=t)}function Tx(e,t){var n=e-Ye,r=t-Xe,i=Pe(n*n+r*r);Fs+=i*(Ye+e)/2,Gs+=i*(Xe+t)/2,wr+=i,qn(Ye=e,Xe=t)}function Wh(){Ue.point=qn}function Mx(){Ue.point=$x}function Cx(){qh(Gh,zh)}function $x(e,t){Ue.point=qh,qn(Gh=Ye=e,zh=Xe=t)}function qh(e,t){var n=e-Ye,r=t-Xe,i=Pe(n*n+r*r);Fs+=i*(Ye+e)/2,Gs+=i*(Xe+t)/2,wr+=i,i=Xe*e-Ye*t,al+=i*(Ye+e),ol+=i*(Xe+t),fi+=i*3,qn(Ye=e,Xe=t)}const Yh=Ue;function Xh(e){this._context=e}Xh.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,_e);break}}},result:Me};var ll=new Bn,cl,Zh,Kh,pi,gi,zs={point:Me,lineStart:function(){zs.point=Ax},lineEnd:function(){cl&&Qh(Zh,Kh),zs.point=Me},polygonStart:function(){cl=!0},polygonEnd:function(){cl=null},result:function(){var e=+ll;return ll=new Bn,e}};function Ax(e,t){zs.point=Qh,Zh=pi=e,Kh=gi=t}function Qh(e,t){pi-=e,gi-=t,ll.add(Pe(pi*pi+gi*gi)),pi=e,gi=t}const Jh=zs;let td,js,ed,nd;class rd{constructor(t){this._append=t==null?id:Lx(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!==ed||this._append!==js){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`,ed=r,js=this._append,nd=this._,this._=i}this._+=nd;break}}}result(){const t=this._;return this._="",t.length?t:null}}function id(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Lx(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return id;if(t!==td){const n=10**t;td=t,js=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 js}function kx(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),yr(o,i(s))),s.result()}return a.area=function(o){return yr(o,i(Fh)),Fh.result()},a.measure=function(o){return yr(o,i(Jh)),Jh.result()},a.bounds=function(o){return yr(o,i(Hs)),Hs.result()},a.centroid=function(o){return yr(o,i(Yh)),Yh.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,Jo):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new rd(n)):new Xh(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 rd(n)),a},a.projection(e).digits(n).context(t)}function ul(e){return function(t){var n=new hl;for(var r in e)n[r]=e[r];return n.stream=t,n}}function hl(){}hl.prototype={constructor:hl,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 dl(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),yr(n,e.stream(Hs)),t(Hs.result()),r!=null&&e.clipExtent(r),e}function sd(e,t,n){return dl(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 Dx(e,t,n){return sd(e,[[0,0],t],n)}function Rx(e,t,n){return dl(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 Ix(e,t,n){return dl(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 ad=16,Nx=Ot(30*Ht);function od(e,t){return+t?Ux(e,t):Px(e)}function Px(e){return ul({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Ux(e,t){function n(r,i,s,a,o,l,c,u,h,d,f,p,m,g){var v=c-r,y=u-i,b=v*v+y*y;if(b>4*t&&m--){var S=a+d,_=o+f,E=l+p,T=Pe(S*S+_*_+E*E),D=ln(E/=T),N=Et(Et(E)-1)<_t||Et(s-h)<_t?(s+h)/2:Wn(_,S),A=e(N,D),C=A[0],V=A[1],M=C-r,L=V-i,w=y*M-v*L;(w*w/b>t||Et((v*M+y*L)/b-.5)>.3||a*d+o*f+l*p<Nx)&&(n(r,i,s,a,o,l,C,V,N,S/=T,_/=T,E,m,g),g.point(C,V),n(C,V,N,S,_,E,c,u,h,d,f,p,m,g))}}return function(r){var i,s,a,o,l,c,u,h,d,f,p,m,g={point:v,lineStart:y,lineEnd:S,polygonStart:function(){r.polygonStart(),g.lineStart=_},polygonEnd:function(){r.polygonEnd(),g.lineStart=y}};function v(D,N){D=e(D,N),r.point(D[0],D[1])}function y(){h=NaN,g.point=b,r.lineStart()}function b(D,N){var A=br([D,N]),C=e(D,N);n(h,d,u,f,p,m,h=C[0],d=C[1],u=D,f=A[0],p=A[1],m=A[2],ad,r),r.point(h,d)}function S(){g.point=v,r.lineEnd()}function _(){y(),g.point=E,g.lineEnd=T}function E(D,N){b(i=D,N),s=h,a=d,o=f,l=p,c=m,g.point=b}function T(){n(h,d,u,f,p,m,s,a,i,o,l,c,ad,r),g.lineEnd=S,S()}return g}}var Bx=ul({point:function(e,t){this.stream.point(e*Ht,t*Ht)}});function Vx(e){return ul({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Hx(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 ld(e,t,n,r,i,s){if(!s)return Hx(e,t,n,r,i);var a=Ot(s),o=wt(s),l=a*e,c=o*e,u=a/e,h=o/e,d=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(m,g){return m*=r,g*=i,[l*m-c*g+t,n-c*m-l*g]}return p.invert=function(m,g){return[r*(u*m-h*g+d),i*(f-h*m-u*g)]},p}function Ws(e){return cd(function(){return e})()}function cd(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,h=0,d=1,f=1,p=null,m=Uh,g=null,v,y,b,S=Jo,_=.5,E,T,D,N,A;function C(w){return D(w[0]*Ht,w[1]*Ht)}function V(w){return w=D.invert(w[0],w[1]),w&&[w[0]*ce,w[1]*ce]}C.stream=function(w){return N&&A===w?N:N=Bx(Vx(u)(m(E(S(A=w)))))},C.preclip=function(w){return arguments.length?(m=w,p=void 0,L()):m},C.postclip=function(w){return arguments.length?(S=w,g=v=y=b=null,L()):S},C.clipAngle=function(w){return arguments.length?(m=+w?vx(p=w*Ht):(p=null,Uh),L()):p*ce},C.clipExtent=function(w){return arguments.length?(S=w==null?(g=v=y=b=null,Jo):bx(g=+w[0][0],v=+w[0][1],y=+w[1][0],b=+w[1][1]),L()):g==null?null:[[g,v],[y,b]]},C.scale=function(w){return arguments.length?(n=+w,M()):n},C.translate=function(w){return arguments.length?(r=+w[0],i=+w[1],M()):[r,i]},C.center=function(w){return arguments.length?(s=w[0]%360*Ht,a=w[1]%360*Ht,M()):[s*ce,a*ce]},C.rotate=function(w){return arguments.length?(o=w[0]%360*Ht,l=w[1]%360*Ht,c=w.length>2?w[2]%360*Ht:0,M()):[o*ce,l*ce,c*ce]},C.angle=function(w){return arguments.length?(h=w%360*Ht,M()):h*ce},C.reflectX=function(w){return arguments.length?(d=w?-1:1,M()):d<0},C.reflectY=function(w){return arguments.length?(f=w?-1:1,M()):f<0},C.precision=function(w){return arguments.length?(E=od(T,_=w*w),L()):Pe(_)},C.fitExtent=function(w,P){return sd(C,w,P)},C.fitSize=function(w,P){return Dx(C,w,P)},C.fitWidth=function(w,P){return Rx(C,w,P)},C.fitHeight=function(w,P){return Ix(C,w,P)};function M(){var w=ld(n,0,0,d,f,h).apply(null,t(s,a)),P=ld(n,r-w[0],i-w[1],d,f,h);return u=$h(o,l,c),T=Zo(t,P),D=Zo(u,T),E=od(T,_),L()}function L(){return N=A=null,C}return function(){return t=e.apply(this,arguments),C.invert=t.invert&&V,M()}}function ud(e){var t=0,n=dt/3,r=cd(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Ht,n=s[1]*Ht):[t*ce,n*ce]},i}function Fx(e){var t=Ot(e);function n(r,i){return[r*t,wt(i)/t]}return n.invert=function(r,i){return[r/t,ln(i*t)]},n}function Gx(e,t){var n=wt(e),r=(n+wt(t))/2;if(Et(r)<_t)return Fx(e);var i=1+n*(2*r-n),s=Pe(i)/r;function a(o,l){var c=Pe(i-2*r*wt(l))/r;return[c*wt(o*=r),s-c*Ot(o)]}return a.invert=function(o,l){var c=s-l,u=Wn(o,Et(c))*Cn(c);return c*r<0&&(u-=dt*Cn(o)*Cn(c)),[u/r,ln((i-(o*o+c*c)*r*r)/(2*r))]},a}function hd(){return ud(Gx).scale(155.424).center([0,33.6442])}function zx(){return hd().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function fl(e,t){return[e,ax(ox((pe+t)/2))]}fl.invert=function(e,t){return[e,2*Oh(sx(t))-pe]};function jx(){return Wx(fl).scale(961/_e)}function Wx(e){var t=Ws(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(h){return arguments.length?(r(h),u()):r()},t.translate=function(h){return arguments.length?(i(h),u()):i()},t.center=function(h){return arguments.length?(n(h),u()):n()},t.clipExtent=function(h){return arguments.length?(h==null?a=o=l=c=null:(a=+h[0][0],o=+h[0][1],l=+h[1][0],c=+h[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var h=dt*r(),d=t(cx(t.rotate()).invert([0,0]));return s(a==null?[[d[0]-h,d[1]-h],[d[0]+h,d[1]+h]]:e===fl?[[Math.max(d[0]-h,a),o],[Math.min(d[0]+h,l),c]]:[[a,Math.max(d[1]-h,o)],[l,Math.min(d[1]+h,c)]])}return u()}function qs(e,t){return[e,t]}qs.invert=qs;function qx(){return Ws(qs).scale(152.63)}function Yx(e,t){var n=Ot(e),r=e===t?wt(e):(n-Ot(t))/(t-e),i=n/r+e;if(Et(r)<_t)return qs;function s(a,o){var l=i-o,c=r*a;return[l*wt(c),i-l*Ot(c)]}return s.invert=function(a,o){var l=i-o,c=Wn(a,Et(l))*Cn(l);return l*r<0&&(c-=dt*Cn(a)*Cn(l)),[c/r,i-Cn(r)*Pe(a*a+l*l)]},s}function Xx(){return ud(Yx).scale(131.154).center([0,13.9389])}var mi=1.340264,vi=-.081106,yi=893e-6,bi=.003796,Ys=Pe(3)/2,Zx=12;function dd(e,t){var n=ln(Ys*wt(t)),r=n*n,i=r*r*r;return[e*Ot(n)/(Ys*(mi+3*vi*r+i*(7*yi+9*bi*r))),n*(mi+vi*r+i*(yi+bi*r))]}dd.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<Zx&&(o=n*(mi+vi*r+i*(yi+bi*r))-t,l=mi+3*vi*r+i*(7*yi+9*bi*r),n-=a=o/l,r=n*n,i=r*r*r,!(Et(a)<Eh));++s);return[Ys*e*(mi+3*vi*r+i*(7*yi+9*bi*r))/Ot(n),ln(wt(n)/Ys)]};function Kx(){return Ws(dd).scale(177.158)}function fd(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)))]}fd.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(Et(i)>_t&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function Qx(){return Ws(fd).scale(175.295)}function Jx(e,t){return e.parent===t.parent?1:2}function tw(e){return e.reduce(ew,0)/e.length}function ew(e,t){return e+t.x}function nw(e){return 1+e.reduce(rw,0)}function rw(e,t){return Math.max(e,t.y)}function iw(e){for(var t;t=e.children;)e=t[0];return e}function sw(e){for(var t;t=e.children;)e=t[t.length-1];return e}function aw(){var e=Jx,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(d){var f=d.children;f?(d.x=tw(f),d.y=nw(f)):(d.x=a?o+=e(d,a):0,d.y=0,a=d)});var l=iw(s),c=sw(s),u=l.x-e(l,c)/2,h=c.x+e(c,l)/2;return s.eachAfter(r?function(d){d.x=(d.x-s.x)*t,d.y=(s.y-d.y)*n}:function(d){d.x=(d.x-u)/(h-u)*t,d.y=(1-(s.y?d.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 ow(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 lw(){return this.eachAfter(ow)}function cw(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function uw(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 hw(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 dw(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function fw(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 pw(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function gw(e){for(var t=this,n=mw(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 mw(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 vw(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function yw(){return Array.from(this)}function bw(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function xw(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ww(){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 xi(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Sw)):t===void 0&&(t=Ew);for(var n=new wi(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 wi(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(Tw)}function _w(){return xi(this).eachBefore(Ow)}function Ew(e){return e.children}function Sw(e){return Array.isArray(e)?e[1]:null}function Ow(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Tw(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function wi(e){this.data=e,this.depth=this.height=0,this.parent=null}wi.prototype=xi.prototype={constructor:wi,count:lw,each:cw,eachAfter:hw,eachBefore:uw,find:dw,sum:fw,sort:pw,path:gw,ancestors:vw,descendants:yw,leaves:bw,links:xw,copy:_w,[Symbol.iterator]:ww};function Mw(e){return e==null?null:pd(e)}function pd(e){if(typeof e!="function")throw new Error;return e}function Yn(){return 0}function _r(e){return function(){return e}}const Cw=1664525,$w=1013904223,gd=4294967296;function Aw(){let e=1;return()=>(e=(Cw*e+$w)%gd)/gd}function Lw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kw(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 Dw(e,t){for(var n=0,r=(e=kw(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&md(a,s)?++n:(a=Iw(i=Rw(i,s)),n=0);return a}function Rw(e,t){var n,r;if(pl(t,e))return[t];for(n=0;n<e.length;++n)if(Xs(t,e[n])&&pl(_i(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(Xs(_i(e[n],e[r]),t)&&Xs(_i(e[n],t),e[r])&&Xs(_i(e[r],t),e[n])&&pl(vd(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function Xs(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 md(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 pl(e,t){for(var n=0;n<t.length;++n)if(!md(e,t[n]))return!1;return!0}function Iw(e){switch(e.length){case 1:return Nw(e[0]);case 2:return _i(e[0],e[1]);case 3:return vd(e[0],e[1],e[2])}}function Nw(e){return{x:e.x,y:e.y,r:e.r}}function _i(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,h=Math.sqrt(l*l+c*c);return{x:(n+s+l/h*u)/2,y:(r+a+c/h*u)/2,r:(h+i+o)/2}}function vd(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,h=n.r,d=r-a,f=r-c,p=i-o,m=i-u,g=l-s,v=h-s,y=r*r+i*i-s*s,b=y-a*a-o*o+l*l,S=y-c*c-u*u+h*h,_=f*p-d*m,E=(p*S-m*b)/(_*2)-r,T=(m*g-p*v)/_,D=(f*b-d*S)/(_*2)-i,N=(d*v-f*g)/_,A=T*T+N*N-1,C=2*(s+E*T+D*N),V=E*E+D*D-s*s,M=-(Math.abs(A)>1e-6?(C+Math.sqrt(C*C-4*A*V))/(2*A):V/C);return{x:r+E+T*M,y:i+D+N*M,r:M}}function yd(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 bd(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 xd(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 Zs(e){this._=e,this.next=null,this.previous=null}function Pw(e,t){if(!(s=(e=Lw(e)).length))return 0;var n,r,i,s,a,o,l,c,u,h,d;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;yd(r,n,i=e[2]),n=new Zs(n),r=new Zs(r),i=new Zs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){yd(n._,r._,i=e[l]),i=new Zs(i),c=r.next,u=n.previous,h=r._.r,d=n._.r;do if(h<=d){if(bd(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}h+=c._.r,c=c.next}else{if(bd(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}d+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=xd(n);(i=i.next)!==r;)(o=xd(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Dw(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function Uw(e){return Math.sqrt(e.value)}function Bw(){var e=null,t=1,n=1,r=Yn;function i(s){const a=Aw();return s.x=t/2,s.y=n/2,e?s.eachBefore(wd(e)).eachAfter(gl(r,.5,a)).eachBefore(_d(1)):s.eachBefore(wd(Uw)).eachAfter(gl(Yn,1,a)).eachAfter(gl(r,s.r/Math.min(t,n),a)).eachBefore(_d(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=Mw(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:_r(+s),i):r},i}function wd(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function gl(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=Pw(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function _d(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 Vw(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 Hw(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 Fw(e,t){return e.parent===t.parent?1:2}function ml(e){var t=e.children;return t?t[0]:e.t}function vl(e){var t=e.children;return t?t[t.length-1]:e.t}function Gw(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 zw(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 jw(e,t,n){return e.a.parent===t.parent?e.a:n}function Ks(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}Ks.prototype=Object.create(wi.prototype);function Ww(e){for(var t=new Ks(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 Ks(s[a],a)),i.parent=n;return(t.parent=new Ks(null,0)).children=[t],t}function qw(){var e=Fw,t=1,n=1,r=null;function i(c){var u=Ww(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var h=c,d=c,f=c;c.eachBefore(function(y){y.x<h.x&&(h=y),y.x>d.x&&(d=y),y.depth>f.depth&&(f=y)});var p=h===d?1:e(h,d)/2,m=p-h.x,g=t/(d.x+p+m),v=n/(f.depth||1);c.eachBefore(function(y){y.x=(y.x+m)*g,y.y=y.depth*v})}return c}function s(c){var u=c.children,h=c.parent.children,d=c.i?h[c.i-1]:null;if(u){zw(c);var f=(u[0].z+u[u.length-1].z)/2;d?(c.z=d.z+e(c._,d._),c.m=c.z-f):c.z=f}else d&&(c.z=d.z+e(c._,d._));c.parent.A=o(c,d,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,h){if(u){for(var d=c,f=c,p=u,m=d.parent.children[0],g=d.m,v=f.m,y=p.m,b=m.m,S;p=vl(p),d=ml(d),p&&d;)m=ml(m),f=vl(f),f.a=c,S=p.z+y-d.z-g+e(p._,d._),S>0&&(Gw(jw(p,c,h),c,S),g+=S,v+=S),y+=p.m,g+=d.m,b+=m.m,v+=f.m;p&&!vl(f)&&(f.t=p,f.m+=y-v),d&&!ml(m)&&(m.t=d,m.m+=g-b,h=c)}return h}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 Yw(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 Xw=(1+Math.sqrt(5))/2;function Zw(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,h=0,d=o.length,f,p,m=t.value,g,v,y,b,S,_,E;u<d;){f=i-n,p=s-r;do g=o[h++].value;while(!g&&h<d);for(v=y=g,_=Math.max(p/f,f/p)/(m*e),E=g*g*_,S=Math.max(y/E,E/v);h<d;++h){if(g+=c=o[h].value,c<v&&(v=c),c>y&&(y=c),E=g*g*_,b=Math.max(y/E,E/v),b>S){g-=c;break}S=b}a.push(l={value:g,dice:f<p,children:o.slice(u,h)}),l.dice?Hw(l,n,r,i,m?r+=p*g/m:s):Yw(l,n,r,m?n+=f*g/m:i,s),m-=g,u=h}return a}const Kw=function e(t){function n(r,i,s,a,o){Zw(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Xw);function Qw(){var e=Kw,t=!1,n=1,r=1,i=[0],s=Yn,a=Yn,o=Yn,l=Yn,c=Yn;function u(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(h),i=[0],t&&d.eachBefore(Vw),d}function h(d){var f=i[d.depth],p=d.x0+f,m=d.y0+f,g=d.x1-f,v=d.y1-f;g<p&&(p=g=(p+g)/2),v<m&&(m=v=(m+v)/2),d.x0=p,d.y0=m,d.x1=g,d.y1=v,d.children&&(f=i[d.depth+1]=s(d)/2,p+=c(d)-f,m+=a(d)-f,g-=o(d)-f,v-=l(d)-f,g<p&&(p=g=(p+g)/2),v<m&&(m=v=(m+v)/2),e(d,p,m,g,v))}return u.round=function(d){return arguments.length?(t=!!d,u):t},u.size=function(d){return arguments.length?(n=+d[0],r=+d[1],u):[n,r]},u.tile=function(d){return arguments.length?(e=pd(d),u):e},u.padding=function(d){return arguments.length?u.paddingInner(d).paddingOuter(d):u.paddingInner()},u.paddingInner=function(d){return arguments.length?(s=typeof d=="function"?d:_r(+d),u):s},u.paddingOuter=function(d){return arguments.length?u.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):u.paddingTop()},u.paddingTop=function(d){return arguments.length?(a=typeof d=="function"?d:_r(+d),u):a},u.paddingRight=function(d){return arguments.length?(o=typeof d=="function"?d:_r(+d),u):o},u.paddingBottom=function(d){return arguments.length?(l=typeof d=="function"?d:_r(+d),u):l},u.paddingLeft=function(d){return arguments.length?(c=typeof d=="function"?d:_r(+d),u):c},u}function Er(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Ed=Symbol("implicit");function Qs(){var e=new du,t=[],n=[],r=Ed;function i(s){let a=e.get(s);if(a===void 0){if(r!==Ed)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 du;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 Qs(t,n).unknown(r)},Er.apply(i,arguments),i}function Ei(){var e=Qs().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 h(){var d=t().length,f=i<r,p=f?i:r,m=f?r:i;s=(m-p)/Math.max(1,d-l+c*2),o&&(s=Math.floor(s)),p+=(m-p-s*(d-l))*u,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var g=o0(d).map(function(v){return p+s*v});return n(f?g.reverse():g)}return e.domain=function(d){return arguments.length?(t(d),h()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,h()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,o=!0,h()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(d){return arguments.length?(o=!!d,h()):o},e.padding=function(d){return arguments.length?(l=Math.min(1,c=+d),h()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),h()):l},e.paddingOuter=function(d){return arguments.length?(c=+d,h()):c},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),h()):u},e.copy=function(){return Ei(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Er.apply(h(),arguments)}function Jw(e){return function(){return e}}function t_(e){return+e}var Sd=[0,1];function Sr(e){return e}function yl(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Jw(isNaN(t)?NaN:.5)}function e_(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function n_(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=yl(i,r),s=n(a,s)):(r=yl(r,i),s=n(s,a)),function(o){return s(r(o))}}function r_(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]=yl(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=lo(e,o,1,r)-1;return s[l](i[l](o))}}function bl(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Od(){var e=Sd,t=Sd,n=ii,r,i,s,a=Sr,o,l,c;function u(){var d=Math.min(e.length,t.length);return a!==Sr&&(a=e_(e[0],e[d-1])),o=d>2?r_:n_,l=c=null,h}function h(d){return d==null||isNaN(d=+d)?s:(l||(l=o(e.map(r),t,n)))(r(a(d)))}return h.invert=function(d){return a(i((c||(c=o(t,e.map(r),we)))(d)))},h.domain=function(d){return arguments.length?(e=Array.from(d,t_),u()):e.slice()},h.range=function(d){return arguments.length?(t=Array.from(d),u()):t.slice()},h.rangeRound=function(d){return t=Array.from(d),n=ju,u()},h.clamp=function(d){return arguments.length?(a=d?!0:Sr,u()):a!==Sr},h.interpolate=function(d){return arguments.length?(n=d,u()):n},h.unknown=function(d){return arguments.length?(s=d,h):s},function(d,f){return r=d,i=f,u()}}function Td(){return Od()(Sr,Sr)}function i_(e,t,n,r){var i=uo(e,t,n),s;switch(r=ci(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=rx(i,a))&&(r.precision=s),_h(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=ix(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=nx(i))&&(r.precision=s-(r.type==="%")*2);break}}return jo(r)}function Md(e){var t=e.domain;return e.ticks=function(n){var r=t();return ls(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return i_(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=hr(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 Be(){var e=Td();return e.copy=function(){return bl(e,Be())},Er.apply(e,arguments),Md(e)}function Cd(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 $d(e){return Math.log(e)}function Ad(e){return Math.exp(e)}function s_(e){return-Math.log(-e)}function a_(e){return-Math.exp(-e)}function o_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function l_(e){return e===10?o_:e===Math.E?Math.exp:t=>Math.pow(e,t)}function c_(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 Ld(e){return(t,n)=>-e(-t,n)}function u_(e){const t=e($d,Ad),n=t.domain;let r=10,i,s;function a(){return i=c_(r),s=l_(r),n()[0]<0?(i=Ld(i),s=Ld(s),e(s_,a_)):e($d,Ad),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 h=u<c;h&&([c,u]=[u,c]);let d=i(c),f=i(u),p,m;const g=o==null?10:+o;let v=[];if(!(r%1)&&f-d<g){if(d=Math.floor(d),f=Math.ceil(f),c>0){for(;d<=f;++d)for(p=1;p<r;++p)if(m=d<0?p/s(-d):p*s(d),!(m<c)){if(m>u)break;v.push(m)}}else for(;d<=f;++d)for(p=r-1;p>=1;--p)if(m=d>0?p/s(-d):p*s(d),!(m<c)){if(m>u)break;v.push(m)}v.length*2<g&&(v=ls(c,u,g))}else v=ls(d,f,Math.min(f-d,g)).map(s);return h?v.reverse():v},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=ci(l)).precision==null&&(l.trim=!0),l=jo(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let h=u/s(Math.round(i(u)));return h*r<r-.5&&(h*=r),h<=c?l(u):""}},t.nice=()=>n(Cd(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function kd(){const e=u_(Od()).domain([1,10]);return e.copy=()=>bl(e,kd()).base(e.base()),Er.apply(e,arguments),e}function xl(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[lo(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 xl().domain([e,t]).range(i).unknown(s)},Er.apply(Md(a),arguments)}const wl=new Date,_l=new Date;function qt(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=>qt(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)=>(wl.setTime(+s),_l.setTime(+a),e(wl),e(_l),Math.floor(n(wl,_l))),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 Js=qt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Js.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?qt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Js),Js.range;const cn=1e3,Ce=cn*60,un=Ce*60,hn=un*24,El=hn*7,Dd=hn*30,Sl=hn*365,Or=qt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*cn)},(e,t)=>(t-e)/cn,e=>e.getUTCSeconds());Or.range;const Ol=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*cn)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getMinutes());Ol.range,qt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getUTCMinutes()).range;const Tl=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*cn-e.getMinutes()*Ce)},(e,t)=>{e.setTime(+e+t*un)},(e,t)=>(t-e)/un,e=>e.getHours());Tl.range,qt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*un)},(e,t)=>(t-e)/un,e=>e.getUTCHours()).range;const Si=qt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ce)/hn,e=>e.getDate()-1);Si.range;const Ml=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hn,e=>e.getUTCDate()-1);Ml.range,qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hn,e=>Math.floor(e/hn)).range;function Xn(e){return qt(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())*Ce)/El)}const ta=Xn(0),ea=Xn(1),h_=Xn(2),d_=Xn(3),Tr=Xn(4),f_=Xn(5),p_=Xn(6);ta.range,ea.range,h_.range,d_.range,Tr.range,f_.range,p_.range;function Zn(e){return qt(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)/El)}const Rd=Zn(0),na=Zn(1),g_=Zn(2),m_=Zn(3),Mr=Zn(4),v_=Zn(5),y_=Zn(6);Rd.range,na.range,g_.range,m_.range,Mr.range,v_.range,y_.range;const Cl=qt(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());Cl.range,qt(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 dn=qt(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());dn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(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)}),dn.range;const Kn=qt(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());Kn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(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)}),Kn.range;function b_(e,t,n,r,i,s){const a=[[Or,1,cn],[Or,5,5*cn],[Or,15,15*cn],[Or,30,30*cn],[s,1,Ce],[s,5,5*Ce],[s,15,15*Ce],[s,30,30*Ce],[i,1,un],[i,3,3*un],[i,6,6*un],[i,12,12*un],[r,1,hn],[r,2,2*hn],[n,1,El],[t,1,Dd],[t,3,3*Dd],[e,1,Sl]];function o(c,u,h){const d=u<c;d&&([c,u]=[u,c]);const f=h&&typeof h.range=="function"?h:l(c,u,h),p=f?f.range(c,+u+1):[];return d?p.reverse():p}function l(c,u,h){const d=Math.abs(u-c)/h,f=oo(([,,g])=>g).right(a,d);if(f===a.length)return e.every(uo(c/Sl,u/Sl,h));if(f===0)return Js.every(Math.max(uo(c,u,h),1));const[p,m]=a[d/a[f-1][2]<a[f][2]/d?f-1:f];return p.every(m)}return[o,l]}const[x_,w_]=b_(dn,Cl,ta,Si,Tl,Ol);function $l(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 Al(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 Oi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function __(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=Ti(i),u=Mi(i),h=Ti(s),d=Mi(s),f=Ti(a),p=Mi(a),m=Ti(o),g=Mi(o),v=Ti(l),y=Mi(l),b={a:U,A:I,b:B,B:j,c:null,d:Vd,e:Vd,f:j_,g:eE,G:rE,H:F_,I:G_,j:z_,L:Hd,m:W_,M:q_,p:Y,q:et,Q:qd,s:Yd,S:Y_,u:X_,U:Z_,V:K_,w:Q_,W:J_,x:null,X:null,y:tE,Y:nE,Z:iE,"%":Wd},S={a:pt,A:z,b:K,B:ht,c:null,d:Gd,e:Gd,f:lE,g:yE,G:xE,H:sE,I:aE,j:oE,L:zd,m:cE,M:uE,p:it,q:Mt,Q:qd,s:Yd,S:hE,u:dE,U:fE,V:pE,w:gE,W:mE,x:null,X:null,y:vE,Y:bE,Z:wE,"%":Wd},_={a:A,A:C,b:V,B:M,c:L,d:Ud,e:Ud,f:U_,g:Pd,G:Nd,H:Bd,I:Bd,j:R_,L:P_,m:D_,M:I_,p:N,q:k_,Q:V_,s:H_,S:N_,u:M_,U:C_,V:$_,w:T_,W:A_,x:w,X:P,y:Pd,Y:Nd,Z:L_,"%":B_};b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),S.x=E(n,S),S.X=E(r,S),S.c=E(t,S);function E(W,J){return function(ct){var F=[],Ut=-1,bt=0,zt=W.length,jt,nt,It;for(ct instanceof Date||(ct=new Date(+ct));++Ut<zt;)W.charCodeAt(Ut)===37&&(F.push(W.slice(bt,Ut)),(nt=Id[jt=W.charAt(++Ut)])!=null?jt=W.charAt(++Ut):nt=jt==="e"?" ":"0",(It=J[jt])&&(jt=It(ct,nt)),F.push(jt),bt=Ut+1);return F.push(W.slice(bt,Ut)),F.join("")}}function T(W,J){return function(ct){var F=Oi(1900,void 0,1),Ut=D(F,W,ct+="",0),bt,zt;if(Ut!=ct.length)return null;if("Q"in F)return new Date(F.Q);if("s"in F)return new Date(F.s*1e3+("L"in F?F.L:0));if(J&&!("Z"in F)&&(F.Z=0),"p"in F&&(F.H=F.H%12+F.p*12),F.m===void 0&&(F.m="q"in F?F.q:0),"V"in F){if(F.V<1||F.V>53)return null;"w"in F||(F.w=1),"Z"in F?(bt=Al(Oi(F.y,0,1)),zt=bt.getUTCDay(),bt=zt>4||zt===0?na.ceil(bt):na(bt),bt=Ml.offset(bt,(F.V-1)*7),F.y=bt.getUTCFullYear(),F.m=bt.getUTCMonth(),F.d=bt.getUTCDate()+(F.w+6)%7):(bt=$l(Oi(F.y,0,1)),zt=bt.getDay(),bt=zt>4||zt===0?ea.ceil(bt):ea(bt),bt=Si.offset(bt,(F.V-1)*7),F.y=bt.getFullYear(),F.m=bt.getMonth(),F.d=bt.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),zt="Z"in F?Al(Oi(F.y,0,1)).getUTCDay():$l(Oi(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-(zt+5)%7:F.w+F.U*7-(zt+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,Al(F)):$l(F)}}function D(W,J,ct,F){for(var Ut=0,bt=J.length,zt=ct.length,jt,nt;Ut<bt;){if(F>=zt)return-1;if(jt=J.charCodeAt(Ut++),jt===37){if(jt=J.charAt(Ut++),nt=_[jt in Id?J.charAt(Ut++):jt],!nt||(F=nt(W,ct,F))<0)return-1}else if(jt!=ct.charCodeAt(F++))return-1}return F}function N(W,J,ct){var F=c.exec(J.slice(ct));return F?(W.p=u.get(F[0].toLowerCase()),ct+F[0].length):-1}function A(W,J,ct){var F=f.exec(J.slice(ct));return F?(W.w=p.get(F[0].toLowerCase()),ct+F[0].length):-1}function C(W,J,ct){var F=h.exec(J.slice(ct));return F?(W.w=d.get(F[0].toLowerCase()),ct+F[0].length):-1}function V(W,J,ct){var F=v.exec(J.slice(ct));return F?(W.m=y.get(F[0].toLowerCase()),ct+F[0].length):-1}function M(W,J,ct){var F=m.exec(J.slice(ct));return F?(W.m=g.get(F[0].toLowerCase()),ct+F[0].length):-1}function L(W,J,ct){return D(W,t,J,ct)}function w(W,J,ct){return D(W,n,J,ct)}function P(W,J,ct){return D(W,r,J,ct)}function U(W){return a[W.getDay()]}function I(W){return s[W.getDay()]}function B(W){return l[W.getMonth()]}function j(W){return o[W.getMonth()]}function Y(W){return i[+(W.getHours()>=12)]}function et(W){return 1+~~(W.getMonth()/3)}function pt(W){return a[W.getUTCDay()]}function z(W){return s[W.getUTCDay()]}function K(W){return l[W.getUTCMonth()]}function ht(W){return o[W.getUTCMonth()]}function it(W){return i[+(W.getUTCHours()>=12)]}function Mt(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var J=E(W+="",b);return J.toString=function(){return W},J},parse:function(W){var J=T(W+="",!1);return J.toString=function(){return W},J},utcFormat:function(W){var J=E(W+="",S);return J.toString=function(){return W},J},utcParse:function(W){var J=T(W+="",!0);return J.toString=function(){return W},J}}}var Id={"-":"",_:" ",0:"0"},Qt=/^\s*\d+/,E_=/^%/,S_=/[\\^$*+?|[\]().{}]/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 O_(e){return e.replace(S_,"\\$&")}function Ti(e){return new RegExp("^(?:"+e.map(O_).join("|")+")","i")}function Mi(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function T_(e,t,n){var r=Qt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function M_(e,t,n){var r=Qt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function C_(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function $_(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function A_(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Nd(e,t,n){var r=Qt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Pd(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function L_(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 k_(e,t,n){var r=Qt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function D_(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ud(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function R_(e,t,n){var r=Qt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Bd(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function I_(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function N_(e,t,n){var r=Qt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function P_(e,t,n){var r=Qt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function U_(e,t,n){var r=Qt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function B_(e,t,n){var r=E_.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function V_(e,t,n){var r=Qt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function H_(e,t,n){var r=Qt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Vd(e,t){return vt(e.getDate(),t,2)}function F_(e,t){return vt(e.getHours(),t,2)}function G_(e,t){return vt(e.getHours()%12||12,t,2)}function z_(e,t){return vt(1+Si.count(dn(e),e),t,3)}function Hd(e,t){return vt(e.getMilliseconds(),t,3)}function j_(e,t){return Hd(e,t)+"000"}function W_(e,t){return vt(e.getMonth()+1,t,2)}function q_(e,t){return vt(e.getMinutes(),t,2)}function Y_(e,t){return vt(e.getSeconds(),t,2)}function X_(e){var t=e.getDay();return t===0?7:t}function Z_(e,t){return vt(ta.count(dn(e)-1,e),t,2)}function Fd(e){var t=e.getDay();return t>=4||t===0?Tr(e):Tr.ceil(e)}function K_(e,t){return e=Fd(e),vt(Tr.count(dn(e),e)+(dn(e).getDay()===4),t,2)}function Q_(e){return e.getDay()}function J_(e,t){return vt(ea.count(dn(e)-1,e),t,2)}function tE(e,t){return vt(e.getFullYear()%100,t,2)}function eE(e,t){return e=Fd(e),vt(e.getFullYear()%100,t,2)}function nE(e,t){return vt(e.getFullYear()%1e4,t,4)}function rE(e,t){var n=e.getDay();return e=n>=4||n===0?Tr(e):Tr.ceil(e),vt(e.getFullYear()%1e4,t,4)}function iE(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+vt(t/60|0,"0",2)+vt(t%60,"0",2)}function Gd(e,t){return vt(e.getUTCDate(),t,2)}function sE(e,t){return vt(e.getUTCHours(),t,2)}function aE(e,t){return vt(e.getUTCHours()%12||12,t,2)}function oE(e,t){return vt(1+Ml.count(Kn(e),e),t,3)}function zd(e,t){return vt(e.getUTCMilliseconds(),t,3)}function lE(e,t){return zd(e,t)+"000"}function cE(e,t){return vt(e.getUTCMonth()+1,t,2)}function uE(e,t){return vt(e.getUTCMinutes(),t,2)}function hE(e,t){return vt(e.getUTCSeconds(),t,2)}function dE(e){var t=e.getUTCDay();return t===0?7:t}function fE(e,t){return vt(Rd.count(Kn(e)-1,e),t,2)}function jd(e){var t=e.getUTCDay();return t>=4||t===0?Mr(e):Mr.ceil(e)}function pE(e,t){return e=jd(e),vt(Mr.count(Kn(e),e)+(Kn(e).getUTCDay()===4),t,2)}function gE(e){return e.getUTCDay()}function mE(e,t){return vt(na.count(Kn(e)-1,e),t,2)}function vE(e,t){return vt(e.getUTCFullYear()%100,t,2)}function yE(e,t){return e=jd(e),vt(e.getUTCFullYear()%100,t,2)}function bE(e,t){return vt(e.getUTCFullYear()%1e4,t,4)}function xE(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Mr(e):Mr.ceil(e),vt(e.getUTCFullYear()%1e4,t,4)}function wE(){return"+0000"}function Wd(){return"%"}function qd(e){return+e}function Yd(e){return Math.floor(+e/1e3)}var Cr,Xd;_E({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 _E(e){return Cr=__(e),Xd=Cr.format,Cr.parse,Cr.utcFormat,Cr.utcParse,Cr}function EE(e){return new Date(e)}function SE(e){return e instanceof Date?+e:+new Date(+e)}function Zd(e,t,n,r,i,s,a,o,l,c){var u=Td(),h=u.invert,d=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),S=c("%Y");function _(E){return(l(E)<E?f:o(E)<E?p:a(E)<E?m:s(E)<E?g:r(E)<E?i(E)<E?v:y:n(E)<E?b:S)(E)}return u.invert=function(E){return new Date(h(E))},u.domain=function(E){return arguments.length?d(Array.from(E,SE)):d().map(EE)},u.ticks=function(E){var T=d();return e(T[0],T[T.length-1],E??10)},u.tickFormat=function(E,T){return T==null?_:c(T)},u.nice=function(E){var T=d();return(!E||typeof E.range!="function")&&(E=t(T[0],T[T.length-1],E??10)),E?d(Cd(T,E)):u},u.copy=function(){return bl(u,Zd(e,t,n,r,i,s,a,o,l,c))},u}function Kd(){return Er.apply(Zd(x_,w_,dn,Cl,ta,Si,Tl,Ol,Or,Xd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ut(e){return function(){return e}}const Qd=Math.abs,ae=Math.atan2,Qn=Math.cos,OE=Math.max,Ll=Math.min,Ze=Math.sin,$r=Math.sqrt,oe=1e-12,Ci=Math.PI,ra=Ci/2,ia=2*Ci;function TE(e){return e>1?0:e<-1?Ci:Math.acos(e)}function Jd(e){return e>=1?ra:e<=-1?-ra:Math.asin(e)}function sa(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 Go(t)}function ME(e){return e.innerRadius}function CE(e){return e.outerRadius}function $E(e){return e.startAngle}function AE(e){return e.endAngle}function LE(e){return e&&e.padAngle}function kE(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,h=o-s,d=h*l-u*c;if(!(d*d<oe))return d=(u*(t-s)-h*(e-i))/d,[e+d*l,t+d*c]}function aa(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/$r(o*o+l*l),u=c*l,h=-c*o,d=e+u,f=t+h,p=n+u,m=r+h,g=(d+p)/2,v=(f+m)/2,y=p-d,b=m-f,S=y*y+b*b,_=i-s,E=d*m-p*f,T=(b<0?-1:1)*$r(OE(0,_*_*S-E*E)),D=(E*b-y*T)/S,N=(-E*y-b*T)/S,A=(E*b+y*T)/S,C=(-E*y+b*T)/S,V=D-g,M=N-v,L=A-g,w=C-v;return V*V+M*M>L*L+w*w&&(D=A,N=C),{cx:D,cy:N,x01:-u,y01:-h,x11:D*(i/_-1),y11:N*(i/_-1)}}function $i(){var e=ME,t=CE,n=ut(0),r=null,i=$E,s=AE,a=LE,o=null,l=sa(c);function c(){var u,h,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-ra,m=s.apply(this,arguments)-ra,g=Qd(m-p),v=m>p;if(o||(o=u=l()),f<d&&(h=f,f=d,d=h),!(f>oe))o.moveTo(0,0);else if(g>ia-oe)o.moveTo(f*Qn(p),f*Ze(p)),o.arc(0,0,f,p,m,!v),d>oe&&(o.moveTo(d*Qn(m),d*Ze(m)),o.arc(0,0,d,m,p,v));else{var y=p,b=m,S=p,_=m,E=g,T=g,D=a.apply(this,arguments)/2,N=D>oe&&(r?+r.apply(this,arguments):$r(d*d+f*f)),A=Ll(Qd(f-d)/2,+n.apply(this,arguments)),C=A,V=A,M,L;if(N>oe){var w=Jd(N/d*Ze(D)),P=Jd(N/f*Ze(D));(E-=w*2)>oe?(w*=v?1:-1,S+=w,_-=w):(E=0,S=_=(p+m)/2),(T-=P*2)>oe?(P*=v?1:-1,y+=P,b-=P):(T=0,y=b=(p+m)/2)}var U=f*Qn(y),I=f*Ze(y),B=d*Qn(_),j=d*Ze(_);if(A>oe){var Y=f*Qn(b),et=f*Ze(b),pt=d*Qn(S),z=d*Ze(S),K;if(g<Ci)if(K=kE(U,I,pt,z,Y,et,B,j)){var ht=U-K[0],it=I-K[1],Mt=Y-K[0],W=et-K[1],J=1/Ze(TE((ht*Mt+it*W)/($r(ht*ht+it*it)*$r(Mt*Mt+W*W)))/2),ct=$r(K[0]*K[0]+K[1]*K[1]);C=Ll(A,(d-ct)/(J-1)),V=Ll(A,(f-ct)/(J+1))}else C=V=0}T>oe?V>oe?(M=aa(pt,z,U,I,f,V,v),L=aa(Y,et,B,j,f,V,v),o.moveTo(M.cx+M.x01,M.cy+M.y01),V<A?o.arc(M.cx,M.cy,V,ae(M.y01,M.x01),ae(L.y01,L.x01),!v):(o.arc(M.cx,M.cy,V,ae(M.y01,M.x01),ae(M.y11,M.x11),!v),o.arc(0,0,f,ae(M.cy+M.y11,M.cx+M.x11),ae(L.cy+L.y11,L.cx+L.x11),!v),o.arc(L.cx,L.cy,V,ae(L.y11,L.x11),ae(L.y01,L.x01),!v))):(o.moveTo(U,I),o.arc(0,0,f,y,b,!v)):o.moveTo(U,I),!(d>oe)||!(E>oe)?o.lineTo(B,j):C>oe?(M=aa(B,j,Y,et,d,-C,v),L=aa(U,I,pt,z,d,-C,v),o.lineTo(M.cx+M.x01,M.cy+M.y01),C<A?o.arc(M.cx,M.cy,C,ae(M.y01,M.x01),ae(L.y01,L.x01),!v):(o.arc(M.cx,M.cy,C,ae(M.y01,M.x01),ae(M.y11,M.x11),!v),o.arc(0,0,d,ae(M.cy+M.y11,M.cx+M.x11),ae(L.cy+L.y11,L.cx+L.x11),v),o.arc(L.cx,L.cy,C,ae(L.y11,L.x11),ae(L.y01,L.x01),!v))):o.arc(0,0,d,_,S,v)}if(o.closePath(),u)return o=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-Ci/2;return[Qn(h)*u,Ze(h)*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 DE=Array.prototype.slice;function oa(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tf(e){this._context=e}tf.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 la(e){return new tf(e)}function kl(e){return e[0]}function Dl(e){return e[1]}function Ai(e,t){var n=ut(!0),r=null,i=la,s=null,a=sa(o);e=typeof e=="function"?e:e===void 0?kl:ut(e),t=typeof t=="function"?t:t===void 0?Dl:ut(t);function o(l){var c,u=(l=oa(l)).length,h,d=!1,f;for(r==null&&(s=i(f=a())),c=0;c<=u;++c)!(c<u&&n(h=l[c],c,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+e(h,c,l),+t(h,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 Rl(e,t,n){var r=null,i=ut(!0),s=null,a=la,o=null,l=sa(c);e=typeof e=="function"?e:e===void 0?kl:ut(+e),t=typeof t=="function"?t:ut(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Dl:ut(+n);function c(h){var d,f,p,m=(h=oa(h)).length,g,v=!1,y,b=new Array(m),S=new Array(m);for(s==null&&(o=a(y=l())),d=0;d<=m;++d){if(!(d<m&&i(g=h[d],d,h))===v)if(v=!v)f=d,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=d-1;p>=f;--p)o.point(b[p],S[p]);o.lineEnd(),o.areaEnd()}v&&(b[d]=+e(g,d,h),S[d]=+t(g,d,h),o.point(r?+r(g,d,h):b[d],n?+n(g,d,h):S[d]))}if(y)return o=null,y+""||null}function u(){return Ai().defined(i).curve(a).context(s)}return c.x=function(h){return arguments.length?(e=typeof h=="function"?h:ut(+h),r=null,c):e},c.x0=function(h){return arguments.length?(e=typeof h=="function"?h:ut(+h),c):e},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ut(+h),c):r},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:ut(+h),n=null,c):t},c.y0=function(h){return arguments.length?(t=typeof h=="function"?h:ut(+h),c):t},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ut(+h),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(h){return arguments.length?(i=typeof h=="function"?h:ut(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,s!=null&&(o=a(s)),c):a},c.context=function(h){return arguments.length?(h==null?s=o=null:o=a(s=h),c):s},c}function RE(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function IE(e){return e}function NE(){var e=IE,t=RE,n=null,r=ut(0),i=ut(ia),s=ut(0);function a(o){var l,c=(o=oa(o)).length,u,h,d=0,f=new Array(c),p=new Array(c),m=+r.apply(this,arguments),g=Math.min(ia,Math.max(-ia,i.apply(this,arguments)-m)),v,y=Math.min(Math.abs(g)/c,s.apply(this,arguments)),b=y*(g<0?-1:1),S;for(l=0;l<c;++l)(S=p[f[l]=l]=+e(o[l],l,o))>0&&(d+=S);for(t!=null?f.sort(function(_,E){return t(p[_],p[E])}):n!=null&&f.sort(function(_,E){return n(o[_],o[E])}),l=0,h=d?(g-c*b)/d:0;l<c;++l,m=v)u=f[l],S=p[u],v=m+(S>0?S*h:0)+b,p[u]={data:o[u],index:l,value:S,startAngle:m,endAngle:v,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 PE=nf(la);function ef(e){this._curve=e}ef.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 nf(e){function t(n){return new ef(e(n))}return t._curve=e,t}function UE(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(nf(n)):t()._curve},e}function BE(){return UE(Ai().curve(PE))}class VE{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 HE(e){return new VE(e,!0)}function FE(e){return e.source}function GE(e){return e.target}function zE(e){let t=FE,n=GE,r=kl,i=Dl,s=null,a=null,o=sa(l);function l(){let c;const u=DE.call(arguments),h=t.apply(this,u),d=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=d,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 jE(){return zE(HE)}function An(){}function ca(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 ua(e){this._context=e}ua.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:ca(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:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function WE(e){return new ua(e)}function rf(e){this._context=e}rf.prototype={areaStart:An,areaEnd:An,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:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qE(e){return new rf(e)}function sf(e){this._context=e}sf.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:ca(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function YE(e){return new sf(e)}function af(e,t){this._basis=new ua(e),this._beta=t}af.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 XE=function e(t){function n(r){return t===1?new ua(r):new af(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function ha(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 Il(e,t){this._context=e,this._k=(1-t)/6}Il.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:ha(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:ha(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ZE=function e(t){function n(r){return new Il(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Nl(e,t){this._context=e,this._k=(1-t)/6}Nl.prototype={areaStart:An,areaEnd:An,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:ha(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 KE=function e(t){function n(r){return new Nl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Pl(e,t){this._context=e,this._k=(1-t)/6}Pl.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:ha(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 QE=function e(t){function n(r){return new Pl(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ul(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>oe){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>oe){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 of(e,t){this._context=e,this._alpha=t}of.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:Ul(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 JE=function e(t){function n(r){return t?new of(r,t):new Il(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function lf(e,t){this._context=e,this._alpha=t}lf.prototype={areaStart:An,areaEnd:An,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:Ul(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 tS=function e(t){function n(r){return t?new lf(r,t):new Nl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function cf(e,t){this._context=e,this._alpha=t}cf.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:Ul(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 eS=function e(t){function n(r){return t?new cf(r,t):new Pl(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function uf(e){this._context=e}uf.prototype={areaStart:An,areaEnd:An,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 hf(e){return new uf(e)}function df(e){return e<0?-1:1}function ff(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(df(s)+df(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function pf(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Bl(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 da(e){this._context=e}da.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:Bl(this,this._t0,pf(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,Bl(this,pf(this,n=ff(this,e,t)),n);break;default:Bl(this,this._t0,n=ff(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function gf(e){this._context=new mf(e)}(gf.prototype=Object.create(da.prototype)).point=function(e,t){da.prototype.point.call(this,t,e)};function mf(e){this._context=e}mf.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 nS(e){return new da(e)}function rS(e){return new gf(e)}function vf(e){this._context=e}vf.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=yf(e),i=yf(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 yf(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 iS(e){return new vf(e)}function fa(e,t){this._context=e,this._t=t}fa.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 sS(e){return new fa(e,.5)}function aS(e){return new fa(e,0)}function oS(e){return new fa(e,1)}function bf(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 xf(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function lS(e,t){return e[t]}function cS(e){const t=[];return t.key=e,t}function Vl(){var e=ut([]),t=xf,n=bf,r=lS;function i(s){var a=Array.from(e.apply(this,arguments),cS),o,l=a.length,c=-1,u;for(const h of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(h,a[o].key,c,s)]).data=h;for(o=0,u=oa(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?xf:typeof s=="function"?s:ut(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??bf,i):n},i}function uS(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 Li(e,t,n){this.k=e,this.x=t,this.y=n}Li.prototype={constructor:Li,scale:function(e){return e===1?this:new Li(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Li(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+")"}},Li.prototype;var wf=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(wf||{}),_f=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(_f||{}),Ef=(e=>(e.UPDATE="model-update",e))(Ef||{}),Sf=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(Sf||{}),Of=(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))(Of||{}),Tf=(e=>(e.CHANGE="zoom-domain-change",e))(Tf||{}),Mf=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(Mf||{}),Cf=(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))(Cf||{}),$f=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))($f||{}),Af=(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))(Af||{}),Lf=(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))(Lf||{}),kf=(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))(kf||{}),Df=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Df||{}),Rf=(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))(Rf||{}),If=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(If||{}),Nf=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Nf||{}),Pf=(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))(Pf||{}),Uf=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Uf||{}),Bf=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Bf||{}),ki=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(ki||{}),Vf=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(Vf||{}),Hf=(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))(Hf||{}),Ff=(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))(Ff||{}),Gf=(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))(Gf||{}),zf=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(zf||{}),jf=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(jf||{}),Ar=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(Ar||{});const hS=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Gf,Area:$f,Axis:Cf,Bar:Df,Boxplot:Rf,CanvasZoom:Mf,Chart:wf,Choropleth:Ar,CirclePack:Ff,Gauge:kf,Heatmap:jf,Legend:Hf,Line:Nf,Meter:zf,Modal:_f,Model:Ef,Pie:Lf,Radar:Pf,Scatter:If,Threshold:Vf,Toolbar:Sf,Tooltip:ki,Tree:Uf,Treemap:Bf,WordCloud:Af,ZoomBar:Of,ZoomDomain:Tf},Symbol.toStringTag,{value:"Module"})),O=hS;var Q=(e=>(e.HTML="html",e.SVG="svg",e))(Q||{}),Wf=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Wf||{}),tt=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(tt||{}),H=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(H||{}),Ke=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Ke||{}),Ve=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Ve||{}),Jt=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Jt||{}),Z=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(Z||{}),Di=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Di||{}),Yt=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Yt||{}),Ri=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Ri||{}),Hl=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(Hl||{}),$t=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))($t||{}),at=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(at||{}),Lr=(e=>(e.CENTER="center",e))(Lr||{}),pa=(e=>(e.LEFT="left",e.RIGHT="right",e))(pa||{}),Xt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Xt||{}),fn=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(fn||{}),pn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(pn||{}),kr=(e=>(e.SEMI="semi",e.FULL="full",e))(kr||{}),Fl=(e=>(e.UP="up",e.DOWN="down",e))(Fl||{}),ga=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(ga||{}),ma=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(ma||{}),$e=(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))($e||{}),Bt=(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))(Bt||{}),Gl=(e=>(e.LEFT="left",e.RIGHT="right",e))(Gl||{}),Zt=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Zt||{}),va=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(va||{}),Ii=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(Ii||{}),ya=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(ya||{}),gn=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(gn||{});function zl(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}function Ni(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;i=e.formattingValues[a]||e.formattingValues[s]}else{var o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[o]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}function Pi(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;var a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?fS(o,function(h){return h.test(a)}):dS(o,function(h){return h.test(a)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var u=t.slice(a.length);return{value:c,rest:u}}}function dS(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function fS(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function pS(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],s=t.match(e.parsePattern);if(!s)return null;var a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;var o=t.slice(i.length);return{value:a,rest:o}}}function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function Kt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ot(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function yt(e){ot(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||ba(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function xa(e,t){ot(2,arguments);var n=yt(e).getTime(),r=Kt(t);return new Date(n+r)}var gS={};function wa(){return gS}function jl(e){var 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 mS(e){return ot(1,arguments),e instanceof Date||ba(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function vS(e){if(ot(1,arguments),!mS(e)&&typeof e!="number")return!1;var t=yt(e);return!isNaN(Number(t))}function yS(e,t){ot(2,arguments);var n=Kt(t);return xa(e,-n)}var bS=864e5;function xS(e){ot(1,arguments);var t=yt(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/bS)+1}function _a(e){ot(1,arguments);var t=1,n=yt(e),r=n.getUTCDay(),i=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function qf(e){ot(1,arguments);var t=yt(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=_a(r),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var a=_a(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function wS(e){ot(1,arguments);var t=qf(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=_a(n);return r}var _S=6048e5;function ES(e){ot(1,arguments);var t=yt(e),n=_a(t).getTime()-wS(t).getTime();return Math.round(n/_S)+1}function Ea(e,t){var n,r,i,s,a,o,l,c;ot(1,arguments);var u=wa(),h=Kt((n=(r=(i=(s=t==null?void 0:t.weekStartsOn)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=yt(e),f=d.getUTCDay(),p=(f<h?7:0)+f-h;return d.setUTCDate(d.getUTCDate()-p),d.setUTCHours(0,0,0,0),d}function Yf(e,t){var n,r,i,s,a,o,l,c;ot(1,arguments);var u=yt(e),h=u.getUTCFullYear(),d=wa(),f=Kt((n=(r=(i=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&r!==void 0?r:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(h+1,0,f),p.setUTCHours(0,0,0,0);var m=Ea(p,t),g=new Date(0);g.setUTCFullYear(h,0,f),g.setUTCHours(0,0,0,0);var v=Ea(g,t);return u.getTime()>=m.getTime()?h+1:u.getTime()>=v.getTime()?h:h-1}function SS(e,t){var n,r,i,s,a,o,l,c;ot(1,arguments);var u=wa(),h=Kt((n=(r=(i=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),d=Yf(e,t),f=new Date(0);f.setUTCFullYear(d,0,h),f.setUTCHours(0,0,0,0);var p=Ea(f,t);return p}var OS=6048e5;function TS(e,t){ot(1,arguments);var n=yt(e),r=Ea(n,t).getTime()-SS(n,t).getTime();return Math.round(r/OS)+1}function St(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var MS={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return St(t==="yy"?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):St(n+1,2)},d:function(e,t){return St(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return St(e.getUTCHours()%12||12,t.length)},H:function(e,t){return St(e.getUTCHours(),t.length)},m:function(e,t){return St(e.getUTCMinutes(),t.length)},s:function(e,t){return St(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return St(i,t.length)}};const Ln=MS;var Dr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},CS={G:function(e,t,n){var r=e.getUTCFullYear()>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"){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ln.y(e,t)},Y:function(e,t,n,r){var i=Yf(e,r),s=i>0?i:1-i;if(t==="YY"){var a=s%100;return St(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):St(s,t.length)},R:function(e,t){var n=qf(e);return St(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return St(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return St(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){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return St(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){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Ln.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){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return St(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){var i=TS(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):St(i,t.length)},I:function(e,t,n){var r=ES(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):St(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ln.d(e,t)},D:function(e,t,n){var r=xS(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):St(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();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){var i=e.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return St(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){var i=e.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return St(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){var r=e.getUTCDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return St(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){var r=e.getUTCHours(),i=r/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){var r=e.getUTCHours(),i;switch(r===12?i=Dr.noon:r===0?i=Dr.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){var r=e.getUTCHours(),i;switch(r>=17?i=Dr.evening:r>=12?i=Dr.afternoon:r>=4?i=Dr.morning:i=Dr.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"){var r=e.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ln.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ln.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):St(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):St(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ln.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ln.s(e,t)},S:function(e,t){return Ln.S(e,t)},X:function(e,t,n,r){var i=r._originalDate||e,s=i.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return Zf(s);case"XXXX":case"XX":return Jn(s);case"XXXXX":case"XXX":default:return Jn(s,":")}},x:function(e,t,n,r){var i=r._originalDate||e,s=i.getTimezoneOffset();switch(t){case"x":return Zf(s);case"xxxx":case"xx":return Jn(s);case"xxxxx":case"xxx":default:return Jn(s,":")}},O:function(e,t,n,r){var i=r._originalDate||e,s=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xf(s,":");case"OOOO":default:return"GMT"+Jn(s,":")}},z:function(e,t,n,r){var i=r._originalDate||e,s=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xf(s,":");case"zzzz":default:return"GMT"+Jn(s,":")}},t:function(e,t,n,r){var i=r._originalDate||e,s=Math.floor(i.getTime()/1e3);return St(s,t.length)},T:function(e,t,n,r){var i=r._originalDate||e,s=i.getTime();return St(s,t.length)}};function Xf(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=r%60;if(s===0)return n+String(i);var a=t||"";return n+String(i)+a+St(s,2)}function Zf(e,t){if(e%60===0){var n=e>0?"-":"+";return n+St(Math.abs(e)/60,2)}return Jn(e,t)}function Jn(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),s=St(Math.floor(i/60),2),a=St(i%60,2);return r+s+n+a}const $S=CS;var Kf=function(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"})}},Qf=function(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"})}},AS=function(e,t){var n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Kf(e,t);var 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}}",Kf(r,t)).replace("{{time}}",Qf(i,t))},LS={p:Qf,P:AS};const kS=LS;var DS=["D","DD"],RS=["YY","YYYY"];function IS(e){return DS.indexOf(e)!==-1}function NS(e){return RS.indexOf(e)!==-1}function Jf(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var PS={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"}},US=function(e,t,n){var r,i=PS[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};const BS=US;var VS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},FS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},GS={date:zl({formats:VS,defaultWidth:"full"}),time:zl({formats:HS,defaultWidth:"full"}),dateTime:zl({formats:FS,defaultWidth:"full"})};const zS=GS;var jS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},WS=function(e,t,n,r){return jS[e]};const qS=WS;var YS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},XS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ZS={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"]},KS={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"]},QS={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"}},JS={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"}},tO=function(e,t){var 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"},eO={ordinalNumber:tO,era:Ni({values:YS,defaultWidth:"wide"}),quarter:Ni({values:XS,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ni({values:ZS,defaultWidth:"wide"}),day:Ni({values:KS,defaultWidth:"wide"}),dayPeriod:Ni({values:QS,defaultWidth:"wide",formattingValues:JS,defaultFormattingWidth:"wide"})};const nO=eO;var rO=/^(\d+)(th|st|nd|rd)?/i,iO=/\d+/i,sO={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},aO={any:[/^b/i,/^(a|c)/i]},oO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lO={any:[/1/i,/2/i,/3/i,/4/i]},cO={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},uO={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]},hO={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},dO={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]},fO={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},pO={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}},gO={ordinalNumber:pS({matchPattern:rO,parsePattern:iO,valueCallback:function(e){return parseInt(e,10)}}),era:Pi({matchPatterns:sO,defaultMatchWidth:"wide",parsePatterns:aO,defaultParseWidth:"any"}),quarter:Pi({matchPatterns:oO,defaultMatchWidth:"wide",parsePatterns:lO,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Pi({matchPatterns:cO,defaultMatchWidth:"wide",parsePatterns:uO,defaultParseWidth:"any"}),day:Pi({matchPatterns:hO,defaultMatchWidth:"wide",parsePatterns:dO,defaultParseWidth:"any"}),dayPeriod:Pi({matchPatterns:fO,defaultMatchWidth:"any",parsePatterns:pO,defaultParseWidth:"any"})},mO={code:"en-US",formatDistance:BS,formatLong:zS,formatRelative:qS,localize:nO,match:gO,options:{weekStartsOn:0,firstWeekContainsDate:1}};const tp=mO;var vO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bO=/^'([^]*?)'?$/,xO=/''/g,wO=/[a-zA-Z]/;function Rr(e,t,n){var r,i,s,a,o,l,c,u,h,d,f,p,m,g,v,y,b,S;ot(2,arguments);var _=String(t),E=wa(),T=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:E.locale)!==null&&r!==void 0?r:tp,D=Kt((s=(a=(o=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:E.firstWeekContainsDate)!==null&&a!==void 0?a:(h=E.locale)===null||h===void 0||(d=h.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=Kt((f=(p=(m=(g=n==null?void 0:n.weekStartsOn)!==null&&g!==void 0?g:n==null||(v=n.locale)===null||v===void 0||(y=v.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&m!==void 0?m:E.weekStartsOn)!==null&&p!==void 0?p:(b=E.locale)===null||b===void 0||(S=b.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&f!==void 0?f:0);if(!(N>=0&&N<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var A=yt(e);if(!vS(A))throw new RangeError("Invalid time value");var C=jl(A),V=yS(A,C),M={firstWeekContainsDate:D,weekStartsOn:N,locale:T,_originalDate:A},L=_.match(yO).map(function(w){var P=w[0];if(P==="p"||P==="P"){var U=kS[P];return U(w,T.formatLong)}return w}).join("").match(vO).map(function(w){if(w==="''")return"'";var P=w[0];if(P==="'")return _O(w);var U=$S[P];if(U)return!(n!=null&&n.useAdditionalWeekYearTokens)&&NS(w)&&Jf(w,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&IS(w)&&Jf(w,t,String(e)),U(V,w,T.localize,M);if(P.match(wO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");return w}).join("");return L}function _O(e){var t=e.match(bO);return t?t[1].replace(xO,"'"):e}const ge="cds",mn={opacity:{unselected:.05,selected:.4}},kn={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Ir={duration:1e3,ease:ah,zoomLevel:3},Nr={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},ep={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Ae={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},EO={defaultBins:10},Vt={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}},vn={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},te={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},At={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}},tr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},He={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},np={minCellDividerDimension:16,chartPadding:.5},rp={default:{size:24}},SO={horizontalOffset:10},ip={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}},Ee={height:{[Ke.GRAPH_VIEW]:32,[Ke.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},OO=[{type:Zt.RADIUS,name:"Radius"},{type:Zt.AREA,name:"Poor area"},{type:Zt.AREA,name:"Satisfactory area"},{type:Zt.AREA,name:"Great area"},{type:Zt.QUARTILE,name:"Quartiles"}];var TO=typeof global=="object"&&global&&global.Object===Object&&global;const sp=TO;var MO=typeof self=="object"&&self&&self.Object===Object&&self,CO=sp||MO||Function("return this")();const Fe=CO;var $O=Fe.Symbol;const Le=$O;var ap=Object.prototype,AO=ap.hasOwnProperty,LO=ap.toString,Ui=Le?Le.toStringTag:void 0;function kO(e){var t=AO.call(e,Ui),n=e[Ui];try{e[Ui]=void 0;var r=!0}catch{}var i=LO.call(e);return r&&(t?e[Ui]=n:delete e[Ui]),i}var DO=Object.prototype,RO=DO.toString;function IO(e){return RO.call(e)}var NO="[object Null]",PO="[object Undefined]",op=Le?Le.toStringTag:void 0;function er(e){return e==null?e===void 0?PO:NO:op&&op in Object(e)?kO(e):IO(e)}function Qe(e){return e!=null&&typeof e=="object"}var UO="[object Symbol]";function Sa(e){return typeof e=="symbol"||Qe(e)&&er(e)==UO}function lp(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 BO=Array.isArray;const ee=BO;var VO=1/0,cp=Le?Le.prototype:void 0,up=cp?cp.toString:void 0;function hp(e){if(typeof e=="string")return e;if(ee(e))return lp(e,hp)+"";if(Sa(e))return up?up.call(e):"";var t=e+"";return t=="0"&&1/e==-VO?"-0":t}function ke(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Wl(e){return e}var HO="[object AsyncFunction]",FO="[object Function]",GO="[object GeneratorFunction]",zO="[object Proxy]";function ql(e){if(!ke(e))return!1;var t=er(e);return t==FO||t==GO||t==HO||t==zO}var jO=Fe["__core-js_shared__"];const Yl=jO;var dp=function(){var e=/[^.]+$/.exec(Yl&&Yl.keys&&Yl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function WO(e){return!!dp&&dp in e}var qO=Function.prototype,YO=qO.toString;function nr(e){if(e!=null){try{return YO.call(e)}catch{}try{return e+""}catch{}}return""}var XO=/[\\^$.*+?()[\]{}|]/g,ZO=/^\[object .+?Constructor\]$/,KO=Function.prototype,QO=Object.prototype,JO=KO.toString,tT=QO.hasOwnProperty,eT=RegExp("^"+JO.call(tT).replace(XO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nT(e){if(!ke(e)||WO(e))return!1;var t=ql(e)?eT:ZO;return t.test(nr(e))}function rT(e,t){return e==null?void 0:e[t]}function rr(e,t){var n=rT(e,t);return nT(n)?n:void 0}var iT=rr(Fe,"WeakMap");const Xl=iT;var fp=Object.create,sT=function(){function e(){}return function(t){if(!ke(t))return{};if(fp)return fp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const aT=sT;function oT(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 lT(){}function pp(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var cT=800,uT=16,hT=Date.now;function dT(e){var t=0,n=0;return function(){var r=hT(),i=uT-(r-n);if(n=r,i>0){if(++t>=cT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function fT(e){return function(){return e}}var pT=function(){try{var e=rr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Oa=pT;var gT=Oa?function(e,t){return Oa(e,"toString",{configurable:!0,enumerable:!1,value:fT(t),writable:!0})}:Wl,mT=dT(gT);const vT=mT;function yT(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function bT(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 xT(e){return e!==e}function wT(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function _T(e,t,n){return t===t?wT(e,t,n):bT(e,xT,n)}function ET(e,t){var n=e==null?0:e.length;return!!n&&_T(e,t,0)>-1}var ST=9007199254740991,OT=/^(?:0|[1-9]\d*)$/;function Zl(e,t){var n=typeof e;return t=t??ST,!!t&&(n=="number"||n!="symbol"&&OT.test(e))&&e>-1&&e%1==0&&e<t}function Ta(e,t,n){t=="__proto__"&&Oa?Oa(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Bi(e,t){return e===t||e!==e&&t!==t}var TT=Object.prototype,MT=TT.hasOwnProperty;function gp(e,t,n){var r=e[t];(!(MT.call(e,t)&&Bi(r,n))||n===void 0&&!(t in e))&&Ta(e,t,n)}function Vi(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?Ta(n,o,l):gp(n,o,l)}return n}var mp=Math.max;function CT(e,t,n){return t=mp(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=mp(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),oT(e,this,o)}}function vp(e,t){return vT(CT(e,t,Wl),e+"")}var $T=9007199254740991;function Kl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$T}function ir(e){return e!=null&&Kl(e.length)&&!ql(e)}function yp(e,t,n){if(!ke(n))return!1;var r=typeof t;return(r=="number"?ir(n)&&Zl(t,n.length):r=="string"&&t in n)?Bi(n[t],e):!1}function AT(e){return vp(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&&yp(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 LT=Object.prototype;function Ma(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||LT;return e===n}function kT(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var DT="[object Arguments]";function bp(e){return Qe(e)&&er(e)==DT}var xp=Object.prototype,RT=xp.hasOwnProperty,IT=xp.propertyIsEnumerable,NT=bp(function(){return arguments}())?bp:function(e){return Qe(e)&&RT.call(e,"callee")&&!IT.call(e,"callee")};const Pr=NT;function PT(){return!1}var wp=typeof X=="object"&&X&&!X.nodeType&&X,_p=wp&&typeof module=="object"&&module&&!module.nodeType&&module,UT=_p&&_p.exports===wp,Ep=UT?Fe.Buffer:void 0,BT=Ep?Ep.isBuffer:void 0,VT=BT||PT;const Ur=VT;var HT="[object Arguments]",FT="[object Array]",GT="[object Boolean]",zT="[object Date]",jT="[object Error]",WT="[object Function]",qT="[object Map]",YT="[object Number]",XT="[object Object]",ZT="[object RegExp]",KT="[object Set]",QT="[object String]",JT="[object WeakMap]",tM="[object ArrayBuffer]",eM="[object DataView]",nM="[object Float32Array]",rM="[object Float64Array]",iM="[object Int8Array]",sM="[object Int16Array]",aM="[object Int32Array]",oM="[object Uint8Array]",lM="[object Uint8ClampedArray]",cM="[object Uint16Array]",uM="[object Uint32Array]",Dt={};Dt[nM]=Dt[rM]=Dt[iM]=Dt[sM]=Dt[aM]=Dt[oM]=Dt[lM]=Dt[cM]=Dt[uM]=!0,Dt[HT]=Dt[FT]=Dt[tM]=Dt[GT]=Dt[eM]=Dt[zT]=Dt[jT]=Dt[WT]=Dt[qT]=Dt[YT]=Dt[XT]=Dt[ZT]=Dt[KT]=Dt[QT]=Dt[JT]=!1;function hM(e){return Qe(e)&&Kl(e.length)&&!!Dt[er(e)]}function Ql(e){return function(t){return e(t)}}var Sp=typeof X=="object"&&X&&!X.nodeType&&X,Hi=Sp&&typeof module=="object"&&module&&!module.nodeType&&module,dM=Hi&&Hi.exports===Sp,Jl=dM&&sp.process,fM=function(){try{var e=Hi&&Hi.require&&Hi.require("util").types;return e||Jl&&Jl.binding&&Jl.binding("util")}catch{}}();const Br=fM;var Op=Br&&Br.isTypedArray,pM=Op?Ql(Op):hM;const Ca=pM;var gM=Object.prototype,mM=gM.hasOwnProperty;function Tp(e,t){var n=ee(e),r=!n&&Pr(e),i=!n&&!r&&Ur(e),s=!n&&!r&&!i&&Ca(e),a=n||r||i||s,o=a?kT(e.length,String):[],l=o.length;for(var c in e)(t||mM.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Zl(c,l)))&&o.push(c);return o}function Mp(e,t){return function(n){return e(t(n))}}var vM=Mp(Object.keys,Object);const yM=vM;var bM=Object.prototype,xM=bM.hasOwnProperty;function Cp(e){if(!Ma(e))return yM(e);var t=[];for(var n in Object(e))xM.call(e,n)&&n!="constructor"&&t.push(n);return t}function Fi(e){return ir(e)?Tp(e):Cp(e)}function wM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var _M=Object.prototype,EM=_M.hasOwnProperty;function SM(e){if(!ke(e))return wM(e);var t=Ma(e),n=[];for(var r in e)r=="constructor"&&(t||!EM.call(e,r))||n.push(r);return n}function Gi(e){return ir(e)?Tp(e,!0):SM(e)}var OM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,TM=/^\w*$/;function tc(e,t){if(ee(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Sa(e)?!0:TM.test(e)||!OM.test(e)||t!=null&&e in Object(t)}var MM=rr(Object,"create");const zi=MM;function CM(){this.__data__=zi?zi(null):{},this.size=0}function $M(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var AM="__lodash_hash_undefined__",LM=Object.prototype,kM=LM.hasOwnProperty;function DM(e){var t=this.__data__;if(zi){var n=t[e];return n===AM?void 0:n}return kM.call(t,e)?t[e]:void 0}var RM=Object.prototype,IM=RM.hasOwnProperty;function NM(e){var t=this.__data__;return zi?t[e]!==void 0:IM.call(t,e)}var PM="__lodash_hash_undefined__";function UM(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=zi&&t===void 0?PM:t,this}function sr(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])}}sr.prototype.clear=CM,sr.prototype.delete=$M,sr.prototype.get=DM,sr.prototype.has=NM,sr.prototype.set=UM;function BM(){this.__data__=[],this.size=0}function $a(e,t){for(var n=e.length;n--;)if(Bi(e[n][0],t))return n;return-1}var VM=Array.prototype,HM=VM.splice;function FM(e){var t=this.__data__,n=$a(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():HM.call(t,n,1),--this.size,!0}function GM(e){var t=this.__data__,n=$a(t,e);return n<0?void 0:t[n][1]}function zM(e){return $a(this.__data__,e)>-1}function jM(e,t){var n=this.__data__,r=$a(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yn(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])}}yn.prototype.clear=BM,yn.prototype.delete=FM,yn.prototype.get=GM,yn.prototype.has=zM,yn.prototype.set=jM;var WM=rr(Fe,"Map");const ji=WM;function qM(){this.size=0,this.__data__={hash:new sr,map:new(ji||yn),string:new sr}}function YM(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Aa(e,t){var n=e.__data__;return YM(t)?n[typeof t=="string"?"string":"hash"]:n.map}function XM(e){var t=Aa(this,e).delete(e);return this.size-=t?1:0,t}function ZM(e){return Aa(this,e).get(e)}function KM(e){return Aa(this,e).has(e)}function QM(e,t){var n=Aa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function bn(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])}}bn.prototype.clear=qM,bn.prototype.delete=XM,bn.prototype.get=ZM,bn.prototype.has=KM,bn.prototype.set=QM;var JM="Expected a function";function ec(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(JM);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(ec.Cache||bn),n}ec.Cache=bn;var tC=500;function eC(e){var t=ec(e,function(r){return n.size===tC&&n.clear(),r}),n=t.cache;return t}var nC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rC=/\\(\\)?/g,iC=eC(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(nC,function(n,r,i,s){t.push(i?s.replace(rC,"$1"):r||n)}),t});const sC=iC;function Wi(e){return e==null?"":hp(e)}function $p(e,t){return ee(e)?e:tc(e,t)?[e]:sC(Wi(e))}var aC=1/0;function La(e){if(typeof e=="string"||Sa(e))return e;var t=e+"";return t=="0"&&1/e==-aC?"-0":t}function Ap(e,t){t=$p(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[La(t[n++])];return n&&n==r?e:void 0}function Lt(e,t,n){var r=e==null?void 0:Ap(e,t);return r===void 0?n:r}function nc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Lp=Le?Le.isConcatSpreadable:void 0;function oC(e){return ee(e)||Pr(e)||!!(Lp&&e&&e[Lp])}function ka(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=oC),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?ka(o,t-1,n,r,i):nc(i,o):r||(i[i.length]=o)}return i}var lC=Mp(Object.getPrototypeOf,Object);const rc=lC;var cC="[object Object]",uC=Function.prototype,hC=Object.prototype,kp=uC.toString,dC=hC.hasOwnProperty,fC=kp.call(Object);function pC(e){if(!Qe(e)||er(e)!=cC)return!1;var t=rc(e);if(t===null)return!0;var n=dC.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&kp.call(n)==fC}function gC(){this.__data__=new yn,this.size=0}function mC(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function vC(e){return this.__data__.get(e)}function yC(e){return this.__data__.has(e)}var bC=200;function xC(e,t){var n=this.__data__;if(n instanceof yn){var r=n.__data__;if(!ji||r.length<bC-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bn(r)}return n.set(e,t),this.size=n.size,this}function Ge(e){var t=this.__data__=new yn(e);this.size=t.size}Ge.prototype.clear=gC,Ge.prototype.delete=mC,Ge.prototype.get=vC,Ge.prototype.has=yC,Ge.prototype.set=xC;function wC(e,t){return e&&Vi(t,Fi(t),e)}function _C(e,t){return e&&Vi(t,Gi(t),e)}var Dp=typeof X=="object"&&X&&!X.nodeType&&X,Rp=Dp&&typeof module=="object"&&module&&!module.nodeType&&module,EC=Rp&&Rp.exports===Dp,Ip=EC?Fe.Buffer:void 0,Np=Ip?Ip.allocUnsafe:void 0;function Pp(e,t){if(t)return e.slice();var n=e.length,r=Np?Np(n):new e.constructor(n);return e.copy(r),r}function SC(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 Up(){return[]}var OC=Object.prototype,TC=OC.propertyIsEnumerable,Bp=Object.getOwnPropertySymbols,MC=Bp?function(e){return e==null?[]:(e=Object(e),SC(Bp(e),function(t){return TC.call(e,t)}))}:Up;const ic=MC;function CC(e,t){return Vi(e,ic(e),t)}var $C=Object.getOwnPropertySymbols,AC=$C?function(e){for(var t=[];e;)nc(t,ic(e)),e=rc(e);return t}:Up;const Vp=AC;function LC(e,t){return Vi(e,Vp(e),t)}function Hp(e,t,n){var r=t(e);return ee(e)?r:nc(r,n(e))}function sc(e){return Hp(e,Fi,ic)}function kC(e){return Hp(e,Gi,Vp)}var DC=rr(Fe,"DataView");const ac=DC;var RC=rr(Fe,"Promise");const oc=RC;var IC=rr(Fe,"Set");const Vr=IC;var Fp="[object Map]",NC="[object Object]",Gp="[object Promise]",zp="[object Set]",jp="[object WeakMap]",Wp="[object DataView]",PC=nr(ac),UC=nr(ji),BC=nr(oc),VC=nr(Vr),HC=nr(Xl),ar=er;(ac&&ar(new ac(new ArrayBuffer(1)))!=Wp||ji&&ar(new ji)!=Fp||oc&&ar(oc.resolve())!=Gp||Vr&&ar(new Vr)!=zp||Xl&&ar(new Xl)!=jp)&&(ar=function(e){var t=er(e),n=t==NC?e.constructor:void 0,r=n?nr(n):"";if(r)switch(r){case PC:return Wp;case UC:return Fp;case BC:return Gp;case VC:return zp;case HC:return jp}return t});const Hr=ar;var FC=Object.prototype,GC=FC.hasOwnProperty;function zC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&GC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var jC=Fe.Uint8Array;const Da=jC;function lc(e){var t=new e.constructor(e.byteLength);return new Da(t).set(new Da(e)),t}function WC(e,t){var n=t?lc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var qC=/\w*$/;function YC(e){var t=new e.constructor(e.source,qC.exec(e));return t.lastIndex=e.lastIndex,t}var qp=Le?Le.prototype:void 0,Yp=qp?qp.valueOf:void 0;function XC(e){return Yp?Object(Yp.call(e)):{}}function Xp(e,t){var n=t?lc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var ZC="[object Boolean]",KC="[object Date]",QC="[object Map]",JC="[object Number]",t$="[object RegExp]",e$="[object Set]",n$="[object String]",r$="[object Symbol]",i$="[object ArrayBuffer]",s$="[object DataView]",a$="[object Float32Array]",o$="[object Float64Array]",l$="[object Int8Array]",c$="[object Int16Array]",u$="[object Int32Array]",h$="[object Uint8Array]",d$="[object Uint8ClampedArray]",f$="[object Uint16Array]",p$="[object Uint32Array]";function g$(e,t,n){var r=e.constructor;switch(t){case i$:return lc(e);case ZC:case KC:return new r(+e);case s$:return WC(e,n);case a$:case o$:case l$:case c$:case u$:case h$:case d$:case f$:case p$:return Xp(e,n);case QC:return new r;case JC:case n$:return new r(e);case t$:return YC(e);case e$:return new r;case r$:return XC(e)}}function Zp(e){return typeof e.constructor=="function"&&!Ma(e)?aT(rc(e)):{}}var m$="[object Map]";function v$(e){return Qe(e)&&Hr(e)==m$}var Kp=Br&&Br.isMap,y$=Kp?Ql(Kp):v$;const b$=y$;var x$="[object Set]";function w$(e){return Qe(e)&&Hr(e)==x$}var Qp=Br&&Br.isSet,_$=Qp?Ql(Qp):w$;const E$=_$;var S$=1,O$=2,T$=4,Jp="[object Arguments]",M$="[object Array]",C$="[object Boolean]",$$="[object Date]",A$="[object Error]",tg="[object Function]",L$="[object GeneratorFunction]",k$="[object Map]",D$="[object Number]",eg="[object Object]",R$="[object RegExp]",I$="[object Set]",N$="[object String]",P$="[object Symbol]",U$="[object WeakMap]",B$="[object ArrayBuffer]",V$="[object DataView]",H$="[object Float32Array]",F$="[object Float64Array]",G$="[object Int8Array]",z$="[object Int16Array]",j$="[object Int32Array]",W$="[object Uint8Array]",q$="[object Uint8ClampedArray]",Y$="[object Uint16Array]",X$="[object Uint32Array]",kt={};kt[Jp]=kt[M$]=kt[B$]=kt[V$]=kt[C$]=kt[$$]=kt[H$]=kt[F$]=kt[G$]=kt[z$]=kt[j$]=kt[k$]=kt[D$]=kt[eg]=kt[R$]=kt[I$]=kt[N$]=kt[P$]=kt[W$]=kt[q$]=kt[Y$]=kt[X$]=!0,kt[A$]=kt[tg]=kt[U$]=!1;function Ra(e,t,n,r,i,s){var a,o=t&S$,l=t&O$,c=t&T$;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!ke(e))return e;var u=ee(e);if(u){if(a=zC(e),!o)return pp(e,a)}else{var h=Hr(e),d=h==tg||h==L$;if(Ur(e))return Pp(e,o);if(h==eg||h==Jp||d&&!i){if(a=l||d?{}:Zp(e),!o)return l?LC(e,_C(a,e)):CC(e,wC(a,e))}else{if(!kt[h])return i?e:{};a=g$(e,h,o)}}s||(s=new Ge);var f=s.get(e);if(f)return f;s.set(e,a),E$(e)?e.forEach(function(g){a.add(Ra(g,t,n,g,e,s))}):b$(e)&&e.forEach(function(g,v){a.set(v,Ra(g,t,n,v,e,s))});var p=c?l?kC:sc:l?Gi:Fi,m=u?void 0:p(e);return yT(m||e,function(g,v){m&&(v=g,g=e[v]),gp(a,v,Ra(g,t,n,v,e,s))}),a}var Z$=1,K$=4;function Q$(e){return Ra(e,Z$|K$)}var J$="__lodash_hash_undefined__";function t2(e){return this.__data__.set(e,J$),this}function e2(e){return this.__data__.has(e)}function qi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new bn;++t<n;)this.add(e[t])}qi.prototype.add=qi.prototype.push=t2,qi.prototype.has=e2;function ng(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 rg(e,t){return e.has(t)}var n2=1,r2=2;function ig(e,t,n,r,i,s){var a=n&n2,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 h=-1,d=!0,f=n&r2?new qi:void 0;for(s.set(e,t),s.set(t,e);++h<o;){var p=e[h],m=t[h];if(r)var g=a?r(m,p,h,t,e,s):r(p,m,h,e,t,s);if(g!==void 0){if(g)continue;d=!1;break}if(f){if(!ng(t,function(v,y){if(!rg(f,y)&&(p===v||i(p,v,n,r,s)))return f.push(y)})){d=!1;break}}else if(!(p===m||i(p,m,n,r,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function i2(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function cc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var s2=1,a2=2,o2="[object Boolean]",l2="[object Date]",c2="[object Error]",u2="[object Map]",h2="[object Number]",d2="[object RegExp]",f2="[object Set]",p2="[object String]",g2="[object Symbol]",m2="[object ArrayBuffer]",v2="[object DataView]",sg=Le?Le.prototype:void 0,uc=sg?sg.valueOf:void 0;function y2(e,t,n,r,i,s,a){switch(n){case v2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case m2:return!(e.byteLength!=t.byteLength||!s(new Da(e),new Da(t)));case o2:case l2:case h2:return Bi(+e,+t);case c2:return e.name==t.name&&e.message==t.message;case d2:case p2:return e==t+"";case u2:var o=i2;case f2:var l=r&s2;if(o||(o=cc),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=a2,a.set(e,t);var u=ig(o(e),o(t),r,i,s,a);return a.delete(e),u;case g2:if(uc)return uc.call(e)==uc.call(t)}return!1}var b2=1,x2=Object.prototype,w2=x2.hasOwnProperty;function _2(e,t,n,r,i,s){var a=n&b2,o=sc(e),l=o.length,c=sc(t),u=c.length;if(l!=u&&!a)return!1;for(var h=l;h--;){var d=o[h];if(!(a?d in t:w2.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=a;++h<l;){d=o[h];var v=e[d],y=t[d];if(r)var b=a?r(y,v,d,t,e,s):r(v,y,d,e,t,s);if(!(b===void 0?v===y||i(v,y,n,r,s):b)){m=!1;break}g||(g=d=="constructor")}if(m&&!g){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(m=!1)}return s.delete(e),s.delete(t),m}var E2=1,ag="[object Arguments]",og="[object Array]",Ia="[object Object]",S2=Object.prototype,lg=S2.hasOwnProperty;function O2(e,t,n,r,i,s){var a=ee(e),o=ee(t),l=a?og:Hr(e),c=o?og:Hr(t);l=l==ag?Ia:l,c=c==ag?Ia:c;var u=l==Ia,h=c==Ia,d=l==c;if(d&&Ur(e)){if(!Ur(t))return!1;a=!0,u=!1}if(d&&!u)return s||(s=new Ge),a||Ca(e)?ig(e,t,n,r,i,s):y2(e,t,l,n,r,i,s);if(!(n&E2)){var f=u&&lg.call(e,"__wrapped__"),p=h&&lg.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return s||(s=new Ge),i(m,g,n,r,s)}}return d?(s||(s=new Ge),_2(e,t,n,r,i,s)):!1}function Na(e,t,n,r,i){return e===t?!0:e==null||t==null||!Qe(e)&&!Qe(t)?e!==e&&t!==t:O2(e,t,n,r,Na,i)}var T2=1,M2=2;function C2(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 h=new Ge;if(r)var d=r(c,u,l,e,t,h);if(!(d===void 0?Na(u,c,T2|M2,r,h):d))return!1}}return!0}function cg(e){return e===e&&!ke(e)}function $2(e){for(var t=Fi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,cg(i)]}return t}function ug(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function A2(e){var t=$2(e);return t.length==1&&t[0][2]?ug(t[0][0],t[0][1]):function(n){return n===e||C2(n,e,t)}}function L2(e,t){return e!=null&&t in Object(e)}function k2(e,t,n){t=$p(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=La(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&&Kl(i)&&Zl(a,i)&&(ee(e)||Pr(e)))}function D2(e,t){return e!=null&&k2(e,t,L2)}var R2=1,I2=2;function N2(e,t){return tc(e)&&cg(t)?ug(La(e),t):function(n){var r=Lt(n,e);return r===void 0&&r===t?D2(n,e):Na(t,r,R2|I2)}}function P2(e){return function(t){return t==null?void 0:t[e]}}function U2(e){return function(t){return Ap(t,e)}}function B2(e){return tc(e)?P2(La(e)):U2(e)}function Pa(e){return typeof e=="function"?e:e==null?Wl:typeof e=="object"?ee(e)?N2(e[0],e[1]):A2(e):B2(e)}function V2(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 H2=V2();const hg=H2;function hc(e,t,n){(n!==void 0&&!Bi(e[t],n)||n===void 0&&!(t in e))&&Ta(e,t,n)}function dc(e){return Qe(e)&&ir(e)}function fc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function F2(e){return Vi(e,Gi(e))}function G2(e,t,n,r,i,s,a){var o=fc(e,n),l=fc(t,n),c=a.get(l);if(c){hc(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,h=u===void 0;if(h){var d=ee(l),f=!d&&Ur(l),p=!d&&!f&&Ca(l);u=l,d||f||p?ee(o)?u=o:dc(o)?u=pp(o):f?(h=!1,u=Pp(l,!0)):p?(h=!1,u=Xp(l,!0)):u=[]:pC(l)||Pr(l)?(u=o,Pr(o)?u=F2(o):(!ke(o)||ql(o))&&(u=Zp(l))):h=!1}h&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),hc(e,n,u)}function dg(e,t,n,r,i){e!==t&&hg(t,function(s,a){if(i||(i=new Ge),ke(s))G2(e,t,a,n,dg,r,i);else{var o=r?r(fc(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),hc(e,a,o)}},Gi)}function z2(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 j2(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var W2="[object Map]",q2="[object Set]",Y2=Object.prototype,X2=Y2.hasOwnProperty;function ze(e){if(e==null)return!0;if(ir(e)&&(ee(e)||typeof e=="string"||typeof e.splice=="function"||Ur(e)||Ca(e)||Pr(e)))return!e.length;var t=Hr(e);if(t==W2||t==q2)return!e.size;if(Ma(e))return!Cp(e).length;for(var n in e)if(X2.call(e,n))return!1;return!0}var Z2=AT(function(e,t,n){dg(e,t,n)});const rt=Z2;var K2=1/0,Q2=Vr&&1/cc(new Vr([,-0]))[1]==K2?function(e){return new Vr(e)}:lT;const J2=Q2;var tA=200;function fg(e,t,n){var r=-1,i=ET,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=z2;else if(s>=tA){var c=t?null:J2(e);if(c)return cc(c);a=!1,i=rg,l=new qi}else l=t?[]:o;t:for(;++r<s;){var u=e[r],h=t?t(u):u;if(u=n||u!==0?u:0,a&&h===h){for(var d=l.length;d--;)if(l[d]===h)continue t;t&&l.push(h),o.push(u)}else i(l,h,n)||(l!==o&&l.push(h),o.push(u))}return o}var eA=vp(function(e){var t=j2(e);return dc(t)&&(t=void 0),fg(ka(e,1,dc,!0),Pa(t))});const nA=eA;function rA(e){return e&&e.length?fg(e):[]}const xn=Q$,Yi=rA;function iA(e,t,n){let r=null;return(...i)=>{const s=this;s.mousePosition=Hn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function Nt(e,t){var n;const r=xn(e),i=Object.keys(t.axes||{});(n=t==null?void 0:t.toolbar)!=null&&n.controls&&delete r.toolbar.controls,i.length===0&&delete r.axes;for(const s in r.axes)if(i.includes(s)){const a=t.axes[s];if((a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format"),a.mapsTo==null){const l=a.scaleType;l==null?a.mapsTo="value":l===Z.TIME?a.mapsTo="date":l===Z.LABELS&&(a.mapsTo="key")}}else delete r.axes[s];return pc(r,t),rt(r,t)}function wn(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 Xi(e){const t=/\(([^)]+)\)/.exec(e);if(t&&t.length>1){const n=t[1].split(",");if(n.length>1)return{x:parseFloat(n[0]),y:parseFloat(n[1])}}return{x:0,y:0}}function pg(e,t,n="value"){const r=e/t.reduce((i,s)=>i+s[n],0)*100;return r%1!==0?parseFloat(r.toFixed(1)):r}function Zi(e,t,n){if(n>e.length)return e;if(t===Ve.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Ve.FRONT_LINE)return"..."+e.substr(-n);if(t===Ve.END_LINE)return e.substr(0,n)+"..."}function pc(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=OO.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=nA(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},gg=(e,t)=>t===Jt.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ue=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=gg(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function _n(e,t,n){return n===Jt.VERTICAL?[e,t]:[t,e]}const Fr={type:Ve.END_LINE,threshold:16,numCharacter:14},sA={enabled:!0,position:Di.BOTTOM,clickable:!0,truncation:Fr,alignment:Yt.LEFT,order:null,additionalItems:[]},aA={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},oA={enabled:!0},mg={enabled:!0,showTotal:!0,truncation:Fr,groupLabel:"Group"},vg={top:{visible:!0,includeZero:!0,truncation:Fr},bottom:{visible:!0,includeZero:!0,truncation:Fr},left:{visible:!0,includeZero:!0,truncation:Fr},right:{visible:!0,includeZero:!0,truncation:Fr}},Ua={addSpaceOnEdges:1,showDayName:!1,localeObject:tp,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"}}},lA=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),le={width:null,height:null,resizable:!0,theme:Wf.WHITE,tooltip:mg,legend:sA,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:Bt.SHOW_AS_DATATABLE},...lA?[{type:Bt.MAKE_FULLSCREEN}]:[],{type:Bt.EXPORT_CSV},{type:Bt.EXPORT_PNG},{type:Bt.EXPORT_JPG}]}},yg=rt({},le,{thematic:{projection:gn.geoNaturalEarth1}}),Ki=rt({},le,{axes:vg,timeScale:Ua,grid:aA,ruler:oA,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Ke.GRAPH_VIEW}}}),or=rt({},Ki,{bars:{maxWidth:16,spacingFactor:.25},timeScale:rt(Ua,{addSpaceOnEdges:1})}),cA=rt({},or,{}),uA=rt({},or,{}),hA=rt({},or,{bars:rt({},or.bars,{dividerSize:1.5})}),dA=rt({},or,{}),gc=rt({},Ki,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),fA=gc,bg=rt({},gc,{points:{radius:3,filled:!1,enabled:!0}}),xg=rt({},bg,{timeScale:rt(Ua,{addSpaceOnEdges:0})}),pA=xg,gA=rt({},Ki,{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:Zt.RADIUS,name:"Radius"}]}}),mA=rt({},Ki,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Zt.AREA,name:"Poor area"},{type:Zt.AREA,name:"Satisfactory area"},{type:Zt.AREA,name:"Great area"},{type:Zt.QUARTILE,name:"Quartiles"}]}}),vA=rt({},or,{bars:{dividerSize:1.5},timeScale:rt(Ua,{addSpaceOnEdges:0})}),yA=rt({},le,{tooltip:rt({},mg,{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"}}),wg=rt({},le,{pie:{labels:{formatter:null,enabled:!0},alignment:Yt.LEFT,sortFunction:null,valueMapsTo:"value"}}),bA=rt({},le,{legend:{enabled:!1},gauge:{type:kr.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:Yt.LEFT}}),xA=rt({},wg,{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:Yt.LEFT}}),_g=rt({},le,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),wA=rt({},_g,{legend:{enabled:!0}}),_A=rt({},le,{radar:{axes:{angle:"key",value:"value"},alignment:Yt.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),EA=rt({},or,{comboChartTypes:[]}),SA=rt({tree:{type:Hl.TREE}},le,{}),OA=rt({},le,{data:rt(le.data,{groupMapsTo:"name"})}),TA=rt({},le,Nr,{data:rt(le.data,{groupMapsTo:"name"})}),MA=rt({},le,{alluvial:{data:rt(le.data,{groupMapsTo:"source"}),nodeAlignment:Yt.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),CA=rt({},le,{axes:vg,heatmap:{divider:{state:Ii.AUTO},colorLegend:{type:"linear"}}}),$A=rt({},yg,{choropleth:{colorLegend:{type:"linear"}}}),Tt={alluvialChart:MA,areaChart:xg,axisChart:Ki,boxplotChart:dA,bubbleChart:gA,bulletChart:mA,chart:le,circlePackChart:TA,choroplethChart:$A,comboChart:EA,donutChart:xA,gaugeChart:bA,groupedBarChart:uA,heatmapChart:CA,histogramChart:vA,lineChart:bg,lollipopChart:fA,meterChart:_g,pieChart:wg,proportionalMeterChart:wA,radarChart:_A,scatterChart:gc,simpleBarChart:cA,stackedAreaChart:pA,stackedBarChart:hA,thematicChart:yg,treeChart:SA,treemapChart:OA,wordCloudChart:yA};var Eg=(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))(Eg||{});const mc=[["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 Sg(e,t,n,r,i){const s=t===0,a=Number(Rr(new Date(e),"c"))===2,o=Number(Rr(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||Va(e)||Qi(e,l)||Dn(e);case"minute":return s||Va(e)||Qi(e,l)||Dn(e);case"30minutes":return s||Va(e)||Qi(e,l)||Dn(e);case"hourly":return s||Va(e)||Qi(e,l)||Dn(e);case"daily":return i?s||a||Dn(e):s||Qi(e,l)||Dn(e);case"weekly":return s||a||Dn(e);case"monthly":return s||Dn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function vc(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 h=Sg(e,t,n,r,s)?c:u;r==="15seconds"&&o.getMilliseconds()!==0&&(h=h.replace("pp","h:mm:ss.SSS a"));const d=i.localeObject;return Rr(o,h,{locale:d})}function Ba(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function AA(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function LA(e){const t=mc.reduce((n,[,r],i)=>{const s=mc[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return mc[t][0]}function yc(e,t){if(Eg[t])return t;if(e.length===1)return"15seconds";const n=AA(e),r=Mn(n);return LA(r)}function Va(e){const{s:t,m:n,H:r}=Ba(e);return r===0&&n===0&&t===0}function Qi(e,t){const n=Ba(e).M,r=Ba(t).M;return n!==r}function Dn(e){const{M:t,d:n,s:r,m:i,H:s}=Ba(e);return t===1&&n===1&&s===0&&i===0&&r===0}function Og(e){return e===void 0?"":e.toISOString()}function Tg(e){const t=Re(e,r=>r.value),n=Be().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}function Mg(e,t){const n=x(t,"gradient","colors"),r=!ze(n);let i=x(t,"pairing","option");const s=Tg(e),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const l=a==="diverge"?17:11;for(let c=1;c<l+1;c++)o.push(`fill-${a}-${i}-${c}`)}return xl().domain(s).range(o)}var lt=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(lt||{});function kA(e,t){return e&&hg(e,t,Fi)}function DA(e,t){return function(n,r){if(n==null)return n;if(!ir(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 RA=DA(kA);const bc=RA;function IA(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 NA(e,t,n,r){return bc(e,function(i,s,a){t(r,i,n(i),a)}),r}function PA(e,t){return function(n,r){var i=ee(n)?IA:NA,s=t?t():{};return i(n,e,Pa(r),s)}}function UA(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 BA=Object.prototype,VA=BA.hasOwnProperty,HA=PA(function(e,t,n){VA.call(e,n)?e[n].push(t):Ta(e,n,[t])});const FA=HA;class Je{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}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===Z.LINEAR||c===Z.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===Z.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,h]=a[o].domain;r=r.filter(d=>!(l in d)||d[l]>=u&&d[l]<=h)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=Vt.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(s=>r.find(a=>a.name===s[i]&&a.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(xn(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(n=>t.includes(n.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=Vt.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(n=>n.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(n=>n.name)}aggregateBinDataByGroup(t){return FA(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=EO.defaultBins}=s,l=Array.isArray(o),c=s0().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],h=Array.from(new Set(t.map(f=>f[a]))),d=[];return c.forEach(f=>{const p=`${f.x0}-${f.x1}`,m=this.aggregateBinDataByGroup(f);h.forEach(g=>{d.push({group:g,key:p,value:m[g]||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 Vl().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=Yi(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Og(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===Z.TIME?s.sort((l,c)=>{const u=new Date(l),h=new Date(c);return u-h}):(o===Z.LOG||o===Z.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("-"),h={x0:c,x1:u},d=t.find(f=>f.x0.toString()===c.toString());return a.forEach(f=>{h[f]=d.filter(p=>p[i]===f).length}),h}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const h=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[i]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?Og(f[p])===l:f[p].toString()===l)}),d=this.services.cartesianScales.getRangeIdentifier(c);c[u]=h?h[d]: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 l=UA(o.map(c=>[c.sharedStackKey,0]));o.forEach(c=>{a.forEach(u=>{l[c.sharedStackKey]+=c[u]})}),o.forEach(c=>{a.forEach(u=>{const h=l[c.sharedStackKey];l[c.sharedStackKey]?c[u]=c[u]/h*100:c[u]=0})})}return(r?Vl().offset(uS):Vl()).keys(a)(o).map((l,c)=>Object.keys(l).filter(u=>!isNaN(u)).map(u=>{const h=l[u];return h[s]=a[c],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();pc(n,t),this.set({options:rt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(O.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=Vt.items.status,i=this.getDataGroups(),s=i.some(c=>c.status===r),a=i.filter(c=>c.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((c,u)=>{i[u].status=n});else{const c=i.findIndex(u=>u.name===t);i[c].status=i[c].status===r?n:r}else i.forEach((c,u)=>{i[u].status=c.name===t?n:r});const o=i.filter(c=>c.status===n),l=this.getOptions();i.some(c=>c.status===r)?l.data.selectedGroups=o.map(c=>c.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(O.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://carbon-design-system.github.io/carbon-charts/?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 h=x(i,o);h?l=h: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 t=this.getTabularDataArray().map(i=>i.map(s=>`"${s==="&ndash;"?"–":s}"`));let n="",r="";t.forEach(function(i,s){r=i.join(","),n+=s<t.length?r+`
2
- `:r}),this.services.files.downloadCSV(n,"myChart.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}=Vt.items.status,s=this.getOptions(),a=Yi(t.map(l=>l[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(l=>a.includes(l))||(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(r=>{this.allDataGroups.includes(r)||console.warn(`"${r}" does not exist in data groups.`)}),this.allDataGroups.filter(r=>n[r]).forEach(r=>this.colorScale[r]=n[r])}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=ep.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=Qs().range(o).domain(this.allDataGroups)}}class lr extends Je{constructor(t){super(t),this.axisFlavor=ya.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,n=this.getOptions(),r=t.isDualAxes(),i={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return r&&(i.secondaryDomain=t.secondaryDomainAxisPosition,i.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(i).forEach(s=>{const a=i[s];t.scales[a]?i[s]={position:a,label:t.getScaleLabel(a),identifier:x(n,"axes",a,"mapsTo")}:i[s]=null}),i}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services,{primaryDomain:s,primaryRange:a,secondaryDomain:o,secondaryRange:l}=this.assignRangeAndDomains(),c=i.getDomainAxisScaleType();let u;return c===Z.TIME&&(u=h=>Rr(h,"MMM d, yyyy")),[["Group",s.label,a.label,...o?[o.label]:[],...l?[l.label]:[]],...t.map(h=>[h[r],h[s.identifier]===null?"&ndash;":u?u(h[s.identifier]):h[s.identifier],h[a.identifier]===null||isNaN(h[a.identifier])?"&ndash;":h[a.identifier].toLocaleString(),...o?[h[o.identifier]===null?"&ndash;":h[o.identifier]]:[],...l?[h[l.identifier]===null||isNaN(h[l.identifier])?"&ndash;":h[l.identifier]]:[]])]}setData(t){let n;if(t&&(n=super.setData(t),x(this.getOptions(),"zoomBar",H.TOP,"enabled"))){const r=x(this.getOptions(),"zoomBar",H.TOP,"data");this.setZoomBarData(r)}return n}setZoomBarData(t){const n=t?this.sanitize(xn(t)):this.getDisplayData();let r=n;const{cartesianScales:i}=this.services;if(n&&i.domainAxisPosition&&i.rangeAxisPosition){const s=i.getDomainIdentifier(),a=i.getRangeIdentifier();let o=n.map(l=>l[s].getTime());o=Yi(o).sort(),r=o.map(l=>{let c=0;const u={};return n.forEach(h=>{h[s].getTime()===l&&(c+=h[a])}),u[s]=new Date(l),u[a]=c,u})}this.set({zoomBarData:r})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const n=this.getOptions();if(!n.axes)return t;const r=[];return Object.keys(H).forEach(i=>{const s=H[i],a=n.axes[s];if(a&&a.scaleType===Z.TIME){const o=a.mapsTo;(o!==null||o!==void 0)&&r.push(o)}}),r.length>0&&t.forEach(i=>{r.forEach(s=>{x(i,s,"getTime")===null&&(i[s]=new Date(i[s]))})}),t}sanitize(t){return t=super.sanitize(t),t=this.sanitizeDateValues(t),t}}let GA=class extends lr{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData();return t.sort((n,r)=>n.source.localeCompare(r.source)),[["Source","Target","Value"],...t.map(n=>[n.source,n.target,n.value])]}},zA=class extends lr{constructor(t){super(t)}getBoxQuartiles(t){return{q_25:ho(t,.25),q_50:ho(t,.5),q_75:ho(t,.75)}}getBoxplotData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getGroupedData(),i=[];for(const{name:s,data:a}of r){const o=this.services.cartesianScales.getRangeIdentifier(),l=a.map(b=>b[o]).sort(be),c={[n]:s,counts:l,quartiles:this.getBoxQuartiles(l),outliers:null,whiskers:null},u=c.quartiles.q_25,h=c.quartiles.q_75,d=(h-u)*1.5,f=u-d,p=h+d,m=[],g=[];for(const b of l)b<f||b>p?m.push(b):g.push(b);c.outliers=m;const v=Mn(g),y=Vn(g);c.whiskers={min:v||Mn([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75]),max:y||Vn([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75])},i.push(c)}return i}getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getBoxplotData();return[["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],...r.map(i=>{let s=x(i,"outliers");return(s===null||s.length===0)&&(s=["&ndash;"]),[i[n],x(i,"whiskers","min")!==null?x(i,"whiskers","min").toLocaleString():"&ndash;",x(i,"quartiles","q_25")!==null?x(i,"quartiles","q_25").toLocaleString():"&ndash;",x(i,"quartiles","q_50")!==null?x(i,"quartiles","q_50").toLocaleString():"&ndash;",x(i,"quartiles","q_75")!==null?x(i,"quartiles","q_75").toLocaleString():"&ndash;",x(i,"whiskers","max")!==null?x(i,"whiskers","max").toLocaleString():"&ndash;",x(i,"quartiles","q_75")!==null&&x(i,"quartiles","q_25")!==null?(x(i,"quartiles","q_75")-x(i,"quartiles","q_25")).toLocaleString():"&ndash;",s.map(a=>a.toLocaleString()).join(",")]})]}setColorClassNames(){const t=x(this.getOptions(),"color","pairing");let n=x(t,"option");const r=ep.pairingOptions;n=n<=r["1-color"]?n:1;const i=this.allDataGroups.map(()=>`1-${n}-1`);this.colorClassNames=Qs().range(i).domain(this.allDataGroups)}},jA=class extends lr{constructor(t){super(t)}getMatchingRangeIndexForDatapoint(t){let n;for(let r=t.ranges.length-1;r>0;r--){const i=t.ranges[r];if(t.value>=i)return n=r,n}return 0}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier(),s=x(n,"bullet","performanceAreaTitles");return[["Title","Group","Value","Target","Percentage","Performance"],...t.map(a=>[a.title,a[r],a.value===null?"&ndash;":a.value,x(a,"marker")===null?"&ndash;":a.marker,x(a,"marker")===null?"&ndash;":`${Math.floor(a[i]/a.marker*100)}%`,s[this.getMatchingRangeIndexForDatapoint(a)]])]}},WA=class extends Je{constructor(t){super(t),this._colorScale=void 0,this._matrix={}}getFillColor(t){return this._colorScale(t)}getCombinedData(){if(ze(this._matrix)){const t=this.getOptions(),n=this.getDisplayData();!ze(n)&&!ze(t.geoData.objects.countries)&&(t.geoData.objects.countries.geometries.forEach(r=>{this._matrix[r.properties.NAME]=r}),n.forEach(r=>{this._matrix[r.name]?this._matrix[r.name].value=r.value||null:console.warn(`Data point ${r} is missing geographical data.`)}))}return this._matrix}getTabularDataArray(){const t=this.getDisplayData();return[["Country ID","Country Name","Value"],...t.map(n=>[n.id===null?"&ndash;":n.id,n.name,n.value])]}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=x(this.getOptions(),"color");this._colorScale=Mg(this.getDisplayData(),t)}},qA=class extends Je{constructor(t){super(t),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(t){super.setData(t),this.setDataGroups(),t.length===1&&(this.parentNode=!0),this.setZoom()}setOptions(t){const n=this.getOptions(),r=rt({},t,this.getZoomOptions(t));pc(n,r);const i=this.getHierarchyLevel(),s=x(n,"circlePack","hierarchyLevel");this.set({options:rt(n,r),depth:s&&s<4?s:i})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),r=t||this.getOptions(),i=n.length===1&&x(n,0,"children")?x(n,0,"children"):n;let s=this.getHierarchyLevel();return i.some(a=>{if(a.children&&a.children.some(o=>o.children))return s=3,!1}),x(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Zt.ZOOM,name:"Click to zoom"}]}}:null}setZoom(t){this.setOptions(this.getZoomOptions(t))}updateHierarchyLevel(t){this.set({depth:t})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const t=this.getData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=t.map(s=>{const a=s[r];return this.setChildrenDataGroup(s,a)});this.set({data:i},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(r=>this.setChildrenDataGroup(r,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Parent","Value"]];return t.forEach(r=>{let i=r.value?r.value:0;r.children&&(i+=this.getChildrenDatums(r.children,r.name,n,0)),n.push(["&ndash;",r.name,i])}),n}getChildrenDatums(t,n,r=[],i=0){const s=n;return t.forEach(a=>{const o=a.name;let l=0;if(a.children)a.children.length>0&&(typeof a.value=="number"&&(i+=a.value),l+=this.getChildrenDatums(a.children,o,r,l),r.push([o,s,l]),i+=l);else{let c=0;typeof a.value=="number"&&(c=a.value,i+=a.value),r.push([a.name,s,c])}}),i}},YA=class extends Je{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(r=>{r.key&&r.key!==r.group&&(r.group=r.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data;return[["Group","Value"],...t.map(i=>[i[r],i.value===null?"&ndash;":i.value.toLocaleString()])]}sanitize(t){return this.getTabularData(t).sort((n,r)=>r.value-n.value)}},XA=class extends Je{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data;return[["Group","Value"],...t.map(i=>[i[r],i.value===null?"&ndash;":i.value.toLocaleString()])]}},ZA=class extends lr{constructor(t){super(t),this.axisFlavor=ya.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=x(this.getOptions(),"axes");if(x(n,"left","scaleType")&&x(n,"left","scaleType")!==Z.LABELS||x(n,"right","scaleType")&&x(n,"right","scaleType")!==Z.LABELS||x(n,"top","scaleType")&&x(n,"top","scaleType")!==Z.LABELS||x(n,"bottom","scaleType")&&x(n,"bottom","scaleType")!==Z.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=Re(this.getDisplayData(),r=>r.value),n=Be().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}getFillColor(t){return this._colorScale(t)}getUniqueDomain(){if(ze(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getDomainIdentifier(),i=n.getMainXAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._domains=Array.from(new Set(t.map(a=>a[r])))}return this._domains}getUniqueRanges(){if(ze(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getRangeIdentifier(),i=n.getMainYAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._ranges=Array.from(new Set(t.map(a=>a[r])))}return this._ranges}getMatrix(){if(ze(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s={};n.forEach(a=>{s[a]={value:null,index:-1}}),t.forEach(a=>{this._matrix[a]=xn(s)}),this.getDisplayData().forEach((a,o)=>{this._matrix[a[r]][a[i]]={value:a.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(xn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){ze(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s=[];return t.forEach(a=>{n.forEach(o=>{const l={value:this._matrix[a][o].value,index:this._matrix[a][o].index};l[r]=a,l[i]=o,s.push(l)})}),s}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:r}=this.assignRangeAndDomains();return[[n.label,r.label,"Value"],...t.map(i=>[i[n.identifier]===null?"&ndash;":i[n.identifier],i[r.identifier]===null?"&ndash;":i[r.identifier].toLocaleString(),i.value])]}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=x(t,"color","gradient","colors"),r=!ze(n);let i=x(t,"color","pairing","option");const s=this.getValueDomain(),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const c=a==="diverge"?17:11;for(let u=1;u<c+1;u++)o.push(`fill-${a}-${i}-${u}`)}this._colorScale=xl().domain(s).range(o);const l=x(this.getOptions(),"color");this._colorScale=Mg(this.getDisplayData(),l)}},KA=class extends lr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getBinnedStackedData();return[[Lt(t,"bins.rangeLabel")||"Range",...r.map(i=>Lt(i,`0.${n}`))],...Lt(r,0).map((i,s)=>[`${Lt(i,"data.x0")} – ${Lt(i,"data.x1")}`,...r.map(a=>Lt(a[s],`data.${Lt(a[s],n)}`))])]}},QA=class extends Je{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((n,r)=>n+r.value,0)}getFillColor(t){const n=this.getOptions(),r=x(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=x(this.getDisplayData()),{value:r}=n?n.reduce((a,o)=>({value:a.value+o.value})):0,i=x(t,"meter","proportional")?r:r>100?100:r,s=x(t,"meter","status","ranges");if(s){const a=s.filter(o=>o.range[0]<=i&&i<=o.range[1]);if(a.length>0)return a[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getStatus(),s=x(n,"meter","proportional");let a=[],o;if(s===null){o=100;const l=t[0];a=[["Group","Value",...i?["Status"]:[]],[l[r],l.value,...i?[i]:[]]]}else o=x(s,"total")||this.getMaximumDomain(t),a=[["Group","Value","Percentage of total"],...t.map(c=>[c[r],c.value,(c.value/o*100).toFixed(2)+" %"])];return a}},JA=class extends lr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=x(t,"radar","axes"),s=x(n,"0","data").map(a=>a[r]);return[["Group",...s],...n.map(a=>[a.name,...s.map((o,l)=>x(a,"data",l,i)!==null?x(a,"data",l,i).toLocaleString():"&ndash;")])]}},tL=class extends Je{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Parent"]];return t.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,"&ndash;"])}),n}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}},eL=class extends Je{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Group","Value"]];return t.forEach(r=>{Array.isArray(r.children)?r.children.forEach(i=>{n.push([i.name,r.name,i.value])}):x(r.name)!==null&&x(r.value)&&n.push(["–",r.name,r.value])}),n}},nL=class extends Je{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:s}=n.data;return[[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],...t.map(a=>[a[i],a[s],a[r]])]}};var rL=/\s/;function iL(e){for(var t=e.length;t--&&rL.test(e.charAt(t)););return t}var sL=/^\s+/;function aL(e){return e&&e.slice(0,iL(e)+1).replace(sL,"")}var Cg=0/0,oL=/^[-+]0x[0-9a-f]+$/i,lL=/^0b[01]+$/i,cL=/^0o[0-7]+$/i,uL=parseInt;function Ji(e){if(typeof e=="number")return e;if(Sa(e))return Cg;if(ke(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ke(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=aL(e);var n=lL.test(e);return n||cL.test(e)?uL(e.slice(2),n?2:8):oL.test(e)?Cg:+e}var hL=function(){return Fe.Date.now()};const xc=hL;var dL="Expected a function",fL=Math.max,pL=Math.min;function Ha(e,t,n){var r,i,s,a,o,l,c=0,u=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(dL);t=Ji(t)||0,ke(n)&&(u=!!n.leading,h="maxWait"in n,s=h?fL(Ji(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d);function f(E){var T=r,D=i;return r=i=void 0,c=E,a=e.apply(D,T),a}function p(E){return c=E,o=setTimeout(v,t),u?f(E):a}function m(E){var T=E-l,D=E-c,N=t-T;return h?pL(N,s-D):N}function g(E){var T=E-l,D=E-c;return l===void 0||T>=t||T<0||h&&D>=s}function v(){var E=xc();if(g(E))return y(E);o=setTimeout(v,m(E))}function y(E){return o=void 0,d&&r?f(E):(r=i=void 0,a)}function b(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function S(){return o===void 0?a:y(xc())}function _(){var E=xc(),T=g(E);if(r=arguments,i=this,l=E,T){if(o===void 0)return p(l);if(h)return clearTimeout(o),o=setTimeout(v,t),f(l)}return o===void 0&&(o=setTimeout(v,t)),a}return _.cancel=b,_.flush=S,_}function gL(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 mL=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function En(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Fa(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function vL(e){const t=Fa(e,"border-left-width"),n=Fa(e,"border-right-width");return e.clientWidth+t+n}function yL(e){const t=Fa(e,"border-top-width"),n=Fa(e,"border-bottom-width");return e.clientHeight+t+n}function $g(e,t={}){const n=t.width||vL(e),r=t.height||yL(e);return{width:n,height:r}}function bL(){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 Se=16384;function xL(e){(e.width>Se||e.height>Se)&&(e.width>Se&&e.height>Se?e.width>e.height?(e.height*=Se/e.width,e.width=Se):(e.width*=Se/e.height,e.height=Se):e.width>Se?(e.height*=Se/e.width,e.width=Se):(e.width*=Se/e.height,e.height=Se))}function Ga(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 wL(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function _L(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),wL(i)}const me=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||me(n,t)};function EL(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function SL(e){return En(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function OL(e,t,n){const r=`.${e}:${t}`,i=n.cssText?EL(n):SL(n);return document.createTextNode(`${r}{${i}}`)}function Ag(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=mL();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(OL(s,n,r)),t.appendChild(a)}function TL(e,t){Ag(e,t,":before"),Ag(e,t,":after")}const Lg="application/font-woff",kg="image/jpeg",ML={woff:Lg,woff2:Lg,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:kg,jpeg:kg,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function CL(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function wc(e){const t=CL(e).toLowerCase();return ML[t]||""}function $L(e){return e.split(/,/)[1]}function _c(e){return e.search(/^(data:)/)!==-1}function Dg(e,t){return`data:${t};base64,${e}`}async function Rg(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 Ec={};function AL(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 Sc(e,t,n){const r=AL(e,t,n.includeQueryParams);if(Ec[r]!=null)return Ec[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await Rg(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),$L(o)));i=Dg(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 Ec[r]=i,i}async function LL(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Ga(t)}async function kL(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 Ga(o)}const n=e.poster,r=wc(n),i=await Sc(n,r,t);return Ga(i)}async function DL(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await za(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function RL(e,t){return me(e,HTMLCanvasElement)?LL(e):me(e,HTMLVideoElement)?kL(e,t):me(e,HTMLIFrameElement)?DL(e):e.cloneNode(!1)}const IL=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function NL(e,t,n){var r,i;let s=[];return IL(e)&&e.assignedNodes?s=En(e.assignedNodes()):me(e,HTMLIFrameElement)&&!((r=e.contentDocument)===null||r===void 0)&&r.body?s=En(e.contentDocument.body.childNodes):s=En(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||me(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>za(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function PL(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):En(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`),me(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 UL(e,t){me(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),me(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function BL(e,t){if(me(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function VL(e,t){return me(t,Element)&&(PL(e,t),TL(e,t),UL(e,t),BL(e,t)),t}async function HL(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 a=n[s].getAttribute("xlink:href");if(a){const o=e.querySelector(a),l=document.querySelector(a);!o&&l&&!r[a]&&(r[a]=await za(l,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 za(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>RL(r,t)).then(r=>NL(e,r,t)).then(r=>VL(e,r)).then(r=>HL(r,t))}const Ig=/url\((['"]?)([^'"]+?)\1\)/g,FL=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,GL=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function zL(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function jL(e){const t=[];return e.replace(Ig,(n,r,i)=>(t.push(i),n)),t.filter(n=>!_c(n))}async function WL(e,t,n,r,i){try{const s=n?gL(t,n):t,a=wc(t);let o;if(i){const l=await i(s);o=Dg(l,a)}else o=await Sc(s,a,r);return e.replace(zL(t),`$1${o}$3`)}catch{}return e}function qL(e,{preferredFontFormat:t}){return t?e.replace(GL,n=>{for(;;){const[r,,i]=FL.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Ng(e){return e.search(Ig)!==-1}async function Pg(e,t,n){if(!Ng(e))return e;const r=qL(e,n);return jL(r).reduce((i,s)=>i.then(a=>WL(a,s,t,n)),Promise.resolve(r))}async function ja(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await Pg(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function YL(e,t){await ja("background",e,t)||await ja("background-image",e,t),await ja("mask",e,t)||await ja("mask-image",e,t)}async function XL(e,t){const n=me(e,HTMLImageElement);if(!(n&&!_c(e.src))&&!(me(e,SVGImageElement)&&!_c(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await Sc(r,wc(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 ZL(e,t){const n=En(e.childNodes).map(r=>Ug(r,t));await Promise.all(n).then(()=>e)}async function Ug(e,t){me(e,Element)&&(await YL(e,t),await XL(e,t),await ZL(e,t))}function KL(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 Bg={};async function Vg(e){let t=Bg[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},Bg[e]=t,t}async function Hg(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async s=>{let a=s.replace(r,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),Rg(a,t.fetchRequestInit,({result:o})=>(n=n.replace(s,`url(${o})`),[s,o]))});return Promise.all(i).then(()=>n)}function Fg(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 QL(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{En(i.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1;const l=s.href,c=Vg(l).then(u=>Hg(u,t)).then(u=>Fg(u).forEach(h=>{try{i.insertRule(h,h.startsWith("@import")?o+=1:i.cssRules.length)}catch(d){console.error("Error inserting rule from remote css",{rule:h,error:d})}})).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(Vg(i.href).then(o=>Hg(o,t)).then(o=>Fg(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{En(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function JL(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ng(t.style.getPropertyValue("src")))}async function tk(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=En(e.ownerDocument.styleSheets),r=await QL(n,t);return JL(r)}async function ek(e,t){const n=await tk(e,t);return(await Promise.all(n.map(r=>{const i=r.parentStyleSheet?r.parentStyleSheet.href:null;return Pg(r.cssText,i,t)}))).join(`
2
+ `:r}),this.services.files.downloadCSV(n,"myChart.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}=Vt.items.status,s=this.getOptions(),a=Yi(t.map(l=>l[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(l=>a.includes(l))||(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(r=>{this.allDataGroups.includes(r)||console.warn(`"${r}" does not exist in data groups.`)}),this.allDataGroups.filter(r=>n[r]).forEach(r=>this.colorScale[r]=n[r])}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=ep.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=Qs().range(o).domain(this.allDataGroups)}}class lr extends Je{constructor(t){super(t),this.axisFlavor=ya.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,n=this.getOptions(),r=t.isDualAxes(),i={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return r&&(i.secondaryDomain=t.secondaryDomainAxisPosition,i.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(i).forEach(s=>{const a=i[s];t.scales[a]?i[s]={position:a,label:t.getScaleLabel(a),identifier:x(n,"axes",a,"mapsTo")}:i[s]=null}),i}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services,{primaryDomain:s,primaryRange:a,secondaryDomain:o,secondaryRange:l}=this.assignRangeAndDomains(),c=i.getDomainAxisScaleType();let u;return c===Z.TIME&&(u=h=>Rr(h,"MMM d, yyyy")),[["Group",s.label,a.label,...o?[o.label]:[],...l?[l.label]:[]],...t.map(h=>[h[r],h[s.identifier]===null?"&ndash;":u?u(h[s.identifier]):h[s.identifier],h[a.identifier]===null||isNaN(h[a.identifier])?"&ndash;":h[a.identifier].toLocaleString(),...o?[h[o.identifier]===null?"&ndash;":h[o.identifier]]:[],...l?[h[l.identifier]===null||isNaN(h[l.identifier])?"&ndash;":h[l.identifier]]:[]])]}setData(t){let n;if(t&&(n=super.setData(t),x(this.getOptions(),"zoomBar",H.TOP,"enabled"))){const r=x(this.getOptions(),"zoomBar",H.TOP,"data");this.setZoomBarData(r)}return n}setZoomBarData(t){const n=t?this.sanitize(xn(t)):this.getDisplayData();let r=n;const{cartesianScales:i}=this.services;if(n&&i.domainAxisPosition&&i.rangeAxisPosition){const s=i.getDomainIdentifier(),a=i.getRangeIdentifier();let o=n.map(l=>l[s].getTime());o=Yi(o).sort(),r=o.map(l=>{let c=0;const u={};return n.forEach(h=>{h[s].getTime()===l&&(c+=h[a])}),u[s]=new Date(l),u[a]=c,u})}this.set({zoomBarData:r})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const n=this.getOptions();if(!n.axes)return t;const r=[];return Object.keys(H).forEach(i=>{const s=H[i],a=n.axes[s];if(a&&a.scaleType===Z.TIME){const o=a.mapsTo;(o!==null||o!==void 0)&&r.push(o)}}),r.length>0&&t.forEach(i=>{r.forEach(s=>{x(i,s,"getTime")===null&&(i[s]=new Date(i[s]))})}),t}sanitize(t){return t=super.sanitize(t),t=this.sanitizeDateValues(t),t}}let GA=class extends lr{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData();return t.sort((n,r)=>n.source.localeCompare(r.source)),[["Source","Target","Value"],...t.map(n=>[n.source,n.target,n.value])]}},zA=class extends lr{constructor(t){super(t)}getBoxQuartiles(t){return{q_25:ho(t,.25),q_50:ho(t,.5),q_75:ho(t,.75)}}getBoxplotData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getGroupedData(),i=[];for(const{name:s,data:a}of r){const o=this.services.cartesianScales.getRangeIdentifier(),l=a.map(b=>b[o]).sort(be),c={[n]:s,counts:l,quartiles:this.getBoxQuartiles(l),outliers:null,whiskers:null},u=c.quartiles.q_25,h=c.quartiles.q_75,d=(h-u)*1.5,f=u-d,p=h+d,m=[],g=[];for(const b of l)b<f||b>p?m.push(b):g.push(b);c.outliers=m;const v=Mn(g),y=Vn(g);c.whiskers={min:v||Mn([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75]),max:y||Vn([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75])},i.push(c)}return i}getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getBoxplotData();return[["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],...r.map(i=>{let s=x(i,"outliers");return(s===null||s.length===0)&&(s=["&ndash;"]),[i[n],x(i,"whiskers","min")!==null?x(i,"whiskers","min").toLocaleString():"&ndash;",x(i,"quartiles","q_25")!==null?x(i,"quartiles","q_25").toLocaleString():"&ndash;",x(i,"quartiles","q_50")!==null?x(i,"quartiles","q_50").toLocaleString():"&ndash;",x(i,"quartiles","q_75")!==null?x(i,"quartiles","q_75").toLocaleString():"&ndash;",x(i,"whiskers","max")!==null?x(i,"whiskers","max").toLocaleString():"&ndash;",x(i,"quartiles","q_75")!==null&&x(i,"quartiles","q_25")!==null?(x(i,"quartiles","q_75")-x(i,"quartiles","q_25")).toLocaleString():"&ndash;",s.map(a=>a.toLocaleString()).join(",")]})]}setColorClassNames(){const t=x(this.getOptions(),"color","pairing");let n=x(t,"option");const r=ep.pairingOptions;n=n<=r["1-color"]?n:1;const i=this.allDataGroups.map(()=>`1-${n}-1`);this.colorClassNames=Qs().range(i).domain(this.allDataGroups)}},jA=class extends lr{constructor(t){super(t)}getMatchingRangeIndexForDatapoint(t){let n;for(let r=t.ranges.length-1;r>0;r--){const i=t.ranges[r];if(t.value>=i)return n=r,n}return 0}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier(),s=x(n,"bullet","performanceAreaTitles");return[["Title","Group","Value","Target","Percentage","Performance"],...t.map(a=>[a.title,a[r],a.value===null?"&ndash;":a.value,x(a,"marker")===null?"&ndash;":a.marker,x(a,"marker")===null?"&ndash;":`${Math.floor(a[i]/a.marker*100)}%`,s[this.getMatchingRangeIndexForDatapoint(a)]])]}},WA=class extends Je{constructor(t){super(t),this._colorScale=void 0,this._matrix={}}getFillColor(t){return this._colorScale(t)}getCombinedData(){if(ze(this._matrix)){const t=this.getOptions(),n=this.getDisplayData();!ze(n)&&!ze(t.geoData.objects.countries)&&(t.geoData.objects.countries.geometries.forEach(r=>{this._matrix[r.properties.NAME]=r}),n.forEach(r=>{this._matrix[r.name]?this._matrix[r.name].value=r.value||null:console.warn(`Data point ${r} is missing geographical data.`)}))}return this._matrix}getTabularDataArray(){const t=this.getDisplayData();return[["Country ID","Country Name","Value"],...t.map(n=>[n.id===null?"&ndash;":n.id,n.name,n.value])]}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=x(this.getOptions(),"color");this._colorScale=Mg(this.getDisplayData(),t)}},qA=class extends Je{constructor(t){super(t),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(t){super.setData(t),this.setDataGroups(),t.length===1&&(this.parentNode=!0),this.setZoom()}setOptions(t){const n=this.getOptions(),r=rt({},t,this.getZoomOptions(t));pc(n,r);const i=this.getHierarchyLevel(),s=x(n,"circlePack","hierarchyLevel");this.set({options:rt(n,r),depth:s&&s<4?s:i})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),r=t||this.getOptions(),i=n.length===1&&x(n,0,"children")?x(n,0,"children"):n;let s=this.getHierarchyLevel();return i.some(a=>{if(a.children&&a.children.some(o=>o.children))return s=3,!1}),x(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Zt.ZOOM,name:"Click to zoom"}]}}:null}setZoom(t){this.setOptions(this.getZoomOptions(t))}updateHierarchyLevel(t){this.set({depth:t})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const t=this.getData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=t.map(s=>{const a=s[r];return this.setChildrenDataGroup(s,a)});this.set({data:i},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(r=>this.setChildrenDataGroup(r,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Parent","Value"]];return t.forEach(r=>{let i=r.value?r.value:0;r.children&&(i+=this.getChildrenDatums(r.children,r.name,n,0)),n.push(["&ndash;",r.name,i])}),n}getChildrenDatums(t,n,r=[],i=0){const s=n;return t.forEach(a=>{const o=a.name;let l=0;if(a.children)a.children.length>0&&(typeof a.value=="number"&&(i+=a.value),l+=this.getChildrenDatums(a.children,o,r,l),r.push([o,s,l]),i+=l);else{let c=0;typeof a.value=="number"&&(c=a.value,i+=a.value),r.push([a.name,s,c])}}),i}},YA=class extends Je{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(r=>{r.key&&r.key!==r.group&&(r.group=r.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data;return[["Group","Value"],...t.map(i=>[i[r],i.value===null?"&ndash;":i.value.toLocaleString()])]}sanitize(t){return this.getTabularData(t).sort((n,r)=>r.value-n.value)}},XA=class extends Je{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data;return[["Group","Value"],...t.map(i=>[i[r],i.value===null?"&ndash;":i.value.toLocaleString()])]}},ZA=class extends lr{constructor(t){super(t),this.axisFlavor=ya.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=x(this.getOptions(),"axes");if(x(n,"left","scaleType")&&x(n,"left","scaleType")!==Z.LABELS||x(n,"right","scaleType")&&x(n,"right","scaleType")!==Z.LABELS||x(n,"top","scaleType")&&x(n,"top","scaleType")!==Z.LABELS||x(n,"bottom","scaleType")&&x(n,"bottom","scaleType")!==Z.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=Re(this.getDisplayData(),r=>r.value),n=Be().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}getFillColor(t){return this._colorScale(t)}getUniqueDomain(){if(ze(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getDomainIdentifier(),i=n.getMainXAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._domains=Array.from(new Set(t.map(a=>a[r])))}return this._domains}getUniqueRanges(){if(ze(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getRangeIdentifier(),i=n.getMainYAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._ranges=Array.from(new Set(t.map(a=>a[r])))}return this._ranges}getMatrix(){if(ze(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s={};n.forEach(a=>{s[a]={value:null,index:-1}}),t.forEach(a=>{this._matrix[a]=xn(s)}),this.getDisplayData().forEach((a,o)=>{this._matrix[a[r]][a[i]]={value:a.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(xn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){ze(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s=[];return t.forEach(a=>{n.forEach(o=>{const l={value:this._matrix[a][o].value,index:this._matrix[a][o].index};l[r]=a,l[i]=o,s.push(l)})}),s}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:r}=this.assignRangeAndDomains();return[[n.label,r.label,"Value"],...t.map(i=>[i[n.identifier]===null?"&ndash;":i[n.identifier],i[r.identifier]===null?"&ndash;":i[r.identifier].toLocaleString(),i.value])]}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=x(t,"color","gradient","colors"),r=!ze(n);let i=x(t,"color","pairing","option");const s=this.getValueDomain(),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const c=a==="diverge"?17:11;for(let u=1;u<c+1;u++)o.push(`fill-${a}-${i}-${u}`)}this._colorScale=xl().domain(s).range(o);const l=x(this.getOptions(),"color");this._colorScale=Mg(this.getDisplayData(),l)}},KA=class extends lr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getBinnedStackedData();return[[Lt(t,"bins.rangeLabel")||"Range",...r.map(i=>Lt(i,`0.${n}`))],...Lt(r,0).map((i,s)=>[`${Lt(i,"data.x0")} – ${Lt(i,"data.x1")}`,...r.map(a=>Lt(a[s],`data.${Lt(a[s],n)}`))])]}},QA=class extends Je{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((n,r)=>n+r.value,0)}getFillColor(t){const n=this.getOptions(),r=x(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=x(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=x(t,"meter","proportional")?r:r>100?100:r,s=x(t,"meter","status","ranges");if(s){const a=s.filter(o=>o.range[0]<=i&&i<=o.range[1]);if(a.length>0)return a[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getStatus(),s=x(n,"meter","proportional");let a=[],o;if(s===null){o=100;const l=t[0];a=[["Group","Value",...i?["Status"]:[]],[l[r],l.value,...i?[i]:[]]]}else o=x(s,"total")||this.getMaximumDomain(t),a=[["Group","Value","Percentage of total"],...t.map(c=>[c[r],c.value,(c.value/o*100).toFixed(2)+" %"])];return a}},JA=class extends lr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=x(t,"radar","axes"),s=x(n,"0","data").map(a=>a[r]);return[["Group",...s],...n.map(a=>[a.name,...s.map((o,l)=>x(a,"data",l,i)!==null?x(a,"data",l,i).toLocaleString():"&ndash;")])]}},tL=class extends Je{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Parent"]];return t.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,"&ndash;"])}),n}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}},eL=class extends Je{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Group","Value"]];return t.forEach(r=>{Array.isArray(r.children)?r.children.forEach(i=>{n.push([i.name,r.name,i.value])}):x(r.name)!==null&&x(r.value)&&n.push(["–",r.name,r.value])}),n}},nL=class extends Je{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:s}=n.data;return[[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],...t.map(a=>[a[i],a[s],a[r]])]}};var rL=/\s/;function iL(e){for(var t=e.length;t--&&rL.test(e.charAt(t)););return t}var sL=/^\s+/;function aL(e){return e&&e.slice(0,iL(e)+1).replace(sL,"")}var Cg=0/0,oL=/^[-+]0x[0-9a-f]+$/i,lL=/^0b[01]+$/i,cL=/^0o[0-7]+$/i,uL=parseInt;function Ji(e){if(typeof e=="number")return e;if(Sa(e))return Cg;if(ke(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ke(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=aL(e);var n=lL.test(e);return n||cL.test(e)?uL(e.slice(2),n?2:8):oL.test(e)?Cg:+e}var hL=function(){return Fe.Date.now()};const xc=hL;var dL="Expected a function",fL=Math.max,pL=Math.min;function Ha(e,t,n){var r,i,s,a,o,l,c=0,u=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(dL);t=Ji(t)||0,ke(n)&&(u=!!n.leading,h="maxWait"in n,s=h?fL(Ji(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d);function f(E){var T=r,D=i;return r=i=void 0,c=E,a=e.apply(D,T),a}function p(E){return c=E,o=setTimeout(v,t),u?f(E):a}function m(E){var T=E-l,D=E-c,N=t-T;return h?pL(N,s-D):N}function g(E){var T=E-l,D=E-c;return l===void 0||T>=t||T<0||h&&D>=s}function v(){var E=xc();if(g(E))return y(E);o=setTimeout(v,m(E))}function y(E){return o=void 0,d&&r?f(E):(r=i=void 0,a)}function b(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function S(){return o===void 0?a:y(xc())}function _(){var E=xc(),T=g(E);if(r=arguments,i=this,l=E,T){if(o===void 0)return p(l);if(h)return clearTimeout(o),o=setTimeout(v,t),f(l)}return o===void 0&&(o=setTimeout(v,t)),a}return _.cancel=b,_.flush=S,_}function gL(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 mL=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function En(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Fa(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function vL(e){const t=Fa(e,"border-left-width"),n=Fa(e,"border-right-width");return e.clientWidth+t+n}function yL(e){const t=Fa(e,"border-top-width"),n=Fa(e,"border-bottom-width");return e.clientHeight+t+n}function $g(e,t={}){const n=t.width||vL(e),r=t.height||yL(e);return{width:n,height:r}}function bL(){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 Se=16384;function xL(e){(e.width>Se||e.height>Se)&&(e.width>Se&&e.height>Se?e.width>e.height?(e.height*=Se/e.width,e.width=Se):(e.width*=Se/e.height,e.height=Se):e.width>Se?(e.height*=Se/e.width,e.width=Se):(e.width*=Se/e.height,e.height=Se))}function Ga(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 wL(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function _L(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),wL(i)}const me=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||me(n,t)};function EL(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function SL(e){return En(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function OL(e,t,n){const r=`.${e}:${t}`,i=n.cssText?EL(n):SL(n);return document.createTextNode(`${r}{${i}}`)}function Ag(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=mL();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(OL(s,n,r)),t.appendChild(a)}function TL(e,t){Ag(e,t,":before"),Ag(e,t,":after")}const Lg="application/font-woff",kg="image/jpeg",ML={woff:Lg,woff2:Lg,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:kg,jpeg:kg,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function CL(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function wc(e){const t=CL(e).toLowerCase();return ML[t]||""}function $L(e){return e.split(/,/)[1]}function _c(e){return e.search(/^(data:)/)!==-1}function Dg(e,t){return`data:${t};base64,${e}`}async function Rg(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 Ec={};function AL(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 Sc(e,t,n){const r=AL(e,t,n.includeQueryParams);if(Ec[r]!=null)return Ec[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await Rg(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),$L(o)));i=Dg(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 Ec[r]=i,i}async function LL(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Ga(t)}async function kL(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 Ga(o)}const n=e.poster,r=wc(n),i=await Sc(n,r,t);return Ga(i)}async function DL(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await za(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function RL(e,t){return me(e,HTMLCanvasElement)?LL(e):me(e,HTMLVideoElement)?kL(e,t):me(e,HTMLIFrameElement)?DL(e):e.cloneNode(!1)}const IL=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function NL(e,t,n){var r,i;let s=[];return IL(e)&&e.assignedNodes?s=En(e.assignedNodes()):me(e,HTMLIFrameElement)&&!((r=e.contentDocument)===null||r===void 0)&&r.body?s=En(e.contentDocument.body.childNodes):s=En(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||me(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>za(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function PL(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):En(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`),me(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 UL(e,t){me(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),me(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function BL(e,t){if(me(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function VL(e,t){return me(t,Element)&&(PL(e,t),TL(e,t),UL(e,t),BL(e,t)),t}async function HL(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 a=n[s].getAttribute("xlink:href");if(a){const o=e.querySelector(a),l=document.querySelector(a);!o&&l&&!r[a]&&(r[a]=await za(l,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 za(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>RL(r,t)).then(r=>NL(e,r,t)).then(r=>VL(e,r)).then(r=>HL(r,t))}const Ig=/url\((['"]?)([^'"]+?)\1\)/g,FL=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,GL=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function zL(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function jL(e){const t=[];return e.replace(Ig,(n,r,i)=>(t.push(i),n)),t.filter(n=>!_c(n))}async function WL(e,t,n,r,i){try{const s=n?gL(t,n):t,a=wc(t);let o;if(i){const l=await i(s);o=Dg(l,a)}else o=await Sc(s,a,r);return e.replace(zL(t),`$1${o}$3`)}catch{}return e}function qL(e,{preferredFontFormat:t}){return t?e.replace(GL,n=>{for(;;){const[r,,i]=FL.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Ng(e){return e.search(Ig)!==-1}async function Pg(e,t,n){if(!Ng(e))return e;const r=qL(e,n);return jL(r).reduce((i,s)=>i.then(a=>WL(a,s,t,n)),Promise.resolve(r))}async function ja(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await Pg(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function YL(e,t){await ja("background",e,t)||await ja("background-image",e,t),await ja("mask",e,t)||await ja("mask-image",e,t)}async function XL(e,t){const n=me(e,HTMLImageElement);if(!(n&&!_c(e.src))&&!(me(e,SVGImageElement)&&!_c(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await Sc(r,wc(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 ZL(e,t){const n=En(e.childNodes).map(r=>Ug(r,t));await Promise.all(n).then(()=>e)}async function Ug(e,t){me(e,Element)&&(await YL(e,t),await XL(e,t),await ZL(e,t))}function KL(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 Bg={};async function Vg(e){let t=Bg[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},Bg[e]=t,t}async function Hg(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async s=>{let a=s.replace(r,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),Rg(a,t.fetchRequestInit,({result:o})=>(n=n.replace(s,`url(${o})`),[s,o]))});return Promise.all(i).then(()=>n)}function Fg(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 QL(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{En(i.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1;const l=s.href,c=Vg(l).then(u=>Hg(u,t)).then(u=>Fg(u).forEach(h=>{try{i.insertRule(h,h.startsWith("@import")?o+=1:i.cssRules.length)}catch(d){console.error("Error inserting rule from remote css",{rule:h,error:d})}})).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(Vg(i.href).then(o=>Hg(o,t)).then(o=>Fg(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{En(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function JL(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ng(t.style.getPropertyValue("src")))}async function tk(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=En(e.ownerDocument.styleSheets),r=await QL(n,t);return JL(r)}async function ek(e,t){const n=await tk(e,t);return(await Promise.all(n.map(r=>{const i=r.parentStyleSheet?r.parentStyleSheet.href:null;return Pg(r.cssText,i,t)}))).join(`
3
3
  `)}async function nk(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await ek(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 rk(e,t={}){const{width:n,height:r}=$g(e,t),i=await za(e,t,!0);return await nk(i,t),await Ug(i,t),KL(i,t),await _L(i,n,r)}async function Gg(e,t={}){const{width:n,height:r}=$g(e,t),i=await rk(e,t),s=await Ga(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||bL(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||xL(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 ik(e,t={}){return(await Gg(e,t)).toDataURL()}async function sk(e,t={}){return(await Gg(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 ak="DONT_STYLE_ME_css_styles_verifier";class k extends Sn{constructor(t,n){super(t,n),this.chartID=""}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=R(t));const r={width:0,height:0},i=d=>{d&&Object.keys(r).forEach(f=>{if(d[f]){const p=d[f],m=parseFloat(p);p&&m>r[f]&&(""+p).indexOf("%")===-1&&(r[f]=m)}})},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(d){console.error(d)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(c=a.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(d){console.error(d)}let h;if(a instanceof SVGSVGElement&&(h={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(i(s),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(h),r.width>0&&r.height>0))return h;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 d={width:x(t.node(),"width","baseVal","value"),height:x(t.node(),"height","baseVal","value")};i(d)}catch{i(h),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.styleHolderElement(),this.initializeID(),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=R(this.getHolder()).append("div").classed(`${ge}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",ak),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),R(this.getHolder()).classed(`${ge}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.getHolder(),r=R(n);r.classed("filled",!0),sk(this.getMainContainer(),{quality:1,filter:i=>!(i.classList&&i.classList.contains("cds--cc--toolbar"))}).then(function(i){var s;(s=t.services.files)==null||s.downloadImage(i,"myChart.jpg"),r.classed("filled",!1)})}exportToPNG(){const t=this,n=this.getHolder(),r=R(n);r.classed("filled",!0),ik(this.getMainContainer(),{quality:1,filter:i=>!(i.classList&&i.classList.contains("cds--cc--toolbar"))}).then(function(i){var s;(s=t.services.files)==null||s.downloadImage(i,"myChart.png"),r.classed("filled",!1)}).catch(function(i){console.error("oops, something went wrong!",i)})}toggleFullscreen(){const t=this.getHolder();R(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=R(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=k.getSVGElementSize(R(this.mainContainer),{useBBox:!0}),n=R(this.mainContainer).attr("class"),r=R(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach(function(s){i+=Number(k.getSVGElementSize(R(s),{useBBox:!0}).height)}),i<=t?R(this.mainContainer).attr("height",i):R(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&R(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(O.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(O.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=Ha(()=>{var s;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(s=this.services.events)==null||s.dispatchEvent(O.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}}let Oc=class Uv extends Sn{static appendOrUpdateLinearGradient(t){let n=t.svg.select(`defs linearGradient#${t.id}`);n.empty()&&(n=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),n.selectAll("stop").remove(),n.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",r=>r.offset).style("stop-color",r=>r.color).style("stop-opacity",r=>r.opacity)}static getOffsetRatio(t){return(Math.abs(t[1])*100/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(t,n){const r=t[0]<0&&t[1]>0;let i=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return r&&(i=[{offset:"0%",color:n,opacity:"0.6"},{offset:Uv.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),i}};function zg(e){const t=ok(jg(e),360);return Rn(t,[0,10])||Rn(t,[350,0])?{textAnchor:fn.START,dominantBaseline:pn.MIDDLE}:Rn(t,[10,80])?{textAnchor:fn.START,dominantBaseline:pn.HANGING}:Rn(t,[80,100])?{textAnchor:fn.MIDDLE,dominantBaseline:pn.HANGING}:Rn(t,[100,170])?{textAnchor:fn.END,dominantBaseline:pn.HANGING}:Rn(t,[170,190])?{textAnchor:fn.END,dominantBaseline:pn.MIDDLE}:Rn(t,[190,260])?{textAnchor:fn.END,dominantBaseline:pn.BASELINE}:Rn(t,[260,280])?{textAnchor:fn.MIDDLE,dominantBaseline:pn.BASELINE}:{textAnchor:fn.START,dominantBaseline:pn.BASELINE}}function ok(e,t){return(e%t+t)%t}function Rn(e,[t,n]){return e>=t&&e<=n}function jg(e){return e*(180/Math.PI)}function Ft(e,t,n={x:0,y:0}){const r=t*Math.cos(e)+n.x,i=t*Math.sin(e)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}function lk(e,t){return t*Math.sin(e-Math.PI/2)}function Wg(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 ck(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 Tc(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function uk(e){return e.depth}function hk(e,t){return t-1-e.height}function qg(e,t){return e.sourceLinks.length?e.depth:t-1}function Wa(e){return function(){return e}}function Yg(e,t){return qa(e.source,t.source)||e.index-t.index}function Xg(e,t){return qa(e.target,t.target)||e.index-t.index}function qa(e,t){return e.y0-t.y0}function Mc(e){return e.value}function dk(e){return e.index}function fk(e){return e.nodes}function pk(e){return e.links}function Zg(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function Kg({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const i of t.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of t.targetLinks)i.y1=r+i.width/2,r+=i.width}}function gk(){let e=0,t=0,n=1,r=1,i=24,s=8,a,o=dk,l=qg,c,u,h=fk,d=pk,f=6;function p(){const w={nodes:h.apply(null,arguments),links:d.apply(null,arguments)};return m(w),g(w),v(w),y(w),_(w),Kg(w),w}p.update=function(w){return Kg(w),w},p.nodeId=function(w){return arguments.length?(o=typeof w=="function"?w:Wa(w),p):o},p.nodeAlign=function(w){return arguments.length?(l=typeof w=="function"?w:Wa(w),p):l},p.nodeSort=function(w){return arguments.length?(c=w,p):c},p.nodeWidth=function(w){return arguments.length?(i=+w,p):i},p.nodePadding=function(w){return arguments.length?(s=a=+w,p):s},p.nodes=function(w){return arguments.length?(h=typeof w=="function"?w:Wa(w),p):h},p.links=function(w){return arguments.length?(d=typeof w=="function"?w:Wa(w),p):d},p.linkSort=function(w){return arguments.length?(u=w,p):u},p.size=function(w){return arguments.length?(e=t=0,n=+w[0],r=+w[1],p):[n-e,r-t]},p.extent=function(w){return arguments.length?(e=+w[0][0],n=+w[1][0],t=+w[0][1],r=+w[1][1],p):[[e,t],[n,r]]},p.iterations=function(w){return arguments.length?(f=+w,p):f};function m({nodes:w,links:P}){for(const[I,B]of w.entries())B.index=I,B.sourceLinks=[],B.targetLinks=[];const U=new Map(w.map((I,B)=>[o(I,B,w),I]));for(const[I,B]of P.entries()){B.index=I;let{source:j,target:Y}=B;typeof j!="object"&&(j=B.source=Zg(U,j)),typeof Y!="object"&&(Y=B.target=Zg(U,Y)),j.sourceLinks.push(B),Y.targetLinks.push(B)}if(u!=null)for(const{sourceLinks:I,targetLinks:B}of w)I.sort(u),B.sort(u)}function g({nodes:w}){for(const P of w)P.value=P.fixedValue===void 0?Math.max(Tc(P.sourceLinks,Mc),Tc(P.targetLinks,Mc)):P.fixedValue}function v({nodes:w}){const P=w.length;let U=new Set(w),I=new Set,B=0;for(;U.size;){for(const j of U){j.depth=B;for(const{target:Y}of j.sourceLinks)I.add(Y)}if(++B>P)throw new Error("circular link");U=I,I=new Set}}function y({nodes:w}){const P=w.length;let U=new Set(w),I=new Set,B=0;for(;U.size;){for(const j of U){j.height=B;for(const{source:Y}of j.targetLinks)I.add(Y)}if(++B>P)throw new Error("circular link");U=I,I=new Set}}function b({nodes:w}){const P=Wg(w,B=>B.depth)+1,U=(n-e-i)/(P-1),I=new Array(P);for(const B of w){const j=Math.max(0,Math.min(P-1,Math.floor(l.call(null,B,P))));B.layer=j,B.x0=e+j*U,B.x1=B.x0+i,I[j]?I[j].push(B):I[j]=[B]}if(c)for(const B of I)B.sort(c);return I}function S(w){const P=ck(w,U=>(r-t-(U.length-1)*a)/Tc(U,Mc));for(const U of w){let I=t;for(const B of U){B.y0=I,B.y1=I+B.value*P,I=B.y1+a;for(const j of B.sourceLinks)j.width=j.value*P}I=(r-I+a)/(U.length+1);for(let B=0;B<U.length;++B){const j=U[B];j.y0+=I*(B+1),j.y1+=I*(B+1)}V(U)}}function _(w){const P=b(w);a=Math.min(s,(r-t)/(Wg(P,U=>U.length)-1)),S(P);for(let U=0;U<f;++U){const I=Math.pow(.99,U),B=Math.max(1-I,(U+1)/f);T(P,I,B),E(P,I,B)}}function E(w,P,U){for(let I=1,B=w.length;I<B;++I){const j=w[I];for(const Y of j){let et=0,pt=0;for(const{source:K,value:ht}of Y.targetLinks){let it=ht*(Y.layer-K.layer);et+=M(K,Y)*it,pt+=it}if(!(pt>0))continue;let z=(et/pt-Y.y0)*P;Y.y0+=z,Y.y1+=z,C(Y)}c===void 0&&j.sort(qa),D(j,U)}}function T(w,P,U){for(let I=w.length,B=I-2;B>=0;--B){const j=w[B];for(const Y of j){let et=0,pt=0;for(const{target:K,value:ht}of Y.sourceLinks){let it=ht*(K.layer-Y.layer);et+=L(Y,K)*it,pt+=it}if(!(pt>0))continue;let z=(et/pt-Y.y0)*P;Y.y0+=z,Y.y1+=z,C(Y)}c===void 0&&j.sort(qa),D(j,U)}}function D(w,P){const U=w.length>>1,I=w[U];A(w,I.y0-a,U-1,P),N(w,I.y1+a,U+1,P),A(w,r,w.length-1,P),N(w,t,0,P)}function N(w,P,U,I){for(;U<w.length;++U){const B=w[U],j=(P-B.y0)*I;j>1e-6&&(B.y0+=j,B.y1+=j),P=B.y1+a}}function A(w,P,U,I){for(;U>=0;--U){const B=w[U],j=(B.y1-P)*I;j>1e-6&&(B.y0-=j,B.y1-=j),P=B.y0-a}}function C({sourceLinks:w,targetLinks:P}){if(u===void 0){for(const{source:{sourceLinks:U}}of P)U.sort(Xg);for(const{target:{targetLinks:U}}of w)U.sort(Yg)}}function V(w){if(u===void 0)for(const{sourceLinks:P,targetLinks:U}of w)P.sort(Xg),U.sort(Yg)}function M(w,P){let U=w.y0-(w.sourceLinks.length-1)*a/2;for(const{target:I,width:B}of w.sourceLinks){if(I===P)break;U+=B+a}for(const{source:I,width:B}of P.targetLinks){if(I===w)break;U-=B}return U}function L(w,P){let U=P.y0-(P.targetLinks.length-1)*a/2;for(const{source:I,width:B}of P.targetLinks){if(I===w)break;U+=B+a}for(const{target:I,width:B}of w.sourceLinks){if(I===P)break;U-=B}return U}return p}var Cc=Math.PI,$c=2*Cc,cr=1e-6,mk=$c-cr;function Ac(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Qg(){return new Ac}Ac.prototype=Qg.prototype={constructor:Ac,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,s){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+s)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var s=this._x1,a=this._y1,o=n-e,l=r-t,c=s-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>cr)if(!(Math.abs(u*o-l*c)>cr)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var d=n-s,f=r-a,p=o*o+l*l,m=d*d+f*f,g=Math.sqrt(p),v=Math.sqrt(h),y=i*Math.tan((Cc-Math.acos((p+h-m)/(2*g*v)))/2),b=y/v,S=y/g;Math.abs(b-1)>cr&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*d>c*f)+","+(this._x1=e+S*o)+","+(this._y1=t+S*l)}},arc:function(e,t,n,r,i,s){e=+e,t=+t,n=+n,s=!!s;var a=n*Math.cos(r),o=n*Math.sin(r),l=e+a,c=t+o,u=1^s,h=s?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>cr||Math.abs(this._y1-c)>cr)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%$c+$c),h>mk?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-o)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>cr&&(this._+="A"+n+","+n+",0,"+ +(h>=Cc)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function Jg(e){return function(){return e}}function vk(e){return e[0]}function yk(e){return e[1]}var bk=Array.prototype.slice;function xk(e){return e.source}function wk(e){return e.target}function _k(e){var t=xk,n=wk,r=vk,i=yk,s=null;function a(){var o,l=bk.call(arguments),c=t.apply(this,l),u=n.apply(this,l);if(s||(s=o=Qg()),e(s,+r.apply(this,(l[0]=c,l)),+i.apply(this,l),+r.apply(this,(l[0]=u,l)),+i.apply(this,l)),o)return s=null,o+""||null}return a.source=function(o){return arguments.length?(t=o,a):t},a.target=function(o){return arguments.length?(n=o,a):n},a.x=function(o){return arguments.length?(r=typeof o=="function"?o:Jg(+o),a):r},a.y=function(o){return arguments.length?(i=typeof o=="function"?o:Jg(+o),a):i},a.context=function(o){return arguments.length?(s=o??null,a):s},a}function Ek(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function Sk(){return _k(Ek)}function Ok(e){return[e.source.x1,e.y0]}function Tk(e){return[e.target.x0,e.y1]}function Mk(){return Sk().source(Ok).target(Tk)}function tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ck(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var s=Function.bind.apply(t,i);return new s}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var $k={value:function(){}};function em(){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 Ya(n)}function Ya(e){this._=e}function Ak(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}})}Ya.prototype=em.prototype={constructor:Ya,on:function(e,t){var n=this._,r=Ak(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=Lk(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]=nm(n[i],e.name,t);else if(t==null)for(i in n)n[i]=nm(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 Ya(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 Lk(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function nm(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=$k,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var kk=Ck(Object.freeze(Object.defineProperty({__proto__:null,dispatch:em},Symbol.toStringTag,{value:"Module"}))).dispatch,Lc=Math.PI/180,ts=64,Xa=2048,Dk=function(){var e=[256,256],t=Rk,n=Ik,r=Nk,i=rm,s=rm,a=Pk,o=Uk,l=im,c=[],u=1/0,h=kk("word","end"),d=null,f=Math.random,p={},m=jk;p.canvas=function(y){return arguments.length?(m=In(y),p):m},p.start=function(){var y=g(m()),b=zk((e[0]>>5)*e[1]),S=null,_=c.length,E=-1,T=[],D=c.map(function(A,C){return A.text=t.call(this,A,C),A.font=n.call(this,A,C),A.style=i.call(this,A,C),A.weight=s.call(this,A,C),A.rotate=a.call(this,A,C),A.size=~~r.call(this,A,C),A.padding=o.call(this,A,C),A}).sort(function(A,C){return C.size-A.size});return d&&clearInterval(d),d=setInterval(N,0),N(),p;function N(){for(var A=Date.now();Date.now()-A<u&&++E<_&&d;){var C=D[E];C.x=e[0]*(f()+.5)>>1,C.y=e[1]*(f()+.5)>>1,Bk(y,C,D,E),C.hasText&&v(b,C,S)&&(T.push(C),h.call("word",p,C),S?Hk(S,C):S=[{x:C.x+C.x0,y:C.y+C.y0},{x:C.x+C.x1,y:C.y+C.y1}],C.x-=e[0]>>1,C.y-=e[1]>>1)}E>=_&&(p.stop(),h.call("end",p,T,S))}},p.stop=function(){return d&&(clearInterval(d),d=null),p};function g(y){y.width=y.height=1;var b=Math.sqrt(y.getContext("2d").getImageData(0,0,1,1).data.length>>2);y.width=(ts<<5)/b,y.height=Xa/b;var S=y.getContext("2d");return S.fillStyle=S.strokeStyle="red",S.textAlign="center",{context:S,ratio:b}}function v(y,b,S){e[0],e[1];for(var _=b.x,E=b.y,T=Math.sqrt(e[0]*e[0]+e[1]*e[1]),D=l(e),N=f()<.5?1:-1,A=-N,C,V,M;(C=D(A+=N))&&(V=~~C[0],M=~~C[1],!(Math.min(Math.abs(V),Math.abs(M))>=T));)if(b.x=_+V,b.y=E+M,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>e[0]||b.y+b.y1>e[1])&&(!S||!Vk(b,y,e[0]))&&(!S||Fk(b,S))){for(var L=b.sprite,w=b.width>>5,P=e[0]>>5,U=b.x-(w<<4),I=U&127,B=32-I,j=b.y1-b.y0,Y=(b.y+b.y0)*P+(U>>5),et,pt=0;pt<j;pt++){et=0;for(var z=0;z<=w;z++)y[Y+z]|=et<<B|(z<w?(et=L[pt*w+z])>>>I:0);Y+=P}return delete b.sprite,!0}return!1}return p.timeInterval=function(y){return arguments.length?(u=y??1/0,p):u},p.words=function(y){return arguments.length?(c=y,p):c},p.size=function(y){return arguments.length?(e=[+y[0],+y[1]],p):e},p.font=function(y){return arguments.length?(n=In(y),p):n},p.fontStyle=function(y){return arguments.length?(i=In(y),p):i},p.fontWeight=function(y){return arguments.length?(s=In(y),p):s},p.rotate=function(y){return arguments.length?(a=In(y),p):a},p.text=function(y){return arguments.length?(t=In(y),p):t},p.spiral=function(y){return arguments.length?(l=Wk[y]||y,p):l},p.fontSize=function(y){return arguments.length?(r=In(y),p):r},p.padding=function(y){return arguments.length?(o=In(y),p):o},p.random=function(y){return arguments.length?(f=y,p):f},p.on=function(){var y=h.on.apply(h,arguments);return y===h?p:y},p};function Rk(e){return e.text}function Ik(){return"serif"}function rm(){return"normal"}function Nk(e){return Math.sqrt(e.value)}function Pk(){return(~~(Math.random()*6)-3)*30}function Uk(){return 1}function Bk(e,t,n,r){if(!t.sprite){var i=e.context,s=e.ratio;i.clearRect(0,0,(ts<<5)/s,Xa/s);var a=0,o=0,l=0,c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font;var u=i.measureText(t.text+"m").width*s,h=t.size<<1;if(t.rotate){var d=Math.sin(t.rotate*Lc),f=Math.cos(t.rotate*Lc),p=u*f,m=u*d,g=h*f,v=h*d;u=Math.max(Math.abs(p+v),Math.abs(p-v))+31>>5<<5,h=~~Math.max(Math.abs(m+g),Math.abs(m-g))}else u=u+31>>5<<5;if(h>l&&(l=h),a+u>=ts<<5&&(a=0,o+=l,l=0),o+h>=Xa)break;i.translate((a+(u>>1))/s,(o+(h>>1))/s),t.rotate&&i.rotate(t.rotate*Lc),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=u,t.height=h,t.xoff=a,t.yoff=o,t.x1=u>>1,t.y1=h>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=u}for(var y=i.getImageData(0,0,(ts<<5)/s,Xa/s).data,b=[];--r>=0;)if(t=n[r],!!t.hasText){for(var u=t.width,S=u>>5,h=t.y1-t.y0,_=0;_<h*S;_++)b[_]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var E=0,T=-1,D=0;D<h;D++){for(var _=0;_<u;_++){var N=S*D+(_>>5),A=y[(o+D)*(ts<<5)+(a+_)<<2]?1<<31-_%32:0;b[N]|=A,E|=A}E?T=D:(t.y0++,h--,D--,o++)}t.y1=t.y0+T,t.sprite=b.slice(0,(t.y1-t.y0)*S)}}}function Vk(e,t,n){n>>=5;for(var r=e.sprite,i=e.width>>5,s=e.x-(i<<4),a=s&127,o=32-a,l=e.y1-e.y0,c=(e.y+e.y0)*n+(s>>5),u,h=0;h<l;h++){u=0;for(var d=0;d<=i;d++)if((u<<o|(d<i?(u=r[h*i+d])>>>a:0))&t[c+d])return!0;c+=n}return!1}function Hk(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function Fk(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function im(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function Gk(e){var t=4,n=t*e[0]/e[1],r=0,i=0;return function(s){var a=s<0?-1:1;switch(Math.sqrt(1+4*a*s)-a&3){case 0:r+=n;break;case 1:i+=t;break;case 2:r-=n;break;default:i-=t;break}return[r,i]}}function zk(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function jk(){return document.createElement("canvas")}function In(e){return typeof e=="function"?e:function(){return e}}var Wk={archimedean:im,rectangular:Gk};const qk=tm(Dk);function Yk(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 Xk(e){return function(t){return e==null?void 0:e[t]}}var Zk={À:"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"},Kk=Xk(Zk);const Qk=Kk;var Jk=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tD="\\u0300-\\u036f",eD="\\ufe20-\\ufe2f",nD="\\u20d0-\\u20ff",rD=tD+eD+nD,iD="["+rD+"]",sD=RegExp(iD,"g");function aD(e){return e=Wi(e),e&&e.replace(Jk,Qk).replace(sD,"")}var oD=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function lD(e){return e.match(oD)||[]}var cD=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function uD(e){return cD.test(e)}var sm="\\ud800-\\udfff",hD="\\u0300-\\u036f",dD="\\ufe20-\\ufe2f",fD="\\u20d0-\\u20ff",pD=hD+dD+fD,am="\\u2700-\\u27bf",om="a-z\\xdf-\\xf6\\xf8-\\xff",gD="\\xac\\xb1\\xd7\\xf7",mD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vD="\\u2000-\\u206f",yD=" \\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",lm="A-Z\\xc0-\\xd6\\xd8-\\xde",bD="\\ufe0e\\ufe0f",cm=gD+mD+vD+yD,um="['’]",hm="["+cm+"]",xD="["+pD+"]",dm="\\d+",wD="["+am+"]",fm="["+om+"]",pm="[^"+sm+cm+dm+am+om+lm+"]",_D="\\ud83c[\\udffb-\\udfff]",ED="(?:"+xD+"|"+_D+")",SD="[^"+sm+"]",gm="(?:\\ud83c[\\udde6-\\uddff]){2}",mm="[\\ud800-\\udbff][\\udc00-\\udfff]",Gr="["+lm+"]",OD="\\u200d",vm="(?:"+fm+"|"+pm+")",TD="(?:"+Gr+"|"+pm+")",ym="(?:"+um+"(?:d|ll|m|re|s|t|ve))?",bm="(?:"+um+"(?:D|LL|M|RE|S|T|VE))?",xm=ED+"?",wm="["+bD+"]?",MD="(?:"+OD+"(?:"+[SD,gm,mm].join("|")+")"+wm+xm+")*",CD="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$D="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",AD=wm+xm+MD,LD="(?:"+[wD,gm,mm].join("|")+")"+AD,kD=RegExp([Gr+"?"+fm+"+"+ym+"(?="+[hm,Gr,"$"].join("|")+")",TD+"+"+bm+"(?="+[hm,Gr+vm,"$"].join("|")+")",Gr+"?"+vm+"+"+ym,Gr+"+"+bm,$D,CD,dm,LD].join("|"),"g");function DD(e){return e.match(kD)||[]}function RD(e,t,n){return e=Wi(e),t=n?void 0:t,t===void 0?uD(e)?DD(e):lD(e):e.match(t)||[]}var ID="['’]",ND=RegExp(ID,"g");function _m(e){return function(t){return Yk(RD(aD(t).replace(ND,"")),e,"")}}function PD(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Em(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Ji(n),n=n===n?n:0),t!==void 0&&(t=Ji(t),t=t===t?t:0),PD(Ji(e),t,n)}function UD(e,t){var n=-1,r=ir(e)?Array(e.length):[];return bc(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function BD(e,t){var n=ee(e)?lp:UD;return n(e,Pa(t))}var VD=1/0;function HD(e,t){return ka(BD(e,t),VD)}function Sm(e,t){return Na(e,t)}var FD=_m(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const zr=FD;function GD(e,t){var n;return bc(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function zD(e,t,n){var r=ee(e)?ng:GD;return n&&yp(e,t,n)&&(t=void 0),r(e,Pa(t))}class ft{constructor(t,n,r){if(this.type="",this.renderType=Q.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(R(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 n;const r=this.parent;if(this.parent=t,!(r&&r.node()===t.node())&&this.type){const i=x(this.model.getOptions(),"style","prefix");(n=this.parent)==null||n.classed(`${ge}--${i}--${this.type}`,!0),r&&r.classed(`${ge}--${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=k.appendOrSelect(this.parent,`${this.renderType===Q.SVG?"svg":"div"}${r}.${ge}--${n}--${this.type}`);if(t.withinChartClip){const s=this.model.get("chartClipId");if(s){const a=R(`#${s}`).select("rect");a.size()!==0&&parseFloat(a.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?rt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}const Om=class Bv extends ft{constructor(){super(...arguments),this.type="toolbar",this.renderType=Q.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(O.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(O.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:r,overflowMenuItemList:i}=this.getControlConfigs();i&&r.push(this.getOverflowButtonConfig());const s=n.selectAll("div.toolbar-control").data(r,l=>l.id);s.exit().remove();const a=s.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),o=this;a.merge(s).classed("disabled",l=>l.shouldBeDisabled()).attr("aria-disabled",l=>l.shouldBeDisabled()).attr("aria-label",l=>l.title).html(l=>`
4
4
  <button
5
5
  class="cds--overflow-menu__trigger cds--overflow-menu__trigger"